@hhgtech/hhg-components 1.29.367-beta-10 → 1.29.368
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{InputDate-d62979c2.js → InputDate-be1dc001.js} +20 -20
- package/build/{LastPeriod-e2f820cf.js → LastPeriod-2f220ba7.js} +1 -1
- package/build/{Locale-84809586.js → Locale-3aef42b0.js} +0 -1
- package/build/{MobileBottomNavigationIcon-f66f283b.js → MobileBottomNavigationIcon-d5a79945.js} +3 -3
- package/build/{Spinner-60a9022d.js → Spinner-113cf810.js} +1 -1
- package/build/{WhatsApp-0ca331b9.js → WhatsApp-d21c0ab7.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +48 -48
- package/build/babyGrowth.js +83 -83
- package/build/cache.js +2 -2
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components/atoms/logo/index.d.ts +1 -1
- package/build/components/mantine/phone/index.d.ts +0 -2
- package/build/components.js +96 -96
- package/build/{constants-a41ccf75.js → constants-60e88ec3.js} +0 -1
- package/build/{constants-8ec95641.js → constants-dfcbc36b.js} +1 -1
- package/build/constants.js +3 -3
- package/build/constantsDomainLocales.js +1 -3
- package/build/constantsRiskScreener.js +2 -2
- package/build/constantsSite.js +2 -2
- package/build/{core-7e67a00c.js → core-e895bdb2.js} +1 -1
- package/build/{dataTransform-626b1ab5.js → dataTransform-cf82811f.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-03353372.js → editor-b4293c16.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{InputDate-02be7591.js → InputDate-af3d5a1e.js} +20 -20
- package/build/esm/{LastPeriod-649be75b.js → LastPeriod-45d826ee.js} +1 -1
- package/build/esm/{Locale-104cb3a6.js → Locale-a5908a68.js} +0 -1
- package/build/esm/{MobileBottomNavigationIcon-35d1dac2.js → MobileBottomNavigationIcon-d5d450e7.js} +3 -3
- package/build/esm/{Spinner-f2284935.js → Spinner-256d6227.js} +1 -1
- package/build/esm/{WhatsApp-c8491248.js → WhatsApp-4a266384.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +48 -48
- package/build/esm/babyGrowth.js +83 -83
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/atoms/logo/index.d.ts +1 -1
- package/build/esm/components/mantine/phone/index.d.ts +0 -2
- package/build/esm/components.js +96 -96
- package/build/esm/{constants-e4dbc20a.js → constants-4d82bfed.js} +1 -1
- package/build/esm/{constants-621c97ad.js → constants-b8a13e0c.js} +0 -1
- package/build/esm/constants.js +3 -3
- package/build/esm/constantsDomainLocales.js +1 -3
- package/build/esm/constantsRiskScreener.js +2 -2
- package/build/esm/constantsSite.js +2 -2
- package/build/esm/{core-edc7f18a.js → core-d9dedfa0.js} +1 -1
- package/build/esm/{dataTransform-fefd13a1.js → dataTransform-de22b61d.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-cc9307fb.js → editor-486ec10a.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/footer.js +21 -21
- package/build/esm/gAssets.js +2 -2
- package/build/esm/{healthTools-ee17c553.js → healthTools-ddea3042.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +18 -18
- package/build/esm/healthToolsForm.js +33 -33
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n.js +2 -3
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-bb48660e.js → index-05a1028c.js} +21 -21
- package/build/esm/{index-bdb5c27e.js → index-084a173b.js} +25 -25
- package/build/esm/{index-f1a5b73d.js → index-0b74f3b9.js} +32 -35
- package/build/esm/{index-e469d137.js → index-0b87c8b0.js} +6 -6
- package/build/esm/{index-7c8ba8fe.js → index-0c29ede4.js} +32 -32
- package/build/esm/{index-4cfae667.js → index-0e107b33.js} +1 -1
- package/build/esm/{index-9ee67319.js → index-15c86709.js} +13 -13
- package/build/esm/{index-cce0834a.js → index-176d5c0a.js} +3 -3
- package/build/esm/{index-a2028d87.js → index-246d79ba.js} +7 -7
- package/build/esm/{index-17ec10f3.js → index-253c497b.js} +7 -7
- package/build/esm/{index-9b88e0e2.js → index-25a83e10.js} +17 -17
- package/build/esm/{index-7b9c82a9.js → index-2f129196.js} +4 -4
- package/build/esm/{index-0fc9f096.js → index-2f834f3b.js} +15 -15
- package/build/esm/{index-c3a89410.js → index-31f9a634.js} +18 -18
- package/build/esm/{index-15bc9ee2.js → index-33bd3ea8.js} +18 -18
- package/build/esm/{index-79a7c471.js → index-33d35ee2.js} +2 -2
- package/build/esm/{index-00c626df.js → index-3bfef95e.js} +2 -2
- package/build/esm/{index-aa51729b.js → index-3d3825cc.js} +27 -36
- package/build/esm/{index-0ba1b8b4.js → index-40297052.js} +2 -2
- package/build/esm/{index-113d634d.js → index-41180fb2.js} +13 -13
- package/build/esm/{index-95cb8697.js → index-41ea5ef1.js} +2 -2
- package/build/esm/{index-7c62102b.js → index-4293abfc.js} +3 -3
- package/build/esm/{index-c2696041.js → index-42dd310a.js} +2 -2
- package/build/esm/{index-314741bf.js → index-435dfcc8.js} +3 -3
- package/build/esm/{index-8b080321.js → index-48fcb87d.js} +22 -22
- package/build/esm/{index-68e04e35.js → index-4c9256f4.js} +1 -1
- package/build/esm/{index-628cc44d.js → index-5356a1bf.js} +1 -1
- package/build/esm/{index-e7176020.js → index-58b54ff1.js} +2 -2
- package/build/esm/{index-5ee9cfd6.js → index-5be36e04.js} +1 -1
- package/build/esm/{index-6632a216.js → index-5f5380b1.js} +31 -31
- package/build/esm/{index-9b45406c.js → index-5f5eaee7.js} +16 -16
- package/build/esm/{index-a436e100.js → index-606012e8.js} +2 -2
- package/build/esm/{index-7e84c3e5.js → index-63a4030a.js} +17 -17
- package/build/esm/{index-034ef577.js → index-675b614e.js} +6 -6
- package/build/esm/{index-976ddcd3.js → index-73ee66f0.js} +3 -3
- package/build/esm/{index-648ae6bb.js → index-84a708c5.js} +3 -3
- package/build/esm/{index-2c7321c9.js → index-94758277.js} +13 -13
- package/build/esm/{index-98600b14.js → index-96127754.js} +13 -13
- package/build/esm/{index-bf6b67d8.js → index-9c3124e0.js} +6 -6
- package/build/esm/{index-38866c7c.js → index-9df141a8.js} +2 -39
- package/build/esm/{index-3d7c3359.js → index-9df6e950.js} +17 -17
- package/build/esm/{index-6e2d578d.js → index-9eb38283.js} +16 -16
- package/build/esm/{index-08cec122.js → index-a07d2f53.js} +2 -2
- package/build/esm/{index-5a88d1c1.js → index-a1a6f241.js} +2 -2
- package/build/esm/{index-34dd52fe.js → index-a26d9143.js} +5 -5
- package/build/esm/{index-f8711e1f.js → index-a3147663.js} +5 -5
- package/build/esm/{index-1910aebc.js → index-add7a289.js} +2 -2
- package/build/esm/{index-baa6f7e0.js → index-ae5a89fa.js} +10 -10
- package/build/esm/{index-4ace81e6.js → index-afcd3f02.js} +3 -3
- package/build/esm/{index-eea8eb49.js → index-b051f29b.js} +1 -1
- package/build/esm/{index-9d597466.js → index-b96e6061.js} +1 -1
- package/build/esm/{index-9cb4a89e.js → index-bc2b1672.js} +16 -16
- package/build/esm/{index-65d01b72.js → index-c62287a6.js} +24 -24
- package/build/esm/{index-3b00aaf3.js → index-cbbd9e13.js} +8 -8
- package/build/esm/{index-4b17007d.js → index-d01f9d3e.js} +1 -1
- package/build/esm/{index-bfcf72e2.js → index-d3b0ff0e.js} +1 -1
- package/build/esm/{index-40c94086.js → index-d66259a3.js} +6 -6
- package/build/esm/{index-23b1c86e.js → index-d9b56281.js} +2 -2
- package/build/esm/{index-01192772.js → index-e0180027.js} +1 -1
- package/build/esm/{index-4a26c8fa.js → index-e1610248.js} +2 -2
- package/build/esm/{index-d0c37589.js → index-e9819034.js} +6 -6
- package/build/esm/{index-3c5106d5.js → index-ed0598da.js} +16 -16
- package/build/esm/{index-c11116a3.js → index-f6fcfa9a.js} +17 -17
- package/build/esm/{index-ded67352.js → index-f943299e.js} +2 -2
- package/build/esm/index.js +117 -117
- package/build/esm/interfaces/constants/domainLocales.d.ts +0 -2
- package/build/esm/interfaces/constants/index.d.ts +1 -1
- package/build/esm/interfaces/types/Locale.d.ts +1 -2
- package/build/esm/interfaces/types/index.d.ts +1 -1
- package/build/esm/{labelSorting-3d03e31a.js → labelSorting-711a22ec.js} +4 -4
- package/build/esm/lead/helpers.d.ts +1 -51
- package/build/esm/lead/index.d.ts +1 -2
- package/build/esm/lead/layouts/lightbox/formContext.d.ts +1 -2
- package/build/esm/lead/services/index.d.ts +0 -14
- package/build/esm/lead.css +1 -1
- package/build/esm/lead.js +301 -1302
- package/build/esm/{logoIcon-4726b686.js → logoIcon-ca2abc51.js} +2 -8
- package/build/esm/mantine.js +25 -25
- package/build/esm/misc.js +17 -17
- package/build/esm/miscGetDynamicHealthTool.js +4 -4
- package/build/esm/miscGetSocialList.js +8 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +73 -73
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +16 -16
- package/build/esm/navigation.js +45 -45
- 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 +49 -49
- package/build/esm/{post-fa48da76.js → post-df86ade2.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 +39 -51
- package/build/esm/{store-d2d2fb54.js → store-a7a04a9b.js} +4 -4
- package/build/esm/subot.js +35 -35
- package/build/esm/surveyOrPremiumBanner.js +32 -32
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-cd42ce13.js → surveyThankyouCard-55f86ae1.js} +5 -5
- package/build/esm/together.js +55 -55
- 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 +50 -50
- package/build/esm/togetherMoleculesCardAuthor.js +28 -28
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +38 -38
- package/build/esm/togetherOrganisms.js +49 -49
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{treePopoverMenu-5fda21fe.js → treePopoverMenu-ad91b608.js} +19 -19
- package/build/esm/{types-8e1b82b6.js → types-939612d0.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-65219b49.js → useCategory-702d1e8a.js} +5 -18
- package/build/esm/{useHealthToolCache-22a17402.js → useHealthToolCache-4b1e5e9e.js} +1 -1
- package/build/esm/{useMantineLocale-b2b06639.js → useMantineLocale-4fde4c36.js} +6 -8
- package/build/esm/{usePlacesAutocomplete-c1728643.js → usePlacesAutocomplete-51af42e6.js} +1 -1
- package/build/esm/{useScreenSize-69526e53.js → useScreenSize-be6b7d68.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-54b3a2ff.js → utils-1abba51b.js} +2 -2
- package/build/esm/{utils-f7ef46fb.js → utils-1c5980e6.js} +3 -3
- package/build/esm/{utils-defbbac3.js → utils-29f6b7ff.js} +2 -2
- package/build/esm/{utils-9e621314.js → utils-fa4b2496.js} +4 -4
- package/build/esm/vaccination.js +21 -21
- package/build/footer.js +21 -21
- package/build/gAssets.js +2 -2
- package/build/{healthTools-a6a33ad3.js → healthTools-67e51fc9.js} +1 -1
- package/build/healthToolsCardWrapper.js +18 -18
- package/build/healthToolsForm.js +33 -33
- package/build/hooks.js +13 -13
- package/build/i18n.js +1 -2
- package/build/i18nV2.js +1 -1
- package/build/{index-818782e1.js → index-04eccea0.js} +15 -15
- package/build/{index-001d3874.js → index-06da62f4.js} +24 -24
- package/build/{index-bb80b459.js → index-0765f5cd.js} +6 -6
- package/build/{index-9f02d655.js → index-12991f60.js} +13 -13
- package/build/{index-17f0a38e.js → index-129f8aa9.js} +1 -1
- package/build/{index-89233a3c.js → index-13865828.js} +1 -1
- package/build/{index-561cb371.js → index-19820815.js} +3 -3
- package/build/{index-8a351066.js → index-198257c9.js} +22 -22
- package/build/{index-60fd8bd2.js → index-1c88be63.js} +1 -1
- package/build/{index-3ee4314f.js → index-1eae9e09.js} +6 -6
- package/build/{index-406ce729.js → index-24ae2258.js} +32 -32
- package/build/{index-bcebac5e.js → index-24ccd6f7.js} +31 -31
- package/build/{index-dbe7777a.js → index-2621938e.js} +18 -18
- package/build/{index-f901ca22.js → index-2635cdfd.js} +18 -18
- package/build/{index-294a2c25.js → index-292b2156.js} +1 -1
- package/build/{index-3fe5a148.js → index-2a585f29.js} +17 -17
- package/build/{index-e2c4f81f.js → index-2c59162a.js} +25 -25
- package/build/{index-4a00c8c4.js → index-30cf345c.js} +8 -8
- package/build/{index-bbbeff44.js → index-3611c96a.js} +6 -6
- package/build/{index-35b40257.js → index-399c0e5b.js} +1 -1
- package/build/{index-31c2a69d.js → index-3a75dbb5.js} +2 -2
- package/build/{index-90fd0e8b.js → index-3bdede97.js} +3 -3
- package/build/{index-0c829c49.js → index-3f1b11bd.js} +2 -2
- package/build/{index-7429051e.js → index-4056613d.js} +7 -7
- package/build/{index-94d19bb2.js → index-470da8df.js} +17 -17
- package/build/{index-565bc9b1.js → index-4b5bfa8f.js} +2 -2
- package/build/{index-3c5857d5.js → index-4b9ef079.js} +2 -2
- package/build/{index-cc97c27c.js → index-4df84569.js} +13 -13
- package/build/{index-4edeca2c.js → index-50f07e61.js} +3 -3
- package/build/{index-c3d17717.js → index-5a1e4ac8.js} +13 -13
- package/build/{index-c7e26110.js → index-5fbcbca4.js} +16 -16
- package/build/{index-076865e9.js → index-5fccd4da.js} +2 -2
- package/build/{index-cc00a964.js → index-611e4775.js} +2 -2
- package/build/{index-cd0d043c.js → index-6678a2b2.js} +10 -10
- package/build/{index-d05a1c3d.js → index-73128bc1.js} +6 -6
- package/build/{index-ff2d0446.js → index-75893f6a.js} +3 -3
- package/build/{index-354972d0.js → index-75ddd9ae.js} +6 -6
- package/build/{index-dfbec759.js → index-86574f22.js} +21 -21
- package/build/{index-9a6c88b2.js → index-8734dc17.js} +2 -2
- package/build/{index-c381afc3.js → index-88504943.js} +1 -1
- package/build/{index-3ec32e0c.js → index-88b77596.js} +2 -2
- package/build/{index-1dba25ee.js → index-8b7d6e0b.js} +1 -1
- package/build/{index-599a3f4c.js → index-8c98551d.js} +16 -16
- package/build/{index-4d055c70.js → index-8e5a6b6b.js} +16 -16
- package/build/{index-f3c6a750.js → index-94beb0e2.js} +2 -2
- package/build/{index-160a489c.js → index-95dec080.js} +7 -7
- package/build/{index-a6e2bf56.js → index-96b5ea35.js} +16 -16
- package/build/{index-ed4f0332.js → index-99047c91.js} +4 -4
- package/build/{index-08981efe.js → index-a0adfade.js} +1 -1
- package/build/{index-3381cfa0.js → index-a177c22e.js} +32 -35
- package/build/{index-f3098a4e.js → index-ac46984d.js} +3 -3
- package/build/{index-f1a21215.js → index-b1185763.js} +2 -2
- package/build/{index-40fa574d.js → index-b171abc1.js} +5 -5
- package/build/{index-14f396d7.js → index-b8aa313b.js} +17 -17
- package/build/{index-d4ca1d77.js → index-be58aaf0.js} +3 -3
- package/build/{index-ceba22d1.js → index-c4a0fed3.js} +1 -1
- package/build/{index-2c79fbff.js → index-d90d19c7.js} +2 -2
- package/build/{index-1973d0c7.js → index-df7e968f.js} +13 -13
- package/build/{index-45c56852.js → index-e984e334.js} +17 -17
- package/build/{index-3827e6ad.js → index-e9ed2f96.js} +2 -39
- package/build/{index-28f78e80.js → index-f04ab939.js} +2 -2
- package/build/{index-727dd3c1.js → index-f564bae2.js} +27 -36
- package/build/{index-2c973f1d.js → index-f6320dd1.js} +5 -5
- package/build/{index-56693d86.js → index-fc0f451f.js} +2 -2
- package/build/index.js +117 -117
- package/build/interfaces/constants/domainLocales.d.ts +0 -2
- package/build/interfaces/constants/index.d.ts +1 -1
- package/build/interfaces/types/Locale.d.ts +1 -2
- package/build/interfaces/types/index.d.ts +1 -1
- package/build/{labelSorting-012a8b0e.js → labelSorting-a4cccac0.js} +4 -4
- package/build/lead/helpers.d.ts +1 -51
- package/build/lead/index.d.ts +1 -2
- package/build/lead/layouts/lightbox/formContext.d.ts +1 -2
- package/build/lead/services/index.d.ts +0 -14
- package/build/lead.css +1 -1
- package/build/lead.js +303 -1305
- package/build/{logoIcon-9333c01a.js → logoIcon-2b21dc46.js} +2 -8
- package/build/mantine.js +22 -22
- package/build/misc.js +17 -17
- package/build/miscGetDynamicHealthTool.js +4 -4
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +73 -73
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +16 -16
- package/build/navigation.js +45 -45
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +23 -23
- package/build/onboardingV2.js +28 -28
- package/build/organisms.js +49 -49
- package/build/{post-65f7b246.js → post-0fe72c61.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 +37 -49
- package/build/{store-226ae5da.js → store-512b1b33.js} +4 -4
- package/build/subot.js +34 -34
- package/build/surveyOrPremiumBanner.js +32 -32
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-115eb622.js → surveyThankyouCard-88204035.js} +5 -5
- package/build/together.js +55 -55
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +50 -50
- package/build/togetherMoleculesCardAuthor.js +28 -28
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +38 -38
- package/build/togetherOrganisms.js +49 -49
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +10 -10
- package/build/{treePopoverMenu-6294dfc9.js → treePopoverMenu-8b2f7268.js} +19 -19
- package/build/{types-1b103663.js → types-ea3372eb.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-cde208e3.js → useCategory-c1f18276.js} +5 -18
- package/build/{useHealthToolCache-5baf52f2.js → useHealthToolCache-2df0c7e0.js} +1 -1
- package/build/{useMantineLocale-02d507b8.js → useMantineLocale-d43d68ce.js} +6 -8
- package/build/{usePlacesAutocomplete-5a712ffe.js → usePlacesAutocomplete-4eb987b3.js} +1 -1
- package/build/{useScreenSize-437f8c08.js → useScreenSize-db2f3452.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-5155768d.js → utils-0285c544.js} +2 -2
- package/build/{utils-d00e54a8.js → utils-599fbb30.js} +2 -2
- package/build/{utils-8c3356aa.js → utils-b1338f2e.js} +4 -4
- package/build/{utils-ea7edd52.js → utils-c56d69da.js} +3 -3
- package/build/vaccination.js +21 -21
- package/package.json +3 -3
- package/build/components/mantine/phoneInput/PhoneInput.d.ts +0 -17
- package/build/components/mantine/phoneInput/index.d.ts +0 -1
- package/build/esm/components/mantine/phoneInput/PhoneInput.d.ts +0 -17
- package/build/esm/components/mantine/phoneInput/index.d.ts +0 -1
- package/build/esm/i18n-values/zh-CN.js +0 -855
- package/build/esm/lead/LeadGenForm/LeadGenForm.d.ts +0 -41
- package/build/esm/lead/LeadGenForm/LeadGenForm.styled.d.ts +0 -5
- package/build/esm/lead/LeadGenForm/LeadGenFormPhone.d.ts +0 -17
- package/build/esm/lead/LeadGenForm/LeadGenThankYou.d.ts +0 -20
- package/build/esm/lead/LeadGenForm/index.d.ts +0 -3
- package/build/esm/lead/LeadGenForm/textField/index.d.ts +0 -13
- package/build/esm/lead/LeadGenForm/textField/index.styled.d.ts +0 -11
- package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +0 -25
- package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContext.d.ts +0 -25
- package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxWrapper.d.ts +0 -30
- package/build/esm/lead/LeadGenSubscriptionBox/index.d.ts +0 -1
- package/build/i18n-values/zh-CN.js +0 -866
- package/build/lead/LeadGenForm/LeadGenForm.d.ts +0 -41
- package/build/lead/LeadGenForm/LeadGenForm.styled.d.ts +0 -5
- package/build/lead/LeadGenForm/LeadGenFormPhone.d.ts +0 -17
- package/build/lead/LeadGenForm/LeadGenThankYou.d.ts +0 -20
- package/build/lead/LeadGenForm/index.d.ts +0 -3
- package/build/lead/LeadGenForm/textField/index.d.ts +0 -13
- package/build/lead/LeadGenForm/textField/index.styled.d.ts +0 -11
- package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +0 -25
- package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContext.d.ts +0 -25
- package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxWrapper.d.ts +0 -30
- package/build/lead/LeadGenSubscriptionBox/index.d.ts +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-1c03e5de.js → BMI_BOYS.percentile.monthly-946a69c0.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-e1b19e2c.js → BMI_BOYS.percentile.weekly-4b0666ce.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-4f0c2339.js → BMI_BOYS.percentile.yearly-a90aef0a.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-33f8c49c.js → BMI_BOYS.zscore.monthly-cca60c2b.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-bc36c344.js → BMI_BOYS.zscore.weekly-bc217502.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-e734ff41.js → BMI_BOYS.zscore.yearly-3ffa38eb.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-64cd3aa1.js → BMI_GIRLS.percentile.monthly-91fb7610.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-353a5941.js → BMI_GIRLS.percentile.weekly-d776ab1c.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-edecdb39.js → BMI_GIRLS.percentile.yearly-60887244.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-e1c7ad70.js → BMI_GIRLS.zscore.monthly-0af84e55.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-663152ce.js → BMI_GIRLS.zscore.weekly-42f97193.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-432d9d0a.js → BMI_GIRLS.zscore.yearly-0411c340.js} +0 -0
- /package/build/{ChevronDown-d10a2672.js → ChevronDown-db27561b.js} +0 -0
- /package/build/{Close-32efb719.js → Close-67f76f33.js} +0 -0
- /package/build/{Google-7df040a3.js → Google-018fc1d6.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-8e9b4884.js → HEAD CIRCUM_BOYS.percentile.monthly-70f724db.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-9c3477c7.js → HEAD CIRCUM_BOYS.percentile.weekly-a4d9adb8.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-36025f3e.js → HEAD CIRCUM_BOYS.percentile.yearly-dbc1d833.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-fd126b5f.js → HEAD CIRCUM_BOYS.zscore.monthly-046c6f5f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-4a00e3fd.js → HEAD CIRCUM_BOYS.zscore.weekly-3a56558c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-0b52bf01.js → HEAD CIRCUM_BOYS.zscore.yearly-6758cf78.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-f7b8d028.js → HEAD CIRCUM_GIRLS.percentile.monthly-bf5760a1.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-72835055.js → HEAD CIRCUM_GIRLS.percentile.weekly-5aa28b38.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-9d6084f3.js → HEAD CIRCUM_GIRLS.percentile.yearly-abc2c609.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-92c12656.js → HEAD CIRCUM_GIRLS.zscore.monthly-2bfa39be.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-66006a19.js → HEAD CIRCUM_GIRLS.zscore.weekly-2b7e591b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-7c41c6e7.js → HEAD CIRCUM_GIRLS.zscore.yearly-951e420e.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-b1e3aa23.js → HEIGHT_BOYS.percentile.monthly-bf21136c.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-6b41343f.js → HEIGHT_BOYS.percentile.weekly-0473d35a.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-f0490855.js → HEIGHT_BOYS.percentile.yearly-04eac199.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-b5fe9292.js → HEIGHT_BOYS.zscore.monthly-a38d0355.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-8bfa1c29.js → HEIGHT_BOYS.zscore.weekly-35a7a814.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-0fb1980d.js → HEIGHT_BOYS.zscore.yearly-ca82d79c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-b6b6dd8e.js → HEIGHT_GIRLS.percentile.monthly-537f5e6d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-91aaacd4.js → HEIGHT_GIRLS.percentile.weekly-272cfee9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-8865f276.js → HEIGHT_GIRLS.percentile.yearly-e19757aa.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-98539c87.js → HEIGHT_GIRLS.zscore.monthly-0cdad3ad.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-0cd7afa1.js → HEIGHT_GIRLS.zscore.weekly-4ccf64b5.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-e4c33bb4.js → HEIGHT_GIRLS.zscore.yearly-1f040f1f.js} +0 -0
- /package/build/{Visible-9ebcfed3.js → Visible-43a91dd4.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-4d223257.js → WEIGHT_BOYS.percentile.monthly-29fe888a.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-a27b416c.js → WEIGHT_BOYS.percentile.weekly-57f26d50.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-360b3617.js → WEIGHT_BOYS.percentile.yearly-1fea5185.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-014b1e34.js → WEIGHT_BOYS.zscore.monthly-f31fe67c.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-a27025bc.js → WEIGHT_BOYS.zscore.weekly-e4294e12.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-e7b3ed91.js → WEIGHT_BOYS.zscore.yearly-341e676c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-e72e1c7e.js → WEIGHT_GIRLS.percentile.monthly-f8739e4e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-9180a5fe.js → WEIGHT_GIRLS.percentile.weekly-d6df381c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-727fbc20.js → WEIGHT_GIRLS.percentile.yearly-b8c5d9a2.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-257f52f7.js → WEIGHT_GIRLS.zscore.monthly-5349aaa6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-2d6fbb8e.js → WEIGHT_GIRLS.zscore.weekly-e8823bbf.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-8ca8382c.js → WEIGHT_GIRLS.zscore.yearly-ae3c9401.js} +0 -0
- /package/build/{animation-c4e9aaf8.js → animation-2f1a44fe.js} +0 -0
- /package/build/{constants-16888a46.js → constants-886c9adc.js} +0 -0
- /package/build/{constants-d7410b7f.js → constants-afe76aa7.js} +0 -0
- /package/build/{dataTransform-5b61d3ac.js → dataTransform-8a25c00d.js} +0 -0
- /package/build/{doctor-d835b28e.js → doctor-79fce99f.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-c9d1536b.js → BMI_BOYS.percentile.monthly-f6524256.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-77ca8294.js → BMI_BOYS.percentile.weekly-a4e52981.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-63700e8e.js → BMI_BOYS.percentile.yearly-8b4d9f7f.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-04f21186.js → BMI_BOYS.zscore.monthly-559ab672.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-50a3f022.js → BMI_BOYS.zscore.weekly-f16f2314.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-dde2fef6.js → BMI_BOYS.zscore.yearly-66899f86.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-657a7f8a.js → BMI_GIRLS.percentile.monthly-188dc95f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-2e82787c.js → BMI_GIRLS.percentile.weekly-283ea089.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-05a56f46.js → BMI_GIRLS.percentile.yearly-cb8ecd11.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-5b4beb2b.js → BMI_GIRLS.zscore.monthly-b4c2d4ea.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-be755884.js → BMI_GIRLS.zscore.weekly-99a484e5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-a7c448de.js → BMI_GIRLS.zscore.yearly-b3a20b03.js} +0 -0
- /package/build/esm/{ChevronDown-975183d6.js → ChevronDown-7384160e.js} +0 -0
- /package/build/esm/{Close-62c4bf39.js → Close-8747ccc0.js} +0 -0
- /package/build/esm/{Google-f65598c7.js → Google-e2646cfd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-4ddc9900.js → HEAD CIRCUM_BOYS.percentile.monthly-5abdca84.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-fabab054.js → HEAD CIRCUM_BOYS.percentile.weekly-6e7e5094.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-c8bf5cf3.js → HEAD CIRCUM_BOYS.percentile.yearly-e313e212.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-2175e384.js → HEAD CIRCUM_BOYS.zscore.monthly-94e116b9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-64c44542.js → HEAD CIRCUM_BOYS.zscore.weekly-b17def9a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-078bafb7.js → HEAD CIRCUM_BOYS.zscore.yearly-d414cc29.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-9aaecbdd.js → HEAD CIRCUM_GIRLS.percentile.monthly-89545e9f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-96d7311c.js → HEAD CIRCUM_GIRLS.percentile.weekly-68f5d53e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-946003bf.js → HEAD CIRCUM_GIRLS.percentile.yearly-b9956436.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-69fd8bde.js → HEAD CIRCUM_GIRLS.zscore.monthly-12b84952.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-618953f2.js → HEAD CIRCUM_GIRLS.zscore.weekly-29d77f83.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-a9e6934c.js → HEAD CIRCUM_GIRLS.zscore.yearly-5760b1c2.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-784b61c9.js → HEIGHT_BOYS.percentile.monthly-9c804bf2.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-be086241.js → HEIGHT_BOYS.percentile.weekly-c1beb278.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-e3e2c3d9.js → HEIGHT_BOYS.percentile.yearly-7736f19a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-ba59f5b6.js → HEIGHT_BOYS.zscore.monthly-8ff4efa3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-1983a7e3.js → HEIGHT_BOYS.zscore.weekly-f45efd6a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-78d61d3a.js → HEIGHT_BOYS.zscore.yearly-7f9b3357.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-962ddb8d.js → HEIGHT_GIRLS.percentile.monthly-89fa6720.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-35701234.js → HEIGHT_GIRLS.percentile.weekly-f171e583.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-fe789a67.js → HEIGHT_GIRLS.percentile.yearly-7cfd0e6d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-83627fb4.js → HEIGHT_GIRLS.zscore.monthly-eb79bbde.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-a55948c1.js → HEIGHT_GIRLS.zscore.weekly-bf256408.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-172bec49.js → HEIGHT_GIRLS.zscore.yearly-b1b2b5ba.js} +0 -0
- /package/build/esm/{Visible-f703195d.js → Visible-45104a83.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-74b7a0d3.js → WEIGHT_BOYS.percentile.monthly-d78ec07d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-22171af7.js → WEIGHT_BOYS.percentile.weekly-021c313a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-818f7a66.js → WEIGHT_BOYS.percentile.yearly-006ec0e9.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-436c3fb1.js → WEIGHT_BOYS.zscore.monthly-a02428c5.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-a03fc94d.js → WEIGHT_BOYS.zscore.weekly-7bbcadd8.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-017cf7ef.js → WEIGHT_BOYS.zscore.yearly-59b736f7.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-c3b0024c.js → WEIGHT_GIRLS.percentile.monthly-b3ff7056.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-123295dc.js → WEIGHT_GIRLS.percentile.weekly-079998e3.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-c1241ae2.js → WEIGHT_GIRLS.percentile.yearly-16ef5580.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-417db248.js → WEIGHT_GIRLS.zscore.monthly-744a56a9.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-e68ebeaa.js → WEIGHT_GIRLS.zscore.weekly-ff68fa40.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-89bd5b5f.js → WEIGHT_GIRLS.zscore.yearly-ccb77a47.js} +0 -0
- /package/build/esm/{animation-752775d1.js → animation-a97a8e95.js} +0 -0
- /package/build/esm/{constants-33d50bcc.js → constants-12ceb72f.js} +0 -0
- /package/build/esm/{constants-e13b9293.js → constants-8de9fb78.js} +0 -0
- /package/build/esm/{dataTransform-f79dcc4b.js → dataTransform-7543d023.js} +0 -0
- /package/build/esm/{doctor-9b2b2026.js → doctor-7a105d0f.js} +0 -0
- /package/build/esm/{index-d696ba71.js → index-0019e5db.js} +0 -0
- /package/build/esm/{index-db921cb2.js → index-438dfbe0.js} +0 -0
- /package/build/esm/{index-2234c916.js → index-59c7d025.js} +0 -0
- /package/build/esm/{index-fe63eb15.js → index-77ac37c2.js} +0 -0
- /package/build/esm/{index-8c4fe301.js → index-982908ff.js} +0 -0
- /package/build/esm/{index-ec7fe439.js → index-a52dd34a.js} +0 -0
- /package/build/esm/{index-c1aeb9d2.js → index-a8a286bd.js} +0 -0
- /package/build/esm/{index-d52394d6.js → index-e0949e74.js} +0 -0
- /package/build/esm/{index.styles-061d7e04.js → index.styles-8902b845.js} +0 -0
- /package/build/esm/{localizeNumberFormat-f48c2d88.js → localizeNumberFormat-71bae74f.js} +0 -0
- /package/build/esm/{normalizeLink-5fd58f6b.js → normalizeLink-effb959b.js} +0 -0
- /package/build/esm/{number-973252cf.js → number-486cd657.js} +0 -0
- /package/build/esm/{other-b9019cc0.js → other-2824b8ce.js} +0 -0
- /package/build/esm/{paths-2bf57c66.js → paths-44af8a36.js} +0 -0
- /package/build/esm/{translationsContext-4d2ef0b8.js → translationsContext-ccaa070b.js} +0 -0
- /package/build/esm/{tslib.es6-483816a5.js → tslib.es6-72910860.js} +0 -0
- /package/build/esm/{types-53fc718b.js → types-d7aeb1e1.js} +0 -0
- /package/build/esm/{useIsInit-e3cb6a16.js → useIsInit-54df9a05.js} +0 -0
- /package/build/esm/{useOutsideClick-d6a0fff8.js → useOutsideClick-cde19271.js} +0 -0
- /package/build/esm/{useScrollbarSize-475675c1.js → useScrollbarSize-48edb55f.js} +0 -0
- /package/build/esm/{useUniqueId-086c068e.js → useUniqueId-3a3c5775.js} +0 -0
- /package/build/esm/{utils-1b106b1e.js → utils-fe433043.js} +0 -0
- /package/build/{index-59b3ecf2.js → index-1e3c697c.js} +0 -0
- /package/build/{index-4e7e431a.js → index-333631a5.js} +0 -0
- /package/build/{index-2ee7ce45.js → index-6c6874a0.js} +0 -0
- /package/build/{index-b805b348.js → index-8403bd87.js} +0 -0
- /package/build/{index-94c26adf.js → index-aad24483.js} +0 -0
- /package/build/{index-d1e13fe8.js → index-b0934494.js} +0 -0
- /package/build/{index-67495b0e.js → index-d444fbf7.js} +0 -0
- /package/build/{index-bb8bbbde.js → index-f6145dbd.js} +0 -0
- /package/build/{index.styles-dc912b73.js → index.styles-93a0261f.js} +0 -0
- /package/build/{localizeNumberFormat-7214e2af.js → localizeNumberFormat-14a960d3.js} +0 -0
- /package/build/{normalizeLink-87c0ca70.js → normalizeLink-545c621a.js} +0 -0
- /package/build/{number-1871604b.js → number-d7fb0566.js} +0 -0
- /package/build/{other-0403e1c7.js → other-bc52d9ee.js} +0 -0
- /package/build/{paths-b452e87a.js → paths-71aa7019.js} +0 -0
- /package/build/{translationsContext-6461dbf8.js → translationsContext-37e610ba.js} +0 -0
- /package/build/{tslib.es6-bbb7bc4d.js → tslib.es6-d2090a49.js} +0 -0
- /package/build/{types-64c1aec6.js → types-334597fc.js} +0 -0
- /package/build/{useIsInit-560965fd.js → useIsInit-76f93b75.js} +0 -0
- /package/build/{useOutsideClick-1948a35b.js → useOutsideClick-5099ce81.js} +0 -0
- /package/build/{useScrollbarSize-5d5c602e.js → useScrollbarSize-19291332.js} +0 -0
- /package/build/{useUniqueId-2fd0e7a6.js → useUniqueId-cea70f59.js} +0 -0
- /package/build/{utils-c7f8e857.js → utils-7aa02d54.js} +0 -0
package/build/lead.js
CHANGED
|
@@ -2,48 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('./tslib.es6-
|
|
5
|
+
var tslib_es6 = require('./tslib.es6-d2090a49.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var core = require('@mantine/core');
|
|
8
8
|
var dayjs = require('dayjs');
|
|
9
9
|
var debounce = require('lodash/debounce');
|
|
10
10
|
var form = require('@mantine/form');
|
|
11
|
-
var index = require('./index-
|
|
12
|
-
var translationsContext = require('./translationsContext-
|
|
11
|
+
var index = require('./index-129f8aa9.js');
|
|
12
|
+
var translationsContext = require('./translationsContext-37e610ba.js');
|
|
13
13
|
var miscCookieHelper = require('./miscCookieHelper.js');
|
|
14
|
-
var utils$1 = require('./utils-
|
|
15
|
-
var index$1 = require('./index-
|
|
16
|
-
var index$2 = require('./index-
|
|
17
|
-
var index$4 = require('./index-
|
|
18
|
-
var utils = require('./utils-
|
|
19
|
-
|
|
20
|
-
var index$
|
|
21
|
-
|
|
22
|
-
require('./index-
|
|
23
|
-
require('./useMantineLocale-
|
|
24
|
-
var index$5 = require('./index-
|
|
25
|
-
require('./index.styles-
|
|
14
|
+
var utils$1 = require('./utils-7aa02d54.js');
|
|
15
|
+
var index$1 = require('./index-d90d19c7.js');
|
|
16
|
+
var index$2 = require('./index-f564bae2.js');
|
|
17
|
+
var index$4 = require('./index-75ddd9ae.js');
|
|
18
|
+
var utils = require('./utils-599fbb30.js');
|
|
19
|
+
require('@mantine/dates');
|
|
20
|
+
var index$8 = require('./index-e9ed2f96.js');
|
|
21
|
+
require('./index-8b7d6e0b.js');
|
|
22
|
+
require('./index-d444fbf7.js');
|
|
23
|
+
require('./useMantineLocale-d43d68ce.js');
|
|
24
|
+
var index$5 = require('./index-1c88be63.js');
|
|
25
|
+
require('./index.styles-93a0261f.js');
|
|
26
26
|
var hooks = require('@mantine/hooks');
|
|
27
|
-
require('./other-
|
|
28
|
-
require('./index-
|
|
29
|
-
var usePlacesAutocomplete = require('./usePlacesAutocomplete-
|
|
30
|
-
var index$3 = require('./index-
|
|
31
|
-
var index$6 = require('./index-
|
|
32
|
-
var styled = require('@emotion/styled');
|
|
27
|
+
require('./other-bc52d9ee.js');
|
|
28
|
+
require('./index-ac46984d.js');
|
|
29
|
+
var usePlacesAutocomplete = require('./usePlacesAutocomplete-4eb987b3.js');
|
|
30
|
+
var index$3 = require('./index-94beb0e2.js');
|
|
31
|
+
var index$6 = require('./index-8734dc17.js');
|
|
33
32
|
var uuid = require('uuid');
|
|
33
|
+
var index$7 = require('./index-8403bd87.js');
|
|
34
|
+
var index$9 = require('./index-4b9ef079.js');
|
|
35
|
+
var useScreenSize = require('./useScreenSize-db2f3452.js');
|
|
36
|
+
var ReactDOM = require('react-dom');
|
|
34
37
|
var react = require('@emotion/react');
|
|
38
|
+
var styled = require('@emotion/styled');
|
|
35
39
|
var miscTheme = require('./miscTheme.js');
|
|
36
|
-
var
|
|
37
|
-
var index$a = require('./index-3c5857d5.js');
|
|
38
|
-
var useScreenSize = require('./useScreenSize-437f8c08.js');
|
|
39
|
-
var ReactDOM = require('react-dom');
|
|
40
|
-
var InputDate = require('./InputDate-d62979c2.js');
|
|
41
|
-
var Close = require('./Close-32efb719.js');
|
|
40
|
+
var Close = require('./Close-67f76f33.js');
|
|
42
41
|
require('@hhgtech/icons/other');
|
|
43
42
|
require('@mantine/carousel');
|
|
44
|
-
require('./Locale-
|
|
43
|
+
require('./Locale-3aef42b0.js');
|
|
45
44
|
require('classnames');
|
|
46
|
-
require('./useUniqueId-
|
|
45
|
+
require('./useUniqueId-cea70f59.js');
|
|
47
46
|
require('./constantsSite.js');
|
|
48
47
|
require('@hhgtech/icons/core');
|
|
49
48
|
require('date-fns/locale');
|
|
@@ -102,7 +101,7 @@ if (sessionStorage.getItem('insider_object')) {
|
|
|
102
101
|
}
|
|
103
102
|
const docLang = document.documentElement.lang;
|
|
104
103
|
// TODO: country code
|
|
105
|
-
const LEAD_LOCALE_DATA
|
|
104
|
+
const LEAD_LOCALE_DATA = {
|
|
106
105
|
'vi-VN': {
|
|
107
106
|
popupLang: 'vi',
|
|
108
107
|
countryCode: 'vn',
|
|
@@ -144,7 +143,7 @@ const LEAD_LOCALE_DATA$1 = {
|
|
|
144
143
|
countryCodeNumber: 91,
|
|
145
144
|
},
|
|
146
145
|
};
|
|
147
|
-
const LEAD_LOCALE = LEAD_LOCALE_DATA
|
|
146
|
+
const LEAD_LOCALE = LEAD_LOCALE_DATA[docLang] || LEAD_LOCALE_DATA['vi-VN'];
|
|
148
147
|
function LEAD_RESET_VAR() {
|
|
149
148
|
// LEAD_CURRENT_URL = location.href.toLowerCase();
|
|
150
149
|
LEAD_CURRENT_URL =
|
|
@@ -165,11 +164,6 @@ const LEAD_TIMEZONE_DATA = {
|
|
|
165
164
|
9: 'Asia/Manila', // Philippines / Filipinos Site
|
|
166
165
|
};
|
|
167
166
|
|
|
168
|
-
const LEADGEN_ACTIONS = {
|
|
169
|
-
SHOW: 'SHOW',
|
|
170
|
-
SCROLL: 'SCROLL',
|
|
171
|
-
TIME: 'TIME',
|
|
172
|
-
};
|
|
173
167
|
const LEADGEN_LAYOUT = {
|
|
174
168
|
LightBoxA: 'LightBoxA',
|
|
175
169
|
LightBoxB: 'LightBoxB',
|
|
@@ -199,10 +193,8 @@ const LEADGEN_BLOCK = {
|
|
|
199
193
|
DropdownBlock: 'DropdownBlock',
|
|
200
194
|
CheckboxBlock: 'CheckboxBlock',
|
|
201
195
|
TncBlock: 'TncBlock',
|
|
202
|
-
TitleBlock: 'TitleBlock',
|
|
203
|
-
SubtitleBlock: 'SubtitleBlock',
|
|
204
196
|
};
|
|
205
|
-
const
|
|
197
|
+
const LEADGEN_BLOCK_IN_FORM = [
|
|
206
198
|
LEADGEN_BLOCK.TextBlock,
|
|
207
199
|
LEADGEN_BLOCK.NumberBlock,
|
|
208
200
|
LEADGEN_BLOCK.DateBlock,
|
|
@@ -218,48 +210,6 @@ const LEADGEN_BLOCK_INPUT = [
|
|
|
218
210
|
LEADGEN_BLOCK.TncBlock,
|
|
219
211
|
];
|
|
220
212
|
const SSO_MAP_LEAD = ['name', 'email', 'birthday', 'phone', 'gender'];
|
|
221
|
-
const LEAD_LOCALE_DATA = {
|
|
222
|
-
'vi-VN': {
|
|
223
|
-
popupLang: 'vi',
|
|
224
|
-
countryCode: 'vn',
|
|
225
|
-
countryCodeNumber: 84,
|
|
226
|
-
},
|
|
227
|
-
'id-ID': {
|
|
228
|
-
popupLang: 'id',
|
|
229
|
-
countryCode: 'id',
|
|
230
|
-
countryCodeNumber: 62,
|
|
231
|
-
},
|
|
232
|
-
'th-TH': {
|
|
233
|
-
popupLang: 'th',
|
|
234
|
-
countryCode: 'th',
|
|
235
|
-
countryCodeNumber: 66,
|
|
236
|
-
},
|
|
237
|
-
'ms-MY': {
|
|
238
|
-
popupLang: 'ms',
|
|
239
|
-
countryCode: 'my',
|
|
240
|
-
countryCodeNumber: 60,
|
|
241
|
-
},
|
|
242
|
-
'zh-TW': {
|
|
243
|
-
popupLang: 'zh',
|
|
244
|
-
countryCode: 'tw',
|
|
245
|
-
countryCodeNumber: 886,
|
|
246
|
-
},
|
|
247
|
-
'km-KH': {
|
|
248
|
-
popupLang: 'km',
|
|
249
|
-
countryCode: 'kh',
|
|
250
|
-
countryCodeNumber: 855,
|
|
251
|
-
},
|
|
252
|
-
'my-MM': {
|
|
253
|
-
popupLang: 'my',
|
|
254
|
-
countryCode: 'mm',
|
|
255
|
-
countryCodeNumber: 95,
|
|
256
|
-
},
|
|
257
|
-
'hi-IN': {
|
|
258
|
-
popupLang: 'hi',
|
|
259
|
-
countryCode: 'in',
|
|
260
|
-
countryCodeNumber: 91,
|
|
261
|
-
},
|
|
262
|
-
};
|
|
263
213
|
const mappingSSOToLead = (userInfoProps) => {
|
|
264
214
|
var _a, _b;
|
|
265
215
|
try {
|
|
@@ -275,7 +225,7 @@ const mappingSSOToLead = (userInfoProps) => {
|
|
|
275
225
|
if (ssoKey === 'birthday') {
|
|
276
226
|
const dob = dayjs__default["default"](initValue, 'YYYY-MM-DD', true);
|
|
277
227
|
if (dob.isValid()) {
|
|
278
|
-
user.birthday = dob
|
|
228
|
+
user.birthday = dob;
|
|
279
229
|
}
|
|
280
230
|
}
|
|
281
231
|
else if (ssoKey === 'gender') {
|
|
@@ -298,46 +248,6 @@ const mappingSSOToLead = (userInfoProps) => {
|
|
|
298
248
|
catch (error) {
|
|
299
249
|
return;
|
|
300
250
|
}
|
|
301
|
-
};
|
|
302
|
-
const formatCampaignDetail = (campaign) => {
|
|
303
|
-
if (!campaign) {
|
|
304
|
-
return {};
|
|
305
|
-
}
|
|
306
|
-
try {
|
|
307
|
-
const { extra_fields, thank_you_image } = campaign || {};
|
|
308
|
-
const { textBlocks: exTextBlocks, imageBlocks: exImageBlocks, listBlockAdded: exListBlockAdded, listBlockThankyou: exListBlockThankyou, actionBlocks: exActionBlocks, } = extra_fields;
|
|
309
|
-
const textBlocks = JSON.parse(exTextBlocks);
|
|
310
|
-
const imageBlocks = JSON.parse(exImageBlocks);
|
|
311
|
-
const listBlockAdded = JSON.parse(exListBlockAdded);
|
|
312
|
-
const listBlockThankyou = JSON.parse(exListBlockThankyou);
|
|
313
|
-
const actionBlocks = JSON.parse(exActionBlocks);
|
|
314
|
-
const ThankYouBlock = {
|
|
315
|
-
image: { src: thank_you_image },
|
|
316
|
-
};
|
|
317
|
-
listBlockThankyou.forEach((block) => {
|
|
318
|
-
const { name, data } = block || {};
|
|
319
|
-
const { value: htmlText, align, newtab, url } = data || {};
|
|
320
|
-
switch (name) {
|
|
321
|
-
case LEADGEN_BLOCK.TitleBlock: {
|
|
322
|
-
ThankYouBlock.title = { htmlText, align };
|
|
323
|
-
}
|
|
324
|
-
case LEADGEN_BLOCK.SubtitleBlock: {
|
|
325
|
-
ThankYouBlock.description = { htmlText, align };
|
|
326
|
-
}
|
|
327
|
-
case LEADGEN_BLOCK.LinkButtonBlock: {
|
|
328
|
-
ThankYouBlock.button = { htmlText, newtab, url };
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
return Object.assign(Object.assign({}, campaign), { extra_fields: Object.assign(Object.assign({}, extra_fields), { textBlocks,
|
|
333
|
-
imageBlocks,
|
|
334
|
-
listBlockAdded,
|
|
335
|
-
listBlockThankyou,
|
|
336
|
-
actionBlocks }), ThankYouBlock });
|
|
337
|
-
}
|
|
338
|
-
catch (error) {
|
|
339
|
-
return {};
|
|
340
|
-
}
|
|
341
251
|
};
|
|
342
252
|
|
|
343
253
|
class Store {
|
|
@@ -348,13 +258,6 @@ class Store {
|
|
|
348
258
|
}
|
|
349
259
|
const leadStore = new Store();
|
|
350
260
|
|
|
351
|
-
const LEADGEN_API_METHOD = {
|
|
352
|
-
GET: 'get',
|
|
353
|
-
POST: 'POST',
|
|
354
|
-
};
|
|
355
|
-
const LEADGEN_API_PATH = {
|
|
356
|
-
V2_CAMPAIGN: 'api/v2/campaign',
|
|
357
|
-
};
|
|
358
261
|
const leadApi = {
|
|
359
262
|
call(_a) {
|
|
360
263
|
var { url, data = undefined } = _a, config = tslib_es6.__rest(_a, ["url", "data"]);
|
|
@@ -458,39 +361,8 @@ const verifyOtpLead = ({ phone, otp, type, }) => {
|
|
|
458
361
|
},
|
|
459
362
|
});
|
|
460
363
|
};
|
|
461
|
-
const campaignGetByCode = (campaign_code) => {
|
|
462
|
-
return leadApi.call({
|
|
463
|
-
url: `${LEADGEN_API_PATH.V2_CAMPAIGN}/${campaign_code}`,
|
|
464
|
-
method: LEADGEN_API_METHOD.GET,
|
|
465
|
-
});
|
|
466
|
-
};
|
|
467
|
-
const campaignPostLead = ({ data }) => {
|
|
468
|
-
return leadApi.call({
|
|
469
|
-
url: 'api/v2/subscription-box',
|
|
470
|
-
method: LEADGEN_API_METHOD.POST,
|
|
471
|
-
data,
|
|
472
|
-
});
|
|
473
|
-
};
|
|
474
|
-
const campaignPostImpression = ({ code, action, title_article, ga_client_id, cookie_id, extra, url, referrer, }) => {
|
|
475
|
-
return leadApi.call({
|
|
476
|
-
url: `api/campaign/${code}/impression`,
|
|
477
|
-
method: LEADGEN_API_METHOD.POST,
|
|
478
|
-
data: {
|
|
479
|
-
action,
|
|
480
|
-
title_article,
|
|
481
|
-
cookie_id,
|
|
482
|
-
ga_client_id,
|
|
483
|
-
url,
|
|
484
|
-
extra,
|
|
485
|
-
referrer,
|
|
486
|
-
},
|
|
487
|
-
});
|
|
488
|
-
};
|
|
489
364
|
const Service = {
|
|
490
365
|
campaignGetById,
|
|
491
|
-
campaignGetByCode,
|
|
492
|
-
campaignPostLead,
|
|
493
|
-
campaignPostImpression,
|
|
494
366
|
validateEmailOrPhoneOnSubot,
|
|
495
367
|
validateEmailOrPhoneOnLeadGen,
|
|
496
368
|
validatePhoneNumberOnLeadGen,
|
|
@@ -1282,7 +1154,6 @@ var enPH = {
|
|
|
1282
1154
|
"validator.min": "jQuery.validator.format('Please enter a value greater than or equal to {0}.",
|
|
1283
1155
|
"validator.emailUsed": "Email already in use for this campaign.",
|
|
1284
1156
|
"validator.phoneUsed": "Your phone number already in use for this campaign.",
|
|
1285
|
-
"validator.dateInvalid": "This date is not valid, please update.",
|
|
1286
1157
|
"lead.otp.title": "Enter OTP",
|
|
1287
1158
|
"lead.otp.desc": "We have sent an OTP to your mobile number {phone}",
|
|
1288
1159
|
"lead.otp.verify": "Verify",
|
|
@@ -1291,10 +1162,7 @@ var enPH = {
|
|
|
1291
1162
|
"lead.otp.phonePlaceholder": "Enter OTP",
|
|
1292
1163
|
"lead.empty.title": "Oops, seem your information is empty, do you want to submit the information again?",
|
|
1293
1164
|
"lead.empty.cancel": "Cancel",
|
|
1294
|
-
"lead.empty.submitAgain": "Submit again"
|
|
1295
|
-
"common.day": "Day",
|
|
1296
|
-
"common.month": "Month",
|
|
1297
|
-
"common.year": "Year"
|
|
1165
|
+
"lead.empty.submitAgain": "Submit again"
|
|
1298
1166
|
};
|
|
1299
1167
|
|
|
1300
1168
|
var hiIN = {
|
|
@@ -1305,7 +1173,6 @@ var hiIN = {
|
|
|
1305
1173
|
"validator.maxlength": "कृपया {0} अक्षर से अधिक दर्ज न करें",
|
|
1306
1174
|
"validator.minlength": "कृपया कम से कम {0} अक्षर दर्ज करें",
|
|
1307
1175
|
"validator.phone": "कृपया एक वैध संख्या दर्ज करें",
|
|
1308
|
-
"validator.dateInvalid": "यह तिथि मान्य नहीं है, कृपया अपडेट करें।",
|
|
1309
1176
|
"validator.emailUsed": "Email already in use for this campaign.",
|
|
1310
1177
|
"validator.phoneUsed": "Your phone number already in use for this campaign.",
|
|
1311
1178
|
"lead.otp.title": "Enter OTP",
|
|
@@ -1314,10 +1181,7 @@ var hiIN = {
|
|
|
1314
1181
|
"lead.otp.resend": "Resend OTP{timer}",
|
|
1315
1182
|
"lead.empty.title": "ऊप्स! लगता है आपकी जानकारी खाली है। क्या आप जानकारी फिर से सबमिट करना चाहते हैं?",
|
|
1316
1183
|
"lead.empty.cancel": "रद्द करें",
|
|
1317
|
-
"lead.empty.submitAgain": "फिर से सबमिट करें"
|
|
1318
|
-
"common.day": "साल",
|
|
1319
|
-
"common.month": "महीना",
|
|
1320
|
-
"common.year": ""
|
|
1184
|
+
"lead.empty.submitAgain": "फिर से सबमिट करें"
|
|
1321
1185
|
};
|
|
1322
1186
|
|
|
1323
1187
|
var idID = {
|
|
@@ -1330,7 +1194,6 @@ var idID = {
|
|
|
1330
1194
|
"validator.phone": "Tolong daftarkan nomor telepon yang valid",
|
|
1331
1195
|
"validator.emailUsed": "Email sudah digunakan untuk kampanye ini.",
|
|
1332
1196
|
"validator.phoneUsed": "Nomor telepon Anda sudah digunakan untuk kampanye ini.",
|
|
1333
|
-
"validator.dateInvalid": "Tanggal ini tidak valid, silakan perbarui",
|
|
1334
1197
|
"lead.otp.title": "Masukkan OTP",
|
|
1335
1198
|
"lead.otp.desc": "Kami telah mengirimkan OTP ke nomor ponsel Anda {phone}",
|
|
1336
1199
|
"lead.otp.verify": "Verifikasi",
|
|
@@ -1339,10 +1202,7 @@ var idID = {
|
|
|
1339
1202
|
"lead.otp.phonePlaceholder": "Masukkan OTP",
|
|
1340
1203
|
"lead.empty.title": "Oops, sepertinya informasi Anda kosong. Apakah Anda ingin mengirimkan informasi lagi?",
|
|
1341
1204
|
"lead.empty.cancel": "Batal",
|
|
1342
|
-
"lead.empty.submitAgain": "Kirim lagi"
|
|
1343
|
-
"common.day": "Hari",
|
|
1344
|
-
"common.month": "Bulan",
|
|
1345
|
-
"common.year": "Tahun"
|
|
1205
|
+
"lead.empty.submitAgain": "Kirim lagi"
|
|
1346
1206
|
};
|
|
1347
1207
|
|
|
1348
1208
|
var kmKH = {
|
|
@@ -1355,7 +1215,6 @@ var kmKH = {
|
|
|
1355
1215
|
"validator.phone": "សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ",
|
|
1356
1216
|
"validator.emailUsed": "អ៊ីមែលត្រូវបានប្រើប្រាស់សម្រាប់យុទ្ធនាការនេះរួចហើយ។",
|
|
1357
1217
|
"validator.phoneUsed": "លេខទូរស័ព្ទរបស់អ្នកត្រូវបានប្រើប្រាស់សម្រាប់យុទ្ធនាការនេះរួចហើយ។",
|
|
1358
|
-
"validator.dateInvalid": "កាលបរិច្ឆេទនេះមិនត្រឹមត្រូវទេ សូមធ្វើបច្ចុប្បន្នភាព។",
|
|
1359
1218
|
"lead.otp.title": "បញ្ចូល OTP",
|
|
1360
1219
|
"lead.otp.desc": "យើងបានផ្ញើ OTP ទៅកាន់លេខទូរសព្ទរបស់អ្នក {phone}",
|
|
1361
1220
|
"lead.otp.verify": "ផ្ទៀងផ្ទាត់",
|
|
@@ -1364,10 +1223,7 @@ var kmKH = {
|
|
|
1364
1223
|
"lead.otp.phonePlaceholder": "បញ្ចូល OTP",
|
|
1365
1224
|
"lead.empty.title": "អូុបស! ហាក់ដូចជាព័ត៌មានរបស់អ្នកទទេ។ តើអ្នកចង់ដាក់ស្នើព័ត៌មានម្តងទៀតទេ?",
|
|
1366
1225
|
"lead.empty.cancel": "លុបចោល",
|
|
1367
|
-
"lead.empty.submitAgain": "ដាក់ស្នើម្ដងទៀត"
|
|
1368
|
-
"common.day": "ឆ្នាំ",
|
|
1369
|
-
"common.month": "ខែ",
|
|
1370
|
-
"common.year": "ថ្ងៃ"
|
|
1226
|
+
"lead.empty.submitAgain": "ដាក់ស្នើម្ដងទៀត"
|
|
1371
1227
|
};
|
|
1372
1228
|
|
|
1373
1229
|
var msMY = {
|
|
@@ -1380,7 +1236,6 @@ var msMY = {
|
|
|
1380
1236
|
"validator.phone": "Sila masukkan no telefon yang sah.",
|
|
1381
1237
|
"validator.emailUsed": "Emel sudah digunakan untuk kempen ini.",
|
|
1382
1238
|
"validator.phoneUsed": "Nombor telefon anda sudah digunakan untuk kempen ini.",
|
|
1383
|
-
"validator.dateInvalid": "Tarikh ini tidak sah, sila kemas kini",
|
|
1384
1239
|
"lead.otp.title": "Masukkan OTP",
|
|
1385
1240
|
"lead.otp.desc": "Kami telah menghantar OTP ke nombor telefon bimbit anda {phone}",
|
|
1386
1241
|
"lead.otp.verify": "Sahkan",
|
|
@@ -1389,10 +1244,7 @@ var msMY = {
|
|
|
1389
1244
|
"lead.otp.phonePlaceholder": "Masukkan OTP",
|
|
1390
1245
|
"lead.empty.title": "Oops, nampaknya maklumat anda kosong. Adakah anda ingin menghantar maklumat semula?",
|
|
1391
1246
|
"lead.empty.cancel": "Batal",
|
|
1392
|
-
"lead.empty.submitAgain": "Hantar semula"
|
|
1393
|
-
"common.day": "Hari",
|
|
1394
|
-
"common.month": "Bulan",
|
|
1395
|
-
"common.year": "Tahun"
|
|
1247
|
+
"lead.empty.submitAgain": "Hantar semula"
|
|
1396
1248
|
};
|
|
1397
1249
|
|
|
1398
1250
|
var myMM = {
|
|
@@ -1405,7 +1257,6 @@ var myMM = {
|
|
|
1405
1257
|
"validator.phone": "မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ",
|
|
1406
1258
|
"validator.emailUsed": "ဤအေကာင့်အတွက် အီးမေးလ်ကို အသုံးပြုပြီးဖြစ်ပါသည်။",
|
|
1407
1259
|
"validator.phoneUsed": "ဤအေကာင့်အတွက် သင့်ဖုန်းနံပါတ်ကို အသုံးပြုပြီးဖြစ်ပါသည်။",
|
|
1408
|
-
"validator.dateInvalid": "ယနေ့စွဲမှားနေသည်၊ ကျေးဇူးပြု၍ ပြင်ဆင်ပါ။",
|
|
1409
1260
|
"lead.otp.title": "OTP ကိုထည့်ပါ",
|
|
1410
1261
|
"lead.otp.desc": "ကျွန်ုပ်တို့သည် OTP ကိုသင့်ဖုန်းနံပါတ် {phone} သို့ပို့ခဲ့သည်",
|
|
1411
1262
|
"lead.otp.verify": "အတည်ပြုပါ",
|
|
@@ -1414,10 +1265,7 @@ var myMM = {
|
|
|
1414
1265
|
"lead.otp.phonePlaceholder": "OTP ကိုထည့်ပါ",
|
|
1415
1266
|
"lead.empty.title": "အုပ်စ်! သင့်အချက်အလက်သည် ဗလာဖြစ်နေသလိုဖြစ်သည်။ ထပ်မံတင်သွင်းလိုပါသလား?",
|
|
1416
1267
|
"lead.empty.cancel": "မလုပ်ဆောင်ပါ",
|
|
1417
|
-
"lead.empty.submitAgain": "ထပ်မံတင်သွင်းပါ"
|
|
1418
|
-
"common.day": "ရက်",
|
|
1419
|
-
"common.month": "လ",
|
|
1420
|
-
"common.year": "နှစ်"
|
|
1268
|
+
"lead.empty.submitAgain": "ထပ်မံတင်သွင်းပါ"
|
|
1421
1269
|
};
|
|
1422
1270
|
|
|
1423
1271
|
var thTH = {
|
|
@@ -1430,7 +1278,6 @@ var thTH = {
|
|
|
1430
1278
|
"validator.phone": "กรุณาใส่ตัวเลขที่ถูกต้อง",
|
|
1431
1279
|
"validator.emailUsed": "อีเมลนี้ถูกใช้สำหรับแคมเปญนี้แล้ว",
|
|
1432
1280
|
"validator.phoneUsed": "หมายเลขโทรศัพท์ของคุณถูกใช้สำหรับแคมเปญนี้แล้ว",
|
|
1433
|
-
"validator.dateInvalid": "วันที่นี้ไม่ถูกต้อง โปรดอัปเดต",
|
|
1434
1281
|
"lead.otp.title": "ป้อน OTP",
|
|
1435
1282
|
"lead.otp.desc": "เราได้ส่ง OTP ไปยังหมายเลขโทรศัพท์มือถือของคุณ {phone}",
|
|
1436
1283
|
"lead.otp.verify": "ยืนยัน",
|
|
@@ -1439,10 +1286,7 @@ var thTH = {
|
|
|
1439
1286
|
"lead.otp.phonePlaceholder": "ป้อน OTP",
|
|
1440
1287
|
"lead.empty.title": "อุ๊ปส์! ดูเหมือนว่าข้อมูลของคุณว่างเปล่า คุณต้องการส่งข้อมูลอีกครั้งหรือไม่?",
|
|
1441
1288
|
"lead.empty.cancel": "ยกเลิก",
|
|
1442
|
-
"lead.empty.submitAgain": "ส่งอีกครั้ง"
|
|
1443
|
-
"common.day": "วัน",
|
|
1444
|
-
"common.month": "เดือน",
|
|
1445
|
-
"common.year": "ปี"
|
|
1289
|
+
"lead.empty.submitAgain": "ส่งอีกครั้ง"
|
|
1446
1290
|
};
|
|
1447
1291
|
|
|
1448
1292
|
var viVN = {
|
|
@@ -1466,7 +1310,6 @@ var viVN = {
|
|
|
1466
1310
|
"validator.phone": "Nhập đúng định dạng số điện thoại",
|
|
1467
1311
|
"validator.emailUsed": "Email này đã được sử dụng.",
|
|
1468
1312
|
"validator.phoneUsed": "Số điện thoại này đã được sử dụng.",
|
|
1469
|
-
"validator.dateInvalid": "Ngày này không hợp lệ, vui lòng cập nhật.",
|
|
1470
1313
|
"lead.otp.title": "Nhập OTP",
|
|
1471
1314
|
"lead.otp.desc": "Chúng tôi đã gửi OTP đến số điện thoại của bạn {phone}",
|
|
1472
1315
|
"lead.otp.verify": "Xác minh",
|
|
@@ -1475,10 +1318,7 @@ var viVN = {
|
|
|
1475
1318
|
"lead.otp.phonePlaceholder": "Nhập OTP",
|
|
1476
1319
|
"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?",
|
|
1477
1320
|
"lead.empty.cancel": "Hủy",
|
|
1478
|
-
"lead.empty.submitAgain": "Gửi lại"
|
|
1479
|
-
"common.day": "Ngày",
|
|
1480
|
-
"common.month": "Tháng",
|
|
1481
|
-
"common.year": "Năm"
|
|
1321
|
+
"lead.empty.submitAgain": "Gửi lại"
|
|
1482
1322
|
};
|
|
1483
1323
|
|
|
1484
1324
|
var zhTW = {
|
|
@@ -1491,7 +1331,6 @@ var zhTW = {
|
|
|
1491
1331
|
"validator.phone": "請填入有效的電話號碼",
|
|
1492
1332
|
"validator.emailUsed": "此電子郵件已被使用於此活動。",
|
|
1493
1333
|
"validator.phoneUsed": "您的手機號碼已被使用於此活動。",
|
|
1494
|
-
"validator.dateInvalid": "此日期無效,請更新.",
|
|
1495
1334
|
"lead.otp.title": "輸入 OTP",
|
|
1496
1335
|
"lead.otp.desc": "我們已將 OTP 發送到您的手機號碼 {phone}",
|
|
1497
1336
|
"lead.otp.verify": "驗證",
|
|
@@ -1500,10 +1339,7 @@ var zhTW = {
|
|
|
1500
1339
|
"lead.otp.phonePlaceholder": "輸入 OTP",
|
|
1501
1340
|
"lead.empty.title": "哎呀,您的資訊似乎是空的,您想要重新提交資訊嗎?",
|
|
1502
1341
|
"lead.empty.cancel": "取消",
|
|
1503
|
-
"lead.empty.submitAgain": "重新提交"
|
|
1504
|
-
"common.day": "日",
|
|
1505
|
-
"common.month": "月",
|
|
1506
|
-
"common.year": "年"
|
|
1342
|
+
"lead.empty.submitAgain": "重新提交"
|
|
1507
1343
|
};
|
|
1508
1344
|
|
|
1509
1345
|
const translationsMap = {
|
|
@@ -1515,7 +1351,6 @@ const translationsMap = {
|
|
|
1515
1351
|
'my-MM': myMM,
|
|
1516
1352
|
'km-KH': kmKH,
|
|
1517
1353
|
'zh-TW': zhTW,
|
|
1518
|
-
'zh-CN': zhTW,
|
|
1519
1354
|
'th-TH': thTH,
|
|
1520
1355
|
'tl-PH': enPH,
|
|
1521
1356
|
};
|
|
@@ -1529,1056 +1364,43 @@ const getTranslations = (locale) => {
|
|
|
1529
1364
|
|
|
1530
1365
|
const LeadGenContext = React.createContext({});
|
|
1531
1366
|
|
|
1532
|
-
const
|
|
1533
|
-
const
|
|
1534
|
-
const
|
|
1535
|
-
const [
|
|
1536
|
-
|
|
1537
|
-
const translationContextValue = { locale, values: getTranslations(locale) };
|
|
1367
|
+
const useImageSize = (src) => {
|
|
1368
|
+
const [width, setWidth] = React.useState(16);
|
|
1369
|
+
const [height, setHeight] = React.useState(9);
|
|
1370
|
+
const [loaded, setLoaded] = React.useState(false);
|
|
1371
|
+
// load src image to get its width and height
|
|
1538
1372
|
React.useEffect(() => {
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1373
|
+
setLoaded(false);
|
|
1374
|
+
if (src) {
|
|
1375
|
+
const img = new Image();
|
|
1376
|
+
img.addEventListener('load', () => {
|
|
1377
|
+
setWidth(img.naturalWidth);
|
|
1378
|
+
setHeight(img.naturalHeight);
|
|
1379
|
+
setLoaded(true);
|
|
1380
|
+
});
|
|
1381
|
+
img.addEventListener('error', () => {
|
|
1382
|
+
setWidth(16);
|
|
1383
|
+
setHeight(9);
|
|
1384
|
+
setLoaded(true);
|
|
1548
1385
|
});
|
|
1386
|
+
img.src = src;
|
|
1549
1387
|
}
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
}
|
|
1561
|
-
return (React__default["default"].createElement(LeadGenSubscriptionBoxContext.Provider, { value: leadGenSubscriptionBoxValue },
|
|
1562
|
-
React__default["default"].createElement(translationsContext.TranslationsContext.Provider, { value: translationContextValue }, children)));
|
|
1563
|
-
};
|
|
1564
|
-
|
|
1565
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
1566
|
-
const customParseFormat = require('dayjs/plugin/customParseFormat');
|
|
1567
|
-
dayjs__default["default"].extend(customParseFormat);
|
|
1568
|
-
// You can give context variables any name
|
|
1569
|
-
const [LeadFormProvider, useLeadFormContext, useLeadForm] = form.createFormContext();
|
|
1570
|
-
const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validatingEmailRef, campaignId, campaign_subot_id = [], userInfo, format, }) => {
|
|
1571
|
-
var _a;
|
|
1572
|
-
const { t } = index.useTranslations();
|
|
1573
|
-
const initialValues = React.useMemo(() => mappingSSOToLead(userInfo), [userInfo === null || userInfo === void 0 ? void 0 : userInfo.id]);
|
|
1574
|
-
const LEAD_LOCALE = LEAD_LOCALE_DATA[(_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.lang] ||
|
|
1575
|
-
LEAD_LOCALE_DATA['vi-VN'];
|
|
1576
|
-
const validateObj = React.useMemo(() => {
|
|
1577
|
-
const InputBlocks = [
|
|
1578
|
-
'TextBlock',
|
|
1579
|
-
'NumberBlock',
|
|
1580
|
-
'EmailBlock',
|
|
1581
|
-
'PhoneBlock',
|
|
1582
|
-
'DateBlock',
|
|
1583
|
-
'CheckboxBlock',
|
|
1584
|
-
'RadioBlock',
|
|
1585
|
-
'DropdownBlock',
|
|
1586
|
-
'PhoneOtpBlock',
|
|
1587
|
-
'WhatsappOtpBlock',
|
|
1588
|
-
'ZaloOtpBlock',
|
|
1589
|
-
'LocationBlock',
|
|
1590
|
-
'TncBlock',
|
|
1591
|
-
];
|
|
1592
|
-
// ALL are required and can skip if not touched yet
|
|
1593
|
-
const withSharedCheck = (name, cb,
|
|
1594
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1595
|
-
block) => {
|
|
1596
|
-
return (value) => {
|
|
1597
|
-
var _a;
|
|
1598
|
-
const isBLockRequired = (_a = block === null || block === void 0 ? void 0 : block.data) === null || _a === void 0 ? void 0 : _a.required;
|
|
1599
|
-
if (!formRef.current.isTouched(name))
|
|
1600
|
-
return;
|
|
1601
|
-
if ((typeof value === 'string' && value.trim() === '') ||
|
|
1602
|
-
typeof value === 'undefined' ||
|
|
1603
|
-
(Array.isArray(value) && value.length === 0)) {
|
|
1604
|
-
return isBLockRequired
|
|
1605
|
-
? t('validator.required')
|
|
1606
|
-
: cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1607
|
-
}
|
|
1608
|
-
return cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1609
|
-
};
|
|
1610
|
-
};
|
|
1611
|
-
return listBlockAdded
|
|
1612
|
-
.filter((b) => InputBlocks.includes(b.name))
|
|
1613
|
-
.reduce((r, b) => {
|
|
1614
|
-
const { name: fieldType, data } = b || {};
|
|
1615
|
-
const { value: fieldName, required } = data || {};
|
|
1616
|
-
const isRequired = required !== null && required !== void 0 ? required : true;
|
|
1617
|
-
if (fieldType === 'NumberBlock') {
|
|
1618
|
-
return Object.assign(Object.assign({}, r), { [fieldName]: withSharedCheck(fieldName, (value) => {
|
|
1619
|
-
if (value && isNaN(Number(value))) {
|
|
1620
|
-
return t('validator.number');
|
|
1621
|
-
}
|
|
1622
|
-
}, b) });
|
|
1623
|
-
}
|
|
1624
|
-
else if (fieldType === 'EmailBlock') {
|
|
1625
|
-
return Object.assign(Object.assign({}, r), { [fieldName]: withSharedCheck(fieldName, (value) => {
|
|
1626
|
-
if (value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
1627
|
-
return t('validator.email');
|
|
1628
|
-
}
|
|
1629
|
-
if (!value)
|
|
1630
|
-
return;
|
|
1631
|
-
validatingEmailRef.current = true;
|
|
1632
|
-
setTimeout(() => {
|
|
1633
|
-
formRef.current.setFieldError(fieldName, 'Validating...');
|
|
1634
|
-
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1635
|
-
email: value,
|
|
1636
|
-
})
|
|
1637
|
-
.then((tKey) => {
|
|
1638
|
-
if (tKey) {
|
|
1639
|
-
formRef.current.setFieldError(fieldName, t(tKey));
|
|
1640
|
-
}
|
|
1641
|
-
else {
|
|
1642
|
-
formRef.current.clearFieldError(fieldName);
|
|
1643
|
-
}
|
|
1644
|
-
validatingEmailRef.current = false;
|
|
1645
|
-
})
|
|
1646
|
-
.catch((e) => {
|
|
1647
|
-
console.error(e);
|
|
1648
|
-
formRef.current.setFieldError(fieldName, e.message || 'Something went wrong');
|
|
1649
|
-
validatingEmailRef.current = false;
|
|
1650
|
-
});
|
|
1651
|
-
}, 200);
|
|
1652
|
-
}, b) });
|
|
1653
|
-
}
|
|
1654
|
-
else if (fieldType === 'PhoneBlock' ||
|
|
1655
|
-
fieldType === 'PhoneOtpBlock' ||
|
|
1656
|
-
fieldType === 'ZaloOtpBlock' ||
|
|
1657
|
-
fieldType === 'WhatsappOtpBlock') {
|
|
1658
|
-
return Object.assign(Object.assign({}, r), { [fieldName]: withSharedCheck(fieldName, (value) => {
|
|
1659
|
-
if (value &&
|
|
1660
|
-
window.intlTelInputUtils &&
|
|
1661
|
-
!window.intlTelInputUtils.isValidNumber(String(value), LEAD_LOCALE.countryCode)) {
|
|
1662
|
-
return t('validator.phone');
|
|
1663
|
-
}
|
|
1664
|
-
if (!value)
|
|
1665
|
-
return;
|
|
1666
|
-
validatingPhoneRef.current = true;
|
|
1667
|
-
setTimeout(() => {
|
|
1668
|
-
formRef.current.setFieldError(fieldName, 'Validating...');
|
|
1669
|
-
if (b.data.singleSubmission) {
|
|
1670
|
-
checkUsedPhoneOnlyWithCache(campaignId, value)
|
|
1671
|
-
.then((tKey) => {
|
|
1672
|
-
if (tKey) {
|
|
1673
|
-
formRef.current.setFieldError(fieldName, t(tKey));
|
|
1674
|
-
}
|
|
1675
|
-
else {
|
|
1676
|
-
formRef.current.clearFieldError(fieldName);
|
|
1677
|
-
}
|
|
1678
|
-
validatingPhoneRef.current = false;
|
|
1679
|
-
})
|
|
1680
|
-
.catch((err) => {
|
|
1681
|
-
console.error(err);
|
|
1682
|
-
formRef.current.setFieldError(fieldName, err.message || 'Something went wrong');
|
|
1683
|
-
validatingPhoneRef.current = false;
|
|
1684
|
-
});
|
|
1685
|
-
}
|
|
1686
|
-
else {
|
|
1687
|
-
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1688
|
-
phone: value,
|
|
1689
|
-
})
|
|
1690
|
-
.then((tKey) => {
|
|
1691
|
-
if (tKey) {
|
|
1692
|
-
formRef.current.setFieldError(fieldName, t(tKey));
|
|
1693
|
-
}
|
|
1694
|
-
else {
|
|
1695
|
-
formRef.current.clearFieldError(fieldName);
|
|
1696
|
-
}
|
|
1697
|
-
validatingPhoneRef.current = false;
|
|
1698
|
-
})
|
|
1699
|
-
.catch((e) => {
|
|
1700
|
-
console.error(e);
|
|
1701
|
-
formRef.current.setFieldError(fieldName, e.message || 'Something went wrong');
|
|
1702
|
-
validatingPhoneRef.current = false;
|
|
1703
|
-
});
|
|
1704
|
-
}
|
|
1705
|
-
}, 200);
|
|
1706
|
-
}, b) });
|
|
1707
|
-
}
|
|
1708
|
-
else if (fieldType === 'DateBlock') {
|
|
1709
|
-
return Object.assign(Object.assign({}, r), { [fieldName]: withSharedCheck(fieldName, (value) => {
|
|
1710
|
-
if (!isRequired && !value) {
|
|
1711
|
-
return;
|
|
1712
|
-
}
|
|
1713
|
-
const errMsg = t('validator.dateInvalid');
|
|
1714
|
-
const dayInJS = typeof value === 'string'
|
|
1715
|
-
? dayjs__default["default"](value, format, true)
|
|
1716
|
-
: dayjs__default["default"](value);
|
|
1717
|
-
if (!dayInJS.isValid()) {
|
|
1718
|
-
return errMsg;
|
|
1719
|
-
}
|
|
1720
|
-
}, b) });
|
|
1721
|
-
}
|
|
1722
|
-
else if (fieldType === 'TncBlock') {
|
|
1723
|
-
return Object.assign(Object.assign({}, r), { [`TNC-` + b.id]: withSharedCheck('TNC-' + b.id, (value) => {
|
|
1724
|
-
if (isRequired && !value) {
|
|
1725
|
-
return t('validator.required');
|
|
1726
|
-
}
|
|
1727
|
-
}, b) });
|
|
1728
|
-
}
|
|
1729
|
-
else {
|
|
1730
|
-
return Object.assign(Object.assign({}, r), { [fieldName]: withSharedCheck(fieldName, undefined, b) });
|
|
1731
|
-
}
|
|
1732
|
-
}, {});
|
|
1733
|
-
}, [listBlockAdded.map((b) => b.name).join(','), format]);
|
|
1734
|
-
const form = useLeadForm({
|
|
1735
|
-
validateInputOnChange: true,
|
|
1736
|
-
validateInputOnBlur: true,
|
|
1737
|
-
clearInputErrorOnChange: true,
|
|
1738
|
-
validate: validateObj,
|
|
1739
|
-
initialValues,
|
|
1740
|
-
});
|
|
1741
|
-
const formRef = React.useRef(form);
|
|
1742
|
-
formRef.current = form;
|
|
1743
|
-
return { form, validateObj };
|
|
1388
|
+
else {
|
|
1389
|
+
setWidth(16);
|
|
1390
|
+
setHeight(9);
|
|
1391
|
+
setLoaded(true);
|
|
1392
|
+
}
|
|
1393
|
+
}, [src]);
|
|
1394
|
+
return {
|
|
1395
|
+
loaded,
|
|
1396
|
+
width,
|
|
1397
|
+
height,
|
|
1398
|
+
};
|
|
1744
1399
|
};
|
|
1745
1400
|
|
|
1746
|
-
const
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
return (React__default["default"].createElement(core.Input.Wrapper, { size: "md", label: label, labelElement: labelElement, labelProps: Object.assign({ htmlFor: id }, labelProps), description: description, descriptionProps: descriptionProps, withAsterisk: withAsterisk, inputMode: inputMode, inputContainer: inputContainer, inputWrapperOrder: inputWrapperOrder, error: error, "data-invalid": !!error, className: className, classNames: classNames, style: style, styles: styles },
|
|
1750
|
-
React__default["default"].createElement("div", { className: "mantine-Input-wrapper" },
|
|
1751
|
-
React__default["default"].createElement(index$2.Phone, Object.assign({}, restProps, { id: id, ref: ref, name: name, spellCheck: false, placeholder: placeholder, defaultCountry: defaultCountry, className: "mantine-Input-input", type: "tel", "data-control": "tel" })))));
|
|
1752
|
-
});
|
|
1753
|
-
|
|
1754
|
-
const StyledLeadGenFormInner = styled__default["default"].div `
|
|
1755
|
-
display: flex;
|
|
1756
|
-
flex-wrap: wrap;
|
|
1757
|
-
gap: 8px;
|
|
1758
|
-
.leadgen-form_input {
|
|
1759
|
-
width: calc(50% - 4px);
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
.leadgen-form_input_checkbox {
|
|
1763
|
-
width: 100%;
|
|
1764
|
-
}
|
|
1765
|
-
`;
|
|
1766
|
-
|
|
1767
|
-
const cssInputNotShrink$1 = react.css `
|
|
1768
|
-
height: 100% !important;
|
|
1769
|
-
min-height: calc(var(--container-height, 56px) * 22 / 56);
|
|
1770
|
-
color: ${miscTheme.theme.colors.gray800};
|
|
1771
|
-
font-size: var(--input, 16px);
|
|
1772
|
-
line-height: calc(var(--container-height, 56px) * 22 / 56);
|
|
1773
|
-
border: none !important;
|
|
1774
|
-
border-radius: 0 !important;
|
|
1775
|
-
outline: none !important;
|
|
1776
|
-
box-shadow: none !important;
|
|
1777
|
-
padding: 0;
|
|
1778
|
-
cursor: pointer;
|
|
1779
|
-
opacity: 0;
|
|
1780
|
-
|
|
1781
|
-
::placeholder {
|
|
1782
|
-
color: ${miscTheme.theme.colors.gray400};
|
|
1783
|
-
}
|
|
1784
|
-
`;
|
|
1785
|
-
const cssInputShrink$1 = react.css `
|
|
1786
|
-
height: auto !important;
|
|
1787
|
-
cursor: text;
|
|
1788
|
-
opacity: 1;
|
|
1789
|
-
transition: 0.1s ease-in-out all;
|
|
1790
|
-
`;
|
|
1791
|
-
const cssLabelNotShrink$1 = react.css `
|
|
1792
|
-
position: absolute;
|
|
1793
|
-
top: calc(var(--container-height) / 2);
|
|
1794
|
-
left: var(--space-x, 16px);
|
|
1795
|
-
color: ${miscTheme.theme.colors.gray400};
|
|
1796
|
-
font-size: var(--label-not-shrink, 16px);
|
|
1797
|
-
font-weight: 400;
|
|
1798
|
-
line-height: calc(var(--container-height, 56px) * 18 / 56);
|
|
1799
|
-
margin: 0;
|
|
1800
|
-
z-index: 1;
|
|
1801
|
-
cursor: pointer;
|
|
1802
|
-
transform: translateY(-50%);
|
|
1803
|
-
transition: 0.125s ease-in all;
|
|
1804
|
-
`;
|
|
1805
|
-
const cssLabelShrink$1 = react.css `
|
|
1806
|
-
color: ${miscTheme.theme.colors.gray600};
|
|
1807
|
-
font-weight: 600;
|
|
1808
|
-
font-size: var(--label-shrink, 12px);
|
|
1809
|
-
top: calc(var(--container-height) * 7 / 56);
|
|
1810
|
-
transform: none;
|
|
1811
|
-
transition: 0.125s ease-out all;
|
|
1812
|
-
`;
|
|
1813
|
-
const cssWrapperInputNotShrink$1 = react.css `
|
|
1814
|
-
min-height: var(--container-height, 56px);
|
|
1815
|
-
display: flex;
|
|
1816
|
-
align-items: flex-end;
|
|
1817
|
-
border: 1px solid ${miscTheme.theme.colors.gray200};
|
|
1818
|
-
border-radius: 8px;
|
|
1819
|
-
background-color: #fff;
|
|
1820
|
-
padding-inline: var(--space-x, 16px);
|
|
1821
|
-
padding-block: var(--space-y-not-shrink, 16px);
|
|
1822
|
-
cursor: pointer;
|
|
1823
|
-
pointer-events: none;
|
|
1824
|
-
|
|
1825
|
-
&:has(.mantine-Input-rightSection) {
|
|
1826
|
-
padding-right: var(--container-height, 56px);
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
.mantine-Input-icon {
|
|
1830
|
-
display: none;
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
|
-
.mantine-NumberInput-control {
|
|
1834
|
-
border-color: ${miscTheme.theme.colors.gray200};
|
|
1835
|
-
}
|
|
1836
|
-
`;
|
|
1837
|
-
const cssWrapperInputShrink$1 = react.css `
|
|
1838
|
-
height: auto;
|
|
1839
|
-
min-height: var(--container-height, 56px);
|
|
1840
|
-
padding-block: var(--space-y-shrink, 7px);
|
|
1841
|
-
cursor: text;
|
|
1842
|
-
pointer-events: auto;
|
|
1843
|
-
`;
|
|
1844
|
-
const cssInputWrapperError$1 = react.css `
|
|
1845
|
-
color: ${miscTheme.theme.colors.red800};
|
|
1846
|
-
font-size: 12px;
|
|
1847
|
-
line-height: 1.5;
|
|
1848
|
-
`;
|
|
1849
|
-
const StyledTextFieldContainer$1 = styled__default["default"].div `
|
|
1850
|
-
--space-x: 16px;
|
|
1851
|
-
--space-y-not-shrink: 16px;
|
|
1852
|
-
--space-y-shrink: 7px;
|
|
1853
|
-
--container-height: 56px;
|
|
1854
|
-
--label-not-shrink: 16px;
|
|
1855
|
-
--label-shrink: 12px;
|
|
1856
|
-
--input: 16px;
|
|
1857
|
-
|
|
1858
|
-
position: relative;
|
|
1859
|
-
min-width: 100px;
|
|
1860
|
-
max-width: 100%;
|
|
1861
|
-
display: inline-block;
|
|
1862
|
-
|
|
1863
|
-
.textField_wrapper {
|
|
1864
|
-
display: inline-block;
|
|
1865
|
-
width: 100%;
|
|
1866
|
-
cursor: pointer;
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
.mantine-InputWrapper-root {
|
|
1870
|
-
&[data-invalid='true'] {
|
|
1871
|
-
.mantine-Input-wrapper {
|
|
1872
|
-
border-color: ${miscTheme.theme.colors.red400};
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
.mantine-Input-wrapper {
|
|
1877
|
-
&:has([data-invalid]) {
|
|
1878
|
-
border-color: ${miscTheme.theme.colors.red400};
|
|
1879
|
-
}
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
.mantine-InputWrapper-error {
|
|
1883
|
-
font-size: 12px !important;
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
.mantine-InputWrapper-label {
|
|
1888
|
-
${cssLabelNotShrink$1}
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
.mantine-Input-wrapper {
|
|
1892
|
-
${cssWrapperInputNotShrink$1}
|
|
1893
|
-
|
|
1894
|
-
+ .mantine-Popover-dropdown[data-position="bottom-start"] {
|
|
1895
|
-
left: 0 !important;
|
|
1896
|
-
}
|
|
1897
|
-
+ .mantine-Popover-dropdown[data-position='top-start'] {
|
|
1898
|
-
top: unset !important;
|
|
1899
|
-
left: 0 !important;
|
|
1900
|
-
bottom: 100% !important;
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
.mantine-Input-input {
|
|
1905
|
-
${cssInputNotShrink$1}
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
&.textField_shrink,
|
|
1909
|
-
&:focus-within {
|
|
1910
|
-
.mantine-InputWrapper-label {
|
|
1911
|
-
${cssLabelShrink$1}
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
.mantine-Input-wrapper {
|
|
1915
|
-
${cssWrapperInputShrink$1}
|
|
1916
|
-
&.mantine-Select-wrapper {
|
|
1917
|
-
.mantine-Select-rightSection {
|
|
1918
|
-
pointer-events: auto !important;
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
.mantine-Input-input {
|
|
1924
|
-
${cssInputShrink$1}
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
&:has(.PhoneInput) {
|
|
1928
|
-
.mantine-InputWrapper-label {
|
|
1929
|
-
left: var(--space-x, 16px);
|
|
1930
|
-
}
|
|
1931
|
-
.PhoneInput {
|
|
1932
|
-
.PhoneInputInput {
|
|
1933
|
-
opacity: 1;
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
|
|
1939
|
-
.PhoneInput {
|
|
1940
|
-
--phone-select: 75px;
|
|
1941
|
-
--phone-input-space-x: 8px;
|
|
1942
|
-
width: 100%;
|
|
1943
|
-
opacity: 1;
|
|
1944
|
-
border: none;
|
|
1945
|
-
.PhoneInputCountry {
|
|
1946
|
-
background-color: transparent;
|
|
1947
|
-
border: none;
|
|
1948
|
-
padding: 0;
|
|
1949
|
-
width: var(--phone-select, 75px);
|
|
1950
|
-
}
|
|
1951
|
-
.PhoneInputInput {
|
|
1952
|
-
flex: 1;
|
|
1953
|
-
min-width: 0;
|
|
1954
|
-
line-height: 1.5;
|
|
1955
|
-
outline: none !important;
|
|
1956
|
-
border: none;
|
|
1957
|
-
box-shadow: none;
|
|
1958
|
-
padding: 0 var(--phone-input-space-x, 8px);
|
|
1959
|
-
opacity: 0;
|
|
1960
|
-
color: ${miscTheme.theme.colors.gray800} !important;
|
|
1961
|
-
:focus {
|
|
1962
|
-
color: ${miscTheme.theme.colors.gray800} !important;
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
&:has(.PhoneInput) {
|
|
1968
|
-
.mantine-InputWrapper-label {
|
|
1969
|
-
left: calc(
|
|
1970
|
-
var(--space-x, 16px) + var(--phone-select, 75px) +
|
|
1971
|
-
var(--phone-input-space-x, 8px)
|
|
1972
|
-
);
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
`;
|
|
1976
|
-
const StyledChoiceFieldContainer$1 = styled__default["default"].div `
|
|
1977
|
-
&.leadgen-form_checkbox,
|
|
1978
|
-
&.leadgen-form_radio {
|
|
1979
|
-
width: 100%;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
&.leadgen-form_dropdown {
|
|
1983
|
-
width: calc(50% - 12px);
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
.mantine-InputWrapper-root {
|
|
1987
|
-
display: block;
|
|
1988
|
-
.mantine-InputWrapper-error {
|
|
1989
|
-
font-size: 12px !important;
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
|
-
.mantine-InputWrapper-label {
|
|
1994
|
-
margin-bottom: 0.5rem;
|
|
1995
|
-
color: ${miscTheme.theme.colors.gray800};
|
|
1996
|
-
font-size: 16px;
|
|
1997
|
-
font-weight: 400;
|
|
1998
|
-
line-height: 1.5;
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
.mantine-Radio-root,
|
|
2002
|
-
.mantine-Checkbox-root {
|
|
2003
|
-
gap: 8px;
|
|
2004
|
-
min-width: calc(50% - 4px);
|
|
2005
|
-
|
|
2006
|
-
input[type='radio'],
|
|
2007
|
-
input[type='checkbox'] {
|
|
2008
|
-
border-color: ${miscTheme.theme.colors.gray600};
|
|
2009
|
-
width: 18px;
|
|
2010
|
-
height: 18px;
|
|
2011
|
-
}
|
|
2012
|
-
input[type='checkbox'] {
|
|
2013
|
-
border-radius: 4px;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
&[data-checked='true'] {
|
|
2017
|
-
input[type='radio'],
|
|
2018
|
-
input[type='checkbox'] {
|
|
2019
|
-
border-color: ${miscTheme.theme.colors.primary600};
|
|
2020
|
-
+ svg {
|
|
2021
|
-
color: ${miscTheme.theme.colors.primary600};
|
|
2022
|
-
}
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
input[type='radio'] {
|
|
2026
|
-
background-color: white;
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
.mantine-Checkbox-input {
|
|
2031
|
-
&:checked {
|
|
2032
|
-
border-color: ${miscTheme.theme.colors.primary600};
|
|
2033
|
-
}
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
.mantine-Radio-inner,
|
|
2038
|
-
.mantine-Checkbox-inner {
|
|
2039
|
-
width: 24px;
|
|
2040
|
-
height: 24px;
|
|
2041
|
-
display: flex;
|
|
2042
|
-
align-items: center;
|
|
2043
|
-
justify-content: center;
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
.mantine-Radio-body,
|
|
2047
|
-
.mantine-Checkbox-body {
|
|
2048
|
-
display: flex;
|
|
2049
|
-
align-items: center;
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
.mantine-Radio-label,
|
|
2053
|
-
.mantine-Checkbox-label {
|
|
2054
|
-
padding-left: 8px;
|
|
2055
|
-
color: ${miscTheme.theme.colors.gray800};
|
|
2056
|
-
font-size: 14px;
|
|
2057
|
-
line-height: 1.4;
|
|
2058
|
-
letter-spacing: -0.2px;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
.leadgen-choiceContainer {
|
|
2062
|
-
display: flex;
|
|
2063
|
-
flex-wrap: wrap;
|
|
2064
|
-
align-items: flex-start;
|
|
2065
|
-
gap: 8px;
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
.mantine-InputWrapper-error {
|
|
2069
|
-
${cssInputWrapperError$1}
|
|
2070
|
-
}
|
|
2071
|
-
`;
|
|
2072
|
-
|
|
2073
|
-
const TextField$1 = (props) => {
|
|
2074
|
-
const { shrink: shrinkProps, onChangeShrink, className, children } = props, restProps = tslib_es6.__rest(props, ["shrink", "onChangeShrink", "className", "children"]);
|
|
2075
|
-
const containerRef = hooks.useClickOutside(() => {
|
|
2076
|
-
if (shrinkProps) {
|
|
2077
|
-
return;
|
|
2078
|
-
}
|
|
2079
|
-
setShrink(false);
|
|
2080
|
-
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
|
|
2081
|
-
});
|
|
2082
|
-
const [shrink, setShrink] = React.useState(shrinkProps);
|
|
2083
|
-
const onClick = React.useCallback((e) => {
|
|
2084
|
-
setShrink(true);
|
|
2085
|
-
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
|
|
2086
|
-
if (shrink) {
|
|
2087
|
-
return;
|
|
2088
|
-
}
|
|
2089
|
-
const $textEl = e.currentTarget.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
|
|
2090
|
-
const $focusEl = $textEl.item($textEl.length - 1);
|
|
2091
|
-
if ($focusEl) {
|
|
2092
|
-
$focusEl.focus();
|
|
2093
|
-
setTimeout(() => {
|
|
2094
|
-
$focusEl.scrollIntoView({
|
|
2095
|
-
behavior: 'auto',
|
|
2096
|
-
block: 'center',
|
|
2097
|
-
inline: 'start',
|
|
2098
|
-
});
|
|
2099
|
-
}, 100);
|
|
2100
|
-
}
|
|
2101
|
-
}, [shrink]);
|
|
2102
|
-
React.useEffect(() => {
|
|
2103
|
-
setShrink(shrinkProps);
|
|
2104
|
-
}, [shrinkProps]);
|
|
2105
|
-
return (React__default["default"].createElement(StyledTextFieldContainer$1, Object.assign({ shrink: shrink, className: core.clsx(className, 'textField', { textField_shrink: !!shrink }) }, restProps),
|
|
2106
|
-
React__default["default"].createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, children)));
|
|
2107
|
-
};
|
|
2108
|
-
const ChoiceField$1 = (props) => {
|
|
2109
|
-
const { children, className } = props, restProps = tslib_es6.__rest(props, ["children", "className"]);
|
|
2110
|
-
return (React__default["default"].createElement(StyledChoiceFieldContainer$1, Object.assign({ className: core.clsx(className, 'choiceField') }, restProps), children));
|
|
2111
|
-
};
|
|
2112
|
-
|
|
2113
|
-
const libraries = ['places'];
|
|
2114
|
-
const GoogleLocationBlock = (props) => {
|
|
2115
|
-
var _a;
|
|
2116
|
-
const { inputWrapperOrder = ['label', 'input', 'description', 'error'], defaultValue, value: valueProps, onChange: onChangeProps, locale } = props, restProps = tslib_es6.__rest(props, ["inputWrapperOrder", "defaultValue", "value", "onChange", "locale"]);
|
|
2117
|
-
const [LoadScript, setLoadScript] = React.useState(null);
|
|
2118
|
-
const [value, setValue] = React.useState(defaultValue || valueProps);
|
|
2119
|
-
const { predictions } = usePlacesAutocomplete.usePlacesAutocomplete(value, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
|
|
2120
|
-
const onChangeAutocomplete = React.useCallback((s) => {
|
|
2121
|
-
setValue(s);
|
|
2122
|
-
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(s);
|
|
2123
|
-
}, []);
|
|
2124
|
-
const onClickItem = React.useCallback((item) => {
|
|
2125
|
-
/** For sure get value */
|
|
2126
|
-
setValue(item.value);
|
|
2127
|
-
const predCur = predictions === null || predictions === void 0 ? void 0 : predictions.find(({ description }) => description === item.value);
|
|
2128
|
-
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(item.value, predCur === null || predCur === void 0 ? void 0 : predCur.rawData);
|
|
2129
|
-
}, [onChangeProps, predictions]);
|
|
2130
|
-
React.useEffect(() => {
|
|
2131
|
-
setValue(valueProps);
|
|
2132
|
-
}, [valueProps]);
|
|
2133
|
-
React.useEffect(() => {
|
|
2134
|
-
var _a, _b, _c;
|
|
2135
|
-
// only load extra google script when not yet loaded
|
|
2136
|
-
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) {
|
|
2137
|
-
Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@react-google-maps/api')); }).then((m) => {
|
|
2138
|
-
setLoadScript(() => m.LoadScript);
|
|
2139
|
-
});
|
|
2140
|
-
}
|
|
2141
|
-
}, []);
|
|
2142
|
-
return (React__default["default"].createElement(core.Autocomplete, Object.assign({ defaultValue: defaultValue, value: value, onChange: onChangeAutocomplete, data: predictions.map((pred) => {
|
|
2143
|
-
return { value: pred.description, label: pred.description };
|
|
2144
|
-
}), filter: () => true, onItemSubmit: onClickItem, inputWrapperOrder: inputWrapperOrder, zIndex: index$7.ZINDEX_SSO - 9e6 + 2, withinPortal: true, styles: { dropdown: { pointerEvents: 'auto' } }, inputContainer: (children) => {
|
|
2145
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2146
|
-
LoadScript && (React__default["default"].createElement(LoadScript, { googleMapsApiKey: usePlacesAutocomplete.GOOGLE_API_KEY, libraries: libraries, loadingElement: React__default["default"].createElement(React__default["default"].Fragment, null), style: { width: '100%' } })),
|
|
2147
|
-
children));
|
|
2148
|
-
} }, restProps)));
|
|
2149
|
-
};
|
|
2150
|
-
|
|
2151
|
-
const LeadGenForm = React.forwardRef((props, ref) => {
|
|
2152
|
-
const { locale, blocks, scrollToErrorField = true, form: formProps, rules: validate, initialValues, onFinish, onFinishFailed, className, style, } = props;
|
|
2153
|
-
const formRef = React.useRef(null);
|
|
2154
|
-
const form$1 = formProps || form.useForm({ initialValues, validate });
|
|
2155
|
-
const middlewareFinish = (values, event) => {
|
|
2156
|
-
onFinish === null || onFinish === void 0 ? void 0 : onFinish(values, event);
|
|
2157
|
-
};
|
|
2158
|
-
const middlewareFinishFailed = (errors, values, events) => {
|
|
2159
|
-
if (scrollToErrorField && errors) {
|
|
2160
|
-
const firstErrorKey = Object.keys(errors)[0];
|
|
2161
|
-
const firstErrorElement = document.querySelector(`[name="${firstErrorKey}"]`);
|
|
2162
|
-
if (firstErrorElement && (firstErrorElement === null || firstErrorElement === void 0 ? void 0 : firstErrorElement.focus)) {
|
|
2163
|
-
setTimeout(() => {
|
|
2164
|
-
firstErrorElement === null || firstErrorElement === void 0 ? void 0 : firstErrorElement.focus();
|
|
2165
|
-
firstErrorElement.scrollIntoView({
|
|
2166
|
-
behavior: 'auto',
|
|
2167
|
-
block: 'center',
|
|
2168
|
-
inline: 'center',
|
|
2169
|
-
});
|
|
2170
|
-
}, 100);
|
|
2171
|
-
}
|
|
2172
|
-
}
|
|
2173
|
-
onFinishFailed === null || onFinishFailed === void 0 ? void 0 : onFinishFailed(errors, values, events);
|
|
2174
|
-
};
|
|
2175
|
-
React.useEffect(() => {
|
|
2176
|
-
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2177
|
-
if (!window.intlTelInputUtils) {
|
|
2178
|
-
yield require('intl-tel-input/build/js/utils');
|
|
2179
|
-
}
|
|
2180
|
-
}))();
|
|
2181
|
-
}, []);
|
|
2182
|
-
React.useImperativeHandle(ref, () => (Object.assign(Object.assign({}, form$1), { submit: () => formRef.current.requestSubmit() })), [form$1, formRef]);
|
|
2183
|
-
if (!blocks || !blocks.length) {
|
|
2184
|
-
return null;
|
|
2185
|
-
}
|
|
2186
|
-
return (React__default["default"].createElement("form", { ref: formRef, onSubmit: form$1.onSubmit(middlewareFinish, middlewareFinishFailed), className: className, style: style },
|
|
2187
|
-
React__default["default"].createElement(StyledLeadGenFormInner, { className: "leadgen-form_inputs" }, blocks.map((block, idx) => {
|
|
2188
|
-
const { id, name: blockName, data } = block;
|
|
2189
|
-
const { placeholder, value: name, required, listQuestion, valueHTML, isSendMailChimp = false, } = data;
|
|
2190
|
-
const formInputProps = form$1.getInputProps(name);
|
|
2191
|
-
const { value, error } = formInputProps;
|
|
2192
|
-
const reactKey = `${id}-${idx}`;
|
|
2193
|
-
switch (blockName) {
|
|
2194
|
-
case LEADGEN_BLOCK.TextBlock: {
|
|
2195
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2196
|
-
React__default["default"].createElement(core.TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "text", "data-control": "text" }, formInputProps))));
|
|
2197
|
-
}
|
|
2198
|
-
case LEADGEN_BLOCK.NumberBlock: {
|
|
2199
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2200
|
-
React__default["default"].createElement(core.NumberInput, Object.assign({ name: value, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "number", "data-control": "number" }, formInputProps))));
|
|
2201
|
-
}
|
|
2202
|
-
case LEADGEN_BLOCK.EmailBlock: {
|
|
2203
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2204
|
-
React__default["default"].createElement(core.TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, "data-control": "email" }, formInputProps))));
|
|
2205
|
-
}
|
|
2206
|
-
case LEADGEN_BLOCK.PhoneOtpBlock:
|
|
2207
|
-
case LEADGEN_BLOCK.WhatsappOtpBlock:
|
|
2208
|
-
case LEADGEN_BLOCK.ZaloOtpBlock:
|
|
2209
|
-
case LEADGEN_BLOCK.PhoneBlock: {
|
|
2210
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2211
|
-
React__default["default"].createElement(PhoneInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), type: "text", "data-control": "text" }, formInputProps))));
|
|
2212
|
-
}
|
|
2213
|
-
case LEADGEN_BLOCK.LocationBlock: {
|
|
2214
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2215
|
-
React__default["default"].createElement(GoogleLocationBlock, Object.assign({ name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, locale: locale, "data-control": "text" }, formInputProps))));
|
|
2216
|
-
}
|
|
2217
|
-
case LEADGEN_BLOCK.DateBlock: {
|
|
2218
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2219
|
-
React__default["default"].createElement(dates.DateInput, Object.assign({ locale: (utils.MAPPED_LOCALE === null || utils.MAPPED_LOCALE === void 0 ? void 0 : utils.MAPPED_LOCALE[locale]) || utils.MAPPED_LOCALE['vi-VN'], valueFormat: "DD/MM/YYYY", name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "default", "data-control": "date" }, formInputProps))));
|
|
2220
|
-
}
|
|
2221
|
-
case LEADGEN_BLOCK.DropdownBlock:
|
|
2222
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2223
|
-
React__default["default"].createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown' }),
|
|
2224
|
-
React__default["default"].createElement(core.Select, Object.assign({ name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, data: listQuestion.map((l) => ({
|
|
2225
|
-
value: l.value,
|
|
2226
|
-
label: l.placeholder,
|
|
2227
|
-
})) }, formInputProps))));
|
|
2228
|
-
case LEADGEN_BLOCK.CheckboxBlock: {
|
|
2229
|
-
const formInputCheckboxProps = form$1.getInputProps(name, {
|
|
2230
|
-
type: 'checkbox',
|
|
2231
|
-
});
|
|
2232
|
-
return (React__default["default"].createElement(ChoiceField$1, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
2233
|
-
isSendMailChimp && (React__default["default"].createElement("div", { style: { display: 'none' }, "data-name": name + '-mailchimp' })),
|
|
2234
|
-
React__default["default"].createElement(core.Checkbox.Group, Object.assign({ size: "md", withAsterisk: required, label: placeholder, value: value, sx: {
|
|
2235
|
-
display: 'flex',
|
|
2236
|
-
flexDirection: 'column',
|
|
2237
|
-
flexWrap: 'wrap',
|
|
2238
|
-
gap: 8,
|
|
2239
|
-
}, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, inputContainer: (children) => {
|
|
2240
|
-
return (React__default["default"].createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
2241
|
-
} }, formInputCheckboxProps), listQuestion.map((l, _idx) => (React__default["default"].createElement(core.Checkbox, { name: name, key: _idx, value: l.value, label: l.placeholder, "data-control": "checkbox" }))))));
|
|
2242
|
-
}
|
|
2243
|
-
case LEADGEN_BLOCK.RadioBlock: {
|
|
2244
|
-
return (React__default["default"].createElement(ChoiceField$1, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
2245
|
-
isSendMailChimp && (React__default["default"].createElement("div", { style: { display: 'none' }, "data-name": name + '-mailchimp' })),
|
|
2246
|
-
React__default["default"].createElement(core.Radio.Group, Object.assign({ size: "md", withAsterisk: required, label: placeholder, value: value, spellCheck: true, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, inputContainer: (children) => {
|
|
2247
|
-
return (React__default["default"].createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
2248
|
-
} }, formInputProps), listQuestion.map((l, _index) => (React__default["default"].createElement(core.Radio, { name: name, key: _index, value: l.value, label: l.placeholder, "data-control": "radio" }))))));
|
|
2249
|
-
}
|
|
2250
|
-
case 'TncBlock':
|
|
2251
|
-
return (React__default["default"].createElement(ChoiceField$1, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
2252
|
-
React__default["default"].createElement(core.Input.Wrapper, { error: error },
|
|
2253
|
-
React__default["default"].createElement(core.Checkbox, Object.assign({ value: value, name: 'TNC-' + id, label: React__default["default"].createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: valueHTML } }), className: "tnc-block", "data-control": "checkbox" }, formInputProps)))));
|
|
2254
|
-
default: {
|
|
2255
|
-
return null;
|
|
2256
|
-
}
|
|
2257
|
-
}
|
|
2258
|
-
}))));
|
|
2259
|
-
});
|
|
2260
|
-
|
|
2261
|
-
const LEADGEN_ORDER_INPUT_WRAPPER = ['label', 'input', 'description', 'error'];
|
|
2262
|
-
|
|
2263
|
-
const StyledLeadGenThankYou = styled__default["default"].div `
|
|
2264
|
-
display: flex;
|
|
2265
|
-
gap: 8px;
|
|
2266
|
-
flex-direction: column;
|
|
2267
|
-
padding-block: 24px;
|
|
2268
|
-
|
|
2269
|
-
.leadgen-image {
|
|
2270
|
-
width: 120px;
|
|
2271
|
-
height: 120px;
|
|
2272
|
-
margin-inline: auto;
|
|
2273
|
-
object-fit: contain;
|
|
2274
|
-
object-position: center;
|
|
2275
|
-
text-align: center;
|
|
2276
|
-
}
|
|
2277
|
-
|
|
2278
|
-
.leadgen-title {
|
|
2279
|
-
margin-block: 0;
|
|
2280
|
-
color: ${miscTheme.theme.colors.gray900};
|
|
2281
|
-
font-weight: 700;
|
|
2282
|
-
font-size: 18px;
|
|
2283
|
-
line-height: 28px;
|
|
2284
|
-
letter-spacing: -0.2px;
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
.leadgen-description {
|
|
2288
|
-
margin-block: 0;
|
|
2289
|
-
color: ${miscTheme.theme.colors.gray600};
|
|
2290
|
-
font-weight: 400;
|
|
2291
|
-
font-size: 14px;
|
|
2292
|
-
line-height: 22px;
|
|
2293
|
-
letter-spacing: -0.2px;
|
|
2294
|
-
text-align: center;
|
|
2295
|
-
}
|
|
2296
|
-
|
|
2297
|
-
> [data-align] {
|
|
2298
|
-
&[data-align='right'] {
|
|
2299
|
-
text-align: right;
|
|
2300
|
-
}
|
|
2301
|
-
&[data-align='center'] {
|
|
2302
|
-
text-align: center;
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
`;
|
|
2306
|
-
const LeadGenThankYou = ({ image, title, description, showButton = false, button, className, style, }) => {
|
|
2307
|
-
const { src } = image;
|
|
2308
|
-
const { htmlText: titleText, align: titleAlign } = title;
|
|
2309
|
-
const { htmlText: descriptionText, align: descriptionAlign } = description;
|
|
2310
|
-
const { htmlText: buttonText, newtab, url, onClick } = button;
|
|
2311
|
-
return (React__default["default"].createElement(StyledLeadGenThankYou, { className: className, style: style },
|
|
2312
|
-
React__default["default"].createElement("img", { src: src, alt: "", className: "leadgen-thankyou_image leadgen-image" }),
|
|
2313
|
-
React__default["default"].createElement("p", { className: "leadgen-thankyou_title leadgen-title", "data-align": titleAlign }, titleText),
|
|
2314
|
-
React__default["default"].createElement("p", { className: "leadgen-thankyou_description leadgen-description", "data-align": descriptionAlign }, descriptionText),
|
|
2315
|
-
!!buttonText && showButton && (React__default["default"].createElement(core.Button, { component: url ? 'a' : 'button', target: newtab ? '_blank' : undefined, href: url, size: "lg", variant: "filled", className: "leadgen-thankyoue_btn leadgen-btn", onClick: onClick }, buttonText))));
|
|
2316
|
-
};
|
|
2317
|
-
|
|
2318
|
-
const StyledLeadGenSubscriptionBoxBody = styled__default["default"].div `
|
|
2319
|
-
margin-top: 16px;
|
|
2320
|
-
.leadgen-btn {
|
|
2321
|
-
margin-top: 16px;
|
|
2322
|
-
}
|
|
2323
|
-
`;
|
|
2324
|
-
const StyledLeadGenSubscriptionBoxHeaderImage = styled__default["default"].div `
|
|
2325
|
-
margin-top: 3px;
|
|
2326
|
-
margin-right: 20px;
|
|
2327
|
-
width: 44px;
|
|
2328
|
-
height: 44px;
|
|
2329
|
-
|
|
2330
|
-
img {
|
|
2331
|
-
width: 100%;
|
|
2332
|
-
height: 100%;
|
|
2333
|
-
object-fix: contain;
|
|
2334
|
-
onject-position: center;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
:has(img[src='']) {
|
|
2338
|
-
display: none;
|
|
2339
|
-
}
|
|
2340
|
-
`;
|
|
2341
|
-
const StyledLeadGenSubscriptionBoxHeader = styled__default["default"].div `
|
|
2342
|
-
display: flex;
|
|
2343
|
-
align-items: center;
|
|
2344
|
-
margin-bottom: 16px;
|
|
2345
|
-
.leadgen-title {
|
|
2346
|
-
margin-bottom: 0;
|
|
2347
|
-
flex: 1;
|
|
2348
|
-
min-width: 0;
|
|
2349
|
-
color: ${miscTheme.theme.colors.gray900};
|
|
2350
|
-
font-size: 18px;
|
|
2351
|
-
font-weight: 600;
|
|
2352
|
-
line-height: 1.4;
|
|
2353
|
-
letter-spacing: -0.8px;
|
|
2354
|
-
}
|
|
2355
|
-
`;
|
|
2356
|
-
const StyledLeadGenSubscriptionBox = styled__default["default"].div `
|
|
2357
|
-
padding: 16px;
|
|
2358
|
-
border: 1px solid ${miscTheme.theme.colors.neutral100};
|
|
2359
|
-
border-radius: 12px;
|
|
2360
|
-
margin-inline: auto;
|
|
2361
|
-
.leadgen-form_inputs {
|
|
2362
|
-
.leadgen-form_input {
|
|
2363
|
-
width: 100%;
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
|
|
2367
|
-
.leadgen-form_input {
|
|
2368
|
-
.mantine-Input-wrapper {
|
|
2369
|
-
max-height: 56px;
|
|
2370
|
-
}
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
@media screen and (min-width: 768px) {
|
|
2374
|
-
.leadgen-subscription_box_body {
|
|
2375
|
-
display: flex;
|
|
2376
|
-
> form {
|
|
2377
|
-
flex: 1;
|
|
2378
|
-
min-width: 0;
|
|
2379
|
-
|
|
2380
|
-
.leadgen-form_inputs {
|
|
2381
|
-
.leadgen-form_input {
|
|
2382
|
-
width: calc(50% - 4px);
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
}
|
|
2386
|
-
|
|
2387
|
-
.leadgen-btn {
|
|
2388
|
-
margin-top: 0;
|
|
2389
|
-
margin-left: 8px;
|
|
2390
|
-
width: auto;
|
|
2391
|
-
min-height: 56px;
|
|
2392
|
-
}
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
`;
|
|
2396
|
-
const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, siteId, siteDomain, forceCampaign, campaign_code, article_id, subscription_title: subscriptionTitleProps, }) => {
|
|
2397
|
-
var _a, _b, _c;
|
|
2398
|
-
const refContainer = React.useRef(null);
|
|
2399
|
-
const validatingEmailRef = React.useRef(false);
|
|
2400
|
-
const validatingPhoneRef = React.useRef(false);
|
|
2401
|
-
const { image, extra_fields, id: campaign_id, bot_id: campaign_subot_id = [], ThankYouBlock, } = forceCampaign || {};
|
|
2402
|
-
const { textBlocks, listBlockAdded, actionBlocks } = extra_fields || {};
|
|
2403
|
-
const { submitBlock } = actionBlocks || {};
|
|
2404
|
-
const [loading, setLoading] = React.useState(false);
|
|
2405
|
-
const [showThankyou, setShowThankyou] = React.useState(false);
|
|
2406
|
-
const formRef = React.useRef(null);
|
|
2407
|
-
const { form, validateObj } = useLeadFormConfig({
|
|
2408
|
-
listBlockAdded,
|
|
2409
|
-
campaignId: campaign_id,
|
|
2410
|
-
campaign_subot_id,
|
|
2411
|
-
validatingEmailRef,
|
|
2412
|
-
validatingPhoneRef,
|
|
2413
|
-
userInfo,
|
|
2414
|
-
});
|
|
2415
|
-
const subscription_title = React.useMemo(() => { var _a, _b; return subscriptionTitleProps || ((_b = (_a = textBlocks === null || textBlocks === void 0 ? void 0 : textBlocks.titleBlock) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.value); }, [subscriptionTitleProps, (_b = (_a = textBlocks === null || textBlocks === void 0 ? void 0 : textBlocks.titleBlock) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.value]);
|
|
2416
|
-
const { image: thankyouImage, title: thankyouTitle, description: thankyouDescription, button: thankyouButton, } = ThankYouBlock || {};
|
|
2417
|
-
const { apiUrl } = React.useMemo(() => {
|
|
2418
|
-
let apiUrl = leadStore.apiLeadUrl;
|
|
2419
|
-
if (apiUrl.includes('localhost')) {
|
|
2420
|
-
apiUrl = 'https://dev.leadgen.hellobacsi.com/';
|
|
2421
|
-
}
|
|
2422
|
-
return {
|
|
2423
|
-
apiUrl,
|
|
2424
|
-
};
|
|
2425
|
-
}, [siteDomain, siteId]);
|
|
2426
|
-
const url = React.useMemo(() => location.href.toLowerCase() || '', []);
|
|
2427
|
-
const article_title = React.useMemo(() => document.title || '', []);
|
|
2428
|
-
const cookie_id = React.useMemo(() => miscCookieHelper.getCookie('hhg-id') || null, []);
|
|
2429
|
-
const ga_client_id = React.useMemo(() => miscCookieHelper.getCookie('_ga') || null, []);
|
|
2430
|
-
const leadgenImpression = React.useCallback(() => {
|
|
2431
|
-
Service.campaignPostImpression({
|
|
2432
|
-
url,
|
|
2433
|
-
action: LEADGEN_ACTIONS.SCROLL,
|
|
2434
|
-
code: campaign_code,
|
|
2435
|
-
title_article: article_title,
|
|
2436
|
-
cookie_id,
|
|
2437
|
-
ga_client_id,
|
|
2438
|
-
extra: { cookie_id, article_id, subscription_title },
|
|
2439
|
-
});
|
|
2440
|
-
}, [
|
|
2441
|
-
article_id,
|
|
2442
|
-
article_title,
|
|
2443
|
-
cookie_id,
|
|
2444
|
-
ga_client_id,
|
|
2445
|
-
campaign_code,
|
|
2446
|
-
subscription_title,
|
|
2447
|
-
]);
|
|
2448
|
-
const intersectionObserverCallback = React.useCallback((entries) => {
|
|
2449
|
-
entries.forEach((entry) => {
|
|
2450
|
-
const { isIntersecting, target } = entry;
|
|
2451
|
-
if (isIntersecting && target === refContainer.current) {
|
|
2452
|
-
leadgenImpression();
|
|
2453
|
-
}
|
|
2454
|
-
});
|
|
2455
|
-
}, [leadgenImpression]);
|
|
2456
|
-
const IObserver = new IntersectionObserver(intersectionObserverCallback);
|
|
2457
|
-
const middlewareOnSubmit = React.useCallback((value) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2458
|
-
const newValue = {
|
|
2459
|
-
url,
|
|
2460
|
-
article_title,
|
|
2461
|
-
cookie_id,
|
|
2462
|
-
ga_client_id,
|
|
2463
|
-
article_id,
|
|
2464
|
-
campaign_id,
|
|
2465
|
-
campaign_code,
|
|
2466
|
-
subscription_title: subscription_title,
|
|
2467
|
-
};
|
|
2468
|
-
listBlockAdded.forEach(({ data: { value: k } }) => {
|
|
2469
|
-
newValue[k] = value[k];
|
|
2470
|
-
});
|
|
2471
|
-
setLoading(true);
|
|
2472
|
-
try {
|
|
2473
|
-
const { _data } = (yield Service.campaignPostLead({ data: newValue })) || {};
|
|
2474
|
-
const { model } = _data;
|
|
2475
|
-
if (model && model.id) {
|
|
2476
|
-
setShowThankyou(true);
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
catch (error) {
|
|
2480
|
-
console.log('** Error : ', error);
|
|
2481
|
-
}
|
|
2482
|
-
setLoading(false);
|
|
2483
|
-
}), [
|
|
2484
|
-
url,
|
|
2485
|
-
article_id,
|
|
2486
|
-
article_title,
|
|
2487
|
-
cookie_id,
|
|
2488
|
-
ga_client_id,
|
|
2489
|
-
campaign_code,
|
|
2490
|
-
subscription_title,
|
|
2491
|
-
listBlockAdded,
|
|
2492
|
-
]);
|
|
2493
|
-
React.useEffect(() => {
|
|
2494
|
-
if (refContainer.current) {
|
|
2495
|
-
IObserver.observe(refContainer.current);
|
|
2496
|
-
}
|
|
2497
|
-
return () => {
|
|
2498
|
-
IObserver.disconnect();
|
|
2499
|
-
};
|
|
2500
|
-
}, [
|
|
2501
|
-
url,
|
|
2502
|
-
article_id,
|
|
2503
|
-
article_title,
|
|
2504
|
-
ga_client_id,
|
|
2505
|
-
campaign_id,
|
|
2506
|
-
campaign_code,
|
|
2507
|
-
subscription_title,
|
|
2508
|
-
]);
|
|
2509
|
-
return (React__default["default"].createElement("div", { ref: refContainer },
|
|
2510
|
-
React__default["default"].createElement(StyledLeadGenSubscriptionBox, null,
|
|
2511
|
-
showThankyou && (React__default["default"].createElement(LeadGenThankYou, { image: Object.assign(Object.assign({}, thankyouImage), { src: thankyouImage.src || `${apiUrl}admin/img/thanksyou.png` }), title: thankyouTitle, description: thankyouDescription, button: thankyouButton })),
|
|
2512
|
-
!showThankyou && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2513
|
-
React__default["default"].createElement(StyledLeadGenSubscriptionBoxHeader, null,
|
|
2514
|
-
!!image && (React__default["default"].createElement(StyledLeadGenSubscriptionBoxHeaderImage, null,
|
|
2515
|
-
React__default["default"].createElement("img", { src: image, alt: "" }))),
|
|
2516
|
-
React__default["default"].createElement("p", { className: "leadgen-title" }, subscription_title)),
|
|
2517
|
-
React__default["default"].createElement(StyledLeadGenSubscriptionBoxBody, { className: "leadgen-subscription_box_body" },
|
|
2518
|
-
React__default["default"].createElement(LeadGenForm, { ref: formRef, form: form, rules: validateObj, blocks: listBlockAdded, locale: locale, onFinish: middlewareOnSubmit }),
|
|
2519
|
-
React__default["default"].createElement(core.Button, { disabled: loading, loading: loading, variant: "filled", size: "lg", onClick: () => { var _a; return (_a = formRef.current) === null || _a === void 0 ? void 0 : _a.submit(); }, className: "leadgen-btn leadgen-btn_action", fullWidth: true }, (_c = submitBlock === null || submitBlock === void 0 ? void 0 : submitBlock.data) === null || _c === void 0 ? void 0 : _c.value)))))));
|
|
2520
|
-
};
|
|
2521
|
-
const LeadGenSubscriptionBoxWithMemo = React.memo(LeadGenSubscriptionBoxWithoutMemo);
|
|
2522
|
-
|
|
2523
|
-
const Container = () => {
|
|
2524
|
-
const context = React.useContext(LeadGenSubscriptionBoxContext);
|
|
2525
|
-
const {
|
|
2526
|
-
// apiUrl: apiUrlProps,
|
|
2527
|
-
// apiSubotUrl,
|
|
2528
|
-
campaign_code, article_id, subscription_title, locale, siteId, siteDomain, userInfo, forceCampaign, } = context;
|
|
2529
|
-
if (!forceCampaign || !(forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id)) {
|
|
2530
|
-
return null;
|
|
2531
|
-
}
|
|
2532
|
-
return (React__default["default"].createElement(LeadGenSubscriptionBoxWithMemo, { locale: locale, userInfo: userInfo, siteId: siteId, siteDomain: siteDomain, forceCampaign: forceCampaign, campaign_code: campaign_code, article_id: article_id, subscription_title: subscription_title }));
|
|
2533
|
-
};
|
|
2534
|
-
Container.displayName = 'LeadGenSubscriptionBox';
|
|
2535
|
-
const LeadGenSubscriptionBoxContainer = (props) => {
|
|
2536
|
-
const { campaign_code } = props;
|
|
2537
|
-
if (!campaign_code) {
|
|
2538
|
-
return null;
|
|
2539
|
-
}
|
|
2540
|
-
return (React__default["default"].createElement(LeadGenSubscriptionBoxProvider, Object.assign({}, props),
|
|
2541
|
-
React__default["default"].createElement(Container, null)));
|
|
2542
|
-
};
|
|
2543
|
-
const LeadGenSubscriptionBox = LeadGenSubscriptionBoxContainer;
|
|
2544
|
-
|
|
2545
|
-
const useImageSize = (src) => {
|
|
2546
|
-
const [width, setWidth] = React.useState(16);
|
|
2547
|
-
const [height, setHeight] = React.useState(9);
|
|
2548
|
-
const [loaded, setLoaded] = React.useState(false);
|
|
2549
|
-
// load src image to get its width and height
|
|
2550
|
-
React.useEffect(() => {
|
|
2551
|
-
setLoaded(false);
|
|
2552
|
-
if (src) {
|
|
2553
|
-
const img = new Image();
|
|
2554
|
-
img.addEventListener('load', () => {
|
|
2555
|
-
setWidth(img.naturalWidth);
|
|
2556
|
-
setHeight(img.naturalHeight);
|
|
2557
|
-
setLoaded(true);
|
|
2558
|
-
});
|
|
2559
|
-
img.addEventListener('error', () => {
|
|
2560
|
-
setWidth(16);
|
|
2561
|
-
setHeight(9);
|
|
2562
|
-
setLoaded(true);
|
|
2563
|
-
});
|
|
2564
|
-
img.src = src;
|
|
2565
|
-
}
|
|
2566
|
-
else {
|
|
2567
|
-
setWidth(16);
|
|
2568
|
-
setHeight(9);
|
|
2569
|
-
setLoaded(true);
|
|
2570
|
-
}
|
|
2571
|
-
}, [src]);
|
|
2572
|
-
return {
|
|
2573
|
-
loaded,
|
|
2574
|
-
width,
|
|
2575
|
-
height,
|
|
2576
|
-
};
|
|
2577
|
-
};
|
|
2578
|
-
|
|
2579
|
-
const CloseButton = ({ onClose, containerClassName, svgClassName, }) => (React__default["default"].createElement("button", { onClick: onClose, className: `le-newbuilder-close-button js-modal__close ${containerClassName || ''}` },
|
|
2580
|
-
React__default["default"].createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", className: svgClassName },
|
|
2581
|
-
React__default["default"].createElement("path", { d: "M9.99981 10.8432L14.0583 14.9017C14.1691 15.0125 14.3083 15.0691 14.476 15.0717C14.6437 15.0743 14.7854 15.0176 14.9013 14.9017C15.0172 14.7858 15.0752 14.6453 15.0752 14.4802C15.0752 14.3151 15.0172 14.1746 14.9013 14.0587L10.8429 10.0002L14.9013 5.9417C15.0121 5.83094 15.0688 5.69172 15.0713 5.52402C15.0739 5.35634 15.0172 5.21456 14.9013 5.09866C14.7854 4.98276 14.6449 4.9248 14.4798 4.9248C14.3147 4.9248 14.1742 4.98276 14.0583 5.09866L9.99981 9.15712L5.94133 5.09866C5.83057 4.98789 5.69135 4.93122 5.52365 4.92866C5.35598 4.92609 5.21419 4.98276 5.09829 5.09866C4.98239 5.21456 4.92444 5.35506 4.92444 5.52018C4.92444 5.6853 4.98239 5.82581 5.09829 5.9417L9.15675 10.0002L5.09829 14.0587C4.98752 14.1694 4.93085 14.3087 4.9283 14.4763C4.92572 14.644 4.98239 14.7858 5.09829 14.9017C5.21419 15.0176 5.3547 15.0756 5.51982 15.0756C5.68493 15.0756 5.82544 15.0176 5.94133 14.9017L9.99981 10.8432Z" }))));
|
|
1401
|
+
const CloseButton = ({ onClose, containerClassName, svgClassName, }) => (React__default["default"].createElement("button", { onClick: onClose, className: `le-newbuilder-close-button js-modal__close ${containerClassName || ''}` },
|
|
1402
|
+
React__default["default"].createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", className: svgClassName },
|
|
1403
|
+
React__default["default"].createElement("path", { d: "M9.99981 10.8432L14.0583 14.9017C14.1691 15.0125 14.3083 15.0691 14.476 15.0717C14.6437 15.0743 14.7854 15.0176 14.9013 14.9017C15.0172 14.7858 15.0752 14.6453 15.0752 14.4802C15.0752 14.3151 15.0172 14.1746 14.9013 14.0587L10.8429 10.0002L14.9013 5.9417C15.0121 5.83094 15.0688 5.69172 15.0713 5.52402C15.0739 5.35634 15.0172 5.21456 14.9013 5.09866C14.7854 4.98276 14.6449 4.9248 14.4798 4.9248C14.3147 4.9248 14.1742 4.98276 14.0583 5.09866L9.99981 9.15712L5.94133 5.09866C5.83057 4.98789 5.69135 4.93122 5.52365 4.92866C5.35598 4.92609 5.21419 4.98276 5.09829 5.09866C4.98239 5.21456 4.92444 5.35506 4.92444 5.52018C4.92444 5.6853 4.98239 5.82581 5.09829 5.9417L9.15675 10.0002L5.09829 14.0587C4.98752 14.1694 4.93085 14.3087 4.9283 14.4763C4.92572 14.644 4.98239 14.7858 5.09829 14.9017C5.21419 15.0176 5.3547 15.0756 5.51982 15.0756C5.68493 15.0756 5.82544 15.0176 5.94133 14.9017L9.99981 10.8432Z" }))));
|
|
2582
1404
|
|
|
2583
1405
|
// url: imageBlocks.imageMobile.data.url
|
|
2584
1406
|
// newTab: imageBlocks.imageMobile.data.newtab
|
|
@@ -2593,11 +1415,11 @@ const CenterTabLayout = ({ popupId, url, newTab, imageDestkop, imageMobile, onCl
|
|
|
2593
1415
|
React__default["default"].createElement("div", { className: "le-center-tab-popup" },
|
|
2594
1416
|
React__default["default"].createElement("div", { style: { position: 'relative' } },
|
|
2595
1417
|
React__default["default"].createElement("a", { className: "js-popup-other-submit", href: url, target: newTab ? 'blank' : '_parent', onClick: onOtherSubmit },
|
|
2596
|
-
index$
|
|
1418
|
+
index$7.isVideo(imageMobile) ? (React__default["default"].createElement("video", { loop: true, muted: true, autoPlay: true, className: "le-only-mobile" },
|
|
2597
1419
|
React__default["default"].createElement("source", { src: imageMobile }))) : (React__default["default"].createElement("img", { className: "le-only-mobile", src: imageMobile, style: {
|
|
2598
1420
|
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2599
1421
|
} })),
|
|
2600
|
-
index$
|
|
1422
|
+
index$7.isVideo(imageDestkop) ? (React__default["default"].createElement("video", { loop: true, muted: true, autoPlay: true, className: "le-only-desktop" },
|
|
2601
1423
|
React__default["default"].createElement("source", { src: imageDestkop }))) : (React__default["default"].createElement("img", { className: "le-only-desktop", src: imageDestkop, style: {
|
|
2602
1424
|
aspectRatio: `${imageDestkopWidth}/${imageDestkopHeight}`,
|
|
2603
1425
|
} }))),
|
|
@@ -2823,6 +1645,211 @@ const EmptyComponent = ({ onClose, onContinue, }) => {
|
|
|
2823
1645
|
React__default["default"].createElement(core.Button, { onClick: onContinue, size: "lg", variant: "filled", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_again" }, t('lead.empty.submitAgain')))));
|
|
2824
1646
|
};
|
|
2825
1647
|
|
|
1648
|
+
const libraries = ['places'];
|
|
1649
|
+
const GoogleLocationBlock = (props) => {
|
|
1650
|
+
var _a;
|
|
1651
|
+
const { inputWrapperOrder = ['label', 'input', 'description', 'error'], defaultValue, value: valueProps, onChange: onChangeProps, locale } = props, restProps = tslib_es6.__rest(props, ["inputWrapperOrder", "defaultValue", "value", "onChange", "locale"]);
|
|
1652
|
+
const [LoadScript, setLoadScript] = React.useState(null);
|
|
1653
|
+
const [value, setValue] = React.useState(defaultValue || valueProps);
|
|
1654
|
+
const { predictions } = usePlacesAutocomplete.usePlacesAutocomplete(value, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
|
|
1655
|
+
const onChangeAutocomplete = React.useCallback((s) => {
|
|
1656
|
+
setValue(s);
|
|
1657
|
+
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(s);
|
|
1658
|
+
}, []);
|
|
1659
|
+
const onClickItem = React.useCallback((item) => {
|
|
1660
|
+
/** For sure get value */
|
|
1661
|
+
setValue(item.value);
|
|
1662
|
+
const predCur = predictions === null || predictions === void 0 ? void 0 : predictions.find(({ description }) => description === item.value);
|
|
1663
|
+
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(item.value, predCur === null || predCur === void 0 ? void 0 : predCur.rawData);
|
|
1664
|
+
}, [onChangeProps, predictions]);
|
|
1665
|
+
React.useEffect(() => {
|
|
1666
|
+
setValue(valueProps);
|
|
1667
|
+
}, [valueProps]);
|
|
1668
|
+
React.useEffect(() => {
|
|
1669
|
+
var _a, _b, _c;
|
|
1670
|
+
// only load extra google script when not yet loaded
|
|
1671
|
+
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) {
|
|
1672
|
+
Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@react-google-maps/api')); }).then((m) => {
|
|
1673
|
+
setLoadScript(() => m.LoadScript);
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
}, []);
|
|
1677
|
+
return (React__default["default"].createElement(core.Autocomplete, Object.assign({ defaultValue: defaultValue, value: value, onChange: onChangeAutocomplete, data: predictions.map((pred) => {
|
|
1678
|
+
return { value: pred.description, label: pred.description };
|
|
1679
|
+
}), filter: () => true, onItemSubmit: onClickItem, inputWrapperOrder: inputWrapperOrder, zIndex: index$8.ZINDEX_SSO - 9e6 + 2, withinPortal: true, styles: { dropdown: { pointerEvents: 'auto' } }, inputContainer: (children) => {
|
|
1680
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1681
|
+
LoadScript && (React__default["default"].createElement(LoadScript, { googleMapsApiKey: usePlacesAutocomplete.GOOGLE_API_KEY, libraries: libraries, loadingElement: React__default["default"].createElement(React__default["default"].Fragment, null), style: { width: '100%' } })),
|
|
1682
|
+
children));
|
|
1683
|
+
} }, restProps)));
|
|
1684
|
+
};
|
|
1685
|
+
|
|
1686
|
+
// You can give context variables any name
|
|
1687
|
+
const [LeadFormProvider, useLeadFormContext, useLeadForm] = form.createFormContext();
|
|
1688
|
+
const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validatingEmailRef, campaignId, campaign_subot_id = [], userInfo, }) => {
|
|
1689
|
+
const { t } = index.useTranslations();
|
|
1690
|
+
const initialValues = React.useMemo(() => mappingSSOToLead(userInfo), [userInfo === null || userInfo === void 0 ? void 0 : userInfo.id]);
|
|
1691
|
+
const validateObj = React.useMemo(() => {
|
|
1692
|
+
const InputBlocks = [
|
|
1693
|
+
'TextBlock',
|
|
1694
|
+
'NumberBlock',
|
|
1695
|
+
'EmailBlock',
|
|
1696
|
+
'PhoneBlock',
|
|
1697
|
+
'DateBlock',
|
|
1698
|
+
'CheckboxBlock',
|
|
1699
|
+
'RadioBlock',
|
|
1700
|
+
'DropdownBlock',
|
|
1701
|
+
'PhoneOtpBlock',
|
|
1702
|
+
'WhatsappOtpBlock',
|
|
1703
|
+
'ZaloOtpBlock',
|
|
1704
|
+
'LocationBlock',
|
|
1705
|
+
'TncBlock',
|
|
1706
|
+
];
|
|
1707
|
+
// ALL are required and can skip if not touched yet
|
|
1708
|
+
const withSharedCheck = (name, cb,
|
|
1709
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1710
|
+
block) => {
|
|
1711
|
+
return (value) => {
|
|
1712
|
+
var _a;
|
|
1713
|
+
const isBLockRequired = (_a = block === null || block === void 0 ? void 0 : block.data) === null || _a === void 0 ? void 0 : _a.required;
|
|
1714
|
+
if (!formRef.current.isTouched(name))
|
|
1715
|
+
return;
|
|
1716
|
+
if ((typeof value === 'string' && value.replace(' ', '') === '') ||
|
|
1717
|
+
typeof value === 'undefined' ||
|
|
1718
|
+
value === '' ||
|
|
1719
|
+
(Array.isArray(value) && value.length === 0)) {
|
|
1720
|
+
return isBLockRequired
|
|
1721
|
+
? t('validator.required')
|
|
1722
|
+
: cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1723
|
+
}
|
|
1724
|
+
return cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1725
|
+
};
|
|
1726
|
+
};
|
|
1727
|
+
return listBlockAdded
|
|
1728
|
+
.filter((b) => InputBlocks.includes(b.name))
|
|
1729
|
+
.reduce((r, b) => {
|
|
1730
|
+
var _a;
|
|
1731
|
+
const isRequired = (_a = b.data.required) !== null && _a !== void 0 ? _a : true;
|
|
1732
|
+
if (b.name === 'NumberBlock') {
|
|
1733
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1734
|
+
if (value && isNaN(Number(value))) {
|
|
1735
|
+
return t('validator.number');
|
|
1736
|
+
}
|
|
1737
|
+
}, b) });
|
|
1738
|
+
}
|
|
1739
|
+
else if (b.name === 'EmailBlock') {
|
|
1740
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1741
|
+
if (value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
1742
|
+
return t('validator.email');
|
|
1743
|
+
}
|
|
1744
|
+
if (!value)
|
|
1745
|
+
return;
|
|
1746
|
+
validatingEmailRef.current = true;
|
|
1747
|
+
setTimeout(() => {
|
|
1748
|
+
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
1749
|
+
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1750
|
+
email: value,
|
|
1751
|
+
})
|
|
1752
|
+
.then((tKey) => {
|
|
1753
|
+
if (tKey) {
|
|
1754
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1755
|
+
}
|
|
1756
|
+
else {
|
|
1757
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1758
|
+
}
|
|
1759
|
+
validatingEmailRef.current = false;
|
|
1760
|
+
})
|
|
1761
|
+
.catch((e) => {
|
|
1762
|
+
console.error(e);
|
|
1763
|
+
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
1764
|
+
validatingEmailRef.current = false;
|
|
1765
|
+
});
|
|
1766
|
+
}, 200);
|
|
1767
|
+
}, b) });
|
|
1768
|
+
}
|
|
1769
|
+
else if (b.name === 'PhoneBlock' ||
|
|
1770
|
+
b.name === 'PhoneOtpBlock' ||
|
|
1771
|
+
b.name === 'ZaloOtpBlock' ||
|
|
1772
|
+
b.name === 'WhatsappOtpBlock') {
|
|
1773
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1774
|
+
if (value &&
|
|
1775
|
+
window.intlTelInputUtils &&
|
|
1776
|
+
!window.intlTelInputUtils.isValidNumber(String(value), LEAD_LOCALE.countryCode)) {
|
|
1777
|
+
return t('validator.phone');
|
|
1778
|
+
}
|
|
1779
|
+
if (!value)
|
|
1780
|
+
return;
|
|
1781
|
+
validatingPhoneRef.current = true;
|
|
1782
|
+
setTimeout(() => {
|
|
1783
|
+
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
1784
|
+
if (b.data.singleSubmission) {
|
|
1785
|
+
checkUsedPhoneOnlyWithCache(campaignId, value)
|
|
1786
|
+
.then((tKey) => {
|
|
1787
|
+
if (tKey) {
|
|
1788
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1789
|
+
}
|
|
1790
|
+
else {
|
|
1791
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1792
|
+
}
|
|
1793
|
+
validatingPhoneRef.current = false;
|
|
1794
|
+
})
|
|
1795
|
+
.catch((err) => {
|
|
1796
|
+
console.error(err);
|
|
1797
|
+
formRef.current.setFieldError(b.data.value, err.message || 'Something went wrong');
|
|
1798
|
+
validatingPhoneRef.current = false;
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
else {
|
|
1802
|
+
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1803
|
+
phone: value,
|
|
1804
|
+
})
|
|
1805
|
+
.then((tKey) => {
|
|
1806
|
+
if (tKey) {
|
|
1807
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1808
|
+
}
|
|
1809
|
+
else {
|
|
1810
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1811
|
+
}
|
|
1812
|
+
validatingPhoneRef.current = false;
|
|
1813
|
+
})
|
|
1814
|
+
.catch((e) => {
|
|
1815
|
+
console.error(e);
|
|
1816
|
+
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
1817
|
+
validatingPhoneRef.current = false;
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
}, 200);
|
|
1821
|
+
}, b) });
|
|
1822
|
+
}
|
|
1823
|
+
else if (b.name === 'DateBlock') {
|
|
1824
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1825
|
+
if (value && isNaN(Date.parse(value))) {
|
|
1826
|
+
return t('validator.date');
|
|
1827
|
+
}
|
|
1828
|
+
}, b) });
|
|
1829
|
+
}
|
|
1830
|
+
else if (b.name === 'TncBlock') {
|
|
1831
|
+
return Object.assign(Object.assign({}, r), { [`TNC-` + b.id]: withSharedCheck('TNC-' + b.id, (value) => {
|
|
1832
|
+
if (isRequired && !value) {
|
|
1833
|
+
return t('validator.required');
|
|
1834
|
+
}
|
|
1835
|
+
}, b) });
|
|
1836
|
+
}
|
|
1837
|
+
else {
|
|
1838
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, undefined, b) });
|
|
1839
|
+
}
|
|
1840
|
+
}, {});
|
|
1841
|
+
}, [listBlockAdded.map((b) => b.name).join(',')]);
|
|
1842
|
+
const form = useLeadForm({
|
|
1843
|
+
validateInputOnChange: true,
|
|
1844
|
+
clearInputErrorOnChange: true,
|
|
1845
|
+
validate: validateObj,
|
|
1846
|
+
initialValues,
|
|
1847
|
+
});
|
|
1848
|
+
const formRef = React.useRef(form);
|
|
1849
|
+
formRef.current = form;
|
|
1850
|
+
return { form, validateObj };
|
|
1851
|
+
};
|
|
1852
|
+
|
|
2826
1853
|
const SubtitleBlock = ({ children, align, }) => (React__default["default"].createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
2827
1854
|
|
|
2828
1855
|
const cssInputNotShrink = react.css `
|
|
@@ -2993,14 +2020,6 @@ const StyledTextFieldContainer = styled__default["default"].div `
|
|
|
2993
2020
|
}
|
|
2994
2021
|
}
|
|
2995
2022
|
|
|
2996
|
-
&:focus-within {
|
|
2997
|
-
.mantine-Input-wrapper {
|
|
2998
|
-
transition: 0.25s linear border;
|
|
2999
|
-
border-color: ${miscTheme.theme.colors.primary600};
|
|
3000
|
-
box-shadow: 0 0 4px ${miscTheme.theme.colors.primary200};
|
|
3001
|
-
}
|
|
3002
|
-
}
|
|
3003
|
-
|
|
3004
2023
|
.PhoneInput {
|
|
3005
2024
|
--phone-select: 75px;
|
|
3006
2025
|
--phone-input-space-x: 8px;
|
|
@@ -3149,13 +2168,11 @@ const TextField = (props) => {
|
|
|
3149
2168
|
const $focusEl = $textEl.item($textEl.length - 1);
|
|
3150
2169
|
if ($focusEl) {
|
|
3151
2170
|
$focusEl.focus();
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
});
|
|
3158
|
-
}, 100);
|
|
2171
|
+
$focusEl.scrollIntoView({
|
|
2172
|
+
behavior: 'auto',
|
|
2173
|
+
block: 'center',
|
|
2174
|
+
inline: 'start',
|
|
2175
|
+
});
|
|
3159
2176
|
}
|
|
3160
2177
|
}, [shrink]);
|
|
3161
2178
|
React.useEffect(() => {
|
|
@@ -3172,14 +2189,8 @@ const ChoiceField = (props) => {
|
|
|
3172
2189
|
const TitleBlock = ({ children, align, }) => (React__default["default"].createElement("h2", { className: `lead-modal__title ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
3173
2190
|
|
|
3174
2191
|
const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, }) => {
|
|
3175
|
-
const { t } = index.useTranslations();
|
|
3176
2192
|
const form = useLeadFormContext();
|
|
3177
2193
|
const formValues = form.values;
|
|
3178
|
-
const labelTuples = React.useMemo(() => {
|
|
3179
|
-
return ((index$7.ISO_FORMAT === null || index$7.ISO_FORMAT === void 0 ? void 0 : index$7.ISO_FORMAT[locale]) || index$7.ISO_FORMAT['vi-VN']).dateFormat
|
|
3180
|
-
.split('/')
|
|
3181
|
-
.map((key) => { var _a; return t((_a = index$9.COMMON_DATE_TRANSLATE_KEY === null || index$9.COMMON_DATE_TRANSLATE_KEY === void 0 ? void 0 : index$9.COMMON_DATE_TRANSLATE_KEY[key]) === null || _a === void 0 ? void 0 : _a.id); });
|
|
3182
|
-
}, [locale]);
|
|
3183
2194
|
return (React__default["default"].createElement(React__default["default"].Fragment, null, listBlockAdded.map((b, index) => {
|
|
3184
2195
|
var _a;
|
|
3185
2196
|
const { name = '', data = {}, id } = b || {};
|
|
@@ -3229,11 +2240,13 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
3229
2240
|
return (React__default["default"].createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
3230
2241
|
React__default["default"].createElement(GoogleLocationBlock, Object.assign({ withAsterisk: required, name: value, placeholder: placeholder, label: placeholder, "data-control": "text", locale: locale, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
|
|
3231
2242
|
}
|
|
3232
|
-
case 'DateBlock':
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
2243
|
+
case 'DateBlock':
|
|
2244
|
+
return (React__default["default"].createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
2245
|
+
React__default["default"].createElement(index$4.DatePicker, Object.assign({ clearable: true, withAsterisk: required, type: "default", name: value, placeholder: placeholder, label: placeholder, inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
|
|
2246
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2247
|
+
children,
|
|
2248
|
+
React__default["default"].createElement("input", { type: "hidden", "data-control": "date", name: value, value: formValue })));
|
|
2249
|
+
} }, form.getInputProps(value)))));
|
|
3237
2250
|
case 'LinkButtonBlock':
|
|
3238
2251
|
return (React__default["default"].createElement("div", { key: index },
|
|
3239
2252
|
React__default["default"].createElement("a", { target: newtab ? 'blank' : 'parrent', href: url, style: { textDecoration: 'none' } },
|
|
@@ -3276,7 +2289,7 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
3276
2289
|
label: l.placeholder,
|
|
3277
2290
|
})) }, form.getInputProps(value)))));
|
|
3278
2291
|
case 'TncBlock':
|
|
3279
|
-
const
|
|
2292
|
+
const _c = form.getInputProps(`TNC-${id}`), { error } = _c, tncInputProps = tslib_es6.__rest(_c, ["error"]);
|
|
3280
2293
|
return (React__default["default"].createElement(ChoiceField, { className: "leadgen-form_checkbox", key: id },
|
|
3281
2294
|
React__default["default"].createElement(core.Input.Wrapper, { error: error },
|
|
3282
2295
|
React__default["default"].createElement(index$2.Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default["default"].createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: data.valueHTML } }), className: "tnc-block", "data-control": "checkbox" }, tncInputProps)))));
|
|
@@ -3382,7 +2395,7 @@ const HeaderImage = ({ src, ratio = 3 / 2, className, style, }) => {
|
|
|
3382
2395
|
if (!src) {
|
|
3383
2396
|
return null;
|
|
3384
2397
|
}
|
|
3385
|
-
return (React__default["default"].createElement(StyleHeaderImage, { paddingTop: (1 / ratio) * 100, className: core.clsx(className, 'leadgen-header_image'), style: style }, index$
|
|
2398
|
+
return (React__default["default"].createElement(StyleHeaderImage, { paddingTop: (1 / ratio) * 100, className: core.clsx(className, 'leadgen-header_image'), style: style }, index$7.isVideo(src) ? (React__default["default"].createElement("video", { muted: true, autoPlay: true, loop: true, className: "leadgen-header_image_feature leadgen-header_image_video", src: src })) : (React__default["default"].createElement("img", { src: src, draggable: "false", alt: "", className: "leadgen-header_image_feature leadgen-header_image_image" }))));
|
|
3386
2399
|
};
|
|
3387
2400
|
|
|
3388
2401
|
const OtpBlock = ({ otpData, onSuccess, autoSendWhenOpen, }) => {
|
|
@@ -3526,7 +2539,7 @@ const LEADGEN_SHOW_HEADER = [
|
|
|
3526
2539
|
LEADGEN_LAYOUT.Slider,
|
|
3527
2540
|
];
|
|
3528
2541
|
const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, showThankyou, campaignId, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, }) => {
|
|
3529
|
-
var _a
|
|
2542
|
+
var _a;
|
|
3530
2543
|
const { isMobile } = useScreenSize.useScreenSize();
|
|
3531
2544
|
const [open, setOpen] = React.useState(!!campaignId);
|
|
3532
2545
|
const [showOtpPhone, setShowOtpPhone] = React.useState(null);
|
|
@@ -3559,7 +2572,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
3559
2572
|
const isDrawer = isLightBoxB && isMobile;
|
|
3560
2573
|
const limitFieldsLightBoxB = isLightBoxB && listBlockAdded.length <= LEADGEN_LIMIT_LIGHTBOXB;
|
|
3561
2574
|
const hasForm = isLightBoxA
|
|
3562
|
-
? listBlockAdded.some((item) =>
|
|
2575
|
+
? listBlockAdded.some((item) => LEADGEN_BLOCK_IN_FORM.some((k) => k === (item === null || item === void 0 ? void 0 : item.name)))
|
|
3563
2576
|
: true;
|
|
3564
2577
|
const headerInsideFormContainer = isSlider || isLightBoxA || isFullscreen;
|
|
3565
2578
|
const showHeader = !!imageMobile || !!imageDesktop;
|
|
@@ -3588,25 +2601,14 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
3588
2601
|
campaignId,
|
|
3589
2602
|
campaign_subot_id,
|
|
3590
2603
|
userInfo,
|
|
3591
|
-
format: (_a = (index$7.ISO_FORMAT[locale] || index$7.ISO_FORMAT['vi-VN'])) === null || _a === void 0 ? void 0 : _a.dateFormat,
|
|
3592
2604
|
});
|
|
3593
|
-
const onFocus = (e) => {
|
|
3594
|
-
const target = e.target;
|
|
3595
|
-
target.scrollIntoView({
|
|
3596
|
-
block: 'center',
|
|
3597
|
-
inline: 'nearest',
|
|
3598
|
-
behavior: 'auto',
|
|
3599
|
-
});
|
|
3600
|
-
};
|
|
3601
2605
|
const middlewareOnSubmit = (e) => {
|
|
3602
2606
|
e.preventDefault();
|
|
3603
2607
|
// mark all as touched to allow validation
|
|
3604
|
-
|
|
3605
|
-
const fieldStatus = fields.reduce((acc, cur) => {
|
|
2608
|
+
form.setTouched(Object.keys(validateObj).reduce((acc, cur) => {
|
|
3606
2609
|
acc[cur] = true;
|
|
3607
2610
|
return acc;
|
|
3608
|
-
}, {});
|
|
3609
|
-
form.setTouched(fieldStatus);
|
|
2611
|
+
}, {}));
|
|
3610
2612
|
if (validatingEmailRef.current || validatingPhoneRef.current) {
|
|
3611
2613
|
return;
|
|
3612
2614
|
}
|
|
@@ -3681,10 +2683,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
3681
2683
|
const renderAfterImageSizes = imageMobileLoaded &&
|
|
3682
2684
|
imageDesktopLoaded &&
|
|
3683
2685
|
(isFullscreen ? imageBackgroundLoaded : true);
|
|
3684
|
-
const ButtonSubmit =
|
|
3685
|
-
var _a;
|
|
3686
|
-
return !((_a = actionBlocks === null || actionBlocks === void 0 ? void 0 : actionBlocks.submitBlock) === null || _a === void 0 ? void 0 : _a.isHide) && (React__default["default"].createElement(core.Button, { size: "lg", id: "lead-submit", type: "submit", variant: "filled", className: "leadgen-btn leadgen-btn_action", loading: isSubmitLoading }, popUpSubmitText));
|
|
3687
|
-
}, [popUpSubmitText, isSubmitLoading, (_b = actionBlocks === null || actionBlocks === void 0 ? void 0 : actionBlocks.submitBlock) === null || _b === void 0 ? void 0 : _b.isHide]);
|
|
2686
|
+
const ButtonSubmit = !((_a = actionBlocks === null || actionBlocks === void 0 ? void 0 : actionBlocks.submitBlock) === null || _a === void 0 ? void 0 : _a.isHide) && (React__default["default"].createElement(core.Button, { size: "lg", id: "lead-submit", type: "submit", variant: "filled", className: "leadgen-btn leadgen-btn_action", loading: isSubmitLoading }, popUpSubmitText));
|
|
3688
2687
|
const LinkButtonBlock = listBlockAdded.filter(({ name }) => name == LEADGEN_BLOCK.LinkButtonBlock);
|
|
3689
2688
|
const ButtonLink = !!(LinkButtonBlock === null || LinkButtonBlock === void 0 ? void 0 : LinkButtonBlock.length) && (React__default["default"].createElement(React__default["default"].Fragment, null, LinkButtonBlock.map((item, index) => {
|
|
3690
2689
|
var _a, _b, _c;
|
|
@@ -3698,7 +2697,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
3698
2697
|
React__default["default"].createElement(HeaderImage, { src: imageMobile, className: "le-only-mobile lead-modal__image" })))));
|
|
3699
2698
|
const PopupEmpty = showEmpty && (React__default["default"].createElement(EmptyComponent, { onClose: onClose, onContinue: () => setShowEmpty(false) }));
|
|
3700
2699
|
const PopupForm = (React__default["default"].createElement(LeadFormProvider, { form: form },
|
|
3701
|
-
React__default["default"].createElement("form", { ref: formRef, className: "leadgen-form",
|
|
2700
|
+
React__default["default"].createElement("form", { ref: formRef, className: "leadgen-form", onSubmit: middlewareOnSubmit },
|
|
3702
2701
|
React__default["default"].createElement(FormContainer, { title: title, titleAlign: titleAlign, description: description, descriptionAlign: descriptionAlign, header: headerInsideFormContainer && PopupHeader, footer: hasForm ? ButtonSubmit : ButtonLink, "data-hidden-form": !hasForm },
|
|
3703
2702
|
React__default["default"].createElement("div", { className: "leadgen-form_inner" },
|
|
3704
2703
|
React__default["default"].createElement(LightboxFields, { listBlockAdded: listBlockAdded, popupId: popupId, locale: locale, onClose: onClose, onOtherSubmit: onOtherSubmit }))))));
|
|
@@ -3739,7 +2738,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
3739
2738
|
'leadgen-inline': isInPage,
|
|
3740
2739
|
'leadgen-slider': isSlider,
|
|
3741
2740
|
});
|
|
3742
|
-
const PopupContainer = isDrawer ? (React__default["default"].createElement(index$
|
|
2741
|
+
const PopupContainer = isDrawer ? (React__default["default"].createElement(index$9.DrawerComponent, { fadeFromIndex: index$8.ZINDEX_SSO - 9e6, open: open, snapPoints: [0.8, 1], activeSnapPoint: snap, setActiveSnapPoint: setSnap, onOpenChange: onOpenChange, overlayClassName: popupContainerClassName, className: "leadgen-drawer" },
|
|
3743
2742
|
PopupWrapper,
|
|
3744
2743
|
React__default["default"].createElement("div", { style: { position: 'absolute', inset: 0, zIndex: snap === 1 ? -1 : 1 }, onClick: () => setSnap(1) }))) : (React__default["default"].createElement("div", { id: popupId, "data-popup-url": currentPath, "data-popup-type": "lightbox-inline", className: popupContainerClassName },
|
|
3745
2744
|
isFullscreen ? (React__default["default"].createElement("img", { className: "le-only-desktop le-fullscreen-img", draggable: false, src: imageBackground || '', style: {
|
|
@@ -3802,7 +2801,7 @@ const SkinLayout = ({ popupId, link, linkText, linkNewTab, onClose, imageMobile,
|
|
|
3802
2801
|
React__default["default"].createElement("aside", { className: "le-only-mobile" },
|
|
3803
2802
|
React__default["default"].createElement("div", { className: "le-skin-mobile" },
|
|
3804
2803
|
React__default["default"].createElement("div", { style: { position: 'relative' } },
|
|
3805
|
-
index$
|
|
2804
|
+
index$7.isVideo(imageMobile) ? (React__default["default"].createElement("video", { muted: true, autoPlay: true, loop: true },
|
|
3806
2805
|
React__default["default"].createElement("source", { src: imageMobile, type: "video/mp4" }))) : (React__default["default"].createElement("img", { src: imageMobile, style: {
|
|
3807
2806
|
width: '100%',
|
|
3808
2807
|
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
@@ -4599,7 +3598,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
4599
3598
|
}, [showCampaign]);
|
|
4600
3599
|
return (React__default["default"].createElement(LeadGenContext.Provider, { value: { apiUrl, siteDomain, siteId, locale } },
|
|
4601
3600
|
React__default["default"].createElement(translationsContext.TranslationsContext.Provider, { value: { locale, values: getTranslations(locale) } }, children ? (React__default["default"].createElement(Component, { campaign: showCampaign, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, setShowThankyou: setShowThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo }, children)) : (React__default["default"].createElement(core.Portal, { target: utils$1.getPopupWrapperDom() },
|
|
4602
|
-
React__default["default"].createElement(core.Box, { sx: { position: 'fixed', zIndex: index$
|
|
3601
|
+
React__default["default"].createElement(core.Box, { sx: { position: 'fixed', zIndex: index$8.ZINDEX_SSO - 9e6 } },
|
|
4603
3602
|
React__default["default"].createElement(core.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) => {
|
|
4604
3603
|
var _a;
|
|
4605
3604
|
return (React__default["default"].createElement(core.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["default"].createElement(React__default["default"].Fragment, null,
|
|
@@ -4618,4 +3617,3 @@ LeadGen.OtpForm = OtpBlock$1;
|
|
|
4618
3617
|
LeadGen.Close = Close.Close;
|
|
4619
3618
|
|
|
4620
3619
|
exports.LeadGen = LeadGen;
|
|
4621
|
-
exports.LeadGenSubscriptionBox = LeadGenSubscriptionBox;
|