@hhgtech/hhg-components 1.29.335 → 1.29.336-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{LastPeriod-ba21f506.js → LastPeriod-659bd1ce.js} +1 -1
- package/build/{MobileBottomNavigationIcon-d2aed6f6.js → MobileBottomNavigationIcon-2df3216b.js} +3 -3
- package/build/{Spinner-c0f6a1e9.js → Spinner-9a2eb99d.js} +1 -1
- package/build/{WhatsApp-8f383a74.js → WhatsApp-404c2dfa.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 +8 -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-6953a0d4.js → constants-13f093e7.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-83da01a5.js → core-d51c164c.js} +1 -1
- package/build/{dataTransform-1cd76236.js → dataTransform-5ee6047e.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-ba869a7d.js → editor-fa1f07d7.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-ee84b089.js → LastPeriod-562b9c80.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-b67e6ed0.js → MobileBottomNavigationIcon-ffc75bc0.js} +3 -3
- package/build/esm/{Spinner-0f69be3b.js → Spinner-695f3ae5.js} +1 -1
- package/build/esm/{WhatsApp-18fce68c.js → WhatsApp-97064f7f.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 +8 -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-8d65289f.js → constants-0b346c24.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-f0937be9.js → core-2a930938.js} +1 -1
- package/build/esm/{dataTransform-73e35955.js → dataTransform-5e35c6ca.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-2c7334e2.js → editor-f2dc6f65.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-e80c6cb4.js → index-003201b5.js} +18 -18
- package/build/esm/{index-88fb7021.js → index-01e0d286.js} +15 -15
- package/build/esm/{index-4e0c5b66.js → index-0aa6cbf8.js} +2 -2
- package/build/esm/{index-2623cd75.js → index-0ad9ff48.js} +16 -16
- package/build/esm/{index-aa51be62.js → index-0d62b2d1.js} +31 -31
- package/build/esm/{index-111b7c08.js → index-180563f2.js} +30 -30
- package/build/esm/{index-89cc4741.js → index-1b155ada.js} +2 -2
- package/build/esm/{index-213d2266.js → index-2588fc00.js} +1 -1
- package/build/esm/{index-8cbc49a3.js → index-27fd0e9f.js} +3 -3
- package/build/esm/{index-666d1195.js → index-2e7b68b4.js} +10 -10
- package/build/esm/{index-f3859b54.js → index-2ead5f09.js} +1 -1
- package/build/esm/{index-a3a89865.js → index-34ad6c37.js} +3 -3
- package/build/esm/{index-3f4fc48d.js → index-3c57c16c.js} +1 -1
- package/build/esm/{index-7d1292b2.js → index-40d819a4.js} +7 -7
- package/build/esm/{index-0f1ee266.js → index-452b9a28.js} +7 -7
- package/build/esm/{index-86f46388.js → index-46cc50d7.js} +2 -2
- package/build/esm/{index-4361942b.js → index-49abe74d.js} +3 -1
- package/build/esm/{index-a982ec16.js → index-54344526.js} +2 -2
- package/build/esm/{index-4aad6743.js → index-551ae86a.js} +17 -17
- package/build/esm/{index-8279d3d1.js → index-56b46d65.js} +13 -13
- package/build/esm/{index-6f5ce9e6.js → index-5a4bfecd.js} +16 -16
- package/build/esm/{index-906ceed9.js → index-5cb9f555.js} +1 -1
- package/build/esm/{index-af6832bb.js → index-5e367901.js} +6 -6
- package/build/esm/{index-300712d7.js → index-5f1caa2e.js} +6 -6
- package/build/esm/{index-b7671a59.js → index-60459d82.js} +20 -20
- package/build/esm/{index-f2452c57.js → index-62343b9e.js} +2 -2
- package/build/esm/{index-17a1b3f9.js → index-62824c74.js} +16 -16
- package/build/esm/{index-e7ba79e1.js → index-670b675a.js} +14 -14
- package/build/esm/index-6b3270e4.js +106 -0
- package/build/esm/{index-17241889.js → index-6c67e1b8.js} +15 -15
- package/build/esm/{index-1281be34.js → index-6e50ccca.js} +24 -24
- package/build/esm/{index-89facfc8.js → index-73801ef4.js} +2 -2
- package/build/esm/{index-272d977d.js → index-7bcae25c.js} +2 -2
- package/build/esm/{index-d811e755.js → index-7f1c18ad.js} +18 -18
- package/build/esm/{index-3f7921e6.js → index-80c67305.js} +2 -2
- package/build/esm/{index-e400c387.js → index-817d0185.js} +6 -6
- package/build/esm/{index-4dd95bae.js → index-84fdfcbb.js} +5 -5
- package/build/esm/{index-125298cb.js → index-88ac10dc.js} +3 -3
- package/build/esm/{index-927ce549.js → index-90d14bee.js} +2 -2
- package/build/esm/{index-51443985.js → index-93490875.js} +1 -1
- package/build/esm/{index-8d201d73.js → index-a5a9ac40.js} +1 -1
- package/build/esm/{index-a8c09ebf.js → index-aff0d9e4.js} +1 -1
- package/build/esm/{index-ca53f881.js → index-b0089117.js} +3 -3
- package/build/esm/{index-f967107c.js → index-b15b6d54.js} +21 -21
- package/build/esm/{index-ec851f36.js → index-c1956ffa.js} +24 -24
- package/build/esm/{index-819eec4d.js → index-c1a342e3.js} +2 -2
- package/build/esm/{index-a97e63b7.js → index-c1cd66b0.js} +2 -2
- package/build/esm/{index-172694d6.js → index-c504fd81.js} +13 -13
- package/build/esm/{index-049d753a.js → index-c54f3c38.js} +17 -17
- package/build/esm/{index-7d7cd80e.js → index-cdc4b049.js} +3 -3
- package/build/esm/{index-ed9ee946.js → index-d028b70f.js} +6 -6
- package/build/esm/{index-fc84dde4.js → index-de0a1ef5.js} +13 -13
- package/build/esm/{index-c461e5a4.js → index-e1a13ff1.js} +1 -1
- package/build/esm/{index-4295cda1.js → index-e488e7cc.js} +18 -18
- package/build/esm/{index-1d2ba1db.js → index-e5cb8b72.js} +13 -13
- package/build/esm/{index-89ab1f4d.js → index-e9eab4a8.js} +2 -2
- package/build/esm/{index-731ec22a.js → index-ecdbedd4.js} +32 -32
- package/build/esm/{index-b1881c11.js → index-f23a4ba3.js} +4 -4
- package/build/esm/{index-fb220371.js → index-f66c922c.js} +5 -5
- package/build/esm/{index-c1245374.js → index-f71973bf.js} +3 -3
- package/build/esm/{index-9d05cfd1.js → index-f738c96f.js} +3 -3
- package/build/esm/{index-d7daa35d.js → index-f9b829fe.js} +16 -16
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +146 -117
- package/build/esm/interfaces/types/Subot.d.ts +1 -0
- package/build/esm/{labelSorting-d70be32f.js → labelSorting-a5ba26d0.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 +772 -351
- package/build/esm/{logoIcon-af3e5a17.js → logoIcon-ffac845e.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-3a1a66b8.js → post-aa645089.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-19b28367.js → store-b59ea661.js} +4 -4
- package/build/esm/subot/components/dob/index.d.ts +4 -0
- package/build/esm/subot/components/dob/utils.d.ts +10 -0
- package/build/esm/subot.js +123 -39
- package/build/esm/surveyOrPremiumBanner.js +31 -31
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-ebc6b1be.js → surveyThankyouCard-15a14cd8.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-4bceadef.js → treePopoverMenu-d01e65ad.js} +19 -19
- package/build/esm/{types-aa1c411e.js → types-ecd2f04c.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-acc2c1e8.js → useCategory-261ac43a.js} +5 -5
- package/build/esm/{useHealthToolCache-c2684203.js → useHealthToolCache-ee6c387b.js} +1 -1
- package/build/esm/{useMantineLocale-6de622f7.js → useMantineLocale-d8f11b31.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-1606467b.js → usePlacesAutocomplete-2a89427f.js} +2 -1
- package/build/esm/{useScreenSize-828d9bce.js → useScreenSize-22954a39.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-f7442d3f.js → utils-1eda011d.js} +3 -3
- package/build/esm/{utils-e3692227.js → utils-4d89ead3.js} +2 -2
- package/build/esm/{utils-503eac0d.js → utils-ed24e931.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-087fe95e.js → index-001df774.js} +17 -17
- package/build/{index-308067f0.js → index-00e7976a.js} +1 -1
- package/build/{index-3c5fcd67.js → index-055ab24f.js} +3 -3
- package/build/{index-e0095c5b.js → index-0dfdaf1a.js} +2 -2
- package/build/{index-212ff8bf.js → index-14a317e7.js} +6 -6
- package/build/{index-a5e2cc3f.js → index-16e79277.js} +2 -2
- package/build/{index-a0bda1e0.js → index-18216ca1.js} +3 -3
- package/build/{index-ed758ff7.js → index-18487c5d.js} +15 -15
- package/build/{index-0996c8af.js → index-184dc897.js} +2 -2
- package/build/{index-302b87c5.js → index-19628af0.js} +5 -5
- package/build/{index-2676d693.js → index-1c60a892.js} +21 -21
- package/build/{index-f9dc1022.js → index-1e39519c.js} +4 -4
- package/build/{index-9fb2ae0a.js → index-1e64041c.js} +1 -1
- package/build/{index-af3aa7aa.js → index-25c5e28e.js} +6 -6
- package/build/{index-a57421a5.js → index-29c6652a.js} +16 -16
- package/build/{index-0aaa493e.js → index-2d3cb4e9.js} +30 -30
- package/build/{index-ee982cce.js → index-3217462f.js} +18 -18
- package/build/{index-bc79ffd9.js → index-347673ad.js} +2 -2
- package/build/{index-7a73c148.js → index-3c9c0b33.js} +2 -2
- package/build/{index-d03e8b2d.js → index-4167cb76.js} +13 -13
- package/build/{index-022c6360.js → index-442a5a85.js} +1 -1
- package/build/{index-e8870a3c.js → index-486a736e.js} +1 -1
- package/build/{index-0b35135a.js → index-4b55f60c.js} +6 -6
- package/build/{index-4481d3d7.js → index-5336b036.js} +2 -2
- package/build/{index-ff744f5d.js → index-544de018.js} +1 -1
- package/build/{index-c8f6c1a9.js → index-546c6b52.js} +13 -13
- package/build/{index-e084b2c5.js → index-557750c0.js} +2 -2
- package/build/{index-479c9ed1.js → index-5be2eb8e.js} +2 -2
- package/build/index-5cf1366a.js +113 -0
- package/build/{index-b4bf4074.js → index-60f10a92.js} +1 -1
- package/build/{index-48da8df2.js → index-62b37c8f.js} +15 -15
- package/build/{index-013f2ca1.js → index-728c7add.js} +16 -16
- package/build/{index-10565ae1.js → index-771f35aa.js} +1 -1
- package/build/{index-cc8bf5c9.js → index-7e8ba222.js} +20 -20
- package/build/{index-60182dd9.js → index-85667c1c.js} +13 -13
- package/build/{index-62a78cec.js → index-8d289fe0.js} +24 -24
- package/build/{index-06277ff9.js → index-8f559781.js} +6 -6
- package/build/{index-76a4c58d.js → index-92262f25.js} +18 -18
- package/build/{index-9f2cd267.js → index-929e9956.js} +7 -7
- package/build/{index-c6aa41c1.js → index-93cf5746.js} +18 -18
- package/build/{index-2f13a23d.js → index-9a233c3c.js} +2 -2
- package/build/{index-41532440.js → index-9eb6fa4d.js} +3 -1
- package/build/{index-70aef25b.js → index-a2a2ec7d.js} +5 -5
- package/build/{index-dd014ba3.js → index-a40ad43f.js} +7 -7
- package/build/{index-06986d0f.js → index-a9c97df8.js} +13 -13
- package/build/{index-099c0ae2.js → index-ac8f0505.js} +3 -3
- package/build/{index-464aaa65.js → index-acc432e8.js} +31 -31
- package/build/{index-4cf53090.js → index-ad3a2406.js} +1 -1
- package/build/{index-c6bef368.js → index-b09aef47.js} +24 -24
- package/build/{index-21df7f49.js → index-b27e738a.js} +17 -17
- package/build/{index-8028db52.js → index-b73e2d09.js} +2 -2
- package/build/{index-a6bce961.js → index-c2df8a02.js} +2 -2
- package/build/{index-0372231c.js → index-d4b6266f.js} +16 -16
- package/build/{index-dc7c2c4d.js → index-d4cf0227.js} +32 -32
- package/build/{index-e58154c7.js → index-d687721b.js} +2 -2
- package/build/{index-02a064cf.js → index-da3bb323.js} +14 -14
- package/build/{index-9dfbb72e.js → index-e97cc673.js} +3 -3
- package/build/{index-6a356df5.js → index-f2bfcc96.js} +3 -3
- package/build/{index-c190b54f.js → index-f7b46f91.js} +3 -3
- package/build/{index-ea37733b.js → index-f8cfc5be.js} +10 -10
- package/build/{index-f2ec6279.js → index-fb344535.js} +16 -16
- package/build/{index-676f3c4f.js → index-ffff93ea.js} +3 -3
- package/build/index.css +1 -1
- package/build/index.js +211 -179
- package/build/interfaces/types/Subot.d.ts +1 -0
- package/build/{labelSorting-ced18dfa.js → labelSorting-a2e886ae.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 +772 -350
- package/build/{logoIcon-7bb432ca.js → logoIcon-7f80fd0c.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-b27e59c0.js → post-f9f51373.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-6298e376.js → store-18dfe63b.js} +4 -4
- package/build/subot/components/dob/index.d.ts +4 -0
- package/build/subot/components/dob/utils.d.ts +10 -0
- package/build/subot.js +126 -41
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-bad691e9.js → surveyThankyouCard-06bde86d.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-044c32a4.js → treePopoverMenu-4c15df19.js} +19 -19
- package/build/{types-dce83d8b.js → types-b77665f1.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-ecc66204.js → useCategory-8b1a3a8f.js} +5 -5
- package/build/{useHealthToolCache-c45bbd67.js → useHealthToolCache-b80faa76.js} +1 -1
- package/build/{useMantineLocale-d11812c5.js → useMantineLocale-61d6439e.js} +6 -6
- package/build/{usePlacesAutocomplete-2bc75236.js → usePlacesAutocomplete-65a80e07.js} +2 -1
- package/build/{useScreenSize-83ac08f1.js → useScreenSize-a48e8f38.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-36234b1a.js → utils-8c87c06c.js} +2 -2
- package/build/{utils-0cbba059.js → utils-976ee93e.js} +3 -3
- package/build/{utils-92cd1e7a.js → utils-b5552741.js} +2 -2
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- /package/build/{BMI_BOYS.percentile.monthly-fae500f2.js → BMI_BOYS.percentile.monthly-f55e2830.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-aa294985.js → BMI_BOYS.percentile.weekly-fe899005.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-9e6fd6dd.js → BMI_BOYS.percentile.yearly-f8f22078.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-9ea48c8c.js → BMI_BOYS.zscore.monthly-026471fb.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-2773fa61.js → BMI_BOYS.zscore.weekly-e28e3598.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-b03827e7.js → BMI_BOYS.zscore.yearly-510094ec.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-1fa58953.js → BMI_GIRLS.percentile.monthly-5165a8df.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-db5dbfd4.js → BMI_GIRLS.percentile.weekly-c6aad56c.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-e4ef6fce.js → BMI_GIRLS.percentile.yearly-6ba92ea1.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-f1fe0427.js → BMI_GIRLS.zscore.monthly-8dd01379.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-efce6fb2.js → BMI_GIRLS.zscore.weekly-a0fa2fd6.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-bc41ceb0.js → BMI_GIRLS.zscore.yearly-47ecabb2.js} +0 -0
- /package/build/{ChevronDown-471c8091.js → ChevronDown-37624b21.js} +0 -0
- /package/build/{Close-8bde9c2f.js → Close-127924ab.js} +0 -0
- /package/build/{Google-ac0354ae.js → Google-52e99e0e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-cd991624.js → HEAD CIRCUM_BOYS.percentile.monthly-9aeff9d9.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-4a0c6bdd.js → HEAD CIRCUM_BOYS.percentile.weekly-d52d7371.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-e3d2bbc5.js → HEAD CIRCUM_BOYS.percentile.yearly-3c6b6edb.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-4e342021.js → HEAD CIRCUM_BOYS.zscore.monthly-065fa2ae.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-9a54efae.js → HEAD CIRCUM_BOYS.zscore.weekly-1d438b87.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-c14bee9a.js → HEAD CIRCUM_BOYS.zscore.yearly-34ba27e2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-618e95ff.js → HEAD CIRCUM_GIRLS.percentile.monthly-2d958fb8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-a7c4912f.js → HEAD CIRCUM_GIRLS.percentile.weekly-65bac8a8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-6053a9c8.js → HEAD CIRCUM_GIRLS.percentile.yearly-1a329774.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-04b6e597.js → HEAD CIRCUM_GIRLS.zscore.monthly-7d56e463.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-37e66837.js → HEAD CIRCUM_GIRLS.zscore.weekly-f9f322e5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-2b53756c.js → HEAD CIRCUM_GIRLS.zscore.yearly-44d9f80a.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-f3ff755f.js → HEIGHT_BOYS.percentile.monthly-ab434336.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-65d1525c.js → HEIGHT_BOYS.percentile.weekly-0d24e9e9.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-46882afc.js → HEIGHT_BOYS.percentile.yearly-837de537.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-d440d178.js → HEIGHT_BOYS.zscore.monthly-2e357d32.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-aac82089.js → HEIGHT_BOYS.zscore.weekly-d8170f68.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-3556ce35.js → HEIGHT_BOYS.zscore.yearly-88b33bc9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-f0337f1a.js → HEIGHT_GIRLS.percentile.monthly-ef9c4dbc.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-c4cde187.js → HEIGHT_GIRLS.percentile.weekly-9c540100.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-7c79eae1.js → HEIGHT_GIRLS.percentile.yearly-7b7b7ba7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-6ad5d453.js → HEIGHT_GIRLS.zscore.monthly-51b48988.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-93ee746c.js → HEIGHT_GIRLS.zscore.weekly-a66fbcf1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-7ddba194.js → HEIGHT_GIRLS.zscore.yearly-ce41b307.js} +0 -0
- /package/build/{Locale-a81611df.js → Locale-20692906.js} +0 -0
- /package/build/{Visible-68270fc7.js → Visible-b8655b6d.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-a006d6ff.js → WEIGHT_BOYS.percentile.monthly-e67f6c5d.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-aac8cda0.js → WEIGHT_BOYS.percentile.weekly-343aaf10.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-f2f9e9cb.js → WEIGHT_BOYS.percentile.yearly-5daf5200.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-4191e485.js → WEIGHT_BOYS.zscore.monthly-bf807684.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-7f6f5748.js → WEIGHT_BOYS.zscore.weekly-45101b7f.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-e09a0ab2.js → WEIGHT_BOYS.zscore.yearly-6149217b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-25d6847f.js → WEIGHT_GIRLS.percentile.monthly-feb24878.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-46dfa66e.js → WEIGHT_GIRLS.percentile.weekly-b1cde27b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-3fb26336.js → WEIGHT_GIRLS.percentile.yearly-097dd3c2.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-786b74ad.js → WEIGHT_GIRLS.zscore.monthly-2274304c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-d733f4de.js → WEIGHT_GIRLS.zscore.weekly-8bff8971.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-de583439.js → WEIGHT_GIRLS.zscore.yearly-c593e0fb.js} +0 -0
- /package/build/{animation-f1553def.js → animation-0fb37a35.js} +0 -0
- /package/build/{constants-84f38be5.js → constants-6b8c8100.js} +0 -0
- /package/build/{constants-cce2f8f6.js → constants-737fe714.js} +0 -0
- /package/build/{constants-90166342.js → constants-892ca465.js} +0 -0
- /package/build/{dataTransform-56a33f97.js → dataTransform-65bcd087.js} +0 -0
- /package/build/{doctor-58bbeecf.js → doctor-bd31ddc2.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-be455c2d.js → BMI_BOYS.percentile.monthly-fb468076.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-9f32de31.js → BMI_BOYS.percentile.weekly-80211cf3.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-0c2407b1.js → BMI_BOYS.percentile.yearly-6bfe0f2f.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-de4f9a75.js → BMI_BOYS.zscore.monthly-54f5d1fa.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-998396ea.js → BMI_BOYS.zscore.weekly-52293f88.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-b17c74c7.js → BMI_BOYS.zscore.yearly-5c245af5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-32120032.js → BMI_GIRLS.percentile.monthly-01cf5924.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-56175adb.js → BMI_GIRLS.percentile.weekly-2a12fd5d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-a1694c1f.js → BMI_GIRLS.percentile.yearly-de40c9ae.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-ae560ee7.js → BMI_GIRLS.zscore.monthly-13cb9596.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-3a584bd7.js → BMI_GIRLS.zscore.weekly-d9eb03ba.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-e8c0813e.js → BMI_GIRLS.zscore.yearly-0d8099f2.js} +0 -0
- /package/build/esm/{ChevronDown-3b278da4.js → ChevronDown-36476e41.js} +0 -0
- /package/build/esm/{Close-edd9e39c.js → Close-d024034d.js} +0 -0
- /package/build/esm/{Google-9062c4ef.js → Google-537b74c0.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-9f74b8db.js → HEAD CIRCUM_BOYS.percentile.monthly-8ac76e06.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-bbf5d9bd.js → HEAD CIRCUM_BOYS.percentile.weekly-d42b1830.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-3bb65eb3.js → HEAD CIRCUM_BOYS.percentile.yearly-81bb1726.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-02470123.js → HEAD CIRCUM_BOYS.zscore.monthly-a37e2950.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-ef655b55.js → HEAD CIRCUM_BOYS.zscore.weekly-ea0fc558.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-d7612c74.js → HEAD CIRCUM_BOYS.zscore.yearly-25a7300d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-d3fa4f82.js → HEAD CIRCUM_GIRLS.percentile.monthly-8bc21c56.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-4722c8b8.js → HEAD CIRCUM_GIRLS.percentile.weekly-9cea5ef2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-b1beb914.js → HEAD CIRCUM_GIRLS.percentile.yearly-27663dad.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-533cdaf4.js → HEAD CIRCUM_GIRLS.zscore.monthly-2d737aca.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-f6445517.js → HEAD CIRCUM_GIRLS.zscore.weekly-c24b5c90.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-cb87284f.js → HEAD CIRCUM_GIRLS.zscore.yearly-ecc2a64a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-3dc695a6.js → HEIGHT_BOYS.percentile.monthly-fabb68f6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-84cc031e.js → HEIGHT_BOYS.percentile.weekly-aab1a948.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-0ad15042.js → HEIGHT_BOYS.percentile.yearly-e4041c96.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-c601565b.js → HEIGHT_BOYS.zscore.monthly-27e17857.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-27d3a326.js → HEIGHT_BOYS.zscore.weekly-2771e4b1.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-ef7bc92e.js → HEIGHT_BOYS.zscore.yearly-f4cdf852.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-9154540f.js → HEIGHT_GIRLS.percentile.monthly-4acef5ea.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-9d54d800.js → HEIGHT_GIRLS.percentile.weekly-59dbbce3.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-211964e6.js → HEIGHT_GIRLS.percentile.yearly-2d09af2c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-dd943f5f.js → HEIGHT_GIRLS.zscore.monthly-f0be5be8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-23630973.js → HEIGHT_GIRLS.zscore.weekly-9a9ad971.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-b095f267.js → HEIGHT_GIRLS.zscore.yearly-bb231a05.js} +0 -0
- /package/build/esm/{Locale-9a8d7014.js → Locale-c39977d1.js} +0 -0
- /package/build/esm/{Visible-60317e10.js → Visible-dc89f71f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-2bde8464.js → WEIGHT_BOYS.percentile.monthly-aadc6e8e.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-220d5cc3.js → WEIGHT_BOYS.percentile.weekly-bbae4484.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-391d087c.js → WEIGHT_BOYS.percentile.yearly-9bf87405.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-de496448.js → WEIGHT_BOYS.zscore.monthly-3ca6a591.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-0adb09ed.js → WEIGHT_BOYS.zscore.weekly-6df6921c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-d20b78d8.js → WEIGHT_BOYS.zscore.yearly-796302ff.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-def0dfc9.js → WEIGHT_GIRLS.percentile.monthly-f8bc86fa.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-b9b14f32.js → WEIGHT_GIRLS.percentile.weekly-be22188f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-1ea01f1b.js → WEIGHT_GIRLS.percentile.yearly-bd44e488.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-29892d73.js → WEIGHT_GIRLS.zscore.monthly-deaae114.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-4e72a42f.js → WEIGHT_GIRLS.zscore.weekly-ab1b1191.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-22b3e590.js → WEIGHT_GIRLS.zscore.yearly-bce9409d.js} +0 -0
- /package/build/esm/{animation-a169fce5.js → animation-ca1910de.js} +0 -0
- /package/build/esm/{constants-10597147.js → constants-1c691a67.js} +0 -0
- /package/build/esm/{constants-7efac097.js → constants-6b6c3f5b.js} +0 -0
- /package/build/esm/{constants-1b936c16.js → constants-c1549f35.js} +0 -0
- /package/build/esm/{dataTransform-93cd11dd.js → dataTransform-fafb9161.js} +0 -0
- /package/build/esm/{doctor-453fdde1.js → doctor-61e1342e.js} +0 -0
- /package/build/esm/{index-83c5ea9d.js → index-0f05bf35.js} +0 -0
- /package/build/esm/{index-98592aa9.js → index-0fed45af.js} +0 -0
- /package/build/esm/{index-c4690639.js → index-3328f995.js} +0 -0
- /package/build/esm/{index-871b0215.js → index-3b03fbe4.js} +0 -0
- /package/build/esm/{index-09345edf.js → index-728d4190.js} +0 -0
- /package/build/esm/{index-94f00abc.js → index-74673f49.js} +0 -0
- /package/build/esm/{index-6df8fc35.js → index-a46489c4.js} +0 -0
- /package/build/esm/{index-8103381b.js → index-b6259b1c.js} +0 -0
- /package/build/esm/{index-513a4e56.js → index-d97fda86.js} +0 -0
- /package/build/esm/{index.styles-4975f159.js → index.styles-7e27b3ab.js} +0 -0
- /package/build/esm/{localizeNumberFormat-327ef79b.js → localizeNumberFormat-2748622e.js} +0 -0
- /package/build/esm/{normalizeLink-c00261c5.js → normalizeLink-3f635e68.js} +0 -0
- /package/build/esm/{other-280b32ab.js → other-f2efb99f.js} +0 -0
- /package/build/esm/{paths-af7b0346.js → paths-eb76f279.js} +0 -0
- /package/build/esm/{translationsContext-970699a3.js → translationsContext-e4dbc5a3.js} +0 -0
- /package/build/esm/{tslib.es6-eca8a1d1.js → tslib.es6-0bd50109.js} +0 -0
- /package/build/esm/{types-48fa3d8e.js → types-24e8db10.js} +0 -0
- /package/build/esm/{useIsInit-6fd7ad4e.js → useIsInit-47d74337.js} +0 -0
- /package/build/esm/{useOutsideClick-f6b8f1cd.js → useOutsideClick-899dfb0d.js} +0 -0
- /package/build/esm/{useScrollbarSize-76a18900.js → useScrollbarSize-47fd631e.js} +0 -0
- /package/build/esm/{useUniqueId-76e83ac6.js → useUniqueId-9e8e5844.js} +0 -0
- /package/build/esm/{utils-ed4859f3.js → utils-ab249590.js} +0 -0
- /package/build/{index-6c3a42d0.js → index-1c3714f1.js} +0 -0
- /package/build/{index-94556c4f.js → index-268cba6e.js} +0 -0
- /package/build/{index-13c15517.js → index-62ba0095.js} +0 -0
- /package/build/{index-3d42916c.js → index-6811653f.js} +0 -0
- /package/build/{index-972d76d1.js → index-7816bbae.js} +0 -0
- /package/build/{index-827eafad.js → index-bcec94c8.js} +0 -0
- /package/build/{index-b744ef38.js → index-f6d671c5.js} +0 -0
- /package/build/{index-47f9f1e5.js → index-f9804cb0.js} +0 -0
- /package/build/{index-abf7a2cb.js → index-f9b9abd6.js} +0 -0
- /package/build/{index.styles-a1b042a0.js → index.styles-6ab5ae0c.js} +0 -0
- /package/build/{localizeNumberFormat-7fb12e39.js → localizeNumberFormat-421cb874.js} +0 -0
- /package/build/{normalizeLink-d1060c3d.js → normalizeLink-05d46c31.js} +0 -0
- /package/build/{other-693a6ae5.js → other-d7f0fd81.js} +0 -0
- /package/build/{paths-1004acf7.js → paths-a421fb5a.js} +0 -0
- /package/build/{translationsContext-200cf744.js → translationsContext-a1f76e51.js} +0 -0
- /package/build/{tslib.es6-748c9937.js → tslib.es6-c3213f37.js} +0 -0
- /package/build/{types-d8e6306c.js → types-b59446c6.js} +0 -0
- /package/build/{useIsInit-b45e611a.js → useIsInit-30e7adf9.js} +0 -0
- /package/build/{useOutsideClick-c46a0027.js → useOutsideClick-818a31f7.js} +0 -0
- /package/build/{useScrollbarSize-bfe4ab4a.js → useScrollbarSize-786eae25.js} +0 -0
- /package/build/{useUniqueId-5db58a2f.js → useUniqueId-058dbcda.js} +0 -0
- /package/build/{utils-f132a093.js → utils-9a14c25f.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-0bd50109.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-a5a9ac40.js';
|
|
8
|
+
import { T as Text } from './index-7bcae25c.js';
|
|
9
|
+
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput } from './index-670b675a.js';
|
|
10
|
+
import { D as DatePicker } from './index-817d0185.js';
|
|
11
|
+
import { M as MAPPED_LOCALE } from './utils-4d89ead3.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-46cc50d7.js';
|
|
14
|
+
import './index-49abe74d.js';
|
|
15
|
+
import { C as CommonGAssets } from './index-728d4190.js';
|
|
16
|
+
import './useMantineLocale-d8f11b31.js';
|
|
17
|
+
import { B as Button$1 } from './index-aff0d9e4.js';
|
|
18
|
+
import './index.styles-7e27b3ab.js';
|
|
19
|
+
import { T as TranslationsContext } from './translationsContext-e4dbc5a3.js';
|
|
20
|
+
import { useClickOutside } from '@mantine/hooks';
|
|
21
|
+
import { b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-ab249590.js';
|
|
22
|
+
import './other-f2efb99f.js';
|
|
23
|
+
import './index-cdc4b049.js';
|
|
24
|
+
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-2a89427f.js';
|
|
25
|
+
import { B as Button } from './index-c1cd66b0.js';
|
|
26
|
+
import { H as Heading$1 } from './index-c1a342e3.js';
|
|
27
27
|
import { v1 } from 'uuid';
|
|
28
|
-
import { i as isVideo } from './index-
|
|
29
|
-
import {
|
|
28
|
+
import { i as isVideo } from './index-d97fda86.js';
|
|
29
|
+
import { D as DrawerComponent } from './index-6b3270e4.js';
|
|
30
|
+
import { u as useScreenSize } from './useScreenSize-22954a39.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-d024034d.js';
|
|
33
37
|
import '@hhgtech/icons/other';
|
|
34
|
-
import './useScreenSize-828d9bce.js';
|
|
35
|
-
import '@emotion/styled';
|
|
36
38
|
import '@mantine/carousel';
|
|
37
|
-
import './Locale-
|
|
39
|
+
import './Locale-c39977d1.js';
|
|
38
40
|
import 'classnames';
|
|
39
|
-
import './useUniqueId-
|
|
41
|
+
import './useUniqueId-9e8e5844.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,377 @@ 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(input[data-invalid]) {
|
|
1774
|
+
border-color: ${theme.colors.red400};
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
&:has(.mantine-Input-rightSection) {
|
|
1778
|
+
padding-right: var(--container-height, 56px);
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.mantine-Input-icon {
|
|
1782
|
+
display: none;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.mantine-NumberInput-control {
|
|
1786
|
+
border-color: ${theme.colors.gray200};
|
|
1787
|
+
}
|
|
1788
|
+
`;
|
|
1789
|
+
const cssWrapperInputShrink = css `
|
|
1790
|
+
height: auto;
|
|
1791
|
+
min-height: var(--container-height, 56px);
|
|
1792
|
+
padding-block: var(--space-y-shrink, 7px);
|
|
1793
|
+
cursor: text;
|
|
1794
|
+
pointer-events: auto;
|
|
1795
|
+
`;
|
|
1796
|
+
const StyledTextFieldContainer = styled.div `
|
|
1797
|
+
--space-x: 16px;
|
|
1798
|
+
--space-y-not-shrink: 16px;
|
|
1799
|
+
--space-y-shrink: 7px;
|
|
1800
|
+
--container-height: 56px;
|
|
1801
|
+
--label-not-shrink: 16px;
|
|
1802
|
+
--label-shrink: 12px;
|
|
1803
|
+
--input: 16px;
|
|
1804
|
+
|
|
1805
|
+
position: relative;
|
|
1806
|
+
min-width: 100px;
|
|
1807
|
+
max-width: 100%;
|
|
1808
|
+
display: inline-block;
|
|
1809
|
+
|
|
1810
|
+
.textField_wrapper {
|
|
1811
|
+
display: inline-block;
|
|
1812
|
+
width: 100%;
|
|
1813
|
+
cursor: pointer;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
.mantine-InputWrapper-label {
|
|
1817
|
+
${cssLabelNotShrink}
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
.mantine-Input-wrapper {
|
|
1821
|
+
${cssWrapperInputNotShrink}
|
|
1822
|
+
|
|
1823
|
+
+ .mantine-Popover-dropdown[data-position="bottom-start"] {
|
|
1824
|
+
left: 0 !important;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
.mantine-Input-input {
|
|
1829
|
+
${cssInputNotShrink}
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
&.textField_shrink,
|
|
1833
|
+
&:focus-within {
|
|
1834
|
+
.mantine-InputWrapper-label {
|
|
1835
|
+
${cssLabelShrink}
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
.mantine-Input-wrapper {
|
|
1839
|
+
${cssWrapperInputShrink}
|
|
1840
|
+
&.mantine-Select-wrapper {
|
|
1841
|
+
.mantine-Select-rightSection {
|
|
1842
|
+
pointer-events: auto !important;
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
.mantine-Input-input {
|
|
1848
|
+
${cssInputShrink}
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
&:has(.PhoneInput) {
|
|
1852
|
+
.mantine-InputWrapper-label {
|
|
1853
|
+
left: var(--space-x, 16px);
|
|
1854
|
+
}
|
|
1855
|
+
.PhoneInput {
|
|
1856
|
+
.PhoneInputInput {
|
|
1857
|
+
opacity: 1;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
.PhoneInput {
|
|
1864
|
+
--phone-select: 75px;
|
|
1865
|
+
--phone-input-space-x: 8px;
|
|
1866
|
+
width: 100%;
|
|
1867
|
+
opacity: 1;
|
|
1868
|
+
border: none;
|
|
1869
|
+
.PhoneInputCountry {
|
|
1870
|
+
background-color: transparent;
|
|
1871
|
+
border: none;
|
|
1872
|
+
padding: 0;
|
|
1873
|
+
width: var(--phone-select, 75px);
|
|
1874
|
+
}
|
|
1875
|
+
.PhoneInputInput {
|
|
1876
|
+
flex: 1;
|
|
1877
|
+
min-width: 0;
|
|
1878
|
+
line-height: 1.5;
|
|
1879
|
+
outline: none !important;
|
|
1880
|
+
border: none;
|
|
1881
|
+
box-shadow: none;
|
|
1882
|
+
padding: 0 var(--phone-input-space-x, 8px);
|
|
1883
|
+
opacity: 0;
|
|
1884
|
+
color: ${theme.colors.gray800} !important;
|
|
1885
|
+
:focus {
|
|
1886
|
+
color: ${theme.colors.gray800} !important;
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
&:has(.PhoneInput) {
|
|
1892
|
+
.mantine-InputWrapper-label {
|
|
1893
|
+
left: calc(
|
|
1894
|
+
var(--space-x, 16px) + var(--phone-select, 75px) +
|
|
1895
|
+
var(--phone-input-space-x, 8px)
|
|
1896
|
+
);
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
`;
|
|
1900
|
+
const StyledChoiceFieldContainer = styled.div `
|
|
1901
|
+
&.leadgen-form_checkbox,
|
|
1902
|
+
&.leadgen-form_radio {
|
|
1903
|
+
width: 100%;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
&.leadgen-form_dropdown {
|
|
1907
|
+
width: calc(50% - 12px);
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
.mantine-InputWrapper-root {
|
|
1911
|
+
display: block;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
.mantine-InputWrapper-label {
|
|
1915
|
+
margin-bottom: 0.5rem;
|
|
1916
|
+
color: ${theme.colors.gray800};
|
|
1917
|
+
font-size: 16px;
|
|
1918
|
+
font-weight: 400;
|
|
1919
|
+
line-height: 1.5;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
.mantine-Radio-root,
|
|
1923
|
+
.mantine-Checkbox-root {
|
|
1924
|
+
gap: 8px;
|
|
1925
|
+
min-width: calc(50% - 4px);
|
|
1926
|
+
|
|
1927
|
+
input[type='radio'],
|
|
1928
|
+
input[type='checkbox'] {
|
|
1929
|
+
border-color: ${theme.colors.gray600};
|
|
1930
|
+
width: 18px;
|
|
1931
|
+
height: 18px;
|
|
1932
|
+
}
|
|
1933
|
+
input[type='checkbox'] {
|
|
1934
|
+
border-radius: 4px;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
&[data-checked='true'] {
|
|
1938
|
+
input[type='radio'],
|
|
1939
|
+
input[type='checkbox'] {
|
|
1940
|
+
border-color: ${theme.colors.primary600};
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
input[type='radio'] {
|
|
1944
|
+
background-color: white;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
.mantine-Radio-inner,
|
|
1950
|
+
.mantine-Checkbox-inner {
|
|
1951
|
+
width: 24px;
|
|
1952
|
+
height: 24px;
|
|
1953
|
+
display: flex;
|
|
1954
|
+
align-items: center;
|
|
1955
|
+
justify-content: center;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
.mantine-Radio-body,
|
|
1959
|
+
.mantine-Checkbox-body {
|
|
1960
|
+
display: flex;
|
|
1961
|
+
align-items: center;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
.mantine-Radio-label,
|
|
1965
|
+
.mantine-Checkbox-label {
|
|
1966
|
+
padding-left: 8px;
|
|
1967
|
+
color: ${theme.colors.gray800};
|
|
1968
|
+
font-size: 14px;
|
|
1969
|
+
line-height: 1.4;
|
|
1970
|
+
letter-spacing: -0.2px;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
.leadgen-choiceContainer {
|
|
1974
|
+
display: flex;
|
|
1975
|
+
flex-wrap: wrap;
|
|
1976
|
+
align-items: flex-start;
|
|
1977
|
+
gap: 8px;
|
|
1978
|
+
}
|
|
1979
|
+
`;
|
|
1980
|
+
|
|
1981
|
+
const TextField = (props) => {
|
|
1982
|
+
const { shrink: shrinkProps, onChangeShrink, className, children } = props, restProps = __rest(props, ["shrink", "onChangeShrink", "className", "children"]);
|
|
1983
|
+
const containerRef = useClickOutside(() => {
|
|
1984
|
+
if (shrinkProps) {
|
|
1985
|
+
return;
|
|
1516
1986
|
}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
setReady(true);
|
|
1527
|
-
}, 200);
|
|
1528
|
-
});
|
|
1987
|
+
setShrink(false);
|
|
1988
|
+
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
|
|
1989
|
+
});
|
|
1990
|
+
const [shrink, setShrink] = useState(shrinkProps);
|
|
1991
|
+
const onClick = useCallback((e) => {
|
|
1992
|
+
setShrink(true);
|
|
1993
|
+
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
|
|
1994
|
+
if (shrink) {
|
|
1995
|
+
return;
|
|
1529
1996
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1997
|
+
const $textEl = e.currentTarget.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
|
|
1998
|
+
const $focusEl = $textEl.item($textEl.length - 1);
|
|
1999
|
+
if ($focusEl) {
|
|
2000
|
+
$focusEl.focus();
|
|
2001
|
+
$focusEl.scrollIntoView({
|
|
2002
|
+
behavior: 'auto',
|
|
2003
|
+
block: 'start',
|
|
2004
|
+
inline: 'start',
|
|
2005
|
+
});
|
|
1532
2006
|
}
|
|
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)))));
|
|
2007
|
+
}, [shrink]);
|
|
2008
|
+
useEffect(() => {
|
|
2009
|
+
setShrink(shrinkProps);
|
|
2010
|
+
}, [shrinkProps]);
|
|
2011
|
+
return (React__default.createElement(StyledTextFieldContainer, Object.assign({ shrink: shrink, className: clsx(className, 'textField', { textField_shrink: !!shrink }) }, restProps),
|
|
2012
|
+
React__default.createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, children)));
|
|
2013
|
+
};
|
|
2014
|
+
const ChoiceField = (props) => {
|
|
2015
|
+
const { children, className } = props, restProps = __rest(props, ["children", "className"]);
|
|
2016
|
+
return (React__default.createElement(StyledChoiceFieldContainer, Object.assign({ className: clsx(className, 'choiceField') }, restProps), children));
|
|
1545
2017
|
};
|
|
1546
2018
|
|
|
1547
|
-
const SubtitleBlock = ({ children, align, }) => (React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
1548
|
-
|
|
1549
2019
|
const TitleBlock = ({ children, align, }) => (React__default.createElement("h2", { className: `lead-modal__title ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
1550
2020
|
|
|
1551
2021
|
const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, }) => {
|
|
1552
2022
|
const form = useLeadFormContext();
|
|
2023
|
+
const formValues = form.values;
|
|
1553
2024
|
return (React__default.createElement(React__default.Fragment, null, listBlockAdded.map((b, index) => {
|
|
1554
2025
|
var _a;
|
|
1555
2026
|
const { name = '', data = {} } = b || {};
|
|
1556
2027
|
const { placeholder, value, align, listQuestion, isSendMailChimp = false, newtab, url, } = data;
|
|
1557
2028
|
const required = (_a = data.required) !== null && _a !== void 0 ? _a : true;
|
|
2029
|
+
const formValue = (formValues === null || formValues === void 0 ? void 0 : formValues[value]) || null;
|
|
1558
2030
|
switch (name) {
|
|
1559
2031
|
case 'TitleBlock':
|
|
1560
2032
|
return (React__default.createElement(TitleBlock, { key: index, align: align }, value));
|
|
1561
2033
|
case 'SubtitleBlock':
|
|
1562
2034
|
return (React__default.createElement(SubtitleBlock, { key: index, align: align }, value));
|
|
1563
2035
|
case 'TextBlock':
|
|
1564
|
-
return (React__default.createElement(
|
|
1565
|
-
|
|
1566
|
-
|
|
2036
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2037
|
+
React__default.createElement(TextInput, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "text", placeholder: placeholder,
|
|
2038
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2039
|
+
// onChangeRaw={(e) => inputOnChange('text', e)}
|
|
2040
|
+
label: placeholder, "data-control": "text", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1567
2041
|
case 'NumberBlock':
|
|
1568
|
-
return (React__default.createElement(
|
|
1569
|
-
|
|
1570
|
-
|
|
2042
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2043
|
+
React__default.createElement(NumberInput$1, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "number", placeholder: placeholder,
|
|
2044
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2045
|
+
// onChange={(e) => inputOnChange('number', e)}
|
|
2046
|
+
label: placeholder, "data-control": "number", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1571
2047
|
case 'EmailBlock':
|
|
1572
|
-
return (React__default.createElement(
|
|
1573
|
-
|
|
1574
|
-
|
|
2048
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2049
|
+
React__default.createElement(TextInput, Object.assign({ key: index, withAsterisk: required, spellCheck: false,
|
|
2050
|
+
// type="email"
|
|
2051
|
+
placeholder: placeholder,
|
|
2052
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2053
|
+
label: placeholder, "data-control": "email", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1575
2054
|
case 'PhoneOtpBlock':
|
|
1576
2055
|
case 'WhatsappOtpBlock':
|
|
1577
2056
|
case 'ZaloOtpBlock':
|
|
1578
2057
|
case 'PhoneBlock': {
|
|
1579
2058
|
const id = popupId + '-' + value + '-' + index;
|
|
1580
|
-
return (React__default.createElement(
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
},
|
|
1588
|
-
|
|
1589
|
-
|
|
2059
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2060
|
+
React__default.createElement(Input$1.Wrapper, Object.assign({ size: "md", withAsterisk: required, key: index, label: placeholder,
|
|
2061
|
+
// error={errorField.phone}
|
|
2062
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2063
|
+
labelProps: {
|
|
2064
|
+
htmlFor: id,
|
|
2065
|
+
}, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)),
|
|
2066
|
+
React__default.createElement("div", { className: "mantine-Input-wrapper" },
|
|
2067
|
+
React__default.createElement(Phone, { className: "mantine-Input-input", name: value, spellCheck: false, type: "tel", placeholder: placeholder, onChange: (v) => {
|
|
2068
|
+
form.setFieldValue(value, v);
|
|
2069
|
+
},
|
|
2070
|
+
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
2071
|
+
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel" })))));
|
|
1590
2072
|
}
|
|
1591
2073
|
case 'LocationBlock': {
|
|
1592
|
-
return (React__default.createElement(
|
|
2074
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2075
|
+
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
2076
|
}
|
|
1594
2077
|
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
|
-
|
|
2078
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2079
|
+
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) => {
|
|
2080
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
2081
|
+
children,
|
|
2082
|
+
React__default.createElement("input", { type: "hidden", "data-control": "date", name: value, value: formValue })));
|
|
2083
|
+
} }, form.getInputProps(value)))));
|
|
1598
2084
|
case 'LinkButtonBlock':
|
|
1599
2085
|
return (React__default.createElement("div", { key: index },
|
|
1600
2086
|
React__default.createElement("a", { target: newtab ? 'blank' : 'parrent', href: url, style: { textDecoration: 'none' } },
|
|
@@ -1603,29 +2089,40 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
1603
2089
|
onOtherSubmit === null || onOtherSubmit === void 0 ? void 0 : onOtherSubmit();
|
|
1604
2090
|
} }, value))));
|
|
1605
2091
|
case 'CheckboxBlock':
|
|
1606
|
-
return (React__default.createElement(
|
|
2092
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox" },
|
|
1607
2093
|
isSendMailChimp && (React__default.createElement("div", { style: {
|
|
1608
2094
|
display: 'none',
|
|
1609
2095
|
}, "data-name": value + '-mailchimp' })),
|
|
1610
|
-
React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required,
|
|
2096
|
+
React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required,
|
|
2097
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2098
|
+
key: index, label: placeholder, size: "md", sx: {
|
|
1611
2099
|
display: 'flex',
|
|
1612
2100
|
flexDirection: 'column',
|
|
2101
|
+
flexWrap: 'wrap',
|
|
1613
2102
|
gap: 8,
|
|
2103
|
+
}, inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
2104
|
+
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
1614
2105
|
} }, 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
2106
|
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,
|
|
2107
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_radio" },
|
|
2108
|
+
isSendMailChimp && (React__default.createElement(Input$1, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
|
|
2109
|
+
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required,
|
|
2110
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2111
|
+
key: index, label: placeholder, size: "md", inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
2112
|
+
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
2113
|
+
} }, 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
2114
|
case 'DropdownBlock':
|
|
1620
|
-
return (React__default.createElement(
|
|
2115
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
1621
2116
|
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,
|
|
2117
|
+
React__default.createElement(Select, Object.assign({ key: index,
|
|
2118
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
2119
|
+
label: placeholder, placeholder: placeholder, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
|
|
1623
2120
|
value: l.value,
|
|
1624
2121
|
label: l.placeholder,
|
|
1625
2122
|
})) }, form.getInputProps(value)))));
|
|
1626
2123
|
case 'TncBlock':
|
|
1627
2124
|
const tncInputProps = form.getInputProps('TNC-' + b.id);
|
|
1628
|
-
return (React__default.createElement(
|
|
2125
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox" },
|
|
1629
2126
|
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, { error: tncInputProps.error ? tncInputProps.error : undefined }))));
|
|
1630
2127
|
}
|
|
1631
2128
|
return null;
|
|
@@ -1757,169 +2254,27 @@ const OtpBlock = ({ otpData, onSuccess, autoSendWhenOpen, }) => {
|
|
|
1757
2254
|
})))));
|
|
1758
2255
|
};
|
|
1759
2256
|
|
|
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')))));
|
|
2257
|
+
const EmptyIcon = (props) => {
|
|
2258
|
+
const { className, style } = props;
|
|
2259
|
+
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 },
|
|
2260
|
+
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" }),
|
|
2261
|
+
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" }),
|
|
2262
|
+
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
2263
|
};
|
|
1907
2264
|
|
|
1908
2265
|
// url: imageBlocks.imageMobile.data.url
|
|
1909
2266
|
// newTab: imageBlocks.imageMobile.data.newtab
|
|
1910
2267
|
// image: campaignShow.image
|
|
1911
2268
|
// imageDestkop: campaignShow.image_desktop
|
|
1912
|
-
const
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
const
|
|
1916
|
-
const
|
|
1917
|
-
const
|
|
1918
|
-
const currentPath = location.pathname;
|
|
1919
|
-
const isInPage = currentLayout.includes('Inline') || currentLayout === 'Sidebar';
|
|
1920
|
-
const isSlider = currentLayout === 'Slider';
|
|
2269
|
+
const LEADGEN_LIMIT_LIGHTBOXB = 6;
|
|
2270
|
+
const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, showThankyou, campaignId, campaign_subot_id, locale, showEmpty, setShowEmpty, }) => {
|
|
2271
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2272
|
+
const { t } = useTranslations();
|
|
2273
|
+
const { isMobile } = useScreenSize();
|
|
2274
|
+
const [open, setOpen] = useState(!!campaignId);
|
|
1921
2275
|
const [showOtpPhone, setShowOtpPhone] = useState(null);
|
|
1922
2276
|
const [isSubmitLoading, setIsSubmitLoading] = useState(false);
|
|
2277
|
+
const [snap, setSnap] = useState(0.8);
|
|
1923
2278
|
const formRef = useRef();
|
|
1924
2279
|
const onClose = () => {
|
|
1925
2280
|
if (showOtpPhone) {
|
|
@@ -1929,6 +2284,17 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
1929
2284
|
onCloseProp === null || onCloseProp === void 0 ? void 0 : onCloseProp();
|
|
1930
2285
|
}
|
|
1931
2286
|
};
|
|
2287
|
+
const listBlockAdded = JSON.parse(extraFields.listBlockAdded);
|
|
2288
|
+
const actionBlocks = JSON.parse(extraFields.actionBlocks);
|
|
2289
|
+
const textBlocks = JSON.parse(extraFields.textBlocks);
|
|
2290
|
+
const popUpSubmitText = actionBlocks.submitBlock.data.value;
|
|
2291
|
+
const currentPath = location.pathname;
|
|
2292
|
+
const isInPage = currentLayout.includes('Inline') || currentLayout === 'Sidebar';
|
|
2293
|
+
const isSlider = currentLayout === 'Slider';
|
|
2294
|
+
const isDrawer = currentLayout.includes('LightBoxB') && isMobile;
|
|
2295
|
+
const isLightBox = useMemo(() => !!currentLayout.includes('LightBox'), [currentLayout]);
|
|
2296
|
+
const isSmallLightBoxB = currentLayout === 'LightBoxB' &&
|
|
2297
|
+
listBlockAdded.length <= LEADGEN_LIMIT_LIGHTBOXB;
|
|
1932
2298
|
if (window.innerWidth < 769 &&
|
|
1933
2299
|
['Fullscreen', 'Slider'].includes(currentLayout)) {
|
|
1934
2300
|
console.log('😎 Not show fullscreen, slider on mobile ');
|
|
@@ -2019,83 +2385,134 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
2019
2385
|
})(e);
|
|
2020
2386
|
}, 100);
|
|
2021
2387
|
};
|
|
2388
|
+
const onOpenChange = (_open) => {
|
|
2389
|
+
setOpen(_open);
|
|
2390
|
+
if (!_open) {
|
|
2391
|
+
setTimeout(() => {
|
|
2392
|
+
onClose();
|
|
2393
|
+
}, 250);
|
|
2394
|
+
}
|
|
2395
|
+
};
|
|
2022
2396
|
const { width: imageBackgroundWidth, height: imageBackgroundHeight, loaded: imageBackgroundLoaded, } = useImageSize(imageBackground);
|
|
2023
2397
|
const { width: imageMobileWidth, height: imageMobileHeight, loaded: imageMobileLoaded, } = useImageSize(imageMobile);
|
|
2024
2398
|
const { width: imageDesktopWidth, height: imageDesktopHeight, loaded: imageDesktopLoaded, } = useImageSize(imageDesktop);
|
|
2025
2399
|
const renderAfterImageSizes = imageMobileLoaded &&
|
|
2026
2400
|
imageDesktopLoaded &&
|
|
2027
2401
|
(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
|
-
|
|
2402
|
+
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}`, {
|
|
2403
|
+
'leadgen-btn': isLightBox,
|
|
2404
|
+
'leadgen-btn_action': isLightBox,
|
|
2405
|
+
}), loading: isSubmitLoading }, popUpSubmitText));
|
|
2406
|
+
const LinkButtonBlock = (_b = listBlockAdded.filter(({ name }) => name == 'LinkButtonBlock')) === null || _b === void 0 ? void 0 : _b[0];
|
|
2407
|
+
const ButtonLink = LinkButtonBlock && (React__default.createElement(Button$2, { component: "a", href: (_c = LinkButtonBlock === null || LinkButtonBlock === void 0 ? void 0 : LinkButtonBlock.data) === null || _c === void 0 ? void 0 : _c.url, target: ((_d = LinkButtonBlock === null || LinkButtonBlock === void 0 ? void 0 : LinkButtonBlock.data) === null || _d === void 0 ? void 0 : _d.newtab) ? '_blank' : undefined, size: "lg", variant: "filled", className: clsx(`lead-modal__btn ${LEAD_CLASS}`, {
|
|
2408
|
+
'leadgen-btn': isLightBox,
|
|
2409
|
+
'leadgen-btn_action': isLightBox,
|
|
2410
|
+
}) }, (_e = LinkButtonBlock === null || LinkButtonBlock === void 0 ? void 0 : LinkButtonBlock.data) === null || _e === void 0 ? void 0 : _e.value));
|
|
2411
|
+
const PopupHeader = (React__default.createElement("header", { className: clsx('lead-modal__header', {
|
|
2412
|
+
'leadgen-header': isLightBox,
|
|
2413
|
+
}) }, showOtpPhone ? (React__default.createElement("img", { src: CommonGAssets.getAssetPath('lead-otp-thumb.png'), draggable: "false", alt: "", style: {
|
|
2414
|
+
width: '100%',
|
|
2415
|
+
minHeight: '150px',
|
|
2416
|
+
backgroundColor: '#f2f2f2',
|
|
2417
|
+
}, 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 },
|
|
2418
|
+
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: {
|
|
2419
|
+
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2420
|
+
}, alt: "" }))) : null) : (React__default.createElement(React__default.Fragment, null,
|
|
2421
|
+
imageDesktop ? (isVideo(imageDesktop) ? (React__default.createElement("video", { className: "le-only-desktop lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2422
|
+
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: {
|
|
2423
|
+
objectFit: 'cover',
|
|
2424
|
+
aspectRatio: `${imageDesktopWidth}/${imageDesktopHeight}`,
|
|
2425
|
+
}, src: imageDesktop, alt: "" }))) : null,
|
|
2426
|
+
imageMobile ? (isVideo(imageMobile) ? (React__default.createElement("video", { className: "le-only-mobile lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2427
|
+
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: {
|
|
2428
|
+
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2429
|
+
} }))) : null))))));
|
|
2430
|
+
const PopupEmpty = showEmpty && (React__default.createElement("div", { className: "leadgen-empty" },
|
|
2431
|
+
React__default.createElement("div", { className: "leadgen-empty_body" },
|
|
2432
|
+
React__default.createElement("div", { className: "leadgen-empty_wrapper" },
|
|
2433
|
+
React__default.createElement(EmptyIcon, { className: "leadgen-empty_image" }),
|
|
2434
|
+
React__default.createElement("h5", { className: "leadgen-empty_title" }, t('lead.empty.title')))),
|
|
2435
|
+
React__default.createElement("div", { className: "leadgen-empty_footer" },
|
|
2436
|
+
React__default.createElement(Button$2, { onClick: onClose, size: "lg", variant: "default", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_cancel" }, t('lead.empty.cancel')),
|
|
2437
|
+
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')))));
|
|
2438
|
+
const PopupFormTitle = (React__default.createElement("h2", { title: title, className: clsx(LEAD_CLASS, `lead-modal__title`, `le-text-align-${(_f = textBlocks.titleBlock.data) === null || _f === void 0 ? void 0 : _f.align}`, { 'leadgen-title': isLightBox }) }, title));
|
|
2439
|
+
const PopupFormDescription = (React__default.createElement("p", { title: textBlocks.subtitleBlock.data.value, className: clsx(LEAD_CLASS, `lead-modal__description`, `le-text-align-${(_g = textBlocks.subtitleBlock.data) === null || _g === void 0 ? void 0 : _g.align}`, { 'leadgen-description': isLightBox }) }, textBlocks.subtitleBlock.data.value));
|
|
2440
|
+
const PopupForm = (React__default.createElement(LeadFormProvider, { form: form },
|
|
2441
|
+
React__default.createElement("form", { ref: formRef, className: clsx(`lead-modal__form ${popupId}`, {
|
|
2442
|
+
'leadgen-form': isLightBox,
|
|
2443
|
+
}), onSubmit: middlewareOnSubmit },
|
|
2444
|
+
React__default.createElement("div", { className: clsx('lead-modal__form-header', {
|
|
2445
|
+
'leadgen-form_header': isLightBox,
|
|
2446
|
+
}) },
|
|
2447
|
+
PopupFormTitle,
|
|
2448
|
+
PopupFormDescription),
|
|
2449
|
+
React__default.createElement("div", { className: clsx('lead-modal__form-control-wrapper', {
|
|
2450
|
+
'leadgen-form_body': isLightBox,
|
|
2451
|
+
}) },
|
|
2452
|
+
React__default.createElement("div", { className: "leadgen-form_inner" },
|
|
2453
|
+
React__default.createElement(LightboxFields, { listBlockAdded: listBlockAdded, popupId: popupId, locale: locale, onClose: onClose, onOtherSubmit: onOtherSubmit }))),
|
|
2454
|
+
React__default.createElement("div", { className: "leadgen-form_footer" }, currentLayout.includes('LightBoxA') ? ButtonLink : ButtonSubmit))));
|
|
2455
|
+
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 }));
|
|
2456
|
+
const popupContentClassName = clsx('lead-modal__content', `le-newbuilder-${currentLayout}`, 'leadPopupContent', { 'leadgen-content': isLightBox });
|
|
2457
|
+
const PopupContent = (React__default.createElement("div", { className: popupContentClassName },
|
|
2458
|
+
PopupHeader,
|
|
2459
|
+
React__default.createElement("div", { className: "leadgen-inner" },
|
|
2460
|
+
PopupThankYou,
|
|
2461
|
+
!showThankyou && (React__default.createElement(React__default.Fragment, null,
|
|
2462
|
+
showOtpPhone && (React__default.createElement(OtpBlock, { otpData: showOtpPhone, autoSendWhenOpen: false, onSuccess: () => {
|
|
2463
|
+
setShowOtpPhone(null);
|
|
2464
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(formRef.current, form.values);
|
|
2465
|
+
} })),
|
|
2466
|
+
showEmpty && PopupEmpty,
|
|
2467
|
+
React__default.createElement("div", { "data-hidden": !!showOtpPhone || !!showEmpty, className: clsx('lead-modal__body le-newbuilder-overlay', {
|
|
2468
|
+
'leadgen-body': isLightBox,
|
|
2469
|
+
}) }, PopupForm))))));
|
|
2470
|
+
const PopupWrapper = (React__default.createElement("div", { className: clsx(`lead-modal__wrapper le-newbuilder-wrap-${currentLayout}`, {
|
|
2471
|
+
'leadgen-wrapper': isLightBox,
|
|
2472
|
+
'leadgen-wrapper_small': isSmallLightBoxB,
|
|
2473
|
+
}) },
|
|
2474
|
+
!currentLayout.includes('Inline') && (React__default.createElement(CloseButton, { onClose: () => onOpenChange(false), containerClassName: clsx('close-button-top-right', {
|
|
2475
|
+
'leadgen-close_btn': isLightBox,
|
|
2476
|
+
}) })),
|
|
2477
|
+
PopupContent));
|
|
2478
|
+
const styleOverlay = useMemo(() => {
|
|
2479
|
+
let styleContent = `.le-newbuilder-overlay {background-repeat: no-repeat;background-size: cover;background-position:center;}`;
|
|
2480
|
+
if (isMobile && imageOverlayMobile) {
|
|
2481
|
+
styleContent += `.le-newbuilder-overlay {background-image: url(${imageOverlayMobile});}`;
|
|
2482
|
+
}
|
|
2483
|
+
if (!isMobile && imageOverlayDesktop) {
|
|
2484
|
+
styleContent += `@media screen and (min-width:768px) {.le-newbuilder-overlay {background-image: url(${imageOverlayDesktop});}}`;
|
|
2485
|
+
}
|
|
2486
|
+
return styleContent;
|
|
2487
|
+
}, [isMobile, imageOverlayDesktop, imageOverlayMobile]);
|
|
2488
|
+
const popupContainerClassName = clsx('lead-modal lead-modal-wrapper modal--animate-scale', {
|
|
2489
|
+
'le-buider-inline': !!isInPage,
|
|
2490
|
+
'le-buider-slider': !!isSlider,
|
|
2491
|
+
leadgen: isLightBox,
|
|
2492
|
+
[`leadgen-${currentLayout}`]: isLightBox,
|
|
2493
|
+
});
|
|
2494
|
+
const PopupContainer = isDrawer ? (React__default.createElement(DrawerComponent, { open: open, snapPoints: [0.8, 1], activeSnapPoint: snap, setActiveSnapPoint: setSnap, onOpenChange: onOpenChange, overlayClassName: popupContainerClassName, className: "leadgen-drawer" },
|
|
2495
|
+
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: styleOverlay } }),
|
|
2496
|
+
PopupWrapper,
|
|
2497
|
+
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,
|
|
2498
|
+
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: styleOverlay } }),
|
|
2499
|
+
React__default.createElement("div", { id: popupId, "data-popup-url": currentPath, "data-popup-type": "lightbox-inline", className: popupContainerClassName },
|
|
2051
2500
|
currentLayout == 'Fullscreen' ? (React__default.createElement("img", { className: "le-only-desktop le-fullscreen-img", draggable: false, src: imageBackground || '', style: {
|
|
2052
2501
|
aspectRatio: `${imageBackgroundWidth}/${imageBackgroundHeight}`,
|
|
2053
2502
|
} })) : 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" }))))));
|
|
2503
|
+
PopupWrapper)));
|
|
2087
2504
|
if (!renderAfterImageSizes)
|
|
2088
2505
|
return null;
|
|
2089
2506
|
if (currentLayout.includes('LightBox') ||
|
|
2090
2507
|
currentLayout == 'Fullscreen' ||
|
|
2091
2508
|
currentLayout == 'Slider') {
|
|
2092
|
-
return
|
|
2509
|
+
return PopupContainer;
|
|
2093
2510
|
}
|
|
2094
2511
|
else if (currentLayout == 'Sidebar') {
|
|
2095
|
-
return React__default.createElement(SideBarLayout, { content:
|
|
2512
|
+
return React__default.createElement(SideBarLayout, { content: PopupContainer });
|
|
2096
2513
|
}
|
|
2097
2514
|
else if (currentLayout.includes('Inline')) {
|
|
2098
|
-
return (React__default.createElement(InlineLayout, { content:
|
|
2515
|
+
return (React__default.createElement(InlineLayout, { content: PopupContainer, inlinePosition: extraFields.popupInlinePosition }));
|
|
2099
2516
|
}
|
|
2100
2517
|
return null;
|
|
2101
2518
|
};
|
|
@@ -2540,7 +2957,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
|
|
|
2540
2957
|
return null;
|
|
2541
2958
|
}
|
|
2542
2959
|
}
|
|
2543
|
-
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, locale, }) => {
|
|
2960
|
+
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, locale, showEmpty, setShowEmpty, }) => {
|
|
2544
2961
|
var _a, _b;
|
|
2545
2962
|
const { apiUrl, siteDomain } = useContext(LeadGenContext);
|
|
2546
2963
|
useEffect(() => {
|
|
@@ -2659,7 +3076,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, local
|
|
|
2659
3076
|
currentLayout == 'Fullscreen' ||
|
|
2660
3077
|
currentLayout == 'Sidebar' ||
|
|
2661
3078
|
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 }));
|
|
3079
|
+
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
3080
|
}
|
|
2664
3081
|
else if (currentLayout.includes('Skin')) {
|
|
2665
3082
|
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 +3101,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2684
3101
|
const [showCampaign, setShowCampaign] = useState(forceCampaign);
|
|
2685
3102
|
const [action, setAction] = useState('');
|
|
2686
3103
|
const [showThankyou, setShowThankyou] = useState(null);
|
|
3104
|
+
const [showEmpty, setShowEmpty] = useState(false);
|
|
2687
3105
|
useEffect(() => {
|
|
2688
3106
|
if (forceCampaign) {
|
|
2689
3107
|
setShowCampaign(forceCampaign);
|
|
@@ -2699,6 +3117,11 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2699
3117
|
setShowCampaign(campaign);
|
|
2700
3118
|
setAction(action);
|
|
2701
3119
|
};
|
|
3120
|
+
const onCloseBase = () => {
|
|
3121
|
+
document.body.classList.remove('noscroll');
|
|
3122
|
+
setShowCampaign(null);
|
|
3123
|
+
setShowThankyou(null);
|
|
3124
|
+
};
|
|
2702
3125
|
const onClose = () => {
|
|
2703
3126
|
var _a, _b;
|
|
2704
3127
|
if (!showCampaign)
|
|
@@ -2716,7 +3139,6 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2716
3139
|
}
|
|
2717
3140
|
}
|
|
2718
3141
|
}
|
|
2719
|
-
document.body.classList.remove('noscroll');
|
|
2720
3142
|
fetch(`${apiUrl}api/campaign/${showCampaign.code}/popup_exit`, {
|
|
2721
3143
|
method: 'POST',
|
|
2722
3144
|
headers: {
|
|
@@ -2730,8 +3152,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2730
3152
|
duration: Math.ceil((Date.now() - leadStartTimeRef.current) / 1000),
|
|
2731
3153
|
}),
|
|
2732
3154
|
});
|
|
2733
|
-
|
|
2734
|
-
setShowThankyou(null);
|
|
3155
|
+
onCloseBase();
|
|
2735
3156
|
}; //
|
|
2736
3157
|
useEffect(() => {
|
|
2737
3158
|
if (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code)
|
|
@@ -2773,8 +3194,10 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2773
3194
|
}, []);
|
|
2774
3195
|
const onSubmit = (currentForm, formDataObj, categoryLevel, categoryData) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2775
3196
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2776
|
-
if (!formDataObj)
|
|
3197
|
+
if (!formDataObj || Object.values(formDataObj).every((v) => !Boolean(v))) {
|
|
3198
|
+
setShowEmpty(true);
|
|
2777
3199
|
return;
|
|
3200
|
+
}
|
|
2778
3201
|
LeadLog('submitHandler', categoryLevel, categoryData);
|
|
2779
3202
|
const formData = Object.keys(formDataObj)
|
|
2780
3203
|
.filter((key) => !!formDataObj[key])
|
|
@@ -2782,6 +3205,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2782
3205
|
name: key,
|
|
2783
3206
|
value: String(formDataObj[key]),
|
|
2784
3207
|
}));
|
|
3208
|
+
console.log('** RYAN index.tsx 218 formData : ', formData);
|
|
2785
3209
|
const numberFormatType = 2; // i18n.phonenumbers.PhoneNumberFormat.NATIONAL
|
|
2786
3210
|
// Get ga_client_id from cookies
|
|
2787
3211
|
const gaCookie = getCookie('_ga') || null;
|
|
@@ -2929,18 +3353,15 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
2929
3353
|
}
|
|
2930
3354
|
}, [showCampaign]);
|
|
2931
3355
|
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() },
|
|
3356
|
+
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
3357
|
React__default.createElement(Box, { sx: { position: 'fixed', zIndex: ZINDEX_SSO - 9e6 } },
|
|
2937
3358
|
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
3359
|
var _a;
|
|
2939
3360
|
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
3361
|
!!showCampaign.extra_fields.currentLayout &&
|
|
2941
3362
|
!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 })))));
|
|
3363
|
+
!showCampaign.extra_fields.currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
|
|
3364
|
+
React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty })))));
|
|
2944
3365
|
})))))));
|
|
2945
3366
|
};
|
|
2946
3367
|
const LeadGen = _LeadGen;
|