@hhgtech/hhg-components 1.29.480 → 1.29.481-beta-2
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-bb0fa11c.js → InputDate-5d6c3b9c.js} +5 -5
- package/build/{LastPeriod-86f8bbbc.js → LastPeriod-0f47ae00.js} +1 -1
- package/build/{MobileBottomNavigationIcon-03149057.js → MobileBottomNavigationIcon-88519180.js} +3 -3
- package/build/{Spinner-54ce5d8d.js → Spinner-80b3d0b7.js} +1 -1
- package/build/{WhatsApp-a45a19f4.js → WhatsApp-fc7f619f.js} +1 -1
- package/build/adapters.js +20 -20
- package/build/atoms.js +50 -50
- package/build/babyGrowth.js +86 -86
- package/build/cache.js +2 -2
- package/build/care.js +18 -18
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components/molecules/cardListItem/index.styled.d.ts +3 -0
- package/build/components/molecules/index.d.ts +1 -0
- package/build/components/molecules/toolBannerCard/index.d.ts +2 -1
- package/build/components/molecules/toolBannerCard/index.styles.d.ts +1 -0
- package/build/components.js +105 -104
- package/build/{constants-133e3edb.js → constants-0d0cfdfc.js} +1 -1
- package/build/constants.js +3 -3
- package/build/constantsDomainLocales.js +1 -1
- package/build/constantsRiskScreener.js +2 -2
- package/build/constantsSite.js +2 -2
- package/build/{core-4d146b99.js → core-68ed1dfb.js} +1 -1
- package/build/{dataTransform-afde04a6.js → dataTransform-334e4dde.js} +1 -1
- package/build/ecom.js +5 -5
- package/build/{editor-60c8d83e.js → editor-f953e0ba.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +25 -25
- package/build/embeddedHeathToolCards_babyPoop.js +23 -23
- package/build/embeddedHeathToolCards_babyVaccine.js +25 -25
- package/build/embeddedHeathToolCards_bmi_bmi.js +30 -30
- package/build/embeddedHeathToolCards_bmrBmr.js +28 -28
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +25 -25
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +25 -25
- package/build/embeddedHeathToolCards_pwg_pwg.js +29 -29
- package/build/embeddedHeathToolCards_targetHeartRate.js +30 -30
- package/build/esm/{InputDate-e88ffe97.js → InputDate-46b57231.js} +5 -5
- package/build/esm/{LastPeriod-3ba1bf50.js → LastPeriod-360928de.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-e97b9185.js → MobileBottomNavigationIcon-1f56751d.js} +3 -3
- package/build/esm/{Spinner-c67ea1b5.js → Spinner-bcd7096b.js} +1 -1
- package/build/esm/{WhatsApp-03e37f8e.js → WhatsApp-0bc03b19.js} +1 -1
- package/build/esm/adapters.js +20 -20
- package/build/esm/atoms.js +50 -50
- package/build/esm/babyGrowth.js +86 -86
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +18 -18
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/molecules/cardListItem/index.styled.d.ts +3 -0
- package/build/esm/components/molecules/index.d.ts +1 -0
- package/build/esm/components/molecules/toolBannerCard/index.d.ts +2 -1
- package/build/esm/components/molecules/toolBannerCard/index.styles.d.ts +1 -0
- package/build/esm/components.js +104 -104
- package/build/esm/{constants-03bfcb16.js → constants-29cbc9b3.js} +1 -1
- package/build/esm/constants.js +3 -3
- package/build/esm/constantsDomainLocales.js +1 -1
- package/build/esm/constantsRiskScreener.js +2 -2
- package/build/esm/constantsSite.js +2 -2
- package/build/esm/{core-b0b9401f.js → core-f3682c81.js} +1 -1
- package/build/esm/{dataTransform-1dd53f32.js → dataTransform-6d2fe081.js} +1 -1
- package/build/esm/ecom.js +5 -5
- package/build/esm/{editor-96ef1b99.js → editor-ca708bab.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +25 -25
- package/build/esm/embeddedHeathToolCards_babyPoop.js +23 -23
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +25 -25
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +30 -30
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +28 -28
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +25 -25
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +25 -25
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +29 -29
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +30 -30
- package/build/esm/footer.js +22 -22
- package/build/esm/gAssets.js +2 -2
- package/build/esm/{healthTools-a3770d0e.js → healthTools-7c352a63.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +21 -21
- package/build/esm/healthToolsForm.js +35 -35
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-c62994ce.js → index-02ce4526.js} +4 -4
- package/build/esm/{index-03f39a35.js → index-0483ec02.js} +6 -6
- package/build/esm/{index-42699b97.js → index-0cab3a69.js} +10 -10
- package/build/esm/{index-bd2e8f03.js → index-1216cf04.js} +14 -14
- package/build/esm/{index-46665936.js → index-1489e460.js} +1 -1
- package/build/esm/{index-f38aca87.js → index-1c1c0147.js} +2 -2
- package/build/esm/{index-d00dd915.js → index-1c6791f1.js} +3 -3
- package/build/esm/{index-4fe7364c.js → index-1fe78953.js} +18 -18
- package/build/esm/{index-3b127bcb.js → index-2055bbe6.js} +2 -2
- package/build/esm/{index-80f83f2b.js → index-28bbe37a.js} +2 -2
- package/build/esm/{index-22ca7c78.js → index-295b869e.js} +15 -15
- package/build/esm/{index-f0d1d2aa.js → index-2ce638ab.js} +9 -9
- package/build/esm/{index-6085a3cf.js → index-2ce9b4fa.js} +22 -22
- package/build/esm/{index-a4881f2c.js → index-36a16098.js} +23 -16
- package/build/esm/{index-ecae60b9.js → index-36b13499.js} +2 -2
- package/build/esm/{index-b3535b32.js → index-39c30081.js} +32 -32
- package/build/esm/{index-06fdec2b.js → index-39dfbfc8.js} +25 -25
- package/build/esm/{index-1b1f108f.js → index-40037f5f.js} +13 -13
- package/build/esm/{index-b527aa6d.js → index-400c00b3.js} +1 -1
- package/build/esm/{index-786e3c1e.js → index-40e27c1d.js} +30 -30
- package/build/esm/{index-72c85322.js → index-4679aec6.js} +2 -2
- package/build/esm/{index-7518aab0.js → index-511bd993.js} +2 -2
- package/build/esm/{index-abc5467c.js → index-52681292.js} +6 -6
- package/build/esm/{index-505b85da.js → index-5940bcba.js} +1 -1
- package/build/esm/{index-d10f3693.js → index-5a002729.js} +2 -2
- package/build/esm/{index-ce869cbd.js → index-6019b7a2.js} +2 -2
- package/build/esm/{index-855008bb.js → index-604541b6.js} +32 -32
- package/build/esm/{index-43632456.js → index-650f79fc.js} +1 -1
- package/build/esm/{index-d09629fa.js → index-656d43c6.js} +3 -3
- package/build/esm/{index-7c65e778.js → index-6602906b.js} +18 -18
- package/build/esm/{index-e52557b4.js → index-68ab994d.js} +2 -2
- package/build/esm/{index-fddc927d.js → index-6ada036d.js} +3 -3
- package/build/esm/{index-9e7d2b43.js → index-6e126c9a.js} +2 -2
- package/build/esm/{index-6e3994c4.js → index-7384fa1e.js} +3 -3
- package/build/esm/{index-33cf233c.js → index-73f1e57d.js} +2 -2
- package/build/esm/{index-52fff2aa.js → index-75394ce8.js} +6 -6
- package/build/esm/{index-1161c0c5.js → index-82de28c0.js} +2 -2
- package/build/esm/{index-960e69f4.js → index-8667a7e7.js} +2 -2
- package/build/esm/{index-98f4c80f.js → index-87a770b7.js} +1 -1
- package/build/esm/{index-7deab8c9.js → index-894333aa.js} +14 -14
- package/build/esm/{index-c40f11bb.js → index-8b68423c.js} +7 -7
- package/build/esm/{index-5955ea8f.js → index-8be1c454.js} +7 -7
- package/build/esm/{index-e074d1b4.js → index-8c85be76.js} +21 -21
- package/build/esm/{index-91c9b4a2.js → index-90a96b62.js} +21 -21
- package/build/esm/{index-9c27c173.js → index-90c5380b.js} +8 -8
- package/build/esm/{index-885d7597.js → index-91075485.js} +2 -2
- package/build/esm/{index-c4470578.js → index-94b04ff9.js} +3 -3
- package/build/esm/{index-1912a9fa.js → index-9e2c0cfe.js} +1 -1
- package/build/esm/{index-06e91e76.js → index-a78adcf4.js} +4 -4
- package/build/esm/{index-2989085e.js → index-aa9db786.js} +19 -19
- package/build/esm/{index-686bafb8.js → index-adc6e050.js} +5 -5
- package/build/esm/{index-e378930b.js → index-b0930686.js} +6 -6
- package/build/esm/{index-6541dd75.js → index-b15272b1.js} +11 -11
- package/build/esm/{index-bd777aa0.js → index-b3bce02f.js} +3 -3
- package/build/esm/{index-01977476.js → index-bab47ecc.js} +1 -1
- package/build/esm/{index-f21eaeca.js → index-bb4fc349.js} +3 -3
- package/build/esm/{index-bf38eaf8.js → index-bc456312.js} +3 -3
- package/build/esm/{index-462e639d.js → index-c6ef73f3.js} +5 -5
- package/build/esm/{index-4e60d0f7.js → index-c8fa323e.js} +3 -3
- package/build/esm/{index-c41b2d8f.js → index-cf9e0602.js} +16 -16
- package/build/esm/{index-2ff4c7dc.js → index-d4bd4b91.js} +2 -2
- package/build/esm/{index-746b2ace.js → index-d9592e4c.js} +13 -13
- package/build/esm/{index-8cddb75d.js → index-dc277e34.js} +2 -2
- package/build/esm/{index-a188714a.js → index-dd673e79.js} +17 -17
- package/build/esm/{index-83fcc07f.js → index-e62363da.js} +16 -16
- package/build/esm/{index-9eedca28.js → index-e7333fe9.js} +15 -15
- package/build/esm/{index-1b9ab1aa.js → index-e812e6c2.js} +27 -27
- package/build/esm/{index-fd704960.js → index-e9d318b1.js} +14 -14
- package/build/esm/{index-ed2c52fa.js → index-f3606e41.js} +8 -8
- package/build/esm/{index-71c5ca68.js → index-f87c6092.js} +16 -16
- package/build/esm/{index-25d0e579.js → index-fbfe354e.js} +2 -2
- package/build/esm/{index-511a93fd.js → index-fca74c76.js} +16 -16
- package/build/esm/index.js +124 -124
- package/build/esm/{labelSorting-2737baf9.js → labelSorting-38a75353.js} +4 -4
- package/build/esm/lead/LeadGenTranslationContext.d.ts +13 -2
- package/build/esm/lead/index.d.ts +2 -0
- package/build/esm/lead.js +990 -977
- package/build/esm/{logoIcon-cbbb99c5.js → logoIcon-3d1f01a0.js} +2 -2
- package/build/esm/mantine.js +27 -27
- package/build/esm/misc.js +19 -19
- 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 +78 -78
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +17 -17
- package/build/esm/navigation.js +47 -47
- package/build/esm/navigationLogoutPopup.js +11 -11
- package/build/esm/navigationProfileButton.js +27 -27
- package/build/esm/onboardingV2.js +30 -30
- package/build/esm/organisms.js +57 -57
- package/build/esm/{post-2d20786e.js → post-d87bd236.js} +2 -2
- package/build/esm/profileNavigation.js +20 -20
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +23 -23
- package/build/esm/ssoV2.js +31 -31
- package/build/esm/{store-80c2fbfb.js → store-26bc5b00.js} +3 -3
- package/build/esm/subot.js +40 -40
- package/build/esm/surveyOrPremiumBanner.js +34 -34
- package/build/esm/surveyQuestionCard.js +11 -11
- package/build/esm/{surveyThankyouCard-a7b669ce.js → surveyThankyouCard-d03b9441.js} +5 -5
- package/build/esm/together.js +57 -57
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +31 -31
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +52 -52
- package/build/esm/togetherMoleculesCardAuthor.js +29 -29
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +40 -40
- package/build/esm/togetherOrganisms.js +51 -51
- package/build/esm/togetherRichTextEditor.js +18 -18
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{translationsProvider-85d42d03.js → translationsProvider-6246e072.js} +1 -1
- package/build/esm/{treePopoverMenu-943f6db6.js → treePopoverMenu-4e67b70b.js} +19 -19
- package/build/esm/types.js +2 -2
- package/build/esm/{useHealthToolCache-06ca1caa.js → useHealthToolCache-ae2a25b8.js} +1 -1
- package/build/esm/{usePhoneValidator-54a9a530.js → usePhoneValidator-7887c178.js} +5 -5
- package/build/esm/{usePlacesAutocomplete-98b165da.js → usePlacesAutocomplete-72edf861.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +10 -10
- package/build/esm/{utils-327034d3.js → utils-720650c0.js} +3 -3
- package/build/esm/{utils-226e935e.js → utils-b1503b1f.js} +2 -2
- package/build/esm/{utils-1f327927.js → utils-ddb4b7d1.js} +2 -2
- package/build/esm/{utils-559a417a.js → utils-f3885bbe.js} +5 -5
- package/build/esm/vaccination.js +22 -22
- package/build/footer.js +22 -22
- package/build/gAssets.js +2 -2
- package/build/{healthTools-66895d0e.js → healthTools-fbd61d3e.js} +1 -1
- package/build/healthToolsCardWrapper.js +21 -21
- package/build/healthToolsForm.js +35 -35
- package/build/hooks.js +13 -13
- package/build/i18n.js +2 -2
- package/build/i18nV2.js +1 -1
- package/build/{index-b150e0c3.js → index-10283fd3.js} +1 -1
- package/build/{index-11e3d3da.js → index-17e6ca5e.js} +13 -13
- package/build/{index-7af9f62f.js → index-1836f529.js} +16 -16
- package/build/{index-a0ed787f.js → index-18df2f1f.js} +2 -2
- package/build/{index-3c5b101f.js → index-2ee8d86a.js} +21 -21
- package/build/{index-949e50c8.js → index-30f3732b.js} +4 -4
- package/build/{index-f5ebb62f.js → index-341e22b8.js} +2 -2
- package/build/{index-74d74a1f.js → index-34e22e6b.js} +2 -2
- package/build/{index-cf3274d7.js → index-37fd20a9.js} +6 -6
- package/build/{index-d0d9f7e4.js → index-3b9accab.js} +3 -3
- package/build/{index-cc5f966e.js → index-3cde9144.js} +2 -2
- package/build/{index-15148331.js → index-3d3635ad.js} +3 -3
- package/build/{index-63ce41d3.js → index-3dac5183.js} +3 -3
- package/build/{index-1c586335.js → index-44448fe6.js} +6 -6
- package/build/{index-1e5184e3.js → index-4607cc62.js} +3 -3
- package/build/{index-8a0d79a5.js → index-4736fd5d.js} +22 -22
- package/build/{index-c271c56b.js → index-4840db09.js} +14 -14
- package/build/{index-a7199906.js → index-4a22ccd9.js} +14 -14
- package/build/{index-7e37b2c5.js → index-503d32ff.js} +3 -3
- package/build/{index-af3a6996.js → index-51440a77.js} +23 -16
- package/build/{index-1925d463.js → index-5481814d.js} +15 -15
- package/build/{index-9104fcca.js → index-564847c4.js} +1 -1
- package/build/{index-86442923.js → index-5a85f9b0.js} +10 -10
- package/build/{index-ac2dcacd.js → index-5c2f9672.js} +25 -25
- package/build/{index-2bb2e101.js → index-5cf82446.js} +2 -2
- package/build/{index-9d60eb16.js → index-60ae0a1e.js} +19 -19
- package/build/{index-c0f491cf.js → index-60fc65e2.js} +1 -1
- package/build/{index-ab3cd2a8.js → index-664ce4bb.js} +2 -2
- package/build/{index-c02fde76.js → index-66e8d5f4.js} +4 -4
- package/build/{index-09bd7856.js → index-6e506d3b.js} +16 -16
- package/build/{index-ed151b2b.js → index-6f45c865.js} +2 -2
- package/build/{index-8d9f4413.js → index-76a46f5b.js} +32 -32
- package/build/{index-2d63d735.js → index-7a207672.js} +17 -17
- package/build/{index-324fea8d.js → index-7fc178bb.js} +2 -2
- package/build/{index-f821c068.js → index-7fde040d.js} +6 -6
- package/build/{index-fc127a31.js → index-807b386b.js} +11 -11
- package/build/{index-a9ac3b43.js → index-80ce68f4.js} +1 -1
- package/build/{index-e86206d8.js → index-82ce48bb.js} +2 -2
- package/build/{index-275f5e50.js → index-837b20ce.js} +3 -3
- package/build/{index-e86a2ad0.js → index-8a105f16.js} +5 -5
- package/build/{index-45b62551.js → index-90afb982.js} +27 -27
- package/build/{index-52b42aed.js → index-969c634f.js} +18 -18
- package/build/{index-2cb066d9.js → index-96bbbeea.js} +18 -18
- package/build/{index-d19ef96f.js → index-972250da.js} +2 -2
- package/build/{index-609abe05.js → index-9b47b2ee.js} +32 -32
- package/build/{index-26387ef9.js → index-a1696b3b.js} +3 -3
- package/build/{index-ceaae211.js → index-a4148029.js} +21 -21
- package/build/{index-26e0c17d.js → index-ad291b6e.js} +15 -15
- package/build/{index-9bc25350.js → index-b6098250.js} +2 -2
- package/build/{index-3a63afdf.js → index-b75dd31a.js} +6 -6
- package/build/{index-2078a328.js → index-b9bbf733.js} +16 -16
- package/build/{index-67431953.js → index-bd0551f2.js} +14 -14
- package/build/{index-712315c9.js → index-c0e45129.js} +16 -16
- package/build/{index-5365034f.js → index-c16cb840.js} +9 -9
- package/build/{index-8746197a.js → index-c21f216e.js} +1 -1
- package/build/{index-7d4d8b55.js → index-c4b3da8b.js} +8 -8
- package/build/{index-23d3cf2d.js → index-c5ee335b.js} +1 -1
- package/build/{index-44c3844f.js → index-c64b59ff.js} +3 -3
- package/build/{index-43a81947.js → index-c67dce04.js} +8 -8
- package/build/{index-86119802.js → index-c7330eee.js} +7 -7
- package/build/{index-e3c26fca.js → index-d2c1fe3a.js} +2 -2
- package/build/{index-12ef6952.js → index-d4ad8ed7.js} +13 -13
- package/build/{index-b118a3e7.js → index-d67b8d65.js} +3 -3
- package/build/{index-eb19ca77.js → index-db6d1907.js} +2 -2
- package/build/{index-e7c1d4f4.js → index-e1afc3e8.js} +2 -2
- package/build/{index-e4c517cf.js → index-e2265949.js} +30 -30
- package/build/{index-8284cf62.js → index-ead0e366.js} +7 -7
- package/build/{index-bfce02ba.js → index-f2561628.js} +2 -2
- package/build/{index-982914eb.js → index-f2f208cd.js} +2 -2
- package/build/{index-ac7d8994.js → index-f4a172a1.js} +1 -1
- package/build/{index-39e369df.js → index-f5bf6ba6.js} +5 -5
- package/build/{index-18b02992.js → index-f915d0e0.js} +2 -2
- package/build/index.js +125 -124
- package/build/{labelSorting-b852b321.js → labelSorting-4036b801.js} +4 -4
- package/build/lead/LeadGenTranslationContext.d.ts +13 -2
- package/build/lead/index.d.ts +2 -0
- package/build/lead.js +989 -976
- package/build/{logoIcon-35b60fa0.js → logoIcon-966d0124.js} +2 -2
- package/build/mantine.js +25 -25
- package/build/misc.js +19 -19
- 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 +79 -78
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +17 -17
- package/build/navigation.js +47 -47
- package/build/navigationLogoutPopup.js +11 -11
- package/build/navigationProfileButton.js +27 -27
- package/build/onboardingV2.js +29 -29
- package/build/organisms.js +57 -57
- package/build/{post-847f4cfd.js → post-cf9e87af.js} +2 -2
- package/build/profileNavigation.js +20 -20
- package/build/progressBar.js +1 -1
- package/build/pwg.js +23 -23
- package/build/ssoV2.js +29 -29
- package/build/{store-3bacbd42.js → store-84501bd0.js} +3 -3
- package/build/subot.js +39 -39
- package/build/surveyOrPremiumBanner.js +34 -34
- package/build/surveyQuestionCard.js +11 -11
- package/build/{surveyThankyouCard-13dbbf9b.js → surveyThankyouCard-b498f62e.js} +5 -5
- package/build/together.js +57 -57
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +31 -31
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +52 -52
- package/build/togetherMoleculesCardAuthor.js +29 -29
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +40 -40
- package/build/togetherOrganisms.js +51 -51
- package/build/togetherRichTextEditor.js +18 -18
- package/build/togetherShareBox.js +10 -10
- package/build/{translationsProvider-c25284a8.js → translationsProvider-786642a6.js} +1 -1
- package/build/{treePopoverMenu-c1ae2dc6.js → treePopoverMenu-dae09fa6.js} +19 -19
- package/build/types.js +2 -2
- package/build/{useHealthToolCache-80908122.js → useHealthToolCache-41648f12.js} +1 -1
- package/build/{usePhoneValidator-55aede3d.js → usePhoneValidator-f7e0731a.js} +5 -5
- package/build/{usePlacesAutocomplete-bc5cc972.js → usePlacesAutocomplete-704038e7.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +10 -10
- package/build/{utils-9924371b.js → utils-05aba639.js} +2 -2
- package/build/{utils-36e9f414.js → utils-3a9dc91c.js} +2 -2
- package/build/{utils-30f19bbd.js → utils-a6c10d79.js} +3 -3
- package/build/{utils-8f774628.js → utils-e2a87f8c.js} +5 -5
- package/build/vaccination.js +22 -22
- package/package.json +2 -2
- /package/build/{BMI_BOYS.percentile.monthly-25ae6364.js → BMI_BOYS.percentile.monthly-87a10b8f.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-6ca4bfee.js → BMI_BOYS.percentile.weekly-11f30493.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-84310363.js → BMI_BOYS.percentile.yearly-2d5103d1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-d02d77b5.js → BMI_BOYS.zscore.monthly-e9c8f996.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-b3ce46cc.js → BMI_BOYS.zscore.weekly-8787cc8e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-7b275db0.js → BMI_BOYS.zscore.yearly-dbc467a4.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-99b4c96b.js → BMI_GIRLS.percentile.monthly-d3a0a20e.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-cc0421f0.js → BMI_GIRLS.percentile.weekly-fd09aef5.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-350e61b1.js → BMI_GIRLS.percentile.yearly-3791fd18.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-705a6502.js → BMI_GIRLS.zscore.monthly-f2c4bf38.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-fcb2ae31.js → BMI_GIRLS.zscore.weekly-edacc02c.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-e1de1854.js → BMI_GIRLS.zscore.yearly-b2b25fc3.js} +0 -0
- /package/build/{ChevronDown-6a7b3798.js → ChevronDown-a4a03880.js} +0 -0
- /package/build/{Close-705a7add.js → Close-3f7f9d2e.js} +0 -0
- /package/build/{Google-892a2ecb.js → Google-105436c4.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-1ebd633f.js → HEAD CIRCUM_BOYS.percentile.monthly-755d271d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-2ba64f59.js → HEAD CIRCUM_BOYS.percentile.weekly-431e7c05.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-58e8c7f7.js → HEAD CIRCUM_BOYS.percentile.yearly-9d0e2bb8.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-c8699f38.js → HEAD CIRCUM_BOYS.zscore.monthly-bcc83231.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-b0039a2d.js → HEAD CIRCUM_BOYS.zscore.weekly-6c933aff.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-70f1c1a4.js → HEAD CIRCUM_BOYS.zscore.yearly-52270048.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-61657710.js → HEAD CIRCUM_GIRLS.percentile.monthly-96839d9b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-d42a844e.js → HEAD CIRCUM_GIRLS.percentile.weekly-7bed50af.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-284fb9df.js → HEAD CIRCUM_GIRLS.percentile.yearly-53d8aed3.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-34da2f2e.js → HEAD CIRCUM_GIRLS.zscore.monthly-c61960da.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-ec632ec6.js → HEAD CIRCUM_GIRLS.zscore.weekly-c815e66d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-16cfdb6a.js → HEAD CIRCUM_GIRLS.zscore.yearly-3cc955e8.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-a95c9700.js → HEIGHT_BOYS.percentile.monthly-3fb70ea4.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-d00bf337.js → HEIGHT_BOYS.percentile.weekly-340eae3c.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-904b7317.js → HEIGHT_BOYS.percentile.yearly-40eca76a.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-3c4969c4.js → HEIGHT_BOYS.zscore.monthly-0fb854e8.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-aa2f99cc.js → HEIGHT_BOYS.zscore.weekly-0764415d.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-77bc064c.js → HEIGHT_BOYS.zscore.yearly-0e54289d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-b27db437.js → HEIGHT_GIRLS.percentile.monthly-c74cad35.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-1c71b2c0.js → HEIGHT_GIRLS.percentile.weekly-57f49250.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-3939763c.js → HEIGHT_GIRLS.percentile.yearly-2355ce75.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-f054a202.js → HEIGHT_GIRLS.zscore.monthly-30099387.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-959f96a9.js → HEIGHT_GIRLS.zscore.weekly-c76f5aa6.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-dadc468b.js → HEIGHT_GIRLS.zscore.yearly-7f9abe14.js} +0 -0
- /package/build/{Locale-43704578.js → Locale-f829e078.js} +0 -0
- /package/build/{Visible-63d2cb32.js → Visible-bd62389e.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-7cee1d2b.js → WEIGHT_BOYS.percentile.monthly-158b01fd.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-7247bce2.js → WEIGHT_BOYS.percentile.weekly-eab9d3be.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-e4a6269e.js → WEIGHT_BOYS.percentile.yearly-839c5bda.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-8bd82e5f.js → WEIGHT_BOYS.zscore.monthly-ed9f8a2a.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-0e0906f7.js → WEIGHT_BOYS.zscore.weekly-40f2cb3c.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-c125b6b8.js → WEIGHT_BOYS.zscore.yearly-8a21ffc6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-1994f3bb.js → WEIGHT_GIRLS.percentile.monthly-f1983673.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-f7545593.js → WEIGHT_GIRLS.percentile.weekly-51a0599d.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-bceecd14.js → WEIGHT_GIRLS.percentile.yearly-72e4de4c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-28d1206d.js → WEIGHT_GIRLS.zscore.monthly-ba3ae765.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-d81696f0.js → WEIGHT_GIRLS.zscore.weekly-ab633368.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-79fc1fb5.js → WEIGHT_GIRLS.zscore.yearly-94d2a7e7.js} +0 -0
- /package/build/{ageGenerate-775c0d57.js → ageGenerate-ffd6c339.js} +0 -0
- /package/build/{animation-43709c17.js → animation-36b04537.js} +0 -0
- /package/build/{constants-e9cca1ba.js → constants-67ccd8d6.js} +0 -0
- /package/build/{constants-30e8ab05.js → constants-69eb68cc.js} +0 -0
- /package/build/{constants-9ac6077f.js → constants-954ecd62.js} +0 -0
- /package/build/{context-2bf4a853.js → context-eec0208f.js} +0 -0
- /package/build/{dataTransform-83d5d5b8.js → dataTransform-1502b2da.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-537e65b1.js → BMI_BOYS.percentile.monthly-3e94d853.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-1077eb48.js → BMI_BOYS.percentile.weekly-eb57335f.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-f72d4940.js → BMI_BOYS.percentile.yearly-d48b4240.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-78e4b8f8.js → BMI_BOYS.zscore.monthly-9486f202.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-d6009e2b.js → BMI_BOYS.zscore.weekly-d0d826f3.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-5c61394c.js → BMI_BOYS.zscore.yearly-5fff15dd.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-18e89bb3.js → BMI_GIRLS.percentile.monthly-a968b72a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-dd70f948.js → BMI_GIRLS.percentile.weekly-2159c10a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-5a93edf0.js → BMI_GIRLS.percentile.yearly-e875556a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-7af50953.js → BMI_GIRLS.zscore.monthly-6b637963.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-6e62d9fb.js → BMI_GIRLS.zscore.weekly-67a28b4d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-1bb57254.js → BMI_GIRLS.zscore.yearly-089ae256.js} +0 -0
- /package/build/esm/{ChevronDown-acb35dbf.js → ChevronDown-3e44dd73.js} +0 -0
- /package/build/esm/{Close-2a627e81.js → Close-58b767d3.js} +0 -0
- /package/build/esm/{Google-3fa84f52.js → Google-03f043ff.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-eae7a233.js → HEAD CIRCUM_BOYS.percentile.monthly-72fe562a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-6cb7bd28.js → HEAD CIRCUM_BOYS.percentile.weekly-039e1b19.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-d5fec723.js → HEAD CIRCUM_BOYS.percentile.yearly-0b8860b3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-ce76b795.js → HEAD CIRCUM_BOYS.zscore.monthly-9b4f246b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-584a2f91.js → HEAD CIRCUM_BOYS.zscore.weekly-66055c2f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-d5d4d1ca.js → HEAD CIRCUM_BOYS.zscore.yearly-7a6bb05f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-fea29cf9.js → HEAD CIRCUM_GIRLS.percentile.monthly-99e0b7d6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-47e6e338.js → HEAD CIRCUM_GIRLS.percentile.weekly-a6b01c0a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-b958283a.js → HEAD CIRCUM_GIRLS.percentile.yearly-4732714d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-73fab259.js → HEAD CIRCUM_GIRLS.zscore.monthly-2206c265.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-03457132.js → HEAD CIRCUM_GIRLS.zscore.weekly-a32a6412.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-5c3b2aad.js → HEAD CIRCUM_GIRLS.zscore.yearly-18b62729.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-feb0a4e0.js → HEIGHT_BOYS.percentile.monthly-5f64a336.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-6e6e9daa.js → HEIGHT_BOYS.percentile.weekly-06defd32.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-11bec487.js → HEIGHT_BOYS.percentile.yearly-e018bbf0.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-eb3a98e8.js → HEIGHT_BOYS.zscore.monthly-46ac9527.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-6fd40883.js → HEIGHT_BOYS.zscore.weekly-930b63c4.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-95bbca63.js → HEIGHT_BOYS.zscore.yearly-95b54a07.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-e1cfe470.js → HEIGHT_GIRLS.percentile.monthly-2d2a591b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-f2008f6e.js → HEIGHT_GIRLS.percentile.weekly-7320aff9.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-4361cb39.js → HEIGHT_GIRLS.percentile.yearly-3bbe143b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-10a6464d.js → HEIGHT_GIRLS.zscore.monthly-a0cb136e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-72eaeea6.js → HEIGHT_GIRLS.zscore.weekly-d4edaa4a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-5b0c55b1.js → HEIGHT_GIRLS.zscore.yearly-d863937a.js} +0 -0
- /package/build/esm/{Locale-71a37261.js → Locale-c58c2b74.js} +0 -0
- /package/build/esm/{Visible-a6c749d0.js → Visible-a560b459.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-1b43720e.js → WEIGHT_BOYS.percentile.monthly-a19346b8.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-1648c7c9.js → WEIGHT_BOYS.percentile.weekly-e3451d52.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-52ccd261.js → WEIGHT_BOYS.percentile.yearly-73dea5e2.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-76780d89.js → WEIGHT_BOYS.zscore.monthly-0ed0a289.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-81091f30.js → WEIGHT_BOYS.zscore.weekly-54a80687.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-1b33d7d5.js → WEIGHT_BOYS.zscore.yearly-b6d3bfb4.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-606461e6.js → WEIGHT_GIRLS.percentile.monthly-2de6b879.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-06e351cc.js → WEIGHT_GIRLS.percentile.weekly-940b9dad.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-834d561a.js → WEIGHT_GIRLS.percentile.yearly-6a621a03.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-a3c0226c.js → WEIGHT_GIRLS.zscore.monthly-1e853628.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-97648c0a.js → WEIGHT_GIRLS.zscore.weekly-d6b3a51d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-a6b9aa65.js → WEIGHT_GIRLS.zscore.yearly-caed7663.js} +0 -0
- /package/build/esm/{ageGenerate-d2768189.js → ageGenerate-b3f2d4c3.js} +0 -0
- /package/build/esm/{animation-0f11c4f1.js → animation-2061711c.js} +0 -0
- /package/build/esm/{constants-a5b04f97.js → constants-50a0be26.js} +0 -0
- /package/build/esm/{constants-da65833b.js → constants-5579b3a5.js} +0 -0
- /package/build/esm/{constants-ae616740.js → constants-859885da.js} +0 -0
- /package/build/esm/{context-08069e35.js → context-721330a8.js} +0 -0
- /package/build/esm/{dataTransform-a2726ad9.js → dataTransform-0aff1db7.js} +0 -0
- /package/build/esm/{index-93eac1b0.js → index-0d71dec6.js} +0 -0
- /package/build/esm/{index-8cdd53db.js → index-1247723e.js} +0 -0
- /package/build/esm/{index-4022f8d3.js → index-1c7bdca2.js} +0 -0
- /package/build/esm/{index-2437b025.js → index-4bc073e2.js} +0 -0
- /package/build/esm/{index-9f033810.js → index-5040b245.js} +0 -0
- /package/build/esm/{index-1da86aeb.js → index-7bbd0fad.js} +0 -0
- /package/build/esm/{index-01ef2d81.js → index-8608ade2.js} +0 -0
- /package/build/esm/{index-bffc77db.js → index-9f515877.js} +0 -0
- /package/build/esm/{index-9db1fa3f.js → index-e357d9e3.js} +0 -0
- /package/build/esm/{index.styles-4bb9bfe4.js → index.styles-b6fb30de.js} +0 -0
- /package/build/esm/{localizeNumberFormat-4abc7b47.js → localizeNumberFormat-6421578e.js} +0 -0
- /package/build/esm/{normalizeLink-f8289752.js → normalizeLink-c2ae5e81.js} +0 -0
- /package/build/esm/{number-1b874408.js → number-5a69ab2b.js} +0 -0
- /package/build/esm/{paths-4f3051ca.js → paths-1da37e5a.js} +0 -0
- /package/build/esm/{shared-8a9d8fab.js → shared-1b7b36e0.js} +0 -0
- /package/build/esm/{translationsContext-15ea5753.js → translationsContext-b17109f4.js} +0 -0
- /package/build/esm/{tslib.es6-7355b732.js → tslib.es6-0d380d14.js} +0 -0
- /package/build/esm/{types-9cbdf8ea.js → types-5b6f2005.js} +0 -0
- /package/build/esm/{types-2d873ef3.js → types-c1fc1da0.js} +0 -0
- /package/build/esm/{useIsInit-2dd4ee59.js → useIsInit-9acf0253.js} +0 -0
- /package/build/esm/{useOutsideClick-4bb4446a.js → useOutsideClick-8ff20b0b.js} +0 -0
- /package/build/esm/{useScrollbarSize-7b64bb55.js → useScrollbarSize-d66a9ae0.js} +0 -0
- /package/build/esm/{useUniqueId-f8007ec9.js → useUniqueId-f2ae6529.js} +0 -0
- /package/build/esm/{utils-f84f026e.js → utils-31f4dd0d.js} +0 -0
- /package/build/esm/{utils-2cf0d99b.js → utils-4d680bf5.js} +0 -0
- /package/build/{index-24ab4b59.js → index-009679d8.js} +0 -0
- /package/build/{index-9d22d57f.js → index-0214fb52.js} +0 -0
- /package/build/{index-cdf1873d.js → index-40005a01.js} +0 -0
- /package/build/{index-dabb30ee.js → index-54290d5c.js} +0 -0
- /package/build/{index-fc60eb46.js → index-58998a93.js} +0 -0
- /package/build/{index-c0e9e0bd.js → index-75c1ab23.js} +0 -0
- /package/build/{index-7b687aa2.js → index-b729423c.js} +0 -0
- /package/build/{index-fb2a7a49.js → index-bc2a584b.js} +0 -0
- /package/build/{index-a10c0ac1.js → index-d171db24.js} +0 -0
- /package/build/{index.styles-35e95153.js → index.styles-8b6121ea.js} +0 -0
- /package/build/{localizeNumberFormat-ea5992f2.js → localizeNumberFormat-1374fde9.js} +0 -0
- /package/build/{normalizeLink-a18477f5.js → normalizeLink-76076a74.js} +0 -0
- /package/build/{number-5f3a4edf.js → number-2a180c11.js} +0 -0
- /package/build/{paths-9fdedd08.js → paths-df558b0b.js} +0 -0
- /package/build/{shared-916c6ada.js → shared-2f4148b6.js} +0 -0
- /package/build/{translationsContext-a23cbbd8.js → translationsContext-f7fb2a75.js} +0 -0
- /package/build/{tslib.es6-94e53345.js → tslib.es6-9fde802a.js} +0 -0
- /package/build/{types-1bbf3280.js → types-3ba5eae0.js} +0 -0
- /package/build/{types-f95847ff.js → types-73ea37c1.js} +0 -0
- /package/build/{useIsInit-7b7b765e.js → useIsInit-9b4015d3.js} +0 -0
- /package/build/{useOutsideClick-9c7ff6c7.js → useOutsideClick-1d4ae14f.js} +0 -0
- /package/build/{useScrollbarSize-7de31dff.js → useScrollbarSize-8efaf76c.js} +0 -0
- /package/build/{useUniqueId-3a53bb99.js → useUniqueId-1c78872a.js} +0 -0
- /package/build/{utils-436658bb.js → utils-0afcf459.js} +0 -0
- /package/build/{utils-7a4f4458.js → utils-b326229d.js} +0 -0
package/build/esm/lead.js
CHANGED
|
@@ -1,62 +1,53 @@
|
|
|
1
|
-
import { _ as __rest, a as __awaiter } from './tslib.es6-
|
|
2
|
-
import React__default, { createContext, useMemo, useEffect, useRef, useState,
|
|
1
|
+
import { _ as __rest, a as __awaiter } from './tslib.es6-0d380d14.js';
|
|
2
|
+
import React__default, { createContext, useMemo, useContext, useEffect, useRef, useState, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
|
|
3
3
|
import { createStyles, Box, useMantineTheme, Button as Button$1, Autocomplete, Input as Input$1, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, Flex, clsx, TextInput, NumberInput as NumberInput$1, rem, AspectRatio, Badge, Tooltip, Portal, Transition, Overlay } from '@mantine/core';
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
5
|
import { createFormContext, useForm } from '@mantine/form';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
|
-
import { B as BEARER_TOKEN_COOKIE } from './index-
|
|
7
|
+
import { B as BEARER_TOKEN_COOKIE } from './index-a78adcf4.js';
|
|
8
8
|
import { getCookie, setCookie } from './miscCookieHelper.js';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import './index
|
|
9
|
+
import { t as translationsMap$1 } from './translationsProvider-6246e072.js';
|
|
10
|
+
import { u as useTranslations } from './index-bab47ecc.js';
|
|
11
|
+
import { T as TranslationsContext } from './translationsContext-b17109f4.js';
|
|
12
|
+
import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-4d680bf5.js';
|
|
13
|
+
import { T as Text } from './index-1c1c0147.js';
|
|
14
|
+
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, E as ErrorIcon, O as OTP } from './index-90c5380b.js';
|
|
15
|
+
import { D as DatePicker } from './index-52681292.js';
|
|
16
|
+
import { B as Button } from './index-656d43c6.js';
|
|
17
|
+
import { G as GlobalTextStyleNew, C as CustomStylesType, F as FontWeight } from './index-7bbd0fad.js';
|
|
18
|
+
import './index.styles-b6fb30de.js';
|
|
18
19
|
import { useIntersection } from '@mantine/hooks';
|
|
19
|
-
import './index-
|
|
20
|
-
import './index-
|
|
21
|
-
import { M as MAPPED_LOCALE } from './utils-
|
|
20
|
+
import './index-f3606e41.js';
|
|
21
|
+
import './index-94b04ff9.js';
|
|
22
|
+
import { M as MAPPED_LOCALE } from './utils-ddb4b7d1.js';
|
|
22
23
|
import { DateInput } from '@mantine/dates';
|
|
23
|
-
import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-
|
|
24
|
-
import { C as COMMON_DATE_TRANSLATE_KEY } from './index-
|
|
25
|
-
import './index-
|
|
26
|
-
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-
|
|
27
|
-
import { H as Heading$1 } from './index-
|
|
28
|
-
import {
|
|
29
|
-
import { L as LOCALE } from './Locale-71a37261.js';
|
|
24
|
+
import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-d4bd4b91.js';
|
|
25
|
+
import { C as COMMON_DATE_TRANSLATE_KEY } from './index-5940bcba.js';
|
|
26
|
+
import './index-8608ade2.js';
|
|
27
|
+
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-72edf861.js';
|
|
28
|
+
import { H as Heading$1 } from './index-6019b7a2.js';
|
|
29
|
+
import { L as LOCALE } from './Locale-c58c2b74.js';
|
|
30
30
|
import { v1 } from 'uuid';
|
|
31
31
|
import { domainLocales } from './constantsDomainLocales.js';
|
|
32
32
|
import { parsePhoneNumber } from 'react-phone-number-input';
|
|
33
33
|
import styled from '@emotion/styled';
|
|
34
34
|
import { theme } from './miscTheme.js';
|
|
35
|
-
import { u as useTextStyles, C as ChoiceField, T as TextField } from './index-
|
|
36
|
-
import { T as TogetherComponentGlobalContext } from './utils-
|
|
37
|
-
import { M as MantineProvider } from './index-
|
|
38
|
-
import { i as isVideo } from './index-
|
|
39
|
-
import { I as ImageWrap, u as useScreenSize } from './index-
|
|
35
|
+
import { u as useTextStyles, C as ChoiceField, T as TextField } from './index-82de28c0.js';
|
|
36
|
+
import { T as TogetherComponentGlobalContext } from './utils-720650c0.js';
|
|
37
|
+
import { M as MantineProvider } from './index-1c6791f1.js';
|
|
38
|
+
import { i as isVideo } from './index-0d71dec6.js';
|
|
39
|
+
import { I as ImageWrap, u as useScreenSize } from './index-2055bbe6.js';
|
|
40
40
|
import { motion } from 'framer-motion';
|
|
41
41
|
import { createPortal } from 'react-dom';
|
|
42
42
|
import { ChevronDown } from '@hhgtech/icons/arrow';
|
|
43
43
|
import { MapPin } from '@hhgtech/icons/core';
|
|
44
|
-
import { I as InputDate } from './InputDate-
|
|
44
|
+
import { I as InputDate } from './InputDate-46b57231.js';
|
|
45
45
|
import { Carousel } from '@mantine/carousel';
|
|
46
|
-
import { c as currencyFormat } from './utils-
|
|
47
|
-
import { D as DrawerComponent } from './index-
|
|
48
|
-
import { C as Close } from './Close-
|
|
46
|
+
import { c as currencyFormat } from './utils-31f4dd0d.js';
|
|
47
|
+
import { D as DrawerComponent } from './index-4679aec6.js';
|
|
48
|
+
import { C as Close } from './Close-58b767d3.js';
|
|
49
49
|
import './constantsIsProduction.js';
|
|
50
|
-
import './normalizeLink-
|
|
51
|
-
import '@hhgtech/icons/other';
|
|
52
|
-
import 'classnames';
|
|
53
|
-
import './useUniqueId-f8007ec9.js';
|
|
54
|
-
import './constantsSite.js';
|
|
55
|
-
import '@emotion/react';
|
|
56
|
-
import './shared-8a9d8fab.js';
|
|
57
|
-
import '@mantine/notifications';
|
|
58
|
-
import 'date-fns/locale';
|
|
59
|
-
import './constantsRiskScreener.js';
|
|
50
|
+
import './normalizeLink-c2ae5e81.js';
|
|
60
51
|
import './i18n-values/en-PH.js';
|
|
61
52
|
import './i18n-values/hi-IN.js';
|
|
62
53
|
import './i18n-values/id-ID.js';
|
|
@@ -69,11 +60,20 @@ import './i18n-values/vi-VN.js';
|
|
|
69
60
|
import './i18n-values/vi-VN_MB.js';
|
|
70
61
|
import './i18n-values/zh-SG.js';
|
|
71
62
|
import './i18n-values/zh-TW.js';
|
|
72
|
-
import '
|
|
63
|
+
import '@hhgtech/icons/other';
|
|
64
|
+
import 'classnames';
|
|
65
|
+
import './useUniqueId-f2ae6529.js';
|
|
66
|
+
import './constantsSite.js';
|
|
67
|
+
import '@emotion/react';
|
|
68
|
+
import './shared-1b7b36e0.js';
|
|
69
|
+
import '@mantine/notifications';
|
|
70
|
+
import 'date-fns/locale';
|
|
71
|
+
import './constantsRiskScreener.js';
|
|
72
|
+
import './index-4bc073e2.js';
|
|
73
73
|
import 'slugify';
|
|
74
74
|
import 'string-format';
|
|
75
75
|
import './togetherApiPaths.js';
|
|
76
|
-
import './constants-
|
|
76
|
+
import './constants-50a0be26.js';
|
|
77
77
|
import 'vaul';
|
|
78
78
|
|
|
79
79
|
const LeadGenComponentContext = createContext({});
|
|
@@ -696,979 +696,992 @@ const clearCacheUsedEmailOrPhone = () => {
|
|
|
696
696
|
validatedCache.phoneOnly = {};
|
|
697
697
|
};
|
|
698
698
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
(Array.isArray(value) && value.length === 0)) {
|
|
737
|
-
return isBLockRequired
|
|
738
|
-
? t('validator.required')
|
|
739
|
-
: cb === null || cb === void 0 ? void 0 : cb(value);
|
|
740
|
-
}
|
|
741
|
-
return cb === null || cb === void 0 ? void 0 : cb(value);
|
|
742
|
-
};
|
|
743
|
-
};
|
|
744
|
-
return listBlockAdded
|
|
745
|
-
.filter((b) => InputBlocks.includes(b.name))
|
|
746
|
-
.reduce((r, b) => {
|
|
747
|
-
var _a;
|
|
748
|
-
const isRequired = (_a = b.data.required) !== null && _a !== void 0 ? _a : true;
|
|
749
|
-
if (b.name === 'NumberBlock') {
|
|
750
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
751
|
-
if (value && isNaN(Number(value))) {
|
|
752
|
-
return t('validator.number');
|
|
753
|
-
}
|
|
754
|
-
}, b) });
|
|
755
|
-
}
|
|
756
|
-
else if (b.name === 'EmailBlock') {
|
|
757
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
758
|
-
if (value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
759
|
-
return t('validator.email');
|
|
760
|
-
}
|
|
761
|
-
if (!value)
|
|
762
|
-
return;
|
|
763
|
-
validatingEmailRef.current = true;
|
|
764
|
-
setTimeout(() => {
|
|
765
|
-
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
766
|
-
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
767
|
-
email: value,
|
|
768
|
-
})
|
|
769
|
-
.then((tKey) => {
|
|
770
|
-
if (tKey) {
|
|
771
|
-
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
772
|
-
}
|
|
773
|
-
else {
|
|
774
|
-
formRef.current.clearFieldError(b.data.value);
|
|
775
|
-
}
|
|
776
|
-
validatingEmailRef.current = false;
|
|
777
|
-
})
|
|
778
|
-
.catch((e) => {
|
|
779
|
-
console.error(e);
|
|
780
|
-
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
781
|
-
validatingEmailRef.current = false;
|
|
782
|
-
});
|
|
783
|
-
}, 200);
|
|
784
|
-
}, b) });
|
|
785
|
-
}
|
|
786
|
-
else if (b.name === 'PhoneBlock' ||
|
|
787
|
-
b.name === 'PhoneOtpBlock' ||
|
|
788
|
-
b.name === 'ZaloOtpBlock' ||
|
|
789
|
-
b.name === 'WhatsappOtpBlock') {
|
|
790
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
791
|
-
if (value &&
|
|
792
|
-
window.intlTelInputUtils &&
|
|
793
|
-
!window.intlTelInputUtils.isValidNumber(String(value), LEAD_LOCALE.countryCode)) {
|
|
794
|
-
return t('validator.phone');
|
|
795
|
-
}
|
|
796
|
-
if (!value)
|
|
797
|
-
return;
|
|
798
|
-
validatingPhoneRef.current = true;
|
|
799
|
-
setTimeout(() => {
|
|
800
|
-
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
801
|
-
if (b.data.singleSubmission) {
|
|
802
|
-
checkUsedPhoneOnlyWithCache(campaignId, value)
|
|
803
|
-
.then((tKey) => {
|
|
804
|
-
if (tKey) {
|
|
805
|
-
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
806
|
-
}
|
|
807
|
-
else {
|
|
808
|
-
formRef.current.clearFieldError(b.data.value);
|
|
809
|
-
}
|
|
810
|
-
validatingPhoneRef.current = false;
|
|
811
|
-
})
|
|
812
|
-
.catch((err) => {
|
|
813
|
-
console.error(err);
|
|
814
|
-
formRef.current.setFieldError(b.data.value, err.message || 'Something went wrong');
|
|
815
|
-
validatingPhoneRef.current = false;
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
else {
|
|
819
|
-
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
820
|
-
phone: value,
|
|
821
|
-
})
|
|
822
|
-
.then((tKey) => {
|
|
823
|
-
if (tKey) {
|
|
824
|
-
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
825
|
-
}
|
|
826
|
-
else {
|
|
827
|
-
formRef.current.clearFieldError(b.data.value);
|
|
828
|
-
}
|
|
829
|
-
validatingPhoneRef.current = false;
|
|
830
|
-
})
|
|
831
|
-
.catch((e) => {
|
|
832
|
-
console.error(e);
|
|
833
|
-
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
834
|
-
validatingPhoneRef.current = false;
|
|
835
|
-
});
|
|
836
|
-
}
|
|
837
|
-
}, 200);
|
|
838
|
-
}, b) });
|
|
839
|
-
}
|
|
840
|
-
else if (b.name === 'DateBlock') {
|
|
841
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
842
|
-
if (value && isNaN(Date.parse(value))) {
|
|
843
|
-
return t('validator.date');
|
|
844
|
-
}
|
|
845
|
-
}, b) });
|
|
846
|
-
}
|
|
847
|
-
else if (b.name === 'TncBlock') {
|
|
848
|
-
return Object.assign(Object.assign({}, r), { [`TNC-` + b.id]: withSharedCheck('TNC-' + b.id, (value) => {
|
|
849
|
-
if (isRequired && !value) {
|
|
850
|
-
return t('validator.required');
|
|
851
|
-
}
|
|
852
|
-
}, b) });
|
|
853
|
-
}
|
|
854
|
-
else {
|
|
855
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, undefined, b) });
|
|
856
|
-
}
|
|
857
|
-
}, {});
|
|
858
|
-
}, [listBlockAdded.map((b) => b.name).join(',')]);
|
|
859
|
-
const form = useLeadForm$1({
|
|
860
|
-
validateInputOnChange: true,
|
|
861
|
-
clearInputErrorOnChange: true,
|
|
862
|
-
validate: validateObj,
|
|
863
|
-
initialValues,
|
|
864
|
-
});
|
|
865
|
-
const formRef = useRef(form);
|
|
866
|
-
formRef.current = form;
|
|
867
|
-
return { form, validateObj };
|
|
699
|
+
var enPH = {
|
|
700
|
+
"validator.required": "This field is required.",
|
|
701
|
+
"validator.remote": "Please fix this field.",
|
|
702
|
+
"validator.email": "Please enter a valid email address.",
|
|
703
|
+
"validator.phone": "Please input correct phone number.",
|
|
704
|
+
"validator.url": "Please enter a valid URL.",
|
|
705
|
+
"validator.date": "Please enter a valid date.",
|
|
706
|
+
"validator.dateISO": "Please enter a valid date (ISO).",
|
|
707
|
+
"validator.number": "Please enter a valid number.",
|
|
708
|
+
"validator.digits": "Please enter only digits.",
|
|
709
|
+
"validator.creditcard": "Please enter a valid credit card number.",
|
|
710
|
+
"validator.equalTo": "Please enter the same value again.",
|
|
711
|
+
"validator.accept": "Please enter a value with a valid extension.",
|
|
712
|
+
"validator.maxlength": "jQuery.validator.format('Please enter no more than {0} characters.",
|
|
713
|
+
"validator.minlength": "jQuery.validator.format('Please enter at least {0} characters.",
|
|
714
|
+
"validator.rangelength": "jQuery.validator.format('Please enter a value between {0} and {1} characters long.",
|
|
715
|
+
"validator.range": "jQuery.validator.format('Please enter a value between {0} and {1}.",
|
|
716
|
+
"validator.max": "jQuery.validator.format('Please enter a value less than or equal to {0}.",
|
|
717
|
+
"validator.min": "jQuery.validator.format('Please enter a value greater than or equal to {0}.",
|
|
718
|
+
"validator.emailUsed": "Email already in use for this campaign.",
|
|
719
|
+
"validator.phoneUsed": "Your phone number already in use for this campaign.",
|
|
720
|
+
"validator.dateInvalid": "This date is not valid, please update.",
|
|
721
|
+
"lead.otp.title": "Enter OTP",
|
|
722
|
+
"lead.otp.desc": "We have sent an OTP to your mobile number {phone}",
|
|
723
|
+
"lead.otp.verify": "Verify",
|
|
724
|
+
"lead.otp.resend": "Resend OTP{timer}",
|
|
725
|
+
"lead.otp.phoneLabel": "Phone OTP",
|
|
726
|
+
"lead.otp.phonePlaceholder": "Enter OTP",
|
|
727
|
+
"lead.empty.title": "Oops, seem your information is empty, do you want to submit the information again?",
|
|
728
|
+
"lead.empty.cancel": "Cancel",
|
|
729
|
+
"lead.empty.submitAgain": "Submit again",
|
|
730
|
+
"inlineFreebie.freeSample.title": "Free Sample",
|
|
731
|
+
"inlineFreebie.luckyDrawGift.title": "Lucky-draw Gift",
|
|
732
|
+
"inlineFreebie.value": "Value",
|
|
733
|
+
"common.day": "Day",
|
|
734
|
+
"common.month": "Month",
|
|
735
|
+
"common.year": "Year"
|
|
868
736
|
};
|
|
869
737
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
setShowOtpPhone(null);
|
|
895
|
-
}
|
|
896
|
-
else {
|
|
897
|
-
onCloseProp === null || onCloseProp === void 0 ? void 0 : onCloseProp();
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
useEffect(() => {
|
|
901
|
-
clearCacheUsedEmailOrPhone();
|
|
902
|
-
}, []);
|
|
903
|
-
return campaign ? (React__default.createElement(LeadGenComponentContext.Provider, { value: {
|
|
904
|
-
campaignId,
|
|
905
|
-
campaign_subot_id,
|
|
906
|
-
heading,
|
|
907
|
-
description,
|
|
908
|
-
listBlockAdded,
|
|
909
|
-
textBlocks,
|
|
910
|
-
actionBlocks,
|
|
911
|
-
leadFormConfig,
|
|
912
|
-
validatingEmailRef,
|
|
913
|
-
validatingPhoneRef,
|
|
914
|
-
formRef: { current: formRef },
|
|
915
|
-
setFormRef,
|
|
916
|
-
locale,
|
|
917
|
-
onClose,
|
|
918
|
-
onOtherSubmit,
|
|
919
|
-
showOtpPhone,
|
|
920
|
-
setShowOtpPhone,
|
|
921
|
-
onSubmit,
|
|
922
|
-
showThankyou,
|
|
923
|
-
setShowThankyou,
|
|
924
|
-
showEmpty,
|
|
925
|
-
setShowEmpty,
|
|
926
|
-
} }, children)) : null;
|
|
738
|
+
var hiIN = {
|
|
739
|
+
"validator.required": "इस क्षेत्र की आवश्यकता है।",
|
|
740
|
+
"validator.email": "कृपया एक मान्य ईमेल पता दर्ज करें",
|
|
741
|
+
"validator.number": "कृपया एक वैध संख्या दर्ज करें",
|
|
742
|
+
"validator.digits": "कृपया केवल अंक दर्ज करें",
|
|
743
|
+
"validator.maxlength": "कृपया {0} अक्षर से अधिक दर्ज न करें",
|
|
744
|
+
"validator.minlength": "कृपया कम से कम {0} अक्षर दर्ज करें",
|
|
745
|
+
"validator.phone": "कृपया एक वैध संख्या दर्ज करें",
|
|
746
|
+
"validator.dateInvalid": "यह तिथि मान्य नहीं है, कृपया अपडेट करें।",
|
|
747
|
+
"validator.emailUsed": "Email already in use for this campaign.",
|
|
748
|
+
"validator.phoneUsed": "Your phone number already in use for this campaign.",
|
|
749
|
+
"lead.otp.title": "Enter OTP",
|
|
750
|
+
"lead.otp.desc": "We have sent an OTP to your mobile number {phone}",
|
|
751
|
+
"lead.otp.verify": "Verify",
|
|
752
|
+
"lead.otp.resend": "Resend OTP{timer}",
|
|
753
|
+
"lead.empty.title": "ऊप्स! लगता है आपकी जानकारी खाली है। क्या आप जानकारी फिर से सबमिट करना चाहते हैं?",
|
|
754
|
+
"lead.empty.cancel": "रद्द करें",
|
|
755
|
+
"lead.empty.submitAgain": "फिर से सबमिट करें",
|
|
756
|
+
"inlineFreebie.freeSample.title": "मुफ्त नमूना",
|
|
757
|
+
"inlineFreebie.luckyDrawGift.title": "लकी-ड्रा गिफ्ट",
|
|
758
|
+
"inlineFreebie.value": "मूल्य",
|
|
759
|
+
"common.day": "साल",
|
|
760
|
+
"common.month": "महीना",
|
|
761
|
+
"common.year": ""
|
|
927
762
|
};
|
|
928
763
|
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
764
|
+
var idID = {
|
|
765
|
+
"validator.required": "Kolom ini wajib diisi",
|
|
766
|
+
"validator.email": "Tolong daftarkan email yang valid",
|
|
767
|
+
"validator.number": "Tolong daftarkan nomor telepon yang valid",
|
|
768
|
+
"validator.digits": "Tolong masukkan angka saja",
|
|
769
|
+
"validator.maxlength": "Jangan memasukkan lebih dari {0} karakter",
|
|
770
|
+
"validator.minlength": "Tolong ketik sedikitnya {0} karakter",
|
|
771
|
+
"validator.phone": "Tolong daftarkan nomor telepon yang valid",
|
|
772
|
+
"validator.emailUsed": "Email sudah digunakan untuk kampanye ini.",
|
|
773
|
+
"validator.phoneUsed": "Nomor telepon Anda sudah digunakan untuk kampanye ini.",
|
|
774
|
+
"validator.dateInvalid": "Tanggal ini tidak valid, silakan perbarui",
|
|
775
|
+
"lead.otp.title": "Masukkan OTP",
|
|
776
|
+
"lead.otp.desc": "Kami telah mengirimkan OTP ke nomor ponsel Anda {phone}",
|
|
777
|
+
"lead.otp.verify": "Verifikasi",
|
|
778
|
+
"lead.otp.resend": "Kirim Ulang OTP {timer}",
|
|
779
|
+
"lead.otp.phoneLabel": "OTP Telepon",
|
|
780
|
+
"lead.otp.phonePlaceholder": "Masukkan OTP",
|
|
781
|
+
"lead.empty.title": "Oops, sepertinya informasi Anda kosong. Apakah Anda ingin mengirimkan informasi lagi?",
|
|
782
|
+
"lead.empty.cancel": "Batal",
|
|
783
|
+
"lead.empty.submitAgain": "Kirim lagi",
|
|
784
|
+
"inlineFreebie.freeSample.title": "Sampel Gratis",
|
|
785
|
+
"inlineFreebie.luckyDrawGift.title": "Hadiah Undian",
|
|
786
|
+
"inlineFreebie.value": "Nilai",
|
|
787
|
+
"common.day": "Hari",
|
|
788
|
+
"common.month": "Bulan",
|
|
789
|
+
"common.year": "Tahun"
|
|
933
790
|
};
|
|
934
791
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
}
|
|
792
|
+
var kmKH = {
|
|
793
|
+
"validator.required": "ព័ត៌មានចាំបាច់ដែលត្រូវបំពេញ",
|
|
794
|
+
"validator.email": "សូមវាយអាសយដ្ឋានអ៊ីម៉ែលឲ្យបានត្រឹមត្រូវ",
|
|
795
|
+
"validator.number": "សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ",
|
|
796
|
+
"validator.digits": "វាយបញ្ចូលបានតែលេខប៉ុណ្ណោះ",
|
|
797
|
+
"validator.maxlength": "សូមវាយបញ្ចូលកុំឲ្យលើស {0} តួអក្សរ",
|
|
798
|
+
"validator.minlength": "សូមវាយបញ្ចូលតិចបំផុត {0} តួអក្ស",
|
|
799
|
+
"validator.phone": "សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ",
|
|
800
|
+
"validator.emailUsed": "អ៊ីមែលត្រូវបានប្រើប្រាស់សម្រាប់យុទ្ធនាការនេះរួចហើយ។",
|
|
801
|
+
"validator.phoneUsed": "លេខទូរស័ព្ទរបស់អ្នកត្រូវបានប្រើប្រាស់សម្រាប់យុទ្ធនាការនេះរួចហើយ។",
|
|
802
|
+
"validator.dateInvalid": "កាលបរិច្ឆេទនេះមិនត្រឹមត្រូវទេ សូមធ្វើបច្ចុប្បន្នភាព។",
|
|
803
|
+
"lead.otp.title": "បញ្ចូល OTP",
|
|
804
|
+
"lead.otp.desc": "យើងបានផ្ញើ OTP ទៅកាន់លេខទូរសព្ទរបស់អ្នក {phone}",
|
|
805
|
+
"lead.otp.verify": "ផ្ទៀងផ្ទាត់",
|
|
806
|
+
"lead.otp.resend": "ផ្ញើ OTP ម្តងទៀត {timer}",
|
|
807
|
+
"lead.otp.phoneLabel": "OTP ទូរស័ព្ទ",
|
|
808
|
+
"lead.otp.phonePlaceholder": "បញ្ចូល OTP",
|
|
809
|
+
"lead.empty.title": "អូុបស! ហាក់ដូចជាព័ត៌មានរបស់អ្នកទទេ។ តើអ្នកចង់ដាក់ស្នើព័ត៌មានម្តងទៀតទេ?",
|
|
810
|
+
"lead.empty.cancel": "លុបចោល",
|
|
811
|
+
"lead.empty.submitAgain": "ដាក់ស្នើម្ដងទៀត",
|
|
812
|
+
"inlineFreebie.freeSample.title": "សំបុត្រស្រង់ពិន័យ",
|
|
813
|
+
"inlineFreebie.luckyDrawGift.title": "សំបុត្រស្រង់ពិន័យ",
|
|
814
|
+
"inlineFreebie.value": "តម្លៃ",
|
|
815
|
+
"common.day": "ឆ្នាំ",
|
|
816
|
+
"common.month": "ខែ",
|
|
817
|
+
"common.year": "ថ្ងៃ"
|
|
818
|
+
};
|
|
942
819
|
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
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)) {
|
|
970
|
-
import('@react-google-maps/api').then((m) => {
|
|
971
|
-
setLoadScript(() => m.LoadScript);
|
|
972
|
-
setTimeout(() => {
|
|
973
|
-
setReady(true);
|
|
974
|
-
}, 200);
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
else {
|
|
978
|
-
setReady(true);
|
|
979
|
-
}
|
|
980
|
-
}, []);
|
|
981
|
-
if (!ready)
|
|
982
|
-
return (React__default.createElement("div", { style: {
|
|
983
|
-
height: 73,
|
|
984
|
-
} }));
|
|
985
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
986
|
-
LoadScript && (React__default.createElement(LoadScript, { googleMapsApiKey: GOOGLE_API_KEY, libraries: libraries$1, loadingElement: React__default.createElement(React__default.Fragment, null) })),
|
|
987
|
-
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": name, "data-control": 'text' }),
|
|
988
|
-
React__default.createElement(Select, Object.assign({ className: "lead-modal__form-control", label: placeholder, placeholder: placeholder, withAsterisk: required, name: name, data: options, searchValue: searchValue, onSearchChange: (query) => {
|
|
989
|
-
setSearchValue(query);
|
|
990
|
-
}, filter: () => true, clearable: true, searchable: true, onChange: (val) => setAddress(val || ''), icon: React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" },
|
|
991
|
-
React__default.createElement("path", { d: "M10 9.792q.605 0 1.032-.427.426-.428.426-1.032 0-.603-.426-1.031A1.4 1.4 0 0 0 10 6.875q-.604 0-1.032.427a1.4 1.4 0 0 0-.426 1.031q0 .604.426 1.032.428.426 1.032.427m0 8.083q-.145 0-.292-.042a.7.7 0 0 1-.27-.145Q6.478 15 5.01 12.708 3.54 10.418 3.54 8.5q0-3.021 1.949-4.823T10 1.875t4.51 1.802q1.95 1.802 1.949 4.823 0 1.917-1.468 4.208-1.47 2.292-4.427 4.98a.7.7 0 0 1-.271.145 1 1 0 0 1-.292.042", fill: "#8C8C8C" })), autoComplete: 'no-auto-complete-' + randRef.current, rightSection: React__default.createElement(React__default.Fragment, null) }, form.getInputProps(name)))));
|
|
820
|
+
var msMY = {
|
|
821
|
+
"validator.required": "Bahagian ini wajib diisi.",
|
|
822
|
+
"validator.email": "Sila masukkan alamat emel yang sah.",
|
|
823
|
+
"validator.number": "Sila masukkan no telefon yang sah.",
|
|
824
|
+
"validator.digits": "Sila masukkan nombor digit sahaja.",
|
|
825
|
+
"validator.maxlength": "Sila masukkan tidak lebih dari {0} aksara",
|
|
826
|
+
"validator.minlength": "Sila masukkan sekurang-kurangnya {0} aksara",
|
|
827
|
+
"validator.phone": "Sila masukkan no telefon yang sah.",
|
|
828
|
+
"validator.emailUsed": "Emel sudah digunakan untuk kempen ini.",
|
|
829
|
+
"validator.phoneUsed": "Nombor telefon anda sudah digunakan untuk kempen ini.",
|
|
830
|
+
"validator.dateInvalid": "Tarikh ini tidak sah, sila kemas kini",
|
|
831
|
+
"lead.otp.title": "Masukkan OTP",
|
|
832
|
+
"lead.otp.desc": "Kami telah menghantar OTP ke nombor telefon bimbit anda {phone}",
|
|
833
|
+
"lead.otp.verify": "Sahkan",
|
|
834
|
+
"lead.otp.resend": "Hantar semula OTP {timer}",
|
|
835
|
+
"lead.otp.phoneLabel": "OTP Telefon",
|
|
836
|
+
"lead.otp.phonePlaceholder": "Masukkan OTP",
|
|
837
|
+
"lead.empty.title": "Oops, nampaknya maklumat anda kosong. Adakah anda ingin menghantar maklumat semula?",
|
|
838
|
+
"lead.empty.cancel": "Batal",
|
|
839
|
+
"lead.empty.submitAgain": "Hantar semula",
|
|
840
|
+
"inlineFreebie.freeSample.title": "Sampel Percuma",
|
|
841
|
+
"inlineFreebie.luckyDrawGift.title": "Hadiah Undian",
|
|
842
|
+
"inlineFreebie.value": "Nilai",
|
|
843
|
+
"common.day": "Hari",
|
|
844
|
+
"common.month": "Bulan",
|
|
845
|
+
"common.year": "Tahun"
|
|
992
846
|
};
|
|
993
847
|
|
|
994
|
-
|
|
848
|
+
var myMM = {
|
|
849
|
+
"validator.required": "ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်",
|
|
850
|
+
"validator.email": "မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ",
|
|
851
|
+
"validator.number": "မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ",
|
|
852
|
+
"validator.digits": "နံပါတ်များသာဖြည့်ပါ",
|
|
853
|
+
"validator.maxlength": "ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ",
|
|
854
|
+
"validator.minlength": "ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ",
|
|
855
|
+
"validator.phone": "မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ",
|
|
856
|
+
"validator.emailUsed": "ဤအေကာင့်အတွက် အီးမေးလ်ကို အသုံးပြုပြီးဖြစ်ပါသည်။",
|
|
857
|
+
"validator.phoneUsed": "ဤအေကာင့်အတွက် သင့်ဖုန်းနံပါတ်ကို အသုံးပြုပြီးဖြစ်ပါသည်။",
|
|
858
|
+
"validator.dateInvalid": "ယနေ့စွဲမှားနေသည်၊ ကျေးဇူးပြု၍ ပြင်ဆင်ပါ။",
|
|
859
|
+
"lead.otp.title": "OTP ကိုထည့်ပါ",
|
|
860
|
+
"lead.otp.desc": "ကျွန်ုပ်တို့သည် OTP ကိုသင့်ဖုန်းနံပါတ် {phone} သို့ပို့ခဲ့သည်",
|
|
861
|
+
"lead.otp.verify": "အတည်ပြုပါ",
|
|
862
|
+
"lead.otp.resend": "OTP ကိုထပ်မံပို့ရန် {timer}",
|
|
863
|
+
"lead.otp.phoneLabel": "ဖုန်း OTP",
|
|
864
|
+
"lead.otp.phonePlaceholder": "OTP ကိုထည့်ပါ",
|
|
865
|
+
"lead.empty.title": "အုပ်စ်! သင့်အချက်အလက်သည် ဗလာဖြစ်နေသလိုဖြစ်သည်။ ထပ်မံတင်သွင်းလိုပါသလား?",
|
|
866
|
+
"lead.empty.cancel": "မလုပ်ဆောင်ပါ",
|
|
867
|
+
"lead.empty.submitAgain": "ထပ်မံတင်သွင်းပါ",
|
|
868
|
+
"inlineFreebie.freeSample.title": "အခမဲ့အစားအစာ",
|
|
869
|
+
"inlineFreebie.luckyDrawGift.title": "အခမဲ့အစားအစာ",
|
|
870
|
+
"inlineFreebie.value": "တန်ဖိုး",
|
|
871
|
+
"common.day": "ရက်",
|
|
872
|
+
"common.month": "လ",
|
|
873
|
+
"common.year": "နှစ်"
|
|
874
|
+
};
|
|
995
875
|
|
|
996
|
-
|
|
876
|
+
var thTH = {
|
|
877
|
+
"validator.required": "ต้องระบุข้อมูลในช่องนี้",
|
|
878
|
+
"validator.email": "กรุณาใส่อีเมล์ที่ถูกต้อง",
|
|
879
|
+
"validator.number": "กรุณาใส่ตัวเลขที่ถูกต้อง",
|
|
880
|
+
"validator.digits": "กรุณาส่เฉพาะตัวเลข",
|
|
881
|
+
"validator.maxlength": "กรุณาใส่ตัวเลขมากกว่า {0} หลัก",
|
|
882
|
+
"validator.minlength": "กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก",
|
|
883
|
+
"validator.phone": "กรุณาใส่ตัวเลขที่ถูกต้อง",
|
|
884
|
+
"validator.emailUsed": "อีเมลนี้ถูกใช้สำหรับแคมเปญนี้แล้ว",
|
|
885
|
+
"validator.phoneUsed": "หมายเลขโทรศัพท์ของคุณถูกใช้สำหรับแคมเปญนี้แล้ว",
|
|
886
|
+
"validator.dateInvalid": "วันที่นี้ไม่ถูกต้อง โปรดอัปเดต",
|
|
887
|
+
"lead.otp.title": "ป้อน OTP",
|
|
888
|
+
"lead.otp.desc": "เราได้ส่ง OTP ไปยังหมายเลขโทรศัพท์มือถือของคุณ {phone}",
|
|
889
|
+
"lead.otp.verify": "ยืนยัน",
|
|
890
|
+
"lead.otp.resend": "ส่ง OTP อีกครั้ง {timer}",
|
|
891
|
+
"lead.otp.phoneLabel": "OTP โทรศัพท์",
|
|
892
|
+
"lead.otp.phonePlaceholder": "ป้อน OTP",
|
|
893
|
+
"lead.empty.title": "อุ๊ปส์! ดูเหมือนว่าข้อมูลของคุณว่างเปล่า คุณต้องการส่งข้อมูลอีกครั้งหรือไม่?",
|
|
894
|
+
"lead.empty.cancel": "ยกเลิก",
|
|
895
|
+
"lead.empty.submitAgain": "ส่งอีกครั้ง",
|
|
896
|
+
"inlineFreebie.freeSample.title": "ตัวอย่างฟรี",
|
|
897
|
+
"inlineFreebie.luckyDrawGift.title": "ของรางวัลที่ถูกรางวัล",
|
|
898
|
+
"inlineFreebie.value": "ค่า",
|
|
899
|
+
"common.day": "วัน",
|
|
900
|
+
"common.month": "เดือน",
|
|
901
|
+
"common.year": "ปี"
|
|
902
|
+
};
|
|
997
903
|
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
className: cx('leadgen-control', classes.control), labelProps: {
|
|
1036
|
-
htmlFor: id,
|
|
1037
|
-
} }, form.getInputProps(value)),
|
|
1038
|
-
React__default.createElement(Phone, { name: value, spellCheck: false, type: "tel", placeholder: placeholder, value: form.getInputProps(value).value, onChange: (v) => {
|
|
1039
|
-
form.setFieldValue(value, v);
|
|
1040
|
-
},
|
|
1041
|
-
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
1042
|
-
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel", "data-lead-control": name, "data-is-required": required })));
|
|
1043
|
-
}
|
|
1044
|
-
case 'LocationBlock': {
|
|
1045
|
-
return (React__default.createElement(LocationBlock, { key: index, name: value, placeholder: placeholder, locale: locale, required: required }));
|
|
1046
|
-
}
|
|
1047
|
-
case 'DateBlock':
|
|
1048
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
1049
|
-
React__default.createElement(DatePicker, Object.assign({ withAsterisk: required, key: index, type: "default", name: value, placeholder: placeholder, className: cx('leadgen-control', classes.control), label: placeholder, "data-control": "date", "data-lead-control": name, "data-is-required": required, popoverProps: popoverProps }, form.getInputProps(value))),
|
|
1050
|
-
React__default.createElement("input", { type: "hidden", name: value, "data-control": "date" })));
|
|
1051
|
-
case 'LinkButtonBlock':
|
|
1052
|
-
return (React__default.createElement("div", { key: index },
|
|
1053
|
-
React__default.createElement("a", { target: newtab ? 'blank' : 'parrent', href: url, style: { textDecoration: 'none' } },
|
|
1054
|
-
React__default.createElement(Button, { type: "button", size: "md", color: primaryColor, className: `lead-modal__btn ${LEAD_CLASS}`, onClick: () => {
|
|
1055
|
-
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
1056
|
-
onOtherSubmit === null || onOtherSubmit === void 0 ? void 0 : onOtherSubmit();
|
|
1057
|
-
} }, value))));
|
|
1058
|
-
case 'CheckboxBlock':
|
|
1059
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
1060
|
-
isSendMailChimp && (React__default.createElement("div", { style: {
|
|
1061
|
-
display: 'none',
|
|
1062
|
-
}, "data-name": value + '-mailchimp' })),
|
|
1063
|
-
React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required, className: cx('leadgen-control', classes.control), key: index, label: placeholder, size: "md", sx: {
|
|
1064
|
-
display: 'flex',
|
|
1065
|
-
flexDirection: 'column',
|
|
1066
|
-
gap: 8,
|
|
1067
|
-
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Checkbox, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }))))));
|
|
1068
|
-
case 'RadioBlock':
|
|
1069
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
1070
|
-
isSendMailChimp && (React__default.createElement(Input, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
|
|
1071
|
-
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required, className: cx('leadgen-control', classes.control), key: index, label: placeholder, size: "md" }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio", "data-lead-control": name, "data-is-required": required }))))));
|
|
1072
|
-
case 'DropdownBlock':
|
|
1073
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
1074
|
-
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown', "data-lead-control": name, "data-is-required": required }),
|
|
1075
|
-
React__default.createElement(Select, Object.assign({ key: index, className: cx('leadgen-control', classes.control), label: placeholder, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
|
|
1076
|
-
value: l.value,
|
|
1077
|
-
label: l.placeholder,
|
|
1078
|
-
})) }, form.getInputProps(value)))));
|
|
1079
|
-
case 'TncBlock':
|
|
1080
|
-
const tncInputProps = form.getInputProps('TNC-' + b.id);
|
|
1081
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
1082
|
-
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + b.id, key: b.id, label: React__default.createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: data.valueHTML } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps, { error: tncInputProps.error ? tncInputProps.error : undefined }))));
|
|
1083
|
-
}
|
|
1084
|
-
return null;
|
|
1085
|
-
})));
|
|
904
|
+
var viVN = {
|
|
905
|
+
"validator.required": "Vui lòng điền mục này",
|
|
906
|
+
"validator.email": "Vui lòng điền email có thật.",
|
|
907
|
+
"validator.number": "Vui lòng điền số có thật",
|
|
908
|
+
"validator.digits": "Vui lòng chỉ điền số",
|
|
909
|
+
"validator.maxlength": "Vui lòng điền dưới {0} số",
|
|
910
|
+
"validator.minlength": "Vui lòng điền hơn {0} số",
|
|
911
|
+
"validator.remote": "Hãy sửa cho đúng.",
|
|
912
|
+
"validator.url": "Hãy nhập URL.",
|
|
913
|
+
"validator.date": "Hãy nhập ngày.",
|
|
914
|
+
"validator.dateISO": "Hãy nhập ngày (ISO).",
|
|
915
|
+
"validator.creditcard": "Hãy nhập số thẻ tín dụng.",
|
|
916
|
+
"validator.equalTo": "Hãy nhập thêm lần nữa.",
|
|
917
|
+
"validator.extension": "Phần mở rộng không đúng.",
|
|
918
|
+
"validator.rangelength": "Hãy nhập từ {0} đến {1} kí tự.",
|
|
919
|
+
"validator.range": "Hãy nhập từ {0} đến {1}.",
|
|
920
|
+
"validator.max": "Hãy nhập từ {0} trở xuống.",
|
|
921
|
+
"validator.min": "Hãy nhập từ {0} trở lên.",
|
|
922
|
+
"validator.phone": "Nhập đúng định dạng số điện thoại",
|
|
923
|
+
"validator.emailUsed": "Email này đã được sử dụng.",
|
|
924
|
+
"validator.phoneUsed": "Số điện thoại này đã được sử dụng.",
|
|
925
|
+
"validator.dateInvalid": "Ngày này không hợp lệ, vui lòng cập nhật.",
|
|
926
|
+
"lead.otp.title": "Nhập OTP",
|
|
927
|
+
"lead.otp.desc": "Chúng tôi đã gửi OTP đến số điện thoại của bạn {phone}",
|
|
928
|
+
"lead.otp.verify": "Xác minh",
|
|
929
|
+
"lead.otp.resend": "Gửi lại OTP {timer}",
|
|
930
|
+
"lead.otp.phoneLabel": "Nhập OTP",
|
|
931
|
+
"lead.otp.phonePlaceholder": "Nhập OTP",
|
|
932
|
+
"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?",
|
|
933
|
+
"lead.empty.cancel": "Hủy",
|
|
934
|
+
"lead.empty.submitAgain": "Gửi lại",
|
|
935
|
+
"inlineFreebie.freeSample.title": "Dùng thử miễn phí",
|
|
936
|
+
"inlineFreebie.luckyDrawGift.title": "Phần thưởng may mắn",
|
|
937
|
+
"inlineFreebie.value": "Trị giá",
|
|
938
|
+
"common.day": "Ngày",
|
|
939
|
+
"common.month": "Tháng",
|
|
940
|
+
"common.year": "Năm"
|
|
1086
941
|
};
|
|
1087
942
|
|
|
1088
|
-
var
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
943
|
+
var zhTW = {
|
|
944
|
+
"validator.required": "此為必填欄位",
|
|
945
|
+
"validator.email": "請填入有效的 email 地址",
|
|
946
|
+
"validator.number": "請填入有效的電話號碼",
|
|
947
|
+
"validator.digits": "此欄位僅能輸入數字",
|
|
948
|
+
"validator.maxlength": "請輸入少於 {0} 位數",
|
|
949
|
+
"validator.minlength": "請輸入至少 {0} 位數",
|
|
950
|
+
"validator.phone": "請填入有效的電話號碼",
|
|
951
|
+
"validator.emailUsed": "此電子郵件已被使用於此活動。",
|
|
952
|
+
"validator.phoneUsed": "您的手機號碼已被使用於此活動。",
|
|
953
|
+
"validator.dateInvalid": "此日期無效,請更新.",
|
|
954
|
+
"lead.otp.title": "輸入 OTP",
|
|
955
|
+
"lead.otp.desc": "我們已將 OTP 發送到您的手機號碼 {phone}",
|
|
956
|
+
"lead.otp.verify": "驗證",
|
|
957
|
+
"lead.otp.resend": "重新發送 OTP {timer}",
|
|
958
|
+
"lead.otp.phoneLabel": "電話 OTP",
|
|
959
|
+
"lead.otp.phonePlaceholder": "輸入 OTP",
|
|
960
|
+
"lead.empty.title": "哎呀,您的資訊似乎是空的,您想要重新提交資訊嗎?",
|
|
961
|
+
"lead.empty.cancel": "取消",
|
|
962
|
+
"lead.empty.submitAgain": "重新提交",
|
|
963
|
+
"inlineFreebie.freeSample.title": "免費試用",
|
|
964
|
+
"inlineFreebie.luckyDrawGift.title": "幸運抽獎禮品",
|
|
965
|
+
"inlineFreebie.value": "價值",
|
|
966
|
+
"common.day": "日",
|
|
967
|
+
"common.month": "月",
|
|
968
|
+
"common.year": "年"
|
|
969
|
+
};
|
|
1105
970
|
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
971
|
+
const translationsMap = {
|
|
972
|
+
'en-PH': enPH,
|
|
973
|
+
'vi-VN': viVN,
|
|
974
|
+
'hi-IN': hiIN,
|
|
975
|
+
'id-ID': idID,
|
|
976
|
+
'ms-MY': msMY,
|
|
977
|
+
'my-MM': myMM,
|
|
978
|
+
'km-KH': kmKH,
|
|
979
|
+
'zh-TW': zhTW,
|
|
980
|
+
'zh-SG': zhTW,
|
|
981
|
+
'th-TH': thTH,
|
|
982
|
+
'tl-PH': enPH,
|
|
983
|
+
};
|
|
984
|
+
const getTranslations = (locale) => {
|
|
985
|
+
const translations = Object.assign(Object.assign({}, translationsMap$1[locale]), translationsMap[locale]);
|
|
986
|
+
if (translations) {
|
|
987
|
+
return translations;
|
|
988
|
+
}
|
|
989
|
+
return translationsMap['en-PH'];
|
|
1110
990
|
};
|
|
1111
991
|
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1114
|
-
const
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
const middlewareOnSubmit = (e) => {
|
|
1126
|
-
e.preventDefault();
|
|
1127
|
-
// mark all as touched to allow validation
|
|
1128
|
-
form.setTouched(Object.keys(validateObj).reduce((acc, cur) => {
|
|
1129
|
-
acc[cur] = true;
|
|
1130
|
-
return acc;
|
|
1131
|
-
}, {}));
|
|
1132
|
-
if (validatingEmailRef.current || validatingPhoneRef.current) {
|
|
1133
|
-
return;
|
|
992
|
+
const FormatMessageContext = createContext(null);
|
|
993
|
+
const LeadGenTranslationProvider = ({ locale, formatMessage, children, }) => {
|
|
994
|
+
const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
|
|
995
|
+
return (React__default.createElement(FormatMessageContext.Provider, { value: formatMessage || null }, formatMessage ? (children) : (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children))));
|
|
996
|
+
};
|
|
997
|
+
const useLeadGenTranslations = () => {
|
|
998
|
+
const externalFormatMessage = useContext(FormatMessageContext);
|
|
999
|
+
const { t: internalT, locale } = useTranslations();
|
|
1000
|
+
const t = useMemo(() => {
|
|
1001
|
+
if (externalFormatMessage) {
|
|
1002
|
+
return (key, options) => {
|
|
1003
|
+
return externalFormatMessage({ id: key, defaultMessage: key }, options);
|
|
1004
|
+
};
|
|
1134
1005
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1006
|
+
return internalT;
|
|
1007
|
+
}, [externalFormatMessage, internalT]);
|
|
1008
|
+
return { t, locale };
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
// You can give context variables any name
|
|
1012
|
+
const [LeadFormProvider$1, useLeadFormContext$1, useLeadForm$1] = createFormContext();
|
|
1013
|
+
const useLeadFormConfig$1 = ({ listBlockAdded = [], validatingPhoneRef, validatingEmailRef, campaignId, campaign_subot_id = [], userInfo, }) => {
|
|
1014
|
+
const { t } = useLeadGenTranslations();
|
|
1015
|
+
const initialValues = useMemo(() => formatLeadGenFormValue(mappingSSOToLead(userInfo), listBlockAdded), [userInfo === null || userInfo === void 0 ? void 0 : userInfo.id]);
|
|
1016
|
+
useEffect(() => {
|
|
1017
|
+
if (!window.intlTelInputUtils) {
|
|
1018
|
+
require('intl-tel-input/build/js/utils');
|
|
1019
|
+
}
|
|
1020
|
+
}, []);
|
|
1021
|
+
const validateObj = useMemo(() => {
|
|
1022
|
+
const InputBlocks = [
|
|
1023
|
+
'TextBlock',
|
|
1024
|
+
'NumberBlock',
|
|
1025
|
+
'EmailBlock',
|
|
1026
|
+
'PhoneBlock',
|
|
1027
|
+
'DateBlock',
|
|
1028
|
+
'CheckboxBlock',
|
|
1029
|
+
'RadioBlock',
|
|
1030
|
+
'DropdownBlock',
|
|
1031
|
+
'PhoneOtpBlock',
|
|
1032
|
+
'WhatsappOtpBlock',
|
|
1033
|
+
'ZaloOtpBlock',
|
|
1034
|
+
'LocationBlock',
|
|
1035
|
+
'TncBlock',
|
|
1036
|
+
];
|
|
1037
|
+
// ALL are required and can skip if not touched yet
|
|
1038
|
+
const withSharedCheck = (name, cb,
|
|
1039
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1040
|
+
block) => {
|
|
1041
|
+
return (value) => {
|
|
1042
|
+
var _a;
|
|
1043
|
+
const isBLockRequired = (_a = block === null || block === void 0 ? void 0 : block.data) === null || _a === void 0 ? void 0 : _a.required;
|
|
1044
|
+
if (!formRef.current.isTouched(name))
|
|
1139
1045
|
return;
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
phone: v[fieldName],
|
|
1147
|
-
type: 'phone',
|
|
1148
|
-
};
|
|
1149
|
-
}
|
|
1046
|
+
if (typeof value === 'undefined' ||
|
|
1047
|
+
value === '' ||
|
|
1048
|
+
(Array.isArray(value) && value.length === 0)) {
|
|
1049
|
+
return isBLockRequired
|
|
1050
|
+
? t('validator.required')
|
|
1051
|
+
: cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1150
1052
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
setIsSubmitLoading(true);
|
|
1173
|
-
Service.sendSMSOtpLead(newShowOtpPhone)
|
|
1174
|
-
.then((res) => {
|
|
1175
|
-
var _a;
|
|
1176
|
-
const respMessage = (_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0];
|
|
1177
|
-
if (respMessage === 'This phone number was verified') {
|
|
1178
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
1053
|
+
return cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
return listBlockAdded
|
|
1057
|
+
.filter((b) => InputBlocks.includes(b.name))
|
|
1058
|
+
.reduce((r, b) => {
|
|
1059
|
+
var _a;
|
|
1060
|
+
const isRequired = (_a = b.data.required) !== null && _a !== void 0 ? _a : true;
|
|
1061
|
+
if (b.name === 'NumberBlock') {
|
|
1062
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1063
|
+
if (value && isNaN(Number(value))) {
|
|
1064
|
+
return t('validator.number');
|
|
1065
|
+
}
|
|
1066
|
+
}, b) });
|
|
1067
|
+
}
|
|
1068
|
+
else if (b.name === 'EmailBlock') {
|
|
1069
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1070
|
+
if (value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
1071
|
+
return t('validator.email');
|
|
1072
|
+
}
|
|
1073
|
+
if (!value)
|
|
1179
1074
|
return;
|
|
1075
|
+
validatingEmailRef.current = true;
|
|
1076
|
+
setTimeout(() => {
|
|
1077
|
+
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
1078
|
+
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1079
|
+
email: value,
|
|
1080
|
+
})
|
|
1081
|
+
.then((tKey) => {
|
|
1082
|
+
if (tKey) {
|
|
1083
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1084
|
+
}
|
|
1085
|
+
else {
|
|
1086
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1087
|
+
}
|
|
1088
|
+
validatingEmailRef.current = false;
|
|
1089
|
+
})
|
|
1090
|
+
.catch((e) => {
|
|
1091
|
+
console.error(e);
|
|
1092
|
+
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
1093
|
+
validatingEmailRef.current = false;
|
|
1094
|
+
});
|
|
1095
|
+
}, 200);
|
|
1096
|
+
}, b) });
|
|
1097
|
+
}
|
|
1098
|
+
else if (b.name === 'PhoneBlock' ||
|
|
1099
|
+
b.name === 'PhoneOtpBlock' ||
|
|
1100
|
+
b.name === 'ZaloOtpBlock' ||
|
|
1101
|
+
b.name === 'WhatsappOtpBlock') {
|
|
1102
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1103
|
+
if (value &&
|
|
1104
|
+
window.intlTelInputUtils &&
|
|
1105
|
+
!window.intlTelInputUtils.isValidNumber(String(value), LEAD_LOCALE.countryCode)) {
|
|
1106
|
+
return t('validator.phone');
|
|
1180
1107
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
.
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1108
|
+
if (!value)
|
|
1109
|
+
return;
|
|
1110
|
+
validatingPhoneRef.current = true;
|
|
1111
|
+
setTimeout(() => {
|
|
1112
|
+
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
1113
|
+
if (b.data.singleSubmission) {
|
|
1114
|
+
checkUsedPhoneOnlyWithCache(campaignId, value)
|
|
1115
|
+
.then((tKey) => {
|
|
1116
|
+
if (tKey) {
|
|
1117
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1118
|
+
}
|
|
1119
|
+
else {
|
|
1120
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1121
|
+
}
|
|
1122
|
+
validatingPhoneRef.current = false;
|
|
1123
|
+
})
|
|
1124
|
+
.catch((err) => {
|
|
1125
|
+
console.error(err);
|
|
1126
|
+
formRef.current.setFieldError(b.data.value, err.message || 'Something went wrong');
|
|
1127
|
+
validatingPhoneRef.current = false;
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
else {
|
|
1131
|
+
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1132
|
+
phone: value,
|
|
1133
|
+
})
|
|
1134
|
+
.then((tKey) => {
|
|
1135
|
+
if (tKey) {
|
|
1136
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1137
|
+
}
|
|
1138
|
+
else {
|
|
1139
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1140
|
+
}
|
|
1141
|
+
validatingPhoneRef.current = false;
|
|
1142
|
+
})
|
|
1143
|
+
.catch((e) => {
|
|
1144
|
+
console.error(e);
|
|
1145
|
+
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
1146
|
+
validatingPhoneRef.current = false;
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
}, 200);
|
|
1150
|
+
}, b) });
|
|
1151
|
+
}
|
|
1152
|
+
else if (b.name === 'DateBlock') {
|
|
1153
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1154
|
+
if (value && isNaN(Date.parse(value))) {
|
|
1155
|
+
return t('validator.date');
|
|
1156
|
+
}
|
|
1157
|
+
}, b) });
|
|
1158
|
+
}
|
|
1159
|
+
else if (b.name === 'TncBlock') {
|
|
1160
|
+
return Object.assign(Object.assign({}, r), { [`TNC-` + b.id]: withSharedCheck('TNC-' + b.id, (value) => {
|
|
1161
|
+
if (isRequired && !value) {
|
|
1162
|
+
return t('validator.required');
|
|
1163
|
+
}
|
|
1164
|
+
}, b) });
|
|
1165
|
+
}
|
|
1166
|
+
else {
|
|
1167
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, undefined, b) });
|
|
1168
|
+
}
|
|
1169
|
+
}, {});
|
|
1170
|
+
}, [listBlockAdded.map((b) => b.name).join(',')]);
|
|
1171
|
+
const form = useLeadForm$1({
|
|
1172
|
+
validateInputOnChange: true,
|
|
1173
|
+
clearInputErrorOnChange: true,
|
|
1174
|
+
validate: validateObj,
|
|
1175
|
+
initialValues,
|
|
1176
|
+
});
|
|
1177
|
+
const formRef = useRef(form);
|
|
1178
|
+
formRef.current = form;
|
|
1179
|
+
return { form, validateObj };
|
|
1180
|
+
};
|
|
1181
|
+
|
|
1182
|
+
const Component = ({ campaign, onClose: onCloseProp, onOtherSubmit, onSubmit, showThankyou, setShowThankyou, locale, children, showEmpty, setShowEmpty, userInfo, }) => {
|
|
1183
|
+
var _a, _b;
|
|
1184
|
+
const extraFields = campaign.extra_fields;
|
|
1185
|
+
const campaignId = campaign.id;
|
|
1186
|
+
const campaign_subot_id = campaign.bot_id || [];
|
|
1187
|
+
const listBlockAdded = JSON.parse(extraFields.listBlockAdded);
|
|
1188
|
+
const actionBlocks = JSON.parse(extraFields.actionBlocks);
|
|
1189
|
+
const textBlocks = JSON.parse(extraFields.textBlocks);
|
|
1190
|
+
const heading = ((_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) || '';
|
|
1191
|
+
const description = textBlocks.subtitleBlock.data.value;
|
|
1192
|
+
const validatingPhoneRef = useRef(false);
|
|
1193
|
+
const validatingEmailRef = useRef(false);
|
|
1194
|
+
const leadFormConfig = useLeadFormConfig$1({
|
|
1195
|
+
listBlockAdded,
|
|
1196
|
+
validatingPhoneRef,
|
|
1197
|
+
validatingEmailRef,
|
|
1198
|
+
campaignId,
|
|
1199
|
+
campaign_subot_id,
|
|
1200
|
+
userInfo,
|
|
1201
|
+
});
|
|
1202
|
+
const [showOtpPhone, setShowOtpPhone] = useState(null);
|
|
1203
|
+
const [formRef, setFormRef] = useState(null);
|
|
1204
|
+
const onClose = () => {
|
|
1205
|
+
if (showOtpPhone) {
|
|
1206
|
+
setShowOtpPhone(null);
|
|
1207
|
+
}
|
|
1208
|
+
else {
|
|
1209
|
+
onCloseProp === null || onCloseProp === void 0 ? void 0 : onCloseProp();
|
|
1210
|
+
}
|
|
1191
1211
|
};
|
|
1192
1212
|
useEffect(() => {
|
|
1193
|
-
|
|
1194
|
-
}, [
|
|
1195
|
-
return (React__default.createElement(
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1213
|
+
clearCacheUsedEmailOrPhone();
|
|
1214
|
+
}, []);
|
|
1215
|
+
return campaign ? (React__default.createElement(LeadGenComponentContext.Provider, { value: {
|
|
1216
|
+
campaignId,
|
|
1217
|
+
campaign_subot_id,
|
|
1218
|
+
heading,
|
|
1219
|
+
description,
|
|
1220
|
+
listBlockAdded,
|
|
1221
|
+
textBlocks,
|
|
1222
|
+
actionBlocks,
|
|
1223
|
+
leadFormConfig,
|
|
1224
|
+
validatingEmailRef,
|
|
1225
|
+
validatingPhoneRef,
|
|
1226
|
+
formRef: { current: formRef },
|
|
1227
|
+
setFormRef,
|
|
1228
|
+
locale,
|
|
1229
|
+
onClose,
|
|
1230
|
+
onOtherSubmit,
|
|
1231
|
+
showOtpPhone,
|
|
1232
|
+
setShowOtpPhone,
|
|
1233
|
+
onSubmit,
|
|
1234
|
+
showThankyou,
|
|
1235
|
+
setShowThankyou,
|
|
1236
|
+
showEmpty,
|
|
1237
|
+
setShowEmpty,
|
|
1238
|
+
} }, children)) : null;
|
|
1210
1239
|
};
|
|
1211
1240
|
|
|
1212
|
-
|
|
1241
|
+
const Description = (_a) => {
|
|
1242
|
+
var rest = __rest(_a, []);
|
|
1243
|
+
const { description } = useContext(LeadGenComponentContext);
|
|
1244
|
+
return description ? (React__default.createElement(Text, Object.assign({ size: "p3" }, rest), description)) : null;
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
const LeadGenContext$1 = createContext({});
|
|
1248
|
+
|
|
1249
|
+
var useStyles$3 = createStyles(() => {
|
|
1213
1250
|
return {
|
|
1214
|
-
root: {},
|
|
1215
|
-
header: {},
|
|
1216
|
-
heading: {},
|
|
1217
|
-
description: {},
|
|
1218
1251
|
control: {},
|
|
1219
|
-
actions: {},
|
|
1220
|
-
submitBtn: {},
|
|
1221
|
-
resendOtp: {},
|
|
1222
1252
|
};
|
|
1223
1253
|
});
|
|
1224
1254
|
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
const
|
|
1229
|
-
const [
|
|
1230
|
-
const [
|
|
1231
|
-
const
|
|
1232
|
-
const
|
|
1233
|
-
const [
|
|
1234
|
-
const
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
});
|
|
1242
|
-
useEffect(() => {
|
|
1243
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
1244
|
-
var _a;
|
|
1245
|
-
if (!formatPhoneNumberIntlRef.current) {
|
|
1246
|
-
const res = yield import('react-phone-number-input');
|
|
1247
|
-
formatPhoneNumberIntlRef.current = res.formatPhoneNumberIntl;
|
|
1248
|
-
}
|
|
1249
|
-
setDisplayPhone(((_a = formatPhoneNumberIntlRef.current) === null || _a === void 0 ? void 0 : _a.call(formatPhoneNumberIntlRef, phone)) || phone);
|
|
1250
|
-
}))();
|
|
1251
|
-
}, [phone]);
|
|
1252
|
-
const sendOtp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1253
|
-
var _a;
|
|
1254
|
-
if (!phone) {
|
|
1255
|
-
return;
|
|
1256
|
-
}
|
|
1257
|
-
const res = yield Service.sendSMSOtpLead({
|
|
1258
|
-
phone,
|
|
1259
|
-
type: otpType,
|
|
1260
|
-
});
|
|
1261
|
-
const respMessage = (_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0];
|
|
1262
|
-
if (respMessage === 'Send sms successfully' ||
|
|
1263
|
-
respMessage === 'Send WhatsApp successfully' ||
|
|
1264
|
-
respMessage === 'Send Zalo successfully') {
|
|
1265
|
-
setResendTimer(60);
|
|
1266
|
-
setTimeout(() => {
|
|
1267
|
-
if (inputRef.current) {
|
|
1268
|
-
inputRef.current.focus();
|
|
1269
|
-
inputRef.current.scrollIntoView({ block: 'center' });
|
|
1270
|
-
}
|
|
1271
|
-
}, 100);
|
|
1272
|
-
}
|
|
1273
|
-
else if (respMessage === 'This phone number was verified') {
|
|
1274
|
-
onSuccess();
|
|
1275
|
-
}
|
|
1276
|
-
else {
|
|
1277
|
-
setErrorMsg(respMessage || 'Something went wrong!');
|
|
1278
|
-
// const defaultError = f({ id: 'notification.comment.somethingWrong' })
|
|
1279
|
-
// setStatusVerifyOTP('idle')
|
|
1280
|
-
// pushNotifications({
|
|
1281
|
-
// title: respMessage || defaultError,
|
|
1282
|
-
// message: '',
|
|
1283
|
-
// type: 'danger',
|
|
1284
|
-
// })
|
|
1285
|
-
}
|
|
1286
|
-
});
|
|
1287
|
-
const submitOtp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1288
|
-
if (!phone || !otp) {
|
|
1289
|
-
return;
|
|
1290
|
-
}
|
|
1291
|
-
setIsSubmitLoading(true);
|
|
1292
|
-
const res = yield Service.verifyOtpLead({
|
|
1293
|
-
phone,
|
|
1294
|
-
otp,
|
|
1295
|
-
type: otpType,
|
|
1255
|
+
const libraries$1 = ['places'];
|
|
1256
|
+
const LocationBlock = ({ name, placeholder, locale, required = true, }) => {
|
|
1257
|
+
var _a;
|
|
1258
|
+
const form = useLeadFormContext$1();
|
|
1259
|
+
const [searchValue, setSearchValue] = useState('');
|
|
1260
|
+
const [address, setAddress] = useState('');
|
|
1261
|
+
const { predictions } = usePlacesAutocomplete(searchValue, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
|
|
1262
|
+
const [LoadScript, setLoadScript] = useState(null);
|
|
1263
|
+
const [ready, setReady] = useState(false);
|
|
1264
|
+
const randRef = useRef(Math.random().toString(36).substring(7));
|
|
1265
|
+
const options = useMemo(() => {
|
|
1266
|
+
const _opts = predictions.map((p) => {
|
|
1267
|
+
return {
|
|
1268
|
+
value: p.description,
|
|
1269
|
+
label: p.description,
|
|
1270
|
+
};
|
|
1296
1271
|
});
|
|
1297
|
-
const
|
|
1298
|
-
if (
|
|
1299
|
-
|
|
1300
|
-
respMessage === 'Verify Zalo OTP sucess') {
|
|
1301
|
-
onSuccess();
|
|
1272
|
+
const isExist = _opts.find((o) => o.value === address);
|
|
1273
|
+
if (!address || isExist) {
|
|
1274
|
+
return _opts;
|
|
1302
1275
|
}
|
|
1303
|
-
|
|
1304
|
-
|
|
1276
|
+
return [{ value: address, label: address }].concat(_opts);
|
|
1277
|
+
}, [predictions, address]);
|
|
1278
|
+
useEffect(() => {
|
|
1279
|
+
var _a, _b, _c;
|
|
1280
|
+
// only load extra google script when not yet loaded
|
|
1281
|
+
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)) {
|
|
1282
|
+
import('@react-google-maps/api').then((m) => {
|
|
1283
|
+
setLoadScript(() => m.LoadScript);
|
|
1284
|
+
setTimeout(() => {
|
|
1285
|
+
setReady(true);
|
|
1286
|
+
}, 200);
|
|
1287
|
+
});
|
|
1305
1288
|
}
|
|
1306
1289
|
else {
|
|
1307
|
-
|
|
1308
|
-
// setIsShowError(true)
|
|
1309
|
-
// setStatusVerifyOTP('sent')
|
|
1310
|
-
// pushNotifications({
|
|
1311
|
-
// title: res?._messages[0] || defaultError,
|
|
1312
|
-
// message: '',
|
|
1313
|
-
// type: 'danger',
|
|
1314
|
-
// })
|
|
1315
|
-
}
|
|
1316
|
-
setIsSubmitLoading(false);
|
|
1317
|
-
});
|
|
1318
|
-
useEffect(() => {
|
|
1319
|
-
setTimeout(() => {
|
|
1320
|
-
if (resendTimer > 0) {
|
|
1321
|
-
setResendTimer((r) => r - 1);
|
|
1322
|
-
}
|
|
1323
|
-
}, 1000);
|
|
1324
|
-
}, [resendTimer]);
|
|
1325
|
-
useEffect(() => {
|
|
1326
|
-
if (autoSendWhenOpen && !resendTimer) {
|
|
1327
|
-
sendOtp();
|
|
1290
|
+
setReady(true);
|
|
1328
1291
|
}
|
|
1329
1292
|
}, []);
|
|
1293
|
+
if (!ready)
|
|
1294
|
+
return (React__default.createElement("div", { style: {
|
|
1295
|
+
height: 73,
|
|
1296
|
+
} }));
|
|
1330
1297
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1331
|
-
React__default.createElement(
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
React__default.createElement("
|
|
1336
|
-
React__default.createElement(
|
|
1337
|
-
React__default.createElement(Text, { size: "p3", className: classes.description }, t('lead.otp.desc', { phone: displayPhone }))),
|
|
1338
|
-
React__default.createElement(Input, { ref: inputRef, name: '_' + name + '-otp', spellCheck: false, type: "number", placeholder: t('lead.otp.phonePlaceholder'), className: classes.control, label: t('lead.otp.phoneLabel'), "data-control": "otp", withAsterisk: true, pattern: "[0-9]*", value: otp, maxLength: 6, onChange: (v) => {
|
|
1339
|
-
setIsDirty(true);
|
|
1340
|
-
setOtp(v);
|
|
1341
|
-
if (isDirty && !v)
|
|
1342
|
-
setErrorMsg('OTP is required');
|
|
1343
|
-
else
|
|
1344
|
-
setErrorMsg(undefined);
|
|
1345
|
-
}, error: isDirty ? errorMsg : undefined }),
|
|
1346
|
-
React__default.createElement("div", { className: classes.actions },
|
|
1347
|
-
React__default.createElement(Button, { type: "submit", size: "md", color: "primary", className: classes.submitBtn,
|
|
1348
|
-
// onClick={() => submitOtp()}
|
|
1349
|
-
disabled: !otp, loading: isSubmitLoading }, t('lead.otp.verify')),
|
|
1350
|
-
React__default.createElement(Button, { type: "button", size: "md", color: "transparent", className: classes.resendOtp, onClick: () => {
|
|
1351
|
-
sendOtp();
|
|
1352
|
-
}, disabled: !!resendTimer }, t('lead.otp.resend', {
|
|
1353
|
-
timer: resendTimer ? ` (${resendTimer}s)` : '',
|
|
1354
|
-
}))))));
|
|
1355
|
-
};
|
|
1356
|
-
const OtpBlock$1 = (_a) => {
|
|
1357
|
-
var rest = __rest(_a, []);
|
|
1358
|
-
const { showOtpPhone, setShowOtpPhone, onSubmit,
|
|
1359
|
-
// formRef,
|
|
1360
|
-
// leadFormConfig: { form },
|
|
1361
|
-
} = useContext(LeadGenComponentContext);
|
|
1362
|
-
return showOtpPhone ? (React__default.createElement(OtpBlockComponent, Object.assign({ otpData: showOtpPhone, autoSendWhenOpen: false, onSuccess: () => {
|
|
1363
|
-
setShowOtpPhone(null);
|
|
1364
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
1365
|
-
} }, rest))) : null;
|
|
1366
|
-
};
|
|
1367
|
-
|
|
1368
|
-
const Thankyou = ({ children, }) => {
|
|
1369
|
-
const { showThankyou, setShowThankyou } = useContext(LeadGenComponentContext);
|
|
1370
|
-
return showThankyou
|
|
1371
|
-
? children(showThankyou, () => setShowThankyou(null))
|
|
1372
|
-
: null;
|
|
1298
|
+
LoadScript && (React__default.createElement(LoadScript, { googleMapsApiKey: GOOGLE_API_KEY, libraries: libraries$1, loadingElement: React__default.createElement(React__default.Fragment, null) })),
|
|
1299
|
+
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": name, "data-control": 'text' }),
|
|
1300
|
+
React__default.createElement(Select, Object.assign({ className: "lead-modal__form-control", label: placeholder, placeholder: placeholder, withAsterisk: required, name: name, data: options, searchValue: searchValue, onSearchChange: (query) => {
|
|
1301
|
+
setSearchValue(query);
|
|
1302
|
+
}, filter: () => true, clearable: true, searchable: true, onChange: (val) => setAddress(val || ''), icon: React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" },
|
|
1303
|
+
React__default.createElement("path", { d: "M10 9.792q.605 0 1.032-.427.426-.428.426-1.032 0-.603-.426-1.031A1.4 1.4 0 0 0 10 6.875q-.604 0-1.032.427a1.4 1.4 0 0 0-.426 1.031q0 .604.426 1.032.428.426 1.032.427m0 8.083q-.145 0-.292-.042a.7.7 0 0 1-.27-.145Q6.478 15 5.01 12.708 3.54 10.418 3.54 8.5q0-3.021 1.949-4.823T10 1.875t4.51 1.802q1.95 1.802 1.949 4.823 0 1.917-1.468 4.208-1.47 2.292-4.427 4.98a.7.7 0 0 1-.271.145 1 1 0 0 1-.292.042", fill: "#8C8C8C" })), autoComplete: 'no-auto-complete-' + randRef.current, rightSection: React__default.createElement(React__default.Fragment, null) }, form.getInputProps(name)))));
|
|
1373
1304
|
};
|
|
1374
1305
|
|
|
1375
|
-
|
|
1376
|
-
"validator.required": "This field is required.",
|
|
1377
|
-
"validator.remote": "Please fix this field.",
|
|
1378
|
-
"validator.email": "Please enter a valid email address.",
|
|
1379
|
-
"validator.phone": "Please input correct phone number.",
|
|
1380
|
-
"validator.url": "Please enter a valid URL.",
|
|
1381
|
-
"validator.date": "Please enter a valid date.",
|
|
1382
|
-
"validator.dateISO": "Please enter a valid date (ISO).",
|
|
1383
|
-
"validator.number": "Please enter a valid number.",
|
|
1384
|
-
"validator.digits": "Please enter only digits.",
|
|
1385
|
-
"validator.creditcard": "Please enter a valid credit card number.",
|
|
1386
|
-
"validator.equalTo": "Please enter the same value again.",
|
|
1387
|
-
"validator.accept": "Please enter a value with a valid extension.",
|
|
1388
|
-
"validator.maxlength": "jQuery.validator.format('Please enter no more than {0} characters.",
|
|
1389
|
-
"validator.minlength": "jQuery.validator.format('Please enter at least {0} characters.",
|
|
1390
|
-
"validator.rangelength": "jQuery.validator.format('Please enter a value between {0} and {1} characters long.",
|
|
1391
|
-
"validator.range": "jQuery.validator.format('Please enter a value between {0} and {1}.",
|
|
1392
|
-
"validator.max": "jQuery.validator.format('Please enter a value less than or equal to {0}.",
|
|
1393
|
-
"validator.min": "jQuery.validator.format('Please enter a value greater than or equal to {0}.",
|
|
1394
|
-
"validator.emailUsed": "Email already in use for this campaign.",
|
|
1395
|
-
"validator.phoneUsed": "Your phone number already in use for this campaign.",
|
|
1396
|
-
"validator.dateInvalid": "This date is not valid, please update.",
|
|
1397
|
-
"lead.otp.title": "Enter OTP",
|
|
1398
|
-
"lead.otp.desc": "We have sent an OTP to your mobile number {phone}",
|
|
1399
|
-
"lead.otp.verify": "Verify",
|
|
1400
|
-
"lead.otp.resend": "Resend OTP{timer}",
|
|
1401
|
-
"lead.otp.phoneLabel": "Phone OTP",
|
|
1402
|
-
"lead.otp.phonePlaceholder": "Enter OTP",
|
|
1403
|
-
"lead.empty.title": "Oops, seem your information is empty, do you want to submit the information again?",
|
|
1404
|
-
"lead.empty.cancel": "Cancel",
|
|
1405
|
-
"lead.empty.submitAgain": "Submit again",
|
|
1406
|
-
"inlineFreebie.freeSample.title": "Free Sample",
|
|
1407
|
-
"inlineFreebie.luckyDrawGift.title": "Lucky-draw Gift",
|
|
1408
|
-
"inlineFreebie.value": "Value",
|
|
1409
|
-
"common.day": "Day",
|
|
1410
|
-
"common.month": "Month",
|
|
1411
|
-
"common.year": "Year"
|
|
1412
|
-
};
|
|
1306
|
+
const SubtitleBlock$1 = ({ children, align, }) => (React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
1413
1307
|
|
|
1414
|
-
|
|
1415
|
-
"validator.required": "इस क्षेत्र की आवश्यकता है।",
|
|
1416
|
-
"validator.email": "कृपया एक मान्य ईमेल पता दर्ज करें",
|
|
1417
|
-
"validator.number": "कृपया एक वैध संख्या दर्ज करें",
|
|
1418
|
-
"validator.digits": "कृपया केवल अंक दर्ज करें",
|
|
1419
|
-
"validator.maxlength": "कृपया {0} अक्षर से अधिक दर्ज न करें",
|
|
1420
|
-
"validator.minlength": "कृपया कम से कम {0} अक्षर दर्ज करें",
|
|
1421
|
-
"validator.phone": "कृपया एक वैध संख्या दर्ज करें",
|
|
1422
|
-
"validator.dateInvalid": "यह तिथि मान्य नहीं है, कृपया अपडेट करें।",
|
|
1423
|
-
"validator.emailUsed": "Email already in use for this campaign.",
|
|
1424
|
-
"validator.phoneUsed": "Your phone number already in use for this campaign.",
|
|
1425
|
-
"lead.otp.title": "Enter OTP",
|
|
1426
|
-
"lead.otp.desc": "We have sent an OTP to your mobile number {phone}",
|
|
1427
|
-
"lead.otp.verify": "Verify",
|
|
1428
|
-
"lead.otp.resend": "Resend OTP{timer}",
|
|
1429
|
-
"lead.empty.title": "ऊप्स! लगता है आपकी जानकारी खाली है। क्या आप जानकारी फिर से सबमिट करना चाहते हैं?",
|
|
1430
|
-
"lead.empty.cancel": "रद्द करें",
|
|
1431
|
-
"lead.empty.submitAgain": "फिर से सबमिट करें",
|
|
1432
|
-
"inlineFreebie.freeSample.title": "मुफ्त नमूना",
|
|
1433
|
-
"inlineFreebie.luckyDrawGift.title": "लकी-ड्रा गिफ्ट",
|
|
1434
|
-
"inlineFreebie.value": "मूल्य",
|
|
1435
|
-
"common.day": "साल",
|
|
1436
|
-
"common.month": "महीना",
|
|
1437
|
-
"common.year": ""
|
|
1438
|
-
};
|
|
1308
|
+
const TitleBlock$1 = ({ children, align, }) => (React__default.createElement("h2", { className: `lead-modal__title ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
1439
1309
|
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1310
|
+
const Fields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, styles, classNames, popoverProps, }) => {
|
|
1311
|
+
const { primaryColor } = useContext(LeadGenContext$1);
|
|
1312
|
+
const { classes, cx } = useStyles$3(undefined, {
|
|
1313
|
+
name: 'LeadGen__Field',
|
|
1314
|
+
styles,
|
|
1315
|
+
classNames,
|
|
1316
|
+
});
|
|
1317
|
+
const form = useLeadFormContext$1();
|
|
1318
|
+
return (React__default.createElement(React__default.Fragment, null, listBlockAdded.map((b, index) => {
|
|
1319
|
+
var _a;
|
|
1320
|
+
const { name = '', data = {} } = b || {};
|
|
1321
|
+
const { placeholder, value, align, listQuestion, isSendMailChimp = false, newtab, url, } = data;
|
|
1322
|
+
const required = (_a = data.required) !== null && _a !== void 0 ? _a : true;
|
|
1323
|
+
switch (name) {
|
|
1324
|
+
case 'TitleBlock':
|
|
1325
|
+
return (React__default.createElement(TitleBlock$1, { key: index, align: align }, value));
|
|
1326
|
+
case 'SubtitleBlock':
|
|
1327
|
+
return (React__default.createElement(SubtitleBlock$1, { key: index, align: align }, value));
|
|
1328
|
+
case 'TextBlock':
|
|
1329
|
+
return (React__default.createElement(Input, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "text", placeholder: placeholder, className: cx('leadgen-control', classes.control),
|
|
1330
|
+
// onChangeRaw={(e) => inputOnChange('text', e)}
|
|
1331
|
+
label: placeholder, "data-control": "text", "data-lead-control": name, "data-is-required": required, name: value }, form.getInputProps(value))));
|
|
1332
|
+
case 'NumberBlock':
|
|
1333
|
+
return (React__default.createElement(NumberInput, Object.assign({ key: index, withAsterisk: required, spellCheck: false, type: "number", placeholder: placeholder, className: cx('leadgen-control', classes.control),
|
|
1334
|
+
// onChange={(e) => inputOnChange('number', e)}
|
|
1335
|
+
label: placeholder, "data-control": "number", "data-lead-control": name, "data-is-required": required, name: value }, form.getInputProps(value))));
|
|
1336
|
+
case 'EmailBlock':
|
|
1337
|
+
return (React__default.createElement(Input, Object.assign({ key: index, withAsterisk: required, spellCheck: false,
|
|
1338
|
+
// type="email"
|
|
1339
|
+
placeholder: placeholder, className: cx('leadgen-control', classes.control), label: placeholder, "data-control": "email", "data-lead-control": name, "data-is-required": required, name: value }, form.getInputProps(value))));
|
|
1340
|
+
case 'PhoneOtpBlock':
|
|
1341
|
+
case 'WhatsappOtpBlock':
|
|
1342
|
+
case 'ZaloOtpBlock':
|
|
1343
|
+
case 'PhoneBlock': {
|
|
1344
|
+
const id = popupId + '-' + value + '-' + index;
|
|
1345
|
+
return (React__default.createElement(Input.Wrapper, Object.assign({ size: "md", withAsterisk: required, key: index, label: placeholder,
|
|
1346
|
+
// error={errorField.phone}
|
|
1347
|
+
className: cx('leadgen-control', classes.control), labelProps: {
|
|
1348
|
+
htmlFor: id,
|
|
1349
|
+
} }, form.getInputProps(value)),
|
|
1350
|
+
React__default.createElement(Phone, { name: value, spellCheck: false, type: "tel", placeholder: placeholder, value: form.getInputProps(value).value, onChange: (v) => {
|
|
1351
|
+
form.setFieldValue(value, v);
|
|
1352
|
+
},
|
|
1353
|
+
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
1354
|
+
id: id, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel", "data-lead-control": name, "data-is-required": required })));
|
|
1355
|
+
}
|
|
1356
|
+
case 'LocationBlock': {
|
|
1357
|
+
return (React__default.createElement(LocationBlock, { key: index, name: value, placeholder: placeholder, locale: locale, required: required }));
|
|
1358
|
+
}
|
|
1359
|
+
case 'DateBlock':
|
|
1360
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1361
|
+
React__default.createElement(DatePicker, Object.assign({ withAsterisk: required, key: index, type: "default", name: value, placeholder: placeholder, className: cx('leadgen-control', classes.control), label: placeholder, "data-control": "date", "data-lead-control": name, "data-is-required": required, popoverProps: popoverProps }, form.getInputProps(value))),
|
|
1362
|
+
React__default.createElement("input", { type: "hidden", name: value, "data-control": "date" })));
|
|
1363
|
+
case 'LinkButtonBlock':
|
|
1364
|
+
return (React__default.createElement("div", { key: index },
|
|
1365
|
+
React__default.createElement("a", { target: newtab ? 'blank' : 'parrent', href: url, style: { textDecoration: 'none' } },
|
|
1366
|
+
React__default.createElement(Button, { type: "button", size: "md", color: primaryColor, className: `lead-modal__btn ${LEAD_CLASS}`, onClick: () => {
|
|
1367
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
1368
|
+
onOtherSubmit === null || onOtherSubmit === void 0 ? void 0 : onOtherSubmit();
|
|
1369
|
+
} }, value))));
|
|
1370
|
+
case 'CheckboxBlock':
|
|
1371
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1372
|
+
isSendMailChimp && (React__default.createElement("div", { style: {
|
|
1373
|
+
display: 'none',
|
|
1374
|
+
}, "data-name": value + '-mailchimp' })),
|
|
1375
|
+
React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required, className: cx('leadgen-control', classes.control), key: index, label: placeholder, size: "md", sx: {
|
|
1376
|
+
display: 'flex',
|
|
1377
|
+
flexDirection: 'column',
|
|
1378
|
+
gap: 8,
|
|
1379
|
+
} }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Checkbox, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }))))));
|
|
1380
|
+
case 'RadioBlock':
|
|
1381
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1382
|
+
isSendMailChimp && (React__default.createElement(Input, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
|
|
1383
|
+
React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required, className: cx('leadgen-control', classes.control), key: index, label: placeholder, size: "md" }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio", "data-lead-control": name, "data-is-required": required }))))));
|
|
1384
|
+
case 'DropdownBlock':
|
|
1385
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1386
|
+
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown', "data-lead-control": name, "data-is-required": required }),
|
|
1387
|
+
React__default.createElement(Select, Object.assign({ key: index, className: cx('leadgen-control', classes.control), label: placeholder, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
|
|
1388
|
+
value: l.value,
|
|
1389
|
+
label: l.placeholder,
|
|
1390
|
+
})) }, form.getInputProps(value)))));
|
|
1391
|
+
case 'TncBlock':
|
|
1392
|
+
const tncInputProps = form.getInputProps('TNC-' + b.id);
|
|
1393
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1394
|
+
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + b.id, key: b.id, label: React__default.createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: data.valueHTML } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps, { error: tncInputProps.error ? tncInputProps.error : undefined }))));
|
|
1395
|
+
}
|
|
1396
|
+
return null;
|
|
1397
|
+
})));
|
|
1522
1398
|
};
|
|
1523
1399
|
|
|
1524
|
-
var
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
"lead.empty.title": "အုပ်စ်! သင့်အချက်အလက်သည် ဗလာဖြစ်နေသလိုဖြစ်သည်။ ထပ်မံတင်သွင်းလိုပါသလား?",
|
|
1542
|
-
"lead.empty.cancel": "မလုပ်ဆောင်ပါ",
|
|
1543
|
-
"lead.empty.submitAgain": "ထပ်မံတင်သွင်းပါ",
|
|
1544
|
-
"inlineFreebie.freeSample.title": "အခမဲ့အစားအစာ",
|
|
1545
|
-
"inlineFreebie.luckyDrawGift.title": "အခမဲ့အစားအစာ",
|
|
1546
|
-
"inlineFreebie.value": "တန်ဖိုး",
|
|
1547
|
-
"common.day": "ရက်",
|
|
1548
|
-
"common.month": "လ",
|
|
1549
|
-
"common.year": "နှစ်"
|
|
1550
|
-
};
|
|
1400
|
+
var useStyles$2 = createStyles((theme) => {
|
|
1401
|
+
return {
|
|
1402
|
+
root: {},
|
|
1403
|
+
header: {},
|
|
1404
|
+
heading: {},
|
|
1405
|
+
description: {},
|
|
1406
|
+
term: {
|
|
1407
|
+
a: {
|
|
1408
|
+
color: theme.fn.primaryColor(),
|
|
1409
|
+
},
|
|
1410
|
+
},
|
|
1411
|
+
controlList: {},
|
|
1412
|
+
control: {},
|
|
1413
|
+
submitBtn: {},
|
|
1414
|
+
submitBtnWrapper: {},
|
|
1415
|
+
};
|
|
1416
|
+
});
|
|
1551
1417
|
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
"validator.digits": "กรุณาส่เฉพาะตัวเลข",
|
|
1557
|
-
"validator.maxlength": "กรุณาใส่ตัวเลขมากกว่า {0} หลัก",
|
|
1558
|
-
"validator.minlength": "กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก",
|
|
1559
|
-
"validator.phone": "กรุณาใส่ตัวเลขที่ถูกต้อง",
|
|
1560
|
-
"validator.emailUsed": "อีเมลนี้ถูกใช้สำหรับแคมเปญนี้แล้ว",
|
|
1561
|
-
"validator.phoneUsed": "หมายเลขโทรศัพท์ของคุณถูกใช้สำหรับแคมเปญนี้แล้ว",
|
|
1562
|
-
"validator.dateInvalid": "วันที่นี้ไม่ถูกต้อง โปรดอัปเดต",
|
|
1563
|
-
"lead.otp.title": "ป้อน OTP",
|
|
1564
|
-
"lead.otp.desc": "เราได้ส่ง OTP ไปยังหมายเลขโทรศัพท์มือถือของคุณ {phone}",
|
|
1565
|
-
"lead.otp.verify": "ยืนยัน",
|
|
1566
|
-
"lead.otp.resend": "ส่ง OTP อีกครั้ง {timer}",
|
|
1567
|
-
"lead.otp.phoneLabel": "OTP โทรศัพท์",
|
|
1568
|
-
"lead.otp.phonePlaceholder": "ป้อน OTP",
|
|
1569
|
-
"lead.empty.title": "อุ๊ปส์! ดูเหมือนว่าข้อมูลของคุณว่างเปล่า คุณต้องการส่งข้อมูลอีกครั้งหรือไม่?",
|
|
1570
|
-
"lead.empty.cancel": "ยกเลิก",
|
|
1571
|
-
"lead.empty.submitAgain": "ส่งอีกครั้ง",
|
|
1572
|
-
"inlineFreebie.freeSample.title": "ตัวอย่างฟรี",
|
|
1573
|
-
"inlineFreebie.luckyDrawGift.title": "ของรางวัลที่ถูกรางวัล",
|
|
1574
|
-
"inlineFreebie.value": "ค่า",
|
|
1575
|
-
"common.day": "วัน",
|
|
1576
|
-
"common.month": "เดือน",
|
|
1577
|
-
"common.year": "ปี"
|
|
1418
|
+
const Heading = (_a) => {
|
|
1419
|
+
var rest = __rest(_a, []);
|
|
1420
|
+
const { heading } = useContext(LeadGenComponentContext);
|
|
1421
|
+
return heading ? (React__default.createElement(Text, Object.assign({ size: "h3" }, rest), heading)) : null;
|
|
1578
1422
|
};
|
|
1579
1423
|
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1424
|
+
const FormComponent = ({ styles, className, classNames, fillInfo, popoverProps, submitProps, }) => {
|
|
1425
|
+
var _a;
|
|
1426
|
+
const { primaryColor } = useContext(LeadGenContext$1);
|
|
1427
|
+
const { listBlockAdded, leadFormConfig: { form, validateObj }, validatingEmailRef, validatingPhoneRef,
|
|
1428
|
+
// formRef,
|
|
1429
|
+
setFormRef, onClose, onOtherSubmit, actionBlocks, locale, setShowOtpPhone, onSubmit, } = useContext(LeadGenComponentContext);
|
|
1430
|
+
const { classes, cx } = useStyles$2(undefined, {
|
|
1431
|
+
name: 'LeadGen__FormComponent',
|
|
1432
|
+
styles,
|
|
1433
|
+
classNames,
|
|
1434
|
+
});
|
|
1435
|
+
const [isSubmitLoading, setIsSubmitLoading] = useState(false);
|
|
1436
|
+
const popUpSubmitText = actionBlocks.submitBlock.data.value;
|
|
1437
|
+
const middlewareOnSubmit = (e) => {
|
|
1438
|
+
e.preventDefault();
|
|
1439
|
+
// mark all as touched to allow validation
|
|
1440
|
+
form.setTouched(Object.keys(validateObj).reduce((acc, cur) => {
|
|
1441
|
+
acc[cur] = true;
|
|
1442
|
+
return acc;
|
|
1443
|
+
}, {}));
|
|
1444
|
+
if (validatingEmailRef.current || validatingPhoneRef.current) {
|
|
1445
|
+
return;
|
|
1446
|
+
}
|
|
1447
|
+
setTimeout(() => {
|
|
1448
|
+
form.onSubmit((v) => {
|
|
1449
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1450
|
+
if (Object.keys(form.errors).length)
|
|
1451
|
+
return;
|
|
1452
|
+
let newShowOtpPhone = null;
|
|
1453
|
+
if (listBlockAdded.findIndex((x) => x.name === 'PhoneOtpBlock') > -1) {
|
|
1454
|
+
// not submit yet, open otp
|
|
1455
|
+
const fieldName = (_b = (_a = listBlockAdded.find((x) => x.name === 'PhoneOtpBlock')) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.value;
|
|
1456
|
+
if ((_c = v[fieldName]) === null || _c === void 0 ? void 0 : _c.startsWith('+')) {
|
|
1457
|
+
newShowOtpPhone = {
|
|
1458
|
+
phone: v[fieldName],
|
|
1459
|
+
type: 'phone',
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
if (listBlockAdded.findIndex((x) => x.name === 'WhatsappOtpBlock') > -1) {
|
|
1464
|
+
// not submit yet, open otp
|
|
1465
|
+
const fieldName = (_e = (_d = listBlockAdded.find((x) => x.name === 'WhatsappOtpBlock')) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.value;
|
|
1466
|
+
if ((_f = v[fieldName]) === null || _f === void 0 ? void 0 : _f.startsWith('+')) {
|
|
1467
|
+
newShowOtpPhone = {
|
|
1468
|
+
phone: v[fieldName],
|
|
1469
|
+
type: 'whatsapp',
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
if (listBlockAdded.findIndex((x) => x.name === 'ZaloOtpBlock') > -1) {
|
|
1474
|
+
// not submit yet, open otp
|
|
1475
|
+
const fieldName = (_h = (_g = listBlockAdded.find((x) => x.name === 'ZaloOtpBlock')) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.value;
|
|
1476
|
+
if ((_j = v[fieldName]) === null || _j === void 0 ? void 0 : _j.startsWith('+')) {
|
|
1477
|
+
newShowOtpPhone = {
|
|
1478
|
+
phone: v[fieldName],
|
|
1479
|
+
type: 'zalo',
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
if (newShowOtpPhone) {
|
|
1484
|
+
setIsSubmitLoading(true);
|
|
1485
|
+
Service.sendSMSOtpLead(newShowOtpPhone)
|
|
1486
|
+
.then((res) => {
|
|
1487
|
+
var _a;
|
|
1488
|
+
const respMessage = (_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0];
|
|
1489
|
+
if (respMessage === 'This phone number was verified') {
|
|
1490
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
1491
|
+
return;
|
|
1492
|
+
}
|
|
1493
|
+
setShowOtpPhone(newShowOtpPhone);
|
|
1494
|
+
})
|
|
1495
|
+
.finally(() => {
|
|
1496
|
+
setIsSubmitLoading(false);
|
|
1497
|
+
});
|
|
1498
|
+
return;
|
|
1499
|
+
}
|
|
1500
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
1501
|
+
})(e);
|
|
1502
|
+
}, 100);
|
|
1503
|
+
};
|
|
1504
|
+
useEffect(() => {
|
|
1505
|
+
form === null || form === void 0 ? void 0 : form.setValues(fillInfo);
|
|
1506
|
+
}, [fillInfo]);
|
|
1507
|
+
return (React__default.createElement(LeadFormProvider$1, { form: form },
|
|
1508
|
+
React__default.createElement(Box, { component: "form", ref: (el) => el && setFormRef(el), className: cx(className, classes.root), onSubmit: middlewareOnSubmit, styles: styles },
|
|
1509
|
+
React__default.createElement("div", { className: classes.header },
|
|
1510
|
+
React__default.createElement(Heading, { className: classes.heading }),
|
|
1511
|
+
React__default.createElement(Description, { className: classes.description })),
|
|
1512
|
+
React__default.createElement("div", { className: classes.controlList },
|
|
1513
|
+
React__default.createElement(Fields, { classNames: {
|
|
1514
|
+
control: classes.control,
|
|
1515
|
+
}, listBlockAdded: listBlockAdded, locale: locale, onClose: onClose, onOtherSubmit: onOtherSubmit, popoverProps: popoverProps })),
|
|
1516
|
+
((_a = actionBlocks === null || actionBlocks === void 0 ? void 0 : actionBlocks.submitBlock) === null || _a === void 0 ? void 0 : _a.isHide) ? null : (React__default.createElement("div", { className: classes.submitBtnWrapper },
|
|
1517
|
+
React__default.createElement(Button, Object.assign({ size: "md", id: "lead-submit", type: "submit", className: classes.submitBtn, loading: isSubmitLoading, color: primaryColor }, submitProps), popUpSubmitText))))));
|
|
1518
|
+
};
|
|
1519
|
+
const Form = (props) => {
|
|
1520
|
+
const { showOtpPhone, showThankyou } = useContext(LeadGenComponentContext);
|
|
1521
|
+
return showThankyou || showOtpPhone ? null : React__default.createElement(FormComponent, Object.assign({}, props));
|
|
1617
1522
|
};
|
|
1618
1523
|
|
|
1619
|
-
var
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
"lead.otp.desc": "我們已將 OTP 發送到您的手機號碼 {phone}",
|
|
1632
|
-
"lead.otp.verify": "驗證",
|
|
1633
|
-
"lead.otp.resend": "重新發送 OTP {timer}",
|
|
1634
|
-
"lead.otp.phoneLabel": "電話 OTP",
|
|
1635
|
-
"lead.otp.phonePlaceholder": "輸入 OTP",
|
|
1636
|
-
"lead.empty.title": "哎呀,您的資訊似乎是空的,您想要重新提交資訊嗎?",
|
|
1637
|
-
"lead.empty.cancel": "取消",
|
|
1638
|
-
"lead.empty.submitAgain": "重新提交",
|
|
1639
|
-
"inlineFreebie.freeSample.title": "免費試用",
|
|
1640
|
-
"inlineFreebie.luckyDrawGift.title": "幸運抽獎禮品",
|
|
1641
|
-
"inlineFreebie.value": "價值",
|
|
1642
|
-
"common.day": "日",
|
|
1643
|
-
"common.month": "月",
|
|
1644
|
-
"common.year": "年"
|
|
1645
|
-
};
|
|
1524
|
+
var useStyles$1 = createStyles(() => {
|
|
1525
|
+
return {
|
|
1526
|
+
root: {},
|
|
1527
|
+
header: {},
|
|
1528
|
+
heading: {},
|
|
1529
|
+
description: {},
|
|
1530
|
+
control: {},
|
|
1531
|
+
actions: {},
|
|
1532
|
+
submitBtn: {},
|
|
1533
|
+
resendOtp: {},
|
|
1534
|
+
};
|
|
1535
|
+
});
|
|
1646
1536
|
|
|
1647
|
-
const
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
'
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
'
|
|
1657
|
-
|
|
1658
|
-
|
|
1537
|
+
const OtpBlockComponent = ({ otpData, onSuccess, autoSendWhenOpen, className, styles, classNames, }) => {
|
|
1538
|
+
const { t } = useLeadGenTranslations();
|
|
1539
|
+
const phone = otpData.phone;
|
|
1540
|
+
const otpType = otpData.type;
|
|
1541
|
+
const [otp, setOtp] = useState('');
|
|
1542
|
+
const [isDirty, setIsDirty] = useState(false);
|
|
1543
|
+
const [resendTimer, setResendTimer] = useState(autoSendWhenOpen ? 0 : 60);
|
|
1544
|
+
const inputRef = useRef(null);
|
|
1545
|
+
const [errorMsg, setErrorMsg] = useState();
|
|
1546
|
+
const [displayPhone, setDisplayPhone] = useState('');
|
|
1547
|
+
const formatPhoneNumberIntlRef = useRef();
|
|
1548
|
+
const [isSubmitLoading, setIsSubmitLoading] = useState(false);
|
|
1549
|
+
const { classes, cx } = useStyles$1(undefined, {
|
|
1550
|
+
name: 'LeadGen__OTP',
|
|
1551
|
+
styles,
|
|
1552
|
+
classNames,
|
|
1553
|
+
});
|
|
1554
|
+
useEffect(() => {
|
|
1555
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
1556
|
+
var _a;
|
|
1557
|
+
if (!formatPhoneNumberIntlRef.current) {
|
|
1558
|
+
const res = yield import('react-phone-number-input');
|
|
1559
|
+
formatPhoneNumberIntlRef.current = res.formatPhoneNumberIntl;
|
|
1560
|
+
}
|
|
1561
|
+
setDisplayPhone(((_a = formatPhoneNumberIntlRef.current) === null || _a === void 0 ? void 0 : _a.call(formatPhoneNumberIntlRef, phone)) || phone);
|
|
1562
|
+
}))();
|
|
1563
|
+
}, [phone]);
|
|
1564
|
+
const sendOtp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1565
|
+
var _a;
|
|
1566
|
+
if (!phone) {
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
const res = yield Service.sendSMSOtpLead({
|
|
1570
|
+
phone,
|
|
1571
|
+
type: otpType,
|
|
1572
|
+
});
|
|
1573
|
+
const respMessage = (_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0];
|
|
1574
|
+
if (respMessage === 'Send sms successfully' ||
|
|
1575
|
+
respMessage === 'Send WhatsApp successfully' ||
|
|
1576
|
+
respMessage === 'Send Zalo successfully') {
|
|
1577
|
+
setResendTimer(60);
|
|
1578
|
+
setTimeout(() => {
|
|
1579
|
+
if (inputRef.current) {
|
|
1580
|
+
inputRef.current.focus();
|
|
1581
|
+
inputRef.current.scrollIntoView({ block: 'center' });
|
|
1582
|
+
}
|
|
1583
|
+
}, 100);
|
|
1584
|
+
}
|
|
1585
|
+
else if (respMessage === 'This phone number was verified') {
|
|
1586
|
+
onSuccess();
|
|
1587
|
+
}
|
|
1588
|
+
else {
|
|
1589
|
+
setErrorMsg(respMessage || 'Something went wrong!');
|
|
1590
|
+
// const defaultError = f({ id: 'notification.comment.somethingWrong' })
|
|
1591
|
+
// setStatusVerifyOTP('idle')
|
|
1592
|
+
// pushNotifications({
|
|
1593
|
+
// title: respMessage || defaultError,
|
|
1594
|
+
// message: '',
|
|
1595
|
+
// type: 'danger',
|
|
1596
|
+
// })
|
|
1597
|
+
}
|
|
1598
|
+
});
|
|
1599
|
+
const submitOtp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1600
|
+
if (!phone || !otp) {
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
setIsSubmitLoading(true);
|
|
1604
|
+
const res = yield Service.verifyOtpLead({
|
|
1605
|
+
phone,
|
|
1606
|
+
otp,
|
|
1607
|
+
type: otpType,
|
|
1608
|
+
});
|
|
1609
|
+
const respMessage = res === null || res === void 0 ? void 0 : res._messages[0];
|
|
1610
|
+
if (respMessage === 'Verify successfully' ||
|
|
1611
|
+
respMessage === 'Verify WhatsApp OTP sucess' ||
|
|
1612
|
+
respMessage === 'Verify Zalo OTP sucess') {
|
|
1613
|
+
onSuccess();
|
|
1614
|
+
}
|
|
1615
|
+
else if (respMessage === 'This phone number was verified') {
|
|
1616
|
+
onSuccess();
|
|
1617
|
+
}
|
|
1618
|
+
else {
|
|
1619
|
+
setErrorMsg(respMessage || 'something Wrong');
|
|
1620
|
+
// setIsShowError(true)
|
|
1621
|
+
// setStatusVerifyOTP('sent')
|
|
1622
|
+
// pushNotifications({
|
|
1623
|
+
// title: res?._messages[0] || defaultError,
|
|
1624
|
+
// message: '',
|
|
1625
|
+
// type: 'danger',
|
|
1626
|
+
// })
|
|
1627
|
+
}
|
|
1628
|
+
setIsSubmitLoading(false);
|
|
1629
|
+
});
|
|
1630
|
+
useEffect(() => {
|
|
1631
|
+
setTimeout(() => {
|
|
1632
|
+
if (resendTimer > 0) {
|
|
1633
|
+
setResendTimer((r) => r - 1);
|
|
1634
|
+
}
|
|
1635
|
+
}, 1000);
|
|
1636
|
+
}, [resendTimer]);
|
|
1637
|
+
useEffect(() => {
|
|
1638
|
+
if (autoSendWhenOpen && !resendTimer) {
|
|
1639
|
+
sendOtp();
|
|
1640
|
+
}
|
|
1641
|
+
}, []);
|
|
1642
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1643
|
+
React__default.createElement(Box, { component: "form", onSubmit: (e) => {
|
|
1644
|
+
e.preventDefault();
|
|
1645
|
+
submitOtp();
|
|
1646
|
+
}, className: cx(classes.root, className) },
|
|
1647
|
+
React__default.createElement("div", { className: classes.header },
|
|
1648
|
+
React__default.createElement(Heading$1, { tag: "h3", className: classes.heading }, t('lead.otp.title')),
|
|
1649
|
+
React__default.createElement(Text, { size: "p3", className: classes.description }, t('lead.otp.desc', { phone: displayPhone }))),
|
|
1650
|
+
React__default.createElement(Input, { ref: inputRef, name: '_' + name + '-otp', spellCheck: false, type: "number", placeholder: t('lead.otp.phonePlaceholder'), className: classes.control, label: t('lead.otp.phoneLabel'), "data-control": "otp", withAsterisk: true, pattern: "[0-9]*", value: otp, maxLength: 6, onChange: (v) => {
|
|
1651
|
+
setIsDirty(true);
|
|
1652
|
+
setOtp(v);
|
|
1653
|
+
if (isDirty && !v)
|
|
1654
|
+
setErrorMsg('OTP is required');
|
|
1655
|
+
else
|
|
1656
|
+
setErrorMsg(undefined);
|
|
1657
|
+
}, error: isDirty ? errorMsg : undefined }),
|
|
1658
|
+
React__default.createElement("div", { className: classes.actions },
|
|
1659
|
+
React__default.createElement(Button, { type: "submit", size: "md", color: "primary", className: classes.submitBtn,
|
|
1660
|
+
// onClick={() => submitOtp()}
|
|
1661
|
+
disabled: !otp, loading: isSubmitLoading }, t('lead.otp.verify')),
|
|
1662
|
+
React__default.createElement(Button, { type: "button", size: "md", color: "transparent", className: classes.resendOtp, onClick: () => {
|
|
1663
|
+
sendOtp();
|
|
1664
|
+
}, disabled: !!resendTimer }, t('lead.otp.resend', {
|
|
1665
|
+
timer: resendTimer ? ` (${resendTimer}s)` : '',
|
|
1666
|
+
}))))));
|
|
1659
1667
|
};
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1668
|
+
const OtpBlock$1 = (_a) => {
|
|
1669
|
+
var rest = __rest(_a, []);
|
|
1670
|
+
const { showOtpPhone, setShowOtpPhone, onSubmit,
|
|
1671
|
+
// formRef,
|
|
1672
|
+
// leadFormConfig: { form },
|
|
1673
|
+
} = useContext(LeadGenComponentContext);
|
|
1674
|
+
return showOtpPhone ? (React__default.createElement(OtpBlockComponent, Object.assign({ otpData: showOtpPhone, autoSendWhenOpen: false, onSuccess: () => {
|
|
1675
|
+
setShowOtpPhone(null);
|
|
1676
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
1677
|
+
} }, rest))) : null;
|
|
1666
1678
|
};
|
|
1667
1679
|
|
|
1668
|
-
const
|
|
1669
|
-
const {
|
|
1670
|
-
|
|
1671
|
-
|
|
1680
|
+
const Thankyou = ({ children, }) => {
|
|
1681
|
+
const { showThankyou, setShowThankyou } = useContext(LeadGenComponentContext);
|
|
1682
|
+
return showThankyou
|
|
1683
|
+
? children(showThankyou, () => setShowThankyou(null))
|
|
1684
|
+
: null;
|
|
1672
1685
|
};
|
|
1673
1686
|
|
|
1674
1687
|
// import mockLeadData from './mockLeadData'
|
|
@@ -2046,8 +2059,8 @@ const LeadGenContext = createContext({
|
|
|
2046
2059
|
});
|
|
2047
2060
|
const LeadGenContextProvider = (props) => {
|
|
2048
2061
|
const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, articleId = 1, categoryList, siteDomain: site_domain, children, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "articleId", "categoryList", "siteDomain", "children", "userInfo"]);
|
|
2049
|
-
const { t } = useTranslations();
|
|
2050
2062
|
const [forceCampaign, setForceCampaign] = useState(forceCampaignProps);
|
|
2063
|
+
const { t } = useLeadGenTranslations();
|
|
2051
2064
|
const [subscriptionInfo, setSubscriptionInfo] = useState({
|
|
2052
2065
|
subscriptionIcon: '',
|
|
2053
2066
|
subscriptionTitle: '',
|
|
@@ -2326,8 +2339,7 @@ const LeadGenContextProvider = (props) => {
|
|
|
2326
2339
|
apiSubotUrl, locale: localeProps, articleId, categoryId: subscriptionInfo.subcriptionCateId, siteDomain: site_domain, forceCampaign,
|
|
2327
2340
|
submit,
|
|
2328
2341
|
submitSubscriptionBox,
|
|
2329
|
-
impression }) },
|
|
2330
|
-
React__default.createElement(LeadGenTranslationProvider, { locale: locale }, children)));
|
|
2342
|
+
impression }) }, children));
|
|
2331
2343
|
};
|
|
2332
2344
|
const useLeadGenContext = () => {
|
|
2333
2345
|
const context = useContext(LeadGenContext);
|
|
@@ -2387,7 +2399,7 @@ dayjs.extend(customParseFormat);
|
|
|
2387
2399
|
const [LeadFormProvider, useLeadFormContext, useLeadForm] = createFormContext();
|
|
2388
2400
|
const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validatingEmailRef, campaignId, campaign_subot_id = [], userInfo, format, }) => {
|
|
2389
2401
|
var _a;
|
|
2390
|
-
const { t } =
|
|
2402
|
+
const { t } = useLeadGenTranslations();
|
|
2391
2403
|
const initialValues = useMemo(() => formatLeadGenFormValue(mappingSSOToLead(userInfo), listBlockAdded), [userInfo === null || userInfo === void 0 ? void 0 : userInfo.id]);
|
|
2392
2404
|
const LEAD_LOCALE = LEAD_LOCALE_DATA$1[(_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.lang] ||
|
|
2393
2405
|
LEAD_LOCALE_DATA$1['vi-VN'];
|
|
@@ -3155,8 +3167,9 @@ const LeadGenSubscriptionBoxContainer = (props) => {
|
|
|
3155
3167
|
return null;
|
|
3156
3168
|
}
|
|
3157
3169
|
return (React__default.createElement(MantineProvider, { locale: locale, customStyleType: CustomStylesType.LEADGEN },
|
|
3158
|
-
React__default.createElement(
|
|
3159
|
-
React__default.createElement(
|
|
3170
|
+
React__default.createElement(LeadGenTranslationProvider, { locale: locale },
|
|
3171
|
+
React__default.createElement(LeadGenContextProvider, Object.assign({}, props, { apiLeadUrl: apiUrl, apiSubotUrl: apiSubotUrl }),
|
|
3172
|
+
React__default.createElement(Container, null)))));
|
|
3160
3173
|
};
|
|
3161
3174
|
const LeadGenSubscriptionBox = LeadGenSubscriptionBoxContainer;
|
|
3162
3175
|
|
|
@@ -4001,7 +4014,7 @@ const EmptyIcon = (props) => {
|
|
|
4001
4014
|
};
|
|
4002
4015
|
|
|
4003
4016
|
const EmptyComponent = ({ onClose, onContinue, }) => {
|
|
4004
|
-
const { t } =
|
|
4017
|
+
const { t } = useLeadGenTranslations();
|
|
4005
4018
|
return (React__default.createElement("div", { className: "leadgen-empty" },
|
|
4006
4019
|
React__default.createElement("div", { className: "leadgen-empty_body" },
|
|
4007
4020
|
React__default.createElement("div", { className: "leadgen-empty_wrapper" },
|
|
@@ -4017,7 +4030,7 @@ const SubtitleBlock = ({ children, align, }) => (React__default.createElement("p
|
|
|
4017
4030
|
const TitleBlock = ({ children, align, }) => (React__default.createElement("h2", { className: `lead-modal__title ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
4018
4031
|
|
|
4019
4032
|
const LightboxFields = ({ listBlockAdded, popupId, locale, hasSubmitBtn, isSubmitLoading, disabledButtonSubmit, }) => {
|
|
4020
|
-
const { t } =
|
|
4033
|
+
const { t } = useLeadGenTranslations();
|
|
4021
4034
|
const { setRedirectUrl } = useContext(LeadGenContext$1);
|
|
4022
4035
|
const form = useLeadFormContext();
|
|
4023
4036
|
const formValues = form.values;
|
|
@@ -4343,7 +4356,7 @@ const HeaderImage = ({ src, ratio = 3 / 2, className, style, }) => {
|
|
|
4343
4356
|
|
|
4344
4357
|
const OtpBlock = ({ otpData, onSuccess, autoSendWhenOpen, }) => {
|
|
4345
4358
|
const { primaryColor } = useContext(LeadGenContext$1);
|
|
4346
|
-
const { t } =
|
|
4359
|
+
const { t } = useLeadGenTranslations();
|
|
4347
4360
|
const phone = otpData.phone;
|
|
4348
4361
|
const otpType = otpData.type;
|
|
4349
4362
|
const [otp, setOtp] = useState('');
|
|
@@ -4556,7 +4569,7 @@ const StyledImageWrap = styled.div `
|
|
|
4556
4569
|
`;
|
|
4557
4570
|
|
|
4558
4571
|
const FreebieLuckyGiftItem = ({ isHostedByClient, locale, data: { image, name, desc, prize_value, prize_unit, cta_button, winning_slot, }, }) => {
|
|
4559
|
-
const { t } =
|
|
4572
|
+
const { t } = useLeadGenTranslations();
|
|
4560
4573
|
console.log(prize_value, prize_unit, locale);
|
|
4561
4574
|
const formattedPrice = prize_value && prize_unit
|
|
4562
4575
|
? currencyFormat(prize_value, locale, prize_unit)
|
|
@@ -4608,7 +4621,7 @@ const FreebieCarousel = ({ isHostedByClient, data, locale, }) => {
|
|
|
4608
4621
|
const { classes } = useStyles(undefined, {
|
|
4609
4622
|
name: 'Carousel',
|
|
4610
4623
|
});
|
|
4611
|
-
const { t } =
|
|
4624
|
+
const { t } = useLeadGenTranslations();
|
|
4612
4625
|
const freeSample = data.filter((item) => item.type === EFreebieType.SAMPLE);
|
|
4613
4626
|
const luckyGift = data.filter((item) => item.type === EFreebieType.LUCKY_DRAW);
|
|
4614
4627
|
const isHasLuckyGift = luckyGift.length > 0;
|
|
@@ -5383,7 +5396,7 @@ const formatTrackingData = (params) => {
|
|
|
5383
5396
|
};
|
|
5384
5397
|
|
|
5385
5398
|
// mount css
|
|
5386
|
-
const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, }) => {
|
|
5399
|
+
const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, formatMessage, }) => {
|
|
5387
5400
|
var _a, _b;
|
|
5388
5401
|
const scrollEventHandlerRef = useRef();
|
|
5389
5402
|
const leadStartTimeRef = useRef(Date.now());
|
|
@@ -5738,7 +5751,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5738
5751
|
redirectUrl,
|
|
5739
5752
|
setRedirectUrl,
|
|
5740
5753
|
} },
|
|
5741
|
-
React__default.createElement(
|
|
5754
|
+
React__default.createElement(LeadGenTranslationProvider, { locale: locale, formatMessage: formatMessage },
|
|
5742
5755
|
React__default.createElement(MantineProvider, { locale: locale, customStyleType: CustomStylesType.LEADGEN }, children ? (React__default.createElement(Component, { campaign: showCampaign, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, setShowThankyou: setShowThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo }, children)) : (React__default.createElement(Portal, { target: getPopupWrapperDom() },
|
|
5743
5756
|
React__default.createElement(Box, { sx: { position: 'fixed', zIndex: ZINDEX_SSO - 9e6 } },
|
|
5744
5757
|
React__default.createElement(Transition, { mounted: Boolean(((_b = showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.extra_fields) === null || _b === void 0 ? void 0 : _b.popupVersion) === '2.1'), transition: "fade", duration: 600, timingFunction: "ease", exitDuration: 200 }, (styles) => {
|