@hhgtech/hhg-components 1.29.362-beta-7 → 1.29.362-beta-9
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-64d42e12.js → InputDate-ed7921e3.js} +3 -3
- package/build/{LastPeriod-0b4bdb7b.js → LastPeriod-936d44b5.js} +1 -1
- package/build/{MobileBottomNavigationIcon-6268685b.js → MobileBottomNavigationIcon-137c1c16.js} +3 -3
- package/build/{Spinner-732c257a.js → Spinner-81efdcc9.js} +1 -1
- package/build/{WhatsApp-873b091d.js → WhatsApp-9b152180.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +48 -48
- package/build/babyGrowth.js +83 -83
- package/build/cache.js +2 -2
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components/atoms/icons/IUI.d.ts +4 -0
- package/build/components/atoms/icons/Info.d.ts +4 -0
- package/build/components/atoms/icons/Ultrasound.d.ts +4 -0
- package/build/components/molecules/dueDateCalculator/utils.d.ts +3 -1
- package/build/components/molecules/embeddedHeathToolCards/due-date/dueDate.d.ts +5 -2
- package/build/components/molecules/healthTools/components/borderInlineControl/index.d.ts +2 -2
- package/build/components/molecules/healthTools/form/dueDateForm/context.d.ts +1 -1
- package/build/components/molecules/healthTools/form/dueDateForm/index.d.ts +3 -1
- package/build/components/molecules/healthTools/form/dueDateForm/iuiForm/context.d.ts +7 -0
- package/build/components/molecules/healthTools/form/dueDateForm/iuiForm/defaultLayout.d.ts +2 -0
- package/build/components/molecules/healthTools/form/dueDateForm/iuiForm/index.d.ts +6 -0
- package/build/components/molecules/healthTools/form/dueDateForm/iuiForm/inlineLayout.d.ts +2 -0
- package/build/components/molecules/healthTools/form/dueDateForm/iuiForm/mbLayout.d.ts +2 -0
- package/build/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/context.d.ts +7 -0
- package/build/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/defaultLayout.d.ts +2 -0
- package/build/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/index.d.ts +8 -0
- package/build/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/inlineLayout.d.ts +2 -0
- package/build/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/mbLayout.d.ts +2 -0
- package/build/components/molecules/healthTools/form/dueDateForm/utils.d.ts +5 -1
- package/build/components/molecules/toolBannerCard/index.d.ts +3 -1
- package/build/components/navigationV2/components/molecules/navigationBar/index.styled.d.ts +0 -2
- package/build/components/navigationV2/hooks/useNavConfig.d.ts +0 -1
- package/build/components/navigationV2/types.d.ts +1 -1
- package/build/components.js +96 -96
- package/build/{constants-abcc0371.js → constants-4aabd47a.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-beed5f88.js → core-2eda8b78.js} +1 -1
- package/build/{dataTransform-efdc8b5b.js → dataTransform-be9e82e8.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-ab52b049.js → editor-38627d15.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +27 -26
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{InputDate-16ff69fb.js → InputDate-072f7728.js} +3 -3
- package/build/esm/{LastPeriod-dac3ccfb.js → LastPeriod-3715c174.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-09f20a81.js → MobileBottomNavigationIcon-29b76714.js} +3 -3
- package/build/esm/{Spinner-47aa89e4.js → Spinner-6fdb59b3.js} +1 -1
- package/build/esm/{WhatsApp-a86d6d53.js → WhatsApp-061e59f5.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +48 -48
- package/build/esm/babyGrowth.js +83 -83
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/atoms/icons/IUI.d.ts +4 -0
- package/build/esm/components/atoms/icons/Info.d.ts +4 -0
- package/build/esm/components/atoms/icons/Ultrasound.d.ts +4 -0
- package/build/esm/components/molecules/dueDateCalculator/utils.d.ts +3 -1
- package/build/esm/components/molecules/embeddedHeathToolCards/due-date/dueDate.d.ts +5 -2
- package/build/esm/components/molecules/healthTools/components/borderInlineControl/index.d.ts +2 -2
- package/build/esm/components/molecules/healthTools/form/dueDateForm/context.d.ts +1 -1
- package/build/esm/components/molecules/healthTools/form/dueDateForm/index.d.ts +3 -1
- package/build/esm/components/molecules/healthTools/form/dueDateForm/iuiForm/context.d.ts +7 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/iuiForm/defaultLayout.d.ts +2 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/iuiForm/index.d.ts +6 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/iuiForm/inlineLayout.d.ts +2 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/iuiForm/mbLayout.d.ts +2 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/context.d.ts +7 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/defaultLayout.d.ts +2 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/index.d.ts +8 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/inlineLayout.d.ts +2 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/ultrasoundForm/mbLayout.d.ts +2 -0
- package/build/esm/components/molecules/healthTools/form/dueDateForm/utils.d.ts +5 -1
- package/build/esm/components/molecules/toolBannerCard/index.d.ts +3 -1
- package/build/esm/components/navigationV2/components/molecules/navigationBar/index.styled.d.ts +0 -2
- package/build/esm/components/navigationV2/hooks/useNavConfig.d.ts +0 -1
- package/build/esm/components/navigationV2/types.d.ts +1 -1
- package/build/esm/components.js +96 -96
- package/build/esm/{constants-f640ae0f.js → constants-80f0ab3e.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-d9c0671e.js → core-fba06810.js} +1 -1
- package/build/esm/{dataTransform-69716caa.js → dataTransform-b1425423.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-7d81f7ef.js → editor-bb09a20f.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +27 -26
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/footer.js +21 -21
- package/build/esm/gAssets.js +2 -2
- package/build/esm/{healthTools-465b855e.js → healthTools-543f33aa.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +18 -18
- package/build/esm/healthToolsForm.js +34 -34
- package/build/esm/hooks/useCSSFocusPopupHelper.d.ts +0 -1
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n/translationKeys.d.ts +1 -1
- package/build/esm/i18n-values/en-PH.js +9 -0
- package/build/esm/i18n-values/hi-IN.js +9 -0
- package/build/esm/i18n-values/id-ID.js +9 -0
- package/build/esm/i18n-values/km-KH.js +9 -0
- package/build/esm/i18n-values/ms-MY.js +9 -0
- package/build/esm/i18n-values/my-MM.js +9 -0
- package/build/esm/i18n-values/th-TH.js +9 -0
- package/build/esm/i18n-values/tl-PH.js +9 -0
- package/build/esm/i18n-values/vi-VN.js +9 -0
- package/build/esm/i18n-values/vi-VN_MB.js +10 -1
- package/build/esm/i18n-values/zh-TW.js +9 -0
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-447cd8a4.js → index-04359180.js} +6 -6
- package/build/esm/{index-5a86d9b0.js → index-12f05852.js} +5 -5
- package/build/esm/{index-c612c756.js → index-1461ac26.js} +42 -69
- package/build/esm/{index-4eabf61b.js → index-15c1caf0.js} +1 -1
- package/build/esm/{index-a5b8a392.js → index-163109f0.js} +7 -7
- package/build/esm/{index-75266933.js → index-17078aa6.js} +4 -4
- package/build/esm/{index-ab2833d5.js → index-18e12bf2.js} +31 -31
- package/build/esm/{index-63e8911e.js → index-19825c11.js} +2 -2
- package/build/esm/{index-84ca8d60.js → index-1aca6563.js} +2 -2
- package/build/esm/{index-a111eead.js → index-1ae2d49f.js} +1 -1
- package/build/esm/index-22712e77.js +689 -0
- package/build/esm/{index-9fe435c1.js → index-25c4e9a3.js} +13 -13
- package/build/esm/{index-55e275b4.js → index-2c7df8ac.js} +3 -3
- package/build/esm/{index-b6908538.js → index-2e43899a.js} +2 -2
- package/build/esm/{index-13c0ea70.js → index-2ee7fa41.js} +6 -6
- package/build/esm/{index-68571fd9.js → index-39bd1a2e.js} +6 -6
- package/build/esm/{index-3672b72f.js → index-3cb4c4db.js} +52 -17
- package/build/esm/{index-6fb98c8f.js → index-3f6e0c66.js} +2 -2
- package/build/esm/{index-f0a7c31c.js → index-3fe6a089.js} +10 -10
- package/build/esm/{index-7107c883.js → index-5257c051.js} +6 -6
- package/build/esm/{index-2c4ea8ae.js → index-57e8887f.js} +1 -1
- package/build/esm/{index-19f99de5.js → index-5ace2cf7.js} +16 -16
- package/build/esm/{index-b501a228.js → index-5ca40c44.js} +1 -1
- package/build/esm/{index-61322bbf.js → index-61d8cd5b.js} +6 -6
- package/build/esm/{index-3af42a84.js → index-6281cb90.js} +2 -2
- package/build/esm/{index-4f111f60.js → index-64f54f5b.js} +3 -3
- package/build/esm/{index-acf2009f.js → index-66f22821.js} +21 -21
- package/build/esm/{index-2305e665.js → index-6b18fc60.js} +24 -24
- package/build/esm/{index-6bf4911c.js → index-71fd886f.js} +2 -2
- package/build/esm/{index-fec30d54.js → index-79767a07.js} +3 -3
- package/build/esm/{index-9789a5bb.js → index-7c85702d.js} +2 -2
- package/build/esm/{index-ed465943.js → index-7ea65ce2.js} +15 -15
- package/build/esm/{index-55ce4171.js → index-7eaf7161.js} +17 -17
- package/build/esm/{index-84a00e3b.js → index-7eea3504.js} +2 -2
- package/build/esm/{index-5451485b.js → index-807d359b.js} +11 -11
- package/build/esm/{index-0d4e612e.js → index-82e120c8.js} +2 -2
- package/build/esm/{index-da8fae13.js → index-8316c939.js} +32 -32
- package/build/esm/{index-1913a930.js → index-85ede26a.js} +3 -3
- package/build/esm/{index-fe975ba7.js → index-9531ddc8.js} +1 -1
- package/build/esm/{index-cf7511b0.js → index-973c9d29.js} +2 -2
- package/build/esm/{index-2bcab30b.js → index-978dae8b.js} +11 -18
- package/build/esm/{index-597bbb57.js → index-99ccd5be.js} +18 -18
- package/build/esm/{index-c35929d1.js → index-99edc6ab.js} +16 -16
- package/build/esm/{index-5307e0c6.js → index-9c28efae.js} +25 -25
- package/build/esm/{index-3c3a3102.js → index-9c6c885d.js} +7 -7
- package/build/esm/{index-db34c7f8.js → index-9cf03969.js} +2 -2
- package/build/esm/{index-6cebc2c8.js → index-a876ff83.js} +16 -16
- package/build/esm/{index-50027e5c.js → index-aa8223e5.js} +13 -13
- package/build/esm/{index-b2316ee2.js → index-b4e7973e.js} +16 -16
- package/build/esm/{index-432abb58.js → index-b644904f.js} +1 -1
- package/build/esm/{index-6f3bed52.js → index-beedfca0.js} +3 -3
- package/build/esm/{index-ef63171d.js → index-bf70ce29.js} +2 -2
- package/build/esm/{index-67a5426d.js → index-ce98b25c.js} +13 -13
- package/build/esm/{index-a0f010bf.js → index-d2663949.js} +1 -1
- package/build/esm/{index-aefd2493.js → index-ddc5c170.js} +2 -2
- package/build/esm/{index-8ee9610b.js → index-e68f040d.js} +18 -18
- package/build/esm/{index-5acde2d7.js → index-f2703eda.js} +17 -17
- package/build/esm/{index-aa3201b9.js → index-f4a37052.js} +2 -2
- package/build/esm/{index-3da1e4b6.js → index-f5b4965d.js} +17 -17
- package/build/esm/{index-1c22d4f9.js → index-f5dbca38.js} +22 -22
- package/build/esm/{index-4497323a.js → index-f6e2514f.js} +1 -1
- package/build/esm/{index-a94fc823.js → index-f7ee723a.js} +5 -5
- package/build/esm/{index-18c8dcde.js → index-f9ce57da.js} +3 -3
- package/build/esm/{index-6037be86.js → index-fead23f6.js} +1 -1
- package/build/esm/index.js +117 -117
- package/build/esm/{labelSorting-df818f96.js → labelSorting-8a08a1a5.js} +4 -4
- package/build/esm/lead/helpers.d.ts +1 -51
- package/build/esm/lead/index.d.ts +1 -2
- package/build/esm/lead/services/index.d.ts +0 -14
- package/build/esm/lead.js +303 -1226
- package/build/esm/{logoIcon-bcab45ec.js → logoIcon-49ab70e6.js} +2 -2
- package/build/esm/mantine.js +25 -25
- package/build/esm/misc.js +17 -17
- package/build/esm/miscGetDynamicHealthTool.js +4 -4
- package/build/esm/miscGetSocialList.js +8 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +73 -73
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +16 -16
- package/build/esm/navigation.js +45 -45
- package/build/esm/navigationLogoutPopup.js +9 -9
- package/build/esm/navigationProfileButton.js +23 -23
- package/build/esm/onboardingV2.js +29 -29
- package/build/esm/organisms.js +49 -49
- package/build/esm/{post-12899078.js → post-cad6a57e.js} +2 -2
- package/build/esm/profileNavigation.js +19 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -22
- package/build/esm/ssoV2.js +29 -29
- package/build/esm/{store-74598ce1.js → store-e5b1929e.js} +4 -4
- package/build/esm/subot.js +46 -42
- package/build/esm/surveyOrPremiumBanner.js +32 -32
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-a99f3769.js → surveyThankyouCard-52d13658.js} +5 -5
- package/build/esm/together.js +55 -55
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +30 -30
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +50 -50
- package/build/esm/togetherMoleculesCardAuthor.js +28 -28
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +38 -38
- package/build/esm/togetherOrganisms.js +49 -49
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{treePopoverMenu-10382802.js → treePopoverMenu-d34d9a6c.js} +19 -19
- package/build/esm/{types-cb3acc26.js → types-29ee1554.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-d4b1c5f2.js → useCategory-35ce742a.js} +5 -5
- package/build/esm/{useHealthToolCache-54d80f8c.js → useHealthToolCache-03737f8f.js} +1 -1
- package/build/esm/{useMantineLocale-2c267cf1.js → useMantineLocale-8089a4f0.js} +6 -6
- package/build/esm/{usePlacesAutocomplete-23dbc6fa.js → usePlacesAutocomplete-8134ba0a.js} +1 -1
- package/build/esm/{useScreenSize-db569e75.js → useScreenSize-4681ce8d.js} +2 -2
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-30ed34b7.js → utils-0acf23f6.js} +4 -4
- package/build/esm/{utils-3c0e208c.js → utils-80debbb6.js} +2 -2
- package/build/esm/{utils-cdd60699.js → utils-8b6b5bf9.js} +2 -2
- package/build/esm/{utils-09f8e5fd.js → utils-c06cb90b.js} +3 -3
- package/build/esm/vaccination.js +21 -21
- package/build/footer.js +21 -21
- package/build/gAssets.js +2 -2
- package/build/{healthTools-77fca866.js → healthTools-951ccadc.js} +1 -1
- package/build/healthToolsCardWrapper.js +18 -18
- package/build/healthToolsForm.js +34 -34
- package/build/hooks/useCSSFocusPopupHelper.d.ts +0 -1
- package/build/hooks.js +13 -13
- package/build/i18n/translationKeys.d.ts +1 -1
- package/build/i18n-values/en-PH.js +9 -0
- package/build/i18n-values/hi-IN.js +9 -0
- package/build/i18n-values/id-ID.js +9 -0
- package/build/i18n-values/km-KH.js +9 -0
- package/build/i18n-values/ms-MY.js +9 -0
- package/build/i18n-values/my-MM.js +9 -0
- package/build/i18n-values/th-TH.js +9 -0
- package/build/i18n-values/tl-PH.js +9 -0
- package/build/i18n-values/vi-VN.js +9 -0
- package/build/i18n-values/vi-VN_MB.js +10 -1
- package/build/i18n-values/zh-TW.js +9 -0
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-c2a0a243.js → index-012231c0.js} +6 -6
- package/build/{index-90e07d5d.js → index-030898d1.js} +22 -22
- package/build/{index-ed8e4b3a.js → index-03e16604.js} +32 -32
- package/build/{index-a2e166cb.js → index-05a7ed61.js} +2 -2
- package/build/{index-c1a20b50.js → index-07e2eef6.js} +13 -13
- package/build/{index-37ef911f.js → index-0c31f727.js} +1 -1
- package/build/{index-da263b8c.js → index-110cfbd0.js} +2 -2
- package/build/{index-d52875ca.js → index-13543179.js} +25 -25
- package/build/{index-9f69e8f2.js → index-14e030d1.js} +1 -1
- package/build/{index-6816ad79.js → index-156982e5.js} +18 -18
- package/build/{index-2bfcacaa.js → index-175dea15.js} +2 -2
- package/build/{index-c9ef25e1.js → index-189905da.js} +13 -13
- package/build/{index-7573e047.js → index-24bcd506.js} +17 -17
- package/build/{index-da3d5bf5.js → index-24f5fe19.js} +6 -6
- package/build/{index-aae5daa6.js → index-25b8ae05.js} +1 -1
- package/build/{index-61b188dc.js → index-25d67c2b.js} +42 -69
- package/build/{index-ca55e97e.js → index-2d412dd9.js} +2 -2
- package/build/{index-69f88dca.js → index-2f07ddf2.js} +3 -3
- package/build/{index-fdfddf00.js → index-333597fc.js} +6 -6
- package/build/{index-09b30ecf.js → index-444f7602.js} +31 -31
- package/build/{index-7056279d.js → index-44c42111.js} +1 -1
- package/build/{index-64e3c3d3.js → index-47459aca.js} +1 -1
- package/build/{index-f7c0987b.js → index-490b42ca.js} +2 -2
- package/build/{index-1ce8cebb.js → index-49b32119.js} +13 -13
- package/build/{index-4c8fa66a.js → index-4a657f60.js} +7 -7
- package/build/{index-fd81e3fa.js → index-4af29139.js} +1 -1
- package/build/{index-45f52a74.js → index-5ce2a639.js} +17 -17
- package/build/{index-6e4f9b56.js → index-64516730.js} +1 -1
- package/build/{index-67ac5c04.js → index-6a9d73b1.js} +16 -16
- package/build/{index-94fedc8f.js → index-708a6713.js} +2 -2
- package/build/{index-c6e943df.js → index-75bed57f.js} +10 -10
- package/build/{index-d04d8bc2.js → index-79a8b2df.js} +11 -18
- package/build/{index-abb4fe75.js → index-7c06c51a.js} +3 -3
- package/build/{index-40486d40.js → index-7c6e4422.js} +5 -5
- package/build/{index-9abf5c76.js → index-83b8d0e4.js} +2 -2
- package/build/{index-0976cf3a.js → index-849f7044.js} +1 -1
- package/build/{index-37a4d328.js → index-86d05eab.js} +15 -15
- package/build/{index-fbb15ec3.js → index-8c09d72a.js} +16 -16
- package/build/{index-bcab6d5c.js → index-8f913ca7.js} +18 -18
- package/build/{index-d90027a5.js → index-9436f6b0.js} +4 -4
- package/build/{index-6570d852.js → index-96f349a2.js} +2 -2
- package/build/{index-a1b50a50.js → index-9729666d.js} +2 -2
- package/build/{index-474499d7.js → index-9c361cd2.js} +24 -24
- package/build/{index-5ead853f.js → index-a0efdef1.js} +6 -6
- package/build/{index-eff9de5a.js → index-a85e5574.js} +7 -7
- package/build/{index-d13230c8.js → index-b2609f93.js} +11 -11
- package/build/{index-346b78ed.js → index-b4660279.js} +3 -3
- package/build/{index-3ff902b7.js → index-bab73bde.js} +51 -16
- package/build/{index-b3798ae1.js → index-c4355a35.js} +2 -2
- package/build/{index-f8bea6f7.js → index-cc26b9a3.js} +1 -1
- package/build/{index-3cd97c88.js → index-cd1b8576.js} +6 -6
- package/build/{index-d38b9f49.js → index-d1f9c355.js} +3 -3
- package/build/{index-2888aa0d.js → index-d5dd9a5c.js} +16 -16
- package/build/{index-7d212a91.js → index-d983f880.js} +17 -17
- package/build/{index-16e88760.js → index-dd9617e1.js} +2 -2
- package/build/{index-d4fcd1d3.js → index-de5c1ea9.js} +2 -2
- package/build/{index-3a188a9b.js → index-e2503c51.js} +16 -16
- package/build/{index-a0d42537.js → index-e282c109.js} +3 -3
- package/build/{index-f927abb8.js → index-e7c86ffb.js} +3 -3
- package/build/index-f133c73f.js +696 -0
- package/build/{index-124981ac.js → index-f2c0ccaa.js} +2 -2
- package/build/{index-a6e60b9e.js → index-f9e08032.js} +21 -21
- package/build/{index-2862f470.js → index-fa49614b.js} +5 -5
- package/build/{index-0b773c57.js → index-fd282012.js} +2 -2
- package/build/index.js +117 -117
- package/build/{labelSorting-91beddf9.js → labelSorting-7a243927.js} +4 -4
- package/build/lead/helpers.d.ts +1 -51
- package/build/lead/index.d.ts +1 -2
- package/build/lead/services/index.d.ts +0 -14
- package/build/lead.js +303 -1227
- package/build/{logoIcon-f214edfa.js → logoIcon-fb4a753d.js} +2 -2
- package/build/mantine.js +22 -22
- package/build/misc.js +17 -17
- package/build/miscGetDynamicHealthTool.js +4 -4
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +73 -73
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +16 -16
- package/build/navigation.js +45 -45
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +23 -23
- package/build/onboardingV2.js +28 -28
- package/build/organisms.js +49 -49
- package/build/{post-71039d7e.js → post-4db47c48.js} +2 -2
- package/build/profileNavigation.js +19 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -22
- package/build/ssoV2.js +27 -27
- package/build/{store-c8fa067a.js → store-09ba79ae.js} +4 -4
- package/build/subot.js +45 -41
- package/build/surveyOrPremiumBanner.js +32 -32
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-7b2781bc.js → surveyThankyouCard-37088085.js} +5 -5
- package/build/together.js +55 -55
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +50 -50
- package/build/togetherMoleculesCardAuthor.js +28 -28
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +38 -38
- package/build/togetherOrganisms.js +49 -49
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +10 -10
- package/build/{treePopoverMenu-ef9818ce.js → treePopoverMenu-675e6b64.js} +19 -19
- package/build/{types-95e861df.js → types-0615a42f.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-dcc735eb.js → useCategory-33968519.js} +5 -5
- package/build/{useHealthToolCache-ab042676.js → useHealthToolCache-41f87360.js} +1 -1
- package/build/{useMantineLocale-bfaf810c.js → useMantineLocale-b2b8456f.js} +6 -6
- package/build/{usePlacesAutocomplete-db5d0254.js → usePlacesAutocomplete-a70a507c.js} +1 -1
- package/build/{useScreenSize-53337b39.js → useScreenSize-6c744f22.js} +2 -2
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-92bf9062.js → utils-26919fe3.js} +4 -4
- package/build/{utils-fe6c5f1f.js → utils-67f8997f.js} +2 -2
- package/build/{utils-665877d3.js → utils-a3927db1.js} +2 -2
- package/build/{utils-d8a37749.js → utils-dfd8ede1.js} +3 -3
- package/build/vaccination.js +21 -21
- package/package.json +3 -3
- package/build/components/mantine/phoneInput/PhoneInput.d.ts +0 -15
- package/build/components/mantine/phoneInput/index.d.ts +0 -1
- package/build/esm/components/mantine/phoneInput/PhoneInput.d.ts +0 -15
- package/build/esm/components/mantine/phoneInput/index.d.ts +0 -1
- package/build/esm/index-d1c3d3f8.js +0 -372
- package/build/esm/lead/LeadGenForm/LeadGenForm.d.ts +0 -41
- package/build/esm/lead/LeadGenForm/LeadGenForm.styled.d.ts +0 -5
- package/build/esm/lead/LeadGenForm/LeadGenThankYou.d.ts +0 -20
- package/build/esm/lead/LeadGenForm/index.d.ts +0 -1
- package/build/esm/lead/LeadGenForm/textField/index.d.ts +0 -13
- package/build/esm/lead/LeadGenForm/textField/index.styled.d.ts +0 -11
- package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +0 -25
- package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContext.d.ts +0 -25
- package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxWrapper.d.ts +0 -30
- package/build/esm/lead/LeadGenSubscriptionBox/index.d.ts +0 -1
- package/build/index-500d59e0.js +0 -379
- package/build/lead/LeadGenForm/LeadGenForm.d.ts +0 -41
- package/build/lead/LeadGenForm/LeadGenForm.styled.d.ts +0 -5
- package/build/lead/LeadGenForm/LeadGenThankYou.d.ts +0 -20
- package/build/lead/LeadGenForm/index.d.ts +0 -1
- package/build/lead/LeadGenForm/textField/index.d.ts +0 -13
- package/build/lead/LeadGenForm/textField/index.styled.d.ts +0 -11
- package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +0 -25
- package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContext.d.ts +0 -25
- package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxWrapper.d.ts +0 -30
- package/build/lead/LeadGenSubscriptionBox/index.d.ts +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-77d32ede.js → BMI_BOYS.percentile.monthly-e21bf471.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-34068a3d.js → BMI_BOYS.percentile.weekly-844be72c.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-3b87566c.js → BMI_BOYS.percentile.yearly-1628dfcb.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-fd248b60.js → BMI_BOYS.zscore.monthly-4dc30031.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-70ffc0ea.js → BMI_BOYS.zscore.weekly-12184e3e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-9d8fb3b3.js → BMI_BOYS.zscore.yearly-603df4b4.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-be3ccc40.js → BMI_GIRLS.percentile.monthly-23fd6bb8.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-318e81d5.js → BMI_GIRLS.percentile.weekly-a4ad7b02.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-8cff53b7.js → BMI_GIRLS.percentile.yearly-c7edde7d.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-eae04f1f.js → BMI_GIRLS.zscore.monthly-1191b9ba.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-f2f829e5.js → BMI_GIRLS.zscore.weekly-bdb048c0.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-0516fac2.js → BMI_GIRLS.zscore.yearly-d4214539.js} +0 -0
- /package/build/{ChevronDown-df85dca7.js → ChevronDown-222010c3.js} +0 -0
- /package/build/{Close-c4c272a5.js → Close-375881e5.js} +0 -0
- /package/build/{Google-60d29b65.js → Google-3fce729c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-bf4b9347.js → HEAD CIRCUM_BOYS.percentile.monthly-891bee55.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-bdedbbe6.js → HEAD CIRCUM_BOYS.percentile.weekly-236f5055.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-e3f79ff0.js → HEAD CIRCUM_BOYS.percentile.yearly-3b2449d4.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-69264ee8.js → HEAD CIRCUM_BOYS.zscore.monthly-ff977586.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-231eed82.js → HEAD CIRCUM_BOYS.zscore.weekly-442b9b70.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-79f0540f.js → HEAD CIRCUM_BOYS.zscore.yearly-51595528.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-89357b63.js → HEAD CIRCUM_GIRLS.percentile.monthly-b06c7829.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-5a40c0ea.js → HEAD CIRCUM_GIRLS.percentile.weekly-3b2e6bf5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-b57a585c.js → HEAD CIRCUM_GIRLS.percentile.yearly-8c8976b0.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-6f40c001.js → HEAD CIRCUM_GIRLS.zscore.monthly-e6ea1af5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-c4d1a3dc.js → HEAD CIRCUM_GIRLS.zscore.weekly-ce88ef80.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-0d13cc51.js → HEAD CIRCUM_GIRLS.zscore.yearly-c1d525f8.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-4923dfb7.js → HEIGHT_BOYS.percentile.monthly-1cf99123.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-8f73dc29.js → HEIGHT_BOYS.percentile.weekly-5e005e4c.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-e170e80e.js → HEIGHT_BOYS.percentile.yearly-700cf50c.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-fefc9c1b.js → HEIGHT_BOYS.zscore.monthly-81ddc6df.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-ada5533a.js → HEIGHT_BOYS.zscore.weekly-53c0deff.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-d4e83504.js → HEIGHT_BOYS.zscore.yearly-adeae0be.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-1c3fb2cf.js → HEIGHT_GIRLS.percentile.monthly-2ccfe634.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-632d45d3.js → HEIGHT_GIRLS.percentile.weekly-f63c7fa9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-51eae518.js → HEIGHT_GIRLS.percentile.yearly-08df7642.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-05d5dbc9.js → HEIGHT_GIRLS.zscore.monthly-ab9e56f1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-e42ffddc.js → HEIGHT_GIRLS.zscore.weekly-fa44e728.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-7aa691cb.js → HEIGHT_GIRLS.zscore.yearly-22c2611c.js} +0 -0
- /package/build/{Locale-bc11b358.js → Locale-83427e69.js} +0 -0
- /package/build/{Visible-b7757afc.js → Visible-1836fcb5.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-2ac98cf5.js → WEIGHT_BOYS.percentile.monthly-51177693.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-a3651c26.js → WEIGHT_BOYS.percentile.weekly-683d5004.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-2e4b61bc.js → WEIGHT_BOYS.percentile.yearly-aa12e3a2.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-9a264811.js → WEIGHT_BOYS.zscore.monthly-527d14b4.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-1af2c797.js → WEIGHT_BOYS.zscore.weekly-cab4934f.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-b04f8ded.js → WEIGHT_BOYS.zscore.yearly-eca143d6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-7848ad4d.js → WEIGHT_GIRLS.percentile.monthly-7b1a207b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-007eb8de.js → WEIGHT_GIRLS.percentile.weekly-f19a278e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-d73c397d.js → WEIGHT_GIRLS.percentile.yearly-0fe30c63.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-0919302e.js → WEIGHT_GIRLS.zscore.monthly-6a836c65.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-c23338a0.js → WEIGHT_GIRLS.zscore.weekly-21b9aafb.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-77e13b21.js → WEIGHT_GIRLS.zscore.yearly-bc8ef562.js} +0 -0
- /package/build/{animation-13a568d8.js → animation-3ade1e75.js} +0 -0
- /package/build/{constants-2905564a.js → constants-340f9eb3.js} +0 -0
- /package/build/{constants-1c1df5a8.js → constants-718b0236.js} +0 -0
- /package/build/{constants-800a381c.js → constants-7c39d76e.js} +0 -0
- /package/build/{dataTransform-6e9cbf45.js → dataTransform-376f6550.js} +0 -0
- /package/build/{doctor-9a0f4b6a.js → doctor-ca697254.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-eef6a636.js → BMI_BOYS.percentile.monthly-b259d399.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-ceb85dca.js → BMI_BOYS.percentile.weekly-862e1e2c.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-4ed4b90e.js → BMI_BOYS.percentile.yearly-0a066aeb.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-e55e9afb.js → BMI_BOYS.zscore.monthly-7b1c6cc7.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-4073dca9.js → BMI_BOYS.zscore.weekly-66aaa87d.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-0a2d322b.js → BMI_BOYS.zscore.yearly-ed889383.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-a1a82ce8.js → BMI_GIRLS.percentile.monthly-7d1c9e85.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-d9f484ed.js → BMI_GIRLS.percentile.weekly-438d4e14.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-02e0b5c6.js → BMI_GIRLS.percentile.yearly-9f0bd73f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-3086a4eb.js → BMI_GIRLS.zscore.monthly-54e2f737.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-18b946b1.js → BMI_GIRLS.zscore.weekly-923eb59a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-4b41195a.js → BMI_GIRLS.zscore.yearly-259a29e1.js} +0 -0
- /package/build/esm/{ChevronDown-75af5663.js → ChevronDown-2bf6d690.js} +0 -0
- /package/build/esm/{Close-755f3cd6.js → Close-7777eee7.js} +0 -0
- /package/build/esm/{Google-f94ba2eb.js → Google-00c6da40.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-ccf35c97.js → HEAD CIRCUM_BOYS.percentile.monthly-d65edc48.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-35cabdd6.js → HEAD CIRCUM_BOYS.percentile.weekly-80ae446b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-f1a8bfd6.js → HEAD CIRCUM_BOYS.percentile.yearly-2c3d69af.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-f62449ec.js → HEAD CIRCUM_BOYS.zscore.monthly-406e1ed4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-555e72ad.js → HEAD CIRCUM_BOYS.zscore.weekly-deefeda1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-ffb64461.js → HEAD CIRCUM_BOYS.zscore.yearly-7b64a8f7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-dbb73d21.js → HEAD CIRCUM_GIRLS.percentile.monthly-c95d6cd4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-93516e21.js → HEAD CIRCUM_GIRLS.percentile.weekly-7248e754.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-6ae63168.js → HEAD CIRCUM_GIRLS.percentile.yearly-81317562.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-ee2360c6.js → HEAD CIRCUM_GIRLS.zscore.monthly-22703fdb.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-e6aabacc.js → HEAD CIRCUM_GIRLS.zscore.weekly-85cf5634.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-ea540ad7.js → HEAD CIRCUM_GIRLS.zscore.yearly-a7b02402.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-67ae92c3.js → HEIGHT_BOYS.percentile.monthly-20161ea5.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-c388098c.js → HEIGHT_BOYS.percentile.weekly-0c1ee5e2.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-43abdda4.js → HEIGHT_BOYS.percentile.yearly-b3bd1a5e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-7cbd36eb.js → HEIGHT_BOYS.zscore.monthly-84357e65.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-dba453b8.js → HEIGHT_BOYS.zscore.weekly-0b3d0d45.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-2a9d7648.js → HEIGHT_BOYS.zscore.yearly-092355a2.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-59ab9a32.js → HEIGHT_GIRLS.percentile.monthly-a92f5b6b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-c2840739.js → HEIGHT_GIRLS.percentile.weekly-af95cfaf.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-0d408b89.js → HEIGHT_GIRLS.percentile.yearly-6d313cc8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-ed32bcd7.js → HEIGHT_GIRLS.zscore.monthly-fa8c2fff.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-7ffdfcbf.js → HEIGHT_GIRLS.zscore.weekly-e03a954b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-b994474b.js → HEIGHT_GIRLS.zscore.yearly-74015107.js} +0 -0
- /package/build/esm/{Locale-f131de60.js → Locale-f7e857ca.js} +0 -0
- /package/build/esm/{Visible-973ad72f.js → Visible-40ba379f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-fa452031.js → WEIGHT_BOYS.percentile.monthly-1e3b1109.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-4d484b6a.js → WEIGHT_BOYS.percentile.weekly-1c02c21a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-640c5c38.js → WEIGHT_BOYS.percentile.yearly-338ac039.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-4d3b328d.js → WEIGHT_BOYS.zscore.monthly-090e330e.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-33bd4dd5.js → WEIGHT_BOYS.zscore.weekly-336161d9.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-c61fc388.js → WEIGHT_BOYS.zscore.yearly-a9e1847f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-27706de0.js → WEIGHT_GIRLS.percentile.monthly-0b491ff0.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-910e041a.js → WEIGHT_GIRLS.percentile.weekly-7c0cad03.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-19634be2.js → WEIGHT_GIRLS.percentile.yearly-c5a91dbb.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-32cd08c3.js → WEIGHT_GIRLS.zscore.monthly-475c5cf9.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-e4568c26.js → WEIGHT_GIRLS.zscore.weekly-2fc95c7e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-f6e304b9.js → WEIGHT_GIRLS.zscore.yearly-fe120857.js} +0 -0
- /package/build/esm/{animation-03accc76.js → animation-ac10a2c3.js} +0 -0
- /package/build/esm/{constants-bf29e0f0.js → constants-845324ae.js} +0 -0
- /package/build/esm/{constants-fb73e3ef.js → constants-c0913a2b.js} +0 -0
- /package/build/esm/{constants-78ddad2e.js → constants-f334b206.js} +0 -0
- /package/build/esm/{dataTransform-e22fb4f9.js → dataTransform-d9b89db6.js} +0 -0
- /package/build/esm/{doctor-33c9e25e.js → doctor-d6d38f4a.js} +0 -0
- /package/build/esm/{index-25586182.js → index-15a6a497.js} +0 -0
- /package/build/esm/{index-49054ff9.js → index-5670a545.js} +0 -0
- /package/build/esm/{index-ddbcb091.js → index-596bddc7.js} +0 -0
- /package/build/esm/{index-8d7c8364.js → index-62cab603.js} +0 -0
- /package/build/esm/{index-2097a507.js → index-b0b88498.js} +0 -0
- /package/build/esm/{index-87d7e39b.js → index-b37b0a08.js} +0 -0
- /package/build/esm/{index-b3528a2f.js → index-c791a367.js} +0 -0
- /package/build/esm/{index-cf541b45.js → index-cd673e10.js} +0 -0
- /package/build/esm/{index.styles-3b4cb44d.js → index.styles-ccd55f9c.js} +0 -0
- /package/build/esm/{localizeNumberFormat-2063f26d.js → localizeNumberFormat-519c73f1.js} +0 -0
- /package/build/esm/{normalizeLink-8a2a5d71.js → normalizeLink-3d1161fe.js} +0 -0
- /package/build/esm/{number-b8f051b4.js → number-abea4986.js} +0 -0
- /package/build/esm/{other-6869ae5e.js → other-a530411a.js} +0 -0
- /package/build/esm/{paths-bbb40f27.js → paths-e136ce4b.js} +0 -0
- /package/build/esm/{translationsContext-3e444dde.js → translationsContext-79df4eb3.js} +0 -0
- /package/build/esm/{tslib.es6-666e3cd6.js → tslib.es6-bbcd45f4.js} +0 -0
- /package/build/esm/{types-1ba72a05.js → types-ef809cde.js} +0 -0
- /package/build/esm/{useIsInit-b49e83d5.js → useIsInit-8c2ed148.js} +0 -0
- /package/build/esm/{useOutsideClick-040db14c.js → useOutsideClick-02b20659.js} +0 -0
- /package/build/esm/{useScrollbarSize-241f3dd8.js → useScrollbarSize-588f44da.js} +0 -0
- /package/build/esm/{useUniqueId-62c78e84.js → useUniqueId-5c48d35b.js} +0 -0
- /package/build/esm/{utils-2cba8675.js → utils-bbeadd87.js} +0 -0
- /package/build/{index-1eda14d7.js → index-02be1739.js} +0 -0
- /package/build/{index-f40549f7.js → index-213d644b.js} +0 -0
- /package/build/{index-cf9f60a1.js → index-31872be9.js} +0 -0
- /package/build/{index-cb081b49.js → index-416c7ad4.js} +0 -0
- /package/build/{index-82f9a77b.js → index-6a2bf58d.js} +0 -0
- /package/build/{index-471f7ea9.js → index-748c8ace.js} +0 -0
- /package/build/{index-f446d5f6.js → index-88d33176.js} +0 -0
- /package/build/{index-30cceb74.js → index-b94dbc02.js} +0 -0
- /package/build/{index.styles-d77f7530.js → index.styles-e1a5b046.js} +0 -0
- /package/build/{localizeNumberFormat-64398792.js → localizeNumberFormat-03aef0ba.js} +0 -0
- /package/build/{normalizeLink-bbd9a1a4.js → normalizeLink-429c492d.js} +0 -0
- /package/build/{number-e99f35d4.js → number-efd222d4.js} +0 -0
- /package/build/{other-0f1056c9.js → other-a0f49391.js} +0 -0
- /package/build/{paths-64d1e0f4.js → paths-354ea2c3.js} +0 -0
- /package/build/{translationsContext-13d01c64.js → translationsContext-e4479e2d.js} +0 -0
- /package/build/{tslib.es6-ac3885bf.js → tslib.es6-231073ef.js} +0 -0
- /package/build/{types-4ac2b84e.js → types-18eefd29.js} +0 -0
- /package/build/{useIsInit-b6cb0157.js → useIsInit-fa5efcbb.js} +0 -0
- /package/build/{useOutsideClick-03282050.js → useOutsideClick-90ac37e4.js} +0 -0
- /package/build/{useScrollbarSize-3b28fc7f.js → useScrollbarSize-2d2c8f4c.js} +0 -0
- /package/build/{useUniqueId-ff573dd2.js → useUniqueId-34c70fb4.js} +0 -0
- /package/build/{utils-855dca0f.js → utils-81fb64d1.js} +0 -0
package/build/lead.js
CHANGED
|
@@ -2,47 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('./tslib.es6-
|
|
5
|
+
var tslib_es6 = require('./tslib.es6-231073ef.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var core = require('@mantine/core');
|
|
8
8
|
var dayjs = require('dayjs');
|
|
9
9
|
var debounce = require('lodash/debounce');
|
|
10
10
|
var form = require('@mantine/form');
|
|
11
|
-
var index = require('./index-
|
|
12
|
-
var translationsContext = require('./translationsContext-
|
|
11
|
+
var index = require('./index-4af29139.js');
|
|
12
|
+
var translationsContext = require('./translationsContext-e4479e2d.js');
|
|
13
13
|
var miscCookieHelper = require('./miscCookieHelper.js');
|
|
14
|
-
var utils$1 = require('./utils-
|
|
15
|
-
var index$1 = require('./index-
|
|
16
|
-
var index$2 = require('./index-
|
|
17
|
-
var index$4 = require('./index-
|
|
18
|
-
var utils = require('./utils-
|
|
19
|
-
|
|
20
|
-
var index$
|
|
21
|
-
require('./index-
|
|
22
|
-
require('./index-
|
|
23
|
-
require('./useMantineLocale-
|
|
24
|
-
var index$5 = require('./index-
|
|
25
|
-
require('./index.styles-
|
|
14
|
+
var utils$1 = require('./utils-81fb64d1.js');
|
|
15
|
+
var index$1 = require('./index-05a7ed61.js');
|
|
16
|
+
var index$2 = require('./index-b2609f93.js');
|
|
17
|
+
var index$4 = require('./index-333597fc.js');
|
|
18
|
+
var utils = require('./utils-a3927db1.js');
|
|
19
|
+
require('@mantine/dates');
|
|
20
|
+
var index$8 = require('./index-96f349a2.js');
|
|
21
|
+
require('./index-44c42111.js');
|
|
22
|
+
require('./index-416c7ad4.js');
|
|
23
|
+
require('./useMantineLocale-b2b8456f.js');
|
|
24
|
+
var index$5 = require('./index-14e030d1.js');
|
|
25
|
+
require('./index.styles-e1a5b046.js');
|
|
26
26
|
var hooks = require('@mantine/hooks');
|
|
27
|
-
require('./other-
|
|
28
|
-
require('./index-
|
|
29
|
-
var usePlacesAutocomplete = require('./usePlacesAutocomplete-
|
|
30
|
-
var index$3 = require('./index-
|
|
31
|
-
var index$6 = require('./index-
|
|
32
|
-
var styled = require('@emotion/styled');
|
|
27
|
+
require('./other-a0f49391.js');
|
|
28
|
+
require('./index-e7c86ffb.js');
|
|
29
|
+
var usePlacesAutocomplete = require('./usePlacesAutocomplete-a70a507c.js');
|
|
30
|
+
var index$3 = require('./index-2d412dd9.js');
|
|
31
|
+
var index$6 = require('./index-de5c1ea9.js');
|
|
33
32
|
var uuid = require('uuid');
|
|
33
|
+
var index$7 = require('./index-6a2bf58d.js');
|
|
34
|
+
var index$9 = require('./index-490b42ca.js');
|
|
35
|
+
var useScreenSize = require('./useScreenSize-6c744f22.js');
|
|
36
|
+
var ReactDOM = require('react-dom');
|
|
34
37
|
var react = require('@emotion/react');
|
|
38
|
+
var styled = require('@emotion/styled');
|
|
35
39
|
var miscTheme = require('./miscTheme.js');
|
|
36
|
-
var
|
|
37
|
-
var index$9 = require('./index-f7c0987b.js');
|
|
38
|
-
var useScreenSize = require('./useScreenSize-53337b39.js');
|
|
39
|
-
var ReactDOM = require('react-dom');
|
|
40
|
-
var Close = require('./Close-c4c272a5.js');
|
|
40
|
+
var Close = require('./Close-375881e5.js');
|
|
41
41
|
require('@hhgtech/icons/other');
|
|
42
42
|
require('@mantine/carousel');
|
|
43
|
-
require('./Locale-
|
|
43
|
+
require('./Locale-83427e69.js');
|
|
44
44
|
require('classnames');
|
|
45
|
-
require('./useUniqueId-
|
|
45
|
+
require('./useUniqueId-34c70fb4.js');
|
|
46
46
|
require('./constantsSite.js');
|
|
47
47
|
require('@hhgtech/icons/core');
|
|
48
48
|
require('date-fns/locale');
|
|
@@ -101,7 +101,7 @@ if (sessionStorage.getItem('insider_object')) {
|
|
|
101
101
|
}
|
|
102
102
|
const docLang = document.documentElement.lang;
|
|
103
103
|
// TODO: country code
|
|
104
|
-
const LEAD_LOCALE_DATA
|
|
104
|
+
const LEAD_LOCALE_DATA = {
|
|
105
105
|
'vi-VN': {
|
|
106
106
|
popupLang: 'vi',
|
|
107
107
|
countryCode: 'vn',
|
|
@@ -143,7 +143,7 @@ const LEAD_LOCALE_DATA$1 = {
|
|
|
143
143
|
countryCodeNumber: 91,
|
|
144
144
|
},
|
|
145
145
|
};
|
|
146
|
-
const LEAD_LOCALE = LEAD_LOCALE_DATA
|
|
146
|
+
const LEAD_LOCALE = LEAD_LOCALE_DATA[docLang] || LEAD_LOCALE_DATA['vi-VN'];
|
|
147
147
|
function LEAD_RESET_VAR() {
|
|
148
148
|
// LEAD_CURRENT_URL = location.href.toLowerCase();
|
|
149
149
|
LEAD_CURRENT_URL =
|
|
@@ -164,11 +164,6 @@ const LEAD_TIMEZONE_DATA = {
|
|
|
164
164
|
9: 'Asia/Manila', // Philippines / Filipinos Site
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
-
const LEADGEN_ACTIONS = {
|
|
168
|
-
SHOW: 'SHOW',
|
|
169
|
-
SCROLL: 'SCROLL',
|
|
170
|
-
TIME: 'TIME',
|
|
171
|
-
};
|
|
172
167
|
const LEADGEN_LAYOUT = {
|
|
173
168
|
LightBoxA: 'LightBoxA',
|
|
174
169
|
LightBoxB: 'LightBoxB',
|
|
@@ -198,10 +193,8 @@ const LEADGEN_BLOCK = {
|
|
|
198
193
|
DropdownBlock: 'DropdownBlock',
|
|
199
194
|
CheckboxBlock: 'CheckboxBlock',
|
|
200
195
|
TncBlock: 'TncBlock',
|
|
201
|
-
TitleBlock: 'TitleBlock',
|
|
202
|
-
SubtitleBlock: 'SubtitleBlock',
|
|
203
196
|
};
|
|
204
|
-
const
|
|
197
|
+
const LEADGEN_BLOCK_IN_FORM = [
|
|
205
198
|
LEADGEN_BLOCK.TextBlock,
|
|
206
199
|
LEADGEN_BLOCK.NumberBlock,
|
|
207
200
|
LEADGEN_BLOCK.DateBlock,
|
|
@@ -217,48 +210,6 @@ const LEADGEN_BLOCK_INPUT = [
|
|
|
217
210
|
LEADGEN_BLOCK.TncBlock,
|
|
218
211
|
];
|
|
219
212
|
const SSO_MAP_LEAD = ['name', 'email', 'birthday', 'phone', 'gender'];
|
|
220
|
-
const LEAD_LOCALE_DATA = {
|
|
221
|
-
'vi-VN': {
|
|
222
|
-
popupLang: 'vi',
|
|
223
|
-
countryCode: 'vn',
|
|
224
|
-
countryCodeNumber: 84,
|
|
225
|
-
},
|
|
226
|
-
'id-ID': {
|
|
227
|
-
popupLang: 'id',
|
|
228
|
-
countryCode: 'id',
|
|
229
|
-
countryCodeNumber: 62,
|
|
230
|
-
},
|
|
231
|
-
'th-TH': {
|
|
232
|
-
popupLang: 'th',
|
|
233
|
-
countryCode: 'th',
|
|
234
|
-
countryCodeNumber: 66,
|
|
235
|
-
},
|
|
236
|
-
'ms-MY': {
|
|
237
|
-
popupLang: 'ms',
|
|
238
|
-
countryCode: 'my',
|
|
239
|
-
countryCodeNumber: 60,
|
|
240
|
-
},
|
|
241
|
-
'zh-TW': {
|
|
242
|
-
popupLang: 'zh',
|
|
243
|
-
countryCode: 'tw',
|
|
244
|
-
countryCodeNumber: 886,
|
|
245
|
-
},
|
|
246
|
-
'km-KH': {
|
|
247
|
-
popupLang: 'km',
|
|
248
|
-
countryCode: 'kh',
|
|
249
|
-
countryCodeNumber: 855,
|
|
250
|
-
},
|
|
251
|
-
'my-MM': {
|
|
252
|
-
popupLang: 'my',
|
|
253
|
-
countryCode: 'mm',
|
|
254
|
-
countryCodeNumber: 95,
|
|
255
|
-
},
|
|
256
|
-
'hi-IN': {
|
|
257
|
-
popupLang: 'hi',
|
|
258
|
-
countryCode: 'in',
|
|
259
|
-
countryCodeNumber: 91,
|
|
260
|
-
},
|
|
261
|
-
};
|
|
262
213
|
const mappingSSOToLead = (userInfoProps) => {
|
|
263
214
|
var _a, _b;
|
|
264
215
|
try {
|
|
@@ -274,7 +225,7 @@ const mappingSSOToLead = (userInfoProps) => {
|
|
|
274
225
|
if (ssoKey === 'birthday') {
|
|
275
226
|
const dob = dayjs__default["default"](initValue, 'YYYY-MM-DD', true);
|
|
276
227
|
if (dob.isValid()) {
|
|
277
|
-
user.birthday = dob
|
|
228
|
+
user.birthday = dob;
|
|
278
229
|
}
|
|
279
230
|
}
|
|
280
231
|
else if (ssoKey === 'gender') {
|
|
@@ -297,46 +248,6 @@ const mappingSSOToLead = (userInfoProps) => {
|
|
|
297
248
|
catch (error) {
|
|
298
249
|
return;
|
|
299
250
|
}
|
|
300
|
-
};
|
|
301
|
-
const formatCampaignDetail = (campaign) => {
|
|
302
|
-
if (!campaign) {
|
|
303
|
-
return {};
|
|
304
|
-
}
|
|
305
|
-
try {
|
|
306
|
-
const { extra_fields, thank_you_image } = campaign || {};
|
|
307
|
-
const { textBlocks: exTextBlocks, imageBlocks: exImageBlocks, listBlockAdded: exListBlockAdded, listBlockThankyou: exListBlockThankyou, actionBlocks: exActionBlocks, } = extra_fields;
|
|
308
|
-
const textBlocks = JSON.parse(exTextBlocks);
|
|
309
|
-
const imageBlocks = JSON.parse(exImageBlocks);
|
|
310
|
-
const listBlockAdded = JSON.parse(exListBlockAdded);
|
|
311
|
-
const listBlockThankyou = JSON.parse(exListBlockThankyou);
|
|
312
|
-
const actionBlocks = JSON.parse(exActionBlocks);
|
|
313
|
-
const ThankYouBlock = {
|
|
314
|
-
image: { src: thank_you_image },
|
|
315
|
-
};
|
|
316
|
-
listBlockThankyou.forEach((block) => {
|
|
317
|
-
const { name, data } = block || {};
|
|
318
|
-
const { value: htmlText, align, newtab, url } = data || {};
|
|
319
|
-
switch (name) {
|
|
320
|
-
case LEADGEN_BLOCK.TitleBlock: {
|
|
321
|
-
ThankYouBlock.title = { htmlText, align };
|
|
322
|
-
}
|
|
323
|
-
case LEADGEN_BLOCK.SubtitleBlock: {
|
|
324
|
-
ThankYouBlock.description = { htmlText, align };
|
|
325
|
-
}
|
|
326
|
-
case LEADGEN_BLOCK.LinkButtonBlock: {
|
|
327
|
-
ThankYouBlock.button = { htmlText, newtab, url };
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
return Object.assign(Object.assign({}, campaign), { extra_fields: Object.assign(Object.assign({}, extra_fields), { textBlocks,
|
|
332
|
-
imageBlocks,
|
|
333
|
-
listBlockAdded,
|
|
334
|
-
listBlockThankyou,
|
|
335
|
-
actionBlocks }), ThankYouBlock });
|
|
336
|
-
}
|
|
337
|
-
catch (error) {
|
|
338
|
-
return {};
|
|
339
|
-
}
|
|
340
251
|
};
|
|
341
252
|
|
|
342
253
|
class Store {
|
|
@@ -347,13 +258,6 @@ class Store {
|
|
|
347
258
|
}
|
|
348
259
|
const leadStore = new Store();
|
|
349
260
|
|
|
350
|
-
const LEADGEN_API_METHOD = {
|
|
351
|
-
GET: 'get',
|
|
352
|
-
POST: 'POST',
|
|
353
|
-
};
|
|
354
|
-
const LEADGEN_API_PATH = {
|
|
355
|
-
V2_CAMPAIGN: 'api/v2/campaign',
|
|
356
|
-
};
|
|
357
261
|
const leadApi = {
|
|
358
262
|
call(_a) {
|
|
359
263
|
var { url, data = undefined } = _a, config = tslib_es6.__rest(_a, ["url", "data"]);
|
|
@@ -457,39 +361,8 @@ const verifyOtpLead = ({ phone, otp, type, }) => {
|
|
|
457
361
|
},
|
|
458
362
|
});
|
|
459
363
|
};
|
|
460
|
-
const campaignGetByCode = (campaign_code) => {
|
|
461
|
-
return leadApi.call({
|
|
462
|
-
url: `${LEADGEN_API_PATH.V2_CAMPAIGN}/${campaign_code}`,
|
|
463
|
-
method: LEADGEN_API_METHOD.GET,
|
|
464
|
-
});
|
|
465
|
-
};
|
|
466
|
-
const campaignPostLead = ({ data }) => {
|
|
467
|
-
return leadApi.call({
|
|
468
|
-
url: 'api/v2/subscription-box',
|
|
469
|
-
method: LEADGEN_API_METHOD.POST,
|
|
470
|
-
data,
|
|
471
|
-
});
|
|
472
|
-
};
|
|
473
|
-
const campaignPostImpression = ({ code, action, title_article, ga_client_id, cookie_id, extra, url, referrer, }) => {
|
|
474
|
-
return leadApi.call({
|
|
475
|
-
url: `api/campaign/${code}/impression`,
|
|
476
|
-
method: LEADGEN_API_METHOD.POST,
|
|
477
|
-
data: {
|
|
478
|
-
action,
|
|
479
|
-
title_article,
|
|
480
|
-
cookie_id,
|
|
481
|
-
ga_client_id,
|
|
482
|
-
url,
|
|
483
|
-
extra,
|
|
484
|
-
referrer,
|
|
485
|
-
},
|
|
486
|
-
});
|
|
487
|
-
};
|
|
488
364
|
const Service = {
|
|
489
365
|
campaignGetById,
|
|
490
|
-
campaignGetByCode,
|
|
491
|
-
campaignPostLead,
|
|
492
|
-
campaignPostImpression,
|
|
493
366
|
validateEmailOrPhoneOnSubot,
|
|
494
367
|
validateEmailOrPhoneOnLeadGen,
|
|
495
368
|
validatePhoneNumberOnLeadGen,
|
|
@@ -1491,1065 +1364,66 @@ const getTranslations = (locale) => {
|
|
|
1491
1364
|
|
|
1492
1365
|
const LeadGenContext = React.createContext({});
|
|
1493
1366
|
|
|
1494
|
-
const
|
|
1495
|
-
const
|
|
1496
|
-
const
|
|
1497
|
-
const [
|
|
1498
|
-
|
|
1499
|
-
const translationContextValue = { locale, values: getTranslations(locale) };
|
|
1367
|
+
const useImageSize = (src) => {
|
|
1368
|
+
const [width, setWidth] = React.useState(16);
|
|
1369
|
+
const [height, setHeight] = React.useState(9);
|
|
1370
|
+
const [loaded, setLoaded] = React.useState(false);
|
|
1371
|
+
// load src image to get its width and height
|
|
1500
1372
|
React.useEffect(() => {
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1373
|
+
setLoaded(false);
|
|
1374
|
+
if (src) {
|
|
1375
|
+
const img = new Image();
|
|
1376
|
+
img.addEventListener('load', () => {
|
|
1377
|
+
setWidth(img.naturalWidth);
|
|
1378
|
+
setHeight(img.naturalHeight);
|
|
1379
|
+
setLoaded(true);
|
|
1380
|
+
});
|
|
1381
|
+
img.addEventListener('error', () => {
|
|
1382
|
+
setWidth(16);
|
|
1383
|
+
setHeight(9);
|
|
1384
|
+
setLoaded(true);
|
|
1510
1385
|
});
|
|
1386
|
+
img.src = src;
|
|
1511
1387
|
}
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1388
|
+
else {
|
|
1389
|
+
setWidth(16);
|
|
1390
|
+
setHeight(9);
|
|
1391
|
+
setLoaded(true);
|
|
1392
|
+
}
|
|
1393
|
+
}, [src]);
|
|
1394
|
+
return {
|
|
1395
|
+
loaded,
|
|
1396
|
+
width,
|
|
1397
|
+
height,
|
|
1398
|
+
};
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
const CloseButton = ({ onClose, containerClassName, svgClassName, }) => (React__default["default"].createElement("button", { onClick: onClose, className: `le-newbuilder-close-button js-modal__close ${containerClassName || ''}` },
|
|
1402
|
+
React__default["default"].createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", className: svgClassName },
|
|
1403
|
+
React__default["default"].createElement("path", { d: "M9.99981 10.8432L14.0583 14.9017C14.1691 15.0125 14.3083 15.0691 14.476 15.0717C14.6437 15.0743 14.7854 15.0176 14.9013 14.9017C15.0172 14.7858 15.0752 14.6453 15.0752 14.4802C15.0752 14.3151 15.0172 14.1746 14.9013 14.0587L10.8429 10.0002L14.9013 5.9417C15.0121 5.83094 15.0688 5.69172 15.0713 5.52402C15.0739 5.35634 15.0172 5.21456 14.9013 5.09866C14.7854 4.98276 14.6449 4.9248 14.4798 4.9248C14.3147 4.9248 14.1742 4.98276 14.0583 5.09866L9.99981 9.15712L5.94133 5.09866C5.83057 4.98789 5.69135 4.93122 5.52365 4.92866C5.35598 4.92609 5.21419 4.98276 5.09829 5.09866C4.98239 5.21456 4.92444 5.35506 4.92444 5.52018C4.92444 5.6853 4.98239 5.82581 5.09829 5.9417L9.15675 10.0002L5.09829 14.0587C4.98752 14.1694 4.93085 14.3087 4.9283 14.4763C4.92572 14.644 4.98239 14.7858 5.09829 14.9017C5.21419 15.0176 5.3547 15.0756 5.51982 15.0756C5.68493 15.0756 5.82544 15.0176 5.94133 14.9017L9.99981 10.8432Z" }))));
|
|
1404
|
+
|
|
1405
|
+
// url: imageBlocks.imageMobile.data.url
|
|
1406
|
+
// newTab: imageBlocks.imageMobile.data.newtab
|
|
1407
|
+
// imageMobile: campaignShow.image
|
|
1408
|
+
// imageDestkop: campaignShow.image_desktop
|
|
1409
|
+
const CenterTabLayout = ({ popupId, url, newTab, imageDestkop, imageMobile, onClose, onOtherSubmit, }) => {
|
|
1410
|
+
const { width: imageMobileWidth, height: imageMobileHeight, loaded: imageMobileLoaded, } = useImageSize(imageMobile);
|
|
1411
|
+
const { width: imageDestkopWidth, height: imageDestkopHeight, loaded: imageDestkopLoaded, } = useImageSize(imageDestkop);
|
|
1412
|
+
if (!imageMobileLoaded || !imageDestkopLoaded)
|
|
1521
1413
|
return null;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
const validateObj = React.useMemo(() => {
|
|
1536
|
-
const InputBlocks = [
|
|
1537
|
-
'TextBlock',
|
|
1538
|
-
'NumberBlock',
|
|
1539
|
-
'EmailBlock',
|
|
1540
|
-
'PhoneBlock',
|
|
1541
|
-
'DateBlock',
|
|
1542
|
-
'CheckboxBlock',
|
|
1543
|
-
'RadioBlock',
|
|
1544
|
-
'DropdownBlock',
|
|
1545
|
-
'PhoneOtpBlock',
|
|
1546
|
-
'WhatsappOtpBlock',
|
|
1547
|
-
'ZaloOtpBlock',
|
|
1548
|
-
'LocationBlock',
|
|
1549
|
-
'TncBlock',
|
|
1550
|
-
];
|
|
1551
|
-
// ALL are required and can skip if not touched yet
|
|
1552
|
-
const withSharedCheck = (name, cb,
|
|
1553
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1554
|
-
block) => {
|
|
1555
|
-
return (value) => {
|
|
1556
|
-
var _a;
|
|
1557
|
-
const isBLockRequired = (_a = block === null || block === void 0 ? void 0 : block.data) === null || _a === void 0 ? void 0 : _a.required;
|
|
1558
|
-
if (!formRef.current.isTouched(name))
|
|
1559
|
-
return;
|
|
1560
|
-
if ((typeof value === 'string' && value.replace(' ', '') === '') ||
|
|
1561
|
-
typeof value === 'undefined' ||
|
|
1562
|
-
value === '' ||
|
|
1563
|
-
(Array.isArray(value) && value.length === 0)) {
|
|
1564
|
-
return isBLockRequired
|
|
1565
|
-
? t('validator.required')
|
|
1566
|
-
: cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1567
|
-
}
|
|
1568
|
-
return cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1569
|
-
};
|
|
1570
|
-
};
|
|
1571
|
-
return listBlockAdded
|
|
1572
|
-
.filter((b) => InputBlocks.includes(b.name))
|
|
1573
|
-
.reduce((r, b) => {
|
|
1574
|
-
var _a;
|
|
1575
|
-
const isRequired = (_a = b.data.required) !== null && _a !== void 0 ? _a : true;
|
|
1576
|
-
if (b.name === 'NumberBlock') {
|
|
1577
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1578
|
-
if (value && isNaN(Number(value))) {
|
|
1579
|
-
return t('validator.number');
|
|
1580
|
-
}
|
|
1581
|
-
}, b) });
|
|
1582
|
-
}
|
|
1583
|
-
else if (b.name === 'EmailBlock') {
|
|
1584
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1585
|
-
if (value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
1586
|
-
return t('validator.email');
|
|
1587
|
-
}
|
|
1588
|
-
if (!value)
|
|
1589
|
-
return;
|
|
1590
|
-
validatingEmailRef.current = true;
|
|
1591
|
-
setTimeout(() => {
|
|
1592
|
-
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
1593
|
-
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1594
|
-
email: value,
|
|
1595
|
-
})
|
|
1596
|
-
.then((tKey) => {
|
|
1597
|
-
if (tKey) {
|
|
1598
|
-
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1599
|
-
}
|
|
1600
|
-
else {
|
|
1601
|
-
formRef.current.clearFieldError(b.data.value);
|
|
1602
|
-
}
|
|
1603
|
-
validatingEmailRef.current = false;
|
|
1604
|
-
})
|
|
1605
|
-
.catch((e) => {
|
|
1606
|
-
console.error(e);
|
|
1607
|
-
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
1608
|
-
validatingEmailRef.current = false;
|
|
1609
|
-
});
|
|
1610
|
-
}, 200);
|
|
1611
|
-
}, b) });
|
|
1612
|
-
}
|
|
1613
|
-
else if (b.name === 'PhoneBlock' ||
|
|
1614
|
-
b.name === 'PhoneOtpBlock' ||
|
|
1615
|
-
b.name === 'ZaloOtpBlock' ||
|
|
1616
|
-
b.name === 'WhatsappOtpBlock') {
|
|
1617
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1618
|
-
if (value &&
|
|
1619
|
-
window.intlTelInputUtils &&
|
|
1620
|
-
!window.intlTelInputUtils.isValidNumber(String(value), LEAD_LOCALE.countryCode)) {
|
|
1621
|
-
return t('validator.phone');
|
|
1622
|
-
}
|
|
1623
|
-
if (!value)
|
|
1624
|
-
return;
|
|
1625
|
-
validatingPhoneRef.current = true;
|
|
1626
|
-
setTimeout(() => {
|
|
1627
|
-
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
1628
|
-
if (b.data.singleSubmission) {
|
|
1629
|
-
checkUsedPhoneOnlyWithCache(campaignId, value)
|
|
1630
|
-
.then((tKey) => {
|
|
1631
|
-
if (tKey) {
|
|
1632
|
-
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1633
|
-
}
|
|
1634
|
-
else {
|
|
1635
|
-
formRef.current.clearFieldError(b.data.value);
|
|
1636
|
-
}
|
|
1637
|
-
validatingPhoneRef.current = false;
|
|
1638
|
-
})
|
|
1639
|
-
.catch((err) => {
|
|
1640
|
-
console.error(err);
|
|
1641
|
-
formRef.current.setFieldError(b.data.value, err.message || 'Something went wrong');
|
|
1642
|
-
validatingPhoneRef.current = false;
|
|
1643
|
-
});
|
|
1644
|
-
}
|
|
1645
|
-
else {
|
|
1646
|
-
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1647
|
-
phone: value,
|
|
1648
|
-
})
|
|
1649
|
-
.then((tKey) => {
|
|
1650
|
-
if (tKey) {
|
|
1651
|
-
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1652
|
-
}
|
|
1653
|
-
else {
|
|
1654
|
-
formRef.current.clearFieldError(b.data.value);
|
|
1655
|
-
}
|
|
1656
|
-
validatingPhoneRef.current = false;
|
|
1657
|
-
})
|
|
1658
|
-
.catch((e) => {
|
|
1659
|
-
console.error(e);
|
|
1660
|
-
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
1661
|
-
validatingPhoneRef.current = false;
|
|
1662
|
-
});
|
|
1663
|
-
}
|
|
1664
|
-
}, 200);
|
|
1665
|
-
}, b) });
|
|
1666
|
-
}
|
|
1667
|
-
else if (b.name === 'DateBlock') {
|
|
1668
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1669
|
-
if (value && isNaN(Date.parse(value))) {
|
|
1670
|
-
return t('validator.date');
|
|
1671
|
-
}
|
|
1672
|
-
}, b) });
|
|
1673
|
-
}
|
|
1674
|
-
else if (b.name === 'TncBlock') {
|
|
1675
|
-
return Object.assign(Object.assign({}, r), { [`TNC-` + b.id]: withSharedCheck('TNC-' + b.id, (value) => {
|
|
1676
|
-
if (isRequired && !value) {
|
|
1677
|
-
return t('validator.required');
|
|
1678
|
-
}
|
|
1679
|
-
}, b) });
|
|
1680
|
-
}
|
|
1681
|
-
else {
|
|
1682
|
-
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, undefined, b) });
|
|
1683
|
-
}
|
|
1684
|
-
}, {});
|
|
1685
|
-
}, [listBlockAdded.map((b) => b.name).join(',')]);
|
|
1686
|
-
const form = useLeadForm({
|
|
1687
|
-
validateInputOnChange: true,
|
|
1688
|
-
clearInputErrorOnChange: true,
|
|
1689
|
-
validate: validateObj,
|
|
1690
|
-
initialValues,
|
|
1691
|
-
});
|
|
1692
|
-
const formRef = React.useRef(form);
|
|
1693
|
-
formRef.current = form;
|
|
1694
|
-
return { form, validateObj };
|
|
1695
|
-
};
|
|
1696
|
-
|
|
1697
|
-
const PhoneInput = React.forwardRef((props, ref) => {
|
|
1698
|
-
const { defaultCountry, id: idProps, name, placeholder, label, labelElement, labelProps, description, descriptionProps, withAsterisk, inputMode, inputContainer, inputWrapperOrder, error, className, classNames, style, styles } = props, restProps = tslib_es6.__rest(props, ["defaultCountry", "id", "name", "placeholder", "label", "labelElement", "labelProps", "description", "descriptionProps", "withAsterisk", "inputMode", "inputContainer", "inputWrapperOrder", "error", "className", "classNames", "style", "styles"]);
|
|
1699
|
-
const id = idProps || uuid.v1() + name;
|
|
1700
|
-
return (React__default["default"].createElement(core.Input.Wrapper, { size: "md", label: label, labelElement: labelElement, labelProps: Object.assign({ htmlFor: id }, labelProps), description: description, descriptionProps: descriptionProps, withAsterisk: withAsterisk, inputMode: inputMode, inputContainer: inputContainer, inputWrapperOrder: inputWrapperOrder, error: error, "data-invalid": !!error, className: className, classNames: classNames, style: style, styles: styles },
|
|
1701
|
-
React__default["default"].createElement("div", { className: "mantine-Input-wrapper" },
|
|
1702
|
-
React__default["default"].createElement(index$2.Phone, Object.assign({}, restProps, { id: id, ref: ref, name: name, spellCheck: false, placeholder: placeholder, defaultCountry: defaultCountry, className: "mantine-Input-input", type: "tel", "data-control": "tel" })))));
|
|
1703
|
-
});
|
|
1704
|
-
|
|
1705
|
-
const StyledLeadGenFormInner = styled__default["default"].div `
|
|
1706
|
-
display: flex;
|
|
1707
|
-
flex-wrap: wrap;
|
|
1708
|
-
gap: 8px;
|
|
1709
|
-
.leadgen-form_input {
|
|
1710
|
-
width: calc(50% - 4px);
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
.leadgen-form_input_checkbox {
|
|
1714
|
-
width: 100%;
|
|
1715
|
-
}
|
|
1716
|
-
`;
|
|
1717
|
-
|
|
1718
|
-
const cssInputNotShrink$1 = react.css `
|
|
1719
|
-
height: 100% !important;
|
|
1720
|
-
min-height: calc(var(--container-height, 56px) * 22 / 56);
|
|
1721
|
-
color: ${miscTheme.theme.colors.gray800};
|
|
1722
|
-
font-size: var(--input, 16px);
|
|
1723
|
-
line-height: calc(var(--container-height, 56px) * 22 / 56);
|
|
1724
|
-
border: none !important;
|
|
1725
|
-
border-radius: 0 !important;
|
|
1726
|
-
outline: none !important;
|
|
1727
|
-
box-shadow: none !important;
|
|
1728
|
-
padding: 0;
|
|
1729
|
-
cursor: pointer;
|
|
1730
|
-
opacity: 0;
|
|
1731
|
-
|
|
1732
|
-
::placeholder {
|
|
1733
|
-
color: ${miscTheme.theme.colors.gray400};
|
|
1734
|
-
}
|
|
1735
|
-
`;
|
|
1736
|
-
const cssInputShrink$1 = react.css `
|
|
1737
|
-
height: auto !important;
|
|
1738
|
-
cursor: text;
|
|
1739
|
-
opacity: 1;
|
|
1740
|
-
transition: 0.1s ease-in-out all;
|
|
1741
|
-
`;
|
|
1742
|
-
const cssLabelNotShrink$1 = react.css `
|
|
1743
|
-
position: absolute;
|
|
1744
|
-
top: calc(var(--container-height) / 2);
|
|
1745
|
-
left: var(--space-x, 16px);
|
|
1746
|
-
color: ${miscTheme.theme.colors.gray400};
|
|
1747
|
-
font-size: var(--label-not-shrink, 16px);
|
|
1748
|
-
font-weight: 400;
|
|
1749
|
-
line-height: calc(var(--container-height, 56px) * 18 / 56);
|
|
1750
|
-
margin: 0;
|
|
1751
|
-
z-index: 1;
|
|
1752
|
-
cursor: pointer;
|
|
1753
|
-
transform: translateY(-50%);
|
|
1754
|
-
transition: 0.125s ease-in all;
|
|
1755
|
-
`;
|
|
1756
|
-
const cssLabelShrink$1 = react.css `
|
|
1757
|
-
color: ${miscTheme.theme.colors.gray600};
|
|
1758
|
-
font-weight: 600;
|
|
1759
|
-
font-size: var(--label-shrink, 12px);
|
|
1760
|
-
top: calc(var(--container-height) * 7 / 56);
|
|
1761
|
-
transform: none;
|
|
1762
|
-
transition: 0.125s ease-out all;
|
|
1763
|
-
`;
|
|
1764
|
-
const cssWrapperInputNotShrink$1 = react.css `
|
|
1765
|
-
min-height: var(--container-height, 56px);
|
|
1766
|
-
display: flex;
|
|
1767
|
-
align-items: flex-end;
|
|
1768
|
-
border: 1px solid ${miscTheme.theme.colors.gray200};
|
|
1769
|
-
border-radius: 8px;
|
|
1770
|
-
background-color: #fff;
|
|
1771
|
-
padding-inline: var(--space-x, 16px);
|
|
1772
|
-
padding-block: var(--space-y-not-shrink, 16px);
|
|
1773
|
-
cursor: pointer;
|
|
1774
|
-
pointer-events: none;
|
|
1775
|
-
|
|
1776
|
-
&:has(.mantine-Input-rightSection) {
|
|
1777
|
-
padding-right: var(--container-height, 56px);
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
.mantine-Input-icon {
|
|
1781
|
-
display: none;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
.mantine-NumberInput-control {
|
|
1785
|
-
border-color: ${miscTheme.theme.colors.gray200};
|
|
1786
|
-
}
|
|
1787
|
-
`;
|
|
1788
|
-
const cssWrapperInputShrink$1 = react.css `
|
|
1789
|
-
height: auto;
|
|
1790
|
-
min-height: var(--container-height, 56px);
|
|
1791
|
-
padding-block: var(--space-y-shrink, 7px);
|
|
1792
|
-
cursor: text;
|
|
1793
|
-
pointer-events: auto;
|
|
1794
|
-
`;
|
|
1795
|
-
const cssInputWrapperError$1 = react.css `
|
|
1796
|
-
color: ${miscTheme.theme.colors.red800};
|
|
1797
|
-
font-size: 12px;
|
|
1798
|
-
line-height: 1.5;
|
|
1799
|
-
`;
|
|
1800
|
-
const StyledTextFieldContainer$1 = styled__default["default"].div `
|
|
1801
|
-
--space-x: 16px;
|
|
1802
|
-
--space-y-not-shrink: 16px;
|
|
1803
|
-
--space-y-shrink: 7px;
|
|
1804
|
-
--container-height: 56px;
|
|
1805
|
-
--label-not-shrink: 16px;
|
|
1806
|
-
--label-shrink: 12px;
|
|
1807
|
-
--input: 16px;
|
|
1808
|
-
|
|
1809
|
-
position: relative;
|
|
1810
|
-
min-width: 100px;
|
|
1811
|
-
max-width: 100%;
|
|
1812
|
-
display: inline-block;
|
|
1813
|
-
|
|
1814
|
-
.textField_wrapper {
|
|
1815
|
-
display: inline-block;
|
|
1816
|
-
width: 100%;
|
|
1817
|
-
cursor: pointer;
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
.mantine-InputWrapper-root {
|
|
1821
|
-
&[data-invalid='true'] {
|
|
1822
|
-
.mantine-Input-wrapper {
|
|
1823
|
-
border-color: ${miscTheme.theme.colors.red400};
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
.mantine-Input-wrapper {
|
|
1828
|
-
&:has([data-invalid]) {
|
|
1829
|
-
border-color: ${miscTheme.theme.colors.red400};
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
.mantine-InputWrapper-label {
|
|
1835
|
-
${cssLabelNotShrink$1}
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
.mantine-Input-wrapper {
|
|
1839
|
-
${cssWrapperInputNotShrink$1}
|
|
1840
|
-
|
|
1841
|
-
+ .mantine-Popover-dropdown[data-position="bottom-start"] {
|
|
1842
|
-
left: 0 !important;
|
|
1843
|
-
}
|
|
1844
|
-
+ .mantine-Popover-dropdown[data-position='top-start'] {
|
|
1845
|
-
top: unset !important;
|
|
1846
|
-
left: 0 !important;
|
|
1847
|
-
bottom: 100% !important;
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
.mantine-Input-input {
|
|
1852
|
-
${cssInputNotShrink$1}
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
&.textField_shrink,
|
|
1856
|
-
&:focus-within {
|
|
1857
|
-
.mantine-InputWrapper-label {
|
|
1858
|
-
${cssLabelShrink$1}
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
.mantine-Input-wrapper {
|
|
1862
|
-
${cssWrapperInputShrink$1}
|
|
1863
|
-
&.mantine-Select-wrapper {
|
|
1864
|
-
.mantine-Select-rightSection {
|
|
1865
|
-
pointer-events: auto !important;
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
.mantine-Input-input {
|
|
1871
|
-
${cssInputShrink$1}
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
&:has(.PhoneInput) {
|
|
1875
|
-
.mantine-InputWrapper-label {
|
|
1876
|
-
left: var(--space-x, 16px);
|
|
1877
|
-
}
|
|
1878
|
-
.PhoneInput {
|
|
1879
|
-
.PhoneInputInput {
|
|
1880
|
-
opacity: 1;
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
.PhoneInput {
|
|
1887
|
-
--phone-select: 75px;
|
|
1888
|
-
--phone-input-space-x: 8px;
|
|
1889
|
-
width: 100%;
|
|
1890
|
-
opacity: 1;
|
|
1891
|
-
border: none;
|
|
1892
|
-
.PhoneInputCountry {
|
|
1893
|
-
background-color: transparent;
|
|
1894
|
-
border: none;
|
|
1895
|
-
padding: 0;
|
|
1896
|
-
width: var(--phone-select, 75px);
|
|
1897
|
-
}
|
|
1898
|
-
.PhoneInputInput {
|
|
1899
|
-
flex: 1;
|
|
1900
|
-
min-width: 0;
|
|
1901
|
-
line-height: 1.5;
|
|
1902
|
-
outline: none !important;
|
|
1903
|
-
border: none;
|
|
1904
|
-
box-shadow: none;
|
|
1905
|
-
padding: 0 var(--phone-input-space-x, 8px);
|
|
1906
|
-
opacity: 0;
|
|
1907
|
-
color: ${miscTheme.theme.colors.gray800} !important;
|
|
1908
|
-
:focus {
|
|
1909
|
-
color: ${miscTheme.theme.colors.gray800} !important;
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
&:has(.PhoneInput) {
|
|
1915
|
-
.mantine-InputWrapper-label {
|
|
1916
|
-
left: calc(
|
|
1917
|
-
var(--space-x, 16px) + var(--phone-select, 75px) +
|
|
1918
|
-
var(--phone-input-space-x, 8px)
|
|
1919
|
-
);
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
`;
|
|
1923
|
-
const StyledChoiceFieldContainer$1 = styled__default["default"].div `
|
|
1924
|
-
&.leadgen-form_checkbox,
|
|
1925
|
-
&.leadgen-form_radio {
|
|
1926
|
-
width: 100%;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
&.leadgen-form_dropdown {
|
|
1930
|
-
width: calc(50% - 12px);
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
.mantine-InputWrapper-root {
|
|
1934
|
-
display: block;
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
.mantine-InputWrapper-label {
|
|
1938
|
-
margin-bottom: 0.5rem;
|
|
1939
|
-
color: ${miscTheme.theme.colors.gray800};
|
|
1940
|
-
font-size: 16px;
|
|
1941
|
-
font-weight: 400;
|
|
1942
|
-
line-height: 1.5;
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
.mantine-Radio-root,
|
|
1946
|
-
.mantine-Checkbox-root {
|
|
1947
|
-
gap: 8px;
|
|
1948
|
-
min-width: calc(50% - 4px);
|
|
1949
|
-
|
|
1950
|
-
input[type='radio'],
|
|
1951
|
-
input[type='checkbox'] {
|
|
1952
|
-
border-color: ${miscTheme.theme.colors.gray600};
|
|
1953
|
-
width: 18px;
|
|
1954
|
-
height: 18px;
|
|
1955
|
-
}
|
|
1956
|
-
input[type='checkbox'] {
|
|
1957
|
-
border-radius: 4px;
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
&[data-checked='true'] {
|
|
1961
|
-
input[type='radio'],
|
|
1962
|
-
input[type='checkbox'] {
|
|
1963
|
-
border-color: ${miscTheme.theme.colors.primary600};
|
|
1964
|
-
+ svg {
|
|
1965
|
-
color: ${miscTheme.theme.colors.primary600};
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
input[type='radio'] {
|
|
1970
|
-
background-color: white;
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
.mantine-Checkbox-input {
|
|
1975
|
-
&:checked {
|
|
1976
|
-
border-color: ${miscTheme.theme.colors.primary600};
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
.mantine-Radio-inner,
|
|
1982
|
-
.mantine-Checkbox-inner {
|
|
1983
|
-
width: 24px;
|
|
1984
|
-
height: 24px;
|
|
1985
|
-
display: flex;
|
|
1986
|
-
align-items: center;
|
|
1987
|
-
justify-content: center;
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
.mantine-Radio-body,
|
|
1991
|
-
.mantine-Checkbox-body {
|
|
1992
|
-
display: flex;
|
|
1993
|
-
align-items: center;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
.mantine-Radio-label,
|
|
1997
|
-
.mantine-Checkbox-label {
|
|
1998
|
-
padding-left: 8px;
|
|
1999
|
-
color: ${miscTheme.theme.colors.gray800};
|
|
2000
|
-
font-size: 14px;
|
|
2001
|
-
line-height: 1.4;
|
|
2002
|
-
letter-spacing: -0.2px;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
.leadgen-choiceContainer {
|
|
2006
|
-
display: flex;
|
|
2007
|
-
flex-wrap: wrap;
|
|
2008
|
-
align-items: flex-start;
|
|
2009
|
-
gap: 8px;
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2012
|
-
.mantine-InputWrapper-error {
|
|
2013
|
-
${cssInputWrapperError$1}
|
|
2014
|
-
}
|
|
2015
|
-
`;
|
|
2016
|
-
|
|
2017
|
-
const TextField$1 = (props) => {
|
|
2018
|
-
const { shrink: shrinkProps, onChangeShrink, className, children } = props, restProps = tslib_es6.__rest(props, ["shrink", "onChangeShrink", "className", "children"]);
|
|
2019
|
-
const containerRef = hooks.useClickOutside(() => {
|
|
2020
|
-
if (shrinkProps) {
|
|
2021
|
-
return;
|
|
2022
|
-
}
|
|
2023
|
-
setShrink(false);
|
|
2024
|
-
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
|
|
2025
|
-
});
|
|
2026
|
-
const [shrink, setShrink] = React.useState(shrinkProps);
|
|
2027
|
-
const onClick = React.useCallback((e) => {
|
|
2028
|
-
setShrink(true);
|
|
2029
|
-
onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
|
|
2030
|
-
if (shrink) {
|
|
2031
|
-
return;
|
|
2032
|
-
}
|
|
2033
|
-
const $textEl = e.currentTarget.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
|
|
2034
|
-
const $focusEl = $textEl.item($textEl.length - 1);
|
|
2035
|
-
if ($focusEl) {
|
|
2036
|
-
$focusEl.focus();
|
|
2037
|
-
setTimeout(() => {
|
|
2038
|
-
$focusEl.scrollIntoView({
|
|
2039
|
-
behavior: 'auto',
|
|
2040
|
-
block: 'center',
|
|
2041
|
-
inline: 'start',
|
|
2042
|
-
});
|
|
2043
|
-
}, 100);
|
|
2044
|
-
}
|
|
2045
|
-
}, [shrink]);
|
|
2046
|
-
React.useEffect(() => {
|
|
2047
|
-
setShrink(shrinkProps);
|
|
2048
|
-
}, [shrinkProps]);
|
|
2049
|
-
return (React__default["default"].createElement(StyledTextFieldContainer$1, Object.assign({ shrink: shrink, className: core.clsx(className, 'textField', { textField_shrink: !!shrink }) }, restProps),
|
|
2050
|
-
React__default["default"].createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, children)));
|
|
2051
|
-
};
|
|
2052
|
-
const ChoiceField$1 = (props) => {
|
|
2053
|
-
const { children, className } = props, restProps = tslib_es6.__rest(props, ["children", "className"]);
|
|
2054
|
-
return (React__default["default"].createElement(StyledChoiceFieldContainer$1, Object.assign({ className: core.clsx(className, 'choiceField') }, restProps), children));
|
|
2055
|
-
};
|
|
2056
|
-
|
|
2057
|
-
const libraries = ['places'];
|
|
2058
|
-
const GoogleLocationBlock = (props) => {
|
|
2059
|
-
var _a;
|
|
2060
|
-
const { inputWrapperOrder = ['label', 'input', 'description', 'error'], defaultValue, value: valueProps, onChange: onChangeProps, locale } = props, restProps = tslib_es6.__rest(props, ["inputWrapperOrder", "defaultValue", "value", "onChange", "locale"]);
|
|
2061
|
-
const [LoadScript, setLoadScript] = React.useState(null);
|
|
2062
|
-
const [value, setValue] = React.useState(defaultValue || valueProps);
|
|
2063
|
-
const { predictions } = usePlacesAutocomplete.usePlacesAutocomplete(value, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
|
|
2064
|
-
const onChangeAutocomplete = React.useCallback((s) => {
|
|
2065
|
-
setValue(s);
|
|
2066
|
-
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(s);
|
|
2067
|
-
}, []);
|
|
2068
|
-
const onClickItem = React.useCallback((item) => {
|
|
2069
|
-
/** For sure get value */
|
|
2070
|
-
setValue(item.value);
|
|
2071
|
-
const predCur = predictions === null || predictions === void 0 ? void 0 : predictions.find(({ description }) => description === item.value);
|
|
2072
|
-
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(item.value, predCur === null || predCur === void 0 ? void 0 : predCur.rawData);
|
|
2073
|
-
}, [onChangeProps, predictions]);
|
|
2074
|
-
React.useEffect(() => {
|
|
2075
|
-
setValue(valueProps);
|
|
2076
|
-
}, [valueProps]);
|
|
2077
|
-
React.useEffect(() => {
|
|
2078
|
-
var _a, _b, _c;
|
|
2079
|
-
// only load extra google script when not yet loaded
|
|
2080
|
-
if (!((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.places) === null || _c === void 0 ? void 0 : _c.AutocompleteService) && !LoadScript) {
|
|
2081
|
-
Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@react-google-maps/api')); }).then((m) => {
|
|
2082
|
-
setLoadScript(() => m.LoadScript);
|
|
2083
|
-
});
|
|
2084
|
-
}
|
|
2085
|
-
}, []);
|
|
2086
|
-
return (React__default["default"].createElement(core.Autocomplete, Object.assign({ defaultValue: defaultValue, value: value, onChange: onChangeAutocomplete, data: predictions.map((pred) => {
|
|
2087
|
-
return { value: pred.description, label: pred.description };
|
|
2088
|
-
}), filter: () => true, onItemSubmit: onClickItem, inputWrapperOrder: inputWrapperOrder, zIndex: index$7.ZINDEX_SSO - 9e6 + 2, withinPortal: true, styles: { dropdown: { pointerEvents: 'auto' } }, inputContainer: (children) => {
|
|
2089
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2090
|
-
LoadScript && (React__default["default"].createElement(LoadScript, { googleMapsApiKey: usePlacesAutocomplete.GOOGLE_API_KEY, libraries: libraries, loadingElement: React__default["default"].createElement(React__default["default"].Fragment, null), style: { width: '100%' } })),
|
|
2091
|
-
children));
|
|
2092
|
-
} }, restProps)));
|
|
2093
|
-
};
|
|
2094
|
-
|
|
2095
|
-
const LEADGEN_ORDER_INPUT_WRAPPER = [
|
|
2096
|
-
'label',
|
|
2097
|
-
'input',
|
|
2098
|
-
'description',
|
|
2099
|
-
'error',
|
|
2100
|
-
];
|
|
2101
|
-
const LeadGenForm = React.forwardRef((props, ref) => {
|
|
2102
|
-
const { locale, blocks, scrollToErrorField = true, form: formProps, rules: validate, initialValues, onFinish, onFinishFailed, className, style, } = props;
|
|
2103
|
-
const formRef = React.useRef(null);
|
|
2104
|
-
const form$1 = formProps || form.useForm({ initialValues, validate });
|
|
2105
|
-
const middlewareFinish = (values, event) => {
|
|
2106
|
-
onFinish === null || onFinish === void 0 ? void 0 : onFinish(values, event);
|
|
2107
|
-
};
|
|
2108
|
-
const middlewareFinishFailed = (errors, values, events) => {
|
|
2109
|
-
if (scrollToErrorField && errors) {
|
|
2110
|
-
const firstErrorKey = Object.keys(errors)[0];
|
|
2111
|
-
const firstErrorElement = document.querySelector(`[name="${firstErrorKey}"]`);
|
|
2112
|
-
if (firstErrorElement && (firstErrorElement === null || firstErrorElement === void 0 ? void 0 : firstErrorElement.focus)) {
|
|
2113
|
-
setTimeout(() => {
|
|
2114
|
-
firstErrorElement === null || firstErrorElement === void 0 ? void 0 : firstErrorElement.focus();
|
|
2115
|
-
firstErrorElement.scrollIntoView({
|
|
2116
|
-
behavior: 'auto',
|
|
2117
|
-
block: 'center',
|
|
2118
|
-
inline: 'center',
|
|
2119
|
-
});
|
|
2120
|
-
}, 100);
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
onFinishFailed === null || onFinishFailed === void 0 ? void 0 : onFinishFailed(errors, values, events);
|
|
2124
|
-
};
|
|
2125
|
-
React.useEffect(() => {
|
|
2126
|
-
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2127
|
-
if (!window.intlTelInputUtils) {
|
|
2128
|
-
yield require('intl-tel-input/build/js/utils');
|
|
2129
|
-
}
|
|
2130
|
-
}))();
|
|
2131
|
-
}, []);
|
|
2132
|
-
React.useImperativeHandle(ref, () => (Object.assign(Object.assign({}, form$1), { submit: () => formRef.current.requestSubmit() })), [form$1, formRef]);
|
|
2133
|
-
if (!blocks || !blocks.length) {
|
|
2134
|
-
return null;
|
|
2135
|
-
}
|
|
2136
|
-
return (React__default["default"].createElement("form", { ref: formRef, onSubmit: form$1.onSubmit(middlewareFinish, middlewareFinishFailed), className: className, style: style },
|
|
2137
|
-
React__default["default"].createElement(StyledLeadGenFormInner, { className: "leadgen-form_inputs" }, blocks.map((block, idx) => {
|
|
2138
|
-
const { id, name: blockName, data } = block;
|
|
2139
|
-
const { placeholder, value: name, required, listQuestion, valueHTML, isSendMailChimp = false, } = data;
|
|
2140
|
-
const formInputProps = form$1.getInputProps(name);
|
|
2141
|
-
const { value, error } = formInputProps;
|
|
2142
|
-
const reactKey = `${id}-${idx}`;
|
|
2143
|
-
switch (blockName) {
|
|
2144
|
-
case LEADGEN_BLOCK.TextBlock: {
|
|
2145
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2146
|
-
React__default["default"].createElement(core.TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "text", "data-control": "text" }, formInputProps))));
|
|
2147
|
-
}
|
|
2148
|
-
case LEADGEN_BLOCK.NumberBlock: {
|
|
2149
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2150
|
-
React__default["default"].createElement(core.NumberInput, Object.assign({ name: value, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "number", "data-control": "number" }, formInputProps))));
|
|
2151
|
-
}
|
|
2152
|
-
case LEADGEN_BLOCK.EmailBlock: {
|
|
2153
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2154
|
-
React__default["default"].createElement(core.TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, "data-control": "email" }, formInputProps))));
|
|
2155
|
-
}
|
|
2156
|
-
case LEADGEN_BLOCK.PhoneOtpBlock:
|
|
2157
|
-
case LEADGEN_BLOCK.WhatsappOtpBlock:
|
|
2158
|
-
case LEADGEN_BLOCK.ZaloOtpBlock:
|
|
2159
|
-
case LEADGEN_BLOCK.PhoneBlock: {
|
|
2160
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2161
|
-
React__default["default"].createElement(PhoneInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), type: "text", "data-control": "text" }, formInputProps))));
|
|
2162
|
-
}
|
|
2163
|
-
case LEADGEN_BLOCK.LocationBlock: {
|
|
2164
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2165
|
-
React__default["default"].createElement(GoogleLocationBlock, Object.assign({ name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, locale: locale, "data-control": "text" }, formInputProps))));
|
|
2166
|
-
}
|
|
2167
|
-
case LEADGEN_BLOCK.DateBlock: {
|
|
2168
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2169
|
-
React__default["default"].createElement(dates.DateInput, Object.assign({ locale: (utils.MAPPED_LOCALE === null || utils.MAPPED_LOCALE === void 0 ? void 0 : utils.MAPPED_LOCALE[locale]) || utils.MAPPED_LOCALE['vi-VN'], valueFormat: "DD/MM/YYYY", name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "default", "data-control": "date" }, formInputProps))));
|
|
2170
|
-
}
|
|
2171
|
-
case LEADGEN_BLOCK.DropdownBlock:
|
|
2172
|
-
return (React__default["default"].createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
|
|
2173
|
-
React__default["default"].createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown' }),
|
|
2174
|
-
React__default["default"].createElement(core.Select, Object.assign({ name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, data: listQuestion.map((l) => ({
|
|
2175
|
-
value: l.value,
|
|
2176
|
-
label: l.placeholder,
|
|
2177
|
-
})) }, formInputProps))));
|
|
2178
|
-
case LEADGEN_BLOCK.CheckboxBlock: {
|
|
2179
|
-
const formInputCheckboxProps = form$1.getInputProps(name, {
|
|
2180
|
-
type: 'checkbox',
|
|
2181
|
-
});
|
|
2182
|
-
return (React__default["default"].createElement(ChoiceField$1, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
2183
|
-
isSendMailChimp && (React__default["default"].createElement("div", { style: { display: 'none' }, "data-name": name + '-mailchimp' })),
|
|
2184
|
-
React__default["default"].createElement(core.Checkbox.Group, Object.assign({ size: "md", withAsterisk: required, label: placeholder, value: value, sx: {
|
|
2185
|
-
display: 'flex',
|
|
2186
|
-
flexDirection: 'column',
|
|
2187
|
-
flexWrap: 'wrap',
|
|
2188
|
-
gap: 8,
|
|
2189
|
-
}, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, inputContainer: (children) => {
|
|
2190
|
-
return (React__default["default"].createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
2191
|
-
} }, formInputCheckboxProps), listQuestion.map((l, _idx) => (React__default["default"].createElement(core.Checkbox, { name: name, key: _idx, value: l.value, label: l.placeholder, "data-control": "checkbox" }))))));
|
|
2192
|
-
}
|
|
2193
|
-
case LEADGEN_BLOCK.RadioBlock: {
|
|
2194
|
-
return (React__default["default"].createElement(ChoiceField$1, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
2195
|
-
isSendMailChimp && (React__default["default"].createElement("div", { style: { display: 'none' }, "data-name": name + '-mailchimp' })),
|
|
2196
|
-
React__default["default"].createElement(core.Radio.Group, Object.assign({ size: "md", withAsterisk: required, label: placeholder, value: value, spellCheck: true, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, inputContainer: (children) => {
|
|
2197
|
-
return (React__default["default"].createElement("div", { className: "leadgen-choiceContainer" }, children));
|
|
2198
|
-
} }, formInputProps), listQuestion.map((l, _index) => (React__default["default"].createElement(core.Radio, { name: name, key: _index, value: l.value, label: l.placeholder, "data-control": "radio" }))))));
|
|
2199
|
-
}
|
|
2200
|
-
case 'TncBlock':
|
|
2201
|
-
return (React__default["default"].createElement(ChoiceField$1, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
|
|
2202
|
-
React__default["default"].createElement(core.Input.Wrapper, { error: error },
|
|
2203
|
-
React__default["default"].createElement(core.Checkbox, Object.assign({ value: value, name: 'TNC-' + id, label: React__default["default"].createElement("p", { className: "lead-modal__tnc-link", dangerouslySetInnerHTML: { __html: valueHTML } }), className: "tnc-block", "data-control": "checkbox" }, formInputProps)))));
|
|
2204
|
-
default: {
|
|
2205
|
-
return null;
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
}))));
|
|
2209
|
-
});
|
|
2210
|
-
|
|
2211
|
-
const StyledLeadGenThankYou = styled__default["default"].div `
|
|
2212
|
-
display: flex;
|
|
2213
|
-
gap: 8px;
|
|
2214
|
-
flex-direction: column;
|
|
2215
|
-
padding-block: 24px;
|
|
2216
|
-
|
|
2217
|
-
.leadgen-image {
|
|
2218
|
-
width: 120px;
|
|
2219
|
-
height: 120px;
|
|
2220
|
-
margin-inline: auto;
|
|
2221
|
-
object-fit: contain;
|
|
2222
|
-
object-position: center;
|
|
2223
|
-
text-align: center;
|
|
2224
|
-
}
|
|
2225
|
-
|
|
2226
|
-
.leadgen-title {
|
|
2227
|
-
margin-block: 0;
|
|
2228
|
-
color: ${miscTheme.theme.colors.gray900};
|
|
2229
|
-
font-weight: 700;
|
|
2230
|
-
font-size: 18px;
|
|
2231
|
-
line-height: 28px;
|
|
2232
|
-
letter-spacing: -0.2px;
|
|
2233
|
-
}
|
|
2234
|
-
|
|
2235
|
-
.leadgen-description {
|
|
2236
|
-
margin-block: 0;
|
|
2237
|
-
color: ${miscTheme.theme.colors.gray600};
|
|
2238
|
-
font-weight: 400;
|
|
2239
|
-
font-size: 14px;
|
|
2240
|
-
line-height: 22px;
|
|
2241
|
-
letter-spacing: -0.2px;
|
|
2242
|
-
text-align: center;
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
> [data-align] {
|
|
2246
|
-
&[data-align='right'] {
|
|
2247
|
-
text-align: right;
|
|
2248
|
-
}
|
|
2249
|
-
&[data-align='center'] {
|
|
2250
|
-
text-align: center;
|
|
2251
|
-
}
|
|
2252
|
-
}
|
|
2253
|
-
`;
|
|
2254
|
-
const LeadGenThankYou = ({ image, title, description, showButton = false, button, className, style, }) => {
|
|
2255
|
-
const { src } = image;
|
|
2256
|
-
const { htmlText: titleText, align: titleAlign } = title;
|
|
2257
|
-
const { htmlText: descriptionText, align: descriptionAlign } = description;
|
|
2258
|
-
const { htmlText: buttonText, newtab, url, onClick } = button;
|
|
2259
|
-
return (React__default["default"].createElement(StyledLeadGenThankYou, { className: className, style: style },
|
|
2260
|
-
React__default["default"].createElement("img", { src: src, alt: "", className: "leadgen-thankyou_image leadgen-image" }),
|
|
2261
|
-
React__default["default"].createElement("p", { className: "leadgen-thankyou_title leadgen-title", "data-align": titleAlign }, titleText),
|
|
2262
|
-
React__default["default"].createElement("p", { className: "leadgen-thankyou_description leadgen-description", "data-align": descriptionAlign }, descriptionText),
|
|
2263
|
-
!!buttonText && showButton && (React__default["default"].createElement(core.Button, { component: url ? 'a' : 'button', target: newtab ? '_blank' : undefined, href: url, size: "lg", variant: "filled", className: "leadgen-thankyoue_btn leadgen-btn", onClick: onClick }, buttonText))));
|
|
2264
|
-
};
|
|
2265
|
-
|
|
2266
|
-
const StyledLeadGenSubscriptionBoxBody = styled__default["default"].div `
|
|
2267
|
-
margin-top: 16px;
|
|
2268
|
-
.leadgen-btn {
|
|
2269
|
-
margin-top: 16px;
|
|
2270
|
-
}
|
|
2271
|
-
`;
|
|
2272
|
-
const StyledLeadGenSubscriptionBoxHeaderImage = styled__default["default"].div `
|
|
2273
|
-
margin-top: 3px;
|
|
2274
|
-
margin-right: 20px;
|
|
2275
|
-
width: 44px;
|
|
2276
|
-
height: 44px;
|
|
2277
|
-
|
|
2278
|
-
img {
|
|
2279
|
-
width: 100%;
|
|
2280
|
-
height: 100%;
|
|
2281
|
-
object-fix: contain;
|
|
2282
|
-
onject-position: center;
|
|
2283
|
-
}
|
|
2284
|
-
|
|
2285
|
-
:has(img[src='']) {
|
|
2286
|
-
display: none;
|
|
2287
|
-
}
|
|
2288
|
-
`;
|
|
2289
|
-
const StyledLeadGenSubscriptionBoxHeader = styled__default["default"].div `
|
|
2290
|
-
display: flex;
|
|
2291
|
-
align-items: center;
|
|
2292
|
-
margin-bottom: 16px;
|
|
2293
|
-
.leadgen-title {
|
|
2294
|
-
margin-bottom: 0;
|
|
2295
|
-
flex: 1;
|
|
2296
|
-
min-width: 0;
|
|
2297
|
-
color: ${miscTheme.theme.colors.gray900};
|
|
2298
|
-
font-size: 18px;
|
|
2299
|
-
font-weight: 600;
|
|
2300
|
-
line-height: 1.4;
|
|
2301
|
-
letter-spacing: -0.8px;
|
|
2302
|
-
}
|
|
2303
|
-
`;
|
|
2304
|
-
const StyledLeadGenSubscriptionBox = styled__default["default"].div `
|
|
2305
|
-
padding: 16px;
|
|
2306
|
-
border: 1px solid ${miscTheme.theme.colors.neutral100};
|
|
2307
|
-
border-radius: 12px;
|
|
2308
|
-
margin-inline: auto;
|
|
2309
|
-
.leadgen-form_inputs {
|
|
2310
|
-
.leadgen-form_input {
|
|
2311
|
-
width: 100%;
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
.leadgen-form_input {
|
|
2316
|
-
.mantine-Input-wrapper {
|
|
2317
|
-
max-height: 56px;
|
|
2318
|
-
}
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
@media screen and (min-width: 768px) {
|
|
2322
|
-
.leadgen-subscription_box_body {
|
|
2323
|
-
display: flex;
|
|
2324
|
-
> form {
|
|
2325
|
-
flex: 1;
|
|
2326
|
-
min-width: 0;
|
|
2327
|
-
|
|
2328
|
-
.leadgen-form_inputs {
|
|
2329
|
-
.leadgen-form_input {
|
|
2330
|
-
width: calc(50% - 4px);
|
|
2331
|
-
}
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
|
|
2335
|
-
.leadgen-btn {
|
|
2336
|
-
margin-top: 0;
|
|
2337
|
-
margin-left: 8px;
|
|
2338
|
-
width: auto;
|
|
2339
|
-
min-height: 56px;
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
}
|
|
2343
|
-
`;
|
|
2344
|
-
const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, siteId, siteDomain, forceCampaign, campaign_code, article_id, subscription_title: subscriptionTitleProps, }) => {
|
|
2345
|
-
var _a, _b, _c;
|
|
2346
|
-
const refContainer = React.useRef(null);
|
|
2347
|
-
const validatingEmailRef = React.useRef(false);
|
|
2348
|
-
const validatingPhoneRef = React.useRef(false);
|
|
2349
|
-
const { image, extra_fields, id: campaign_id, bot_id: campaign_subot_id = [], ThankYouBlock, } = forceCampaign || {};
|
|
2350
|
-
const { textBlocks, listBlockAdded, actionBlocks } = extra_fields || {};
|
|
2351
|
-
const { submitBlock } = actionBlocks || {};
|
|
2352
|
-
const [loading, setLoading] = React.useState(false);
|
|
2353
|
-
const [showThankyou, setShowThankyou] = React.useState(false);
|
|
2354
|
-
const formRef = React.useRef(null);
|
|
2355
|
-
const { form, validateObj } = useLeadFormConfig({
|
|
2356
|
-
listBlockAdded,
|
|
2357
|
-
campaignId: campaign_id,
|
|
2358
|
-
campaign_subot_id,
|
|
2359
|
-
validatingEmailRef,
|
|
2360
|
-
validatingPhoneRef,
|
|
2361
|
-
userInfo,
|
|
2362
|
-
});
|
|
2363
|
-
const subscription_title = React.useMemo(() => { var _a, _b; return subscriptionTitleProps || ((_b = (_a = textBlocks === null || textBlocks === void 0 ? void 0 : textBlocks.titleBlock) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.value); }, [subscriptionTitleProps, (_b = (_a = textBlocks === null || textBlocks === void 0 ? void 0 : textBlocks.titleBlock) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.value]);
|
|
2364
|
-
const { image: thankyouImage, title: thankyouTitle, description: thankyouDescription, button: thankyouButton, } = ThankYouBlock || {};
|
|
2365
|
-
const { apiUrl } = React.useMemo(() => {
|
|
2366
|
-
let apiUrl = leadStore.apiLeadUrl;
|
|
2367
|
-
if (apiUrl.includes('localhost')) {
|
|
2368
|
-
apiUrl = 'https://dev.leadgen.hellobacsi.com/';
|
|
2369
|
-
}
|
|
2370
|
-
return {
|
|
2371
|
-
apiUrl,
|
|
2372
|
-
};
|
|
2373
|
-
}, [siteDomain, siteId]);
|
|
2374
|
-
const url = React.useMemo(() => location.href.toLowerCase() || '', []);
|
|
2375
|
-
const article_title = React.useMemo(() => document.title || '', []);
|
|
2376
|
-
const cookie_id = React.useMemo(() => miscCookieHelper.getCookie('hhg-id') || null, []);
|
|
2377
|
-
const ga_client_id = React.useMemo(() => miscCookieHelper.getCookie('_ga') || null, []);
|
|
2378
|
-
const leadgenImpression = React.useCallback(() => {
|
|
2379
|
-
Service.campaignPostImpression({
|
|
2380
|
-
url,
|
|
2381
|
-
action: LEADGEN_ACTIONS.SCROLL,
|
|
2382
|
-
code: campaign_code,
|
|
2383
|
-
title_article: article_title,
|
|
2384
|
-
cookie_id,
|
|
2385
|
-
ga_client_id,
|
|
2386
|
-
extra: { cookie_id, article_id, subscription_title },
|
|
2387
|
-
});
|
|
2388
|
-
}, [
|
|
2389
|
-
article_id,
|
|
2390
|
-
article_title,
|
|
2391
|
-
cookie_id,
|
|
2392
|
-
ga_client_id,
|
|
2393
|
-
campaign_code,
|
|
2394
|
-
subscription_title,
|
|
2395
|
-
]);
|
|
2396
|
-
const intersectionObserverCallback = React.useCallback((entries) => {
|
|
2397
|
-
entries.forEach((entry) => {
|
|
2398
|
-
const { isIntersecting, target } = entry;
|
|
2399
|
-
if (isIntersecting && target === refContainer.current) {
|
|
2400
|
-
leadgenImpression();
|
|
2401
|
-
}
|
|
2402
|
-
});
|
|
2403
|
-
}, [leadgenImpression]);
|
|
2404
|
-
const IObserver = new IntersectionObserver(intersectionObserverCallback);
|
|
2405
|
-
const middlewareOnSubmit = React.useCallback((value) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2406
|
-
const newValue = {
|
|
2407
|
-
url,
|
|
2408
|
-
article_title,
|
|
2409
|
-
cookie_id,
|
|
2410
|
-
ga_client_id,
|
|
2411
|
-
article_id,
|
|
2412
|
-
campaign_id,
|
|
2413
|
-
campaign_code,
|
|
2414
|
-
subscription_title: subscription_title,
|
|
2415
|
-
};
|
|
2416
|
-
listBlockAdded.forEach(({ data: { value: k } }) => {
|
|
2417
|
-
newValue[k] = value[k];
|
|
2418
|
-
});
|
|
2419
|
-
setLoading(true);
|
|
2420
|
-
try {
|
|
2421
|
-
const { _data } = (yield Service.campaignPostLead({ data: newValue })) || {};
|
|
2422
|
-
const { model } = _data;
|
|
2423
|
-
if (model && model.id) {
|
|
2424
|
-
setShowThankyou(true);
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
catch (error) {
|
|
2428
|
-
console.log('** Error : ', error);
|
|
2429
|
-
}
|
|
2430
|
-
setLoading(false);
|
|
2431
|
-
}), [
|
|
2432
|
-
url,
|
|
2433
|
-
article_id,
|
|
2434
|
-
article_title,
|
|
2435
|
-
cookie_id,
|
|
2436
|
-
ga_client_id,
|
|
2437
|
-
campaign_code,
|
|
2438
|
-
subscription_title,
|
|
2439
|
-
listBlockAdded,
|
|
2440
|
-
]);
|
|
2441
|
-
React.useEffect(() => {
|
|
2442
|
-
if (refContainer.current) {
|
|
2443
|
-
IObserver.observe(refContainer.current);
|
|
2444
|
-
}
|
|
2445
|
-
return () => {
|
|
2446
|
-
IObserver.disconnect();
|
|
2447
|
-
};
|
|
2448
|
-
}, [
|
|
2449
|
-
url,
|
|
2450
|
-
article_id,
|
|
2451
|
-
article_title,
|
|
2452
|
-
ga_client_id,
|
|
2453
|
-
campaign_id,
|
|
2454
|
-
campaign_code,
|
|
2455
|
-
subscription_title,
|
|
2456
|
-
]);
|
|
2457
|
-
return (React__default["default"].createElement("div", { ref: refContainer },
|
|
2458
|
-
React__default["default"].createElement(StyledLeadGenSubscriptionBox, null,
|
|
2459
|
-
showThankyou && (React__default["default"].createElement(LeadGenThankYou, { image: Object.assign(Object.assign({}, thankyouImage), { src: thankyouImage.src || `${apiUrl}admin/img/thanksyou.png` }), title: thankyouTitle, description: thankyouDescription, button: thankyouButton })),
|
|
2460
|
-
!showThankyou && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2461
|
-
React__default["default"].createElement(StyledLeadGenSubscriptionBoxHeader, null,
|
|
2462
|
-
!!image && (React__default["default"].createElement(StyledLeadGenSubscriptionBoxHeaderImage, null,
|
|
2463
|
-
React__default["default"].createElement("img", { src: image, alt: "" }))),
|
|
2464
|
-
React__default["default"].createElement("p", { className: "leadgen-title" }, subscription_title)),
|
|
2465
|
-
React__default["default"].createElement(StyledLeadGenSubscriptionBoxBody, { className: "leadgen-subscription_box_body" },
|
|
2466
|
-
React__default["default"].createElement(LeadGenForm, { ref: formRef, form: form, rules: validateObj, blocks: listBlockAdded, locale: locale, onFinish: middlewareOnSubmit }),
|
|
2467
|
-
React__default["default"].createElement(core.Button, { disabled: loading, loading: loading, variant: "filled", size: "lg", onClick: () => { var _a; return (_a = formRef.current) === null || _a === void 0 ? void 0 : _a.submit(); }, className: "leadgen-btn leadgen-btn_action", fullWidth: true }, (_c = submitBlock === null || submitBlock === void 0 ? void 0 : submitBlock.data) === null || _c === void 0 ? void 0 : _c.value)))))));
|
|
2468
|
-
};
|
|
2469
|
-
const LeadGenSubscriptionBoxWithMemo = React.memo(LeadGenSubscriptionBoxWithoutMemo);
|
|
2470
|
-
|
|
2471
|
-
const Container = () => {
|
|
2472
|
-
const context = React.useContext(LeadGenSubscriptionBoxContext);
|
|
2473
|
-
const {
|
|
2474
|
-
// apiUrl: apiUrlProps,
|
|
2475
|
-
// apiSubotUrl,
|
|
2476
|
-
campaign_code, article_id, subscription_title, locale, siteId, siteDomain, userInfo, forceCampaign, } = context;
|
|
2477
|
-
if (!forceCampaign || !(forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id)) {
|
|
2478
|
-
return null;
|
|
2479
|
-
}
|
|
2480
|
-
return (React__default["default"].createElement(LeadGenSubscriptionBoxWithMemo, { locale: locale, userInfo: userInfo, siteId: siteId, siteDomain: siteDomain, forceCampaign: forceCampaign, campaign_code: campaign_code, article_id: article_id, subscription_title: subscription_title }));
|
|
2481
|
-
};
|
|
2482
|
-
Container.displayName = 'LeadGenSubscriptionBox';
|
|
2483
|
-
const LeadGenSubscriptionBoxContainer = (props) => {
|
|
2484
|
-
const { campaign_code } = props;
|
|
2485
|
-
if (!campaign_code) {
|
|
2486
|
-
return null;
|
|
2487
|
-
}
|
|
2488
|
-
return (React__default["default"].createElement(LeadGenSubscriptionBoxProvider, Object.assign({}, props),
|
|
2489
|
-
React__default["default"].createElement(Container, null)));
|
|
2490
|
-
};
|
|
2491
|
-
const LeadGenSubscriptionBox = LeadGenSubscriptionBoxContainer;
|
|
2492
|
-
|
|
2493
|
-
const useImageSize = (src) => {
|
|
2494
|
-
const [width, setWidth] = React.useState(16);
|
|
2495
|
-
const [height, setHeight] = React.useState(9);
|
|
2496
|
-
const [loaded, setLoaded] = React.useState(false);
|
|
2497
|
-
// load src image to get its width and height
|
|
2498
|
-
React.useEffect(() => {
|
|
2499
|
-
setLoaded(false);
|
|
2500
|
-
if (src) {
|
|
2501
|
-
const img = new Image();
|
|
2502
|
-
img.addEventListener('load', () => {
|
|
2503
|
-
setWidth(img.naturalWidth);
|
|
2504
|
-
setHeight(img.naturalHeight);
|
|
2505
|
-
setLoaded(true);
|
|
2506
|
-
});
|
|
2507
|
-
img.addEventListener('error', () => {
|
|
2508
|
-
setWidth(16);
|
|
2509
|
-
setHeight(9);
|
|
2510
|
-
setLoaded(true);
|
|
2511
|
-
});
|
|
2512
|
-
img.src = src;
|
|
2513
|
-
}
|
|
2514
|
-
else {
|
|
2515
|
-
setWidth(16);
|
|
2516
|
-
setHeight(9);
|
|
2517
|
-
setLoaded(true);
|
|
2518
|
-
}
|
|
2519
|
-
}, [src]);
|
|
2520
|
-
return {
|
|
2521
|
-
loaded,
|
|
2522
|
-
width,
|
|
2523
|
-
height,
|
|
2524
|
-
};
|
|
2525
|
-
};
|
|
2526
|
-
|
|
2527
|
-
const CloseButton = ({ onClose, containerClassName, svgClassName, }) => (React__default["default"].createElement("button", { onClick: onClose, className: `le-newbuilder-close-button js-modal__close ${containerClassName || ''}` },
|
|
2528
|
-
React__default["default"].createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", className: svgClassName },
|
|
2529
|
-
React__default["default"].createElement("path", { d: "M9.99981 10.8432L14.0583 14.9017C14.1691 15.0125 14.3083 15.0691 14.476 15.0717C14.6437 15.0743 14.7854 15.0176 14.9013 14.9017C15.0172 14.7858 15.0752 14.6453 15.0752 14.4802C15.0752 14.3151 15.0172 14.1746 14.9013 14.0587L10.8429 10.0002L14.9013 5.9417C15.0121 5.83094 15.0688 5.69172 15.0713 5.52402C15.0739 5.35634 15.0172 5.21456 14.9013 5.09866C14.7854 4.98276 14.6449 4.9248 14.4798 4.9248C14.3147 4.9248 14.1742 4.98276 14.0583 5.09866L9.99981 9.15712L5.94133 5.09866C5.83057 4.98789 5.69135 4.93122 5.52365 4.92866C5.35598 4.92609 5.21419 4.98276 5.09829 5.09866C4.98239 5.21456 4.92444 5.35506 4.92444 5.52018C4.92444 5.6853 4.98239 5.82581 5.09829 5.9417L9.15675 10.0002L5.09829 14.0587C4.98752 14.1694 4.93085 14.3087 4.9283 14.4763C4.92572 14.644 4.98239 14.7858 5.09829 14.9017C5.21419 15.0176 5.3547 15.0756 5.51982 15.0756C5.68493 15.0756 5.82544 15.0176 5.94133 14.9017L9.99981 10.8432Z" }))));
|
|
2530
|
-
|
|
2531
|
-
// url: imageBlocks.imageMobile.data.url
|
|
2532
|
-
// newTab: imageBlocks.imageMobile.data.newtab
|
|
2533
|
-
// imageMobile: campaignShow.image
|
|
2534
|
-
// imageDestkop: campaignShow.image_desktop
|
|
2535
|
-
const CenterTabLayout = ({ popupId, url, newTab, imageDestkop, imageMobile, onClose, onOtherSubmit, }) => {
|
|
2536
|
-
const { width: imageMobileWidth, height: imageMobileHeight, loaded: imageMobileLoaded, } = useImageSize(imageMobile);
|
|
2537
|
-
const { width: imageDestkopWidth, height: imageDestkopHeight, loaded: imageDestkopLoaded, } = useImageSize(imageDestkop);
|
|
2538
|
-
if (!imageMobileLoaded || !imageDestkopLoaded)
|
|
2539
|
-
return null;
|
|
2540
|
-
return (React__default["default"].createElement("div", { id: popupId, className: "lead-modal-wrapper", "data-popup-url": location.pathname, "data-popup-type": "center_tab" },
|
|
2541
|
-
React__default["default"].createElement("div", { className: "le-center-tab-popup" },
|
|
2542
|
-
React__default["default"].createElement("div", { style: { position: 'relative' } },
|
|
2543
|
-
React__default["default"].createElement("a", { className: "js-popup-other-submit", href: url, target: newTab ? 'blank' : '_parent', onClick: onOtherSubmit },
|
|
2544
|
-
index$8.isVideo(imageMobile) ? (React__default["default"].createElement("video", { loop: true, muted: true, autoPlay: true, className: "le-only-mobile" },
|
|
2545
|
-
React__default["default"].createElement("source", { src: imageMobile }))) : (React__default["default"].createElement("img", { className: "le-only-mobile", src: imageMobile, style: {
|
|
2546
|
-
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
2547
|
-
} })),
|
|
2548
|
-
index$8.isVideo(imageDestkop) ? (React__default["default"].createElement("video", { loop: true, muted: true, autoPlay: true, className: "le-only-desktop" },
|
|
2549
|
-
React__default["default"].createElement("source", { src: imageDestkop }))) : (React__default["default"].createElement("img", { className: "le-only-desktop", src: imageDestkop, style: {
|
|
2550
|
-
aspectRatio: `${imageDestkopWidth}/${imageDestkopHeight}`,
|
|
2551
|
-
} }))),
|
|
2552
|
-
React__default["default"].createElement(CloseButton, { onClose: onClose, containerClassName: "close-button-top-right" })))));
|
|
1414
|
+
return (React__default["default"].createElement("div", { id: popupId, className: "lead-modal-wrapper", "data-popup-url": location.pathname, "data-popup-type": "center_tab" },
|
|
1415
|
+
React__default["default"].createElement("div", { className: "le-center-tab-popup" },
|
|
1416
|
+
React__default["default"].createElement("div", { style: { position: 'relative' } },
|
|
1417
|
+
React__default["default"].createElement("a", { className: "js-popup-other-submit", href: url, target: newTab ? 'blank' : '_parent', onClick: onOtherSubmit },
|
|
1418
|
+
index$7.isVideo(imageMobile) ? (React__default["default"].createElement("video", { loop: true, muted: true, autoPlay: true, className: "le-only-mobile" },
|
|
1419
|
+
React__default["default"].createElement("source", { src: imageMobile }))) : (React__default["default"].createElement("img", { className: "le-only-mobile", src: imageMobile, style: {
|
|
1420
|
+
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
1421
|
+
} })),
|
|
1422
|
+
index$7.isVideo(imageDestkop) ? (React__default["default"].createElement("video", { loop: true, muted: true, autoPlay: true, className: "le-only-desktop" },
|
|
1423
|
+
React__default["default"].createElement("source", { src: imageDestkop }))) : (React__default["default"].createElement("img", { className: "le-only-desktop", src: imageDestkop, style: {
|
|
1424
|
+
aspectRatio: `${imageDestkopWidth}/${imageDestkopHeight}`,
|
|
1425
|
+
} }))),
|
|
1426
|
+
React__default["default"].createElement(CloseButton, { onClose: onClose, containerClassName: "close-button-top-right" })))));
|
|
2553
1427
|
};
|
|
2554
1428
|
|
|
2555
1429
|
// title: titleText
|
|
@@ -2771,6 +1645,211 @@ const EmptyComponent = ({ onClose, onContinue, }) => {
|
|
|
2771
1645
|
React__default["default"].createElement(core.Button, { onClick: onContinue, size: "lg", variant: "filled", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_again" }, t('lead.empty.submitAgain')))));
|
|
2772
1646
|
};
|
|
2773
1647
|
|
|
1648
|
+
const libraries = ['places'];
|
|
1649
|
+
const GoogleLocationBlock = (props) => {
|
|
1650
|
+
var _a;
|
|
1651
|
+
const { inputWrapperOrder = ['label', 'input', 'description', 'error'], defaultValue, value: valueProps, onChange: onChangeProps, locale } = props, restProps = tslib_es6.__rest(props, ["inputWrapperOrder", "defaultValue", "value", "onChange", "locale"]);
|
|
1652
|
+
const [LoadScript, setLoadScript] = React.useState(null);
|
|
1653
|
+
const [value, setValue] = React.useState(defaultValue || valueProps);
|
|
1654
|
+
const { predictions } = usePlacesAutocomplete.usePlacesAutocomplete(value, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
|
|
1655
|
+
const onChangeAutocomplete = React.useCallback((s) => {
|
|
1656
|
+
setValue(s);
|
|
1657
|
+
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(s);
|
|
1658
|
+
}, []);
|
|
1659
|
+
const onClickItem = React.useCallback((item) => {
|
|
1660
|
+
/** For sure get value */
|
|
1661
|
+
setValue(item.value);
|
|
1662
|
+
const predCur = predictions === null || predictions === void 0 ? void 0 : predictions.find(({ description }) => description === item.value);
|
|
1663
|
+
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(item.value, predCur === null || predCur === void 0 ? void 0 : predCur.rawData);
|
|
1664
|
+
}, [onChangeProps, predictions]);
|
|
1665
|
+
React.useEffect(() => {
|
|
1666
|
+
setValue(valueProps);
|
|
1667
|
+
}, [valueProps]);
|
|
1668
|
+
React.useEffect(() => {
|
|
1669
|
+
var _a, _b, _c;
|
|
1670
|
+
// only load extra google script when not yet loaded
|
|
1671
|
+
if (!((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.places) === null || _c === void 0 ? void 0 : _c.AutocompleteService) && !LoadScript) {
|
|
1672
|
+
Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@react-google-maps/api')); }).then((m) => {
|
|
1673
|
+
setLoadScript(() => m.LoadScript);
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
}, []);
|
|
1677
|
+
return (React__default["default"].createElement(core.Autocomplete, Object.assign({ defaultValue: defaultValue, value: value, onChange: onChangeAutocomplete, data: predictions.map((pred) => {
|
|
1678
|
+
return { value: pred.description, label: pred.description };
|
|
1679
|
+
}), filter: () => true, onItemSubmit: onClickItem, inputWrapperOrder: inputWrapperOrder, zIndex: index$8.ZINDEX_SSO - 9e6 + 2, withinPortal: true, styles: { dropdown: { pointerEvents: 'auto' } }, inputContainer: (children) => {
|
|
1680
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1681
|
+
LoadScript && (React__default["default"].createElement(LoadScript, { googleMapsApiKey: usePlacesAutocomplete.GOOGLE_API_KEY, libraries: libraries, loadingElement: React__default["default"].createElement(React__default["default"].Fragment, null), style: { width: '100%' } })),
|
|
1682
|
+
children));
|
|
1683
|
+
} }, restProps)));
|
|
1684
|
+
};
|
|
1685
|
+
|
|
1686
|
+
// You can give context variables any name
|
|
1687
|
+
const [LeadFormProvider, useLeadFormContext, useLeadForm] = form.createFormContext();
|
|
1688
|
+
const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validatingEmailRef, campaignId, campaign_subot_id = [], userInfo, }) => {
|
|
1689
|
+
const { t } = index.useTranslations();
|
|
1690
|
+
const initialValues = React.useMemo(() => mappingSSOToLead(userInfo), [userInfo === null || userInfo === void 0 ? void 0 : userInfo.id]);
|
|
1691
|
+
const validateObj = React.useMemo(() => {
|
|
1692
|
+
const InputBlocks = [
|
|
1693
|
+
'TextBlock',
|
|
1694
|
+
'NumberBlock',
|
|
1695
|
+
'EmailBlock',
|
|
1696
|
+
'PhoneBlock',
|
|
1697
|
+
'DateBlock',
|
|
1698
|
+
'CheckboxBlock',
|
|
1699
|
+
'RadioBlock',
|
|
1700
|
+
'DropdownBlock',
|
|
1701
|
+
'PhoneOtpBlock',
|
|
1702
|
+
'WhatsappOtpBlock',
|
|
1703
|
+
'ZaloOtpBlock',
|
|
1704
|
+
'LocationBlock',
|
|
1705
|
+
'TncBlock',
|
|
1706
|
+
];
|
|
1707
|
+
// ALL are required and can skip if not touched yet
|
|
1708
|
+
const withSharedCheck = (name, cb,
|
|
1709
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1710
|
+
block) => {
|
|
1711
|
+
return (value) => {
|
|
1712
|
+
var _a;
|
|
1713
|
+
const isBLockRequired = (_a = block === null || block === void 0 ? void 0 : block.data) === null || _a === void 0 ? void 0 : _a.required;
|
|
1714
|
+
if (!formRef.current.isTouched(name))
|
|
1715
|
+
return;
|
|
1716
|
+
if ((typeof value === 'string' && value.replace(' ', '') === '') ||
|
|
1717
|
+
typeof value === 'undefined' ||
|
|
1718
|
+
value === '' ||
|
|
1719
|
+
(Array.isArray(value) && value.length === 0)) {
|
|
1720
|
+
return isBLockRequired
|
|
1721
|
+
? t('validator.required')
|
|
1722
|
+
: cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1723
|
+
}
|
|
1724
|
+
return cb === null || cb === void 0 ? void 0 : cb(value);
|
|
1725
|
+
};
|
|
1726
|
+
};
|
|
1727
|
+
return listBlockAdded
|
|
1728
|
+
.filter((b) => InputBlocks.includes(b.name))
|
|
1729
|
+
.reduce((r, b) => {
|
|
1730
|
+
var _a;
|
|
1731
|
+
const isRequired = (_a = b.data.required) !== null && _a !== void 0 ? _a : true;
|
|
1732
|
+
if (b.name === 'NumberBlock') {
|
|
1733
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1734
|
+
if (value && isNaN(Number(value))) {
|
|
1735
|
+
return t('validator.number');
|
|
1736
|
+
}
|
|
1737
|
+
}, b) });
|
|
1738
|
+
}
|
|
1739
|
+
else if (b.name === 'EmailBlock') {
|
|
1740
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1741
|
+
if (value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
1742
|
+
return t('validator.email');
|
|
1743
|
+
}
|
|
1744
|
+
if (!value)
|
|
1745
|
+
return;
|
|
1746
|
+
validatingEmailRef.current = true;
|
|
1747
|
+
setTimeout(() => {
|
|
1748
|
+
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
1749
|
+
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1750
|
+
email: value,
|
|
1751
|
+
})
|
|
1752
|
+
.then((tKey) => {
|
|
1753
|
+
if (tKey) {
|
|
1754
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1755
|
+
}
|
|
1756
|
+
else {
|
|
1757
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1758
|
+
}
|
|
1759
|
+
validatingEmailRef.current = false;
|
|
1760
|
+
})
|
|
1761
|
+
.catch((e) => {
|
|
1762
|
+
console.error(e);
|
|
1763
|
+
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
1764
|
+
validatingEmailRef.current = false;
|
|
1765
|
+
});
|
|
1766
|
+
}, 200);
|
|
1767
|
+
}, b) });
|
|
1768
|
+
}
|
|
1769
|
+
else if (b.name === 'PhoneBlock' ||
|
|
1770
|
+
b.name === 'PhoneOtpBlock' ||
|
|
1771
|
+
b.name === 'ZaloOtpBlock' ||
|
|
1772
|
+
b.name === 'WhatsappOtpBlock') {
|
|
1773
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1774
|
+
if (value &&
|
|
1775
|
+
window.intlTelInputUtils &&
|
|
1776
|
+
!window.intlTelInputUtils.isValidNumber(String(value), LEAD_LOCALE.countryCode)) {
|
|
1777
|
+
return t('validator.phone');
|
|
1778
|
+
}
|
|
1779
|
+
if (!value)
|
|
1780
|
+
return;
|
|
1781
|
+
validatingPhoneRef.current = true;
|
|
1782
|
+
setTimeout(() => {
|
|
1783
|
+
formRef.current.setFieldError(b.data.value, 'Validating...');
|
|
1784
|
+
if (b.data.singleSubmission) {
|
|
1785
|
+
checkUsedPhoneOnlyWithCache(campaignId, value)
|
|
1786
|
+
.then((tKey) => {
|
|
1787
|
+
if (tKey) {
|
|
1788
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1789
|
+
}
|
|
1790
|
+
else {
|
|
1791
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1792
|
+
}
|
|
1793
|
+
validatingPhoneRef.current = false;
|
|
1794
|
+
})
|
|
1795
|
+
.catch((err) => {
|
|
1796
|
+
console.error(err);
|
|
1797
|
+
formRef.current.setFieldError(b.data.value, err.message || 'Something went wrong');
|
|
1798
|
+
validatingPhoneRef.current = false;
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
else {
|
|
1802
|
+
checkUsedEmailOrPhoneWithCache(campaignId, campaign_subot_id, {
|
|
1803
|
+
phone: value,
|
|
1804
|
+
})
|
|
1805
|
+
.then((tKey) => {
|
|
1806
|
+
if (tKey) {
|
|
1807
|
+
formRef.current.setFieldError(b.data.value, t(tKey));
|
|
1808
|
+
}
|
|
1809
|
+
else {
|
|
1810
|
+
formRef.current.clearFieldError(b.data.value);
|
|
1811
|
+
}
|
|
1812
|
+
validatingPhoneRef.current = false;
|
|
1813
|
+
})
|
|
1814
|
+
.catch((e) => {
|
|
1815
|
+
console.error(e);
|
|
1816
|
+
formRef.current.setFieldError(b.data.value, e.message || 'Something went wrong');
|
|
1817
|
+
validatingPhoneRef.current = false;
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
}, 200);
|
|
1821
|
+
}, b) });
|
|
1822
|
+
}
|
|
1823
|
+
else if (b.name === 'DateBlock') {
|
|
1824
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, (value) => {
|
|
1825
|
+
if (value && isNaN(Date.parse(value))) {
|
|
1826
|
+
return t('validator.date');
|
|
1827
|
+
}
|
|
1828
|
+
}, b) });
|
|
1829
|
+
}
|
|
1830
|
+
else if (b.name === 'TncBlock') {
|
|
1831
|
+
return Object.assign(Object.assign({}, r), { [`TNC-` + b.id]: withSharedCheck('TNC-' + b.id, (value) => {
|
|
1832
|
+
if (isRequired && !value) {
|
|
1833
|
+
return t('validator.required');
|
|
1834
|
+
}
|
|
1835
|
+
}, b) });
|
|
1836
|
+
}
|
|
1837
|
+
else {
|
|
1838
|
+
return Object.assign(Object.assign({}, r), { [b.data.value]: withSharedCheck(b.data.value, undefined, b) });
|
|
1839
|
+
}
|
|
1840
|
+
}, {});
|
|
1841
|
+
}, [listBlockAdded.map((b) => b.name).join(',')]);
|
|
1842
|
+
const form = useLeadForm({
|
|
1843
|
+
validateInputOnChange: true,
|
|
1844
|
+
clearInputErrorOnChange: true,
|
|
1845
|
+
validate: validateObj,
|
|
1846
|
+
initialValues,
|
|
1847
|
+
});
|
|
1848
|
+
const formRef = React.useRef(form);
|
|
1849
|
+
formRef.current = form;
|
|
1850
|
+
return { form, validateObj };
|
|
1851
|
+
};
|
|
1852
|
+
|
|
2774
1853
|
const SubtitleBlock = ({ children, align, }) => (React__default["default"].createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
|
|
2775
1854
|
|
|
2776
1855
|
const cssInputNotShrink = react.css `
|
|
@@ -3089,13 +2168,11 @@ const TextField = (props) => {
|
|
|
3089
2168
|
const $focusEl = $textEl.item($textEl.length - 1);
|
|
3090
2169
|
if ($focusEl) {
|
|
3091
2170
|
$focusEl.focus();
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
});
|
|
3098
|
-
}, 100);
|
|
2171
|
+
$focusEl.scrollIntoView({
|
|
2172
|
+
behavior: 'auto',
|
|
2173
|
+
block: 'center',
|
|
2174
|
+
inline: 'start',
|
|
2175
|
+
});
|
|
3099
2176
|
}
|
|
3100
2177
|
}, [shrink]);
|
|
3101
2178
|
React.useEffect(() => {
|
|
@@ -3318,7 +2395,7 @@ const HeaderImage = ({ src, ratio = 3 / 2, className, style, }) => {
|
|
|
3318
2395
|
if (!src) {
|
|
3319
2396
|
return null;
|
|
3320
2397
|
}
|
|
3321
|
-
return (React__default["default"].createElement(StyleHeaderImage, { paddingTop: (1 / ratio) * 100, className: core.clsx(className, 'leadgen-header_image'), style: style }, index$
|
|
2398
|
+
return (React__default["default"].createElement(StyleHeaderImage, { paddingTop: (1 / ratio) * 100, className: core.clsx(className, 'leadgen-header_image'), style: style }, index$7.isVideo(src) ? (React__default["default"].createElement("video", { muted: true, autoPlay: true, loop: true, className: "leadgen-header_image_feature leadgen-header_image_video", src: src })) : (React__default["default"].createElement("img", { src: src, draggable: "false", alt: "", className: "leadgen-header_image_feature leadgen-header_image_image" }))));
|
|
3322
2399
|
};
|
|
3323
2400
|
|
|
3324
2401
|
const OtpBlock = ({ otpData, onSuccess, autoSendWhenOpen, }) => {
|
|
@@ -3495,7 +2572,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
3495
2572
|
const isDrawer = isLightBoxB && isMobile;
|
|
3496
2573
|
const limitFieldsLightBoxB = isLightBoxB && listBlockAdded.length <= LEADGEN_LIMIT_LIGHTBOXB;
|
|
3497
2574
|
const hasForm = isLightBoxA
|
|
3498
|
-
? listBlockAdded.some((item) =>
|
|
2575
|
+
? listBlockAdded.some((item) => LEADGEN_BLOCK_IN_FORM.some((k) => k === (item === null || item === void 0 ? void 0 : item.name)))
|
|
3499
2576
|
: true;
|
|
3500
2577
|
const headerInsideFormContainer = isSlider || isLightBoxA || isFullscreen;
|
|
3501
2578
|
const showHeader = !!imageMobile || !!imageDesktop;
|
|
@@ -3661,7 +2738,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
|
|
|
3661
2738
|
'leadgen-inline': isInPage,
|
|
3662
2739
|
'leadgen-slider': isSlider,
|
|
3663
2740
|
});
|
|
3664
|
-
const PopupContainer = isDrawer ? (React__default["default"].createElement(index$9.DrawerComponent, { fadeFromIndex: index$
|
|
2741
|
+
const PopupContainer = isDrawer ? (React__default["default"].createElement(index$9.DrawerComponent, { fadeFromIndex: index$8.ZINDEX_SSO - 9e6, open: open, snapPoints: [0.8, 1], activeSnapPoint: snap, setActiveSnapPoint: setSnap, onOpenChange: onOpenChange, overlayClassName: popupContainerClassName, className: "leadgen-drawer" },
|
|
3665
2742
|
PopupWrapper,
|
|
3666
2743
|
React__default["default"].createElement("div", { style: { position: 'absolute', inset: 0, zIndex: snap === 1 ? -1 : 1 }, onClick: () => setSnap(1) }))) : (React__default["default"].createElement("div", { id: popupId, "data-popup-url": currentPath, "data-popup-type": "lightbox-inline", className: popupContainerClassName },
|
|
3667
2744
|
isFullscreen ? (React__default["default"].createElement("img", { className: "le-only-desktop le-fullscreen-img", draggable: false, src: imageBackground || '', style: {
|
|
@@ -3724,7 +2801,7 @@ const SkinLayout = ({ popupId, link, linkText, linkNewTab, onClose, imageMobile,
|
|
|
3724
2801
|
React__default["default"].createElement("aside", { className: "le-only-mobile" },
|
|
3725
2802
|
React__default["default"].createElement("div", { className: "le-skin-mobile" },
|
|
3726
2803
|
React__default["default"].createElement("div", { style: { position: 'relative' } },
|
|
3727
|
-
index$
|
|
2804
|
+
index$7.isVideo(imageMobile) ? (React__default["default"].createElement("video", { muted: true, autoPlay: true, loop: true },
|
|
3728
2805
|
React__default["default"].createElement("source", { src: imageMobile, type: "video/mp4" }))) : (React__default["default"].createElement("img", { src: imageMobile, style: {
|
|
3729
2806
|
width: '100%',
|
|
3730
2807
|
aspectRatio: `${imageMobileWidth}/${imageMobileHeight}`,
|
|
@@ -4521,7 +3598,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, apiSubotUrl,
|
|
|
4521
3598
|
}, [showCampaign]);
|
|
4522
3599
|
return (React__default["default"].createElement(LeadGenContext.Provider, { value: { apiUrl, siteDomain, siteId, locale } },
|
|
4523
3600
|
React__default["default"].createElement(translationsContext.TranslationsContext.Provider, { value: { locale, values: getTranslations(locale) } }, children ? (React__default["default"].createElement(Component, { campaign: showCampaign, onSubmit: onSubmit, onClose: onClose, showThankyou: showThankyou, setShowThankyou: setShowThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo }, children)) : (React__default["default"].createElement(core.Portal, { target: utils$1.getPopupWrapperDom() },
|
|
4524
|
-
React__default["default"].createElement(core.Box, { sx: { position: 'fixed', zIndex: index$
|
|
3601
|
+
React__default["default"].createElement(core.Box, { sx: { position: 'fixed', zIndex: index$8.ZINDEX_SSO - 9e6 } },
|
|
4525
3602
|
React__default["default"].createElement(core.Transition, { mounted: Boolean(((_a = showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.extra_fields) === null || _a === void 0 ? void 0 : _a.popupVersion) === '2.1'), transition: "fade", duration: 600, timingFunction: "ease" }, (styles) => {
|
|
4526
3603
|
var _a;
|
|
4527
3604
|
return (React__default["default"].createElement(core.Box, { style: styles }, ((_a = showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.extra_fields) === null || _a === void 0 ? void 0 : _a.popupVersion) === '2.1' && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
@@ -4540,4 +3617,3 @@ LeadGen.OtpForm = OtpBlock$1;
|
|
|
4540
3617
|
LeadGen.Close = Close.Close;
|
|
4541
3618
|
|
|
4542
3619
|
exports.LeadGen = LeadGen;
|
|
4543
|
-
exports.LeadGenSubscriptionBox = LeadGenSubscriptionBox;
|