@hhgtech/hhg-components 1.29.337-beta-7 → 1.29.337
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-47a2af2f.js → LastPeriod-51408700.js} +1 -1
- package/build/{MobileBottomNavigationIcon-0e3d2534.js → MobileBottomNavigationIcon-5b6727d2.js} +3 -3
- package/build/{Spinner-70ed38d1.js → Spinner-3da24dda.js} +1 -1
- package/build/{WhatsApp-871e7ed8.js → WhatsApp-8d005727.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +46 -49
- 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 +1 -3
- package/build/components/atoms/index.d.ts +0 -1
- package/build/components.js +131 -134
- package/build/{constants-4b42c6a2.js → constants-7cc8b8bc.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-6c0674d7.js → core-d30b3e3a.js} +1 -1
- package/build/{dataTransform-2274e835.js → dataTransform-420b28f0.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-61d7e049.js → editor-04e20704.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-d7143560.js → LastPeriod-dde51f8e.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-5c8f5035.js → MobileBottomNavigationIcon-7d5f5972.js} +3 -3
- package/build/esm/{Spinner-114e4d9f.js → Spinner-cb34617f.js} +1 -1
- package/build/esm/{WhatsApp-52335f10.js → WhatsApp-f96d3e7f.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +46 -48
- package/build/esm/babyGrowth.js +83 -83
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/adapters/button/index.d.ts +1 -3
- package/build/esm/components/atoms/index.d.ts +0 -1
- package/build/esm/components.js +90 -92
- package/build/esm/{constants-5ec308fc.js → constants-a998921a.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-d5a095de.js → core-183254a1.js} +1 -1
- package/build/esm/{dataTransform-b8d10b04.js → dataTransform-bb00e470.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-a89d1185.js → editor-daf734ce.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 +0 -2
- 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/index.d.ts +3 -5
- package/build/esm/{index-e6ba1eb0.js → index-0225ecb1.js} +2 -2
- package/build/esm/{index-c8ab19d7.js → index-0415b01c.js} +13 -13
- package/build/esm/{index-36b8a2fd.js → index-05bd1e2b.js} +3 -3
- package/build/esm/{index-ce177ff2.js → index-0713eb59.js} +24 -24
- package/build/esm/{index-67af6b5f.js → index-09b0659a.js} +16 -16
- package/build/esm/{index-087b0ef8.js → index-0c8caf51.js} +3 -3
- package/build/esm/{index-64313cda.js → index-0eb067b7.js} +24 -24
- package/build/esm/{index-5d024db0.js → index-0f7b01fc.js} +31 -31
- package/build/esm/{index-b87e8b5f.js → index-1275c1d7.js} +21 -21
- package/build/esm/{index-471ca8a5.js → index-1389ea44.js} +3 -3
- package/build/esm/{index-270643c5.js → index-155e0388.js} +17 -17
- package/build/esm/{index-bc0f28a2.js → index-196497c1.js} +6 -6
- package/build/esm/{index-892e7122.js → index-1b258af5.js} +2 -2
- package/build/esm/{index-d99e61f9.js → index-295e34f2.js} +15 -15
- package/build/esm/{index-d07ce7c0.js → index-2c4d67d7.js} +18 -18
- package/build/esm/{index-09415490.js → index-33929f40.js} +1 -1
- package/build/esm/{index-aa0db3a6.js → index-36863000.js} +1 -1
- package/build/esm/{index-cc102b9b.js → index-3bc237f8.js} +3 -3
- package/build/esm/{index-75d563d1.js → index-4aec70fd.js} +15 -15
- package/build/esm/{index-3ca06d6c.js → index-4b39ea24.js} +17 -17
- package/build/esm/{index-0856d008.js → index-51482477.js} +14 -14
- package/build/esm/{index-4133adac.js → index-5539b7bd.js} +1 -1
- package/build/esm/{index-41144b7e.js → index-5f57b1dc.js} +2 -2
- package/build/esm/{index-d6aabc28.js → index-61dfe9ca.js} +2 -2
- package/build/esm/{index-49b82bec.js → index-6366de18.js} +2 -2
- package/build/esm/{index-679e2631.js → index-63fd8b36.js} +2 -2
- package/build/esm/{index-83386fe7.js → index-71c6552e.js} +3 -3
- package/build/esm/{index-20c0aa4f.js → index-78878ea0.js} +4 -4
- package/build/esm/{index-23f42959.js → index-7bae9527.js} +2 -2
- package/build/esm/{index-3e1778b3.js → index-83de252c.js} +13 -13
- package/build/esm/{index-68d1903a.js → index-8f05c711.js} +6 -6
- package/build/esm/{index-2782f2dd.js → index-93cc11dc.js} +6 -6
- package/build/esm/{index-19e7c4b9.js → index-94a1162c.js} +5 -5
- package/build/esm/{index-31b18d45.js → index-9b2001a7.js} +18 -18
- package/build/esm/{index-2fc3d0a7.js → index-a1ccb283.js} +5 -5
- package/build/esm/{index-b1c043df.js → index-a5464abb.js} +2 -2
- package/build/esm/{index-4401e23e.js → index-a6229525.js} +7 -7
- package/build/esm/{index-747dcffc.js → index-aa21b8da.js} +1 -1
- package/build/esm/{index-47a98636.js → index-b038b8c7.js} +2 -2
- package/build/esm/{index-12474271.js → index-b067b442.js} +1 -3
- package/build/esm/{index-952a3458.js → index-b1770ad1.js} +16 -16
- package/build/esm/{index-18052786.js → index-b1d4087d.js} +3 -3
- package/build/esm/{index-52a9228a.js → index-b2c17404.js} +2 -2
- package/build/esm/{index-d4756da4.js → index-b380b8ce.js} +2 -2
- package/build/esm/{index-f3456898.js → index-b4d90966.js} +1 -1
- package/build/esm/{index-9cb7fa96.js → index-ba73d604.js} +13 -13
- package/build/esm/{index-75d19f05.js → index-c4c56d77.js} +30 -30
- package/build/esm/{index-25a2befd.js → index-c6660844.js} +20 -20
- package/build/esm/{index-a02c7f7a.js → index-cc394577.js} +1 -1
- package/build/esm/{index-1439af51.js → index-d298354a.js} +10 -10
- package/build/esm/{index-bb4c1a2d.js → index-d562cac5.js} +18 -18
- package/build/esm/{index-35d222a5.js → index-d8519871.js} +16 -16
- package/build/esm/{index-d73331c2.js → index-dd78ba83.js} +32 -32
- package/build/esm/{index-83c77405.js → index-e2b7b489.js} +3 -3
- package/build/esm/{index-746b198e.js → index-e4463daa.js} +1 -1
- package/build/esm/{index-d71de977.js → index-eaafdb62.js} +7 -7
- package/build/esm/{index-2b7f5fa8.js → index-f347069e.js} +6 -6
- package/build/esm/{index-d38480ed.js → index-f465ce78.js} +16 -16
- package/build/esm/{index-1419c8c8.js → index-f8ea6ac6.js} +1 -1
- package/build/esm/{index-090e1210.js → index-fd283ee7.js} +13 -13
- package/build/esm/{index-9696f5ad.js → index-fdae3796.js} +2 -2
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +117 -146
- package/build/esm/interfaces/types/Subot.d.ts +0 -1
- package/build/esm/{labelSorting-e4981113.js → labelSorting-754c363d.js} +4 -4
- package/build/esm/lead/components/context.d.ts +0 -2
- package/build/esm/lead/components/index.d.ts +2 -4
- package/build/esm/lead/index.d.ts +1 -1
- package/build/esm/lead/layouts/lightbox/index.d.ts +2 -4
- package/build/esm/lead/newLeadPopup.d.ts +2 -4
- package/build/esm/lead.css +1 -1
- package/build/esm/lead.js +352 -822
- package/build/esm/{logoIcon-15981d1d.js → logoIcon-f1d05426.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-f8e22a37.js → post-0674aab6.js} +2 -2
- package/build/esm/profileNavigation.js +19 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -22
- package/build/esm/ssoV2/api/featureFlag.d.ts +1 -2
- package/build/esm/ssoV2.js +36 -48
- package/build/esm/{store-3bfc95e7.js → store-62172a24.js} +4 -4
- package/build/esm/subot.js +43 -149
- package/build/esm/surveyOrPremiumBanner.js +31 -31
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-3721291a.js → surveyThankyouCard-5b3a42fd.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-3f228b1e.js → treePopoverMenu-2a1c1fe7.js} +19 -19
- package/build/esm/{types-42d37979.js → types-8d50c603.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-bb091bc4.js → useCategory-0dd2cbd2.js} +5 -5
- package/build/esm/{useHealthToolCache-7bb4f514.js → useHealthToolCache-f97d58e6.js} +1 -1
- package/build/esm/{useMantineLocale-0b9063e9.js → useMantineLocale-8cc72830.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-a343c010.js → usePlacesAutocomplete-206540a6.js} +1 -2
- package/build/esm/{useScreenSize-4ee1316a.js → useScreenSize-623e1764.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-89adeaf2.js → utils-351e2780.js} +2 -2
- package/build/esm/{utils-4691d9b9.js → utils-4233ebc1.js} +2 -2
- package/build/esm/{utils-cd8d2a8c.js → utils-d5aeff78.js} +3 -3
- 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 +0 -2
- package/build/hooks.js +13 -13
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/icons/index.d.ts +3 -5
- package/build/{index-229fa4a5.js → index-00da00b2.js} +13 -13
- package/build/{index-52fda038.js → index-01413f5f.js} +2 -2
- package/build/{index-68be092d.js → index-039dbe88.js} +1 -1
- package/build/{index-dfaeabd5.js → index-0519086c.js} +7 -7
- package/build/{index-3cc957fb.js → index-0a72c320.js} +2 -2
- package/build/{index-43157355.js → index-110b5ca9.js} +20 -20
- package/build/{index-3465b2ce.js → index-15c69d9d.js} +6 -6
- package/build/{index-974cf6cb.js → index-1b3acda3.js} +2 -2
- package/build/{index-2ddf1177.js → index-1cd769fe.js} +18 -18
- package/build/{index-82a389ca.js → index-222aaf59.js} +7 -7
- package/build/{index-7467252c.js → index-2301b9c3.js} +18 -18
- package/build/{index-781964b8.js → index-2b8ad5c2.js} +6 -6
- package/build/{index-33a7b613.js → index-30faaa61.js} +16 -16
- package/build/{index-579616db.js → index-3991f253.js} +2 -2
- package/build/{index-7efb4ac7.js → index-41cd44d2.js} +13 -13
- package/build/{index-c889e7c9.js → index-41f6bd5f.js} +15 -15
- package/build/{index-176b58b2.js → index-426b2b90.js} +15 -15
- package/build/{index-4b519938.js → index-42dd30d8.js} +10 -10
- package/build/{index-a2d67caa.js → index-4576c899.js} +3 -3
- package/build/{index-aa7913a9.js → index-49719113.js} +2 -2
- package/build/{index-fc16b770.js → index-528ea33c.js} +2 -2
- package/build/{index-f7a3e40e.js → index-57a3f434.js} +3 -3
- package/build/{index-c459e9f5.js → index-5850f264.js} +1 -1
- package/build/{index-372e3c4e.js → index-5acbd524.js} +16 -16
- package/build/{index-24e250d9.js → index-5c0d6586.js} +3 -3
- package/build/{index-a57c75f4.js → index-63fe8b11.js} +3 -3
- package/build/{index-7086b25e.js → index-64997aff.js} +2 -2
- package/build/{index-56266490.js → index-6b115786.js} +16 -16
- package/build/{index-a0e2a018.js → index-6f47c87f.js} +1 -1
- package/build/{index-5ead4b60.js → index-7c62dccd.js} +21 -21
- package/build/{index-afaf0324.js → index-8055f38c.js} +24 -24
- package/build/{index-75108373.js → index-83b6bfdc.js} +1 -1
- package/build/{index-16d0b6b9.js → index-893e7e0e.js} +1 -1
- package/build/{index-dd467027.js → index-a12c9263.js} +13 -13
- package/build/{index-0552f247.js → index-a4b66208.js} +1 -3
- package/build/{index-5263b0f5.js → index-a5a1bfaf.js} +4 -4
- package/build/{index-5e9a0790.js → index-a8524fa7.js} +31 -31
- package/build/{index-22060973.js → index-ac08cf6a.js} +6 -6
- package/build/{index-4bdd1519.js → index-aeec1e64.js} +30 -30
- package/build/{index-adba43a4.js → index-afc908e9.js} +2 -2
- package/build/{index-bcb19225.js → index-b2df0989.js} +6 -6
- package/build/{index-2b39ec81.js → index-b66036d6.js} +24 -24
- package/build/{index-c988d44b.js → index-bdb891cd.js} +2 -2
- package/build/{index-c3923f73.js → index-c8b7370e.js} +14 -14
- package/build/{index-fc141492.js → index-c977f82b.js} +1 -1
- package/build/{index-5f4e7189.js → index-d041a262.js} +2 -2
- package/build/{index-60b41bf6.js → index-d3dfe803.js} +3 -3
- package/build/{index-570de4d6.js → index-d68df310.js} +18 -18
- package/build/{index-7686795f.js → index-d7fd57cc.js} +2 -2
- package/build/{index-cdd255a4.js → index-ded652c3.js} +3 -3
- package/build/{index-c074c631.js → index-e53902a2.js} +2 -2
- package/build/{index-e6902aab.js → index-e632b1b0.js} +1 -1
- package/build/{index-469ef914.js → index-e69aba76.js} +17 -17
- package/build/{index-b63e607d.js → index-ee3654b0.js} +32 -32
- package/build/{index-4f7ae8b5.js → index-f1f8a6b7.js} +5 -5
- package/build/{index-3aeec855.js → index-f7161b6e.js} +1 -1
- package/build/{index-43c1a5e9.js → index-f7b507b7.js} +17 -17
- package/build/{index-6f1fea78.js → index-f9a87ed6.js} +13 -13
- package/build/{index-ee00ae41.js → index-fa7a4ea1.js} +16 -16
- package/build/{index-6637b751.js → index-fcb4f855.js} +5 -5
- package/build/{index-a42af7d6.js → index-ff7fd56a.js} +3 -3
- package/build/index.css +1 -1
- package/build/index.js +179 -211
- package/build/interfaces/types/Subot.d.ts +0 -1
- package/build/{labelSorting-281ade74.js → labelSorting-1668e583.js} +4 -4
- package/build/lead/components/context.d.ts +0 -2
- package/build/lead/components/index.d.ts +2 -4
- package/build/lead/index.d.ts +1 -1
- package/build/lead/layouts/lightbox/index.d.ts +2 -4
- package/build/lead/newLeadPopup.d.ts +2 -4
- package/build/lead.css +1 -1
- package/build/lead.js +351 -822
- package/build/{logoIcon-df189085.js → logoIcon-6fe14bde.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-f9a99252.js → post-39abb64f.js} +2 -2
- package/build/profileNavigation.js +19 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -22
- package/build/ssoV2/api/featureFlag.d.ts +1 -2
- package/build/ssoV2.js +35 -47
- package/build/{store-cae9a772.js → store-1dcf5e8f.js} +4 -4
- package/build/subot.js +44 -151
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-be691940.js → surveyThankyouCard-df98bad7.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-aa9f7672.js → treePopoverMenu-0805ee36.js} +19 -19
- package/build/{types-02f354ff.js → types-3c4d173e.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-569d5e05.js → useCategory-9f653803.js} +5 -5
- package/build/{useHealthToolCache-d922aa8e.js → useHealthToolCache-daaae90b.js} +1 -1
- package/build/{useMantineLocale-474e9d63.js → useMantineLocale-d5e030cb.js} +6 -6
- package/build/{usePlacesAutocomplete-51a61b09.js → usePlacesAutocomplete-8e9ebb28.js} +1 -2
- package/build/{useScreenSize-8bcea317.js → useScreenSize-aae08299.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-f3b01136.js → utils-56c0b75f.js} +3 -3
- package/build/{utils-2c047798.js → utils-c204a71e.js} +2 -2
- package/build/{utils-5b8ce3b2.js → utils-dac6d657.js} +2 -2
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- package/build/components/atoms/drawerComponent/index.d.ts +0 -17
- package/build/components/atoms/drawerComponent/index.styled.d.ts +0 -7
- package/build/components/atoms/googleLocation/index.d.ts +0 -7
- package/build/esm/components/atoms/drawerComponent/index.d.ts +0 -17
- package/build/esm/components/atoms/drawerComponent/index.styled.d.ts +0 -7
- package/build/esm/components/atoms/googleLocation/index.d.ts +0 -7
- package/build/esm/icons/ChatbotBg.d.ts +0 -4
- package/build/esm/icons/Search.d.ts +0 -4
- package/build/esm/index-8410a781.js +0 -106
- package/build/esm/lead/layouts/ emptyIcon.d.ts +0 -6
- package/build/esm/lead/layouts/lightbox/fields/textField/index.d.ts +0 -13
- package/build/esm/lead/layouts/lightbox/fields/textField/index.styled.d.ts +0 -11
- package/build/esm/subot/components/dob/index.d.ts +0 -4
- package/build/esm/subot/components/dob/utils.d.ts +0 -14
- package/build/icons/ChatbotBg.d.ts +0 -4
- package/build/icons/Search.d.ts +0 -4
- package/build/index-dde4c96b.js +0 -113
- package/build/lead/layouts/ emptyIcon.d.ts +0 -6
- package/build/lead/layouts/lightbox/fields/textField/index.d.ts +0 -13
- package/build/lead/layouts/lightbox/fields/textField/index.styled.d.ts +0 -11
- package/build/subot/components/dob/index.d.ts +0 -4
- package/build/subot/components/dob/utils.d.ts +0 -14
- /package/build/{BMI_BOYS.percentile.monthly-7b353d3c.js → BMI_BOYS.percentile.monthly-c470c17c.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-9b8686b4.js → BMI_BOYS.percentile.weekly-8fe07247.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-44fe65d0.js → BMI_BOYS.percentile.yearly-9ada1b75.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-bddbdfbb.js → BMI_BOYS.zscore.monthly-103049e7.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-e8a06a9b.js → BMI_BOYS.zscore.weekly-cf6e85a7.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-b51a8eb7.js → BMI_BOYS.zscore.yearly-c3140c6e.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-cdbd323f.js → BMI_GIRLS.percentile.monthly-550dad06.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-7177da91.js → BMI_GIRLS.percentile.weekly-31a1c78a.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-6eb23862.js → BMI_GIRLS.percentile.yearly-9700bd31.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-3ad74a13.js → BMI_GIRLS.zscore.monthly-b59f761b.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-835b7cba.js → BMI_GIRLS.zscore.weekly-adab5203.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-0a1d14c6.js → BMI_GIRLS.zscore.yearly-c61853fe.js} +0 -0
- /package/build/{ChevronDown-e33ebdef.js → ChevronDown-1254e5e7.js} +0 -0
- /package/build/{Close-890043a0.js → Close-bc735f06.js} +0 -0
- /package/build/{Google-36cffd1b.js → Google-4bf24997.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-782751d7.js → HEAD CIRCUM_BOYS.percentile.monthly-91d56131.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-ee3be21b.js → HEAD CIRCUM_BOYS.percentile.weekly-a549dea0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-065c3b88.js → HEAD CIRCUM_BOYS.percentile.yearly-d82244f1.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-d950cd6c.js → HEAD CIRCUM_BOYS.zscore.monthly-3b8875b5.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-06b53c2d.js → HEAD CIRCUM_BOYS.zscore.weekly-3131348a.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-4f584b8b.js → HEAD CIRCUM_BOYS.zscore.yearly-0f7a48ac.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-058e0d03.js → HEAD CIRCUM_GIRLS.percentile.monthly-47b3dfd0.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-de8cc4dd.js → HEAD CIRCUM_GIRLS.percentile.weekly-93c8bf73.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-cea250ce.js → HEAD CIRCUM_GIRLS.percentile.yearly-7c4f00da.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-ea0b2fba.js → HEAD CIRCUM_GIRLS.zscore.monthly-51443e7a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-0707b508.js → HEAD CIRCUM_GIRLS.zscore.weekly-c4554378.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-c59b05a0.js → HEAD CIRCUM_GIRLS.zscore.yearly-f0c480e8.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-c9e6b39d.js → HEIGHT_BOYS.percentile.monthly-6028051c.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-55e7a85d.js → HEIGHT_BOYS.percentile.weekly-222bab41.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-f2444cf5.js → HEIGHT_BOYS.percentile.yearly-60f28dcb.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-9c4a85ec.js → HEIGHT_BOYS.zscore.monthly-87b419bd.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-57d11e68.js → HEIGHT_BOYS.zscore.weekly-4a523306.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-700c90d3.js → HEIGHT_BOYS.zscore.yearly-83d35ba6.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-abcfa3b5.js → HEIGHT_GIRLS.percentile.monthly-327ab176.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-104fbb3a.js → HEIGHT_GIRLS.percentile.weekly-1f69f3df.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-2cb02b98.js → HEIGHT_GIRLS.percentile.yearly-057eee90.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-4cd6c197.js → HEIGHT_GIRLS.zscore.monthly-c6b2db50.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-a6443ab9.js → HEIGHT_GIRLS.zscore.weekly-80c73904.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-2d364cac.js → HEIGHT_GIRLS.zscore.yearly-ccd25a92.js} +0 -0
- /package/build/{Locale-f9548ba1.js → Locale-fa9ab7e8.js} +0 -0
- /package/build/{Visible-ab10b9e7.js → Visible-4c3bd92a.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-86255468.js → WEIGHT_BOYS.percentile.monthly-bb45acfa.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-5b628a3b.js → WEIGHT_BOYS.percentile.weekly-02a19ea0.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-a2b23079.js → WEIGHT_BOYS.percentile.yearly-a108603a.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-ba09b044.js → WEIGHT_BOYS.zscore.monthly-f3c424f0.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-49f4492a.js → WEIGHT_BOYS.zscore.weekly-5291fbca.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-8e8963c2.js → WEIGHT_BOYS.zscore.yearly-c7ad1c05.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-96813ac8.js → WEIGHT_GIRLS.percentile.monthly-a7e8d88e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-ef24eecb.js → WEIGHT_GIRLS.percentile.weekly-aaa95410.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-e331fe96.js → WEIGHT_GIRLS.percentile.yearly-bb1cab5e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-03cb88e7.js → WEIGHT_GIRLS.zscore.monthly-115826fc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-326b0ef4.js → WEIGHT_GIRLS.zscore.weekly-69901775.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-8975f2c5.js → WEIGHT_GIRLS.zscore.yearly-8e47c3fb.js} +0 -0
- /package/build/{animation-822a51d5.js → animation-004e6eaf.js} +0 -0
- /package/build/{constants-b93cc646.js → constants-46d1fa7f.js} +0 -0
- /package/build/{constants-6973524f.js → constants-56e85889.js} +0 -0
- /package/build/{constants-95be6f00.js → constants-d923bea8.js} +0 -0
- /package/build/{dataTransform-56856f87.js → dataTransform-092fa532.js} +0 -0
- /package/build/{doctor-f2ae26ec.js → doctor-04ac13c3.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-6cfffedf.js → BMI_BOYS.percentile.monthly-86443d5d.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-d51a5103.js → BMI_BOYS.percentile.weekly-78217e7c.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-896cd169.js → BMI_BOYS.percentile.yearly-bb07f235.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-5daba92f.js → BMI_BOYS.zscore.monthly-04b3338d.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-c7641f8a.js → BMI_BOYS.zscore.weekly-7676acb6.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-0207a1b4.js → BMI_BOYS.zscore.yearly-abfdaa38.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-c0c7493b.js → BMI_GIRLS.percentile.monthly-dba11eec.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-9613f319.js → BMI_GIRLS.percentile.weekly-b76ceba9.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-cef9fcb5.js → BMI_GIRLS.percentile.yearly-21554853.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-68e8edc8.js → BMI_GIRLS.zscore.monthly-d672d772.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-6bfab4b8.js → BMI_GIRLS.zscore.weekly-aeaf4750.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-b0ba116f.js → BMI_GIRLS.zscore.yearly-7f86f4e6.js} +0 -0
- /package/build/esm/{ChevronDown-5a7b6155.js → ChevronDown-18102a27.js} +0 -0
- /package/build/esm/{Close-1a781973.js → Close-50ddb594.js} +0 -0
- /package/build/esm/{Google-d742ae2e.js → Google-43112225.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-083ae024.js → HEAD CIRCUM_BOYS.percentile.monthly-76c68fdd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-79096b5b.js → HEAD CIRCUM_BOYS.percentile.weekly-699c669d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-b1fbb9b6.js → HEAD CIRCUM_BOYS.percentile.yearly-921ec436.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-f75039c7.js → HEAD CIRCUM_BOYS.zscore.monthly-3129b286.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-bbb32756.js → HEAD CIRCUM_BOYS.zscore.weekly-60c8e0fd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-c16d8ff5.js → HEAD CIRCUM_BOYS.zscore.yearly-a2e35c00.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-f0db3fdb.js → HEAD CIRCUM_GIRLS.percentile.monthly-d697c1b3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-e375f33d.js → HEAD CIRCUM_GIRLS.percentile.weekly-1a50c753.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-28b36a4b.js → HEAD CIRCUM_GIRLS.percentile.yearly-b0cad34e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-09b86d8a.js → HEAD CIRCUM_GIRLS.zscore.monthly-6b2f52bb.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-6f2d172e.js → HEAD CIRCUM_GIRLS.zscore.weekly-2ff9842c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-ac02bd6c.js → HEAD CIRCUM_GIRLS.zscore.yearly-47620ae6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-9e1769c0.js → HEIGHT_BOYS.percentile.monthly-a3350ff4.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-0ed8b5ae.js → HEIGHT_BOYS.percentile.weekly-515e3cc5.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-352d6d1f.js → HEIGHT_BOYS.percentile.yearly-86933180.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-74fcca89.js → HEIGHT_BOYS.zscore.monthly-4196c3b8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-5223e840.js → HEIGHT_BOYS.zscore.weekly-1a5331c9.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-3033dcc8.js → HEIGHT_BOYS.zscore.yearly-727c8ba5.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-054dc092.js → HEIGHT_GIRLS.percentile.monthly-174f8bc9.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-4d075d71.js → HEIGHT_GIRLS.percentile.weekly-ba25e40b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-aa09acf6.js → HEIGHT_GIRLS.percentile.yearly-94063ac1.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-31ca6b0e.js → HEIGHT_GIRLS.zscore.monthly-7afb1cfa.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-7c830437.js → HEIGHT_GIRLS.zscore.weekly-baff09ec.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-7d662324.js → HEIGHT_GIRLS.zscore.yearly-9033ac96.js} +0 -0
- /package/build/esm/{Locale-3f8c59fd.js → Locale-3221a5f1.js} +0 -0
- /package/build/esm/{Visible-e582e5cf.js → Visible-b093b1f0.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-86955057.js → WEIGHT_BOYS.percentile.monthly-94244946.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-2cef81db.js → WEIGHT_BOYS.percentile.weekly-13fa6dd1.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-16e333e4.js → WEIGHT_BOYS.percentile.yearly-e085f080.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-1904c83c.js → WEIGHT_BOYS.zscore.monthly-8376024c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-08f7cfa5.js → WEIGHT_BOYS.zscore.weekly-b9016360.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-39d6daf5.js → WEIGHT_BOYS.zscore.yearly-d50e701d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-90844642.js → WEIGHT_GIRLS.percentile.monthly-61b9516b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-702bd3e4.js → WEIGHT_GIRLS.percentile.weekly-49967c00.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-e8c6fa79.js → WEIGHT_GIRLS.percentile.yearly-f8a33ff5.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-7281aa29.js → WEIGHT_GIRLS.zscore.monthly-b22cc822.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-7ce3ccaa.js → WEIGHT_GIRLS.zscore.weekly-02f56171.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-a004af2d.js → WEIGHT_GIRLS.zscore.yearly-f102931c.js} +0 -0
- /package/build/esm/{animation-dc3f1e93.js → animation-f7d95062.js} +0 -0
- /package/build/esm/{constants-7c77b46e.js → constants-00af6c95.js} +0 -0
- /package/build/esm/{constants-e7cfe3b8.js → constants-d51b53da.js} +0 -0
- /package/build/esm/{constants-6d7227b3.js → constants-f8ec0fb2.js} +0 -0
- /package/build/esm/{dataTransform-3bbb08da.js → dataTransform-a93a37f0.js} +0 -0
- /package/build/esm/{doctor-046c504b.js → doctor-f3e3bf8d.js} +0 -0
- /package/build/esm/{index-f3eb8880.js → index-25d93e74.js} +0 -0
- /package/build/esm/{index-42388c15.js → index-3549da96.js} +0 -0
- /package/build/esm/{index-9789f1b2.js → index-3bf7820a.js} +0 -0
- /package/build/esm/{index-b60d5692.js → index-3fe6a644.js} +0 -0
- /package/build/esm/{index-e956770f.js → index-4ee4ec9f.js} +0 -0
- /package/build/esm/{index-c7f596bb.js → index-63ece1e8.js} +0 -0
- /package/build/esm/{index-a62f9674.js → index-93183ae3.js} +0 -0
- /package/build/esm/{index-4f31d38d.js → index-ad8421da.js} +0 -0
- /package/build/esm/{index-7f4c6471.js → index-e7141fc3.js} +0 -0
- /package/build/esm/{index.styles-d845a625.js → index.styles-01bc7738.js} +0 -0
- /package/build/esm/{localizeNumberFormat-ecede1d8.js → localizeNumberFormat-283dde55.js} +0 -0
- /package/build/esm/{normalizeLink-c06134ec.js → normalizeLink-faff4495.js} +0 -0
- /package/build/esm/{other-87ae468b.js → other-978957e0.js} +0 -0
- /package/build/esm/{paths-f78ec85f.js → paths-35441d30.js} +0 -0
- /package/build/esm/{translationsContext-3a93695a.js → translationsContext-6625ef10.js} +0 -0
- /package/build/esm/{tslib.es6-0dadaffe.js → tslib.es6-7b710789.js} +0 -0
- /package/build/esm/{types-1b2e4f5e.js → types-81c042bb.js} +0 -0
- /package/build/esm/{useIsInit-2d27ccdf.js → useIsInit-334ecdf2.js} +0 -0
- /package/build/esm/{useOutsideClick-a863a836.js → useOutsideClick-99cf1e8a.js} +0 -0
- /package/build/esm/{useScrollbarSize-175653c1.js → useScrollbarSize-5765dfe0.js} +0 -0
- /package/build/esm/{useUniqueId-1fd7483c.js → useUniqueId-dc3856df.js} +0 -0
- /package/build/esm/{utils-6b640789.js → utils-a7413d88.js} +0 -0
- /package/build/{index-005b2471.js → index-1ec90590.js} +0 -0
- /package/build/{index-e879e400.js → index-2cfd24d1.js} +0 -0
- /package/build/{index-9d698c9f.js → index-4b93e7d8.js} +0 -0
- /package/build/{index-4bdf0d4b.js → index-5678e1f8.js} +0 -0
- /package/build/{index-10fccc63.js → index-63b6bb84.js} +0 -0
- /package/build/{index-0fab45c4.js → index-91d396e3.js} +0 -0
- /package/build/{index-0efa5653.js → index-92d2e15c.js} +0 -0
- /package/build/{index-a7e65209.js → index-aab4a11a.js} +0 -0
- /package/build/{index-9fa26671.js → index-d1685111.js} +0 -0
- /package/build/{index.styles-d66f7a15.js → index.styles-282b5f51.js} +0 -0
- /package/build/{localizeNumberFormat-7cdcc9f4.js → localizeNumberFormat-96ffcba7.js} +0 -0
- /package/build/{normalizeLink-f4fca3d5.js → normalizeLink-a0020d17.js} +0 -0
- /package/build/{other-3405a8ad.js → other-dbb2467d.js} +0 -0
- /package/build/{paths-de313ade.js → paths-e2fa0160.js} +0 -0
- /package/build/{translationsContext-84a6d749.js → translationsContext-8eddc47b.js} +0 -0
- /package/build/{tslib.es6-f331392e.js → tslib.es6-f49889de.js} +0 -0
- /package/build/{types-836e05ac.js → types-f52c0573.js} +0 -0
- /package/build/{useIsInit-c24fd1d2.js → useIsInit-06292bee.js} +0 -0
- /package/build/{useOutsideClick-9f994b94.js → useOutsideClick-961bbb1b.js} +0 -0
- /package/build/{useScrollbarSize-31480698.js → useScrollbarSize-e5289898.js} +0 -0
- /package/build/{useUniqueId-3228a563.js → useUniqueId-0206d180.js} +0 -0
- /package/build/{utils-6e3072b8.js → utils-29060b96.js} +0 -0
package/build/esm/lead.js
CHANGED
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
import { _ as __rest, a as __awaiter } from './tslib.es6-
|
|
2
|
-
import React__default, { createContext, useEffect, useMemo, useRef, useState, useContext
|
|
3
|
-
import { createStyles, Box,
|
|
1
|
+
import { _ as __rest, a as __awaiter } from './tslib.es6-7b710789.js';
|
|
2
|
+
import React__default, { createContext, useEffect, useMemo, useRef, useState, useContext } from 'react';
|
|
3
|
+
import { createStyles, Box, 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-5539b7bd.js';
|
|
8
|
+
import { T as Text } from './index-b380b8ce.js';
|
|
9
|
+
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput } from './index-51482477.js';
|
|
10
|
+
import { D as DatePicker } from './index-196497c1.js';
|
|
11
|
+
import { M as MAPPED_LOCALE } from './utils-351e2780.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
|
|
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-6366de18.js';
|
|
14
|
+
import './index-b067b442.js';
|
|
15
|
+
import { C as CommonGAssets } from './index-93183ae3.js';
|
|
16
|
+
import './useMantineLocale-8cc72830.js';
|
|
17
|
+
import { B as Button$1 } from './index-cc394577.js';
|
|
18
|
+
import './index.styles-01bc7738.js';
|
|
19
|
+
import { T as TranslationsContext } from './translationsContext-6625ef10.js';
|
|
20
|
+
import '@mantine/hooks';
|
|
21
|
+
import { b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-a7413d88.js';
|
|
22
|
+
import './other-978957e0.js';
|
|
23
|
+
import './index-0c8caf51.js';
|
|
24
|
+
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-206540a6.js';
|
|
25
|
+
import { B as Button } from './index-5f57b1dc.js';
|
|
26
|
+
import { H as Heading$1 } from './index-b2c17404.js';
|
|
27
27
|
import { v1 } from 'uuid';
|
|
28
|
-
import { i as isVideo } from './index-
|
|
29
|
-
import { D as DrawerComponent } from './index-8410a781.js';
|
|
30
|
-
import { u as useScreenSize } from './useScreenSize-4ee1316a.js';
|
|
31
|
-
import { createPortal } from 'react-dom';
|
|
32
|
-
import { css } from '@emotion/react';
|
|
33
|
-
import styled from '@emotion/styled';
|
|
28
|
+
import { i as isVideo } from './index-ad8421da.js';
|
|
34
29
|
import { theme } from './miscTheme.js';
|
|
30
|
+
import { createPortal } from 'react-dom';
|
|
35
31
|
import { getCookie, setCookie } from './miscCookieHelper.js';
|
|
36
|
-
import { C as Close } from './Close-
|
|
32
|
+
import { C as Close } from './Close-50ddb594.js';
|
|
37
33
|
import '@hhgtech/icons/other';
|
|
34
|
+
import './useScreenSize-623e1764.js';
|
|
35
|
+
import '@emotion/styled';
|
|
38
36
|
import '@mantine/carousel';
|
|
39
|
-
import './Locale-
|
|
37
|
+
import './Locale-3221a5f1.js';
|
|
40
38
|
import 'classnames';
|
|
41
|
-
import './useUniqueId-
|
|
39
|
+
import './useUniqueId-dc3856df.js';
|
|
42
40
|
import './constantsSite.js';
|
|
43
41
|
import '@hhgtech/icons/core';
|
|
44
42
|
import 'date-fns/locale';
|
|
@@ -46,7 +44,6 @@ import './constantsDomainLocales.js';
|
|
|
46
44
|
import './constantsRiskScreener.js';
|
|
47
45
|
import './constantsIsProduction.js';
|
|
48
46
|
import '@mantine/notifications';
|
|
49
|
-
import 'vaul';
|
|
50
47
|
|
|
51
48
|
const LeadGenComponentContext = createContext({});
|
|
52
49
|
|
|
@@ -520,7 +517,7 @@ const useLeadFormConfig$1 = ({ listBlockAdded = [], validatingPhoneRef, validati
|
|
|
520
517
|
return { form, validateObj };
|
|
521
518
|
};
|
|
522
519
|
|
|
523
|
-
const Component = ({ campaign, onClose: onCloseProp, onOtherSubmit, onSubmit, showThankyou, setShowThankyou, locale, children,
|
|
520
|
+
const Component = ({ campaign, onClose: onCloseProp, onOtherSubmit, onSubmit, showThankyou, setShowThankyou, locale, children, }) => {
|
|
524
521
|
var _a, _b;
|
|
525
522
|
const extraFields = campaign.extra_fields;
|
|
526
523
|
const campaignId = campaign.id;
|
|
@@ -573,8 +570,6 @@ const Component = ({ campaign, onClose: onCloseProp, onOtherSubmit, onSubmit, sh
|
|
|
573
570
|
onSubmit,
|
|
574
571
|
showThankyou,
|
|
575
572
|
setShowThankyou,
|
|
576
|
-
showEmpty,
|
|
577
|
-
setShowEmpty,
|
|
578
573
|
} }, children)) : null;
|
|
579
574
|
};
|
|
580
575
|
|
|
@@ -591,7 +586,7 @@ var useStyles$2 = createStyles(() => {
|
|
|
591
586
|
});
|
|
592
587
|
|
|
593
588
|
const libraries$1 = ['places'];
|
|
594
|
-
const LocationBlock = ({ name, placeholder, locale, required = true, }) => {
|
|
589
|
+
const LocationBlock$1 = ({ name, placeholder, locale, required = true, }) => {
|
|
595
590
|
var _a;
|
|
596
591
|
const form = useLeadFormContext$1();
|
|
597
592
|
const [searchValue, setSearchValue] = useState('');
|
|
@@ -691,7 +686,7 @@ const Fields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, style
|
|
|
691
686
|
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel" })));
|
|
692
687
|
}
|
|
693
688
|
case 'LocationBlock': {
|
|
694
|
-
return (React__default.createElement(LocationBlock, { key: index, name: value, placeholder: placeholder, locale: locale, required: required }));
|
|
689
|
+
return (React__default.createElement(LocationBlock$1, { key: index, name: value, placeholder: placeholder, locale: locale, required: required }));
|
|
695
690
|
}
|
|
696
691
|
case 'DateBlock':
|
|
697
692
|
return (React__default.createElement(React__default.Fragment, null,
|
|
@@ -1041,10 +1036,7 @@ var enPH = {
|
|
|
1041
1036
|
"lead.otp.verify": "Verify",
|
|
1042
1037
|
"lead.otp.resend": "Resend OTP{timer}",
|
|
1043
1038
|
"lead.otp.phoneLabel": "Phone 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"
|
|
1039
|
+
"lead.otp.phonePlaceholder": "Enter OTP"
|
|
1048
1040
|
};
|
|
1049
1041
|
|
|
1050
1042
|
var hiIN = {
|
|
@@ -1060,10 +1052,7 @@ var hiIN = {
|
|
|
1060
1052
|
"lead.otp.title": "Enter OTP",
|
|
1061
1053
|
"lead.otp.desc": "We have sent an OTP to your mobile number {phone}",
|
|
1062
1054
|
"lead.otp.verify": "Verify",
|
|
1063
|
-
"lead.otp.resend": "Resend OTP{timer}"
|
|
1064
|
-
"lead.empty.title": "ऊप्स! लगता है आपकी जानकारी खाली है। क्या आप जानकारी फिर से सबमिट करना चाहते हैं?",
|
|
1065
|
-
"lead.empty.cancel": "रद्द करें",
|
|
1066
|
-
"lead.empty.submitAgain": "फिर से सबमिट करें"
|
|
1055
|
+
"lead.otp.resend": "Resend OTP{timer}"
|
|
1067
1056
|
};
|
|
1068
1057
|
|
|
1069
1058
|
var idID = {
|
|
@@ -1081,10 +1070,7 @@ var idID = {
|
|
|
1081
1070
|
"lead.otp.verify": "Verifikasi",
|
|
1082
1071
|
"lead.otp.resend": "Kirim Ulang OTP {timer}",
|
|
1083
1072
|
"lead.otp.phoneLabel": "OTP Telepon",
|
|
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"
|
|
1073
|
+
"lead.otp.phonePlaceholder": "Masukkan OTP"
|
|
1088
1074
|
};
|
|
1089
1075
|
|
|
1090
1076
|
var kmKH = {
|
|
@@ -1102,10 +1088,7 @@ var kmKH = {
|
|
|
1102
1088
|
"lead.otp.verify": "ផ្ទៀងផ្ទាត់",
|
|
1103
1089
|
"lead.otp.resend": "ផ្ញើ OTP ម្តងទៀត {timer}",
|
|
1104
1090
|
"lead.otp.phoneLabel": "OTP ទូរស័ព្ទ",
|
|
1105
|
-
"lead.otp.phonePlaceholder": "បញ្ចូល OTP"
|
|
1106
|
-
"lead.empty.title": "អូុបស! ហាក់ដូចជាព័ត៌មានរបស់អ្នកទទេ។ តើអ្នកចង់ដាក់ស្នើព័ត៌មានម្តងទៀតទេ?",
|
|
1107
|
-
"lead.empty.cancel": "លុបចោល",
|
|
1108
|
-
"lead.empty.submitAgain": "ដាក់ស្នើម្ដងទៀត"
|
|
1091
|
+
"lead.otp.phonePlaceholder": "បញ្ចូល OTP"
|
|
1109
1092
|
};
|
|
1110
1093
|
|
|
1111
1094
|
var msMY = {
|
|
@@ -1123,10 +1106,7 @@ var msMY = {
|
|
|
1123
1106
|
"lead.otp.verify": "Sahkan",
|
|
1124
1107
|
"lead.otp.resend": "Hantar semula OTP {timer}",
|
|
1125
1108
|
"lead.otp.phoneLabel": "OTP Telefon",
|
|
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"
|
|
1109
|
+
"lead.otp.phonePlaceholder": "Masukkan OTP"
|
|
1130
1110
|
};
|
|
1131
1111
|
|
|
1132
1112
|
var myMM = {
|
|
@@ -1144,10 +1124,7 @@ var myMM = {
|
|
|
1144
1124
|
"lead.otp.verify": "အတည်ပြုပါ",
|
|
1145
1125
|
"lead.otp.resend": "OTP ကိုထပ်မံပို့ရန် {timer}",
|
|
1146
1126
|
"lead.otp.phoneLabel": "ဖုန်း OTP",
|
|
1147
|
-
"lead.otp.phonePlaceholder": "OTP ကိုထည့်ပါ"
|
|
1148
|
-
"lead.empty.title": "အုပ်စ်! သင့်အချက်အလက်သည် ဗလာဖြစ်နေသလိုဖြစ်သည်။ ထပ်မံတင်သွင်းလိုပါသလား?",
|
|
1149
|
-
"lead.empty.cancel": "မလုပ်ဆောင်ပါ",
|
|
1150
|
-
"lead.empty.submitAgain": "ထပ်မံတင်သွင်းပါ"
|
|
1127
|
+
"lead.otp.phonePlaceholder": "OTP ကိုထည့်ပါ"
|
|
1151
1128
|
};
|
|
1152
1129
|
|
|
1153
1130
|
var thTH = {
|
|
@@ -1165,10 +1142,7 @@ var thTH = {
|
|
|
1165
1142
|
"lead.otp.verify": "ยืนยัน",
|
|
1166
1143
|
"lead.otp.resend": "ส่ง OTP อีกครั้ง {timer}",
|
|
1167
1144
|
"lead.otp.phoneLabel": "OTP โทรศัพท์",
|
|
1168
|
-
"lead.otp.phonePlaceholder": "ป้อน OTP"
|
|
1169
|
-
"lead.empty.title": "อุ๊ปส์! ดูเหมือนว่าข้อมูลของคุณว่างเปล่า คุณต้องการส่งข้อมูลอีกครั้งหรือไม่?",
|
|
1170
|
-
"lead.empty.cancel": "ยกเลิก",
|
|
1171
|
-
"lead.empty.submitAgain": "ส่งอีกครั้ง"
|
|
1145
|
+
"lead.otp.phonePlaceholder": "ป้อน OTP"
|
|
1172
1146
|
};
|
|
1173
1147
|
|
|
1174
1148
|
var viVN = {
|
|
@@ -1197,10 +1171,7 @@ var viVN = {
|
|
|
1197
1171
|
"lead.otp.verify": "Xác minh",
|
|
1198
1172
|
"lead.otp.resend": "Gửi lại OTP {timer}",
|
|
1199
1173
|
"lead.otp.phoneLabel": "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"
|
|
1174
|
+
"lead.otp.phonePlaceholder": "Nhập OTP"
|
|
1204
1175
|
};
|
|
1205
1176
|
|
|
1206
1177
|
var zhTW = {
|
|
@@ -1218,10 +1189,7 @@ var zhTW = {
|
|
|
1218
1189
|
"lead.otp.verify": "驗證",
|
|
1219
1190
|
"lead.otp.resend": "重新發送 OTP {timer}",
|
|
1220
1191
|
"lead.otp.phoneLabel": "電話 OTP",
|
|
1221
|
-
"lead.otp.phonePlaceholder": "輸入 OTP"
|
|
1222
|
-
"lead.empty.title": "哎呀,您的資訊似乎是空的,您想要重新提交資訊嗎?",
|
|
1223
|
-
"lead.empty.cancel": "取消",
|
|
1224
|
-
"lead.empty.submitAgain": "重新提交"
|
|
1192
|
+
"lead.otp.phonePlaceholder": "輸入 OTP"
|
|
1225
1193
|
};
|
|
1226
1194
|
|
|
1227
1195
|
const translationsMap = {
|
|
@@ -1281,8 +1249,9 @@ const useImageSize = (src) => {
|
|
|
1281
1249
|
};
|
|
1282
1250
|
|
|
1283
1251
|
const CloseButton = ({ onClose, containerClassName, svgClassName, }) => (React__default.createElement("button", { onClick: onClose, className: `le-newbuilder-close-button js-modal__close ${containerClassName || ''}` },
|
|
1284
|
-
React__default.createElement("svg", { width: "
|
|
1285
|
-
React__default.createElement("
|
|
1252
|
+
React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", className: svgClassName },
|
|
1253
|
+
React__default.createElement("circle", { cx: "16", cy: "16", r: "16", fill: "white" }),
|
|
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" }))));
|
|
1286
1255
|
|
|
1287
1256
|
// url: imageBlocks.imageMobile.data.url
|
|
1288
1257
|
// newTab: imageBlocks.imageMobile.data.newtab
|
|
@@ -1359,192 +1328,6 @@ const FloatingLayout = ({ popupId, url, title, urlText, titleAlign, subtitle, su
|
|
|
1359
1328
|
React__default.createElement(CloseButton, { onClose: onClose, containerClassName: "close-button-top-right" }))))));
|
|
1360
1329
|
};
|
|
1361
1330
|
|
|
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
|
-
|
|
1548
1331
|
// You can give context variables any name
|
|
1549
1332
|
const [LeadFormProvider, useLeadFormContext, useLeadForm] = createFormContext();
|
|
1550
1333
|
const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validatingEmailRef, campaignId, campaign_subot_id = [], }) => {
|
|
@@ -1574,9 +1357,9 @@ const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validating
|
|
|
1574
1357
|
const isBLockRequired = (_a = block === null || block === void 0 ? void 0 : block.data) === null || _a === void 0 ? void 0 : _a.required;
|
|
1575
1358
|
if (!formRef.current.isTouched(name))
|
|
1576
1359
|
return;
|
|
1577
|
-
if (
|
|
1578
|
-
typeof value === 'undefined' ||
|
|
1360
|
+
if (typeof value === 'undefined' ||
|
|
1579
1361
|
value === '' ||
|
|
1362
|
+
(typeof value === 'string' && value.replace(' ', '') === '') ||
|
|
1580
1363
|
(Array.isArray(value) && value.length === 0)) {
|
|
1581
1364
|
return isBLockRequired
|
|
1582
1365
|
? t('validator.required')
|
|
@@ -1710,407 +1493,108 @@ const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validating
|
|
|
1710
1493
|
return { form, validateObj };
|
|
1711
1494
|
};
|
|
1712
1495
|
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
const cssInputShrink = css `
|
|
1734
|
-
height: auto !important;
|
|
1735
|
-
cursor: text;
|
|
1736
|
-
opacity: 1;
|
|
1737
|
-
transition: 0.1s ease-in-out all;
|
|
1738
|
-
`;
|
|
1739
|
-
const cssLabelNotShrink = css `
|
|
1740
|
-
position: absolute;
|
|
1741
|
-
top: calc(var(--container-height) / 2);
|
|
1742
|
-
left: var(--space-x, 16px);
|
|
1743
|
-
color: ${theme.colors.gray400};
|
|
1744
|
-
font-size: var(--label-not-shrink, 16px);
|
|
1745
|
-
font-weight: 400;
|
|
1746
|
-
line-height: calc(var(--container-height, 56px) * 18 / 56);
|
|
1747
|
-
margin: 0;
|
|
1748
|
-
z-index: 1;
|
|
1749
|
-
cursor: pointer;
|
|
1750
|
-
transform: translateY(-50%);
|
|
1751
|
-
transition: 0.125s ease-in all;
|
|
1752
|
-
`;
|
|
1753
|
-
const cssLabelShrink = css `
|
|
1754
|
-
color: ${theme.colors.gray600};
|
|
1755
|
-
font-weight: 600;
|
|
1756
|
-
font-size: var(--label-shrink, 12px);
|
|
1757
|
-
top: calc(var(--container-height) * 7 / 56);
|
|
1758
|
-
transform: none;
|
|
1759
|
-
transition: 0.125s ease-out all;
|
|
1760
|
-
`;
|
|
1761
|
-
const cssWrapperInputNotShrink = css `
|
|
1762
|
-
min-height: var(--container-height, 56px);
|
|
1763
|
-
display: flex;
|
|
1764
|
-
align-items: flex-end;
|
|
1765
|
-
border: 1px solid ${theme.colors.gray200};
|
|
1766
|
-
border-radius: 8px;
|
|
1767
|
-
background-color: #fff;
|
|
1768
|
-
padding-inline: var(--space-x, 16px);
|
|
1769
|
-
padding-block: var(--space-y-not-shrink, 16px);
|
|
1770
|
-
cursor: pointer;
|
|
1771
|
-
pointer-events: none;
|
|
1772
|
-
|
|
1773
|
-
&:has(.mantine-Input-rightSection) {
|
|
1774
|
-
padding-right: var(--container-height, 56px);
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
.mantine-Input-icon {
|
|
1778
|
-
display: none;
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
.mantine-NumberInput-control {
|
|
1782
|
-
border-color: ${theme.colors.gray200};
|
|
1783
|
-
}
|
|
1784
|
-
`;
|
|
1785
|
-
const cssWrapperInputShrink = css `
|
|
1786
|
-
height: auto;
|
|
1787
|
-
min-height: var(--container-height, 56px);
|
|
1788
|
-
padding-block: var(--space-y-shrink, 7px);
|
|
1789
|
-
cursor: text;
|
|
1790
|
-
pointer-events: auto;
|
|
1791
|
-
`;
|
|
1792
|
-
const cssInputWrapperError = css `
|
|
1793
|
-
color: ${theme.colors.red800};
|
|
1794
|
-
font-size: 12px;
|
|
1795
|
-
line-height: 1.5;
|
|
1796
|
-
`;
|
|
1797
|
-
const StyledTextFieldContainer = styled.div `
|
|
1798
|
-
--space-x: 16px;
|
|
1799
|
-
--space-y-not-shrink: 16px;
|
|
1800
|
-
--space-y-shrink: 7px;
|
|
1801
|
-
--container-height: 56px;
|
|
1802
|
-
--label-not-shrink: 16px;
|
|
1803
|
-
--label-shrink: 12px;
|
|
1804
|
-
--input: 16px;
|
|
1805
|
-
|
|
1806
|
-
position: relative;
|
|
1807
|
-
min-width: 100px;
|
|
1808
|
-
max-width: 100%;
|
|
1809
|
-
display: inline-block;
|
|
1810
|
-
|
|
1811
|
-
.textField_wrapper {
|
|
1812
|
-
display: inline-block;
|
|
1813
|
-
width: 100%;
|
|
1814
|
-
cursor: pointer;
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
.mantine-InputWrapper-root {
|
|
1818
|
-
&[data-invalid='true'] {
|
|
1819
|
-
.mantine-Input-wrapper {
|
|
1820
|
-
border-color: ${theme.colors.red400};
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
.mantine-Input-wrapper {
|
|
1825
|
-
&:has([data-invalid]) {
|
|
1826
|
-
border-color: ${theme.colors.red400};
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
.mantine-InputWrapper-label {
|
|
1832
|
-
${cssLabelNotShrink}
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
.mantine-Input-wrapper {
|
|
1836
|
-
${cssWrapperInputNotShrink}
|
|
1837
|
-
|
|
1838
|
-
+ .mantine-Popover-dropdown[data-position="bottom-start"] {
|
|
1839
|
-
left: 0 !important;
|
|
1840
|
-
}
|
|
1841
|
-
+ .mantine-Popover-dropdown[data-position='top-start'] {
|
|
1842
|
-
top: unset !important;
|
|
1843
|
-
left: 0 !important;
|
|
1844
|
-
bottom: 100% !important;
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
.mantine-Input-input {
|
|
1849
|
-
${cssInputNotShrink}
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
&.textField_shrink,
|
|
1853
|
-
&:focus-within {
|
|
1854
|
-
.mantine-InputWrapper-label {
|
|
1855
|
-
${cssLabelShrink}
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
.mantine-Input-wrapper {
|
|
1859
|
-
${cssWrapperInputShrink}
|
|
1860
|
-
&.mantine-Select-wrapper {
|
|
1861
|
-
.mantine-Select-rightSection {
|
|
1862
|
-
pointer-events: auto !important;
|
|
1863
|
-
}
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
.mantine-Input-input {
|
|
1868
|
-
${cssInputShrink}
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
&:has(.PhoneInput) {
|
|
1872
|
-
.mantine-InputWrapper-label {
|
|
1873
|
-
left: var(--space-x, 16px);
|
|
1874
|
-
}
|
|
1875
|
-
.PhoneInput {
|
|
1876
|
-
.PhoneInputInput {
|
|
1877
|
-
opacity: 1;
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
.PhoneInput {
|
|
1884
|
-
--phone-select: 75px;
|
|
1885
|
-
--phone-input-space-x: 8px;
|
|
1886
|
-
width: 100%;
|
|
1887
|
-
opacity: 1;
|
|
1888
|
-
border: none;
|
|
1889
|
-
.PhoneInputCountry {
|
|
1890
|
-
background-color: transparent;
|
|
1891
|
-
border: none;
|
|
1892
|
-
padding: 0;
|
|
1893
|
-
width: var(--phone-select, 75px);
|
|
1894
|
-
}
|
|
1895
|
-
.PhoneInputInput {
|
|
1896
|
-
flex: 1;
|
|
1897
|
-
min-width: 0;
|
|
1898
|
-
line-height: 1.5;
|
|
1899
|
-
outline: none !important;
|
|
1900
|
-
border: none;
|
|
1901
|
-
box-shadow: none;
|
|
1902
|
-
padding: 0 var(--phone-input-space-x, 8px);
|
|
1903
|
-
opacity: 0;
|
|
1904
|
-
color: ${theme.colors.gray800} !important;
|
|
1905
|
-
:focus {
|
|
1906
|
-
color: ${theme.colors.gray800} !important;
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
&:has(.PhoneInput) {
|
|
1912
|
-
.mantine-InputWrapper-label {
|
|
1913
|
-
left: calc(
|
|
1914
|
-
var(--space-x, 16px) + var(--phone-select, 75px) +
|
|
1915
|
-
var(--phone-input-space-x, 8px)
|
|
1916
|
-
);
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
`;
|
|
1920
|
-
const StyledChoiceFieldContainer = styled.div `
|
|
1921
|
-
&.leadgen-form_checkbox,
|
|
1922
|
-
&.leadgen-form_radio {
|
|
1923
|
-
width: 100%;
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
&.leadgen-form_dropdown {
|
|
1927
|
-
width: calc(50% - 12px);
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
.mantine-InputWrapper-root {
|
|
1931
|
-
display: block;
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
.mantine-InputWrapper-label {
|
|
1935
|
-
margin-bottom: 0.5rem;
|
|
1936
|
-
color: ${theme.colors.gray800};
|
|
1937
|
-
font-size: 16px;
|
|
1938
|
-
font-weight: 400;
|
|
1939
|
-
line-height: 1.5;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
.mantine-Radio-root,
|
|
1943
|
-
.mantine-Checkbox-root {
|
|
1944
|
-
gap: 8px;
|
|
1945
|
-
min-width: calc(50% - 4px);
|
|
1946
|
-
|
|
1947
|
-
input[type='radio'],
|
|
1948
|
-
input[type='checkbox'] {
|
|
1949
|
-
border-color: ${theme.colors.gray600};
|
|
1950
|
-
width: 18px;
|
|
1951
|
-
height: 18px;
|
|
1952
|
-
}
|
|
1953
|
-
input[type='checkbox'] {
|
|
1954
|
-
border-radius: 4px;
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
&[data-checked='true'] {
|
|
1958
|
-
input[type='radio'],
|
|
1959
|
-
input[type='checkbox'] {
|
|
1960
|
-
border-color: ${theme.colors.primary600};
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
input[type='radio'] {
|
|
1964
|
-
background-color: white;
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
.mantine-Checkbox-input {
|
|
1969
|
-
&:checked {
|
|
1970
|
-
border-color: ${theme.colors.primary600};
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
.mantine-Radio-inner,
|
|
1976
|
-
.mantine-Checkbox-inner {
|
|
1977
|
-
width: 24px;
|
|
1978
|
-
height: 24px;
|
|
1979
|
-
display: flex;
|
|
1980
|
-
align-items: center;
|
|
1981
|
-
justify-content: center;
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
.mantine-Radio-body,
|
|
1985
|
-
.mantine-Checkbox-body {
|
|
1986
|
-
display: flex;
|
|
1987
|
-
align-items: center;
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
.mantine-Radio-label,
|
|
1991
|
-
.mantine-Checkbox-label {
|
|
1992
|
-
padding-left: 8px;
|
|
1993
|
-
color: ${theme.colors.gray800};
|
|
1994
|
-
font-size: 14px;
|
|
1995
|
-
line-height: 1.4;
|
|
1996
|
-
letter-spacing: -0.2px;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
.leadgen-choiceContainer {
|
|
2000
|
-
display: flex;
|
|
2001
|
-
flex-wrap: wrap;
|
|
2002
|
-
align-items: flex-start;
|
|
2003
|
-
gap: 8px;
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
.mantine-InputWrapper-error {
|
|
2007
|
-
${cssInputWrapperError}
|
|
2008
|
-
}
|
|
2009
|
-
`;
|
|
2010
|
-
|
|
2011
|
-
const TextField = (props) => {
|
|
2012
|
-
const { shrink: shrinkProps, onChangeShrink, className, children } = props, restProps = __rest(props, ["shrink", "onChangeShrink", "className", "children"]);
|
|
2013
|
-
const containerRef = useClickOutside(() => {
|
|
2014
|
-
if (shrinkProps) {
|
|
2015
|
-
return;
|
|
2016
|
-
}
|
|
2017
|
-
setShrink(false);
|
|
2018
|
-
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
|
|
2019
|
-
});
|
|
2020
|
-
const [shrink, setShrink] = useState(shrinkProps);
|
|
2021
|
-
const onClick = useCallback((e) => {
|
|
2022
|
-
setShrink(true);
|
|
2023
|
-
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
|
|
2024
|
-
if (shrink) {
|
|
2025
|
-
return;
|
|
1496
|
+
const libraries = ['places'];
|
|
1497
|
+
const LocationBlock = ({ name, placeholder, locale, required = true, }) => {
|
|
1498
|
+
var _a;
|
|
1499
|
+
const form = useLeadFormContext();
|
|
1500
|
+
const [searchValue, setSearchValue] = useState('');
|
|
1501
|
+
const [address, setAddress] = useState('');
|
|
1502
|
+
const { predictions } = usePlacesAutocomplete(searchValue, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
|
|
1503
|
+
const [LoadScript, setLoadScript] = useState(null);
|
|
1504
|
+
const [ready, setReady] = useState(false);
|
|
1505
|
+
const randRef = useRef(Math.random().toString(36).substring(7));
|
|
1506
|
+
const options = useMemo(() => {
|
|
1507
|
+
const _opts = predictions.map((p) => {
|
|
1508
|
+
return {
|
|
1509
|
+
value: p.description,
|
|
1510
|
+
label: p.description,
|
|
1511
|
+
};
|
|
1512
|
+
});
|
|
1513
|
+
const isExist = _opts.find((o) => o.value === address);
|
|
1514
|
+
if (!address || isExist) {
|
|
1515
|
+
return _opts;
|
|
2026
1516
|
}
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
1517
|
+
return [{ value: address, label: address }].concat(_opts);
|
|
1518
|
+
}, [predictions, address]);
|
|
1519
|
+
useEffect(() => {
|
|
1520
|
+
var _a, _b, _c;
|
|
1521
|
+
// only load extra google script when not yet loaded
|
|
1522
|
+
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)) {
|
|
1523
|
+
import('@react-google-maps/api').then((m) => {
|
|
1524
|
+
setLoadScript(() => m.LoadScript);
|
|
1525
|
+
setTimeout(() => {
|
|
1526
|
+
setReady(true);
|
|
1527
|
+
}, 200);
|
|
2035
1528
|
});
|
|
2036
1529
|
}
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
}, [
|
|
2041
|
-
|
|
2042
|
-
React__default.createElement("div", {
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
1530
|
+
else {
|
|
1531
|
+
setReady(true);
|
|
1532
|
+
}
|
|
1533
|
+
}, []);
|
|
1534
|
+
if (!ready)
|
|
1535
|
+
return (React__default.createElement("div", { style: {
|
|
1536
|
+
height: 73,
|
|
1537
|
+
} }));
|
|
1538
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1539
|
+
LoadScript && (React__default.createElement(LoadScript, { googleMapsApiKey: GOOGLE_API_KEY, libraries: libraries, loadingElement: React__default.createElement(React__default.Fragment, null) })),
|
|
1540
|
+
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": name, "data-control": 'text' }),
|
|
1541
|
+
React__default.createElement(Select, Object.assign({ className: "lead-modal__form-control", label: placeholder, placeholder: placeholder, withAsterisk: required, name: name, data: options, searchValue: searchValue, onSearchChange: (query) => {
|
|
1542
|
+
setSearchValue(query);
|
|
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)))));
|
|
2047
1545
|
};
|
|
2048
1546
|
|
|
1547
|
+
const SubtitleBlock = ({ children, align, }) => (React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
1548
|
+
|
|
2049
1549
|
const TitleBlock = ({ children, align, }) => (React__default.createElement("h2", { className: `lead-modal__title ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
2050
1550
|
|
|
2051
1551
|
const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, }) => {
|
|
2052
1552
|
const form = useLeadFormContext();
|
|
2053
|
-
const formValues = form.values;
|
|
2054
1553
|
return (React__default.createElement(React__default.Fragment, null, listBlockAdded.map((b, index) => {
|
|
2055
1554
|
var _a;
|
|
2056
1555
|
const { name = '', data = {} } = b || {};
|
|
2057
1556
|
const { placeholder, value, align, listQuestion, isSendMailChimp = false, newtab, url, } = data;
|
|
2058
1557
|
const required = (_a = data.required) !== null && _a !== void 0 ? _a : true;
|
|
2059
|
-
const formValue = (formValues === null || formValues === void 0 ? void 0 : formValues[value]) || null;
|
|
2060
1558
|
switch (name) {
|
|
2061
1559
|
case 'TitleBlock':
|
|
2062
1560
|
return (React__default.createElement(TitleBlock, { key: index, align: align }, value));
|
|
2063
1561
|
case 'SubtitleBlock':
|
|
2064
1562
|
return (React__default.createElement(SubtitleBlock, { key: index, align: align }, value));
|
|
2065
1563
|
case 'TextBlock':
|
|
2066
|
-
return (React__default.createElement(
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
// onChangeRaw={(e) => inputOnChange('text', e)}
|
|
2070
|
-
label: placeholder, "data-control": "text", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1564
|
+
return (React__default.createElement(Input, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "text", placeholder: placeholder, className: "lead-modal__form-control",
|
|
1565
|
+
// onChangeRaw={(e) => inputOnChange('text', e)}
|
|
1566
|
+
label: placeholder, "data-control": "text", name: value }, form.getInputProps(value))));
|
|
2071
1567
|
case 'NumberBlock':
|
|
2072
|
-
return (React__default.createElement(
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
// onChange={(e) => inputOnChange('number', e)}
|
|
2076
|
-
label: placeholder, "data-control": "number", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1568
|
+
return (React__default.createElement(NumberInput, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "number", placeholder: placeholder, className: "lead-modal__form-control",
|
|
1569
|
+
// onChange={(e) => inputOnChange('number', e)}
|
|
1570
|
+
label: placeholder, "data-control": "number", name: value }, form.getInputProps(value))));
|
|
2077
1571
|
case 'EmailBlock':
|
|
2078
|
-
return (React__default.createElement(
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
placeholder: placeholder,
|
|
2082
|
-
// className="lead-modal__form-control leadgen-form_field"
|
|
2083
|
-
label: placeholder, "data-control": "email", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1572
|
+
return (React__default.createElement(Input, Object.assign({ key: index, withAsterisk: required, spellCheck: false,
|
|
1573
|
+
// type="email"
|
|
1574
|
+
placeholder: placeholder, className: "lead-modal__form-control", label: placeholder, "data-control": "email", name: value }, form.getInputProps(value))));
|
|
2084
1575
|
case 'PhoneOtpBlock':
|
|
2085
1576
|
case 'WhatsappOtpBlock':
|
|
2086
1577
|
case 'ZaloOtpBlock':
|
|
2087
1578
|
case 'PhoneBlock': {
|
|
2088
1579
|
const id = popupId + '-' + value + '-' + index;
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
},
|
|
2100
|
-
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
2101
|
-
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel" })))));
|
|
1580
|
+
return (React__default.createElement(Input.Wrapper, Object.assign({ size: "md", withAsterisk: required, key: index, label: placeholder,
|
|
1581
|
+
// error={errorField.phone}
|
|
1582
|
+
className: "lead-modal__form-control", labelProps: {
|
|
1583
|
+
htmlFor: id,
|
|
1584
|
+
} }, form.getInputProps(value)),
|
|
1585
|
+
React__default.createElement(Phone, { name: value, spellCheck: false, type: "tel", placeholder: placeholder, onChange: (v) => {
|
|
1586
|
+
form.setFieldValue(value, v);
|
|
1587
|
+
},
|
|
1588
|
+
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
1589
|
+
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel" })));
|
|
2102
1590
|
}
|
|
2103
1591
|
case 'LocationBlock': {
|
|
2104
|
-
return (React__default.createElement(
|
|
2105
|
-
React__default.createElement(GoogleLocation, Object.assign({ withAsterisk: required, key: index, name: value, placeholder: placeholder, label: placeholder, "data-control": "text", locale: locale, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
1592
|
+
return (React__default.createElement(LocationBlock, { key: index, name: value, placeholder: placeholder, locale: locale, required: required }));
|
|
2106
1593
|
}
|
|
2107
1594
|
case 'DateBlock':
|
|
2108
|
-
return (React__default.createElement(
|
|
2109
|
-
React__default.createElement(DatePicker, Object.assign({
|
|
2110
|
-
|
|
2111
|
-
children,
|
|
2112
|
-
React__default.createElement("input", { type: "hidden", "data-control": "date", name: value, value: formValue })));
|
|
2113
|
-
} }, form.getInputProps(value)))));
|
|
1595
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1596
|
+
React__default.createElement(DatePicker, Object.assign({ withAsterisk: required, key: index, type: "default", name: value, placeholder: placeholder, className: "lead-modal__form-control", label: placeholder, "data-control": "date" }, form.getInputProps(value))),
|
|
1597
|
+
React__default.createElement("input", { type: "hidden", name: value, "data-control": "date" })));
|
|
2114
1598
|
case 'LinkButtonBlock':
|
|
2115
1599
|
return (React__default.createElement("div", { key: index },
|
|
2116
1600
|
React__default.createElement("a", { target: newtab ? 'blank' : 'parrent', href: url, style: { textDecoration: 'none' } },
|
|
@@ -2119,42 +1603,30 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
2119
1603
|
onOtherSubmit === null || onOtherSubmit === void 0 ? void 0 : onOtherSubmit();
|
|
2120
1604
|
} }, value))));
|
|
2121
1605
|
case 'CheckboxBlock':
|
|
2122
|
-
return (React__default.createElement(
|
|
1606
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
2123
1607
|
isSendMailChimp && (React__default.createElement("div", { style: {
|
|
2124
1608
|
display: 'none',
|
|
2125
1609
|
}, "data-name": value + '-mailchimp' })),
|
|
2126
|
-
React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required,
|
|
2127
|
-
// className="lead-modal__form-control leadgen-form_field"
|
|
2128
|
-
key: index, label: placeholder, size: "md", sx: {
|
|
1610
|
+
React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required, className: "lead-modal__form-control", key: index, label: placeholder, size: "md", sx: {
|
|
2129
1611
|
display: 'flex',
|
|
2130
1612
|
flexDirection: 'column',
|
|
2131
|
-
flexWrap: 'wrap',
|
|
2132
1613
|
gap: 8,
|
|
2133
|
-
}, inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
2134
|
-
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
2135
1614
|
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Checkbox, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "checkbox" }))))));
|
|
2136
1615
|
case 'RadioBlock':
|
|
2137
|
-
return (React__default.createElement(
|
|
2138
|
-
isSendMailChimp && (React__default.createElement(Input
|
|
2139
|
-
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required,
|
|
2140
|
-
// className="lead-modal__form-control leadgen-form_field"
|
|
2141
|
-
key: index, label: placeholder, size: "md", inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
2142
|
-
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
2143
|
-
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio" }))))));
|
|
1616
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1617
|
+
isSendMailChimp && (React__default.createElement(Input, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
|
|
1618
|
+
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required, className: "lead-modal__form-control", key: index, label: placeholder, size: "md" }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio" }))))));
|
|
2144
1619
|
case 'DropdownBlock':
|
|
2145
|
-
return (React__default.createElement(
|
|
1620
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
2146
1621
|
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown' }),
|
|
2147
|
-
React__default.createElement(Select, Object.assign({ key: index,
|
|
2148
|
-
// className="lead-modal__form-control leadgen-form_field"
|
|
2149
|
-
label: placeholder, placeholder: placeholder, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
|
|
1622
|
+
React__default.createElement(Select, Object.assign({ key: index, className: "lead-modal__form-control", label: placeholder, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
|
|
2150
1623
|
value: l.value,
|
|
2151
1624
|
label: l.placeholder,
|
|
2152
1625
|
})) }, form.getInputProps(value)))));
|
|
2153
1626
|
case 'TncBlock':
|
|
2154
|
-
const
|
|
2155
|
-
return (React__default.createElement(
|
|
2156
|
-
React__default.createElement(
|
|
2157
|
-
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + b.id, key: b.id, label: React__default.createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: data.valueHTML } }), className: "tnc-block", "data-control": "checkbox" }, tncInputProps)))));
|
|
1627
|
+
const tncInputProps = form.getInputProps('TNC-' + b.id);
|
|
1628
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1629
|
+
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 }))));
|
|
2158
1630
|
}
|
|
2159
1631
|
return null;
|
|
2160
1632
|
})));
|
|
@@ -2285,27 +1757,169 @@ const OtpBlock = ({ otpData, onSuccess, autoSendWhenOpen, }) => {
|
|
|
2285
1757
|
})))));
|
|
2286
1758
|
};
|
|
2287
1759
|
|
|
2288
|
-
const
|
|
2289
|
-
const {
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
React__default.createElement("
|
|
1760
|
+
const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkNewTab, linkText, image, }) => {
|
|
1761
|
+
const { width: imageWidth, height: imageHeight, loaded: imageLoaded, } = useImageSize(image);
|
|
1762
|
+
if (!imageLoaded)
|
|
1763
|
+
return null;
|
|
1764
|
+
return (React__default.createElement("div", { className: "lead-modal__thank-you" },
|
|
1765
|
+
React__default.createElement("div", { style: { width: '100%' } },
|
|
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')))));
|
|
2294
1906
|
};
|
|
2295
1907
|
|
|
2296
1908
|
// url: imageBlocks.imageMobile.data.url
|
|
2297
1909
|
// newTab: imageBlocks.imageMobile.data.newtab
|
|
2298
1910
|
// image: campaignShow.image
|
|
2299
1911
|
// imageDestkop: campaignShow.image_desktop
|
|
2300
|
-
const
|
|
2301
|
-
const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, showThankyou, campaignId, campaign_subot_id, locale, showEmpty, setShowEmpty, }) => {
|
|
1912
|
+
const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, showThankyou, campaignId, campaign_subot_id, locale, }) => {
|
|
2302
1913
|
var _a, _b, _c;
|
|
2303
|
-
const
|
|
2304
|
-
const
|
|
2305
|
-
const
|
|
1914
|
+
const listBlockAdded = JSON.parse(extraFields.listBlockAdded);
|
|
1915
|
+
const actionBlocks = JSON.parse(extraFields.actionBlocks);
|
|
1916
|
+
const textBlocks = JSON.parse(extraFields.textBlocks);
|
|
1917
|
+
const popUpSubmitText = actionBlocks.submitBlock.data.value;
|
|
1918
|
+
const currentPath = location.pathname;
|
|
1919
|
+
const isInPage = currentLayout.includes('Inline') || currentLayout === 'Sidebar';
|
|
1920
|
+
const isSlider = currentLayout === 'Slider';
|
|
2306
1921
|
const [showOtpPhone, setShowOtpPhone] = useState(null);
|
|
2307
1922
|
const [isSubmitLoading, setIsSubmitLoading] = useState(false);
|
|
2308
|
-
const [snap, setSnap] = useState(0.8);
|
|
2309
1923
|
const formRef = useRef();
|
|
2310
1924
|
const onClose = () => {
|
|
2311
1925
|
if (showOtpPhone) {
|
|
@@ -2315,35 +1929,6 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
2315
1929
|
onCloseProp === null || onCloseProp === void 0 ? void 0 : onCloseProp();
|
|
2316
1930
|
}
|
|
2317
1931
|
};
|
|
2318
|
-
const listBlockAdded = JSON.parse(extraFields.listBlockAdded);
|
|
2319
|
-
const actionBlocks = JSON.parse(extraFields.actionBlocks);
|
|
2320
|
-
const textBlocks = JSON.parse(extraFields.textBlocks);
|
|
2321
|
-
const popUpSubmitText = actionBlocks.submitBlock.data.value;
|
|
2322
|
-
const currentPath = location.pathname;
|
|
2323
|
-
const isInPage = currentLayout.includes('Inline') || currentLayout === 'Sidebar';
|
|
2324
|
-
const isSlider = currentLayout === 'Slider';
|
|
2325
|
-
const isDrawer = currentLayout.includes('LightBoxB') && isMobile;
|
|
2326
|
-
const isLightBox = currentLayout.includes('LightBox');
|
|
2327
|
-
const isSmallLightBoxB = currentLayout === 'LightBoxB' &&
|
|
2328
|
-
listBlockAdded.length <= LEADGEN_LIMIT_LIGHTBOXB;
|
|
2329
|
-
const isShowHeader = showOtpPhone || !!imageMobile || !!imageDesktop;
|
|
2330
|
-
const isFormSubmit = currentLayout === 'LightBoxA'
|
|
2331
|
-
? listBlockAdded.some((item) => [
|
|
2332
|
-
'TextBlock',
|
|
2333
|
-
'NumberBlock',
|
|
2334
|
-
'DateBlock',
|
|
2335
|
-
'EmailBlock',
|
|
2336
|
-
'PhoneBlock',
|
|
2337
|
-
'PhoneOtpBlock',
|
|
2338
|
-
'WhatsappOtpBlock',
|
|
2339
|
-
'ZaloOtpBlock',
|
|
2340
|
-
'LocationBlock',
|
|
2341
|
-
'RadioBlock',
|
|
2342
|
-
'DropdownBlock',
|
|
2343
|
-
'CheckboxBlock',
|
|
2344
|
-
'TncBlock',
|
|
2345
|
-
].some((k) => k === (item === null || item === void 0 ? void 0 : item.name)))
|
|
2346
|
-
: true;
|
|
2347
1932
|
if (window.innerWidth < 769 &&
|
|
2348
1933
|
['Fullscreen', 'Slider'].includes(currentLayout)) {
|
|
2349
1934
|
console.log('😎 Not show fullscreen, slider on mobile ');
|
|
@@ -2434,134 +2019,83 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
2434
2019
|
})(e);
|
|
2435
2020
|
}, 100);
|
|
2436
2021
|
};
|
|
2437
|
-
const onOpenChange = (_open) => {
|
|
2438
|
-
setOpen(_open);
|
|
2439
|
-
if (!_open) {
|
|
2440
|
-
setTimeout(() => {
|
|
2441
|
-
onClose();
|
|
2442
|
-
}, 250);
|
|
2443
|
-
}
|
|
2444
|
-
};
|
|
2445
2022
|
const { width: imageBackgroundWidth, height: imageBackgroundHeight, loaded: imageBackgroundLoaded, } = useImageSize(imageBackground);
|
|
2446
2023
|
const { width: imageMobileWidth, height: imageMobileHeight, loaded: imageMobileLoaded, } = useImageSize(imageMobile);
|
|
2447
2024
|
const { width: imageDesktopWidth, height: imageDesktopHeight, loaded: imageDesktopLoaded, } = useImageSize(imageDesktop);
|
|
2448
2025
|
const renderAfterImageSizes = imageMobileLoaded &&
|
|
2449
2026
|
imageDesktopLoaded &&
|
|
2450
2027
|
(currentLayout == 'Fullscreen' ? imageBackgroundLoaded : true);
|
|
2451
|
-
const
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
aspectRatio: `${imageDesktopWidth}/${imageDesktopHeight}`,
|
|
2475
|
-
}, src: imageDesktop, alt: "" }))) : null,
|
|
2476
|
-
imageMobile ? (isVideo(imageMobile) ? (React__default.createElement("video", { className: "le-only-mobile lead-modal__image lead-modal-image-cover", muted: true, autoPlay: true, loop: true },
|
|
2477
|
-
React__default.createElement("source", { src: imageMobile, type: "video/mp4" }))) : (React__default.createElement("img", { draggable: "false", className: "le-only-mobile lead-modal__image lead-modal-image-cover", src: imageMobile, alt: "", style: {
|
|
2478
|
-
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2479
|
-
} }))) : null))))));
|
|
2480
|
-
const PopupEmpty = showEmpty && (React__default.createElement("div", { className: "leadgen-empty" },
|
|
2481
|
-
React__default.createElement("div", { className: "leadgen-empty_body" },
|
|
2482
|
-
React__default.createElement("div", { className: "leadgen-empty_wrapper" },
|
|
2483
|
-
React__default.createElement(EmptyIcon, { className: "leadgen-empty_image" }),
|
|
2484
|
-
React__default.createElement("h5", { className: "leadgen-empty_title" }, t('lead.empty.title')))),
|
|
2485
|
-
React__default.createElement("div", { className: "leadgen-empty_footer" },
|
|
2486
|
-
React__default.createElement(Button$2, { onClick: onClose, size: "lg", variant: "default", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_cancel" }, t('lead.empty.cancel')),
|
|
2487
|
-
React__default.createElement(Button$2, { onClick: () => setShowEmpty(false), size: "lg", variant: "filled", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_again" }, t('lead.empty.submitAgain')))));
|
|
2488
|
-
const PopupFormTitle = (React__default.createElement("h2", { title: title, className: clsx(LEAD_CLASS, `lead-modal__title`, `le-text-align-${(_b = textBlocks.titleBlock.data) === null || _b === void 0 ? void 0 : _b.align}`, { 'leadgen-title': isLightBox }) }, title));
|
|
2489
|
-
const PopupFormDescription = (React__default.createElement("p", { title: textBlocks.subtitleBlock.data.value, className: clsx(LEAD_CLASS, `lead-modal__description`, `le-text-align-${(_c = textBlocks.subtitleBlock.data) === null || _c === void 0 ? void 0 : _c.align}`, { 'leadgen-description': isLightBox }) }, textBlocks.subtitleBlock.data.value));
|
|
2490
|
-
const PopupForm = (React__default.createElement(LeadFormProvider, { form: form },
|
|
2491
|
-
React__default.createElement("form", { ref: formRef, className: clsx(`lead-modal__form ${popupId}`, {
|
|
2492
|
-
'leadgen-form': isLightBox,
|
|
2493
|
-
}), onSubmit: middlewareOnSubmit },
|
|
2494
|
-
React__default.createElement("div", { className: clsx('lead-modal__form-header', {
|
|
2495
|
-
'leadgen-form_header': isLightBox,
|
|
2496
|
-
}) },
|
|
2497
|
-
PopupFormTitle,
|
|
2498
|
-
PopupFormDescription),
|
|
2499
|
-
React__default.createElement("div", { className: clsx('lead-modal__form-control-wrapper', {
|
|
2500
|
-
'leadgen-form_body': isLightBox,
|
|
2501
|
-
}), "data-hidden": !isFormSubmit },
|
|
2502
|
-
React__default.createElement("div", { className: "leadgen-form_inner" },
|
|
2503
|
-
React__default.createElement(LightboxFields, { listBlockAdded: listBlockAdded, popupId: popupId, locale: locale, onClose: onClose, onOtherSubmit: onOtherSubmit }))),
|
|
2504
|
-
React__default.createElement("div", { className: "leadgen-form_footer" }, isFormSubmit ? ButtonSubmit : ButtonLink))));
|
|
2505
|
-
const PopupThankYou = showThankyou && (React__default.createElement(ThankyouPopup, { title: showThankyou.title, titleAlign: showThankyou.titleAlign, subtitle: showThankyou.subtitle, subtitleAlign: showThankyou.subtitleAlign, link: showThankyou.link, linkNewTab: showThankyou.linkNewTab, linkText: showThankyou.linkText, image: showThankyou.image }));
|
|
2506
|
-
const popupContentClassName = clsx('lead-modal__content', `le-newbuilder-${currentLayout}`, 'leadPopupContent', { 'leadgen-content': isLightBox });
|
|
2507
|
-
const PopupContent = (React__default.createElement("div", { className: popupContentClassName },
|
|
2508
|
-
PopupHeader,
|
|
2509
|
-
React__default.createElement("div", { className: "leadgen-inner" },
|
|
2510
|
-
PopupThankYou,
|
|
2511
|
-
!showThankyou && (React__default.createElement(React__default.Fragment, null,
|
|
2512
|
-
showOtpPhone && (React__default.createElement(OtpBlock, { otpData: showOtpPhone, autoSendWhenOpen: false, onSuccess: () => {
|
|
2513
|
-
setShowOtpPhone(null);
|
|
2514
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(formRef.current, form.values);
|
|
2515
|
-
} })),
|
|
2516
|
-
showEmpty && PopupEmpty,
|
|
2517
|
-
React__default.createElement("div", { "data-hidden": !!showOtpPhone || !!showEmpty, className: clsx('lead-modal__body le-newbuilder-overlay', {
|
|
2518
|
-
'leadgen-body': isLightBox,
|
|
2519
|
-
}) }, PopupForm))))));
|
|
2520
|
-
const PopupWrapper = (React__default.createElement("div", { className: clsx(`lead-modal__wrapper le-newbuilder-wrap-${currentLayout}`, {
|
|
2521
|
-
'leadgen-wrapper': isLightBox,
|
|
2522
|
-
'leadgen-wrapper_small': isSmallLightBoxB,
|
|
2523
|
-
}) },
|
|
2524
|
-
!currentLayout.includes('Inline') && (React__default.createElement(CloseButton, { onClose: () => onOpenChange(false), containerClassName: clsx('close-button-top-right', {
|
|
2525
|
-
'leadgen-close_btn': isLightBox,
|
|
2526
|
-
}) })),
|
|
2527
|
-
PopupContent));
|
|
2528
|
-
const styleOverlay = useMemo(() => {
|
|
2529
|
-
let styleContent = `.le-newbuilder-overlay {background-repeat: no-repeat;background-size: cover;background-position:center;}`;
|
|
2530
|
-
if (isMobile && imageOverlayMobile) {
|
|
2531
|
-
styleContent += `.le-newbuilder-overlay {background-image: url(${imageOverlayMobile});}`;
|
|
2532
|
-
}
|
|
2533
|
-
if (!isMobile && imageOverlayDesktop) {
|
|
2534
|
-
styleContent += `@media screen and (min-width:768px) {.le-newbuilder-overlay {background-image: url(${imageOverlayDesktop});}}`;
|
|
2535
|
-
}
|
|
2536
|
-
return styleContent;
|
|
2537
|
-
}, [isMobile, imageOverlayDesktop, imageOverlayMobile]);
|
|
2538
|
-
const popupContainerClassName = clsx('lead-modal lead-modal-wrapper modal--animate-scale', `leadgen-${currentLayout}`, {
|
|
2539
|
-
'le-buider-inline': !!isInPage,
|
|
2540
|
-
'le-buider-slider': !!isSlider,
|
|
2541
|
-
leadgen: isLightBox,
|
|
2542
|
-
});
|
|
2543
|
-
const PopupContainer = isDrawer ? (React__default.createElement(DrawerComponent, { open: open, snapPoints: [0.8, 1], activeSnapPoint: snap, setActiveSnapPoint: setSnap, onOpenChange: onOpenChange, overlayClassName: popupContainerClassName, className: "leadgen-drawer" },
|
|
2544
|
-
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: styleOverlay } }),
|
|
2545
|
-
PopupWrapper,
|
|
2546
|
-
React__default.createElement("div", { className: "", style: { position: 'absolute', inset: 0, zIndex: snap === 1 ? -1 : 1 }, onClick: () => setSnap(1) }))) : (React__default.createElement(React__default.Fragment, null,
|
|
2547
|
-
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: styleOverlay } }),
|
|
2548
|
-
React__default.createElement("div", { id: popupId, "data-popup-url": currentPath, "data-popup-type": "lightbox-inline", className: popupContainerClassName },
|
|
2028
|
+
const PopupContent = (React__default.createElement(React__default.Fragment, null,
|
|
2029
|
+
React__default.createElement("style", { dangerouslySetInnerHTML: {
|
|
2030
|
+
__html: `
|
|
2031
|
+
.le-newbuilder-overlay {
|
|
2032
|
+
background-repeat: no-repeat;
|
|
2033
|
+
background-size: cover;
|
|
2034
|
+
}
|
|
2035
|
+
${imageOverlayMobile
|
|
2036
|
+
? `
|
|
2037
|
+
.le-newbuilder-overlay {
|
|
2038
|
+
background: url(${imageOverlayMobile}) ;
|
|
2039
|
+
}`
|
|
2040
|
+
: ``}
|
|
2041
|
+
${imageOverlayDesktop
|
|
2042
|
+
? `
|
|
2043
|
+
@media screen and (min-width:768px) {
|
|
2044
|
+
.le-newbuilder-overlay {
|
|
2045
|
+
background: url(${imageOverlayDesktop}) ;
|
|
2046
|
+
}
|
|
2047
|
+
}`
|
|
2048
|
+
: ``}`,
|
|
2049
|
+
} }),
|
|
2050
|
+
React__default.createElement("div", { id: popupId, "data-popup-url": currentPath, "data-popup-type": "lightbox-inline", className: `lead-modal lead-modal-wrapper modal--animate-scale ${isInPage ? 'le-buider-inline' : ''} ${isSlider ? 'le-buider-slider' : ''}` },
|
|
2549
2051
|
currentLayout == 'Fullscreen' ? (React__default.createElement("img", { className: "le-only-desktop le-fullscreen-img", draggable: false, src: imageBackground || '', style: {
|
|
2550
2052
|
aspectRatio: `${imageBackgroundWidth}/${imageBackgroundHeight}`,
|
|
2551
2053
|
} })) : null,
|
|
2552
|
-
|
|
2054
|
+
React__default.createElement("div", { className: `lead-modal__wrapper le-newbuilder-wrap-${currentLayout}` },
|
|
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" }))))));
|
|
2553
2087
|
if (!renderAfterImageSizes)
|
|
2554
2088
|
return null;
|
|
2555
2089
|
if (currentLayout.includes('LightBox') ||
|
|
2556
2090
|
currentLayout == 'Fullscreen' ||
|
|
2557
2091
|
currentLayout == 'Slider') {
|
|
2558
|
-
return
|
|
2092
|
+
return PopupContent;
|
|
2559
2093
|
}
|
|
2560
2094
|
else if (currentLayout == 'Sidebar') {
|
|
2561
|
-
return React__default.createElement(SideBarLayout, { content:
|
|
2095
|
+
return React__default.createElement(SideBarLayout, { content: PopupContent });
|
|
2562
2096
|
}
|
|
2563
2097
|
else if (currentLayout.includes('Inline')) {
|
|
2564
|
-
return (React__default.createElement(InlineLayout, { content:
|
|
2098
|
+
return (React__default.createElement(InlineLayout, { content: PopupContent, inlinePosition: extraFields.popupInlinePosition }));
|
|
2565
2099
|
}
|
|
2566
2100
|
return null;
|
|
2567
2101
|
};
|
|
@@ -3006,7 +2540,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
|
|
|
3006
2540
|
return null;
|
|
3007
2541
|
}
|
|
3008
2542
|
}
|
|
3009
|
-
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, locale,
|
|
2543
|
+
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, locale, }) => {
|
|
3010
2544
|
var _a, _b;
|
|
3011
2545
|
const { apiUrl, siteDomain } = useContext(LeadGenContext);
|
|
3012
2546
|
useEffect(() => {
|
|
@@ -3125,7 +2659,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, showThankyou, local
|
|
|
3125
2659
|
currentLayout == 'Fullscreen' ||
|
|
3126
2660
|
currentLayout == 'Sidebar' ||
|
|
3127
2661
|
currentLayout == 'Slider') {
|
|
3128
|
-
return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (form, values) => onSubmit(form, values, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaign_subot_id: campaign.bot_id || [], locale: locale
|
|
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 }));
|
|
3129
2663
|
}
|
|
3130
2664
|
else if (currentLayout.includes('Skin')) {
|
|
3131
2665
|
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 }));
|
|
@@ -3150,7 +2684,6 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
3150
2684
|
const [showCampaign, setShowCampaign] = useState(forceCampaign);
|
|
3151
2685
|
const [action, setAction] = useState('');
|
|
3152
2686
|
const [showThankyou, setShowThankyou] = useState(null);
|
|
3153
|
-
const [showEmpty, setShowEmpty] = useState(false);
|
|
3154
2687
|
useEffect(() => {
|
|
3155
2688
|
if (forceCampaign) {
|
|
3156
2689
|
setShowCampaign(forceCampaign);
|
|
@@ -3166,11 +2699,6 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
3166
2699
|
setShowCampaign(campaign);
|
|
3167
2700
|
setAction(action);
|
|
3168
2701
|
};
|
|
3169
|
-
const onCloseBase = () => {
|
|
3170
|
-
document.body.classList.remove('noscroll');
|
|
3171
|
-
setShowCampaign(null);
|
|
3172
|
-
setShowThankyou(null);
|
|
3173
|
-
};
|
|
3174
2702
|
const onClose = () => {
|
|
3175
2703
|
var _a, _b;
|
|
3176
2704
|
if (!showCampaign)
|
|
@@ -3188,6 +2716,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
3188
2716
|
}
|
|
3189
2717
|
}
|
|
3190
2718
|
}
|
|
2719
|
+
document.body.classList.remove('noscroll');
|
|
3191
2720
|
fetch(`${apiUrl}api/campaign/${showCampaign.code}/popup_exit`, {
|
|
3192
2721
|
method: 'POST',
|
|
3193
2722
|
headers: {
|
|
@@ -3201,7 +2730,8 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
3201
2730
|
duration: Math.ceil((Date.now() - leadStartTimeRef.current) / 1000),
|
|
3202
2731
|
}),
|
|
3203
2732
|
});
|
|
3204
|
-
|
|
2733
|
+
setShowCampaign(null);
|
|
2734
|
+
setShowThankyou(null);
|
|
3205
2735
|
}; //
|
|
3206
2736
|
useEffect(() => {
|
|
3207
2737
|
if (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code)
|
|
@@ -3243,10 +2773,8 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
3243
2773
|
}, []);
|
|
3244
2774
|
const onSubmit = (currentForm, formDataObj, categoryLevel, categoryData) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3245
2775
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
3246
|
-
if (!formDataObj
|
|
3247
|
-
setShowEmpty(true);
|
|
2776
|
+
if (!formDataObj)
|
|
3248
2777
|
return;
|
|
3249
|
-
}
|
|
3250
2778
|
LeadLog('submitHandler', categoryLevel, categoryData);
|
|
3251
2779
|
const formData = Object.keys(formDataObj)
|
|
3252
2780
|
.filter((key) => !!formDataObj[key])
|
|
@@ -3254,7 +2782,6 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
3254
2782
|
name: key,
|
|
3255
2783
|
value: String(formDataObj[key]),
|
|
3256
2784
|
}));
|
|
3257
|
-
console.log('** RYAN index.tsx 218 formData : ', formData);
|
|
3258
2785
|
const numberFormatType = 2; // i18n.phonenumbers.PhoneNumberFormat.NATIONAL
|
|
3259
2786
|
// Get ga_client_id from cookies
|
|
3260
2787
|
const gaCookie = getCookie('_ga') || null;
|
|
@@ -3402,15 +2929,18 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
3402
2929
|
}
|
|
3403
2930
|
}, [showCampaign]);
|
|
3404
2931
|
return (React__default.createElement(LeadGenContext.Provider, { value: { apiUrl, siteDomain, siteId, locale } },
|
|
3405
|
-
React__default.createElement(TranslationsContext.Provider, { value: {
|
|
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() },
|
|
3406
2936
|
React__default.createElement(Box, { sx: { position: 'fixed', zIndex: ZINDEX_SSO - 9e6 } },
|
|
3407
2937
|
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) => {
|
|
3408
2938
|
var _a;
|
|
3409
2939
|
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,
|
|
3410
2940
|
!!showCampaign.extra_fields.currentLayout &&
|
|
3411
2941
|
!showCampaign.extra_fields.currentLayout.includes('Inline') &&
|
|
3412
|
-
!showCampaign.extra_fields.currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.
|
|
3413
|
-
React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, locale: locale
|
|
2942
|
+
!showCampaign.extra_fields.currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.5, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
|
|
2943
|
+
React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, locale: locale })))));
|
|
3414
2944
|
})))))));
|
|
3415
2945
|
};
|
|
3416
2946
|
const LeadGen = _LeadGen;
|