@hhgtech/hhg-components 1.29.417-beta-4 → 1.29.418-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{InputDate-254840b2.js → InputDate-5a4d6538.js} +5 -6
- package/build/{LastPeriod-27af5af8.js → LastPeriod-60bb1dd4.js} +1 -1
- package/build/{MobileBottomNavigationIcon-7d35822c.js → MobileBottomNavigationIcon-620ff3c9.js} +3 -3
- package/build/{Spinner-65dd317c.js → Spinner-7a5884e5.js} +1 -1
- package/build/{WhatsApp-fb229bc8.js → WhatsApp-a1d21a62.js} +1 -1
- package/build/adapters.js +20 -20
- package/build/atoms.js +49 -49
- package/build/babyGrowth.js +84 -84
- package/build/cache.js +2 -2
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components/mantine/phoneInput/PhoneInput.d.ts +1 -1
- package/build/components.js +98 -98
- package/build/{constants-72d14d07.js → constants-51a9e764.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-1d18dc70.js → core-f4d51607.js} +1 -1
- package/build/{dataTransform-f221cabe.js → dataTransform-9a528d4e.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-279f6d26.js → editor-187480ae.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +24 -24
- package/build/embeddedHeathToolCards_babyPoop.js +20 -20
- package/build/embeddedHeathToolCards_babyVaccine.js +23 -23
- package/build/embeddedHeathToolCards_bmi_bmi.js +26 -26
- package/build/embeddedHeathToolCards_bmrBmr.js +26 -26
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +23 -23
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +23 -23
- package/build/embeddedHeathToolCards_pwg_pwg.js +27 -27
- package/build/embeddedHeathToolCards_targetHeartRate.js +28 -28
- package/build/esm/{InputDate-21166aaf.js → InputDate-47595d8d.js} +5 -6
- package/build/esm/{LastPeriod-9195131e.js → LastPeriod-2ff290d5.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-1aea12c4.js → MobileBottomNavigationIcon-114e08a4.js} +3 -3
- package/build/esm/{Spinner-61f237e1.js → Spinner-d2e9f59a.js} +1 -1
- package/build/esm/{WhatsApp-71f0770e.js → WhatsApp-7b192be4.js} +1 -1
- package/build/esm/adapters.js +20 -20
- package/build/esm/atoms.js +49 -49
- package/build/esm/babyGrowth.js +84 -84
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/mantine/phoneInput/PhoneInput.d.ts +1 -1
- package/build/esm/components.js +98 -98
- package/build/esm/{constants-fa020529.js → constants-d4c2f380.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-c8adef56.js → core-fb88905a.js} +1 -1
- package/build/esm/{dataTransform-011ca2db.js → dataTransform-a1a20129.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-ffa4a01a.js → editor-eda546e3.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +24 -24
- package/build/esm/embeddedHeathToolCards_babyPoop.js +20 -20
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +23 -23
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +26 -26
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +26 -26
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +23 -23
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +23 -23
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +27 -27
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +28 -28
- package/build/esm/footer.js +22 -22
- package/build/esm/gAssets.js +2 -2
- package/build/esm/{healthTools-b429090e.js → healthTools-466d0bb8.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +19 -19
- package/build/esm/healthToolsForm.js +34 -34
- 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-3347570a.js → index-042f50ef.js} +13 -13
- package/build/esm/{index-b6152843.js → index-04d56126.js} +1 -1
- package/build/esm/{index-466c676a.js → index-077323f8.js} +5 -5
- package/build/esm/{index-b74933d0.js → index-09c35627.js} +13 -13
- package/build/esm/{index-7457e548.js → index-0b31c943.js} +3 -3
- package/build/esm/{index-a7531362.js → index-0b6a365d.js} +7 -7
- package/build/esm/{index-9ec0c510.js → index-0d7e20fb.js} +13 -13
- package/build/esm/{index-8492fc0f.js → index-10f57124.js} +2 -2
- package/build/esm/{index-1f3f81ac.js → index-121b44de.js} +13 -13
- package/build/esm/{index-5f705217.js → index-16013e37.js} +3 -3
- package/build/esm/{index-a8c0a98a.js → index-187d3df6.js} +7 -7
- package/build/esm/{index-b33a1757.js → index-1c4a31b1.js} +11 -11
- package/build/esm/{index-505e8d9a.js → index-22d87c93.js} +6 -6
- package/build/esm/{index-8288d2aa.js → index-2ac08cd6.js} +17 -17
- package/build/esm/{index-b0218e75.js → index-2adf3835.js} +1 -1
- package/build/esm/{index-682c98f5.js → index-2b9d479b.js} +1 -1
- package/build/esm/{index-78f03833.js → index-2c5a3038.js} +3 -3
- package/build/esm/{index-5e5f9174.js → index-36dfca92.js} +24 -24
- package/build/esm/{index-47abaa0b.js → index-3aabd966.js} +17 -17
- package/build/esm/{index-ac2eda61.js → index-3ac01cd8.js} +1 -1
- package/build/esm/{index-e06a6c2d.js → index-42c9a783.js} +10 -10
- package/build/esm/{index-5c6473c8.js → index-46e08088.js} +2 -2
- package/build/esm/{index-ff7a0568.js → index-4a0b263e.js} +2 -2
- package/build/esm/{index-b7f93f9f.js → index-4e8bfaa1.js} +4 -4
- package/build/esm/{index-f031743f.js → index-4eb875ba.js} +41 -21
- package/build/esm/{index-0914d478.js → index-4ff4aa01.js} +15 -15
- package/build/esm/{index-379024d9.js → index-5277e388.js} +3 -3
- package/build/esm/{index-c7666ccb.js → index-566fe097.js} +25 -25
- package/build/esm/{index-120b3450.js → index-576cde59.js} +2 -2
- package/build/esm/{index-b8863d04.js → index-5bcc8107.js} +2 -2
- package/build/esm/{index-85a63733.js → index-6032d7e1.js} +16 -10
- package/build/esm/{index-c69da284.js → index-633ff7f5.js} +6 -6
- package/build/esm/{index-9f3aace8.js → index-653c5c72.js} +2 -2
- package/build/esm/{index-81bee0d6.js → index-66549bce.js} +2 -2
- package/build/esm/{index-0928206b.js → index-7b98fb75.js} +2 -2
- package/build/esm/{index-93b44235.js → index-8a5a2683.js} +2 -2
- package/build/esm/{index-181fda0a.js → index-8aee7b4f.js} +5 -5
- package/build/esm/{index-9cbd52ac.js → index-8c6e583f.js} +3 -3
- package/build/esm/{index-c4866538.js → index-8f7394ed.js} +6 -6
- package/build/esm/{index-5dc4c44b.js → index-96606b7b.js} +2 -2
- package/build/esm/{index-5be58196.js → index-9d7cc01e.js} +6 -6
- package/build/esm/{index-6003de7b.js → index-9fabc760.js} +13 -13
- package/build/esm/{index-335add47.js → index-aa7ec308.js} +2 -2
- package/build/esm/{index-64e35359.js → index-ae9cad05.js} +1 -1
- package/build/esm/{index-b19de734.js → index-af07302f.js} +17 -17
- package/build/esm/{index-36f70835.js → index-af965805.js} +32 -32
- package/build/esm/{index-56b71023.js → index-b63f18b2.js} +1 -1
- package/build/esm/{index-13b36774.js → index-b69036b6.js} +16 -16
- package/build/esm/{index-f40db32c.js → index-b7d5c382.js} +16 -16
- package/build/esm/{index-54a59f66.js → index-ba18ee42.js} +8 -8
- package/build/esm/{index-091f9c44.js → index-c2ea33ab.js} +3 -3
- package/build/esm/{index-e54c233b.js → index-c57328aa.js} +22 -22
- package/build/esm/{index-c6e6bba1.js → index-c9890de4.js} +3 -3
- package/build/esm/{index-77e9be68.js → index-cc834f3f.js} +2 -2
- package/build/esm/{index-5c736e99.js → index-d1f891f1.js} +6 -6
- package/build/esm/{index-864c7df3.js → index-dac669e4.js} +32 -32
- package/build/esm/{index-759eb7fe.js → index-daeaaf7b.js} +2 -2
- package/build/esm/{index-ec3014f3.js → index-dbdb7969.js} +13 -13
- package/build/esm/{index-56cee63a.js → index-e120177a.js} +1 -1
- package/build/esm/{index-e2d88107.js → index-e2325214.js} +30 -30
- package/build/esm/{index-907a39ff.js → index-e3537bf1.js} +15 -15
- package/build/esm/{index-259cf929.js → index-e5483032.js} +15 -15
- package/build/esm/{index-8c5043b3.js → index-e64e68bf.js} +2 -2
- package/build/esm/{index-4052d43c.js → index-ec09c24b.js} +3 -3
- package/build/esm/{index-02f91b96.js → index-ee0c25ba.js} +2 -2
- package/build/esm/{index-7ffd5ffc.js → index-f5050d07.js} +4 -4
- package/build/esm/{index-0a435387.js → index-f63af2b6.js} +17 -17
- package/build/esm/{index-e22e1b14.js → index-f82ced74.js} +1 -1
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +119 -119
- package/build/esm/{labelSorting-ee05c613.js → labelSorting-59e94ae8.js} +4 -4
- package/build/esm/lead/LeadGen.helpers.d.ts +2 -2
- package/build/esm/lead/LeadGen.type.d.ts +3 -4
- package/build/esm/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +15 -21
- package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +3 -1
- package/build/esm/lead/index.d.ts +1 -5
- package/build/esm/lead/layouts/inline.d.ts +2 -3
- package/build/esm/lead/layouts/lightbox/fields/textField/context.d.ts +8 -0
- package/build/esm/lead/layouts/lightbox/fields/textField/index.d.ts +18 -2
- package/build/esm/lead/layouts/lightbox/fields/textField/index.styled.d.ts +4 -0
- package/build/esm/lead/layouts/lightbox/index.d.ts +1 -2
- package/build/esm/lead/newLeadPopup.d.ts +1 -2
- package/build/esm/lead/services/index.d.ts +1 -5
- package/build/esm/lead/utils.d.ts +0 -18
- package/build/esm/lead.css +1 -1
- package/build/esm/lead.js +585 -921
- package/build/esm/{logoIcon-8a9f767e.js → logoIcon-df518063.js} +2 -2
- package/build/esm/mantine.js +26 -26
- package/build/esm/misc.js +18 -18
- 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 +75 -75
- 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 +51 -51
- package/build/esm/{post-9f868ddd.js → post-84601efd.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 +32 -32
- package/build/esm/{store-1ac9f69a.js → store-f4e29295.js} +3 -3
- package/build/esm/subot.js +37 -37
- package/build/esm/surveyOrPremiumBanner.js +34 -34
- package/build/esm/surveyQuestionCard.js +11 -11
- package/build/esm/{surveyThankyouCard-086bc15e.js → surveyThankyouCard-2f2671a4.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-91c67da3.js → translationsProvider-c677cefb.js} +1 -1
- package/build/esm/{treePopoverMenu-b1e40496.js → treePopoverMenu-73681e68.js} +19 -19
- package/build/esm/{types-38335fa1.js → types-39ff2a5b.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-fb62ed55.js → useCategory-1e39a713.js} +5 -5
- package/build/esm/{useHealthToolCache-b0d95605.js → useHealthToolCache-fadb05cf.js} +1 -1
- package/build/esm/{usePlacesAutocomplete-99ed4f62.js → usePlacesAutocomplete-5502d0fc.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +10 -10
- package/build/esm/{utils-6f3d4ba1.js → utils-75cc97d6.js} +2 -2
- package/build/esm/{utils-c3d2069b.js → utils-a3564cac.js} +3 -3
- package/build/esm/{utils-7d4f7961.js → utils-ad7e8afc.js} +2 -2
- package/build/esm/{utils-48a82f45.js → utils-d2b679a6.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-89365b20.js → healthTools-77f90d40.js} +1 -1
- package/build/healthToolsCardWrapper.js +19 -19
- package/build/healthToolsForm.js +34 -34
- package/build/hooks.js +13 -13
- package/build/i18n.js +2 -2
- package/build/i18nV2.js +1 -1
- package/build/{index-166b76a7.js → index-02507d21.js} +1 -1
- package/build/{index-e0277d1e.js → index-02d08ae2.js} +16 -16
- package/build/{index-4c97e19a.js → index-03e8787c.js} +7 -7
- package/build/{index-3731520f.js → index-071eb126.js} +1 -1
- package/build/{index-38ccbbe1.js → index-0c1c026c.js} +3 -3
- package/build/{index-01a59720.js → index-115c15d9.js} +2 -2
- package/build/{index-f4d4d42f.js → index-148a0da6.js} +2 -2
- package/build/{index-1c170cb1.js → index-14b59ad5.js} +2 -2
- package/build/{index-318777d1.js → index-188d7d0b.js} +2 -2
- package/build/{index-81acc589.js → index-18c46d29.js} +10 -10
- package/build/{index-dba951e0.js → index-1bafe88e.js} +13 -13
- package/build/{index-d5c08e91.js → index-1f8eecf1.js} +17 -17
- package/build/{index-7b484032.js → index-235b772b.js} +3 -3
- package/build/{index-d143a5c8.js → index-24dbcdcc.js} +30 -30
- package/build/{index-5b40adaf.js → index-28bbbfcb.js} +16 -10
- package/build/{index-7ed417ff.js → index-2f19468e.js} +1 -1
- package/build/{index-bc4c6bf2.js → index-30b8dc7f.js} +5 -5
- package/build/{index-ceba5ede.js → index-35580834.js} +2 -2
- package/build/{index-8e1519d0.js → index-379a3767.js} +6 -6
- package/build/{index-8e3f8ac9.js → index-3808822f.js} +13 -13
- package/build/{index-3890d557.js → index-39126ea1.js} +7 -7
- package/build/{index-86a4a85f.js → index-49d08e3e.js} +6 -6
- package/build/{index-6335600d.js → index-4bc4d9ed.js} +2 -2
- package/build/{index-94a63221.js → index-4eaed35f.js} +2 -2
- package/build/{index-b4335423.js → index-4ef2a1d4.js} +3 -3
- package/build/{index-3ed8bd08.js → index-4fd69b77.js} +13 -13
- package/build/{index-a882429b.js → index-595c51a9.js} +41 -21
- package/build/{index-64efe705.js → index-5ee9ab57.js} +2 -2
- package/build/{index-2fc5e9da.js → index-5f2466e4.js} +1 -1
- package/build/{index-a0c9a661.js → index-64625ca6.js} +8 -8
- package/build/{index-730f3583.js → index-6656eff4.js} +32 -32
- package/build/{index-3365c8dd.js → index-68c2a0a9.js} +2 -2
- package/build/{index-a0a7d6a2.js → index-68d122ba.js} +5 -5
- package/build/{index-003be5e0.js → index-6c45f27e.js} +24 -24
- package/build/{index-9255029f.js → index-6ec469bf.js} +6 -6
- package/build/{index-9d2f5ef7.js → index-6f1306bd.js} +4 -4
- package/build/{index-3f8358c9.js → index-78d8696b.js} +2 -2
- package/build/{index-5b61d293.js → index-883a3f15.js} +2 -2
- package/build/{index-df079ac0.js → index-8918cdc7.js} +2 -2
- package/build/{index-c6a41a99.js → index-919b2376.js} +15 -15
- package/build/{index-8f06389f.js → index-91eb1f02.js} +6 -6
- package/build/{index-b00e419c.js → index-93cb7e8d.js} +15 -15
- package/build/{index-8cf1584f.js → index-98e7bbd6.js} +13 -13
- package/build/{index-ac0f8eed.js → index-a2333a7c.js} +2 -2
- package/build/{index-9e203863.js → index-a6528458.js} +2 -2
- package/build/{index-8f5e3a0a.js → index-ad02cc12.js} +1 -1
- package/build/{index-ed21cede.js → index-ad243b92.js} +3 -3
- package/build/{index-7e979c72.js → index-ad74e2d7.js} +15 -15
- package/build/{index-c4195f75.js → index-aea33eee.js} +17 -17
- package/build/{index-17534626.js → index-b422dd0a.js} +6 -6
- package/build/{index-087e59fa.js → index-bb1acb32.js} +3 -3
- package/build/{index-59d8bddc.js → index-bf21c08a.js} +17 -17
- package/build/{index-e11efac2.js → index-c21ed3d7.js} +1 -1
- package/build/{index-78e5c720.js → index-ca5a3313.js} +1 -1
- package/build/{index-460a2a68.js → index-d4d4629a.js} +4 -4
- package/build/{index-76492cf4.js → index-d547a664.js} +25 -25
- package/build/{index-5e483727.js → index-d7f21fcb.js} +13 -13
- package/build/{index-de066bf8.js → index-dae54d02.js} +3 -3
- package/build/{index-e4118011.js → index-de0edd32.js} +22 -22
- package/build/{index-613a9476.js → index-e28a6e05.js} +13 -13
- package/build/{index-8a063f65.js → index-e38d5395.js} +32 -32
- package/build/{index-20b7bee5.js → index-e6b77445.js} +11 -11
- package/build/{index-682eb65e.js → index-e92b8327.js} +1 -1
- package/build/{index-ae6ec43e.js → index-f409bbbf.js} +2 -2
- package/build/{index-d09dccb9.js → index-fa7fcf49.js} +16 -16
- package/build/{index-bbef2a38.js → index-fa81afed.js} +17 -17
- package/build/{index-1b093e97.js → index-fa9d5cbb.js} +3 -3
- package/build/{index-950d7302.js → index-feb81494.js} +3 -3
- package/build/index.css +1 -1
- package/build/index.js +119 -119
- package/build/{labelSorting-95db988b.js → labelSorting-032d226c.js} +4 -4
- package/build/lead/LeadGen.helpers.d.ts +2 -2
- package/build/lead/LeadGen.type.d.ts +3 -4
- package/build/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +15 -21
- package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +3 -1
- package/build/lead/index.d.ts +1 -5
- package/build/lead/layouts/inline.d.ts +2 -3
- package/build/lead/layouts/lightbox/fields/textField/context.d.ts +8 -0
- package/build/lead/layouts/lightbox/fields/textField/index.d.ts +18 -2
- package/build/lead/layouts/lightbox/fields/textField/index.styled.d.ts +4 -0
- package/build/lead/layouts/lightbox/index.d.ts +1 -2
- package/build/lead/newLeadPopup.d.ts +1 -2
- package/build/lead/services/index.d.ts +1 -5
- package/build/lead/utils.d.ts +0 -18
- package/build/lead.css +1 -1
- package/build/lead.js +582 -920
- package/build/{logoIcon-f16f4642.js → logoIcon-2969864c.js} +2 -2
- package/build/mantine.js +24 -24
- package/build/misc.js +18 -18
- 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 +75 -75
- 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 +51 -51
- package/build/{post-1b44d5a6.js → post-918e9b29.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 +30 -30
- package/build/{store-c3e9067f.js → store-9eeea9d4.js} +3 -3
- package/build/subot.js +36 -36
- package/build/surveyOrPremiumBanner.js +34 -34
- package/build/surveyQuestionCard.js +11 -11
- package/build/{surveyThankyouCard-0a0f8945.js → surveyThankyouCard-9f74cdab.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-3633e150.js → translationsProvider-6fd28b79.js} +1 -1
- package/build/{treePopoverMenu-d077506a.js → treePopoverMenu-89b3cf3e.js} +19 -19
- package/build/{types-6a10c2c1.js → types-4157e6e0.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-d816ddfe.js → useCategory-e7258875.js} +5 -5
- package/build/{useHealthToolCache-e8017194.js → useHealthToolCache-4c460918.js} +1 -1
- package/build/{usePlacesAutocomplete-e90b76e7.js → usePlacesAutocomplete-e78b153d.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +10 -10
- package/build/{utils-7f569045.js → utils-06db93cc.js} +2 -2
- package/build/{utils-82a8bdd5.js → utils-2128979a.js} +2 -2
- package/build/{utils-b54dea95.js → utils-257a1d2c.js} +5 -5
- package/build/{utils-312d52a6.js → utils-a1253bc1.js} +3 -3
- package/build/vaccination.js +22 -22
- package/package.json +1 -1
- package/build/esm/lead/LeadGenInline/LeadGenInline.d.ts +0 -8
- package/build/esm/lead/LeadGenInline/index.d.ts +0 -2
- package/build/esm/lead/services/index.type.d.ts +0 -5
- package/build/esm/misc/cachedSystem.d.ts +0 -5
- package/build/lead/LeadGenInline/LeadGenInline.d.ts +0 -8
- package/build/lead/LeadGenInline/index.d.ts +0 -2
- package/build/lead/services/index.type.d.ts +0 -5
- package/build/misc/cachedSystem.d.ts +0 -5
- /package/build/{BMI_BOYS.percentile.monthly-942fee12.js → BMI_BOYS.percentile.monthly-01f331a8.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-f550f0f3.js → BMI_BOYS.percentile.weekly-31a152d6.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-a064cca2.js → BMI_BOYS.percentile.yearly-65146373.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-585ad18b.js → BMI_BOYS.zscore.monthly-4211e0be.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-8afc626f.js → BMI_BOYS.zscore.weekly-93c61d55.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-18547df0.js → BMI_BOYS.zscore.yearly-6310f148.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-67e96ac8.js → BMI_GIRLS.percentile.monthly-fd0b09b5.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-cd8fdec3.js → BMI_GIRLS.percentile.weekly-2913e783.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-f9cde604.js → BMI_GIRLS.percentile.yearly-b4a98ab7.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-0f9e5a99.js → BMI_GIRLS.zscore.monthly-3ae99e6a.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-5e10a498.js → BMI_GIRLS.zscore.weekly-e16157e0.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-1489ff20.js → BMI_GIRLS.zscore.yearly-74088231.js} +0 -0
- /package/build/{ChevronDown-f361d5c3.js → ChevronDown-2e4ee3ae.js} +0 -0
- /package/build/{Close-ab29fc87.js → Close-2d16cfed.js} +0 -0
- /package/build/{Google-5170449a.js → Google-50e8aaca.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-b1ea7022.js → HEAD CIRCUM_BOYS.percentile.monthly-eff1e9e0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-1413544e.js → HEAD CIRCUM_BOYS.percentile.weekly-c30a27a7.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-0883f568.js → HEAD CIRCUM_BOYS.percentile.yearly-7f3fbe9e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-d5368595.js → HEAD CIRCUM_BOYS.zscore.monthly-b79f0952.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-89361ecb.js → HEAD CIRCUM_BOYS.zscore.weekly-7d05f9c9.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-286ed73a.js → HEAD CIRCUM_BOYS.zscore.yearly-b87bb885.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-f9060dde.js → HEAD CIRCUM_GIRLS.percentile.monthly-765a92df.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-79fa80b9.js → HEAD CIRCUM_GIRLS.percentile.weekly-36d3fda2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-d6d01a80.js → HEAD CIRCUM_GIRLS.percentile.yearly-42fa0b2f.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-6bfe0462.js → HEAD CIRCUM_GIRLS.zscore.monthly-8fd5e945.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-39558fc2.js → HEAD CIRCUM_GIRLS.zscore.weekly-8a7ef4bd.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-126b7cf4.js → HEAD CIRCUM_GIRLS.zscore.yearly-d0ae8ab4.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-5d165df4.js → HEIGHT_BOYS.percentile.monthly-bffe713a.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-e2ba18d0.js → HEIGHT_BOYS.percentile.weekly-9da217b9.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-f6fb651c.js → HEIGHT_BOYS.percentile.yearly-6c4795ff.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-7c04728e.js → HEIGHT_BOYS.zscore.monthly-8cffeb20.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-67245609.js → HEIGHT_BOYS.zscore.weekly-67363d45.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-2ccd5615.js → HEIGHT_BOYS.zscore.yearly-6858ce01.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-69bebcc9.js → HEIGHT_GIRLS.percentile.monthly-77b68efe.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-18f869f1.js → HEIGHT_GIRLS.percentile.weekly-a329169b.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-ae3b6251.js → HEIGHT_GIRLS.percentile.yearly-b1580594.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-8e1e9f04.js → HEIGHT_GIRLS.zscore.monthly-111fed27.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-497633b3.js → HEIGHT_GIRLS.zscore.weekly-47db9fcd.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-9423dbbc.js → HEIGHT_GIRLS.zscore.yearly-ac7f2ce3.js} +0 -0
- /package/build/{Locale-3d67e44b.js → Locale-7bc5a105.js} +0 -0
- /package/build/{Visible-553d1052.js → Visible-1dd6806c.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-371a46e6.js → WEIGHT_BOYS.percentile.monthly-5f970541.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-548b9606.js → WEIGHT_BOYS.percentile.weekly-fceb5e23.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c97a3013.js → WEIGHT_BOYS.percentile.yearly-8b8c44f0.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-dda978ca.js → WEIGHT_BOYS.zscore.monthly-c126eb4d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-449579ff.js → WEIGHT_BOYS.zscore.weekly-97ceb561.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-d9e59256.js → WEIGHT_BOYS.zscore.yearly-995d0473.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-84076455.js → WEIGHT_GIRLS.percentile.monthly-48b688b0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-ef96ef5a.js → WEIGHT_GIRLS.percentile.weekly-512e0909.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-c1182ab0.js → WEIGHT_GIRLS.percentile.yearly-b0baf0a3.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-977e0aaf.js → WEIGHT_GIRLS.zscore.monthly-a18d7f88.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-4e20ebb7.js → WEIGHT_GIRLS.zscore.weekly-9110c940.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-6bcf6d6f.js → WEIGHT_GIRLS.zscore.yearly-f5417677.js} +0 -0
- /package/build/{animation-6b67a875.js → animation-74e46603.js} +0 -0
- /package/build/{constants-1b036a31.js → constants-8953c136.js} +0 -0
- /package/build/{constants-659384f7.js → constants-94bf3614.js} +0 -0
- /package/build/{constants-b64212cc.js → constants-9b1376bf.js} +0 -0
- /package/build/{dataTransform-ab8cbfb3.js → dataTransform-2b65d249.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-df376133.js → BMI_BOYS.percentile.monthly-8791bad6.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-52d6f61f.js → BMI_BOYS.percentile.weekly-dcbea609.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-1a8b6e98.js → BMI_BOYS.percentile.yearly-51d70b35.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-6aeabcc8.js → BMI_BOYS.zscore.monthly-e133e03d.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-f73d2b71.js → BMI_BOYS.zscore.weekly-d90db238.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-01c61ecd.js → BMI_BOYS.zscore.yearly-bd2e3ea3.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-c3d7d7f8.js → BMI_GIRLS.percentile.monthly-ee42eba5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-7205fa1a.js → BMI_GIRLS.percentile.weekly-6dcc5955.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-ae0cd197.js → BMI_GIRLS.percentile.yearly-51b6cd94.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-7214c27b.js → BMI_GIRLS.zscore.monthly-f2efb36a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-288a4ba7.js → BMI_GIRLS.zscore.weekly-b9cd04f2.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-18661786.js → BMI_GIRLS.zscore.yearly-96557ed1.js} +0 -0
- /package/build/esm/{ChevronDown-a6e8b610.js → ChevronDown-98c00d74.js} +0 -0
- /package/build/esm/{Close-a0476ac6.js → Close-25e39b2e.js} +0 -0
- /package/build/esm/{Google-214ea5c6.js → Google-ef8ee611.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-950ddff5.js → HEAD CIRCUM_BOYS.percentile.monthly-97e23f19.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-5a8414f1.js → HEAD CIRCUM_BOYS.percentile.weekly-2c6ade2a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-f20333ef.js → HEAD CIRCUM_BOYS.percentile.yearly-bfee5f18.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-24ec5e31.js → HEAD CIRCUM_BOYS.zscore.monthly-d28575a0.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-3c448d7b.js → HEAD CIRCUM_BOYS.zscore.weekly-fe15548b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-a4f8c4ae.js → HEAD CIRCUM_BOYS.zscore.yearly-4796e4e8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-241e1749.js → HEAD CIRCUM_GIRLS.percentile.monthly-16442772.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-f62cd19f.js → HEAD CIRCUM_GIRLS.percentile.weekly-7574994a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-f68334c2.js → HEAD CIRCUM_GIRLS.percentile.yearly-89613877.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-32fff8f6.js → HEAD CIRCUM_GIRLS.zscore.monthly-f83ef1ed.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-c87da322.js → HEAD CIRCUM_GIRLS.zscore.weekly-09a9ef26.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-450f7d81.js → HEAD CIRCUM_GIRLS.zscore.yearly-09635de6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-7d1b9b71.js → HEIGHT_BOYS.percentile.monthly-e785e410.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-63533871.js → HEIGHT_BOYS.percentile.weekly-9e6e82a5.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-4ba9f266.js → HEIGHT_BOYS.percentile.yearly-67daaa41.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-a00461a4.js → HEIGHT_BOYS.zscore.monthly-0ebae9d2.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-7c797a5c.js → HEIGHT_BOYS.zscore.weekly-0c84cfa4.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-b4fdab84.js → HEIGHT_BOYS.zscore.yearly-55683e8a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-fb13c658.js → HEIGHT_GIRLS.percentile.monthly-ae5fb949.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-144b9d34.js → HEIGHT_GIRLS.percentile.weekly-c8cd5498.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-9004a371.js → HEIGHT_GIRLS.percentile.yearly-012a47d6.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-ce0c2d0d.js → HEIGHT_GIRLS.zscore.monthly-e0a672b8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-f7a23cc0.js → HEIGHT_GIRLS.zscore.weekly-c5ba509b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-402e53a7.js → HEIGHT_GIRLS.zscore.yearly-19dbd1b9.js} +0 -0
- /package/build/esm/{Locale-d618b5e7.js → Locale-11dbaf70.js} +0 -0
- /package/build/esm/{Visible-92f55184.js → Visible-4173e721.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-40dcde7e.js → WEIGHT_BOYS.percentile.monthly-293ef398.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-40b9c5ca.js → WEIGHT_BOYS.percentile.weekly-7dbef437.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-fd6f5565.js → WEIGHT_BOYS.percentile.yearly-1d506670.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-25fd81aa.js → WEIGHT_BOYS.zscore.monthly-0088982f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-9d102c37.js → WEIGHT_BOYS.zscore.weekly-56e3ca19.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-499ab24d.js → WEIGHT_BOYS.zscore.yearly-a55dcc9d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-2bdfef68.js → WEIGHT_GIRLS.percentile.monthly-97bb48e5.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-c5cc7329.js → WEIGHT_GIRLS.percentile.weekly-ee1db769.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-07a9e0e9.js → WEIGHT_GIRLS.percentile.yearly-e20fd74c.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-3fc3894e.js → WEIGHT_GIRLS.zscore.monthly-5248957d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-2b1635b8.js → WEIGHT_GIRLS.zscore.weekly-75a2a927.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-f9bb4b4f.js → WEIGHT_GIRLS.zscore.yearly-0bbd2280.js} +0 -0
- /package/build/esm/{animation-3f7c66f6.js → animation-e9e29680.js} +0 -0
- /package/build/esm/{constants-560c324e.js → constants-49aaec45.js} +0 -0
- /package/build/esm/{constants-302c0ca6.js → constants-95131dca.js} +0 -0
- /package/build/esm/{constants-40486852.js → constants-986e9e22.js} +0 -0
- /package/build/esm/{dataTransform-77ed89f7.js → dataTransform-4d1e8037.js} +0 -0
- /package/build/esm/{index-13aa83db.js → index-2463b156.js} +0 -0
- /package/build/esm/{index-8edf8a1f.js → index-2f306d85.js} +0 -0
- /package/build/esm/{index-a5fb6b9d.js → index-38456a33.js} +0 -0
- /package/build/esm/{index-d8280f7c.js → index-44c89feb.js} +0 -0
- /package/build/esm/{index-73d64804.js → index-6b478c68.js} +0 -0
- /package/build/esm/{index-7e0a7c9d.js → index-78413c0c.js} +0 -0
- /package/build/esm/{index-741415d4.js → index-938356cb.js} +0 -0
- /package/build/esm/{index-cd56d613.js → index-98afb88a.js} +0 -0
- /package/build/esm/{index.styles-38de5370.js → index.styles-957894a9.js} +0 -0
- /package/build/esm/{localizeNumberFormat-7fa3c5b4.js → localizeNumberFormat-a28dc6e1.js} +0 -0
- /package/build/esm/{normalizeLink-9f742197.js → normalizeLink-ea55309e.js} +0 -0
- /package/build/esm/{number-3eb5ccee.js → number-b92a074c.js} +0 -0
- /package/build/esm/{paths-78d57f1a.js → paths-1e5f9f34.js} +0 -0
- /package/build/esm/{shared-8573abd2.js → shared-d57c70b8.js} +0 -0
- /package/build/esm/{text-d060a52a.js → text-a592e4ae.js} +0 -0
- /package/build/esm/{translationsContext-59aedc1c.js → translationsContext-c729899a.js} +0 -0
- /package/build/esm/{tslib.es6-7dde3624.js → tslib.es6-973fb363.js} +0 -0
- /package/build/esm/{types-1861bf5c.js → types-8a7f413a.js} +0 -0
- /package/build/esm/{useIsInit-a112fa64.js → useIsInit-313d337a.js} +0 -0
- /package/build/esm/{useOutsideClick-5a1665b5.js → useOutsideClick-8d3edd19.js} +0 -0
- /package/build/esm/{useScrollbarSize-4997ed64.js → useScrollbarSize-e6daae39.js} +0 -0
- /package/build/esm/{useUniqueId-b8f65ae3.js → useUniqueId-ad30e709.js} +0 -0
- /package/build/esm/{utils-f1e2c068.js → utils-06a90493.js} +0 -0
- /package/build/{index-ca8f34e3.js → index-245d6fd3.js} +0 -0
- /package/build/{index-34f4c1bb.js → index-288cb138.js} +0 -0
- /package/build/{index-4edee103.js → index-31dd9f6c.js} +0 -0
- /package/build/{index-93c2b3a7.js → index-6dd5b7a5.js} +0 -0
- /package/build/{index-c895625b.js → index-7e6aa6d3.js} +0 -0
- /package/build/{index-8205ddec.js → index-8c514b5a.js} +0 -0
- /package/build/{index-bdefa0a8.js → index-bf66f2e8.js} +0 -0
- /package/build/{index-d04fadf0.js → index-f273f473.js} +0 -0
- /package/build/{index.styles-f1b2d7e0.js → index.styles-f203e1a2.js} +0 -0
- /package/build/{localizeNumberFormat-00691834.js → localizeNumberFormat-5bc09765.js} +0 -0
- /package/build/{normalizeLink-88ce5b23.js → normalizeLink-0e9fec08.js} +0 -0
- /package/build/{number-0f7f6cc4.js → number-d07d6540.js} +0 -0
- /package/build/{paths-a9405e74.js → paths-8ea4c695.js} +0 -0
- /package/build/{shared-65a2395d.js → shared-5d1ce612.js} +0 -0
- /package/build/{text-45861132.js → text-69b6c175.js} +0 -0
- /package/build/{translationsContext-076b6c70.js → translationsContext-86f8978d.js} +0 -0
- /package/build/{tslib.es6-754c0919.js → tslib.es6-b12343bd.js} +0 -0
- /package/build/{types-4bf19ce8.js → types-acaab592.js} +0 -0
- /package/build/{useIsInit-659732fd.js → useIsInit-783e8c1b.js} +0 -0
- /package/build/{useOutsideClick-955d44e8.js → useOutsideClick-f655cf5f.js} +0 -0
- /package/build/{useScrollbarSize-a357eebb.js → useScrollbarSize-ea624087.js} +0 -0
- /package/build/{useUniqueId-a3f04b02.js → useUniqueId-0fb4be92.js} +0 -0
- /package/build/{utils-46fea36f.js → utils-f8b481d2.js} +0 -0
package/build/esm/lead.js
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext,
|
|
3
|
-
import { createStyles, Box, Button as Button$1, Input as Input$1,
|
|
1
|
+
import { _ as __rest, a as __awaiter } from './tslib.es6-973fb363.js';
|
|
2
|
+
import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
|
|
3
|
+
import { createStyles, Box, useMantineTheme, Button as Button$1, Autocomplete, clsx, Input as Input$1, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, Flex, TextInput, NumberInput as NumberInput$1, 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-f5050d07.js';
|
|
8
8
|
import { getCookie, setCookie } from './miscCookieHelper.js';
|
|
9
|
-
import { u as useTranslations } from './index-
|
|
10
|
-
import { T as TranslationsContext } from './translationsContext-
|
|
11
|
-
import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-
|
|
12
|
-
import { T as Text } from './index-
|
|
13
|
-
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-
|
|
14
|
-
import { D as DatePicker } from './index-
|
|
15
|
-
import { B as Button } from './index-
|
|
16
|
-
import './index.styles-
|
|
9
|
+
import { u as useTranslations } from './index-f82ced74.js';
|
|
10
|
+
import { T as TranslationsContext } from './translationsContext-c729899a.js';
|
|
11
|
+
import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-06a90493.js';
|
|
12
|
+
import { T as Text } from './index-96606b7b.js';
|
|
13
|
+
import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-6032d7e1.js';
|
|
14
|
+
import { D as DatePicker } from './index-9d7cc01e.js';
|
|
15
|
+
import { B as Button } from './index-8c6e583f.js';
|
|
16
|
+
import './index.styles-957894a9.js';
|
|
17
17
|
import { useIntersection, useClickOutside } from '@mantine/hooks';
|
|
18
|
-
import './index-
|
|
19
|
-
import {
|
|
20
|
-
import './index-
|
|
21
|
-
import { M as MAPPED_LOCALE } from './utils-
|
|
18
|
+
import './index-ba18ee42.js';
|
|
19
|
+
import { G as GlobalTextStyleNew, C as CustomStylesType } from './text-a592e4ae.js';
|
|
20
|
+
import './index-c9890de4.js';
|
|
21
|
+
import { M as MAPPED_LOCALE } from './utils-ad7e8afc.js';
|
|
22
22
|
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 { t as translationsMap$1 } from './translationsProvider-
|
|
29
|
-
import { L as LOCALE } from './Locale-
|
|
23
|
+
import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-8a5a2683.js';
|
|
24
|
+
import { C as COMMON_DATE_TRANSLATE_KEY } from './index-e120177a.js';
|
|
25
|
+
import './index-98afb88a.js';
|
|
26
|
+
import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-5502d0fc.js';
|
|
27
|
+
import { H as Heading$1 } from './index-46e08088.js';
|
|
28
|
+
import { t as translationsMap$1 } from './translationsProvider-c677cefb.js';
|
|
29
|
+
import { L as LOCALE } from './Locale-11dbaf70.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
35
|
import { css } from '@emotion/react';
|
|
36
|
-
import { T as TogetherComponentGlobalContext } from './utils-
|
|
37
|
-
import { M as MantineProvider } from './index-
|
|
38
|
-
import { i as isVideo } from './index-
|
|
39
|
-
import { u as useScreenSize } from './index-
|
|
36
|
+
import { T as TogetherComponentGlobalContext } from './utils-a3564cac.js';
|
|
37
|
+
import { M as MantineProvider } from './index-5277e388.js';
|
|
38
|
+
import { i as isVideo } from './index-44c89feb.js';
|
|
39
|
+
import { u as useScreenSize } from './index-4a0b263e.js';
|
|
40
40
|
import { motion } from 'framer-motion';
|
|
41
41
|
import { createPortal } from 'react-dom';
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
42
|
+
import { ChevronDown } from '@hhgtech/icons/arrow';
|
|
43
|
+
import { MapPin } from '@hhgtech/icons/core';
|
|
44
|
+
import { I as InputDate } from './InputDate-47595d8d.js';
|
|
45
|
+
import { D as DrawerComponent } from './index-10f57124.js';
|
|
46
|
+
import { C as Close } from './Close-25e39b2e.js';
|
|
45
47
|
import './constantsIsProduction.js';
|
|
46
|
-
import './normalizeLink-
|
|
48
|
+
import './normalizeLink-ea55309e.js';
|
|
47
49
|
import '@hhgtech/icons/other';
|
|
48
50
|
import '@mantine/carousel';
|
|
49
51
|
import 'classnames';
|
|
50
|
-
import './useUniqueId-
|
|
52
|
+
import './useUniqueId-ad30e709.js';
|
|
51
53
|
import './constantsSite.js';
|
|
52
|
-
import '
|
|
53
|
-
import './shared-8573abd2.js';
|
|
54
|
+
import './shared-d57c70b8.js';
|
|
54
55
|
import '@mantine/notifications';
|
|
55
56
|
import 'date-fns/locale';
|
|
56
57
|
import './constantsRiskScreener.js';
|
|
@@ -66,11 +67,11 @@ import './i18n-values/vi-VN.js';
|
|
|
66
67
|
import './i18n-values/vi-VN_MB.js';
|
|
67
68
|
import './i18n-values/zh-SG.js';
|
|
68
69
|
import './i18n-values/zh-TW.js';
|
|
69
|
-
import './index-
|
|
70
|
+
import './index-78413c0c.js';
|
|
70
71
|
import 'slugify';
|
|
71
72
|
import 'string-format';
|
|
72
73
|
import './togetherApiPaths.js';
|
|
73
|
-
import './constants-
|
|
74
|
+
import './constants-95131dca.js';
|
|
74
75
|
import 'vaul';
|
|
75
76
|
|
|
76
77
|
const LeadGenComponentContext = createContext({});
|
|
@@ -123,6 +124,33 @@ const LEADGEN_BLOCK_INPUT = [
|
|
|
123
124
|
LEADGEN_BLOCK.CheckboxBlock,
|
|
124
125
|
LEADGEN_BLOCK.TncBlock,
|
|
125
126
|
];
|
|
127
|
+
const leadGenFieldNamePhone = (listBlockAdded) => {
|
|
128
|
+
return listBlockAdded
|
|
129
|
+
.filter(({ name }) => [
|
|
130
|
+
LEADGEN_BLOCK.PhoneBlock,
|
|
131
|
+
LEADGEN_BLOCK.PhoneOtpBlock,
|
|
132
|
+
LEADGEN_BLOCK.WhatsappOtpBlock,
|
|
133
|
+
LEADGEN_BLOCK.ZaloOtpBlock,
|
|
134
|
+
].includes(name))
|
|
135
|
+
.map(({ data }) => data.value);
|
|
136
|
+
};
|
|
137
|
+
const leadGenFieldRequired = (blocks) => {
|
|
138
|
+
if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
|
|
139
|
+
return [];
|
|
140
|
+
}
|
|
141
|
+
return blocks
|
|
142
|
+
.map(({ data, name, id }) => {
|
|
143
|
+
const { required, value } = data;
|
|
144
|
+
if (name === LEADGEN_BLOCK.TncBlock && id && required) {
|
|
145
|
+
return `TNC-${id}`;
|
|
146
|
+
}
|
|
147
|
+
if (required) {
|
|
148
|
+
return value;
|
|
149
|
+
}
|
|
150
|
+
return;
|
|
151
|
+
})
|
|
152
|
+
.filter(Boolean);
|
|
153
|
+
};
|
|
126
154
|
const SSO_MAP_LEAD = ['name', 'email', 'birthday', 'phone', 'gender'];
|
|
127
155
|
const LEAD_LOCALE_DATA$1 = {
|
|
128
156
|
'vi-VN': {
|
|
@@ -205,33 +233,6 @@ const mappingSSOToLead = (userInfoProps) => {
|
|
|
205
233
|
return;
|
|
206
234
|
}
|
|
207
235
|
};
|
|
208
|
-
const leadGenFieldNamePhone = (listBlockAdded) => {
|
|
209
|
-
return listBlockAdded
|
|
210
|
-
.filter(({ name }) => [
|
|
211
|
-
LEADGEN_BLOCK.PhoneBlock,
|
|
212
|
-
LEADGEN_BLOCK.PhoneOtpBlock,
|
|
213
|
-
LEADGEN_BLOCK.WhatsappOtpBlock,
|
|
214
|
-
LEADGEN_BLOCK.ZaloOtpBlock,
|
|
215
|
-
].includes(name))
|
|
216
|
-
.map(({ data }) => data.value);
|
|
217
|
-
};
|
|
218
|
-
const leadGenFieldRequired = (blocks) => {
|
|
219
|
-
if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
|
|
220
|
-
return [];
|
|
221
|
-
}
|
|
222
|
-
return blocks
|
|
223
|
-
.map(({ data, name, id }) => {
|
|
224
|
-
const { required, value } = data;
|
|
225
|
-
if (name === LEADGEN_BLOCK.TncBlock && id && required) {
|
|
226
|
-
return `TNC-${id}`;
|
|
227
|
-
}
|
|
228
|
-
if (required) {
|
|
229
|
-
return value;
|
|
230
|
-
}
|
|
231
|
-
return;
|
|
232
|
-
})
|
|
233
|
-
.filter(Boolean);
|
|
234
|
-
};
|
|
235
236
|
const formatCampaignDetail = (campaign) => {
|
|
236
237
|
if (!campaign) {
|
|
237
238
|
return {};
|
|
@@ -378,55 +379,6 @@ const formatLeadGenFormValue = (values = {}, blocks) => {
|
|
|
378
379
|
return newValues;
|
|
379
380
|
};
|
|
380
381
|
|
|
381
|
-
const TIMEOUT = 30 * 60 * 1000;
|
|
382
|
-
const WAITING_FIRST_RESP = 'waitingTheFirstResponse';
|
|
383
|
-
const CachedSystem = {
|
|
384
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
385
|
-
cached: {},
|
|
386
|
-
clearCached: (prefix) => {
|
|
387
|
-
console.log(CachedSystem.cached);
|
|
388
|
-
Object.keys(CachedSystem.cached)
|
|
389
|
-
.filter((k) => k.startsWith(prefix))
|
|
390
|
-
.forEach((key) => {
|
|
391
|
-
console.log(key);
|
|
392
|
-
CachedSystem.cached[key] = undefined;
|
|
393
|
-
});
|
|
394
|
-
},
|
|
395
|
-
withCached: (key, fnResponse, timeout = TIMEOUT) => __awaiter(void 0, void 0, void 0, function* () {
|
|
396
|
-
if (CachedSystem.cached[key] === WAITING_FIRST_RESP) {
|
|
397
|
-
return new Promise((resolve) => {
|
|
398
|
-
const startDate = new Date().getTime();
|
|
399
|
-
const intervalId = setInterval(() => {
|
|
400
|
-
const currentDate = new Date().getTime();
|
|
401
|
-
if (currentDate - startDate > 3000) {
|
|
402
|
-
clearInterval(intervalId);
|
|
403
|
-
}
|
|
404
|
-
if (typeof CachedSystem.cached[key] === 'object') {
|
|
405
|
-
resolve(CachedSystem.cached[key]);
|
|
406
|
-
clearInterval(intervalId);
|
|
407
|
-
}
|
|
408
|
-
}, 100);
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
if (typeof CachedSystem.cached[key] === 'object') {
|
|
412
|
-
return CachedSystem.cached[key];
|
|
413
|
-
}
|
|
414
|
-
CachedSystem.cached[key] = 'waitingTheFirstResponse';
|
|
415
|
-
try {
|
|
416
|
-
const result = yield fnResponse();
|
|
417
|
-
CachedSystem.cached[key] = result;
|
|
418
|
-
setTimeout(() => {
|
|
419
|
-
CachedSystem.cached[key] = undefined;
|
|
420
|
-
}, timeout);
|
|
421
|
-
return result;
|
|
422
|
-
}
|
|
423
|
-
catch (err) {
|
|
424
|
-
CachedSystem.cached[key] = undefined;
|
|
425
|
-
return Promise.reject(err);
|
|
426
|
-
}
|
|
427
|
-
}),
|
|
428
|
-
};
|
|
429
|
-
|
|
430
382
|
class Store {
|
|
431
383
|
constructor() {
|
|
432
384
|
this.apiSsoUrl = 'https://staging-id.hellobacsi.com/';
|
|
@@ -436,8 +388,6 @@ class Store {
|
|
|
436
388
|
}
|
|
437
389
|
const leadStore = new Store();
|
|
438
390
|
|
|
439
|
-
const LEADGEN_CACHE_KEY = 'LeadGen_';
|
|
440
|
-
const LEADGEN_CACHE_TIME = 5 * 60 * 1000; // 5 minutes
|
|
441
391
|
const METHOD = {
|
|
442
392
|
GET: 'get',
|
|
443
393
|
POST: 'POST',
|
|
@@ -624,19 +574,7 @@ const trackingSubscription = (data) => {
|
|
|
624
574
|
data,
|
|
625
575
|
});
|
|
626
576
|
};
|
|
627
|
-
function getCampaigns({ url, siteId, apiLeadUrl, }) {
|
|
628
|
-
const ga_client_id = getCookie('_ga') || null;
|
|
629
|
-
const AS_PATH = `${apiLeadUrl || leadStore.apiLeadUrl}api/campaign/${siteId}`;
|
|
630
|
-
return CachedSystem.withCached(LEADGEN_CACHE_KEY + AS_PATH, () => fetch(AS_PATH, {
|
|
631
|
-
method: 'POST',
|
|
632
|
-
headers: { 'Content-Type': 'application/json' },
|
|
633
|
-
body: JSON.stringify({ url, ga_client_id }),
|
|
634
|
-
})
|
|
635
|
-
.then((res) => res.json())
|
|
636
|
-
.then(({ _data }) => (_data === null || _data === void 0 ? void 0 : _data.campaigns) || []), LEADGEN_CACHE_TIME);
|
|
637
|
-
}
|
|
638
577
|
const Service = {
|
|
639
|
-
getCampaigns,
|
|
640
578
|
campaignGetById,
|
|
641
579
|
getCampaignByCode,
|
|
642
580
|
getSubscriptionBoxInfo,
|
|
@@ -1689,6 +1627,12 @@ const getTranslations = (locale) => {
|
|
|
1689
1627
|
return translationsMap['en-PH'];
|
|
1690
1628
|
};
|
|
1691
1629
|
|
|
1630
|
+
const LeadGenTranslationProvider = (props) => {
|
|
1631
|
+
const { locale, children } = props;
|
|
1632
|
+
const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
|
|
1633
|
+
return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
|
|
1634
|
+
};
|
|
1635
|
+
|
|
1692
1636
|
// import mockLeadData from './mockLeadData'
|
|
1693
1637
|
const listCampaignScheduled = [];
|
|
1694
1638
|
const listCampaignScheduledToActivated = [];
|
|
@@ -1864,167 +1808,167 @@ function clearPassiveEvent() {
|
|
|
1864
1808
|
LEAD_SCROLL_EVENT = null;
|
|
1865
1809
|
}
|
|
1866
1810
|
}
|
|
1867
|
-
function getCurrentCampaign({ campaigns = [], leadDomain, leadCurrentUrl, }) {
|
|
1868
|
-
if (!getCookie('hhg-id')) {
|
|
1869
|
-
setCookie('hhg-id', v1(), { domain: `.${leadDomain}`, path: '/' });
|
|
1870
|
-
LeadLog('😍 Set HHG ID cookie');
|
|
1871
|
-
}
|
|
1872
|
-
// TODO: HP-534 Filter desktop
|
|
1873
|
-
let campaignsDevice = [];
|
|
1874
|
-
if (isMobile()) {
|
|
1875
|
-
campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
|
|
1876
|
-
}
|
|
1877
|
-
else {
|
|
1878
|
-
campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
|
|
1879
|
-
}
|
|
1880
|
-
LeadLog(`👓 campaignsDevice`, campaignsDevice);
|
|
1881
|
-
LeadLog('--listCampaignScheduled', listCampaignScheduled);
|
|
1882
|
-
LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
|
|
1883
|
-
LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
|
|
1884
|
-
LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
|
|
1885
|
-
LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
|
|
1886
|
-
LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
|
|
1887
|
-
// Check links
|
|
1888
|
-
let listLinksObj = campaignsDevice
|
|
1889
|
-
.map((i, index) => i.targets
|
|
1890
|
-
.filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
|
|
1891
|
-
.map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
|
|
1892
|
-
.flat(1) || [];
|
|
1893
|
-
// Check list link match current href
|
|
1894
|
-
listLinksObj = listLinksObj.filter((i) => {
|
|
1895
|
-
var _a;
|
|
1896
|
-
const target = new URL(String(i.target).toLowerCase());
|
|
1897
|
-
if (i.option == 'exact_match')
|
|
1898
|
-
// FOR TEST LOCAL:
|
|
1899
|
-
// return Boolean(location.pathname === target.pathname)
|
|
1900
|
-
return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
|
|
1901
|
-
if (i.option == 'start_with') {
|
|
1902
|
-
// FOR TEST LOCAL:
|
|
1903
|
-
// if (location.pathname.includes(target.pathname)) {
|
|
1904
|
-
if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
|
|
1905
|
-
const listExcluding = i.sub_target
|
|
1906
|
-
.filter((i) => i.option == 'excluding')
|
|
1907
|
-
.map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
|
|
1908
|
-
return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
|
|
1909
|
-
}
|
|
1910
|
-
else {
|
|
1911
|
-
return false;
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1914
|
-
});
|
|
1915
|
-
// Check tags
|
|
1916
|
-
const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
|
|
1917
|
-
const listTags = listMetaTag.map((i) => i.content);
|
|
1918
|
-
let listCampaignHasTag = [];
|
|
1919
|
-
let listTagsObj = [];
|
|
1920
|
-
if (listTags && listTags.length) {
|
|
1921
|
-
listCampaignHasTag = campaignsDevice
|
|
1922
|
-
.map((i, index) => i.targets
|
|
1923
|
-
.filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
|
|
1924
|
-
.map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
|
|
1925
|
-
.flat(1);
|
|
1926
|
-
listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
|
|
1927
|
-
}
|
|
1928
|
-
const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
|
|
1929
|
-
const cookieKeys = document.cookie.split('; ').map((i) => i.split('=')[0]);
|
|
1930
|
-
const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
|
|
1931
|
-
LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
|
|
1932
|
-
const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
|
|
1933
|
-
LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
|
|
1934
|
-
const listCampaignSubmitedClosed = [
|
|
1935
|
-
...listCampaignCodeSubmited,
|
|
1936
|
-
...listCampaignCodeClosed,
|
|
1937
|
-
];
|
|
1938
|
-
const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
|
|
1939
|
-
const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
|
|
1940
|
-
return !hasSubmited;
|
|
1941
|
-
});
|
|
1942
|
-
const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
|
|
1943
|
-
// .sort(
|
|
1944
|
-
// (a, b) =>
|
|
1945
|
-
// (listCampaignValid[a.campaignIndex]?.score || 0) -
|
|
1946
|
-
// (listCampaignValid[b.campaignIndex]?.score || 0),
|
|
1947
|
-
// )
|
|
1948
|
-
LeadLog('--listCampaignValid : ', listCampaignValid);
|
|
1949
|
-
if (listCampaignValid && listCampaignValid.length) {
|
|
1950
|
-
const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
|
|
1951
|
-
return CAMPAIGN_SHOW;
|
|
1952
|
-
}
|
|
1953
|
-
else {
|
|
1954
|
-
LeadLog('🚧 No lead campaigns on current URL, tags');
|
|
1955
|
-
return null;
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
function addEventShowCurrentCampaign({ campaign: CAMPAIGN_SHOW, onShowPopup, }) {
|
|
1959
|
-
var _a, _b;
|
|
1960
|
-
LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
|
|
1961
|
-
const { rules } = CAMPAIGN_SHOW;
|
|
1962
|
-
// CHECK RULE TRIGGER POPUP
|
|
1963
|
-
const timeoutRule = Number((_a = rules.find((i) => i.rule == 'time')) === null || _a === void 0 ? void 0 : _a.value);
|
|
1964
|
-
LeadLog(`timeoutRule`, timeoutRule);
|
|
1965
|
-
const scrollRule = Number((_b = rules.find((i) => i.rule == 'scroll')) === null || _b === void 0 ? void 0 : _b.value);
|
|
1966
|
-
LeadLog(`scrollRule`, scrollRule);
|
|
1967
|
-
let impressionAction = 'TIME';
|
|
1968
|
-
if (Number.isInteger(timeoutRule)) {
|
|
1969
|
-
impressionAction = 'TIME';
|
|
1970
|
-
LeadLog('✨ SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
|
|
1971
|
-
timeoutRef = setTimeout(() => {
|
|
1972
|
-
onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
|
|
1973
|
-
}, timeoutRule * 1000);
|
|
1974
|
-
return { campaign: CAMPAIGN_SHOW, action: impressionAction };
|
|
1975
|
-
}
|
|
1976
|
-
if (Number.isInteger(scrollRule)) {
|
|
1977
|
-
impressionAction = 'SCROLL';
|
|
1978
|
-
LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
|
|
1979
|
-
const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
|
|
1980
|
-
document.querySelector('body');
|
|
1981
|
-
const pct = $p.getBoundingClientRect().top;
|
|
1982
|
-
const pb = $p.offsetHeight;
|
|
1983
|
-
LeadLog(`👓 Element check scroll: `, $p);
|
|
1984
|
-
LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
|
|
1985
|
-
const wt = window.pageYOffset || document.documentElement.scrollTop;
|
|
1986
|
-
let percent = 0;
|
|
1987
|
-
if (wt >= pct) {
|
|
1988
|
-
percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
|
|
1989
|
-
}
|
|
1990
|
-
LeadLog('---Scroll', percent, scrollRule);
|
|
1991
|
-
// TODO: CHECK FOOTER HEIGHT
|
|
1992
|
-
if (percent >= scrollRule) {
|
|
1993
|
-
window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
|
|
1994
|
-
onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
|
|
1995
|
-
}
|
|
1996
|
-
};
|
|
1997
|
-
window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
|
|
1998
|
-
passive: true,
|
|
1999
|
-
});
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
1811
|
function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
|
|
2003
1812
|
// clear previous passive event, check for new condition
|
|
2004
1813
|
clearPassiveEvent();
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
1814
|
+
const leadCurrentUrl = DEBUG_URL ||
|
|
1815
|
+
('https://' +
|
|
1816
|
+
location.hostname +
|
|
1817
|
+
location.pathname +
|
|
1818
|
+
location.search).toLowerCase();
|
|
1819
|
+
fetch(leadApi + 'api/campaign/' + leadSiteId, {
|
|
1820
|
+
method: 'POST',
|
|
1821
|
+
headers: {
|
|
1822
|
+
'Content-Type': 'application/json',
|
|
1823
|
+
},
|
|
1824
|
+
body: JSON.stringify({
|
|
1825
|
+
url: leadCurrentUrl,
|
|
1826
|
+
ga_client_id: getCookie('_ga') || null,
|
|
1827
|
+
}),
|
|
2014
1828
|
})
|
|
2015
|
-
.then((
|
|
2016
|
-
|
|
1829
|
+
.then((response) => {
|
|
1830
|
+
return response.json();
|
|
1831
|
+
// return mockLeadData || response.json()
|
|
1832
|
+
})
|
|
1833
|
+
.then((data) => {
|
|
1834
|
+
var _a, _b, _c, _d;
|
|
1835
|
+
LeadLog('List campagin: ', data);
|
|
2017
1836
|
LEAD_RESET_VAR();
|
|
2018
|
-
|
|
2019
|
-
.filter(filterFnCampaign)
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
1837
|
+
if (data._status == 1) {
|
|
1838
|
+
const campaigns = (((_b = (_a = data._data) === null || _a === void 0 ? void 0 : _a.campaigns) === null || _b === void 0 ? void 0 : _b.filter(filterFnCampaign)) || []).filter(fillterApprearanceTimeCampaign);
|
|
1839
|
+
if (!getCookie('hhg-id')) {
|
|
1840
|
+
setCookie('hhg-id', v1(), {
|
|
1841
|
+
domain: '.' + leadDomain,
|
|
1842
|
+
path: '/',
|
|
1843
|
+
});
|
|
1844
|
+
LeadLog('😍 Set HHG ID cookie');
|
|
1845
|
+
}
|
|
1846
|
+
// getCookie('hhg-id')
|
|
1847
|
+
// TODO: HP-534 Filter desktop
|
|
1848
|
+
let campaignsDevice = [];
|
|
1849
|
+
if (isMobile()) {
|
|
1850
|
+
campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
|
|
1851
|
+
}
|
|
1852
|
+
else {
|
|
1853
|
+
campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
|
|
1854
|
+
}
|
|
1855
|
+
LeadLog(`👓 campaignsDevice`, campaignsDevice);
|
|
1856
|
+
LeadLog('--listCampaignScheduled', listCampaignScheduled);
|
|
1857
|
+
LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
|
|
1858
|
+
LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
|
|
1859
|
+
LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
|
|
1860
|
+
LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
|
|
1861
|
+
LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
|
|
1862
|
+
// Check links
|
|
1863
|
+
let listLinksObj = campaignsDevice
|
|
1864
|
+
.map((i, index) => i.targets
|
|
1865
|
+
.filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
|
|
1866
|
+
.map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
|
|
1867
|
+
.flat(1);
|
|
1868
|
+
// Check list link match current href
|
|
1869
|
+
listLinksObj = listLinksObj.filter((i) => {
|
|
1870
|
+
var _a;
|
|
1871
|
+
const target = new URL(String(i.target).toLowerCase());
|
|
1872
|
+
if (i.option == 'exact_match')
|
|
1873
|
+
// FOR TEST LOCAL:
|
|
1874
|
+
// return Boolean(location.pathname === target.pathname)
|
|
1875
|
+
return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
|
|
1876
|
+
if (i.option == 'start_with') {
|
|
1877
|
+
// FOR TEST LOCAL:
|
|
1878
|
+
// if (location.pathname.includes(target.pathname)) {
|
|
1879
|
+
if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
|
|
1880
|
+
const listExcluding = i.sub_target
|
|
1881
|
+
.filter((i) => i.option == 'excluding')
|
|
1882
|
+
.map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
|
|
1883
|
+
return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
|
|
1884
|
+
}
|
|
1885
|
+
else {
|
|
1886
|
+
return false;
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
});
|
|
1890
|
+
// Check tags
|
|
1891
|
+
const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
|
|
1892
|
+
const listTags = listMetaTag.map((i) => i.content);
|
|
1893
|
+
let listCampaignHasTag = [];
|
|
1894
|
+
let listTagsObj = [];
|
|
1895
|
+
if (listTags && listTags.length) {
|
|
1896
|
+
listCampaignHasTag = campaignsDevice
|
|
1897
|
+
.map((i, index) => i.targets
|
|
1898
|
+
.filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
|
|
1899
|
+
.map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
|
|
1900
|
+
.flat(1);
|
|
1901
|
+
listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
|
|
1902
|
+
}
|
|
1903
|
+
const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
|
|
1904
|
+
const cookieKeys = document.cookie
|
|
1905
|
+
.split('; ')
|
|
1906
|
+
.map((i) => i.split('=')[0]);
|
|
1907
|
+
const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
|
|
1908
|
+
LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
|
|
1909
|
+
const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
|
|
1910
|
+
LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
|
|
1911
|
+
const listCampaignSubmitedClosed = [
|
|
1912
|
+
...listCampaignCodeSubmited,
|
|
1913
|
+
...listCampaignCodeClosed,
|
|
1914
|
+
];
|
|
1915
|
+
const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
|
|
1916
|
+
const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
|
|
1917
|
+
return !hasSubmited;
|
|
1918
|
+
});
|
|
1919
|
+
const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
|
|
1920
|
+
// .sort(
|
|
1921
|
+
// (a, b) =>
|
|
1922
|
+
// (listCampaignValid[a.campaignIndex]?.score || 0) -
|
|
1923
|
+
// (listCampaignValid[b.campaignIndex]?.score || 0),
|
|
1924
|
+
// )
|
|
1925
|
+
LeadLog('--listCampaignValid : ', listCampaignValid);
|
|
1926
|
+
if (listCampaignValid && listCampaignValid.length) {
|
|
1927
|
+
const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
|
|
1928
|
+
LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
|
|
1929
|
+
const { rules } = CAMPAIGN_SHOW;
|
|
1930
|
+
// CHECK RULE TRIGGER POPUP
|
|
1931
|
+
const timeoutRule = Number((_c = rules.find((i) => i.rule == 'time')) === null || _c === void 0 ? void 0 : _c.value);
|
|
1932
|
+
LeadLog(`timeoutRule`, timeoutRule);
|
|
1933
|
+
const scrollRule = Number((_d = rules.find((i) => i.rule == 'scroll')) === null || _d === void 0 ? void 0 : _d.value);
|
|
1934
|
+
LeadLog(`scrollRule`, scrollRule);
|
|
1935
|
+
let impressionAction = 'TIME';
|
|
1936
|
+
if (Number.isInteger(timeoutRule)) {
|
|
1937
|
+
impressionAction = 'TIME';
|
|
1938
|
+
LeadLog('✨ SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
|
|
1939
|
+
timeoutRef = setTimeout(() => {
|
|
1940
|
+
onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
|
|
1941
|
+
}, timeoutRule * 1000);
|
|
1942
|
+
}
|
|
1943
|
+
if (Number.isInteger(scrollRule)) {
|
|
1944
|
+
impressionAction = 'SCROLL';
|
|
1945
|
+
LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
|
|
1946
|
+
const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
|
|
1947
|
+
document.querySelector('body');
|
|
1948
|
+
const pct = $p.getBoundingClientRect().top;
|
|
1949
|
+
const pb = $p.offsetHeight;
|
|
1950
|
+
LeadLog(`👓 Element check scroll: `, $p);
|
|
1951
|
+
LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
|
|
1952
|
+
const wt = window.pageYOffset || document.documentElement.scrollTop;
|
|
1953
|
+
let percent = 0;
|
|
1954
|
+
if (wt >= pct) {
|
|
1955
|
+
percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
|
|
1956
|
+
}
|
|
1957
|
+
LeadLog('---Scroll', percent, scrollRule);
|
|
1958
|
+
// TODO: CHECK FOOTER HEIGHT
|
|
1959
|
+
if (percent >= scrollRule) {
|
|
1960
|
+
window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
|
|
1961
|
+
onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
|
|
1962
|
+
}
|
|
1963
|
+
};
|
|
1964
|
+
window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
|
|
1965
|
+
passive: true,
|
|
1966
|
+
});
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
else {
|
|
1970
|
+
LeadLog('🚧 No lead campaigns on current URL, tags');
|
|
1971
|
+
}
|
|
2028
1972
|
}
|
|
2029
1973
|
})
|
|
2030
1974
|
.catch((err) => {
|
|
@@ -2041,149 +1985,147 @@ const LeadLog = (...params) => {
|
|
|
2041
1985
|
}
|
|
2042
1986
|
};
|
|
2043
1987
|
|
|
2044
|
-
const LeadGenInlineWithoutMemo = (props) => {
|
|
2045
|
-
const [campaign, setCampaign] = useState();
|
|
2046
|
-
const { forceCampaign, apiUrl, apiLeadUrl, siteId, siteDomain, DEBUG_URL } = props;
|
|
2047
|
-
useEffect(() => {
|
|
2048
|
-
if (forceCampaign) {
|
|
2049
|
-
setCampaign(forceCampaign);
|
|
2050
|
-
return;
|
|
2051
|
-
}
|
|
2052
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
2053
|
-
const campaign = yield leadGenInlineGetCampaign({
|
|
2054
|
-
siteId,
|
|
2055
|
-
siteDomain,
|
|
2056
|
-
apiLeadUrl: apiUrl || apiLeadUrl || '',
|
|
2057
|
-
url: DEBUG_URL,
|
|
2058
|
-
});
|
|
2059
|
-
if (campaign) {
|
|
2060
|
-
setCampaign(campaign);
|
|
2061
|
-
}
|
|
2062
|
-
}))();
|
|
2063
|
-
}, [forceCampaign, DEBUG_URL, apiUrl, apiLeadUrl, siteId, siteDomain]);
|
|
2064
|
-
if (!campaign || !(campaign === null || campaign === void 0 ? void 0 : campaign.id)) {
|
|
2065
|
-
return null;
|
|
2066
|
-
}
|
|
2067
|
-
return (React__default.createElement(LeadGen, Object.assign({}, props, { forceCampaign: campaign, apiUrl: apiUrl || apiLeadUrl, flatComponent: true })));
|
|
2068
|
-
};
|
|
2069
|
-
const LeadGenInline = memo(LeadGenInlineWithoutMemo);
|
|
2070
|
-
function leadGenInlineGetCampaign(props) {
|
|
2071
|
-
var _a;
|
|
2072
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
2073
|
-
const { url, apiLeadUrl, siteId, siteDomain } = props;
|
|
2074
|
-
const campaigns = yield Service.getCampaigns({ url, apiLeadUrl, siteId });
|
|
2075
|
-
const campaignsInline = (_a = (campaigns || [])) === null || _a === void 0 ? void 0 : _a.filter(({ extra_fields }) => {
|
|
2076
|
-
const { currentLayout } = extra_fields || {};
|
|
2077
|
-
return currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.includes('Inline');
|
|
2078
|
-
});
|
|
2079
|
-
return getCurrentCampaign({
|
|
2080
|
-
campaigns: campaignsInline,
|
|
2081
|
-
leadCurrentUrl: url,
|
|
2082
|
-
leadDomain: siteDomain,
|
|
2083
|
-
});
|
|
2084
|
-
});
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
const LeadGenTranslationProvider = (props) => {
|
|
2088
|
-
const { locale, children } = props;
|
|
2089
|
-
const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
|
|
2090
|
-
return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
|
|
2091
|
-
};
|
|
2092
|
-
|
|
2093
1988
|
const LeadGenContext = createContext({
|
|
2094
|
-
|
|
1989
|
+
submit(value) {
|
|
2095
1990
|
/** Init for FAKING function */
|
|
2096
1991
|
LeadLog('** LeadGen Submit : ', value);
|
|
2097
1992
|
return Promise.reject(value);
|
|
2098
1993
|
},
|
|
2099
|
-
|
|
1994
|
+
submitSubscriptionBox(value) {
|
|
1995
|
+
/** Init for FAKING function */
|
|
1996
|
+
LeadLog('** LeadGen SubmitSubscriptionBox : ', value);
|
|
1997
|
+
return Promise.reject(value);
|
|
1998
|
+
},
|
|
1999
|
+
impression(type) {
|
|
2100
2000
|
/** Init for FAKING function */
|
|
2101
|
-
LeadLog('** LeadGen Impression : ',
|
|
2001
|
+
LeadLog('** LeadGen Impression : ', type);
|
|
2102
2002
|
return Promise.reject();
|
|
2103
2003
|
},
|
|
2004
|
+
/** For Subscription Box */
|
|
2005
|
+
subscriptionIcon: '',
|
|
2006
|
+
subscriptionTitle: '',
|
|
2007
|
+
subscriptionPhoneType: '',
|
|
2104
2008
|
});
|
|
2105
2009
|
const LeadGenContextProvider = (props) => {
|
|
2106
|
-
const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues,
|
|
2010
|
+
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"]);
|
|
2107
2011
|
const { t } = useTranslations();
|
|
2108
|
-
const [
|
|
2109
|
-
const [forceCampaign, setForceCampaign] = useState(() => formatCampaignDetail(forceCampaignProps));
|
|
2012
|
+
const [forceCampaign, setForceCampaign] = useState(forceCampaignProps);
|
|
2110
2013
|
const [subscriptionInfo, setSubscriptionInfo] = useState({
|
|
2111
2014
|
subscriptionIcon: '',
|
|
2112
2015
|
subscriptionTitle: '',
|
|
2113
2016
|
subscriptionType: 'TypeA',
|
|
2114
2017
|
subscriptionPhoneType: '',
|
|
2018
|
+
subcriptionCateId: '',
|
|
2019
|
+
subcriptionCateName: '',
|
|
2115
2020
|
});
|
|
2116
2021
|
const locale = useMemo(() => {
|
|
2117
2022
|
return localeProps || LOCALE['PhilippinesEnglish'];
|
|
2118
2023
|
}, [localeProps]);
|
|
2024
|
+
const { url, campaign_id, cookie_id, ga_client_id, category_list, article_id, article_title, } = useMemo(() => ({
|
|
2025
|
+
url: location.href.toLowerCase() || '',
|
|
2026
|
+
cookie_id: getCookie('hhg-id') || null,
|
|
2027
|
+
ga_client_id: getCookie('_ga'),
|
|
2028
|
+
campaign_id: forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
|
|
2029
|
+
campaign_code: campaignCodeProps || (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code),
|
|
2030
|
+
category_list: categoryList,
|
|
2031
|
+
article_id: articleId,
|
|
2032
|
+
article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
|
|
2033
|
+
}), [
|
|
2034
|
+
campaignCodeProps,
|
|
2035
|
+
articleId,
|
|
2036
|
+
categoryList,
|
|
2037
|
+
forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
|
|
2038
|
+
extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
|
|
2039
|
+
subscriptionInfo === null || subscriptionInfo === void 0 ? void 0 : subscriptionInfo.subcriptionCateName,
|
|
2040
|
+
]);
|
|
2041
|
+
// const fetchCampaign = useCallback(
|
|
2042
|
+
// (campaign_code: string) => {
|
|
2043
|
+
// Service.getCampaignByCode(campaign_code).then((res) => {
|
|
2044
|
+
// const { _data } = res || {}
|
|
2045
|
+
// const { campaigns } = _data || {}
|
|
2046
|
+
// LeadLog('** LeadGen Campaign : ', campaigns)
|
|
2047
|
+
// setForceCampaign(formatCampaignDetail(campaigns))
|
|
2048
|
+
// })
|
|
2049
|
+
// },
|
|
2050
|
+
// [campaignCodeProps],
|
|
2051
|
+
// )
|
|
2119
2052
|
// TODO : Update form for LeadGen
|
|
2120
|
-
const
|
|
2053
|
+
const submit = useCallback((data) => {
|
|
2121
2054
|
return Service.postSubscriptionBoxLead({ data });
|
|
2122
|
-
}, [forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.blocks]);
|
|
2123
|
-
const onImpression = useCallback((value) => {
|
|
2124
|
-
//
|
|
2125
|
-
console.log('** RYAN LeadGenContext.tsx 188 value : ', value);
|
|
2126
|
-
return Promise.resolve('dfdfdf');
|
|
2127
2055
|
}, []);
|
|
2128
2056
|
const submitSubscriptionBox = useCallback((value) => {
|
|
2129
|
-
const data = Object.assign(Object.assign(
|
|
2057
|
+
const data = Object.assign(Object.assign({}, value), {
|
|
2130
2058
|
// campaign_id,
|
|
2131
|
-
site_domain
|
|
2059
|
+
site_domain, url: (value === null || value === void 0 ? void 0 : value.url) || url, cookie_id, ga_client_id: (value === null || value === void 0 ? void 0 : value.ga_client_id) || ga_client_id,
|
|
2060
|
+
// ...extraValues,
|
|
2061
|
+
article_id, category_id: subscriptionInfo.subcriptionCateId, category_name: subscriptionInfo.subcriptionCateName, article_title });
|
|
2132
2062
|
return Service.postSubscriptionBoxLead({ data });
|
|
2133
2063
|
}, [
|
|
2134
2064
|
extraValues,
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2065
|
+
site_domain,
|
|
2066
|
+
campaign_id,
|
|
2067
|
+
article_id,
|
|
2068
|
+
article_title,
|
|
2069
|
+
subscriptionInfo.subcriptionCateId,
|
|
2070
|
+
subscriptionInfo.subcriptionCateName,
|
|
2071
|
+
url,
|
|
2072
|
+
cookie_id,
|
|
2073
|
+
ga_client_id,
|
|
2139
2074
|
]);
|
|
2140
|
-
const
|
|
2075
|
+
const impression = useCallback((type) => {
|
|
2076
|
+
const gaCookie = getCookie('_ga') || null;
|
|
2141
2077
|
const impression = {
|
|
2142
2078
|
subscription_title: subscriptionInfo.subscriptionTitle,
|
|
2143
2079
|
name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || '',
|
|
2144
2080
|
area_code: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '',
|
|
2145
2081
|
phone_number: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) || '',
|
|
2146
|
-
site_domain:
|
|
2082
|
+
site_domain: domainLocales[locale],
|
|
2147
2083
|
url: location.href.toLowerCase(),
|
|
2148
2084
|
cookie_id: getCookie('hhg-id'),
|
|
2149
|
-
ga_client_id:
|
|
2150
|
-
article_title
|
|
2151
|
-
article_id
|
|
2152
|
-
category_id:
|
|
2153
|
-
category_name:
|
|
2085
|
+
ga_client_id: gaCookie,
|
|
2086
|
+
article_title,
|
|
2087
|
+
article_id,
|
|
2088
|
+
category_id: subscriptionInfo.subcriptionCateId,
|
|
2089
|
+
category_name: subscriptionInfo.subcriptionCateName,
|
|
2154
2090
|
type,
|
|
2155
2091
|
};
|
|
2156
2092
|
return Service.trackingSubscription(impression);
|
|
2157
2093
|
}, [
|
|
2158
|
-
|
|
2159
|
-
|
|
2094
|
+
campaign_id,
|
|
2095
|
+
url,
|
|
2096
|
+
article_title,
|
|
2097
|
+
cookie_id,
|
|
2098
|
+
ga_client_id,
|
|
2099
|
+
subscriptionInfo.subcriptionCateId,
|
|
2100
|
+
subscriptionInfo.subcriptionCateName,
|
|
2160
2101
|
subscriptionInfo.subscriptionTitle,
|
|
2161
|
-
|
|
2102
|
+
article_id,
|
|
2162
2103
|
userInfo === null || userInfo === void 0 ? void 0 : userInfo.name,
|
|
2163
2104
|
userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code,
|
|
2164
2105
|
userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
|
|
2165
2106
|
]);
|
|
2166
2107
|
useEffect(() => {
|
|
2167
|
-
/** Force Campaign */
|
|
2168
2108
|
if (forceCampaignProps) {
|
|
2169
2109
|
setForceCampaign(formatCampaignDetail(forceCampaignProps));
|
|
2170
|
-
setRawForceCampaign(forceCampaignProps);
|
|
2171
2110
|
return;
|
|
2172
2111
|
}
|
|
2173
2112
|
/** For Subscription Box */
|
|
2174
|
-
if (
|
|
2113
|
+
if (category_list) {
|
|
2175
2114
|
Service.getSubscriptionBoxInfo({
|
|
2176
|
-
category:
|
|
2177
|
-
site:
|
|
2115
|
+
category: category_list.map((i) => i.termId).join(','),
|
|
2116
|
+
site: site_domain,
|
|
2178
2117
|
slug: location === null || location === void 0 ? void 0 : location.pathname,
|
|
2179
2118
|
}).then((res) => {
|
|
2119
|
+
var _a;
|
|
2180
2120
|
const { _data } = res || {};
|
|
2181
|
-
const { item
|
|
2182
|
-
const { icon, content } = item || {};
|
|
2183
|
-
LeadLog('** LeadGen SubscriptionBox campaign_code : ', campaign_code);
|
|
2121
|
+
const { item = [], btn_type = 'zalo' } = _data || {};
|
|
2122
|
+
const { icon, content, cate_id } = ((_a = item.filter((i) => i.cate_id !== 'default')) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
|
2184
2123
|
LeadLog('** LeadGen SubscriptionBox subscription_icon : ', icon);
|
|
2185
2124
|
LeadLog('** LeadGen SubscriptionBox subscription_title : ', content);
|
|
2186
|
-
setSubscriptionInfo((prev) =>
|
|
2125
|
+
setSubscriptionInfo((prev) => {
|
|
2126
|
+
var _a, _b;
|
|
2127
|
+
return (Object.assign(Object.assign({}, prev), { subscriptionIcon: icon, subscriptionTitle: content, subscriptionPhoneType: btn_type, subcriptionCateId: cate_id, subcriptionCateName: (_b = (_a = category_list.filter((i) => i.termId == cate_id)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name }));
|
|
2128
|
+
});
|
|
2187
2129
|
setForceCampaign(formatCampaignDetail({
|
|
2188
2130
|
id: 6993,
|
|
2189
2131
|
name: '',
|
|
@@ -2307,39 +2249,10 @@ const LeadGenContextProvider = (props) => {
|
|
|
2307
2249
|
});
|
|
2308
2250
|
return;
|
|
2309
2251
|
}
|
|
2310
|
-
if (campaignCodeProps) {
|
|
2311
|
-
|
|
2312
|
-
const { _data } = res || {};
|
|
2313
|
-
const { campaigns } = _data || {};
|
|
2314
|
-
LeadLog('** LeadGen Campaign : ', campaigns);
|
|
2315
|
-
setForceCampaign(formatCampaignDetail(campaigns));
|
|
2316
|
-
setRawForceCampaign(campaigns);
|
|
2317
|
-
});
|
|
2318
|
-
return;
|
|
2319
|
-
}
|
|
2320
|
-
// /** For LeadGen */
|
|
2321
|
-
// if (!leadStore.campaigns?.length) {
|
|
2322
|
-
// checkShowPopup({
|
|
2323
|
-
// leadApi: apiLeadUrl,
|
|
2324
|
-
// leadDomain: siteDomain,
|
|
2325
|
-
// leadSiteId: siteId,
|
|
2326
|
-
// onShowPopup(campaign: any, action: string) {
|
|
2327
|
-
// console.log('** RYAN LeadGenContext.tsx 421 action : ', action)
|
|
2328
|
-
// setForceCampaign(formatCampaignDetail(campaign))
|
|
2329
|
-
// setRawForceCampaign(campaign)
|
|
2330
|
-
// },
|
|
2331
|
-
// DEBUG_URL,
|
|
2332
|
-
// })
|
|
2252
|
+
// if (campaignCodeProps) {
|
|
2253
|
+
// fetchCampaign(campaignCodeProps)
|
|
2333
2254
|
// }
|
|
2334
|
-
}, [
|
|
2335
|
-
forceCampaignProps,
|
|
2336
|
-
campaignCodeProps,
|
|
2337
|
-
categoryId,
|
|
2338
|
-
siteId,
|
|
2339
|
-
siteDomain,
|
|
2340
|
-
apiLeadUrl,
|
|
2341
|
-
DEBUG_URL,
|
|
2342
|
-
]);
|
|
2255
|
+
}, [forceCampaignProps, campaignCodeProps, category_list]);
|
|
2343
2256
|
useEffect(() => {
|
|
2344
2257
|
leadStore.apiSsoUrl = apiSsoUrl;
|
|
2345
2258
|
leadStore.apiLeadUrl = apiLeadUrl;
|
|
@@ -2350,16 +2263,10 @@ const LeadGenContextProvider = (props) => {
|
|
|
2350
2263
|
}
|
|
2351
2264
|
return (React__default.createElement(LeadGenContext.Provider, { value: Object.assign(Object.assign(Object.assign({}, restProps), subscriptionInfo), { userInfo, campaign_code: campaignCodeProps, apiSsoUrl,
|
|
2352
2265
|
apiLeadUrl,
|
|
2353
|
-
apiSubotUrl, locale: localeProps,
|
|
2354
|
-
|
|
2355
|
-
categoryId,
|
|
2356
|
-
siteDomain,
|
|
2357
|
-
forceCampaign,
|
|
2358
|
-
rawForceCampaign,
|
|
2359
|
-
onSubmit,
|
|
2360
|
-
onImpression,
|
|
2266
|
+
apiSubotUrl, locale: localeProps, articleId, categoryId: subscriptionInfo.subcriptionCateId, siteDomain: site_domain, forceCampaign,
|
|
2267
|
+
submit,
|
|
2361
2268
|
submitSubscriptionBox,
|
|
2362
|
-
|
|
2269
|
+
impression }) },
|
|
2363
2270
|
React__default.createElement(LeadGenTranslationProvider, { locale: locale }, children)));
|
|
2364
2271
|
};
|
|
2365
2272
|
const useLeadGenContext = () => {
|
|
@@ -2642,10 +2549,11 @@ const LeadGenThankYou = ({ image, title, description, showButton = false, button
|
|
|
2642
2549
|
const { htmlText: titleText, align: titleAlign } = title;
|
|
2643
2550
|
const { htmlText: descriptionText, align: descriptionAlign } = description;
|
|
2644
2551
|
const { htmlText: buttonText, newtab, url, onClick } = button;
|
|
2552
|
+
const theme = useMantineTheme();
|
|
2645
2553
|
return (React__default.createElement(StyledLeadGenThankYou, { className: className, style: style },
|
|
2646
2554
|
React__default.createElement("img", { src: src, alt: "", className: "leadgen-thankyou_image leadgen-image" }),
|
|
2647
|
-
React__default.createElement(
|
|
2648
|
-
React__default.createElement(
|
|
2555
|
+
React__default.createElement(Text, { size: "h4", weight: "bold", "data-align": titleAlign, variant: "primary" }, titleText),
|
|
2556
|
+
React__default.createElement(Text, { size: "p2", "data-align": descriptionAlign, color: theme.colors.gray[6] }, descriptionText),
|
|
2649
2557
|
!!buttonText && showButton && (React__default.createElement(Button$1, { component: url ? 'a' : 'button', target: newtab ? '_blank' : undefined, href: url, size: "lg", variant: "filled", className: "leadgen-thankyoue_btn leadgen-btn", onClick: onClick }, buttonText))));
|
|
2650
2558
|
};
|
|
2651
2559
|
|
|
@@ -2680,17 +2588,11 @@ const StyledLeadGenSubscriptionBoxHeader = styled.div `
|
|
|
2680
2588
|
flex: 1;
|
|
2681
2589
|
min-width: 0;
|
|
2682
2590
|
color: ${theme.colors.gray600};
|
|
2683
|
-
font-size: 17px;
|
|
2684
|
-
font-weight: 400;
|
|
2685
|
-
line-height: 24px;
|
|
2686
|
-
letter-spacing: -0.4px;
|
|
2687
2591
|
b {
|
|
2688
2592
|
color: #111111;
|
|
2689
2593
|
font-weight: 700;
|
|
2690
2594
|
}
|
|
2691
2595
|
${MediaQueries.mbUp} {
|
|
2692
|
-
font-size: 20px;
|
|
2693
|
-
line-height: 28px;
|
|
2694
2596
|
b {
|
|
2695
2597
|
font-weight: 500;
|
|
2696
2598
|
}
|
|
@@ -2769,13 +2671,12 @@ const StyledLeadGenSubscriptionBox = styled.div `
|
|
|
2769
2671
|
`;
|
|
2770
2672
|
const StyledLeadGenSubscriptionBoxA = styled.div `
|
|
2771
2673
|
.leadgen-form_input {
|
|
2772
|
-
--phone-select:
|
|
2674
|
+
--phone-select: 65px;
|
|
2773
2675
|
.PhoneInput {
|
|
2774
|
-
--phone-select:
|
|
2676
|
+
--phone-select: 65px;
|
|
2775
2677
|
.PhoneInputCountry {
|
|
2776
2678
|
margin-top: 1px;
|
|
2777
2679
|
pointer-events: none;
|
|
2778
|
-
.PhoneInputCountryIconImg,
|
|
2779
2680
|
.PhoneInputArrowContainer {
|
|
2780
2681
|
display: none;
|
|
2781
2682
|
}
|
|
@@ -2784,14 +2685,22 @@ const StyledLeadGenSubscriptionBoxA = styled.div `
|
|
|
2784
2685
|
}
|
|
2785
2686
|
`;
|
|
2786
2687
|
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
const id = idProps || v1() + name;
|
|
2790
|
-
return (React__default.createElement(Input$1.Wrapper, { size: "md", label: label, labelElement: labelElement, labelProps: Object.assign({ htmlFor: id }, labelProps), description: description, descriptionProps: descriptionProps, withAsterisk: withAsterisk, inputMode: inputMode, inputContainer: inputContainer, inputWrapperOrder: inputWrapperOrder, error: error, "data-invalid": !!error, className: className, classNames: classNames, style: style, styles: styles },
|
|
2791
|
-
React__default.createElement("div", { className: "mantine-Input-wrapper" },
|
|
2792
|
-
React__default.createElement(Phone, Object.assign({}, restProps, { id: id, ref: ref, name: name, spellCheck: false, placeholder: placeholder, defaultCountry: defaultCountry, className: "mantine-Input-input", type: "tel", "data-control": "tel" })))));
|
|
2688
|
+
var useTextStyles = createStyles((theme) => {
|
|
2689
|
+
return GlobalTextStyleNew(theme)[CustomStylesType.LEADGEN];
|
|
2793
2690
|
});
|
|
2794
2691
|
|
|
2692
|
+
const ErrorIcon = (_a) => {
|
|
2693
|
+
var { size } = _a, rest = __rest(_a, ["size"]);
|
|
2694
|
+
const props = Object.assign({ width: size, height: size }, rest);
|
|
2695
|
+
return (React__default.createElement("svg", Object.assign({ width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
2696
|
+
React__default.createElement("path", { d: "M5.996 6.513q.163 0 .282-.12a.38.38 0 0 0 .118-.28V3.937q0-.15-.118-.268a.4.4 0 0 0-.282-.119.4.4 0 0 0-.281.12.38.38 0 0 0-.119.28v2.175q0 .15.119.269.12.119.281.119m0 1.862a.43.43 0 0 0 .3-.112.4.4 0 0 0 .125-.313.4.4 0 0 0-.125-.3.4.4 0 0 0-.3-.125.4.4 0 0 0-.3.125.4.4 0 0 0-.125.3.4.4 0 0 0 .125.313.43.43 0 0 0 .3.112m0 2.375a4.6 4.6 0 0 1-1.856-.375 4.8 4.8 0 0 1-1.506-1.012A4.8 4.8 0 0 1 1.62 7.857 4.6 4.6 0 0 1 1.246 6q0-.987.375-1.856t1.013-1.506A4.8 4.8 0 0 1 4.14 1.625a4.6 4.6 0 0 1 1.856-.375q.988 0 1.857.375Q8.72 2 9.359 2.638q.637.637 1.012 1.506T10.747 6t-.375 1.857A4.8 4.8 0 0 1 9.36 9.363a4.8 4.8 0 0 1-1.506 1.012q-.87.375-1.857.375", fill: "#F44D2C" })));
|
|
2697
|
+
};
|
|
2698
|
+
ErrorIcon.defaultProps = {
|
|
2699
|
+
size: 18,
|
|
2700
|
+
color: theme.colors.gray600,
|
|
2701
|
+
activeColor: theme.colors.primaryBase,
|
|
2702
|
+
};
|
|
2703
|
+
|
|
2795
2704
|
const NoData = ({ className, style }) => {
|
|
2796
2705
|
return (React__default.createElement("svg", { width: "64", height: "55", viewBox: "0 0 64 55", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, style: style },
|
|
2797
2706
|
React__default.createElement("path", { d: "M32.6226 54.0001C46.2852 54.0001 57.3652 43.0033 57.3652 29.4239C57.3652 15.8446 46.2852 4.84778 32.6226 4.84778C18.9599 4.84778 7.87988 15.8446 7.87988 29.4239C7.87988 43.0033 18.9599 54.0001 32.6226 54.0001Z", fill: "#E6EAF5" }),
|
|
@@ -2874,13 +2783,12 @@ const StyledLeadGenFormInner = styled.div `
|
|
|
2874
2783
|
}
|
|
2875
2784
|
`;
|
|
2876
2785
|
|
|
2877
|
-
const
|
|
2786
|
+
const TextFieldContext = createContext({});
|
|
2787
|
+
|
|
2788
|
+
const cssInputNotShrink = css `
|
|
2878
2789
|
height: 100% !important;
|
|
2879
2790
|
min-height: calc(var(--container-height, 56px) * 24 / 56);
|
|
2880
|
-
color: ${theme.colors.gray800};
|
|
2881
|
-
font-size: var(--input, 15px);
|
|
2882
2791
|
line-height: calc(var(--container-height, 56px) * 24 / 56);
|
|
2883
|
-
letter-spacing: -0.3px;
|
|
2884
2792
|
border: none !important;
|
|
2885
2793
|
border-radius: 0 !important;
|
|
2886
2794
|
outline: none !important;
|
|
@@ -2893,34 +2801,28 @@ const cssInputNotShrink$1 = css `
|
|
|
2893
2801
|
color: ${theme.colors.gray400};
|
|
2894
2802
|
}
|
|
2895
2803
|
`;
|
|
2896
|
-
const cssInputShrink
|
|
2804
|
+
const cssInputShrink = css `
|
|
2897
2805
|
height: auto !important;
|
|
2898
2806
|
cursor: text;
|
|
2899
2807
|
opacity: 1;
|
|
2900
2808
|
transition: 0.1s ease-in-out all;
|
|
2901
2809
|
`;
|
|
2902
|
-
const cssLabelNotShrink
|
|
2810
|
+
const cssLabelNotShrink = css `
|
|
2903
2811
|
position: absolute;
|
|
2904
2812
|
top: calc(var(--container-height) / 2);
|
|
2905
2813
|
left: var(--space-x, 16px);
|
|
2906
|
-
color: ${theme.colors.gray400};
|
|
2907
|
-
font-size: var(--label-not-shrink, 15px);
|
|
2908
|
-
font-weight: 400;
|
|
2909
|
-
line-height: calc(var(--container-height, 56px) * 18 / 56);
|
|
2910
2814
|
margin: 0;
|
|
2911
2815
|
z-index: 1;
|
|
2912
2816
|
cursor: pointer;
|
|
2913
2817
|
transform: translateY(-50%);
|
|
2914
2818
|
transition: 0.125s ease-in all;
|
|
2915
2819
|
`;
|
|
2916
|
-
const cssLabelShrink
|
|
2917
|
-
|
|
2918
|
-
font-size: var(--label-shrink, 12px);
|
|
2919
|
-
top: calc(var(--container-height) * 7 / 56);
|
|
2820
|
+
const cssLabelShrink = css `
|
|
2821
|
+
top: var(--space-y-shrink, 6px);
|
|
2920
2822
|
transform: none;
|
|
2921
2823
|
transition: 0.125s ease-out all;
|
|
2922
2824
|
`;
|
|
2923
|
-
const cssWrapperInputNotShrink
|
|
2825
|
+
const cssWrapperInputNotShrink = css `
|
|
2924
2826
|
min-height: var(--container-height, 56px);
|
|
2925
2827
|
display: flex;
|
|
2926
2828
|
align-items: flex-end;
|
|
@@ -2944,19 +2846,19 @@ const cssWrapperInputNotShrink$1 = css `
|
|
|
2944
2846
|
border-color: ${theme.colors.gray200};
|
|
2945
2847
|
}
|
|
2946
2848
|
`;
|
|
2947
|
-
const cssWrapperInputShrink
|
|
2849
|
+
const cssWrapperInputShrink = css `
|
|
2948
2850
|
height: auto;
|
|
2949
2851
|
min-height: var(--container-height, 56px);
|
|
2950
2852
|
padding-block: var(--space-y-shrink, 6px);
|
|
2951
2853
|
cursor: text;
|
|
2952
2854
|
pointer-events: auto;
|
|
2953
2855
|
`;
|
|
2954
|
-
const cssInputWrapperError
|
|
2856
|
+
const cssInputWrapperError = css `
|
|
2955
2857
|
color: ${theme.colors.red800};
|
|
2956
2858
|
font-size: 12px;
|
|
2957
2859
|
line-height: 1.5;
|
|
2958
2860
|
`;
|
|
2959
|
-
const StyledTextFieldContainer
|
|
2861
|
+
const StyledTextFieldContainer = styled.div `
|
|
2960
2862
|
--space-x: 16px;
|
|
2961
2863
|
--space-y-not-shrink: 15px;
|
|
2962
2864
|
--space-y-shrink: 6px;
|
|
@@ -2991,11 +2893,11 @@ const StyledTextFieldContainer$1 = styled.div `
|
|
|
2991
2893
|
}
|
|
2992
2894
|
|
|
2993
2895
|
.mantine-InputWrapper-label {
|
|
2994
|
-
${cssLabelNotShrink
|
|
2896
|
+
${cssLabelNotShrink}
|
|
2995
2897
|
}
|
|
2996
2898
|
|
|
2997
2899
|
.mantine-Input-wrapper {
|
|
2998
|
-
${cssWrapperInputNotShrink
|
|
2900
|
+
${cssWrapperInputNotShrink}
|
|
2999
2901
|
|
|
3000
2902
|
+ .mantine-Popover-dropdown[data-position="bottom-start"] {
|
|
3001
2903
|
left: 0 !important;
|
|
@@ -3008,17 +2910,16 @@ const StyledTextFieldContainer$1 = styled.div `
|
|
|
3008
2910
|
}
|
|
3009
2911
|
|
|
3010
2912
|
.mantine-Input-input {
|
|
3011
|
-
${cssInputNotShrink
|
|
2913
|
+
${cssInputNotShrink}
|
|
3012
2914
|
}
|
|
3013
2915
|
|
|
3014
|
-
&.textField_shrink
|
|
3015
|
-
&:focus-within {
|
|
2916
|
+
&.textField_shrink {
|
|
3016
2917
|
.mantine-InputWrapper-label {
|
|
3017
|
-
${cssLabelShrink
|
|
2918
|
+
${cssLabelShrink}
|
|
3018
2919
|
}
|
|
3019
2920
|
|
|
3020
2921
|
.mantine-Input-wrapper {
|
|
3021
|
-
${cssWrapperInputShrink
|
|
2922
|
+
${cssWrapperInputShrink}
|
|
3022
2923
|
&.mantine-Select-wrapper {
|
|
3023
2924
|
.mantine-Select-rightSection {
|
|
3024
2925
|
pointer-events: auto !important;
|
|
@@ -3027,7 +2928,7 @@ const StyledTextFieldContainer$1 = styled.div `
|
|
|
3027
2928
|
}
|
|
3028
2929
|
|
|
3029
2930
|
.mantine-Input-input {
|
|
3030
|
-
${cssInputShrink
|
|
2931
|
+
${cssInputShrink}
|
|
3031
2932
|
}
|
|
3032
2933
|
|
|
3033
2934
|
&:has(.PhoneInput) {
|
|
@@ -3069,6 +2970,7 @@ const StyledTextFieldContainer$1 = styled.div `
|
|
|
3069
2970
|
outline: none !important;
|
|
3070
2971
|
border: none;
|
|
3071
2972
|
box-shadow: none;
|
|
2973
|
+
font-size: var(--input, 15px);
|
|
3072
2974
|
padding: 0 var(--phone-input-space-x, 8px);
|
|
3073
2975
|
opacity: 0;
|
|
3074
2976
|
color: ${theme.colors.gray800} !important;
|
|
@@ -3086,8 +2988,20 @@ const StyledTextFieldContainer$1 = styled.div `
|
|
|
3086
2988
|
);
|
|
3087
2989
|
}
|
|
3088
2990
|
}
|
|
2991
|
+
|
|
2992
|
+
.icon {
|
|
2993
|
+
position: absolute;
|
|
2994
|
+
top: calc(var(--container-height) / 2);
|
|
2995
|
+
right: var(--space-x, 16px);
|
|
2996
|
+
transform: translateY(-50%);
|
|
2997
|
+
transition: 0.125s ease-in all;
|
|
2998
|
+
&.shrink {
|
|
2999
|
+
top: calc(var(--container-height) / 2 - 4px);
|
|
3000
|
+
transform: translateY(0);
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3089
3003
|
`;
|
|
3090
|
-
const StyledChoiceFieldContainer
|
|
3004
|
+
const StyledChoiceFieldContainer = styled.div `
|
|
3091
3005
|
&.leadgen-form_checkbox,
|
|
3092
3006
|
&.leadgen-form_radio {
|
|
3093
3007
|
width: 100%;
|
|
@@ -3150,12 +3064,32 @@ const StyledChoiceFieldContainer$1 = styled.div `
|
|
|
3150
3064
|
}
|
|
3151
3065
|
|
|
3152
3066
|
.mantine-InputWrapper-error {
|
|
3153
|
-
${cssInputWrapperError
|
|
3067
|
+
${cssInputWrapperError}
|
|
3154
3068
|
}
|
|
3069
|
+
`;
|
|
3070
|
+
styled.div `
|
|
3071
|
+
position: absolute;
|
|
3072
|
+
top: calc(var(--container-height) / 2);
|
|
3073
|
+
right: var(--space-x, 16px);
|
|
3155
3074
|
`;
|
|
3156
3075
|
|
|
3157
|
-
const TextField
|
|
3158
|
-
const { shrink: shrinkProps, onChangeShrink,
|
|
3076
|
+
const TextField = (props) => {
|
|
3077
|
+
const { shrink: shrinkProps, onChangeShrink, children, className } = props, restProps = __rest(props, ["shrink", "onChangeShrink", "children", "className"]);
|
|
3078
|
+
const [shrink, setShrink] = useState(shrinkProps);
|
|
3079
|
+
useEffect(() => {
|
|
3080
|
+
setShrink(shrinkProps);
|
|
3081
|
+
}, [shrinkProps]);
|
|
3082
|
+
return (React__default.createElement(TextFieldContext.Provider, Object.assign({ value: {
|
|
3083
|
+
shrinkProps,
|
|
3084
|
+
shrink,
|
|
3085
|
+
setShrink,
|
|
3086
|
+
onChangeShrink,
|
|
3087
|
+
} }, restProps),
|
|
3088
|
+
React__default.createElement(StyledTextFieldContainer, Object.assign({ shrink: shrink, className: clsx(className, 'textField', { textField_shrink: !!shrink }) }, restProps), children)));
|
|
3089
|
+
};
|
|
3090
|
+
const TextFieldControl = (props) => {
|
|
3091
|
+
const { shrink, shrinkProps, onChangeShrink, setShrink } = useContext(TextFieldContext);
|
|
3092
|
+
const { children } = props;
|
|
3159
3093
|
const containerRef = useClickOutside(() => {
|
|
3160
3094
|
if (shrinkProps) {
|
|
3161
3095
|
return;
|
|
@@ -3163,7 +3097,12 @@ const TextField$1 = (props) => {
|
|
|
3163
3097
|
setShrink(false);
|
|
3164
3098
|
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
|
|
3165
3099
|
});
|
|
3166
|
-
const
|
|
3100
|
+
// const inputInside = useMemo(() => {
|
|
3101
|
+
// containerRef.current.querySelectorAll(
|
|
3102
|
+
// 'input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])',
|
|
3103
|
+
// )
|
|
3104
|
+
// }, [containerRef.current])
|
|
3105
|
+
// console.log({ containerRef })
|
|
3167
3106
|
const focusInput = (target) => {
|
|
3168
3107
|
const $textEl = target.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
|
|
3169
3108
|
const $focusEl = $textEl.item($textEl.length - 1);
|
|
@@ -3184,18 +3123,25 @@ const TextField$1 = (props) => {
|
|
|
3184
3123
|
useEffect(() => {
|
|
3185
3124
|
setShrink(shrinkProps);
|
|
3186
3125
|
}, [shrinkProps]);
|
|
3187
|
-
return (React__default.createElement(
|
|
3188
|
-
React__default.createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, children)));
|
|
3126
|
+
return (React__default.createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, typeof children === 'function' ? children(!!shrink) : children));
|
|
3189
3127
|
};
|
|
3190
|
-
const
|
|
3128
|
+
const TextFieldIcon = ({ Icon }) => {
|
|
3129
|
+
const { shrink } = useContext(TextFieldContext);
|
|
3130
|
+
const theme = useMantineTheme();
|
|
3131
|
+
return Icon ? (React__default.createElement(Icon, { className: `icon ${!!shrink ? 'shrink' : ''}`, shrink: shrink, size: 24, color: theme.colors.gray[9] })) : null;
|
|
3132
|
+
};
|
|
3133
|
+
TextField.Control = TextFieldControl;
|
|
3134
|
+
TextField.Icon = TextFieldIcon;
|
|
3135
|
+
const ChoiceField = (props) => {
|
|
3191
3136
|
const { children, className } = props, restProps = __rest(props, ["children", "className"]);
|
|
3192
|
-
return (React__default.createElement(StyledChoiceFieldContainer
|
|
3137
|
+
return (React__default.createElement(StyledChoiceFieldContainer, Object.assign({ className: clsx(className, 'choiceField') }, restProps), children));
|
|
3193
3138
|
};
|
|
3194
3139
|
|
|
3195
3140
|
const LeadGenForm = forwardRef((props, ref) => {
|
|
3196
3141
|
const { locale, blocks, scrollToErrorField = true, form: formProps, rules: validate, initialValues, onFinish, onFinishFailed, className, style, } = props;
|
|
3197
3142
|
const formRef = useRef(null);
|
|
3198
3143
|
const form = formProps || useForm({ initialValues, validate });
|
|
3144
|
+
const { classes } = useTextStyles();
|
|
3199
3145
|
const middlewareFinish = useCallback((values, event) => {
|
|
3200
3146
|
/** Set `touched` all values for validation when submiting */
|
|
3201
3147
|
form.setTouched(blocks.reduce((touched, { data }) => {
|
|
@@ -3251,34 +3197,55 @@ const LeadGenForm = forwardRef((props, ref) => {
|
|
|
3251
3197
|
const reactKey = `${id}-${idx}`;
|
|
3252
3198
|
switch (blockName) {
|
|
3253
3199
|
case LEADGEN_BLOCK.TextBlock: {
|
|
3254
|
-
return (React__default.createElement(TextField
|
|
3255
|
-
React__default.createElement(TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "text", "data-control": "text" }, formInputProps
|
|
3200
|
+
return (React__default.createElement(TextField, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
3201
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "text", "data-control": "text" }, formInputProps, { error: error && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
3202
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
3203
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, error))) }))))));
|
|
3256
3204
|
}
|
|
3257
3205
|
case LEADGEN_BLOCK.NumberBlock: {
|
|
3258
|
-
return (React__default.createElement(TextField
|
|
3259
|
-
React__default.createElement(NumberInput$1, Object.assign({ name: value, spellCheck: false, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "number", "data-control": "number" }, formInputProps
|
|
3206
|
+
return (React__default.createElement(TextField, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
3207
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(NumberInput$1, Object.assign({ name: value, spellCheck: false, withAsterisk: required, label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "number", "data-control": "number" }, formInputProps, { error: error && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
3208
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
3209
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, error))) }))))));
|
|
3260
3210
|
}
|
|
3261
3211
|
case LEADGEN_BLOCK.EmailBlock: {
|
|
3262
|
-
return (React__default.createElement(TextField
|
|
3263
|
-
React__default.createElement(TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, "data-control": "email" }, formInputProps
|
|
3212
|
+
return (React__default.createElement(TextField, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
3213
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, "data-control": "email" }, formInputProps, { error: error && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
3214
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
3215
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, error))) }))))));
|
|
3264
3216
|
}
|
|
3265
3217
|
case LEADGEN_BLOCK.PhoneOtpBlock:
|
|
3266
3218
|
case LEADGEN_BLOCK.WhatsappOtpBlock:
|
|
3267
3219
|
case LEADGEN_BLOCK.ZaloOtpBlock:
|
|
3268
3220
|
case LEADGEN_BLOCK.PhoneBlock: {
|
|
3269
|
-
return (React__default.createElement(TextField
|
|
3270
|
-
|
|
3221
|
+
return (React__default.createElement(TextField, { key: reactKey, shrink: !!value, className: clsx('leadgen-form_input', {
|
|
3222
|
+
'leadgen-form_field_error': !!error,
|
|
3223
|
+
}) },
|
|
3224
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(Input$1.Wrapper, { withAsterisk: required, "data-invalid": !!error, label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), inputWrapperOrder: [
|
|
3225
|
+
'label',
|
|
3226
|
+
'input',
|
|
3227
|
+
'description',
|
|
3228
|
+
'error',
|
|
3229
|
+
], error: error && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
3230
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
3231
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, error))) },
|
|
3232
|
+
React__default.createElement("div", { className: "mantine-Input-wrapper" },
|
|
3233
|
+
React__default.createElement(Phone, Object.assign({ className: `mantine-Input-input ${classes.p2}`, name: name, spellCheck: false, placeholder: " ", defaultCountry: (locale
|
|
3234
|
+
? MAPPED_LOCALE[locale] || 'VN'
|
|
3235
|
+
: 'VN'), type: "text", "data-control": "tel" }, formInputProps))))))));
|
|
3271
3236
|
}
|
|
3272
3237
|
case LEADGEN_BLOCK.LocationBlock: {
|
|
3273
|
-
return (React__default.createElement(TextField
|
|
3274
|
-
React__default.createElement(GoogleLocationBlock, Object.assign({ name: name, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, locale: locale, "data-control": "text" }, formInputProps
|
|
3238
|
+
return (React__default.createElement(TextField, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
3239
|
+
React__default.createElement(GoogleLocationBlock, Object.assign({ name: name, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, locale: locale, "data-control": "text" }, formInputProps, { error: error && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
3240
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
3241
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, error))) }))));
|
|
3275
3242
|
}
|
|
3276
3243
|
case LEADGEN_BLOCK.DateBlock: {
|
|
3277
|
-
return (React__default.createElement(TextField
|
|
3244
|
+
return (React__default.createElement(TextField, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
3278
3245
|
React__default.createElement(DateInput, Object.assign({ locale: (MAPPED_LOCALE === null || MAPPED_LOCALE === void 0 ? void 0 : MAPPED_LOCALE[locale]) || MAPPED_LOCALE['vi-VN'], valueFormat: "DD/MM/YYYY", name: name, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "default", "data-control": "date" }, formInputProps))));
|
|
3279
3246
|
}
|
|
3280
3247
|
case LEADGEN_BLOCK.DropdownBlock:
|
|
3281
|
-
return (React__default.createElement(TextField
|
|
3248
|
+
return (React__default.createElement(TextField, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
3282
3249
|
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown' }),
|
|
3283
3250
|
React__default.createElement(Select$1, Object.assign({ name: name, withAsterisk: required, label: label, placeholder: " ", searchable: true, data: listQuestion.map((l) => ({
|
|
3284
3251
|
value: l.value,
|
|
@@ -3309,7 +3276,7 @@ const LeadGenForm = forwardRef((props, ref) => {
|
|
|
3309
3276
|
const formInputCheckboxProps = form.getInputProps(name, {
|
|
3310
3277
|
type: 'checkbox',
|
|
3311
3278
|
});
|
|
3312
|
-
return (React__default.createElement(ChoiceField
|
|
3279
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
3313
3280
|
isSendMailChimp && (React__default.createElement("div", { style: { display: 'none' }, "data-name": name + '-mailchimp' })),
|
|
3314
3281
|
React__default.createElement(Checkbox$1.Group, Object.assign({ size: "md", withAsterisk: required, label: label, value: value, sx: {
|
|
3315
3282
|
display: 'flex',
|
|
@@ -3321,14 +3288,14 @@ const LeadGenForm = forwardRef((props, ref) => {
|
|
|
3321
3288
|
} }, formInputCheckboxProps), listQuestion.map((l, _idx) => (React__default.createElement(Checkbox$1, { name: name, key: _idx, value: l.value, label: l.placeholder, "data-control": "checkbox" }))))));
|
|
3322
3289
|
}
|
|
3323
3290
|
case LEADGEN_BLOCK.RadioBlock: {
|
|
3324
|
-
return (React__default.createElement(ChoiceField
|
|
3291
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
3325
3292
|
isSendMailChimp && (React__default.createElement("div", { style: { display: 'none' }, "data-name": name + '-mailchimp' })),
|
|
3326
3293
|
React__default.createElement(Radio$1.Group, Object.assign({ size: "md", withAsterisk: required, label: label, value: value, spellCheck: true, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, inputContainer: (children) => {
|
|
3327
3294
|
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
3328
3295
|
} }, formInputProps), listQuestion.map((l, _index) => (React__default.createElement(Radio$1, { name: name, key: _index, value: l.value, label: l.placeholder, "data-control": "radio" }))))));
|
|
3329
3296
|
}
|
|
3330
3297
|
case LEADGEN_BLOCK.TncBlock:
|
|
3331
|
-
return (React__default.createElement(ChoiceField
|
|
3298
|
+
return (React__default.createElement(ChoiceField, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
3332
3299
|
React__default.createElement(Input$1.Wrapper, { error: error },
|
|
3333
3300
|
React__default.createElement(Checkbox$1, Object.assign({ value: value, name: 'TNC-' + id, label: React__default.createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: valueHTML } }), className: "tnc-block", "data-control": "checkbox" }, formInputProps)))));
|
|
3334
3301
|
default: {
|
|
@@ -3351,10 +3318,7 @@ const LeadGenSubscriptionBoxA = (props) => {
|
|
|
3351
3318
|
React__default.createElement("img", { src: image, alt: "" })));
|
|
3352
3319
|
}, [image]);
|
|
3353
3320
|
const titleComp = useMemo(() => {
|
|
3354
|
-
|
|
3355
|
-
return (React__default.createElement("p", { className: "leadgen-title", dangerouslySetInnerHTML: { __html: title } }));
|
|
3356
|
-
}
|
|
3357
|
-
return React__default.createElement("p", { className: "leadgen-title" }, title);
|
|
3321
|
+
return (React__default.createElement(Text, { size: "h4", weight: "regular", className: "leadgen-title", dangerouslySetInnerHTML: { __html: title } }));
|
|
3358
3322
|
}, [title]);
|
|
3359
3323
|
return (React__default.createElement(StyledLeadGenSubscriptionBoxA, { className: "subcription_box_A" },
|
|
3360
3324
|
React__default.createElement(StyledLeadGenSubscriptionBoxHeader, { className: "leadgen-subscription_box_header" },
|
|
@@ -3372,7 +3336,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
|
|
|
3372
3336
|
const { image, extra_fields, id: campaign_id, bot_id: campaign_subot_id = [], ThankYouBlock, } = forceCampaign || {};
|
|
3373
3337
|
const { textBlocks, listBlockAdded, actionBlocks } = extra_fields || {};
|
|
3374
3338
|
const { submitBlock } = actionBlocks || {};
|
|
3375
|
-
const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish,
|
|
3339
|
+
const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impression, } = useLeadGenContext();
|
|
3376
3340
|
const { t } = useTranslations();
|
|
3377
3341
|
const { action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
|
|
3378
3342
|
const [loading, setLoading] = useState(false);
|
|
@@ -3432,7 +3396,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
|
|
|
3432
3396
|
const reqValues = Object.assign(Object.assign({}, newValues), ssoValues);
|
|
3433
3397
|
const [res] = yield Promise.all([
|
|
3434
3398
|
submitSubscriptionBox(reqValues),
|
|
3435
|
-
|
|
3399
|
+
impression('submit_form'),
|
|
3436
3400
|
]);
|
|
3437
3401
|
const { _data } = res || {};
|
|
3438
3402
|
const { model } = _data || {};
|
|
@@ -3478,7 +3442,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
|
|
|
3478
3442
|
userInfo === null || userInfo === void 0 ? void 0 : userInfo.uid,
|
|
3479
3443
|
userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
|
|
3480
3444
|
]);
|
|
3481
|
-
return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () =>
|
|
3445
|
+
return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impression('impression') },
|
|
3482
3446
|
React__default.createElement(StyledLeadGenSubscriptionBox, { "data-phone-type": subscriptionPhoneType, "data-type": "subscription_box_A" },
|
|
3483
3447
|
showThankyou && (React__default.createElement(LeadGenThankYou, { image: Object.assign(Object.assign({}, thankyouImage), { src: thankyouImage.src || `${apiLeadUrl}admin/img/thanksyou.png` }), title: thankyouTitle, description: thankyouDescription, button: thankyouButton })),
|
|
3484
3448
|
!showThankyou && (React__default.createElement(LeadGenSubscriptionBoxA, { loading: loading, image: subscriptionIcon || image, title: subscription_title, submitText: (_c = submitBlock === null || submitBlock === void 0 ? void 0 : submitBlock.data) === null || _c === void 0 ? void 0 : _c.value, blocks: listBlockAdded, locale: locale, form: form, rules: validateObj, onFinish: middlewareOnSubmit })))));
|
|
@@ -3487,11 +3451,8 @@ const LeadGenSubscriptionBox$1 = memo(LeadGenSubscriptionBoxWithoutMemo);
|
|
|
3487
3451
|
|
|
3488
3452
|
const Container = () => {
|
|
3489
3453
|
const context = useContext(LeadGenContext);
|
|
3490
|
-
const { campaign_code, locale, siteId, siteDomain, userInfo, forceCampaign } = context;
|
|
3491
|
-
|
|
3492
|
-
return null;
|
|
3493
|
-
}
|
|
3494
|
-
return (React__default.createElement(LeadGenSubscriptionBox$1, { locale: locale, siteId: siteId, siteDomain: siteDomain, userInfo: userInfo, forceCampaign: forceCampaign, campaign_code: campaign_code }));
|
|
3454
|
+
const { campaign_code, locale, siteId, siteDomain, userInfo, forceCampaign, subscriptionTitle, } = context;
|
|
3455
|
+
return subscriptionTitle ? (React__default.createElement(LeadGenSubscriptionBox$1, { locale: locale, siteId: siteId, siteDomain: siteDomain, userInfo: userInfo, forceCampaign: forceCampaign, campaign_code: campaign_code })) : null;
|
|
3495
3456
|
};
|
|
3496
3457
|
Container.displayName = 'LeadGenSubscriptionBox';
|
|
3497
3458
|
const ALLOW_LOCALE = [LOCALE.Vietnam, LOCALE.Malaysia, LOCALE.Indonesia];
|
|
@@ -4213,7 +4174,7 @@ const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkN
|
|
|
4213
4174
|
React__default.createElement(Button, { className: `lead-modal__btn ${LEAD_CLASS}`, color: primaryColor }, linkText)))))));
|
|
4214
4175
|
};
|
|
4215
4176
|
|
|
4216
|
-
const InlineLayout = ({
|
|
4177
|
+
const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
|
|
4217
4178
|
const target = useMemo(() => {
|
|
4218
4179
|
if (!inlinePosition)
|
|
4219
4180
|
return null;
|
|
@@ -4318,9 +4279,6 @@ const InlineLayout = ({ flatComponent, content, inlinePosition, doImpression, })
|
|
|
4318
4279
|
}
|
|
4319
4280
|
}
|
|
4320
4281
|
}, [inlinePosition]);
|
|
4321
|
-
if (!!flatComponent) {
|
|
4322
|
-
return (React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content));
|
|
4323
|
-
}
|
|
4324
4282
|
if (!inlinePosition || !target)
|
|
4325
4283
|
return null;
|
|
4326
4284
|
return createPortal(React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content), target);
|
|
@@ -4361,333 +4319,7 @@ const EmptyComponent = ({ onClose, onContinue, }) => {
|
|
|
4361
4319
|
React__default.createElement(Button$1, { onClick: onContinue, size: "lg", variant: "filled", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_again" }, t('lead.empty.submitAgain')))));
|
|
4362
4320
|
};
|
|
4363
4321
|
|
|
4364
|
-
|
|
4365
|
-
return GlobalTextStyleNew(theme)[CustomStylesType.LEADGEN];
|
|
4366
|
-
});
|
|
4367
|
-
|
|
4368
|
-
const ErrorIcon = (_a) => {
|
|
4369
|
-
var { size } = _a, rest = __rest(_a, ["size"]);
|
|
4370
|
-
const props = Object.assign({ width: size, height: size }, rest);
|
|
4371
|
-
return (React__default.createElement("svg", Object.assign({ width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
4372
|
-
React__default.createElement("path", { d: "M5.996 6.513q.163 0 .282-.12a.38.38 0 0 0 .118-.28V3.937q0-.15-.118-.268a.4.4 0 0 0-.282-.119.4.4 0 0 0-.281.12.38.38 0 0 0-.119.28v2.175q0 .15.119.269.12.119.281.119m0 1.862a.43.43 0 0 0 .3-.112.4.4 0 0 0 .125-.313.4.4 0 0 0-.125-.3.4.4 0 0 0-.3-.125.4.4 0 0 0-.3.125.4.4 0 0 0-.125.3.4.4 0 0 0 .125.313.43.43 0 0 0 .3.112m0 2.375a4.6 4.6 0 0 1-1.856-.375 4.8 4.8 0 0 1-1.506-1.012A4.8 4.8 0 0 1 1.62 7.857 4.6 4.6 0 0 1 1.246 6q0-.987.375-1.856t1.013-1.506A4.8 4.8 0 0 1 4.14 1.625a4.6 4.6 0 0 1 1.856-.375q.988 0 1.857.375Q8.72 2 9.359 2.638q.637.637 1.012 1.506T10.747 6t-.375 1.857A4.8 4.8 0 0 1 9.36 9.363a4.8 4.8 0 0 1-1.506 1.012q-.87.375-1.857.375", fill: "#F44D2C" })));
|
|
4373
|
-
};
|
|
4374
|
-
ErrorIcon.defaultProps = {
|
|
4375
|
-
size: 18,
|
|
4376
|
-
color: theme.colors.gray600,
|
|
4377
|
-
activeColor: theme.colors.primaryBase,
|
|
4378
|
-
};
|
|
4379
|
-
|
|
4380
|
-
const SubtitleBlock = ({ children, align, }) => (React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
4381
|
-
|
|
4382
|
-
const cssInputNotShrink = css `
|
|
4383
|
-
height: 100% !important;
|
|
4384
|
-
min-height: calc(var(--container-height, 56px) * 24 / 56);
|
|
4385
|
-
line-height: calc(var(--container-height, 56px) * 24 / 56);
|
|
4386
|
-
border: none !important;
|
|
4387
|
-
border-radius: 0 !important;
|
|
4388
|
-
outline: none !important;
|
|
4389
|
-
box-shadow: none !important;
|
|
4390
|
-
padding: 0;
|
|
4391
|
-
cursor: pointer;
|
|
4392
|
-
opacity: 0;
|
|
4393
|
-
|
|
4394
|
-
::placeholder {
|
|
4395
|
-
color: ${theme.colors.gray400};
|
|
4396
|
-
}
|
|
4397
|
-
`;
|
|
4398
|
-
const cssInputShrink = css `
|
|
4399
|
-
height: auto !important;
|
|
4400
|
-
cursor: text;
|
|
4401
|
-
opacity: 1;
|
|
4402
|
-
transition: 0.1s ease-in-out all;
|
|
4403
|
-
`;
|
|
4404
|
-
const cssLabelNotShrink = css `
|
|
4405
|
-
position: absolute;
|
|
4406
|
-
top: calc(var(--container-height) / 2);
|
|
4407
|
-
left: var(--space-x, 16px);
|
|
4408
|
-
margin: 0;
|
|
4409
|
-
z-index: 1;
|
|
4410
|
-
cursor: pointer;
|
|
4411
|
-
transform: translateY(-50%);
|
|
4412
|
-
transition: 0.125s ease-in all;
|
|
4413
|
-
`;
|
|
4414
|
-
const cssLabelShrink = css `
|
|
4415
|
-
top: var(--space-y-shrink, 6px);
|
|
4416
|
-
transform: none;
|
|
4417
|
-
transition: 0.125s ease-out all;
|
|
4418
|
-
`;
|
|
4419
|
-
const cssWrapperInputNotShrink = css `
|
|
4420
|
-
min-height: var(--container-height, 56px);
|
|
4421
|
-
display: flex;
|
|
4422
|
-
align-items: flex-end;
|
|
4423
|
-
border: 1px solid ${theme.colors.gray200};
|
|
4424
|
-
border-radius: 8px;
|
|
4425
|
-
background-color: #fff;
|
|
4426
|
-
padding-inline: var(--space-x, 16px);
|
|
4427
|
-
padding-block: var(--space-y-not-shrink, 16px);
|
|
4428
|
-
cursor: pointer;
|
|
4429
|
-
pointer-events: none;
|
|
4430
|
-
|
|
4431
|
-
&:has(.mantine-Input-rightSection) {
|
|
4432
|
-
padding-right: var(--container-height, 56px);
|
|
4433
|
-
}
|
|
4434
|
-
|
|
4435
|
-
.mantine-Input-icon {
|
|
4436
|
-
display: none;
|
|
4437
|
-
}
|
|
4438
|
-
|
|
4439
|
-
.mantine-NumberInput-control {
|
|
4440
|
-
border-color: ${theme.colors.gray200};
|
|
4441
|
-
}
|
|
4442
|
-
`;
|
|
4443
|
-
const cssWrapperInputShrink = css `
|
|
4444
|
-
height: auto;
|
|
4445
|
-
min-height: var(--container-height, 56px);
|
|
4446
|
-
padding-block: var(--space-y-shrink, 6px);
|
|
4447
|
-
cursor: text;
|
|
4448
|
-
pointer-events: auto;
|
|
4449
|
-
`;
|
|
4450
|
-
const cssInputWrapperError = css `
|
|
4451
|
-
color: ${theme.colors.red800};
|
|
4452
|
-
font-size: 12px;
|
|
4453
|
-
line-height: 1.5;
|
|
4454
|
-
`;
|
|
4455
|
-
const StyledTextFieldContainer = styled.div `
|
|
4456
|
-
--space-x: 16px;
|
|
4457
|
-
--space-y-not-shrink: 15px;
|
|
4458
|
-
--space-y-shrink: 6px;
|
|
4459
|
-
--container-height: 56px;
|
|
4460
|
-
--label-not-shrink: 16px;
|
|
4461
|
-
--label-shrink: 12px;
|
|
4462
|
-
--input: 15px;
|
|
4463
|
-
|
|
4464
|
-
position: relative;
|
|
4465
|
-
min-width: 100px;
|
|
4466
|
-
max-width: 100%;
|
|
4467
|
-
display: inline-block;
|
|
4468
|
-
|
|
4469
|
-
.textField_wrapper {
|
|
4470
|
-
display: inline-block;
|
|
4471
|
-
width: 100%;
|
|
4472
|
-
cursor: pointer;
|
|
4473
|
-
}
|
|
4474
|
-
|
|
4475
|
-
.mantine-InputWrapper-root {
|
|
4476
|
-
&[data-invalid='true'] {
|
|
4477
|
-
.mantine-Input-wrapper {
|
|
4478
|
-
border-color: ${theme.colors.red400};
|
|
4479
|
-
}
|
|
4480
|
-
}
|
|
4481
|
-
|
|
4482
|
-
.mantine-Input-wrapper {
|
|
4483
|
-
&:has([data-invalid]) {
|
|
4484
|
-
border-color: ${theme.colors.red400};
|
|
4485
|
-
}
|
|
4486
|
-
}
|
|
4487
|
-
}
|
|
4488
|
-
|
|
4489
|
-
.mantine-InputWrapper-label {
|
|
4490
|
-
${cssLabelNotShrink}
|
|
4491
|
-
}
|
|
4492
|
-
|
|
4493
|
-
.mantine-Input-wrapper {
|
|
4494
|
-
${cssWrapperInputNotShrink}
|
|
4495
|
-
|
|
4496
|
-
+ .mantine-Popover-dropdown[data-position="bottom-start"] {
|
|
4497
|
-
left: 0 !important;
|
|
4498
|
-
}
|
|
4499
|
-
+ .mantine-Popover-dropdown[data-position='top-start'] {
|
|
4500
|
-
top: unset !important;
|
|
4501
|
-
left: 0 !important;
|
|
4502
|
-
bottom: 100% !important;
|
|
4503
|
-
}
|
|
4504
|
-
}
|
|
4505
|
-
|
|
4506
|
-
.mantine-Input-input {
|
|
4507
|
-
${cssInputNotShrink}
|
|
4508
|
-
}
|
|
4509
|
-
|
|
4510
|
-
&.textField_shrink,
|
|
4511
|
-
&:focus-within {
|
|
4512
|
-
.mantine-InputWrapper-label {
|
|
4513
|
-
${cssLabelShrink}
|
|
4514
|
-
}
|
|
4515
|
-
|
|
4516
|
-
.mantine-Input-wrapper {
|
|
4517
|
-
${cssWrapperInputShrink}
|
|
4518
|
-
&.mantine-Select-wrapper {
|
|
4519
|
-
.mantine-Select-rightSection {
|
|
4520
|
-
pointer-events: auto !important;
|
|
4521
|
-
}
|
|
4522
|
-
}
|
|
4523
|
-
}
|
|
4524
|
-
|
|
4525
|
-
.mantine-Input-input {
|
|
4526
|
-
${cssInputShrink}
|
|
4527
|
-
}
|
|
4528
|
-
|
|
4529
|
-
&:has(.PhoneInput) {
|
|
4530
|
-
.mantine-InputWrapper-label {
|
|
4531
|
-
left: var(--space-x, 16px);
|
|
4532
|
-
}
|
|
4533
|
-
.PhoneInput {
|
|
4534
|
-
.PhoneInputInput {
|
|
4535
|
-
opacity: 1;
|
|
4536
|
-
}
|
|
4537
|
-
}
|
|
4538
|
-
}
|
|
4539
|
-
}
|
|
4540
|
-
|
|
4541
|
-
&:focus-within {
|
|
4542
|
-
.mantine-Input-wrapper {
|
|
4543
|
-
transition: 0.25s linear border;
|
|
4544
|
-
border-color: ${theme.colors.primary600};
|
|
4545
|
-
box-shadow: 0 0 4px ${theme.colors.primary200};
|
|
4546
|
-
}
|
|
4547
|
-
}
|
|
4548
|
-
|
|
4549
|
-
.PhoneInput {
|
|
4550
|
-
--phone-select: 75px;
|
|
4551
|
-
--phone-input-space-x: 8px;
|
|
4552
|
-
width: 100%;
|
|
4553
|
-
opacity: 1;
|
|
4554
|
-
border: none;
|
|
4555
|
-
.PhoneInputCountry {
|
|
4556
|
-
background-color: transparent;
|
|
4557
|
-
border: none;
|
|
4558
|
-
padding: 0;
|
|
4559
|
-
width: var(--phone-select, 75px);
|
|
4560
|
-
}
|
|
4561
|
-
.PhoneInputInput {
|
|
4562
|
-
flex: 1;
|
|
4563
|
-
min-width: 0;
|
|
4564
|
-
line-height: 1.5;
|
|
4565
|
-
outline: none !important;
|
|
4566
|
-
border: none;
|
|
4567
|
-
box-shadow: none;
|
|
4568
|
-
font-size: var(--input, 15px);
|
|
4569
|
-
padding: 0 var(--phone-input-space-x, 8px);
|
|
4570
|
-
opacity: 0;
|
|
4571
|
-
color: ${theme.colors.gray800} !important;
|
|
4572
|
-
:focus {
|
|
4573
|
-
color: ${theme.colors.gray800} !important;
|
|
4574
|
-
}
|
|
4575
|
-
}
|
|
4576
|
-
}
|
|
4577
|
-
|
|
4578
|
-
&:has(.PhoneInput) {
|
|
4579
|
-
.mantine-InputWrapper-label {
|
|
4580
|
-
left: calc(
|
|
4581
|
-
var(--space-x, 16px) + var(--phone-select, 75px) +
|
|
4582
|
-
var(--phone-input-space-x, 8px)
|
|
4583
|
-
);
|
|
4584
|
-
}
|
|
4585
|
-
}
|
|
4586
|
-
`;
|
|
4587
|
-
const StyledChoiceFieldContainer = styled.div `
|
|
4588
|
-
&.leadgen-form_checkbox,
|
|
4589
|
-
&.leadgen-form_radio {
|
|
4590
|
-
width: 100%;
|
|
4591
|
-
}
|
|
4592
|
-
|
|
4593
|
-
&.leadgen-form_dropdown {
|
|
4594
|
-
width: calc(50% - 12px);
|
|
4595
|
-
}
|
|
4596
|
-
|
|
4597
|
-
.mantine-InputWrapper-root {
|
|
4598
|
-
display: block;
|
|
4599
|
-
}
|
|
4600
|
-
|
|
4601
|
-
.mantine-InputWrapper-label {
|
|
4602
|
-
margin-bottom: 0.5rem;
|
|
4603
|
-
color: ${theme.colors.gray800};
|
|
4604
|
-
font-size: 16px;
|
|
4605
|
-
font-weight: 400;
|
|
4606
|
-
line-height: 1.5;
|
|
4607
|
-
}
|
|
4608
|
-
|
|
4609
|
-
.mantine-Radio-root,
|
|
4610
|
-
.mantine-Checkbox-root {
|
|
4611
|
-
gap: 8px;
|
|
4612
|
-
min-width: calc(50% - 4px);
|
|
4613
|
-
|
|
4614
|
-
// input[type='radio'],
|
|
4615
|
-
// input[type='checkbox'] {
|
|
4616
|
-
// border-color: ${theme.colors.gray600};
|
|
4617
|
-
// width: 18px;
|
|
4618
|
-
// height: 18px;
|
|
4619
|
-
// }
|
|
4620
|
-
// input[type='checkbox'] {
|
|
4621
|
-
// border-radius: 4px;
|
|
4622
|
-
// }
|
|
4623
|
-
|
|
4624
|
-
// &[data-checked='true'] {
|
|
4625
|
-
// input[type='radio'],
|
|
4626
|
-
// input[type='checkbox'] {
|
|
4627
|
-
// border-color: ${theme.colors.primary600};
|
|
4628
|
-
// }
|
|
4629
|
-
|
|
4630
|
-
// input[type='radio'] {
|
|
4631
|
-
// background-color: white;
|
|
4632
|
-
// }
|
|
4633
|
-
// }
|
|
4634
|
-
|
|
4635
|
-
.mantine-Checkbox-input {
|
|
4636
|
-
&:checked {
|
|
4637
|
-
border-color: ${theme.colors.primary600};
|
|
4638
|
-
}
|
|
4639
|
-
}
|
|
4640
|
-
}
|
|
4641
|
-
|
|
4642
|
-
.leadgen-choiceContainer {
|
|
4643
|
-
display: flex;
|
|
4644
|
-
flex-wrap: wrap;
|
|
4645
|
-
align-items: flex-start;
|
|
4646
|
-
gap: 8px;
|
|
4647
|
-
}
|
|
4648
|
-
|
|
4649
|
-
.mantine-InputWrapper-error {
|
|
4650
|
-
${cssInputWrapperError}
|
|
4651
|
-
}
|
|
4652
|
-
`;
|
|
4653
|
-
|
|
4654
|
-
const TextField = (props) => {
|
|
4655
|
-
const { shrink: shrinkProps, onChangeShrink, className, children } = props, restProps = __rest(props, ["shrink", "onChangeShrink", "className", "children"]);
|
|
4656
|
-
const containerRef = useClickOutside(() => {
|
|
4657
|
-
if (shrinkProps) {
|
|
4658
|
-
return;
|
|
4659
|
-
}
|
|
4660
|
-
setShrink(false);
|
|
4661
|
-
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
|
|
4662
|
-
});
|
|
4663
|
-
const [shrink, setShrink] = useState(shrinkProps);
|
|
4664
|
-
const focusInput = (target) => {
|
|
4665
|
-
const $textEl = target.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
|
|
4666
|
-
const $focusEl = $textEl.item($textEl.length - 1);
|
|
4667
|
-
if ($focusEl) {
|
|
4668
|
-
$focusEl.focus({ preventScroll: true });
|
|
4669
|
-
}
|
|
4670
|
-
};
|
|
4671
|
-
const onClick = useCallback((e) => {
|
|
4672
|
-
if (shrink) {
|
|
4673
|
-
e.preventDefault();
|
|
4674
|
-
focusInput(e.currentTarget);
|
|
4675
|
-
return;
|
|
4676
|
-
}
|
|
4677
|
-
setShrink(true);
|
|
4678
|
-
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
|
|
4679
|
-
focusInput(e.currentTarget);
|
|
4680
|
-
}, [shrink]);
|
|
4681
|
-
useEffect(() => {
|
|
4682
|
-
setShrink(shrinkProps);
|
|
4683
|
-
}, [shrinkProps]);
|
|
4684
|
-
return (React__default.createElement(StyledTextFieldContainer, Object.assign({ shrink: shrink, className: clsx(className, 'textField', { textField_shrink: !!shrink }) }, restProps),
|
|
4685
|
-
React__default.createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, typeof children === 'function' ? children(shrink) : children)));
|
|
4686
|
-
};
|
|
4687
|
-
const ChoiceField = (props) => {
|
|
4688
|
-
const { children, className } = props, restProps = __rest(props, ["children", "className"]);
|
|
4689
|
-
return (React__default.createElement(StyledChoiceFieldContainer, Object.assign({ className: clsx(className, 'choiceField') }, restProps), children));
|
|
4690
|
-
};
|
|
4322
|
+
const SubtitleBlock = ({ children, align, }) => (React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
4691
4323
|
|
|
4692
4324
|
const TitleBlock = ({ children, align, }) => (React__default.createElement("h2", { className: `lead-modal__title ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
4693
4325
|
|
|
@@ -4713,44 +4345,48 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
4713
4345
|
case 'SubtitleBlock':
|
|
4714
4346
|
return (React__default.createElement(SubtitleBlock, { key: index, align: align }, value));
|
|
4715
4347
|
case 'TextBlock':
|
|
4716
|
-
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
React__default.createElement(
|
|
4726
|
-
|
|
4348
|
+
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4349
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false, type: "text", placeholder: " ",
|
|
4350
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
4351
|
+
// onChangeRaw={(e) => inputOnChange('text', e)}
|
|
4352
|
+
label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-control": "text", "data-lead-control": name, "data-is-required": required, inputWrapperOrder: [
|
|
4353
|
+
'label',
|
|
4354
|
+
'input',
|
|
4355
|
+
'description',
|
|
4356
|
+
'error',
|
|
4357
|
+
] }, form.getInputProps(value), { name: value, error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
4358
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
4359
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))) }))))));
|
|
4727
4360
|
case 'NumberBlock':
|
|
4728
|
-
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
React__default.createElement(
|
|
4738
|
-
|
|
4361
|
+
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4362
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(NumberInput$1, Object.assign({ withAsterisk: required, spellCheck: false, type: "number", placeholder: " ",
|
|
4363
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
4364
|
+
// onChange={(e) => inputOnChange('number', e)}
|
|
4365
|
+
label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-control": "number", "data-lead-control": name, "data-is-required": required, name: value, inputWrapperOrder: [
|
|
4366
|
+
'label',
|
|
4367
|
+
'input',
|
|
4368
|
+
'description',
|
|
4369
|
+
'error',
|
|
4370
|
+
] }, form.getInputProps(value), { error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
4371
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
4372
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))) }))))));
|
|
4739
4373
|
case 'EmailBlock':
|
|
4740
|
-
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
React__default.createElement(
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4374
|
+
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4375
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false,
|
|
4376
|
+
// type="email"
|
|
4377
|
+
placeholder: " ",
|
|
4378
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
4379
|
+
label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-control": "email", "data-lead-control": name, "data-is-required": required, name: value, inputWrapperOrder: [
|
|
4380
|
+
'label',
|
|
4381
|
+
'input',
|
|
4382
|
+
'description',
|
|
4383
|
+
'error',
|
|
4384
|
+
] }, form.getInputProps(value), { error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
4385
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
4386
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))), styles: (theme) => ({
|
|
4387
|
+
input: GlobalTextStyleNew(theme)[CustomStylesType.LEADGEN]
|
|
4388
|
+
.p2,
|
|
4389
|
+
}) }))))));
|
|
4754
4390
|
case 'PhoneOtpBlock':
|
|
4755
4391
|
case 'WhatsappOtpBlock':
|
|
4756
4392
|
case 'ZaloOtpBlock':
|
|
@@ -4759,24 +4395,33 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
4759
4395
|
const _b = form.getInputProps(value), { error } = _b, formPhoneInputWrapper = __rest(_b, ["error"]);
|
|
4760
4396
|
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: clsx('lead-modal__form-control leadgen-form_field', {
|
|
4761
4397
|
'leadgen-form_field_error': !!error,
|
|
4762
|
-
}) },
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4398
|
+
}) },
|
|
4399
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(Input$1.Wrapper, { size: "md", withAsterisk: required, label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-invalid": !!error, labelProps: { htmlFor: htmlForId }, inputWrapperOrder: [
|
|
4400
|
+
'label',
|
|
4401
|
+
'input',
|
|
4402
|
+
'description',
|
|
4403
|
+
'error',
|
|
4404
|
+
], error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
4405
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
4406
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))) },
|
|
4407
|
+
React__default.createElement("div", { className: "mantine-Input-wrapper" },
|
|
4408
|
+
React__default.createElement(Phone, Object.assign({ className: `mantine-Input-input ${classes.p2}`, name: value, spellCheck: false, type: "tel", placeholder: " ",
|
|
4409
|
+
// onBlur={(e) => inputOnBlur('tel', e)}
|
|
4410
|
+
id: htmlForId, defaultCountry: (locale
|
|
4411
|
+
? MAPPED_LOCALE[locale] || 'VN'
|
|
4412
|
+
: 'VN'), "data-control": "tel", "data-lead-control": name, "data-is-required": required }, formPhoneInputWrapper))))))));
|
|
4772
4413
|
}
|
|
4773
4414
|
case 'LocationBlock': {
|
|
4774
|
-
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4415
|
+
return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
|
|
4416
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(GoogleLocationBlock, Object.assign({ withAsterisk: required, name: value, placeholder: " ", label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-control": "text", "data-lead-control": name, "data-is-required": required, locale: locale, inputWrapperOrder: [
|
|
4417
|
+
'label',
|
|
4418
|
+
'input',
|
|
4419
|
+
'description',
|
|
4420
|
+
'error',
|
|
4421
|
+
] }, form.getInputProps(value), { error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
4422
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
4423
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))) })))),
|
|
4424
|
+
React__default.createElement(TextField.Icon, { Icon: MapPin })));
|
|
4780
4425
|
}
|
|
4781
4426
|
case 'DateBlock': {
|
|
4782
4427
|
const _c = form.getInputProps(value), { error } = _c, formInputProps = __rest(_c, ["error"]);
|
|
@@ -4816,51 +4461,53 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
|
|
|
4816
4461
|
return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
4817
4462
|
} }, 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 }))))));
|
|
4818
4463
|
case 'DropdownBlock':
|
|
4819
|
-
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field DropdownBlock", key: index },
|
|
4820
|
-
React__default.createElement(
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
, Object.assign({
|
|
4464
|
+
return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field DropdownBlock", key: index },
|
|
4465
|
+
React__default.createElement(TextField.Control, null, (shrink) => (React__default.createElement(React__default.Fragment, null,
|
|
4466
|
+
React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown', "data-lead-control": name, "data-is-required": required }),
|
|
4467
|
+
React__default.createElement(Select
|
|
4824
4468
|
// className="lead-modal__form-control leadgen-form_field"
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
label:
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
React__default.createElement(
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
},
|
|
4837
|
-
nothingFound: {
|
|
4838
|
-
fontSize: 54,
|
|
4839
|
-
paddingBlock: 30,
|
|
4840
|
-
},
|
|
4841
|
-
itemsWrapper: {
|
|
4842
|
-
padding: 6,
|
|
4843
|
-
},
|
|
4844
|
-
dropdown: {
|
|
4845
|
-
'.mantine-ScrollArea-scrollbar[data-orientation="vertical"]': {
|
|
4846
|
-
'--radix-scroll-area-thumb-width': '6px',
|
|
4847
|
-
width: 'var(--radix-scroll-area-thumb-width)',
|
|
4848
|
-
paddingInline: 0,
|
|
4469
|
+
, Object.assign({
|
|
4470
|
+
// className="lead-modal__form-control leadgen-form_field"
|
|
4471
|
+
label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), placeholder: " ", searchable: true, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
|
|
4472
|
+
value: l.value,
|
|
4473
|
+
label: l.placeholder,
|
|
4474
|
+
})), nothingFound: React__default.createElement(NoData, null), rightSection: React__default.createElement(TextField.Icon, { Icon: ChevronDown }), styles: {
|
|
4475
|
+
item: {
|
|
4476
|
+
paddingBlock: 12,
|
|
4477
|
+
paddingInline: 10,
|
|
4478
|
+
fontSize: 16,
|
|
4479
|
+
lineHeight: 1.5,
|
|
4849
4480
|
},
|
|
4850
|
-
|
|
4851
|
-
|
|
4481
|
+
nothingFound: {
|
|
4482
|
+
fontSize: 54,
|
|
4483
|
+
paddingBlock: 30,
|
|
4484
|
+
},
|
|
4485
|
+
itemsWrapper: {
|
|
4486
|
+
padding: 6,
|
|
4487
|
+
},
|
|
4488
|
+
dropdown: {
|
|
4489
|
+
'.mantine-ScrollArea-scrollbar[data-orientation="vertical"]': {
|
|
4490
|
+
'--radix-scroll-area-thumb-width': '6px',
|
|
4491
|
+
width: 'var(--radix-scroll-area-thumb-width)',
|
|
4492
|
+
paddingInline: 0,
|
|
4493
|
+
},
|
|
4494
|
+
},
|
|
4495
|
+
}, maxDropdownHeight: 192 }, form.getInputProps(value), { error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
|
|
4496
|
+
React__default.createElement(ErrorIcon, { size: 12 }),
|
|
4497
|
+
React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))) })))))));
|
|
4852
4498
|
case 'TncBlock':
|
|
4853
4499
|
const _d = form.getInputProps(`TNC-${id}`), { error } = _d, tncInputProps = __rest(_d, ["error"]);
|
|
4854
4500
|
return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox", key: id },
|
|
4855
4501
|
React__default.createElement(Input$1.Wrapper, { error: error },
|
|
4856
|
-
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default.createElement(Text, { as: "span", size: "c1", variant: "secondary", dangerouslySetInnerHTML: { __html: data.valueHTML }, styles: {
|
|
4502
|
+
React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default.createElement(Text, { as: "span", size: "c1", variant: "secondary", dangerouslySetInnerHTML: { __html: data.valueHTML }, styles: (theme) => ({
|
|
4857
4503
|
root: {
|
|
4858
4504
|
a: {
|
|
4859
|
-
textDecoration: 'underline',
|
|
4505
|
+
textDecoration: 'underline !important',
|
|
4860
4506
|
textUnderlineOffset: '3px',
|
|
4507
|
+
color: `${theme.colors.gray[7]} !important`,
|
|
4861
4508
|
},
|
|
4862
4509
|
},
|
|
4863
|
-
} }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
|
|
4510
|
+
}) }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
|
|
4864
4511
|
}
|
|
4865
4512
|
return null;
|
|
4866
4513
|
})));
|
|
@@ -5113,7 +4760,7 @@ const LEADGEN_SHOW_HEADER = [
|
|
|
5113
4760
|
];
|
|
5114
4761
|
// const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39', 'u0adw7hw8kw7t89']
|
|
5115
4762
|
const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39'];
|
|
5116
|
-
const LightboxLayout = ({
|
|
4763
|
+
const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, doImpression, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
|
|
5117
4764
|
var _a, _b;
|
|
5118
4765
|
const { primaryColor } = useContext(LeadGenContext$1);
|
|
5119
4766
|
const { isMobile } = useScreenSize();
|
|
@@ -5513,7 +5160,7 @@ const LightboxLayout = ({ flatComponent, popupId, extraFields, onClose: onCloseP
|
|
|
5513
5160
|
return React__default.createElement(SideBarLayout, { content: PopupContainer });
|
|
5514
5161
|
}
|
|
5515
5162
|
else if (isInline) {
|
|
5516
|
-
return (React__default.createElement(InlineLayout, {
|
|
5163
|
+
return (React__default.createElement(InlineLayout, { action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
|
|
5517
5164
|
}
|
|
5518
5165
|
return null;
|
|
5519
5166
|
};
|
|
@@ -5606,7 +5253,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
|
|
|
5606
5253
|
return null;
|
|
5607
5254
|
}
|
|
5608
5255
|
}
|
|
5609
|
-
const NewLeadPopup = ({
|
|
5256
|
+
const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
|
|
5610
5257
|
var _a, _b;
|
|
5611
5258
|
const { apiUrl, siteDomain } = useContext(LeadGenContext$1);
|
|
5612
5259
|
const { extra_fields, image, image_desktop, code, image_background, image_overlay_mobile, image_overlay_desktop, } = campaign || {};
|
|
@@ -5709,7 +5356,7 @@ const NewLeadPopup = ({ flatComponent, campaign, action, onSubmit, onClose, onUn
|
|
|
5709
5356
|
currentLayout == 'Fullscreen' ||
|
|
5710
5357
|
currentLayout == 'Sidebar' ||
|
|
5711
5358
|
currentLayout == 'Slider') {
|
|
5712
|
-
return (React__default.createElement(LightboxLayout, {
|
|
5359
|
+
return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, doImpression: doImpression, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
|
|
5713
5360
|
}
|
|
5714
5361
|
else if (currentLayout.includes('Skin')) {
|
|
5715
5362
|
return (React__default.createElement(SkinLayout, { popupId: popupIdRef.current, link: actionBlocks.linkButtonBlock.data.url, linkNewTab: !!actionBlocks.linkButtonBlock.data.newtab, linkText: actionBlocks.linkButtonBlock.data.value, onClose: onClose, onOtherSubmit: onOtherSubmit, imageMobile: image, imageDesktop: image_desktop, currentLayout: currentLayout }));
|
|
@@ -5801,7 +5448,7 @@ const formatTrackingData = (params) => {
|
|
|
5801
5448
|
};
|
|
5802
5449
|
|
|
5803
5450
|
// mount css
|
|
5804
|
-
const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps,
|
|
5451
|
+
const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, }) => {
|
|
5805
5452
|
var _a, _b;
|
|
5806
5453
|
const scrollEventHandlerRef = useRef();
|
|
5807
5454
|
const leadStartTimeRef = useRef(Date.now());
|
|
@@ -5913,10 +5560,12 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5913
5560
|
const { listBlockAdded = [] } = params || {};
|
|
5914
5561
|
if (!TEMPLATE_ALLOW_NEWTRACKING.includes(currentLayout))
|
|
5915
5562
|
return;
|
|
5563
|
+
const gaCookie = getCookie('_ga') || null;
|
|
5564
|
+
const cookieId = getCookie('hhg-id') || '';
|
|
5916
5565
|
const data = formatTrackingData({
|
|
5917
5566
|
commonData: {
|
|
5918
|
-
cookie_id:
|
|
5919
|
-
ga_client_id:
|
|
5567
|
+
cookie_id: cookieId,
|
|
5568
|
+
ga_client_id: gaCookie,
|
|
5920
5569
|
country_code: locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN',
|
|
5921
5570
|
status: 'in_progress',
|
|
5922
5571
|
campaign_id: showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.id,
|
|
@@ -5926,13 +5575,28 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
5926
5575
|
currentLayout,
|
|
5927
5576
|
formParams: Object.assign(Object.assign({}, params), { listBlockAdded, formValues: [] }),
|
|
5928
5577
|
});
|
|
5929
|
-
return
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5578
|
+
return Promise.all([
|
|
5579
|
+
fetch(`${apiUrl}api/collection/tracking-completion`, {
|
|
5580
|
+
method: 'POST',
|
|
5581
|
+
headers: {
|
|
5582
|
+
'Content-Type': 'application/json',
|
|
5583
|
+
},
|
|
5584
|
+
body: JSON.stringify(data),
|
|
5585
|
+
}),
|
|
5586
|
+
fetch(`${apiUrl}api/campaign/${showCampaign.code}/impression`, {
|
|
5587
|
+
method: 'POST',
|
|
5588
|
+
headers: {
|
|
5589
|
+
'Content-Type': 'application/json',
|
|
5590
|
+
},
|
|
5591
|
+
body: JSON.stringify({
|
|
5592
|
+
action,
|
|
5593
|
+
url: location.href.toLowerCase(),
|
|
5594
|
+
title_article: document.title,
|
|
5595
|
+
cookie_id: getCookie('hhg-id'),
|
|
5596
|
+
ga_client_id: gaCookie,
|
|
5597
|
+
}),
|
|
5598
|
+
}),
|
|
5599
|
+
]);
|
|
5936
5600
|
};
|
|
5937
5601
|
useEffect(() => {
|
|
5938
5602
|
if (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code)
|
|
@@ -6141,7 +5805,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
|
|
|
6141
5805
|
!!currentLayout &&
|
|
6142
5806
|
!currentLayout.includes('Inline') &&
|
|
6143
5807
|
!currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
|
|
6144
|
-
React__default.createElement(NewLeadPopup, {
|
|
5808
|
+
React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, doImpression: doImpression, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
|
|
6145
5809
|
}))))))));
|
|
6146
5810
|
};
|
|
6147
5811
|
const LeadGen = _LeadGen;
|
|
@@ -6152,4 +5816,4 @@ LeadGen.Thankyou = Thankyou;
|
|
|
6152
5816
|
LeadGen.OtpForm = OtpBlock$1;
|
|
6153
5817
|
LeadGen.Close = Close;
|
|
6154
5818
|
|
|
6155
|
-
export { LeadGen,
|
|
5819
|
+
export { LeadGen, LeadGenSubscriptionBox };
|