@hhgtech/hhg-components 1.29.80 → 1.29.82
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/{index-1250dd06.js → WhatsApp-46f4f408.js} +24 -276
- package/build/adapters.js +17 -16
- package/build/atoms.js +102 -0
- package/build/babyGrowth.js +162 -164
- package/build/cache.js +3 -3
- package/build/care.js +17 -17
- package/build/components.js +181 -163
- package/build/{constants-ca71f9e5.js → constants-223c01fc.js} +2 -2
- package/build/{constants-4e7c419e.js → constants-8743b014.js} +0 -136
- package/build/constants-a78fa8b3.js +318 -0
- package/build/constants-f182fc32.js +425 -0
- package/build/constants.js +3 -3
- package/build/{core-bb2587e7.js → core-9d69a722.js} +2 -2
- package/build/{dataTransform-469b75eb.js → dataTransform-ded2692d.js} +1 -1
- package/build/{index-5d9ad07e.js → dataTransform-e39297c1.js} +3 -52
- package/build/defaultClassWrapper-b7719693.js +21 -0
- package/build/ecom.js +5 -5
- package/build/esm/WhatsApp-c599b715.js +46 -0
- package/build/esm/adapters.js +17 -16
- package/build/esm/atoms.js +59 -0
- package/build/esm/babyGrowth.js +87 -89
- package/build/esm/cache.js +3 -3
- package/build/esm/care.js +17 -17
- package/build/esm/components.js +91 -73
- package/build/esm/constants-a5827634.js +307 -0
- package/build/esm/{constants-7661ce64.js → constants-bb470362.js} +2 -2
- package/build/esm/{constants-508ba335.js → constants-f6b2e49d.js} +1 -127
- package/build/esm/constants-fa475b0f.js +417 -0
- package/build/esm/constants.js +3 -3
- package/build/esm/{core-5a22b83e.js → core-80bfe8b7.js} +2 -2
- package/build/esm/{dataTransform-f5db5afb.js → dataTransform-55f67eed.js} +1 -1
- package/build/esm/{index-9b54376f.js → dataTransform-623716c3.js} +5 -53
- package/build/esm/defaultClassWrapper-00903c00.js +15 -0
- package/build/esm/ecom.js +5 -5
- package/build/esm/fixedBottomAdBlock-60a5d48f.js +3474 -0
- package/build/esm/footer.js +18 -18
- package/build/esm/gAssets.js +4 -4
- package/build/esm/{getDynamicHealthTool-09fda8b3.js → getDynamicHealthTool-82855adc.js} +4 -4
- package/build/esm/{getSocialList-96301dbb.js → getSocialList-7d2cf48d.js} +5 -6
- package/build/esm/healthToolsForm.js +40 -0
- package/build/esm/healthToolsForms.d.ts +7 -0
- package/build/esm/hooks.js +17 -17
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-da2b8f22.js → index-01405723.js} +12 -11
- package/build/esm/index-01b5d2e9.js +202 -0
- package/build/esm/index-02d3f05b.js +1681 -0
- package/build/esm/{index-82861dba.js → index-046778af.js} +2 -2
- package/build/esm/{index-df29c4e0.js → index-049e0270.js} +33 -5
- package/build/esm/index-07f3f47e.js +14 -0
- package/build/esm/index-0b745f46.js +1349 -0
- package/build/esm/{index-e68d4285.js → index-0ca9b175.js} +2 -2
- package/build/esm/{index-c4699d44.js → index-0cd3523c.js} +35 -176
- package/build/esm/index-0ee66974.js +95 -0
- package/build/esm/index-10ab6596.js +489 -0
- package/build/esm/{index-5773eb18.js → index-13d8dd4b.js} +6 -6
- package/build/esm/{index.styled-9e147e72.js → index-1c9b481b.js} +21 -3
- package/build/esm/index-1d3c6ce7.js +195 -0
- package/build/esm/{index-474e0ae5.js → index-21256394.js} +2 -13
- package/build/esm/{index-2d47a346.js → index-219e3a35.js} +11 -10
- package/build/esm/{index-679d5383.js → index-29908d2c.js} +1 -1
- package/build/esm/{utils-ff5d88a2.js → index-2dc7803d.js} +71 -105
- package/build/esm/{index-4dcdce19.js → index-5723381f.js} +2 -2
- package/build/esm/{index-c807ef87.js → index-6210f454.js} +3 -3
- package/build/esm/index-7a1ea734.js +100 -0
- package/build/esm/{index-53a86337.js → index-7c384ae6.js} +5 -5
- package/build/esm/index-8eb04f36.js +130 -0
- package/build/esm/index-8fcf671c.js +335 -0
- package/build/esm/{index-80f4d7df.js → index-9471fca1.js} +2 -2
- package/build/esm/{index-92eedeb0.js → index-9b3a8b6d.js} +12 -201
- package/build/esm/{index-3c7f109c.js → index-9b9c1499.js} +2 -2
- package/build/esm/index-9f99909b.js +54 -0
- package/build/esm/index-ac2a8f95.js +1114 -0
- package/build/esm/index-acf8b60e.js +42 -0
- package/build/esm/index-ad1c7c38.js +275 -0
- package/build/esm/{index-bcd13f1d.js → index-bcedec73.js} +13 -12
- package/build/esm/{index-ef855343.js → index-c013ba1b.js} +4 -4
- package/build/esm/index-c2584051.js +262 -0
- package/build/esm/{types-957334f2.js → index-c430773c.js} +559 -3519
- package/build/esm/index-cdc50618.js +25 -0
- package/build/esm/{index-77dddeb9.js → index-cfedca38.js} +2 -2
- package/build/esm/index-d6a5f5cf.js +557 -0
- package/build/esm/index-e0b0d6a2.js +847 -0
- package/build/esm/index-ea63e0d2.js +148 -0
- package/build/esm/{index-32e2b169.js → index-f22f6e6e.js} +65 -28
- package/build/esm/index-f4b938f2.js +18 -0
- package/build/esm/index-f660abb7.js +156 -0
- package/build/esm/index-fa67d66e.js +789 -0
- package/build/esm/index.js +98 -73
- package/build/esm/labelSorting-7351409a.js +47 -0
- package/build/esm/lead.js +23 -33
- package/build/esm/logoIcon-3a581efb.js +104 -0
- package/build/esm/mantine.js +22 -20
- package/build/esm/misc.js +21 -21
- package/build/esm/molecules.js +88 -0
- package/build/esm/navigation.js +37 -37
- package/build/esm/onboardingV2.js +26 -35
- package/build/esm/organisms.js +57 -0
- package/build/esm/pwg.js +19 -19
- package/build/esm/{routing-7bc3e320.js → routing-9e330438.js} +2 -2
- package/build/esm/subot.js +31 -27
- package/build/esm/surveyOrPremiumBanner.js +45 -0
- package/build/esm/surveyQuestionCard.js +13 -0
- package/build/esm/surveyThankyouCard-ec204631.js +446 -0
- package/build/esm/together.js +52 -45
- package/build/esm/togetherAtoms.js +41 -0
- package/build/esm/togetherComponentGlobalContext.js +12 -0
- package/build/esm/togetherMolecules.js +53 -0
- package/build/esm/togetherOrganisms.js +57 -0
- package/build/esm/treePopoverMenu-cb214db6.js +332 -0
- package/build/esm/types-721e7a66.js +5 -0
- package/build/esm/{types-ee1be1e3.js → types-ffcf5fb4.js} +13 -13
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-7e020652.js → useCategory-553bee0b.js} +5 -5
- package/build/esm/{useHealthToolCache-c70e4fd5.js → useHealthToolCache-6ce1724e.js} +2 -2
- package/build/esm/{useMantineLocale-1373e175.js → useMantineLocale-453f8013.js} +3 -3
- package/build/esm/{usePlacesAutocomplete-4bfe976e.js → usePlacesAutocomplete-8925d4fb.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +60 -0
- package/build/esm/{useTranslations-adad3b06.js → useTranslations-b970f667.js} +1 -1
- package/build/esm/{utils-dee27bfd.js → utils-3b29eb79.js} +8 -356
- package/build/esm/{utils-b14c10f9.js → utils-6d45bdd1.js} +1 -1
- package/build/esm/vaccination.js +18 -29
- package/build/fixedBottomAdBlock-0129a006.js +3521 -0
- package/build/footer.js +18 -18
- package/build/gAssets.js +4 -4
- package/build/{getDynamicHealthTool-357666f7.js → getDynamicHealthTool-f08b5fab.js} +4 -4
- package/build/{getSocialList-c1404aff.js → getSocialList-8cc32f7c.js} +8 -9
- package/build/healthToolsForm.js +54 -0
- package/build/healthToolsForms.d.ts +7 -0
- package/build/hooks.js +17 -17
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/index-00a78d81.js +565 -0
- package/build/index-077bf48f.js +803 -0
- package/build/{index-bf6e5e4e.js → index-0b727664.js} +5 -5
- package/build/{index-917c975c.js → index-10760994.js} +37 -9
- package/build/index-130e0f35.js +1693 -0
- package/build/{index-82a3ba38.js → index-16ed0d98.js} +68 -33
- package/build/{index-040620f6.js → index-1e1d8eb1.js} +13 -12
- package/build/{index-e60c98f8.js → index-1fdf2f01.js} +2 -2
- package/build/{index-61ef343d.js → index-206afefb.js} +4 -4
- package/build/{types-c8956642.js → index-2afbeb3d.js} +761 -3727
- package/build/{index.styled-8aca5145.js → index-2fd9063e.js} +22 -4
- package/build/index-33432b02.js +270 -0
- package/build/index-3eb666e6.js +202 -0
- package/build/{index-94a2b0f9.js → index-405faafa.js} +2 -2
- package/build/index-4357a324.js +136 -0
- package/build/index-466a2c32.js +1362 -0
- package/build/index-4b7d4b5b.js +156 -0
- package/build/{index-5029b5d8.js → index-4bc690c9.js} +1 -1
- package/build/index-4cdcdbbe.js +498 -0
- package/build/index-53e14542.js +102 -0
- package/build/{index-91027d35.js → index-54aeefca.js} +2 -2
- package/build/index-60f6d762.js +1127 -0
- package/build/{index-858f60e0.js → index-64d8db08.js} +2 -2
- package/build/index-6aeb5ff5.js +866 -0
- package/build/index-71843eb4.js +61 -0
- package/build/index-765ed75d.js +209 -0
- package/build/index-7953fb8e.js +167 -0
- package/build/{index-d710511f.js → index-7ecc69af.js} +12 -11
- package/build/index-82c85f9d.js +277 -0
- package/build/index-9e8877c0.js +25 -0
- package/build/index-a2664204.js +107 -0
- package/build/{index-c67602d7.js → index-a6a9855f.js} +1 -13
- package/build/index-a8680a58.js +49 -0
- package/build/{index-ed587907.js → index-a9bbb5aa.js} +11 -10
- package/build/{utils-263a60f7.js → index-a9bdf889.js} +76 -120
- package/build/{index-f0a532c7.js → index-b66ae554.js} +6 -6
- package/build/index-ca616373.js +20 -0
- package/build/{index-b0414701.js → index-d9919cd2.js} +57 -200
- package/build/index-dd074159.js +32 -0
- package/build/{index-94fd9ea6.js → index-dff7ee1b.js} +32 -222
- package/build/{index-3a03bb34.js → index-e3bbd009.js} +2 -2
- package/build/index-ec34e358.js +343 -0
- package/build/{index-8c826f3e.js → index-f222ee45.js} +2 -2
- package/build/{index-2b32b21e.js → index-fd3e1d16.js} +2 -2
- package/build/index.js +251 -226
- package/build/labelSorting-f86081b7.js +53 -0
- package/build/lead.js +29 -39
- package/build/logoIcon-21a16853.js +110 -0
- package/build/mantine.js +24 -23
- package/build/misc.js +21 -21
- package/build/molecules.js +149 -0
- package/build/navigation.js +37 -37
- package/build/onboardingV2.js +45 -54
- package/build/organisms.js +74 -0
- package/build/pwg.js +19 -19
- package/build/{routing-bc8197d8.js → routing-d6c9099a.js} +2 -2
- package/build/subot.js +115 -111
- package/build/surveyOrPremiumBanner.js +53 -0
- package/build/surveyQuestionCard.js +22 -0
- package/build/surveyThankyouCard-5b23b8f6.js +454 -0
- package/build/together.js +100 -93
- package/build/togetherAtoms.js +55 -0
- package/build/togetherComponentGlobalContext.js +26 -0
- package/build/togetherMolecules.js +86 -0
- package/build/togetherOrganisms.js +71 -0
- package/build/treePopoverMenu-c0cb395f.js +343 -0
- package/build/{types-6996fb20.js → types-8d9c5f21.js} +13 -13
- package/build/types-b25ffde0.js +7 -0
- package/build/types.js +1 -1
- package/build/{useCategory-7d1f8a7d.js → useCategory-b695fd3a.js} +5 -5
- package/build/{useHealthToolCache-b7dea4aa.js → useHealthToolCache-048807ea.js} +2 -2
- package/build/{useMantineLocale-b243f628.js → useMantineLocale-0d63dfea.js} +3 -3
- package/build/{usePlacesAutocomplete-08b86d2d.js → usePlacesAutocomplete-9520e525.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +70 -0
- package/build/{useTranslations-d5456a98.js → useTranslations-685f989b.js} +1 -1
- package/build/{utils-9f62698f.js → utils-169c6a7d.js} +16 -375
- package/build/{utils-d421a448.js → utils-1a00c0f8.js} +1 -1
- package/build/vaccination.js +58 -69
- package/package.json +1 -1
- package/build/Instagram-91ba1e26.js +0 -32
- package/build/esm/Instagram-319a8e34.js +0 -26
- package/build/esm/index-13bf84f4.js +0 -298
- package/build/esm/index-1a3f36c3.js +0 -1086
- package/build/esm/index-800b956a.js +0 -7245
- package/build/esm/index-aebf96f3.js +0 -33
- package/build/esm/index-d48b5db6.js +0 -71
- package/build/esm/index-d5b66388.js +0 -23
- package/build/esm/index.styles-0ef0135c.js +0 -1322
- package/build/index-0523771b.js +0 -7324
- package/build/index-20ebc0bd.js +0 -30
- package/build/index-dbf560f2.js +0 -1100
- package/build/index-efcbac97.js +0 -39
- package/build/index-f5103542.js +0 -77
- package/build/index.styles-2bdfde5f.js +0 -1361
- /package/build/{BMI_BOYS.percentile.monthly-c38ce03a.js → BMI_BOYS.percentile.monthly-1aa95e30.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-1eccee42.js → BMI_BOYS.percentile.weekly-61d78e1c.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-0e7d5cb6.js → BMI_BOYS.percentile.yearly-f80e040e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-f72f392f.js → BMI_BOYS.zscore.monthly-a6c7c8ff.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-94fd04e6.js → BMI_BOYS.zscore.weekly-742f7028.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-90d5e091.js → BMI_BOYS.zscore.yearly-c19cccd5.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-de3a9a14.js → BMI_GIRLS.percentile.monthly-089d3981.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-1e1ce2b7.js → BMI_GIRLS.percentile.weekly-0cc52cda.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-70a44f31.js → BMI_GIRLS.percentile.yearly-10bc603f.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-be4399a5.js → BMI_GIRLS.zscore.monthly-c3fe57f3.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-6121376b.js → BMI_GIRLS.zscore.weekly-b83a54db.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-822e7686.js → BMI_GIRLS.zscore.yearly-5f13cda2.js} +0 -0
- /package/build/{ChevronDown-f9d31306.js → ChevronDown-2fd86d66.js} +0 -0
- /package/build/{Close-27e0dcf1.js → Close-711196b0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-5e094c3e.js → HEAD CIRCUM_BOYS.percentile.monthly-03b8d7fb.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-24f827d8.js → HEAD CIRCUM_BOYS.percentile.weekly-9ebd3eb6.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-d7478410.js → HEAD CIRCUM_BOYS.percentile.yearly-8e97b738.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-1123cad6.js → HEAD CIRCUM_BOYS.zscore.monthly-e7892261.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-a5b55615.js → HEAD CIRCUM_BOYS.zscore.weekly-47c5af84.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-0d818764.js → HEAD CIRCUM_BOYS.zscore.yearly-9a1bc325.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-dddf5ad9.js → HEAD CIRCUM_GIRLS.percentile.monthly-d84491d7.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-a80d6989.js → HEAD CIRCUM_GIRLS.percentile.weekly-a6f38c3e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-01850b67.js → HEAD CIRCUM_GIRLS.percentile.yearly-5771d277.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-82890053.js → HEAD CIRCUM_GIRLS.zscore.monthly-e3633bcc.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-069f8c8f.js → HEAD CIRCUM_GIRLS.zscore.weekly-23b0ab1a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-ae5ef237.js → HEAD CIRCUM_GIRLS.zscore.yearly-20f29cf1.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-d0da1664.js → HEIGHT_BOYS.percentile.monthly-57cc12ee.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-55446b8a.js → HEIGHT_BOYS.percentile.weekly-c788506a.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-f2f5b19f.js → HEIGHT_BOYS.percentile.yearly-ac56c1f2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-e6ed98ef.js → HEIGHT_BOYS.zscore.monthly-1bb78253.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-d0d37479.js → HEIGHT_BOYS.zscore.weekly-22737c43.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-4023b808.js → HEIGHT_BOYS.zscore.yearly-90f6cd0a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-6d9aeadc.js → HEIGHT_GIRLS.percentile.monthly-019f80d2.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-2087c9b4.js → HEIGHT_GIRLS.percentile.weekly-ceed9817.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-f98d8b05.js → HEIGHT_GIRLS.percentile.yearly-3e5192ac.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-99d299e3.js → HEIGHT_GIRLS.zscore.monthly-f8fca0b6.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-c46ed349.js → HEIGHT_GIRLS.zscore.weekly-827b17e8.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-fddefca4.js → HEIGHT_GIRLS.zscore.yearly-3cdb483d.js} +0 -0
- /package/build/{Visible-01dfaec9.js → Visible-515a4eec.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-cead8ece.js → WEIGHT_BOYS.percentile.monthly-2ecbd498.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-a97fa31a.js → WEIGHT_BOYS.percentile.weekly-75c9c25c.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c2c41945.js → WEIGHT_BOYS.percentile.yearly-03e7cea6.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-d8de7dc2.js → WEIGHT_BOYS.zscore.monthly-2ff9fb56.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-41a6f6bf.js → WEIGHT_BOYS.zscore.weekly-e9f7fe2d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-5762fa8a.js → WEIGHT_BOYS.zscore.yearly-4a96f34f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-526fb18a.js → WEIGHT_GIRLS.percentile.monthly-5bf09e30.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-6c63ed2b.js → WEIGHT_GIRLS.percentile.weekly-f737ae23.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-0ecdbd3a.js → WEIGHT_GIRLS.percentile.yearly-56ebc8eb.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-0c353536.js → WEIGHT_GIRLS.zscore.monthly-4697d3b5.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-97898ff6.js → WEIGHT_GIRLS.zscore.weekly-3633820e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-cbebe807.js → WEIGHT_GIRLS.zscore.yearly-a9a04790.js} +0 -0
- /package/build/{animation-8605b5bb.js → animation-85d012ee.js} +0 -0
- /package/build/{cart-ab5762b8.js → cart-8877bd63.js} +0 -0
- /package/build/{cookieHelper-b2132ffc.js → cookieHelper-86ae022e.js} +0 -0
- /package/build/{doctor-f121fd79.js → doctor-2c14fed1.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-e507536d.js → BMI_BOYS.percentile.monthly-42ff2c64.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-3cbf7392.js → BMI_BOYS.percentile.weekly-b4a6c521.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-c7d54bc3.js → BMI_BOYS.percentile.yearly-d3bc1a77.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-4d09aca0.js → BMI_BOYS.zscore.monthly-c4506dfa.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-319b78c5.js → BMI_BOYS.zscore.weekly-ddf3b3f9.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-764732c5.js → BMI_BOYS.zscore.yearly-e0e3139e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-5a8e4069.js → BMI_GIRLS.percentile.monthly-96686bcc.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-a2fe6df1.js → BMI_GIRLS.percentile.weekly-c3106a65.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-810fe911.js → BMI_GIRLS.percentile.yearly-b38c1f1f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-afab03b0.js → BMI_GIRLS.zscore.monthly-f8a7836f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-8f4e7198.js → BMI_GIRLS.zscore.weekly-4c1fc771.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-7f043621.js → BMI_GIRLS.zscore.yearly-dce5e66a.js} +0 -0
- /package/build/esm/{ChevronDown-d24fd24b.js → ChevronDown-31ea3e19.js} +0 -0
- /package/build/esm/{Close-6243d246.js → Close-40d598bc.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-91c12176.js → HEAD CIRCUM_BOYS.percentile.monthly-34e3fa1c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-40e77c68.js → HEAD CIRCUM_BOYS.percentile.weekly-d3f3568f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-1a284ec4.js → HEAD CIRCUM_BOYS.percentile.yearly-dfae3ad2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-16f716a6.js → HEAD CIRCUM_BOYS.zscore.monthly-95840c2f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-07d20112.js → HEAD CIRCUM_BOYS.zscore.weekly-8b198c1c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-1201a10a.js → HEAD CIRCUM_BOYS.zscore.yearly-b7d639ad.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-a6348baf.js → HEAD CIRCUM_GIRLS.percentile.monthly-47caa070.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-af26363f.js → HEAD CIRCUM_GIRLS.percentile.weekly-bae46665.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-e7637928.js → HEAD CIRCUM_GIRLS.percentile.yearly-81989cdd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-9be0e0ca.js → HEAD CIRCUM_GIRLS.zscore.monthly-f2f7d985.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-3ffe9dcd.js → HEAD CIRCUM_GIRLS.zscore.weekly-e287ddb7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-d7226db1.js → HEAD CIRCUM_GIRLS.zscore.yearly-8790b62a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-c2e21892.js → HEIGHT_BOYS.percentile.monthly-5d2b6466.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-22018f1e.js → HEIGHT_BOYS.percentile.weekly-a38ad13e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-391cd377.js → HEIGHT_BOYS.percentile.yearly-e4841712.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-e11f50f4.js → HEIGHT_BOYS.zscore.monthly-d8e722f8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-8e2c8306.js → HEIGHT_BOYS.zscore.weekly-a92ea3ca.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-78e974bb.js → HEIGHT_BOYS.zscore.yearly-3af1adce.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-0a49ff89.js → HEIGHT_GIRLS.percentile.monthly-c5203801.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-5e158a8e.js → HEIGHT_GIRLS.percentile.weekly-4c25d07f.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-f5544ab2.js → HEIGHT_GIRLS.percentile.yearly-f91e2e27.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-92f67ec2.js → HEIGHT_GIRLS.zscore.monthly-b2a60aca.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-f5d11f32.js → HEIGHT_GIRLS.zscore.weekly-0a98c520.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-4fe6aad9.js → HEIGHT_GIRLS.zscore.yearly-8070d58f.js} +0 -0
- /package/build/esm/{Visible-7f408f98.js → Visible-e3e4fb6f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-b09ae73a.js → WEIGHT_BOYS.percentile.monthly-b262b97d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-733a24a9.js → WEIGHT_BOYS.percentile.weekly-7e817f9f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-2bfcfc93.js → WEIGHT_BOYS.percentile.yearly-b7f1786a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-c0d3a746.js → WEIGHT_BOYS.zscore.monthly-014af835.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-b41ff498.js → WEIGHT_BOYS.zscore.weekly-4577f724.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-15bb7570.js → WEIGHT_BOYS.zscore.yearly-08fd3f13.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-5b79dea8.js → WEIGHT_GIRLS.percentile.monthly-a6e1aa0d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-33052637.js → WEIGHT_GIRLS.percentile.weekly-4c0b6f94.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-64382b53.js → WEIGHT_GIRLS.percentile.yearly-bf689a3a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-63f19584.js → WEIGHT_GIRLS.zscore.monthly-f82fc3c8.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-938ebce2.js → WEIGHT_GIRLS.zscore.weekly-854ce987.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-016e1cfc.js → WEIGHT_GIRLS.zscore.yearly-2a3b869a.js} +0 -0
- /package/build/esm/{animation-bf170ee9.js → animation-85d9a0ed.js} +0 -0
- /package/build/esm/{cart-5bdb4fa5.js → cart-1ac23ce7.js} +0 -0
- /package/build/esm/{cookieHelper-ff6c13b4.js → cookieHelper-6c3b4790.js} +0 -0
- /package/build/esm/{doctor-f4cadffb.js → doctor-e0c2476d.js} +0 -0
- /package/build/esm/{index-eeedf0f0.js → index-189d7601.js} +0 -0
- /package/build/esm/{index-b87433a0.js → index-21bca818.js} +0 -0
- /package/build/esm/{index-6c0f560b.js → index-266a32ff.js} +0 -0
- /package/build/esm/{index-528e64f4.js → index-8684181f.js} +0 -0
- /package/build/esm/{isProduction-2838b9ae.js → isProduction-1937d355.js} +0 -0
- /package/build/esm/{localizeNumberFormat-9303c122.js → localizeNumberFormat-1f000110.js} +0 -0
- /package/build/esm/{normalizeLink-38ab69f4.js → normalizeLink-7a93ebb9.js} +0 -0
- /package/build/esm/{number-fcae69c7.js → number-1d1ba14a.js} +0 -0
- /package/build/esm/{paths-d1c61fa8.js → paths-b83be1a0.js} +0 -0
- /package/build/esm/{theme-0af1cc3d.js → theme-7dadf4a1.js} +0 -0
- /package/build/esm/{translationsContext-036458b7.js → translationsContext-42a1fa63.js} +0 -0
- /package/build/esm/{tslib.es6-2673b49d.js → tslib.es6-06ba3978.js} +0 -0
- /package/build/esm/{useIsInit-2c5ff93d.js → useIsInit-f4dec279.js} +0 -0
- /package/build/esm/{useOutsideClick-7023de23.js → useOutsideClick-210c1134.js} +0 -0
- /package/build/esm/{useScrollbarSize-dfdab229.js → useScrollbarSize-909ae7ec.js} +0 -0
- /package/build/esm/{useUniqueId-d4b0bdd3.js → useUniqueId-5885911d.js} +0 -0
- /package/build/esm/{utils-511a24f4.js → utils-d7bbdb52.js} +0 -0
- /package/build/{index-18ddaa1b.js → index-1f3fc2e3.js} +0 -0
- /package/build/{index-5c400e5e.js → index-2de1eb4a.js} +0 -0
- /package/build/{index-bced434a.js → index-6fdcd09d.js} +0 -0
- /package/build/{index-c524c362.js → index-bc9e8eae.js} +0 -0
- /package/build/{isProduction-2e55aee3.js → isProduction-20cd663d.js} +0 -0
- /package/build/{localizeNumberFormat-2befc6e4.js → localizeNumberFormat-7ff6bd3a.js} +0 -0
- /package/build/{normalizeLink-0fd36e61.js → normalizeLink-d307f624.js} +0 -0
- /package/build/{number-92da0262.js → number-dddf656c.js} +0 -0
- /package/build/{paths-350514c4.js → paths-7da79c64.js} +0 -0
- /package/build/{theme-f410baf6.js → theme-be20929b.js} +0 -0
- /package/build/{translationsContext-11cafcfc.js → translationsContext-00fdb62e.js} +0 -0
- /package/build/{tslib.es6-4bc45883.js → tslib.es6-bd3f8718.js} +0 -0
- /package/build/{useIsInit-0f6d1879.js → useIsInit-e06b96f5.js} +0 -0
- /package/build/{useOutsideClick-e067cc79.js → useOutsideClick-d95a32b6.js} +0 -0
- /package/build/{useScrollbarSize-ed50b4a6.js → useScrollbarSize-1499b1c3.js} +0 -0
- /package/build/{useUniqueId-4ce69bff.js → useUniqueId-1af8848e.js} +0 -0
- /package/build/{utils-4849d92a.js → utils-15a9772e.js} +0 -0
|
@@ -0,0 +1,1127 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-bd3f8718.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var dateFns = require('date-fns');
|
|
6
|
+
var core = require('@mantine/core');
|
|
7
|
+
var form = require('@mantine/form');
|
|
8
|
+
var dayjs = require('dayjs');
|
|
9
|
+
var index$2 = require('./index-dff7ee1b.js');
|
|
10
|
+
var index = require('./index-0b727664.js');
|
|
11
|
+
var index$4 = require('./index-1fdf2f01.js');
|
|
12
|
+
var index$5 = require('./index-3eb666e6.js');
|
|
13
|
+
var theme = require('./theme-be20929b.js');
|
|
14
|
+
var useTranslations = require('./useTranslations-685f989b.js');
|
|
15
|
+
require('@mantine/hooks');
|
|
16
|
+
require('./index-1f3fc2e3.js');
|
|
17
|
+
var index$6 = require('./index-64d8db08.js');
|
|
18
|
+
require('./utils-15a9772e.js');
|
|
19
|
+
require('./useMantineLocale-0d63dfea.js');
|
|
20
|
+
var index$1 = require('./index-e3bbd009.js');
|
|
21
|
+
var constants = require('./constants-f182fc32.js');
|
|
22
|
+
var other = require('@hhgtech/icons/other');
|
|
23
|
+
var reactHookForm = require('react-hook-form');
|
|
24
|
+
var useHealthToolCache = require('./useHealthToolCache-048807ea.js');
|
|
25
|
+
var constants$1 = require('./constants-a78fa8b3.js');
|
|
26
|
+
var index$3 = require('./index-4357a324.js');
|
|
27
|
+
require('@mantine/dates');
|
|
28
|
+
|
|
29
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
30
|
+
|
|
31
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
32
|
+
var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
|
|
33
|
+
|
|
34
|
+
const ConceptionDate = (_a) => {
|
|
35
|
+
var { isMarryBaby, size = 24 } = _a, rest = tslib_es6.__rest(_a, ["isMarryBaby", "size"]);
|
|
36
|
+
const props = Object.assign({ width: size, height: size }, rest);
|
|
37
|
+
return isMarryBaby ? (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 33 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
38
|
+
React__default["default"].createElement("path", { d: "M16.5 27.133c1.298 0 2.596-.149 3.868-.447a9.15 9.15 0 0 0 6.818-6.818 16.94 16.94 0 0 0 0-7.736 9.15 9.15 0 0 0-6.818-6.818 16.94 16.94 0 0 0-7.736 0 9.15 9.15 0 0 0-6.818 6.818A17 17 0 0 0 5.367 16a.867.867 0 1 1-1.734 0c0-1.43.165-2.862.494-4.264a10.88 10.88 0 0 1 8.109-8.11 18.7 18.7 0 0 1 8.528 0 10.88 10.88 0 0 1 8.11 8.11 18.7 18.7 0 0 1 0 8.528 10.88 10.88 0 0 1-8.11 8.11 18.7 18.7 0 0 1-4.264.493.867.867 0 0 1 0-1.734", fill: "#3E3F58" }),
|
|
39
|
+
React__default["default"].createElement("path", { d: "M11.633 16a4.867 4.867 0 1 1 9.734 0 4.867 4.867 0 0 1-9.734 0m4.867-3.133a3.133 3.133 0 1 0 0 6.266 3.133 3.133 0 0 0 0-6.266", fill: "#E85388" }),
|
|
40
|
+
React__default["default"].createElement("path", { d: "M9.834 25.333a2.667 2.667 0 1 0-2.298-1.312l-.084.084a3.25 3.25 0 0 0-.952 2.298c0 .726-.41 1.39-1.06 1.715l-1.238.619a.667.667 0 0 0 .596 1.193l1.24-.62a3.25 3.25 0 0 0 1.796-2.907c0-.508.202-.995.561-1.355l.084-.084c.397.235.86.37 1.355.37", fill: "#3E3F58" }))) : (React__default["default"].createElement("svg", Object.assign({ width: size, height: size, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
41
|
+
React__default["default"].createElement("circle", { cx: "9", cy: "6.75", fill: "#91CAFF", r: "6.75" }),
|
|
42
|
+
React__default["default"].createElement("circle", { cx: "9", cy: "6.75", fill: "#2D87F3", r: "5.4" }),
|
|
43
|
+
React__default["default"].createElement("path", { d: "M1.789 12.2a.245.245 0 0 1-.02-.489c.073-.006 1.795-.167 1.761-1.605-.013-.587.15-1.057.485-1.397.524-.53 1.273-.528 1.305-.527a.245.245 0 0 1-.002.49h-.002c-.011 0-.582.004-.955.385-.236.24-.351.59-.34 1.038.018.793-.367 1.41-1.114 1.787a3.3 3.3 0 0 1-1.118.319M.75 17.774a.245.245 0 0 1 .226-.263c.073-.006 1.786-.162 1.749-1.593-.016-.586.146-1.055.48-1.392.521-.528 1.27-.524 1.3-.523a.245.245 0 0 1-.006.49c-.015 0-.58.004-.949.38q-.352.362-.335 1.033c.02.791-.362 1.406-1.106 1.78a3.3 3.3 0 0 1-1.095.313.245.245 0 0 1-.263-.225", fill: "#D2D6DC" }),
|
|
44
|
+
React__default["default"].createElement("path", { d: "M8.659 5.035c-.562-.561-1.956-.078-2.699.665-.407.407-.635.91-.665 1.373v.124l1.145 1.16.181.042c.464-.03.966-.258 1.373-.665.743-.743 1.226-2.137.665-2.699", fill: "#E3F2FF" }),
|
|
45
|
+
React__default["default"].createElement("path", { d: "m5.295 7.073-.292.75a.55.55 0 0 0 .124.589l.155.155a.55.55 0 0 0 .589.124l.75-.292z", fill: "#91CAFF" }),
|
|
46
|
+
React__default["default"].createElement("path", { d: "M8.098 11.358a.87.87 0 0 0-.233-.523c-.562-.562-1.956-.079-2.699.664-.407.408-.635.91-.665 1.373v.125l1.146 1.16.18.042c.464-.03.966-.258 1.374-.666.566-.566.98-1.51.897-2.175", fill: "#E3F2FF" }),
|
|
47
|
+
React__default["default"].createElement("path", { d: "m4.5 12.872-.29.75a.55.55 0 0 0 .123.589l.156.155a.55.55 0 0 0 .588.124l.75-.292z", fill: "#91CAFF" })));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const IVF = (_a) => {
|
|
51
|
+
var { isMarryBaby, size = 24 } = _a, rest = tslib_es6.__rest(_a, ["isMarryBaby", "size"]);
|
|
52
|
+
const props = Object.assign({ width: size, height: size }, rest);
|
|
53
|
+
return isMarryBaby ? (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 33 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
54
|
+
React__default["default"].createElement("path", { d: "M15.804 28.278a3.16 3.16 0 0 1-3.18-3.208l.128-20.306 6.405.008-.128 20.307c-.012 1.757-1.452 3.191-3.225 3.2", fill: "#fff" }),
|
|
55
|
+
React__default["default"].createElement("path", { d: "m12.72 10.266-.116 14.788c-.011 1.757 1.423 3.197 3.18 3.208 1.774-.008 3.214-1.442 3.225-3.2V10.267", fill: "#FFEAF1" }),
|
|
56
|
+
React__default["default"].createElement("circle", { cx: "14.662", cy: "19.027", transform: "rotate(-49.83 14.662 19.027)", fill: "#3E3F58", r: "1.012" }),
|
|
57
|
+
React__default["default"].createElement("circle", { cx: "16.326", cy: "13.426", r: "1.012", transform: "rotate(-49.83 16.326 13.426)", fill: "#3E3F58" }),
|
|
58
|
+
React__default["default"].createElement("path", { d: "m14.662 19.026.087 1.022a.98.98 0 0 0 .344.667.98.98 0 0 1 .32.98l-.123.51m1.036-8.779.087 1.022a.98.98 0 0 0 .344.666.98.98 0 0 1 .32.98l-.123.511", stroke: "#3E3F58" }),
|
|
59
|
+
React__default["default"].createElement("path", { d: "M18.833 27.597a3.94 3.94 0 0 1-3.02 1.408 4 4 0 0 1-2.795-1.148 3.98 3.98 0 0 1-1.14-2.795l.108-20.553c0-.426.344-.756.753-.738.426 0 .757.345.738.754l-.108 20.553c.002.656.248 1.256.697 1.733a2.42 2.42 0 0 0 1.727.706 2.483 2.483 0 0 0 2.47-2.462l.109-20.553c0-.426.344-.757.753-.738.426 0 .757.344.738.754l-.108 20.553a3.85 3.85 0 0 1-.922 2.526", fill: "#202135" }),
|
|
60
|
+
React__default["default"].createElement("path", { d: "M20.753 4.975a.75.75 0 0 1-.58.262l-8.714-.027a.727.727 0 0 1-.738-.754c0-.425.344-.756.754-.737l8.713.026c.426 0 .756.344.738.754a.66.66 0 0 1-.173.476", fill: "#202135" }))) : (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
61
|
+
React__default["default"].createElement("path", { d: "M13.064 5.794a17.8 17.8 0 0 1 3.34-4.638l4.26 2.881a17.8 17.8 0 0 0-3.272 4.507l-1.08 2.12a.65.65 0 0 0 .124.76 7.9 7.9 0 0 1 2.296 4.81c.027.265-1.141 5.997-9.376 5.573-1.587-.082-5.724-1.269-6.12-2.86a8 8 0 0 1-.233-2.161c.124-4.165 3.718-7.648 7.884-7.647h.098a.65.65 0 0 0 .59-.36z", fill: "#BCDEFF" }),
|
|
62
|
+
React__default["default"].createElement("path", { d: "M20.75 3.234 16.696.496a.886.886 0 1 0-.992 1.469l4.056 2.738a.886.886 0 0 0 .992-1.469", fill: "#E3F2FF" }),
|
|
63
|
+
React__default["default"].createElement("path", { d: "M18.771 17.024a7.87 7.87 0 0 1-2.7 5.944A4.2 4.2 0 0 1 13.301 24H8.473a4.2 4.2 0 0 1-2.769-1.03 7.9 7.9 0 0 1-2.468-4.023c.924.468 2.191.805 3.922.805 1.142 0 2.01-.346 2.775-.834q.323-.21.629-.446c1.973-1.516 3.524-3.668 8.17-2.238q.04.39.04.79", fill: "#2D87F3" }),
|
|
64
|
+
React__default["default"].createElement("path", { d: "M11.858 15.5c-1.78.348-3.096-1.608-2.134-3.121a2.06 2.06 0 0 1 1.529-.944q.303-.03.588.025a.27.27 0 0 0 .268-.107c.282-.373.737-.573 1.2-.639.224-.031.374-.24.379-.44.021-.794.657-1.311 1.288-1.234.183.022.223.27.058.35l-.012.006a.9.9 0 0 0-.28.196c-.213.263-.187.407-.153.6.03.167.066.37-.04.715a1.45 1.45 0 0 1-.504.7c-.255.19-.445.23-.592.263-.088.019-.16.034-.223.076a.27.27 0 0 0-.07.379c.184.27.306.587.344.934a2.063 2.063 0 0 1-1.646 2.24", fill: "#fff" }),
|
|
65
|
+
React__default["default"].createElement("ellipse", { cx: "10", cy: "20.5", rx: "3", ry: "2.5", fill: "#FF6F4D" })));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const LastPeriod = (_a) => {
|
|
69
|
+
var { isMarryBaby, size = 24 } = _a, rest = tslib_es6.__rest(_a, ["isMarryBaby", "size"]);
|
|
70
|
+
const props = Object.assign({ width: size, height: size }, rest);
|
|
71
|
+
return isMarryBaby ? (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 33 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
72
|
+
React__default["default"].createElement("path", { d: "M26.954 27.37H8.18a2.353 2.353 0 0 1-2.347-2.347V8.597A2.353 2.353 0 0 1 8.181 6.25l11.803 2.347 6.97-2.347A2.354 2.354 0 0 1 29.3 8.597v16.426a2.353 2.353 0 0 1-2.346 2.347", fill: "#E0E9FB" }),
|
|
73
|
+
React__default["default"].createElement("path", { d: "M22.706 22.677H6.256c-1.337 0-2.229-1.338-1.736-2.582l1.314-3.285V8.597A2.353 2.353 0 0 1 8.181 6.25h16.426a2.353 2.353 0 0 1 2.346 2.347v8.213l-1.642 4.107a2.81 2.81 0 0 1-2.605 1.76", fill: "#FFE9F1" }),
|
|
74
|
+
React__default["default"].createElement("path", { d: "M24.607 28.074H8.18a3.044 3.044 0 0 1-3.05-3.05c0-.4.304-.705.703-.705.4 0 .704.305.704.704 0 .915.728 1.643 1.643 1.643h16.426c.915 0 1.643-.728 1.643-1.643v-2.346c0-.4.305-.704.703-.704.4 0 .704.305.704.704v2.346c0 1.69-1.36 3.05-3.05 3.05", fill: "#202135" }),
|
|
75
|
+
React__default["default"].createElement("path", { d: "M24.607 5.547h-.47v-.47A1.883 1.883 0 0 0 22.26 3.2a1.883 1.883 0 0 0-1.877 1.877v2.347c0 1.032.845 1.877 1.877 1.877a.69.69 0 0 0 .704-.704.69.69 0 0 0-.704-.704.47.47 0 0 1-.469-.47V5.078a.47.47 0 0 1 .47-.47.47.47 0 0 1 .469.47V6.25c0 .4.305.704.704.704h1.173c.915 0 1.643.728 1.643 1.643v6.406a8.8 8.8 0 0 1-.61 3.215l-.963 2.417a2.14 2.14 0 0 1-1.97 1.337H6.256c-.4 0-.751-.187-.962-.516a1.22 1.22 0 0 1-.118-1.103l.657-1.619c.47-1.197.728-2.464.728-3.754V8.597c0-.915.727-1.643 1.642-1.643h1.174a.69.69 0 0 0 .704-.704.69.69 0 0 0-.704-.703H8.204a3.044 3.044 0 0 0-3.05 3.05v6.406a8.8 8.8 0 0 1-.61 3.215l-.657 1.62c-.329.797-.211 1.689.258 2.416a2.59 2.59 0 0 0 2.135 1.127h16.45a3.49 3.49 0 0 0 3.261-2.206l.962-2.417c.47-1.197.728-2.464.728-3.755V8.597a3.08 3.08 0 0 0-3.074-3.05", fill: "#202135" }),
|
|
76
|
+
React__default["default"].createElement("path", { d: "M12.874 9.301a.69.69 0 0 0 .704-.704.69.69 0 0 0-.704-.704.47.47 0 0 1-.469-.47V5.078a.47.47 0 0 1 .47-.47.47.47 0 0 1 .469.47V6.25c0 .4.305.704.704.704h4.693a.69.69 0 0 0 .704-.704.69.69 0 0 0-.704-.703h-3.99v-.47A1.883 1.883 0 0 0 12.875 3.2a1.883 1.883 0 0 0-1.877 1.877v2.347c0 1.032.845 1.877 1.877 1.877", fill: "#202135" }),
|
|
77
|
+
React__default["default"].createElement("path", { d: "M21.087 16.81a1.16 1.16 0 0 1-1.173-1.173c0-.657.516-1.174 1.173-1.174s1.174.517 1.174 1.174-.517 1.173-1.174 1.173", fill: "#E85388" }),
|
|
78
|
+
React__default["default"].createElement("path", { d: "M11.7 13.29a1.16 1.16 0 0 1-1.172-1.173c0-.657.516-1.173 1.173-1.173s1.173.516 1.173 1.173-.516 1.173-1.173 1.173m4.694 0a1.16 1.16 0 0 1-1.173-1.173c0-.657.516-1.173 1.173-1.173s1.173.516 1.173 1.173-.516 1.173-1.173 1.173m4.693 0a1.16 1.16 0 0 1-1.173-1.173c0-.657.516-1.173 1.173-1.173s1.174.516 1.174 1.173-.517 1.173-1.174 1.173m-9.386 3.52a1.16 1.16 0 0 1-1.173-1.173c0-.657.516-1.174 1.173-1.174s1.173.517 1.173 1.174-.516 1.173-1.173 1.173m4.693 0a1.16 1.16 0 0 1-1.173-1.173c0-.657.516-1.174 1.173-1.174s1.173.517 1.173 1.174-.516 1.173-1.173 1.173m3.778 3.403c-.657 0-1.08-.47-.962-1.056.117-.587.727-1.056 1.384-1.056s1.08.469.963 1.056c-.118.586-.728 1.056-1.385 1.056m-4.693 0c-.657 0-1.08-.47-.962-1.056.117-.587.727-1.056 1.384-1.056s1.08.469.962 1.056c-.117.586-.727 1.056-1.384 1.056m-5.655-1.056c-.118.586.305 1.056.962 1.056s1.267-.47 1.384-1.056c.118-.587-.305-1.056-.962-1.056s-1.267.469-1.384 1.056", fill: "#9898A9" }))) : (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
79
|
+
React__default["default"].createElement("rect", { y: "2.235", width: "22.05", height: "17.15", rx: "2", fill: "#E3F2FF" }),
|
|
80
|
+
React__default["default"].createElement("path", { d: "M0 4.235a2 2 0 0 1 2-2h18.05a2 2 0 0 1 2 2V5.91H0z", fill: "#2D87F3" }),
|
|
81
|
+
React__default["default"].createElement("path", { d: "M17.135 1h-.05c-.553 0-1.001.449-1.001 1.002v1.637a1 1 0 0 0 1.001 1.001h.05c.553 0 1.002-.448 1.002-1.001V2.002c0-.553-.449-1.002-1.002-1.002M4.275 4.64h.05c.553 0 1.002-.448 1.002-1.001V2.002C5.327 1.449 4.878 1 4.325 1h-.05c-.553 0-1.002.449-1.002 1.002v1.637c0 .553.449 1.001 1.002 1.001", fill: "#284A75" }),
|
|
82
|
+
React__default["default"].createElement("path", { d: "M4.717 9.752H3.96a.627.627 0 0 0-.627.627v.894c0 .346.28.627.627.627h.757a.627.627 0 0 0 .627-.627v-.894a.627.627 0 0 0-.627-.627m4.17 0h-.758a.627.627 0 0 0-.627.627v.894c0 .346.281.627.627.627h.758a.627.627 0 0 0 .627-.627v-.894a.627.627 0 0 0-.627-.627m4.168 0h-.757a.627.627 0 0 0-.627.627v.894c0 .346.28.627.627.627h.757a.627.627 0 0 0 .627-.627v-.894a.627.627 0 0 0-.627-.627m4.434 0h-.758a.627.627 0 0 0-.626.627v.894c0 .346.28.627.626.627h.758a.627.627 0 0 0 .627-.627v-.894a.627.627 0 0 0-.627-.627M4.675 13.635h-.757a.627.627 0 0 0-.627.627v.894c0 .346.28.627.627.627h.757c.346 0 .627-.28.627-.627v-.894a.627.627 0 0 0-.627-.627m4.169 0h-.757a.627.627 0 0 0-.627.627v.894c0 .346.28.627.627.627h.757c.346 0 .627-.28.627-.627v-.894a.627.627 0 0 0-.627-.627m4.169 0h-.757a.627.627 0 0 0-.627.627v.894c0 .346.28.627.627.627h.757c.346 0 .627-.28.627-.627v-.894a.627.627 0 0 0-.627-.627m4.434 0h-.757a.627.627 0 0 0-.627.627v.894c0 .346.28.627.627.627h.757c.346 0 .627-.28.627-.627v-.894a.627.627 0 0 0-.627-.627", fill: "#2B62CD" }),
|
|
83
|
+
React__default["default"].createElement("path", { d: "M20.36 13.836c-.734-.081-.88 1.444-1.905 2.66-.6.713-1.388 1.914-1.49 2.978-.097 1.02.186 3.508 3.23 3.704q.52.03 1.038-.037c3.027-.562 2.92-3.343 2.63-4.326-.3-1.026-1.272-2.093-1.879-2.66-1.122-1.045-.936-2.244-1.624-2.32", fill: "#FF6F4D" }),
|
|
84
|
+
React__default["default"].createElement("path", { d: "M22.14 17.4c.057.214-.222.393-.387.059-.14-.284-.08-.38.029-.404.114-.026.31.168.358.345", fill: "#fff" })));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
var DueDateCalculatorType$1;
|
|
88
|
+
(function (DueDateCalculatorType) {
|
|
89
|
+
DueDateCalculatorType[DueDateCalculatorType["lastPeriod"] = 0] = "lastPeriod";
|
|
90
|
+
DueDateCalculatorType[DueDateCalculatorType["conception"] = 1] = "conception";
|
|
91
|
+
DueDateCalculatorType[DueDateCalculatorType["IVF"] = 2] = "IVF";
|
|
92
|
+
})(DueDateCalculatorType$1 || (DueDateCalculatorType$1 = {}));
|
|
93
|
+
|
|
94
|
+
const DueDateFormContext = React.createContext({});
|
|
95
|
+
|
|
96
|
+
const ConceptionFormContext = React.createContext({});
|
|
97
|
+
|
|
98
|
+
const DefaultLayout$4 = () => {
|
|
99
|
+
const { t } = useTranslations.useTranslations();
|
|
100
|
+
const { form } = React.useContext(ConceptionFormContext);
|
|
101
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
102
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ label: t('dueDatePage.lastPeriod.lastPeriodLabel') }, form.getInputProps('lastPeriodDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
103
|
+
withinPortal: true,
|
|
104
|
+
}, maxDate: new Date() }))));
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const InlineLayout$4 = () => {
|
|
108
|
+
const { t } = useTranslations.useTranslations();
|
|
109
|
+
const { form } = React.useContext(ConceptionFormContext);
|
|
110
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
111
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('dueDatePage.lastPeriod.lastPeriodLabel') },
|
|
112
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({}, form.getInputProps('lastPeriodDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
113
|
+
withinPortal: true,
|
|
114
|
+
}, maxDate: new Date(), error: null }))),
|
|
115
|
+
form.errors.lastPeriodDate && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.lastPeriodDate))));
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const MbLayout$5 = () => {
|
|
119
|
+
const { t } = useTranslations.useTranslations();
|
|
120
|
+
const { form } = React.useContext(ConceptionFormContext);
|
|
121
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('dueDatePage.lastPeriod.lastPeriodLabel'), rightSection: React__default["default"].createElement(other.CalendarMB, null) },
|
|
122
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({}, form.getInputProps('lastPeriodDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
123
|
+
withinPortal: true,
|
|
124
|
+
}, rightSection: null, maxDate: new Date() }))));
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
var DueDateCalculatorType;
|
|
128
|
+
(function (DueDateCalculatorType) {
|
|
129
|
+
DueDateCalculatorType[DueDateCalculatorType["lastPeriod"] = 0] = "lastPeriod";
|
|
130
|
+
DueDateCalculatorType[DueDateCalculatorType["conception"] = 1] = "conception";
|
|
131
|
+
DueDateCalculatorType[DueDateCalculatorType["IVF"] = 2] = "IVF";
|
|
132
|
+
})(DueDateCalculatorType || (DueDateCalculatorType = {}));
|
|
133
|
+
const API_DATE_FORMAT = 'yyyy-MM-dd';
|
|
134
|
+
const getDueDateLastPeriod = (lastPeriodDate, periodLength) => {
|
|
135
|
+
const pregnancyLength = 272 + (periodLength - 21);
|
|
136
|
+
const dueDate = new Date(lastPeriodDate);
|
|
137
|
+
dueDate.setDate(dueDate.getDate() + pregnancyLength);
|
|
138
|
+
return {
|
|
139
|
+
startDate: lastPeriodDate,
|
|
140
|
+
dueDate,
|
|
141
|
+
otherInfo: {
|
|
142
|
+
method: DueDateCalculatorType.lastPeriod + 1,
|
|
143
|
+
first_day: dateFns.format(lastPeriodDate, API_DATE_FORMAT),
|
|
144
|
+
cycle_length_days: periodLength,
|
|
145
|
+
conception_date: null,
|
|
146
|
+
ivf_transfer_date: null,
|
|
147
|
+
days_transfer: null,
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
const getDueDateConception = (conceptionDate) => {
|
|
152
|
+
const dueDate = new Date(conceptionDate);
|
|
153
|
+
dueDate.setDate(dueDate.getDate() + 265);
|
|
154
|
+
return {
|
|
155
|
+
startDate: conceptionDate,
|
|
156
|
+
dueDate,
|
|
157
|
+
otherInfo: {
|
|
158
|
+
method: DueDateCalculatorType.conception + 1,
|
|
159
|
+
conception_date: dateFns.format(conceptionDate, API_DATE_FORMAT),
|
|
160
|
+
first_day: null,
|
|
161
|
+
cycle_length_days: null,
|
|
162
|
+
ivf_transfer_date: null,
|
|
163
|
+
days_transfer: null,
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
const getDueDateIVF = (IVFDate, numDayTransfer) => {
|
|
168
|
+
const dueDate = new Date(IVFDate);
|
|
169
|
+
dueDate.setDate(dueDate.getDate() + 265 - numDayTransfer);
|
|
170
|
+
return {
|
|
171
|
+
startDate: IVFDate,
|
|
172
|
+
dueDate,
|
|
173
|
+
otherInfo: {
|
|
174
|
+
method: DueDateCalculatorType.IVF + 1,
|
|
175
|
+
ivf_transfer_date: dateFns.format(IVFDate, API_DATE_FORMAT),
|
|
176
|
+
days_transfer: numDayTransfer,
|
|
177
|
+
conception_date: null,
|
|
178
|
+
first_day: null,
|
|
179
|
+
cycle_length_days: null,
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const ConceptionForm = ({}) => {
|
|
185
|
+
const { formLayout, onSubmit, currentUrl, submitProps } = React.useContext(DueDateFormContext);
|
|
186
|
+
const theme = core.useMantineTheme();
|
|
187
|
+
const { t } = useTranslations.useTranslations();
|
|
188
|
+
const form$1 = form.useForm({
|
|
189
|
+
initialValues: {
|
|
190
|
+
lastPeriodDate: new Date(),
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
const formProps = {
|
|
194
|
+
onSubmit: form$1.onSubmit((values) => {
|
|
195
|
+
const { lastPeriodDate } = values;
|
|
196
|
+
onSubmit(getDueDateConception(lastPeriodDate), `${index$1.QUERY_HEALTH_TOOL.type}=1&sd=${dayjs__default["default"](lastPeriodDate).format(index$1.API_DATE_FORMAT)}&${index$1.QUERY_HEALTH_TOOL.additional}= `);
|
|
197
|
+
}),
|
|
198
|
+
};
|
|
199
|
+
return (React__default["default"].createElement(ConceptionFormContext.Provider, { value: { form: form$1 } },
|
|
200
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: formLayout }, formProps),
|
|
201
|
+
formLayout === 'inline' ? (React__default["default"].createElement(InlineLayout$4, null)) : theme.other.template === 'mb' ? (React__default["default"].createElement(MbLayout$5, null)) : (React__default["default"].createElement(DefaultLayout$4, null)),
|
|
202
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ dataEventCategory: "Health Tool", dataEventAction: "Due Date", dataEventLabel: currentUrl, className: "due-date-calculate-button", type: "submit" }, submitProps), t('dueDatePage.lastPeriod.calculate')))));
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const IVFFormContext = React.createContext({});
|
|
206
|
+
|
|
207
|
+
const DefaultLayout$3 = () => {
|
|
208
|
+
const { t } = useTranslations.useTranslations();
|
|
209
|
+
const { form, transferDateOptions } = React.useContext(IVFFormContext);
|
|
210
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
211
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ label: t('dueDatePage.ivf.transferDate') }, form.getInputProps('IVFDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
212
|
+
withinPortal: true,
|
|
213
|
+
}, maxDate: new Date() })),
|
|
214
|
+
React__default["default"].createElement(index$2.Radio.Group, Object.assign({}, form.getInputProps('dayTransfer')),
|
|
215
|
+
React__default["default"].createElement(core.Group, null, transferDateOptions.map((i, idx) => (React__default["default"].createElement(index$2.Radio, { key: idx, value: i.value, label: i.label })))))));
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const InlineLayout$3 = () => {
|
|
219
|
+
const { t } = useTranslations.useTranslations();
|
|
220
|
+
const { form, transferDateOptions } = React.useContext(IVFFormContext);
|
|
221
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
222
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('dueDatePage.ivf.transferDate') },
|
|
223
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({}, form.getInputProps('IVFDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
224
|
+
withinPortal: true,
|
|
225
|
+
}, maxDate: new Date() }))),
|
|
226
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { width: 'none' },
|
|
227
|
+
React__default["default"].createElement(index$2.Radio.Group, Object.assign({}, form.getInputProps('dayTransfer')),
|
|
228
|
+
React__default["default"].createElement(core.Group, null, transferDateOptions.map((i, idx) => (React__default["default"].createElement(index$2.Radio, { key: idx, value: i.value, label: i.label }))))))));
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
const MbLayout$4 = () => {
|
|
232
|
+
const { t } = useTranslations.useTranslations();
|
|
233
|
+
const { form, transferDateOptions } = React.useContext(IVFFormContext);
|
|
234
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
235
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('dueDatePage.ivf.transferDate'), rightSection: React__default["default"].createElement(other.CalendarMB, null) },
|
|
236
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({}, form.getInputProps('IVFDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
237
|
+
withinPortal: true,
|
|
238
|
+
}, maxDate: new Date(), rightSection: null }))),
|
|
239
|
+
React__default["default"].createElement(index$2.Radio.Group, Object.assign({}, form.getInputProps('dayTransfer')),
|
|
240
|
+
React__default["default"].createElement(core.Group, null, transferDateOptions.map((i, idx) => (React__default["default"].createElement(index$2.Radio, { key: idx, value: i.value, label: i.label })))))));
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
const IVFForm = ({}) => {
|
|
244
|
+
var _a;
|
|
245
|
+
const { formLayout, onSubmit, currentUrl, submitProps } = React.useContext(DueDateFormContext);
|
|
246
|
+
const { t } = useTranslations.useTranslations();
|
|
247
|
+
const theme = core.useMantineTheme();
|
|
248
|
+
const transferDateOptions = [
|
|
249
|
+
{
|
|
250
|
+
value: '3',
|
|
251
|
+
label: t('dueDatePage.ivf.transferDateRadio', {
|
|
252
|
+
number: 3,
|
|
253
|
+
}),
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
value: '5',
|
|
257
|
+
label: t('dueDatePage.ivf.transferDateRadio', {
|
|
258
|
+
number: 5,
|
|
259
|
+
}),
|
|
260
|
+
},
|
|
261
|
+
];
|
|
262
|
+
const form$1 = form.useForm({
|
|
263
|
+
initialValues: {
|
|
264
|
+
IVFDate: new Date(),
|
|
265
|
+
dayTransfer: (_a = transferDateOptions === null || transferDateOptions === void 0 ? void 0 : transferDateOptions[0]) === null || _a === void 0 ? void 0 : _a.value,
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
const formProps = {
|
|
269
|
+
onSubmit: form$1.onSubmit((values) => {
|
|
270
|
+
const { IVFDate } = values;
|
|
271
|
+
const dayTransfer = Number(values.dayTransfer);
|
|
272
|
+
onSubmit(getDueDateIVF(IVFDate, Number(dayTransfer)), `${index$1.QUERY_HEALTH_TOOL.type}=2&${index$1.QUERY_HEALTH_TOOL.startDate}=${dayjs__default["default"](IVFDate).format(index$1.API_DATE_FORMAT)}&${index$1.QUERY_HEALTH_TOOL.additional}=${dayTransfer}`);
|
|
273
|
+
}),
|
|
274
|
+
};
|
|
275
|
+
return (React__default["default"].createElement(IVFFormContext.Provider, { value: { form: form$1, transferDateOptions } },
|
|
276
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: formLayout }, formProps),
|
|
277
|
+
formLayout === 'inline' ? (React__default["default"].createElement(InlineLayout$3, null)) : theme.other.template === 'mb' ? (React__default["default"].createElement(MbLayout$4, null)) : (React__default["default"].createElement(DefaultLayout$3, null)),
|
|
278
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ dataEventCategory: "Health Tool", dataEventAction: "Due Date", dataEventLabel: currentUrl, className: "due-date-calculate-button", type: "submit" }, submitProps), t('dueDatePage.lastPeriod.calculate')))));
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
const LastPeriodFormContext = React.createContext({});
|
|
282
|
+
|
|
283
|
+
const DefaultLayout$2 = () => {
|
|
284
|
+
const { t } = useTranslations.useTranslations();
|
|
285
|
+
const { form } = React.useContext(LastPeriodFormContext);
|
|
286
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
287
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ label: t('dueDatePage.lastPeriod.lastPeriodLabel') }, form.getInputProps('lastPeriodDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
288
|
+
withinPortal: true,
|
|
289
|
+
}, maxDate: new Date() })),
|
|
290
|
+
React__default["default"].createElement(index$2.Input.Wrapper, { label: t('dueDatePage.lastPeriod.periodLengthLabel') },
|
|
291
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: 20, max: 40, placeholder: t('tools.inputPlaceholder', {
|
|
292
|
+
content: '30',
|
|
293
|
+
}) }, form.getInputProps('periodLength'))))));
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
const InlineLayout$2 = () => {
|
|
297
|
+
const { t } = useTranslations.useTranslations();
|
|
298
|
+
const { form } = React.useContext(LastPeriodFormContext);
|
|
299
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
300
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('dueDatePage.lastPeriod.lastPeriodLabel') },
|
|
301
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({}, form.getInputProps('lastPeriodDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
302
|
+
withinPortal: true,
|
|
303
|
+
}, maxDate: new Date() }))),
|
|
304
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('dueDatePage.lastPeriod.periodLengthLabel') },
|
|
305
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: 20, max: 40, placeholder: t('tools.inputPlaceholder', {
|
|
306
|
+
content: '30',
|
|
307
|
+
}) }, form.getInputProps('periodLength'), { error: null }))),
|
|
308
|
+
form.errors.periodLength && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.periodLength))));
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
const MbLayout$3 = () => {
|
|
312
|
+
const { t } = useTranslations.useTranslations();
|
|
313
|
+
const { form } = React.useContext(LastPeriodFormContext);
|
|
314
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
315
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('dueDatePage.lastPeriod.lastPeriodLabel'), rightSection: React__default["default"].createElement(other.CalendarMB, null) },
|
|
316
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ rightSection: null }, form.getInputProps('lastPeriodDate'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
317
|
+
withinPortal: true,
|
|
318
|
+
}, maxDate: new Date() }))),
|
|
319
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('dueDatePage.lastPeriod.periodLengthLabel'), rightSection: t('ovulationPage.dayUnit') },
|
|
320
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: 20, max: 40, placeholder: t('tools.inputPlaceholder', {
|
|
321
|
+
content: '30',
|
|
322
|
+
}) }, form.getInputProps('periodLength')))),
|
|
323
|
+
form.errors.periodLength && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.periodLength))));
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
const LastPeriodForm = ({}) => {
|
|
327
|
+
const { formLayout, onSubmit, currentUrl, submitProps } = React.useContext(DueDateFormContext);
|
|
328
|
+
const { t } = useTranslations.useTranslations();
|
|
329
|
+
const theme = core.useMantineTheme();
|
|
330
|
+
const isMarryBaby = theme.other.template === 'mb';
|
|
331
|
+
const form$1 = form.useForm({
|
|
332
|
+
initialValues: {
|
|
333
|
+
lastPeriodDate: new Date(),
|
|
334
|
+
},
|
|
335
|
+
validate: {
|
|
336
|
+
periodLength: form.isNotEmpty(t('validation.error.requiredField')),
|
|
337
|
+
},
|
|
338
|
+
});
|
|
339
|
+
const formProps = {
|
|
340
|
+
onSubmit: form$1.onSubmit((values) => {
|
|
341
|
+
const { periodLength, lastPeriodDate } = values;
|
|
342
|
+
onSubmit(getDueDateLastPeriod(lastPeriodDate, periodLength), `${index$1.QUERY_HEALTH_TOOL.type}=0&${index$1.QUERY_HEALTH_TOOL.startDate}=${dayjs__default["default"](lastPeriodDate).format(index$1.API_DATE_FORMAT)}&${index$1.QUERY_HEALTH_TOOL.additional}=${periodLength}`);
|
|
343
|
+
}),
|
|
344
|
+
};
|
|
345
|
+
return (React__default["default"].createElement(LastPeriodFormContext.Provider, { value: { form: form$1 } },
|
|
346
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: formLayout }, formProps),
|
|
347
|
+
formLayout === 'inline' ? (React__default["default"].createElement(InlineLayout$2, null)) : isMarryBaby ? (React__default["default"].createElement(MbLayout$3, null)) : (React__default["default"].createElement(DefaultLayout$2, null)),
|
|
348
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ dataEventCategory: "Health Tool", dataEventAction: "Due Date", dataEventLabel: currentUrl, className: "due-date-calculate-button", type: "submit" }, submitProps), t('dueDatePage.lastPeriod.calculate')))));
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
const FormSwitcher = () => {
|
|
352
|
+
const { calculatorType } = React.useContext(DueDateFormContext);
|
|
353
|
+
return calculatorType === DueDateCalculatorType.lastPeriod ? (React__default["default"].createElement(LastPeriodForm, null)) : calculatorType === DueDateCalculatorType.conception ? (React__default["default"].createElement(ConceptionForm, null)) : calculatorType === DueDateCalculatorType.IVF ? (React__default["default"].createElement(IVFForm, null)) : null;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
var OvulationCalculatorType$2;
|
|
357
|
+
(function (OvulationCalculatorType) {
|
|
358
|
+
OvulationCalculatorType[OvulationCalculatorType["trackPeriod"] = 0] = "trackPeriod";
|
|
359
|
+
OvulationCalculatorType[OvulationCalculatorType["conceive"] = 1] = "conceive";
|
|
360
|
+
OvulationCalculatorType[OvulationCalculatorType["avoidPregnancy"] = 2] = "avoidPregnancy";
|
|
361
|
+
})(OvulationCalculatorType$2 || (OvulationCalculatorType$2 = {}));
|
|
362
|
+
const DueDateForm = (_a) => {
|
|
363
|
+
var { formLayout = 'default', submitProps, currentUrl, isMobile, onSubmit } = _a, props = tslib_es6.__rest(_a, ["formLayout", "submitProps", "currentUrl", "isMobile", "onSubmit"]);
|
|
364
|
+
const { t } = useTranslations.useTranslations();
|
|
365
|
+
const [calculatorType, setCalculatorType] = React.useState(DueDateCalculatorType$1.lastPeriod);
|
|
366
|
+
const calculatingMethods = [
|
|
367
|
+
{
|
|
368
|
+
value: DueDateCalculatorType$1.lastPeriod,
|
|
369
|
+
label: t('dueDatePage.lastPeriod'),
|
|
370
|
+
icon: React__default["default"].createElement(LastPeriod, null),
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
value: DueDateCalculatorType$1.conception,
|
|
374
|
+
label: t('dueDatePage.conceptionDate'),
|
|
375
|
+
icon: React__default["default"].createElement(ConceptionDate, null),
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
value: DueDateCalculatorType$1.IVF,
|
|
379
|
+
label: t('dueDatePage.ivf'),
|
|
380
|
+
icon: React__default["default"].createElement(IVF, null),
|
|
381
|
+
},
|
|
382
|
+
];
|
|
383
|
+
return (React__default["default"].createElement(DueDateFormContext.Provider, { value: {
|
|
384
|
+
calculatingMethods,
|
|
385
|
+
submitProps,
|
|
386
|
+
currentUrl,
|
|
387
|
+
isMobile,
|
|
388
|
+
formLayout,
|
|
389
|
+
onSubmit,
|
|
390
|
+
calculatorType,
|
|
391
|
+
setCalculatorType,
|
|
392
|
+
} },
|
|
393
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ component: "div", formLayout: "default" }, props),
|
|
394
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Control, null,
|
|
395
|
+
React__default["default"].createElement(index$2.Input.Wrapper, { label: t('dueDatePage.calculationMethod') },
|
|
396
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.ChipGroup, { isMobile: isMobile, data: calculatingMethods, defaultValue: String(DueDateCalculatorType$1.lastPeriod), onChange: (v) => setCalculatorType(Number(v)) }))),
|
|
397
|
+
React__default["default"].createElement(FormSwitcher, null))));
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
const BmiFormContext = React.createContext({});
|
|
401
|
+
|
|
402
|
+
const DefaultForm$2 = (props) => {
|
|
403
|
+
var _a, _b, _c, _d;
|
|
404
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
405
|
+
const { control, bmiGenerated, isTouched, linkTool, submitProps } = React.useContext(BmiFormContext);
|
|
406
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "default" }, props),
|
|
407
|
+
React__default["default"].createElement(reactHookForm.Controller, { name: "gender", control: control, rules: (_a = bmiGenerated.gender) === null || _a === void 0 ? void 0 : _a.rule, render: ({ field: { onChange }, fieldState: { error } }) => {
|
|
408
|
+
return (React__default["default"].createElement(index$3.GenderOptionControl, { error: isTouched ? error === null || error === void 0 ? void 0 : error.message : '', onChange: onChange }));
|
|
409
|
+
} }),
|
|
410
|
+
React__default["default"].createElement(reactHookForm.Controller, { name: "age", control: control, rules: (_b = bmiGenerated.age) === null || _b === void 0 ? void 0 : _b.rule, render: ({ field: { name, value, onChange }, fieldState: { error }, }) => {
|
|
411
|
+
return (React__default["default"].createElement(index$2.Input.Number, { label: React__default["default"].createElement(index$4.Text, { size: "s4", weight: "semiBold", color: theme.theme.colors.gray600 },
|
|
412
|
+
t('bmi.ageInput'),
|
|
413
|
+
' ',
|
|
414
|
+
React__default["default"].createElement(index$4.Text, { size: "s4", weight: "semiBold", color: theme.theme.colors.gray300, as: "span" }, t('bmi.ageInput.desc'))), placeholder: t('tools.inputPlaceholder', {
|
|
415
|
+
content: '25',
|
|
416
|
+
}), name: name, value: value, onChange: onChange, error: isTouched ? error === null || error === void 0 ? void 0 : error.message : '', min: 0 }));
|
|
417
|
+
} }),
|
|
418
|
+
React__default["default"].createElement(reactHookForm.Controller, { name: "height", control: control, rules: (_c = bmiGenerated.height) === null || _c === void 0 ? void 0 : _c.rule, render: ({ field: { name, value, onChange }, fieldState: { error }, }) => {
|
|
419
|
+
return (React__default["default"].createElement(index$2.Input.Number, { label: React__default["default"].createElement(index$4.Text, { size: "s4", weight: "semiBold", color: theme.theme.colors.gray600 },
|
|
420
|
+
t('bmi.heightInput'),
|
|
421
|
+
' ',
|
|
422
|
+
React__default["default"].createElement(index$4.Text, { size: "s4", weight: "semiBold", color: theme.theme.colors.gray300, as: "span" }, t('bmi.heightInput.desc'))), placeholder: t('tools.inputPlaceholder', {
|
|
423
|
+
content: '170',
|
|
424
|
+
}), name: name, value: value, onChange: onChange, error: isTouched ? error === null || error === void 0 ? void 0 : error.message : '', min: 0 }));
|
|
425
|
+
} }),
|
|
426
|
+
React__default["default"].createElement(reactHookForm.Controller, { name: "weight", control: control, rules: (_d = bmiGenerated.weight) === null || _d === void 0 ? void 0 : _d.rule, render: ({ field: { name, value, onChange }, fieldState: { error }, }) => {
|
|
427
|
+
return (React__default["default"].createElement(index$2.Input.Number, { label: React__default["default"].createElement(index$4.Text, { size: "s4", weight: "semiBold", color: theme.theme.colors.gray600 },
|
|
428
|
+
t('bmi.weightInput'),
|
|
429
|
+
' ',
|
|
430
|
+
React__default["default"].createElement(index$4.Text, { size: "s4", weight: "semiBold", color: theme.theme.colors.gray300, as: "span" }, t('bmi.weightInput.desc'))), placeholder: t('tools.inputPlaceholder', {
|
|
431
|
+
content: '60',
|
|
432
|
+
}), name: name, value: value, onChange: onChange, error: isTouched ? error === null || error === void 0 ? void 0 : error.message : '', precision: 1, min: 0 }));
|
|
433
|
+
} }),
|
|
434
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ className: "bmi-btn bmi--btn-submit", dataEventCategory: "Health Tool", dataEventAction: "BMI", dataEventLabel: `https://${index$1.domainLocales[locale]}/${linkTool}`, type: "submit" }, submitProps), t('bmi.submit'))));
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
const InlineForm$2 = (props) => {
|
|
438
|
+
var _a, _b, _c, _d;
|
|
439
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
440
|
+
const { control, bmiGenerated, isTouched, linkTool, submitProps } = React.useContext(BmiFormContext);
|
|
441
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "inline" }, props),
|
|
442
|
+
React__default["default"].createElement(reactHookForm.Controller, { name: "gender", control: control, rules: (_a = bmiGenerated.gender) === null || _a === void 0 ? void 0 : _a.rule, render: ({ field: { onChange }, fieldState: { error } }) => {
|
|
443
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('tools.selectGender'), width: 'none', errorMess: isTouched && (error === null || error === void 0 ? void 0 : error.message) },
|
|
444
|
+
React__default["default"].createElement(index$3.GenderOptionControl, { type: "radio", hideLabel: true, error: isTouched ? React__default["default"].createElement(React__default["default"].Fragment, null) : '', onChange: onChange })));
|
|
445
|
+
} }),
|
|
446
|
+
React__default["default"].createElement(reactHookForm.Controller, { name: "age", control: control, rules: (_b = bmiGenerated.age) === null || _b === void 0 ? void 0 : _b.rule, render: ({ field: { name, value, onChange }, fieldState: { error }, }) => {
|
|
447
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('bmi.ageInput'), errorMess: isTouched && (error === null || error === void 0 ? void 0 : error.message) },
|
|
448
|
+
React__default["default"].createElement(index$2.Input.Number, { placeholder: t('tools.inputPlaceholder', {
|
|
449
|
+
content: '25',
|
|
450
|
+
}), name: name, value: value, onChange: onChange, error: isTouched && (error === null || error === void 0 ? void 0 : error.message) ? React__default["default"].createElement(React__default["default"].Fragment, null) : '', min: 0, rightSection: React__default["default"].createElement(constants.HealthToolFormWrapper.Unit, null, t('tools.yearsOld')), styles: () => ({
|
|
451
|
+
rightSection: {
|
|
452
|
+
width: 'auto',
|
|
453
|
+
},
|
|
454
|
+
}) })));
|
|
455
|
+
} }),
|
|
456
|
+
React__default["default"].createElement(reactHookForm.Controller, { name: "height", control: control, rules: (_c = bmiGenerated.height) === null || _c === void 0 ? void 0 : _c.rule, render: ({ field: { name, value, onChange }, fieldState: { error }, }) => {
|
|
457
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
458
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('bmi.heightInput') },
|
|
459
|
+
React__default["default"].createElement(index$2.Input.Number, { placeholder: t('tools.inputPlaceholder', {
|
|
460
|
+
content: '170',
|
|
461
|
+
}), name: name, value: value, onChange: onChange, min: 0, error: isTouched && (error === null || error === void 0 ? void 0 : error.message) ? React__default["default"].createElement(React__default["default"].Fragment, null) : '', rightSection: React__default["default"].createElement(constants.HealthToolFormWrapper.Unit, null, t('babyGrowth.cm')) })),
|
|
462
|
+
isTouched && (error === null || error === void 0 ? void 0 : error.message) && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, error.message))));
|
|
463
|
+
} }),
|
|
464
|
+
React__default["default"].createElement(reactHookForm.Controller, { name: "weight", control: control, rules: (_d = bmiGenerated.weight) === null || _d === void 0 ? void 0 : _d.rule, render: ({ field: { name, value, onChange }, fieldState: { error }, }) => {
|
|
465
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
466
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('bmi.weightInput') },
|
|
467
|
+
React__default["default"].createElement(index$2.Input.Number, { placeholder: t('tools.inputPlaceholder', {
|
|
468
|
+
content: '60',
|
|
469
|
+
}), name: name, value: value, onChange: onChange, error: isTouched && (error === null || error === void 0 ? void 0 : error.message) ? React__default["default"].createElement(React__default["default"].Fragment, null) : '', precision: 1, min: 0, rightSection: React__default["default"].createElement(constants.HealthToolFormWrapper.Unit, null, t('babyGrowth.kg')) })),
|
|
470
|
+
isTouched && (error === null || error === void 0 ? void 0 : error.message) && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, error.message))));
|
|
471
|
+
} }),
|
|
472
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ className: "bmi-btn bmi--btn-submit", dataEventCategory: "Health Tool", dataEventAction: "BMI", dataEventLabel: `https://${index$1.domainLocales[locale]}/${linkTool}`, type: "submit" }, submitProps), t('bmi.submit'))));
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
function getBmi({ weight: weightProps, height: heightProps, }) {
|
|
476
|
+
const height = heightProps / 100;
|
|
477
|
+
const weight = weightProps;
|
|
478
|
+
return Math.round((weight / (height * height)) * 10) / 10;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
const BmiForm = (_a) => {
|
|
482
|
+
var { value: valueProps, onChange: onChangeProps, onSubmit: onSubmitProps, bmiGenerated, bmiUnit, formLayout = 'default', submitProps } = _a, rest = tslib_es6.__rest(_a, ["value", "onChange", "onSubmit", "bmiGenerated", "bmiUnit", "formLayout", "submitProps"]);
|
|
483
|
+
const [isTouched, setIsTouched] = React.useState(false);
|
|
484
|
+
const { control, handleSubmit, setValue, watch } = reactHookForm.useForm();
|
|
485
|
+
const data = watch();
|
|
486
|
+
const { locale } = useTranslations.useTranslations();
|
|
487
|
+
const { getHealthToolLink } = useHealthToolCache.useHealthToolsCache(locale);
|
|
488
|
+
const linkTool = React.useMemo(() => getHealthToolLink(constants$1.HEALTH_TOOL_TYPE.OVULATION), [getHealthToolLink]);
|
|
489
|
+
const onValid = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
490
|
+
const height = bmiUnit.heightConvert(data.height);
|
|
491
|
+
const weight = bmiUnit.weightConvert(data.weight);
|
|
492
|
+
const submitValue = {
|
|
493
|
+
gender: data.gender,
|
|
494
|
+
age: data.age,
|
|
495
|
+
height,
|
|
496
|
+
weight,
|
|
497
|
+
bmi: getBmi({ height, weight }),
|
|
498
|
+
};
|
|
499
|
+
onInValid();
|
|
500
|
+
onSubmitProps && onSubmitProps(submitValue);
|
|
501
|
+
});
|
|
502
|
+
const onInValid = () => {
|
|
503
|
+
setIsTouched(true);
|
|
504
|
+
};
|
|
505
|
+
React.useEffect(() => {
|
|
506
|
+
Object.keys(valueProps || {}).forEach((k) => {
|
|
507
|
+
const key = k;
|
|
508
|
+
setValue(key, valueProps === null || valueProps === void 0 ? void 0 : valueProps[key], {
|
|
509
|
+
shouldTouch: false,
|
|
510
|
+
shouldDirty: false,
|
|
511
|
+
shouldValidate: false,
|
|
512
|
+
});
|
|
513
|
+
});
|
|
514
|
+
}, [valueProps]);
|
|
515
|
+
React.useEffect(() => {
|
|
516
|
+
onChangeProps && onChangeProps(data);
|
|
517
|
+
}, [data]);
|
|
518
|
+
const commonProps = Object.assign({ onSubmit: handleSubmit(onValid, onInValid) }, rest);
|
|
519
|
+
return (React__default["default"].createElement(BmiFormContext.Provider, { value: {
|
|
520
|
+
control,
|
|
521
|
+
bmiGenerated,
|
|
522
|
+
isTouched,
|
|
523
|
+
linkTool,
|
|
524
|
+
submitProps,
|
|
525
|
+
} }, formLayout === 'inline' ? (React__default["default"].createElement(InlineForm$2, Object.assign({}, commonProps))) : (React__default["default"].createElement(DefaultForm$2, Object.assign({}, commonProps)))));
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
var useStyles = core.createStyles((theme, { hasOnClickFn }) => {
|
|
529
|
+
return {
|
|
530
|
+
root: {
|
|
531
|
+
position: 'relative',
|
|
532
|
+
display: 'flex',
|
|
533
|
+
flexDirection: 'column',
|
|
534
|
+
gap: core.rem(16),
|
|
535
|
+
},
|
|
536
|
+
sponsorBox: {
|
|
537
|
+
display: 'flex',
|
|
538
|
+
gap: core.rem(12),
|
|
539
|
+
alignItems: 'center',
|
|
540
|
+
backgroundColor: theme.colors.neutral[0],
|
|
541
|
+
border: `1px solid ${theme.colors.neutral[1]}`,
|
|
542
|
+
borderRadius: core.rem(4),
|
|
543
|
+
padding: '4px 12px',
|
|
544
|
+
alignSelf: 'flex-start',
|
|
545
|
+
},
|
|
546
|
+
sponsorLogo: {
|
|
547
|
+
maxHeight: core.rem(32),
|
|
548
|
+
},
|
|
549
|
+
btn: {
|
|
550
|
+
minWidth: core.rem(180),
|
|
551
|
+
[theme.fn.largerThan('sm')]: {
|
|
552
|
+
alignSelf: 'flex-end',
|
|
553
|
+
},
|
|
554
|
+
visibility: hasOnClickFn ? 'visible' : 'hidden',
|
|
555
|
+
},
|
|
556
|
+
};
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
const BabyPoopForm = (_a) => {
|
|
560
|
+
var { babyPoopPage, onClickFindOut, currentUrl, sponsorLogo, btnProps, styles, classNames } = _a, props = tslib_es6.__rest(_a, ["babyPoopPage", "onClickFindOut", "currentUrl", "sponsorLogo", "btnProps", "styles", "classNames"]);
|
|
561
|
+
const { t } = useTranslations.useTranslations();
|
|
562
|
+
const { classes } = useStyles({ hasOnClickFn: Boolean(onClickFindOut) }, { name: 'BabyPoopForm', styles, classNames });
|
|
563
|
+
return (React__default["default"].createElement(core.Box, Object.assign({ className: classes.root }, props),
|
|
564
|
+
sponsorLogo && (React__default["default"].createElement(core.Box, { className: classes.sponsorBox },
|
|
565
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('common.sponsoredBy')),
|
|
566
|
+
React__default["default"].createElement("img", { loading: "lazy", src: sponsorLogo, alt: "sponsor", className: classes.sponsorLogo }))),
|
|
567
|
+
React__default["default"].createElement(index$4.Text, { size: "p3", className: "description" }, babyPoopPage.description),
|
|
568
|
+
React__default["default"].createElement(index$5.Button, Object.assign({ className: classes.btn, onClick: onClickFindOut, dataEventCategory: "Health Tool", dataEventAction: "Baby Stool Inquiry", dataEventLabel: currentUrl }, btnProps), t('babyPoop.findOut'))));
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
const ThrFormContext = React.createContext({});
|
|
572
|
+
|
|
573
|
+
const DefaultForm$1 = (_a) => {
|
|
574
|
+
var _b;
|
|
575
|
+
var props = tslib_es6.__rest(_a, []);
|
|
576
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
577
|
+
const { isAdult, activeValueNote, linkTool, form, submitProps } = React.useContext(ThrFormContext);
|
|
578
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "default" }, props),
|
|
579
|
+
React__default["default"].createElement(index$3.GenderOptionControl, Object.assign({}, form.getInputProps('gender'))),
|
|
580
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({}, form.getInputProps('age'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
581
|
+
withinPortal: true,
|
|
582
|
+
}, label: t('targetHeartRate.ageInput'), maxDate: new Date() })),
|
|
583
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ label: t('targetHeartRate.heartRateInput'), placeholder: t('tools.inputPlaceholder', {
|
|
584
|
+
content: '60',
|
|
585
|
+
}) }, form.getInputProps('heartRate'), { min: 40, max: 200, styles: () => ({
|
|
586
|
+
rightSection: {
|
|
587
|
+
width: 'auto',
|
|
588
|
+
},
|
|
589
|
+
}) })),
|
|
590
|
+
isAdult && (React__default["default"].createElement(index$2.Select, Object.assign({ label: t('targetHeartRate.selectActive'), defaultValue: (_b = activeValueNote === null || activeValueNote === void 0 ? void 0 : activeValueNote[0]) === null || _b === void 0 ? void 0 : _b.value, data: activeValueNote.map((option) => ({
|
|
591
|
+
value: option.value,
|
|
592
|
+
label: option.label,
|
|
593
|
+
})), styles: {
|
|
594
|
+
item: {
|
|
595
|
+
whiteSpace: 'nowrap',
|
|
596
|
+
padding: '10px 12px',
|
|
597
|
+
fontSize: '14px',
|
|
598
|
+
},
|
|
599
|
+
}, withinPortal: true }, form.getInputProps('activeValue')))),
|
|
600
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", dataEventCategory: "Health Tool", dataEventAction: "THR", dataEventLabel: `https://${index$1.domainLocales[locale]}/${linkTool}` }, submitProps), t('bmi.submit'))));
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
const InlineForm$1 = (_a) => {
|
|
604
|
+
var _b;
|
|
605
|
+
var props = tslib_es6.__rest(_a, []);
|
|
606
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
607
|
+
const { isAdult, activeValueNote, linkTool, form, submitProps } = React.useContext(ThrFormContext);
|
|
608
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "inline" }, props),
|
|
609
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
610
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('tools.selectGender'), width: 'none' },
|
|
611
|
+
React__default["default"].createElement(index$3.GenderOptionControl, Object.assign({ type: "radio", hideLabel: true, error: null }, form.getInputProps('gender')))),
|
|
612
|
+
form.errors.gender && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.gender))),
|
|
613
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
614
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('targetHeartRate.ageInput') },
|
|
615
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({}, form.getInputProps('age'), { placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
616
|
+
withinPortal: true,
|
|
617
|
+
}, error: null, maxDate: new Date() }))),
|
|
618
|
+
form.errors.age && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.age))),
|
|
619
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
620
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('targetHeartRate.heartRateInput') },
|
|
621
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ placeholder: t('tools.inputPlaceholder', {
|
|
622
|
+
content: '60',
|
|
623
|
+
}) }, form.getInputProps('heartRate'), { error: null, min: 40, max: 200, rightSection: React__default["default"].createElement(constants.HealthToolFormWrapper.Unit, null, "bmp"), styles: () => ({
|
|
624
|
+
rightSection: {
|
|
625
|
+
width: 'auto',
|
|
626
|
+
},
|
|
627
|
+
}) }))),
|
|
628
|
+
form.errors.heartRate && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.heartRate))),
|
|
629
|
+
isAdult && (React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('targetHeartRate.selectActive') },
|
|
630
|
+
React__default["default"].createElement(index$2.Select, Object.assign({ defaultValue: (_b = activeValueNote === null || activeValueNote === void 0 ? void 0 : activeValueNote[0]) === null || _b === void 0 ? void 0 : _b.value, data: activeValueNote.map((option) => ({
|
|
631
|
+
value: option.value,
|
|
632
|
+
label: option.label,
|
|
633
|
+
})), styles: {
|
|
634
|
+
item: {
|
|
635
|
+
whiteSpace: 'nowrap',
|
|
636
|
+
padding: '10px 12px',
|
|
637
|
+
fontSize: '14px',
|
|
638
|
+
},
|
|
639
|
+
}, withinPortal: true }, form.getInputProps('activeValue'))))),
|
|
640
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", dataEventCategory: "Health Tool", dataEventAction: "THR", dataEventLabel: `https://${index$1.domainLocales[locale]}/${linkTool}` }, submitProps), t('bmi.submit'))));
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
const ThrForm = (_a) => {
|
|
644
|
+
var { formLayout, onSubmit, onError, submitProps } = _a, rest = tslib_es6.__rest(_a, ["formLayout", "onSubmit", "onError", "submitProps"]);
|
|
645
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
646
|
+
const minRange = React.useRef(40);
|
|
647
|
+
const { getHealthToolLink } = useHealthToolCache.useHealthToolsCache(locale);
|
|
648
|
+
const form$1 = form.useForm({
|
|
649
|
+
initialValues: {
|
|
650
|
+
heartRate: 60,
|
|
651
|
+
activeValue: 'low_intensity',
|
|
652
|
+
},
|
|
653
|
+
validate: {
|
|
654
|
+
gender: form.isNotEmpty(t('validation.error.requiredField')),
|
|
655
|
+
age: form.isNotEmpty(t('validation.error.requiredField')),
|
|
656
|
+
heartRate: (value) => {
|
|
657
|
+
return Number(value) >= minRange.current && Number(value) <= 200
|
|
658
|
+
? null
|
|
659
|
+
: t('tools.heartRateRangeErr', {
|
|
660
|
+
min: minRange.current,
|
|
661
|
+
max: 200,
|
|
662
|
+
});
|
|
663
|
+
},
|
|
664
|
+
},
|
|
665
|
+
});
|
|
666
|
+
const linkTool = React.useMemo(() => getHealthToolLink(constants$1.HEALTH_TOOL_TYPE.THR), [getHealthToolLink]);
|
|
667
|
+
const [isAdult, setIsAdult] = React.useState(false);
|
|
668
|
+
const rangeHeartRateByAge = [
|
|
669
|
+
{
|
|
670
|
+
idAge: 0,
|
|
671
|
+
minAge: 0,
|
|
672
|
+
maxAge: 18,
|
|
673
|
+
rangeMale: 40,
|
|
674
|
+
rangeFemale: 40,
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
idAge: 1,
|
|
678
|
+
minAge: 18,
|
|
679
|
+
maxAge: 25,
|
|
680
|
+
rangeMale: 49,
|
|
681
|
+
rangeFemale: 54,
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
idAge: 2,
|
|
685
|
+
minAge: 25,
|
|
686
|
+
maxAge: 35,
|
|
687
|
+
rangeMale: 49,
|
|
688
|
+
rangeFemale: 54,
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
idAge: 3,
|
|
692
|
+
minAge: 35,
|
|
693
|
+
maxAge: 45,
|
|
694
|
+
rangeMale: 50,
|
|
695
|
+
rangeFemale: 54,
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
idAge: 4,
|
|
699
|
+
minAge: 45,
|
|
700
|
+
maxAge: 55,
|
|
701
|
+
rangeMale: 50,
|
|
702
|
+
rangeFemale: 54,
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
idAge: 5,
|
|
706
|
+
minAge: 55,
|
|
707
|
+
maxAge: 65,
|
|
708
|
+
rangeMale: 51,
|
|
709
|
+
rangeFemale: 54,
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
idAge: 6,
|
|
713
|
+
minAge: 65,
|
|
714
|
+
maxAge: 120,
|
|
715
|
+
rangeMale: 50,
|
|
716
|
+
rangeFemale: 54,
|
|
717
|
+
},
|
|
718
|
+
];
|
|
719
|
+
const activeValueNote = [
|
|
720
|
+
{
|
|
721
|
+
value: 'low_intensity',
|
|
722
|
+
label: t('targetHeartRate.lowIntensity.title'),
|
|
723
|
+
image: index$6.CommonGAssets.getAssetPath(`/low.svg`),
|
|
724
|
+
imageActive: index$6.CommonGAssets.getAssetPath(`/low-active.svg`),
|
|
725
|
+
content: t('targetHeartRate.lowIntensity.note'),
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
value: 'moderate_intensity',
|
|
729
|
+
label: t('targetHeartRate.moderateIntensity.title'),
|
|
730
|
+
image: index$6.CommonGAssets.getAssetPath(`/moderate.svg`),
|
|
731
|
+
imageActive: index$6.CommonGAssets.getAssetPath(`/moderate-active.svg`),
|
|
732
|
+
content: t('targetHeartRate.moderateIntensity.note'),
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
value: 'aerobic_zone',
|
|
736
|
+
label: t('targetHeartRate.aerobicZone.title'),
|
|
737
|
+
image: index$6.CommonGAssets.getAssetPath(`/aerobic.svg`),
|
|
738
|
+
imageActive: index$6.CommonGAssets.getAssetPath(`/aerobic-active.svg`),
|
|
739
|
+
content: t('targetHeartRate.aerobicZone.note'),
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
value: 'vigorous_intensity',
|
|
743
|
+
label: t('targetHeartRate.vigorousIntensity.title'),
|
|
744
|
+
image: index$6.CommonGAssets.getAssetPath(`/vigorous.svg`),
|
|
745
|
+
imageActive: index$6.CommonGAssets.getAssetPath(`/vigorous-active.svg`),
|
|
746
|
+
content: t('targetHeartRate.vigorousIntensity.note'),
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
value: 'maximum_intensity',
|
|
750
|
+
label: t('targetHeartRate.maximumIntensity.title'),
|
|
751
|
+
image: index$6.CommonGAssets.getAssetPath(`/maximum.svg`),
|
|
752
|
+
imageActive: index$6.CommonGAssets.getAssetPath(`/maximum-active.svg`),
|
|
753
|
+
content: t('targetHeartRate.maximumIntensity.note'),
|
|
754
|
+
},
|
|
755
|
+
];
|
|
756
|
+
React.useEffect(() => {
|
|
757
|
+
const ageDate = form$1.getInputProps('age').value;
|
|
758
|
+
const gender = form$1.getInputProps('gender').value;
|
|
759
|
+
if (ageDate instanceof Date) {
|
|
760
|
+
const age = (new Date().getTime() - ageDate.getTime()) / 1000;
|
|
761
|
+
if (age >= 18 * 365 * 24 * 60 * 60)
|
|
762
|
+
setIsAdult(true);
|
|
763
|
+
else
|
|
764
|
+
setIsAdult(false);
|
|
765
|
+
const rangeByAge = rangeHeartRateByAge.find((item) => age >= item.minAge * 365 * 24 * 60 * 60 &&
|
|
766
|
+
age < item.maxAge * 365 * 24 * 60 * 60) || rangeHeartRateByAge[0];
|
|
767
|
+
minRange.current =
|
|
768
|
+
gender === 'male' ? rangeByAge.rangeMale : rangeByAge.rangeFemale;
|
|
769
|
+
}
|
|
770
|
+
}, [form$1]);
|
|
771
|
+
const commonProps = Object.assign(Object.assign({}, rest), { onSubmit: form$1.onSubmit(onSubmit, onError) });
|
|
772
|
+
return (React__default["default"].createElement(ThrFormContext.Provider, { value: {
|
|
773
|
+
isAdult,
|
|
774
|
+
activeValueNote,
|
|
775
|
+
linkTool,
|
|
776
|
+
form: form$1,
|
|
777
|
+
submitProps,
|
|
778
|
+
} }, formLayout === 'inline' ? (React__default["default"].createElement(InlineForm$1, Object.assign({}, commonProps))) : (React__default["default"].createElement(DefaultForm$1, Object.assign({}, commonProps)))));
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
const AvoidPregnancy = (_a) => {
|
|
782
|
+
var { isMarryBaby, size = 24 } = _a, rest = tslib_es6.__rest(_a, ["isMarryBaby", "size"]);
|
|
783
|
+
const props = Object.assign({ width: size, height: size }, rest);
|
|
784
|
+
return isMarryBaby ? (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 33 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
785
|
+
React__default["default"].createElement("path", { d: "M16.5 27.133c1.298 0 2.596-.149 3.868-.447a9.15 9.15 0 0 0 6.818-6.818 16.94 16.94 0 0 0 0-7.736 9.15 9.15 0 0 0-6.818-6.818 16.94 16.94 0 0 0-7.736 0 9.15 9.15 0 0 0-6.818 6.818A17 17 0 0 0 5.367 16a.867.867 0 0 1-1.734 0c0-1.43.165-2.862.494-4.264a10.88 10.88 0 0 1 8.109-8.11 18.7 18.7 0 0 1 8.528 0 10.88 10.88 0 0 1 8.11 8.11 18.7 18.7 0 0 1 0 8.528 10.88 10.88 0 0 1-8.11 8.11 18.7 18.7 0 0 1-4.264.493.867.867 0 0 1 0-1.734", fill: "#3E3F58" }),
|
|
786
|
+
React__default["default"].createElement("path", { d: "M12.5 16a4 4 0 1 1 8 0 4 4 0 0 1-8 0", fill: "#fff" }),
|
|
787
|
+
React__default["default"].createElement("path", { d: "M11.633 16a4.867 4.867 0 1 1 9.734 0 4.867 4.867 0 0 1-9.734 0m4.867-3.133a3.133 3.133 0 1 0 0 6.266 3.133 3.133 0 0 0 0-6.266m-4 9.8a2.667 2.667 0 1 1-5.333 0 2.667 2.667 0 0 1 5.333 0", fill: "#3E3F58" }),
|
|
788
|
+
React__default["default"].createElement("path", { d: "M10.305 22.195c.26.26.26.683 0 .943l-1.91 1.91c-.36.36-.562.847-.562 1.355a3.25 3.25 0 0 1-1.796 2.907l-1.239.62a.667.667 0 1 1-.596-1.193l1.238-.62a1.92 1.92 0 0 0 1.06-1.714c0-.862.342-1.688.952-2.298l1.91-1.91c.26-.26.682-.26.943 0", fill: "#3E3F58" }),
|
|
789
|
+
React__default["default"].createElement("path", { d: "M3.874 4.788a1 1 0 0 1 1.414-1.414l23.099 23.098a1 1 0 1 1-1.415 1.415z", fill: "#E85388" }))) : (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 19 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
790
|
+
React__default["default"].createElement("g", { clipPath: "url(#clip0_1530_7251)" },
|
|
791
|
+
React__default["default"].createElement("path", { d: "M8.983 10.87a.23.23 0 0 1 .049-.16c.08-.114.156-.229.207-.36.1-.166.168-.348.233-.528.246-.668.397-1.36.508-2.062.036-.235.076-.471.09-.71.065-.511.101-1.024.095-1.541.004-.015.011-.03.011-.044a13 13 0 0 0-.089-1.62c-.023-.196-.093-.335-.298-.406-.293-.1-.48-.316-.568-.615a2.7 2.7 0 0 0-.217-.566c-.123-.222-.29-.391-.54-.47-.057-.018-.088-.016-.106.052q-.045.165-.073.336c-.005.044 0 .058.048.058q.122.005.244.017c.127.009.21.09.202.196-.011.111-.108.179-.239.166-.065-.007-.133-.009-.198-.016-.058-.008-.077.016-.067.072q.027.165.052.332c.006.043.031.053.07.053.078 0 .147-.03.218-.057.104-.042.2-.004.242.093.04.09.004.187-.093.235-.13.063-.27.113-.411.085a.23.23 0 0 0-.235.077c-.04-.084-.106-.146-.167-.211-.46-.475-.55-1.194-.235-1.82.18-.359.45-.627.828-.776A.4.4 0 0 0 8.69.595c.33-.317.734-.477 1.172-.55.641-.11 1.25-.024 1.819.3.41.233.728.566.942.983.131.253.188.535.246.814.16.762.233 1.538.293 2.313q.108 1.411.213 2.826c.055.712.13 1.422.24 2.128.066.428.175.846.26 1.27.097.479.039.941-.24 1.358a1.2 1.2 0 0 1-.517.428c-.163.05-.327.105-.491.155-.178.052-.302-.059-.268-.239a4.6 4.6 0 0 0 .077-.72 13.6 13.6 0 0 0-.133-2.225c-.03-.196-.055-.395-.087-.591-.07-.43-.151-.857-.257-1.28l-.015-.07a16 16 0 0 0-.282-1.03c-.012-.039-.025-.079-.076-.075-.038.003-.053.034-.058.07l-.146 1.105c-.05.219-.094.437-.158.652a5.5 5.5 0 0 1-.806 1.654l-.091.113c-.308.382-.654.719-1.094.95-.122.06-.177.048-.252-.063", fill: "#1B3250" }),
|
|
792
|
+
React__default["default"].createElement("path", { d: "M12.304 9.435c.1.737.154 1.477.133 2.224a4.6 4.6 0 0 1-.077.72c-.034.182.09.293.268.239q.246-.075.491-.155c.053.226.126.448.17.675q.09.452.129.912c.025.302.043.603.032.905q-.015.483-.065.964a14 14 0 0 1-.299 1.707c-.02.086-.045.17-.065.255-.02.09-.068.12-.16.12L8.789 18H7.781c-.111 0-.117-.011-.13-.124a3 3 0 0 0-.361-1.121c-.132-.235-.297-.448-.415-.692a3.14 3.14 0 0 1-.324-1.521c.233.07.418.001.571-.184q.236-.281.477-.559c.07-.08.136-.164.244-.193.315-.087.631-.166.94-.262.665-.207 1.324-.43 1.917-.804.251-.159.475-.344.595-.63.237-.564.415-1.147.592-1.733.085-.28.184-.55.417-.742", fill: "#2D87F3" }),
|
|
793
|
+
React__default["default"].createElement("path", { d: "M12.304 9.435c-.233.194-.33.462-.413.74-.177.585-.355 1.169-.592 1.733-.12.286-.344.471-.595.63-.593.375-1.254.597-1.916.804-.312.097-.628.177-.941.262-.11.031-.177.113-.244.193q-.24.277-.477.559c-.153.184-.34.253-.571.184a.87.87 0 0 1-.44-.54.64.64 0 0 1 .045-.503 1 1 0 0 0 .094-.31.47.47 0 0 1 .392-.405c.132-.03.269-.039.404-.053a.4.4 0 0 0 .114-.024c.115-.009.21-.069.31-.12.322-.167.646-.328.966-.497q.586-.308 1.192-.571a.78.78 0 0 0 .473-.524q.09-.305.177-.608c.047-.171.113-.337.14-.514a5.5 5.5 0 0 0 .806-1.654c.064-.215.108-.433.159-.652a.63.63 0 0 1 .342-.054c.08.013.156.036.237.054.105.423.187.85.256 1.28q.039.292.082.59m-4.19-5.947a.23.23 0 0 1 .235-.076c.142.025.282-.022.411-.086.097-.047.133-.143.093-.234-.042-.095-.138-.133-.242-.093-.071.027-.14.056-.218.056-.039 0-.062-.009-.07-.053q-.024-.165-.052-.33-.017-.082.067-.074c.066.008.133.01.198.017.131.013.228-.053.239-.166.01-.105-.073-.187-.202-.196-.082-.006-.162-.015-.244-.017-.046 0-.053-.014-.047-.058.016-.115.043-.224.072-.337.017-.067.05-.069.106-.05.25.078.417.247.54.469.1.178.16.371.217.566.087.298.273.515.568.615.206.07.275.21.298.406.066.539.091 1.08.09 1.62 0 .014-.008.029-.011.043-.272-.016-.525.075-.783.133a1.4 1.4 0 0 1-.513.031.5.5 0 0 1-.433-.36 2.3 2.3 0 0 1-.091-.46c.154-.024.309-.048.451-.124.1-.055.135-.148.09-.242a.18.18 0 0 0-.24-.084 1 1 0 0 1-.376.087 1.3 1.3 0 0 0-.326-.482c-.096-.093-.096-.215-.013-.319.06-.07.126-.134.186-.202", fill: "#FCCAAF" }),
|
|
794
|
+
React__default["default"].createElement("path", { d: "M10.069 7.052c-.013.239-.053.473-.09.71-.11.7-.261 1.394-.507 2.062-.066.18-.135.362-.233.528a.46.46 0 0 0-.235-.4c-.328-.21-.544-.508-.599-.898a.86.86 0 0 1 .242-.742c.237-.244.504-.459.761-.683.188-.162.37-.327.555-.493.033-.031.064-.064.106-.084m.349 2.818c-.025.176-.093.341-.14.513-.057.204-.119.404-.177.608a.78.78 0 0 1-.473.524q-.607.261-1.192.571c-.32.17-.646.33-.966.497-.099.051-.195.111-.31.12.066-.15.177-.266.277-.387.273-.334.615-.596.932-.881q.306-.28.611-.565c.077.11.13.124.251.06.439-.229.787-.567 1.094-.95z", fill: "#2D87F3" }),
|
|
795
|
+
React__default["default"].createElement("path", { d: "M8.271 4.49a1 1 0 0 0 .377-.088.183.183 0 0 1 .239.084c.047.095.01.187-.09.242-.14.076-.296.1-.45.124z", fill: "#FF6F4D" }),
|
|
796
|
+
React__default["default"].createElement("path", { d: "M11.96 7.563c-.079-.018-.157-.041-.237-.054a.65.65 0 0 0-.342.054l.146-1.104c.005-.037.02-.068.058-.071.05-.006.063.034.076.074q.159.511.282 1.03.01.036.017.071", fill: "#2D87F3" }),
|
|
797
|
+
React__default["default"].createElement("path", { d: "M9.834 1.004a7.996 7.996 0 1 0 0 15.992 7.996 7.996 0 0 0 0-15.992M9.465 2.26c1.606-.09 3.191.4 4.467 1.378a.282.282 0 0 1 .03.424l-9.066 9.066a.283.283 0 0 1-.424-.03A6.749 6.749 0 0 1 9.465 2.26m.369 13.49a6.72 6.72 0 0 1-4.016-1.325.284.284 0 0 1-.032-.426l9.046-9.047a.283.283 0 0 1 .427.032A6.75 6.75 0 0 1 9.834 15.75", fill: "#F44D2C" }),
|
|
798
|
+
React__default["default"].createElement("path", { d: "M10.159 5.509c.005.517 2.997-1.054 2.997-1.054s-.133-1.55-.293-2.313c-.058-.279-.114-.56-.245-.814a2.35 2.35 0 0 0-.943-.983c-.568-.324-1.178-.41-1.818-.3-.44.073-.843.233-1.173.55a.4.4 0 0 1-.147.085c-.379.15-.648.417-.828.776-.315.626-.224 1.345.235 1.82.062.065.127.127.167.21a.23.23 0 0 1 .235-.076c.142.028.282-.022.411-.085.097-.048.133-.144.093-.235-.042-.097-.138-.135-.242-.093-.071.027-.14.057-.218.057-.039 0-.064-.01-.07-.053q-.024-.165-.052-.332c-.01-.056.009-.08.067-.072.066.007.133.009.198.016.131.013.228-.055.239-.166.009-.105-.075-.187-.202-.196h-.007q-.118-.013-.237-.017c-.047 0-.053-.014-.047-.058.016-.114.043-.225.072-.336.019-.068.05-.07.106-.051.25.078.417.247.54.47.099.178.16.37.217.565.087.299.275.515.568.615.206.071.275.21.298.406.066.539.091 1.078.09 1.62z", fill: "#1B3250" }),
|
|
799
|
+
React__default["default"].createElement("path", { d: "M8.107 3.488a.23.23 0 0 1 .235-.076c.142.025.282-.022.411-.086.097-.047.133-.143.093-.234-.042-.095-.138-.133-.242-.093-.07.027-.14.056-.218.056-.038 0-.062-.009-.07-.053q-.024-.165-.052-.33-.017-.082.067-.074c.066.008.133.01.199.017.13.013.227-.053.238-.166.01-.105-.073-.187-.202-.196-.082-.006-.162-.015-.244-.017-.045 0-.053-.014-.047-.058.016-.115.043-.224.073-.337.016-.067.049-.069.105-.05.25.078.417.247.54.469.1.178.16.371.217.566.088.298.273.515.568.615.206.07.275.21.298.406.066.539.091 1.08.09 1.62 0 .014-.008.029-.011.043-.271-.016-.524.075-.783.133a1.4 1.4 0 0 1-.513.031.5.5 0 0 1-.433-.36 2.3 2.3 0 0 1-.091-.46c.154-.024.31-.048.451-.124.1-.055.135-.148.09-.242a.18.18 0 0 0-.24-.084 1 1 0 0 1-.376.087 1.3 1.3 0 0 0-.326-.482c-.096-.093-.096-.215-.012-.319.06-.07.125-.134.185-.202", fill: "#FCCAAF" }),
|
|
800
|
+
React__default["default"].createElement("path", { d: "M8.265 4.49a1 1 0 0 0 .376-.088.183.183 0 0 1 .239.084c.047.095.01.187-.09.242-.14.076-.296.1-.45.124z", fill: "#FF6F4D" })),
|
|
801
|
+
React__default["default"].createElement("defs", null,
|
|
802
|
+
React__default["default"].createElement("clipPath", { id: "clip0_1530_7251" },
|
|
803
|
+
React__default["default"].createElement("path", { fill: "#fff", d: "M.834 0h18v18h-18z" })))));
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
const TryConceive = (_a) => {
|
|
807
|
+
var { isMarryBaby, size = 24 } = _a, rest = tslib_es6.__rest(_a, ["isMarryBaby", "size"]);
|
|
808
|
+
const props = Object.assign({ width: size, height: size }, rest);
|
|
809
|
+
return isMarryBaby ? (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 33 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
810
|
+
React__default["default"].createElement("path", { d: "M14.018 9.155c-1.422 1.066-1.777 1.777-1.067 2.843.57.853 2.133 2.488 3.2 3.554-.712 2.133-6.753 1.422-6.753 1.422l-.711 1.421-1.067 3.199c-1.066 0-3.198.142-3.198.71 0 .712 2.843 2.844 3.554 2.844.569 0 1.658-2.132 2.132-3.199 1.54 1.777 5.474 4.905 8.885 3.199 4.265-2.132 6.398-5.331 5.687-7.819-.274-.959-.284-1.495-.132-1.813a4.62 4.62 0 0 0 3.438-2.3c.715-1.108.78-2.417.397-3.652-.41-1.663-1.15-2.955-2.637-3.252-3.423-.685-6.397 1.016-6.397 4.62a4.6 4.6 0 0 0 .971 2.834c-1.184.316-2.414-.236-6.302-4.611", fill: "#fff" }),
|
|
811
|
+
React__default["default"].createElement("path", { d: "M29.3 10.825A5.235 5.235 0 0 0 24.077 5.6c-2.876 0-5.245 2.348-5.245 5.224 0 .36.275.634.634.634.36 0 .635-.275.635-.634 0-2.179 1.776-3.955 3.976-3.955s3.954 1.776 3.954 3.955a3.947 3.947 0 0 1-3.531 3.933.8.8 0 0 0-.381-.021c-.042.021-.085.021-.106.042a.64.64 0 0 0-.57.635c0 .254.147.465.359.57.105.487.148.995.148 1.502a7.175 7.175 0 0 1-7.17 7.17 7.22 7.22 0 0 1-5.773-2.898l-.02-.021c.507-.317 1.902-.17 2.41-.106a.637.637 0 0 0 .698-.57.637.637 0 0 0-.571-.699c-1.184-.148-3.384-.38-3.891 1.164-.064.19-.127.401-.19.592-.318.994-.74 2.347-1.27 2.58-.634.063-2.918-1.587-3.172-2.284.212-.275 1.248-.444 2.623 0 .169.063.36.042.507-.064s.275-.232.296-.423c.571-2.707.74-3.278.74-3.299v-.021c.212-.888.867-.973 2.538-.93 1.523.042 3.384.084 4.674-1.46a7.8 7.8 0 0 0 3.235.994h.043a.643.643 0 0 0 .634-.592c.021-.36-.232-.655-.57-.677-4.4-.36-6.028-4.652-6.091-4.842 0 0 0-.022-.022-.022-.274-.634-.063-1.036.19-1.163.17-.105.445-.105.614.17 1.248 2.008 2.432 3.32 3.574 4.018.021 0 .042.02.042.02.677.34 2.052.762 3.596-.295.296-.19.359-.592.169-.889-.19-.296-.592-.36-.889-.169-.951.635-1.776.487-2.305.233-.93-.571-1.988-1.777-3.108-3.574-.508-.783-1.48-1.036-2.284-.613-.762.401-1.312 1.438-.762 2.77.085.254.93 2.368 2.898 3.934a2.7 2.7 0 0 1-.614.486c-.02 0-.02 0-.042-.021-8.205-2.517-8.86-8.586-8.924-9.77a.61.61 0 0 0-.656-.614.63.63 0 0 0-.592.656c.042 1.226.655 7.084 7.74 10.172h-.508c-1.48-.042-3.34-.085-3.806 1.882-.021.106-.17.677-.613 2.707-1.587-.36-3.194-.127-3.574 1.036-.19.55.126 1.206.972 2.01.571.549 2.263 1.902 3.447 1.902.149 0 .297-.02.423-.063.952-.36 1.438-1.544 1.861-2.813a8.48 8.48 0 0 0 6.324 2.855c4.652 0 8.438-3.785 8.438-8.438 0-.507-.043-1.015-.148-1.522a5.264 5.264 0 0 0 4.23-5.16", fill: "#3E3F58" }),
|
|
812
|
+
React__default["default"].createElement("rect", { x: "23.005", y: "8.444", width: "1.942", height: "1.422", rx: ".711", transform: "rotate(34.869 23.005 8.444)", fill: "#FB8C00" }))) : (React__default["default"].createElement("svg", Object.assign({ viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
813
|
+
React__default["default"].createElement("path", { d: "M13.996 8.62v3.221c1.054.035 1.682-.705 1.845-1.467.209-.977-.444-2.041-1.845-1.754", fill: "#FEAA96" }),
|
|
814
|
+
React__default["default"].createElement("path", { d: "M14.055 10.67a.21.21 0 0 1-.2-.277c.166-.508.594-.69.92-.644a.21.21 0 1 1-.059.418c-.163-.023-.37.079-.461.358a.21.21 0 0 1-.2.145", fill: "#FF886C" }),
|
|
815
|
+
React__default["default"].createElement("path", { d: "M2.16 10.374c.162.762.79 1.502 1.844 1.467V8.62c-1.4-.287-2.054.777-1.845 1.754", fill: "#FEAA96" }),
|
|
816
|
+
React__default["default"].createElement("path", { d: "M3.98 10.67a.21.21 0 0 1-.2-.145c-.093-.28-.299-.381-.462-.358a.21.21 0 0 1-.21-.102.21.21 0 0 1 .152-.316c.326-.046.753.136.92.644a.21.21 0 0 1-.2.277", fill: "#FF886C" }),
|
|
817
|
+
React__default["default"].createElement("path", { d: "M9 15.831c1.325 0 3.365-.561 4.534-2.292 1.057-1.563.436-4.144.462-5.169.053-2.079-1.447-4.78-4.996-4.78s-5.05 2.7-4.996 4.78c.026 1.025-.595 3.606.461 5.169 1.17 1.73 3.21 2.292 4.535 2.292", fill: "#FECCBF" }),
|
|
818
|
+
React__default["default"].createElement("path", { d: "M6.881 10.535a.56.56 0 1 0 0-1.121.56.56 0 0 0 0 1.121", fill: "#A35961" }),
|
|
819
|
+
React__default["default"].createElement("path", { d: "M7.114 9.777a.21.21 0 0 1-.188-.116c-.049-.097-.205-.122-.27-.129-.225-.022-.44.056-.477.104a.211.211 0 1 1-.347-.241c.149-.215.53-.306.831-.285.306.021.533.15.64.362a.21.21 0 0 1-.189.305", fill: "#8C2F39" }),
|
|
820
|
+
React__default["default"].createElement("path", { d: "M11.119 10.535a.56.56 0 1 0 0-1.121.56.56 0 0 0 0 1.121", fill: "#A35961" }),
|
|
821
|
+
React__default["default"].createElement("path", { d: "M9 13.329c.777 0 .994-.61 1.046-.92.031-.185-.132-.35-.34-.35H8.293c-.208 0-.371.165-.34.35.052.31.27.92 1.047.92", fill: "#D84023" }),
|
|
822
|
+
React__default["default"].createElement("path", { d: "M10.763 7.94a.2.2 0 0 1-.107-.03.33.33 0 0 0-.18-.029.21.21 0 1 1-.07-.416.74.74 0 0 1 .464.081.211.211 0 0 1-.107.393m-3.526 0a.21.21 0 0 1-.107-.393.74.74 0 0 1 .463-.08.211.211 0 1 1-.07.415.3.3 0 0 0-.18.029.2.2 0 0 1-.106.029", fill: "#FEAA96" }),
|
|
823
|
+
React__default["default"].createElement("path", { d: "M10.887 9.777a.21.21 0 0 1-.189-.305c.107-.212.334-.34.64-.362.3-.021.682.07.83.285a.211.211 0 0 1-.346.24c-.038-.048-.252-.125-.477-.103-.065.007-.221.032-.27.129a.21.21 0 0 1-.188.116", fill: "#8C2F39" }),
|
|
824
|
+
React__default["default"].createElement("path", { d: "M9.284 11.02a.21.21 0 0 1-.22-.15.07.07 0 0 0-.063-.05H9a.07.07 0 0 0-.064.05.21.21 0 0 1-.22.15.22.22 0 0 1-.192-.244c.018-.221.213-.379.476-.379.264 0 .458.158.476.38a.22.22 0 0 1-.192.244", fill: "#FEAA96" }),
|
|
825
|
+
React__default["default"].createElement("path", { d: "M9.55 12.06h-1.1l-.003.054a.552.552 0 1 0 1.102-.055m2.041-.774-.29.53a.1.1 0 0 1-.041.04l-.53.29a.1.1 0 0 0-.053.09.1.1 0 0 0 .053.09l.53.29q.026.015.04.04l.29.53a.103.103 0 0 0 .18 0l.29-.53a.1.1 0 0 1 .041-.04l.53-.29a.103.103 0 0 0 0-.18l-.53-.29a.1.1 0 0 1-.04-.04l-.29-.53a.1.1 0 0 0-.143-.039.1.1 0 0 0-.038.04", fill: "#fff" }),
|
|
826
|
+
React__default["default"].createElement("path", { d: "M11.055 2.193c-.147-.422-.524-.698-1.01-.738a.9.9 0 0 0-.535.154c-.206.155-.37.358-.478.592a.036.036 0 0 1-.066 0 1.55 1.55 0 0 0-.475-.592.9.9 0 0 0-.537-.154c-.485.04-.862.316-1.008.739a1.03 1.03 0 0 0 .259 1.09c.479.447 1.156.518 1.543.518h.502c.387 0 1.066-.07 1.545-.517a1.03 1.03 0 0 0 .26-1.092M8.79 3.243a.13.13 0 0 1-.134.135c-.316-.012-.821-.084-1.163-.402a.61.61 0 0 1-.148-.644.66.66 0 0 1 .438-.417c.242-.078.404-.006.456.033.446.33.539.932.551 1.295m1.718-.267c-.342.319-.847.39-1.163.402a.13.13 0 0 1-.135-.135c.013-.362.105-.964.551-1.295a.47.47 0 0 1 .25-.073c.318.027.554.193.645.457a.61.61 0 0 1-.149.644", fill: "#2D87F3" }),
|
|
827
|
+
React__default["default"].createElement("path", { d: "M8.998 3.338a.21.21 0 0 1 .122.383l-.04.028c-.16.118-.957.76-.991 1.758-.027.78.403 1.132.814 1.202.367.062.831-.096.985-.59a.415.415 0 0 0-.211-.52c-.136-.069-.32-.076-.425.064a.211.211 0 0 1-.337-.253c.215-.287.607-.363.954-.186a.836.836 0 0 1 .422 1.02 1.28 1.28 0 0 1-1.458.88c-.56-.095-1.202-.58-1.166-1.631.046-1.334 1.17-2.093 1.222-2.125a.2.2 0 0 1 .109-.03", fill: "#BA8288" })));
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
const OvulationFormContext = React.createContext({});
|
|
831
|
+
|
|
832
|
+
const DefaultLayout$1 = (_a) => {
|
|
833
|
+
var props = tslib_es6.__rest(_a, []);
|
|
834
|
+
const { t } = useTranslations.useTranslations();
|
|
835
|
+
const { currentUrl, submitProps, form, calculatingMethods, isMobile } = React.useContext(OvulationFormContext);
|
|
836
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "default" }, props),
|
|
837
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Control, null,
|
|
838
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.ChipGroup, Object.assign({ data: calculatingMethods, label: t('dueDatePage.calculationMethod'), isMobile: isMobile }, form.getInputProps('calculatorType')))),
|
|
839
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ placeholder: "DD/MM/YYYY", popoverProps: {
|
|
840
|
+
withinPortal: true,
|
|
841
|
+
}, label: t('dueDatePage.lastPeriod.lastPeriodLabel'), maxDate: new Date() }, form.getInputProps('lastPeriodDate'))),
|
|
842
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ label: `${t('ovulationPage.cycleLength')} (${t('ovulationPage.dayUnit')})`, min: 21, max: 45, defaultValue: 1 }, form.getInputProps('cycleLength'))),
|
|
843
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ label: `${t('ovulationPage.periodDuration')} (${t('ovulationPage.dayUnit')})`, min: 1, max: 15, defaultValue: 1 }, form.getInputProps('periodLength'))),
|
|
844
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", className: "due-date-calculate-button", dataEventCategory: "Health Tool", dataEventAction: "Ovulation", dataEventLabel: currentUrl }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
const InlineLayout$1 = (_a) => {
|
|
848
|
+
var props = tslib_es6.__rest(_a, []);
|
|
849
|
+
const { t } = useTranslations.useTranslations();
|
|
850
|
+
const { currentUrl, submitProps, form, calculatingMethods } = React.useContext(OvulationFormContext);
|
|
851
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "inline" }, props),
|
|
852
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('dueDatePage.calculationMethod'), direction: "column", width: '100%' },
|
|
853
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.ChipGroup, Object.assign({ data: calculatingMethods }, form.getInputProps('calculatorType')))),
|
|
854
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('dueDatePage.lastPeriod.lastPeriodLabel') },
|
|
855
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ placeholder: "DD/MM/YYYY", popoverProps: {
|
|
856
|
+
withinPortal: true,
|
|
857
|
+
}, maxDate: new Date() }, form.getInputProps('lastPeriodDate')))),
|
|
858
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
859
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('ovulationPage.cycleLength') + ' ' + t('ovulationPage.dayUnit') },
|
|
860
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: 21, max: 45, defaultValue: 1 }, form.getInputProps('cycleLength'), { error: null }))),
|
|
861
|
+
form.errors.cycleLength && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.cycleLength))),
|
|
862
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
863
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('ovulationPage.periodDuration') + ' ' + t('ovulationPage.dayUnit') },
|
|
864
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: 1, max: 15, defaultValue: 1 }, form.getInputProps('periodLength'), { error: null }))),
|
|
865
|
+
form.errors.periodLength && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.periodLength))),
|
|
866
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", className: "due-date-calculate-button", dataEventCategory: "Health Tool", dataEventAction: "Ovulation", dataEventLabel: currentUrl }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
const MbLayout$2 = (_a) => {
|
|
870
|
+
var props = tslib_es6.__rest(_a, []);
|
|
871
|
+
const { t } = useTranslations.useTranslations();
|
|
872
|
+
const { currentUrl, submitProps, form, calculatingMethods } = React.useContext(OvulationFormContext);
|
|
873
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "inline" }, props),
|
|
874
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Control, null,
|
|
875
|
+
React__default["default"].createElement(index$2.Input.Wrapper, { label: React__default["default"].createElement(index$4.Text, { size: "p4", sx: { fontWeight: 'normal' } }, t('dueDatePage.calculationMethod')) },
|
|
876
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.ChipGroup, Object.assign({ data: calculatingMethods }, form.getInputProps('calculatorType'))))),
|
|
877
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('dueDatePage.lastPeriod.lastPeriodLabel'), rightSection: React__default["default"].createElement(other.CalendarMB, null) },
|
|
878
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ placeholder: "DD/MM/YYYY", popoverProps: {
|
|
879
|
+
withinPortal: true,
|
|
880
|
+
}, maxDate: new Date(), rightSection: null }, form.getInputProps('lastPeriodDate')))),
|
|
881
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('ovulationPage.cycleLength'), rightSection: t('ovulationPage.dayUnit') },
|
|
882
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: 21, max: 45, defaultValue: 1 }, form.getInputProps('cycleLength')))),
|
|
883
|
+
form.errors.cycleLength && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.cycleLength)),
|
|
884
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('ovulationPage.periodDuration'), rightSection: t('ovulationPage.dayUnit') },
|
|
885
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: 1, max: 15, defaultValue: 1 }, form.getInputProps('periodLength')))),
|
|
886
|
+
form.errors.periodLength && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.periodLength)),
|
|
887
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", className: "due-date-calculate-button", dataEventCategory: "Health Tool", dataEventAction: "Ovulation", dataEventLabel: currentUrl }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
var OvulationCalculatorType$1;
|
|
891
|
+
(function (OvulationCalculatorType) {
|
|
892
|
+
OvulationCalculatorType[OvulationCalculatorType["trackPeriod"] = 0] = "trackPeriod";
|
|
893
|
+
OvulationCalculatorType[OvulationCalculatorType["conceive"] = 1] = "conceive";
|
|
894
|
+
OvulationCalculatorType[OvulationCalculatorType["avoidPregnancy"] = 2] = "avoidPregnancy";
|
|
895
|
+
})(OvulationCalculatorType$1 || (OvulationCalculatorType$1 = {}));
|
|
896
|
+
const OvulationForm = (_a) => {
|
|
897
|
+
var { formLayout = 'default', submitProps, currentUrl, isMobile, onSubmit } = _a, props = tslib_es6.__rest(_a, ["formLayout", "submitProps", "currentUrl", "isMobile", "onSubmit"]);
|
|
898
|
+
const theme = core.useMantineTheme();
|
|
899
|
+
const { t } = useTranslations.useTranslations();
|
|
900
|
+
const isMarryBaby = theme.other.template === 'mb';
|
|
901
|
+
const form$1 = form.useForm({
|
|
902
|
+
initialValues: {
|
|
903
|
+
calculatorType: String(OvulationCalculatorType$1.trackPeriod),
|
|
904
|
+
periodLength: 7,
|
|
905
|
+
cycleLength: 28,
|
|
906
|
+
lastPeriodDate: new Date(),
|
|
907
|
+
},
|
|
908
|
+
validate: {
|
|
909
|
+
periodLength: form.isNotEmpty(t('validation.error.requiredField')),
|
|
910
|
+
cycleLength: form.isNotEmpty(t('validation.error.requiredField')),
|
|
911
|
+
},
|
|
912
|
+
});
|
|
913
|
+
const commonProps = Object.assign({ onSubmit: form$1.onSubmit(onSubmit) }, props);
|
|
914
|
+
const calculatingMethods = [
|
|
915
|
+
{
|
|
916
|
+
label: t('ovulationPage.trackPeriod'),
|
|
917
|
+
value: OvulationCalculatorType$1.trackPeriod,
|
|
918
|
+
icon: React__default["default"].createElement(LastPeriod, null),
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
label: t('ovulationPage.conceive'),
|
|
922
|
+
value: OvulationCalculatorType$1.conceive,
|
|
923
|
+
icon: React__default["default"].createElement(TryConceive, null),
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
label: t('ovulationPage.avoidPregnancy'),
|
|
927
|
+
value: OvulationCalculatorType$1.avoidPregnancy,
|
|
928
|
+
icon: React__default["default"].createElement(AvoidPregnancy, null),
|
|
929
|
+
},
|
|
930
|
+
];
|
|
931
|
+
return (React__default["default"].createElement(OvulationFormContext.Provider, { value: { submitProps, currentUrl, form: form$1, isMobile, calculatingMethods } }, formLayout === 'inline' ? (React__default["default"].createElement(InlineLayout$1, Object.assign({}, commonProps))) : isMarryBaby ? (React__default["default"].createElement(MbLayout$2, Object.assign({ formLayout: formLayout }, commonProps))) : (React__default["default"].createElement(DefaultLayout$1, Object.assign({}, commonProps)))));
|
|
932
|
+
};
|
|
933
|
+
|
|
934
|
+
const BabyVaccineFormContext = React.createContext({});
|
|
935
|
+
|
|
936
|
+
const DefaultLayout = (_a) => {
|
|
937
|
+
var props = tslib_es6.__rest(_a, []);
|
|
938
|
+
const { t } = useTranslations.useTranslations();
|
|
939
|
+
const { currentUrl, submitProps, form } = React.useContext(BabyVaccineFormContext);
|
|
940
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "default" }, props),
|
|
941
|
+
React__default["default"].createElement(index$3.GenderOptionControl, Object.assign({ isBaby: true }, form.getInputProps('gender'))),
|
|
942
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ label: t('babyGrowth.input.birthday'), placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
943
|
+
withinPortal: true,
|
|
944
|
+
}, maxDate: new Date() }, form.getInputProps('age'))),
|
|
945
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", className: "due-date-calculate-button", dataEventCategory: "Health Tool", dataEventAction: "Vaccination Tool", dataEventLabel: currentUrl }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
946
|
+
};
|
|
947
|
+
|
|
948
|
+
const InlineLayout = (_a) => {
|
|
949
|
+
var props = tslib_es6.__rest(_a, []);
|
|
950
|
+
const { t } = useTranslations.useTranslations();
|
|
951
|
+
const { currentUrl, submitProps, form } = React.useContext(BabyVaccineFormContext);
|
|
952
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "inline" }, props),
|
|
953
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
954
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('tools.selectBabyGender'), width: 'none' },
|
|
955
|
+
React__default["default"].createElement(index$3.GenderOptionControl, Object.assign({ isBaby: true, hideLabel: true, type: "radio" }, form.getInputProps('gender')))),
|
|
956
|
+
form.errors.gender && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.gender))),
|
|
957
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
958
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.input.birthday') },
|
|
959
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
960
|
+
withinPortal: true,
|
|
961
|
+
}, maxDate: new Date() }, form.getInputProps('age'), { error: null }))),
|
|
962
|
+
form.errors.age && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.gender))),
|
|
963
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", className: "due-date-calculate-button", dataEventCategory: "Health Tool", dataEventAction: "Vaccination Tool", dataEventLabel: currentUrl }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
964
|
+
};
|
|
965
|
+
|
|
966
|
+
const MbLayout$1 = (_a) => {
|
|
967
|
+
var props = tslib_es6.__rest(_a, []);
|
|
968
|
+
const { t } = useTranslations.useTranslations();
|
|
969
|
+
const { currentUrl, submitProps, form } = React.useContext(BabyVaccineFormContext);
|
|
970
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "default" }, props),
|
|
971
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Control, null,
|
|
972
|
+
React__default["default"].createElement(index$3.GenderOptionControl, Object.assign({ isBaby: true }, form.getInputProps('gender'), { error: null }))),
|
|
973
|
+
form.errors.gender && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.gender)),
|
|
974
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
975
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('babyGrowth.input.birthday'), rightSection: React__default["default"].createElement(other.CalendarMB, null) },
|
|
976
|
+
React__default["default"].createElement(index.DatePicker, Object.assign({ placeholder: 'DD/MM/YYYY', popoverProps: {
|
|
977
|
+
withinPortal: true,
|
|
978
|
+
}, maxDate: new Date(), rightSection: null }, form.getInputProps('age'), { error: null }))),
|
|
979
|
+
form.errors.age && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.gender))),
|
|
980
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", className: "due-date-calculate-button", dataEventCategory: "Health Tool", dataEventAction: "Vaccination Tool", dataEventLabel: currentUrl }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
var OvulationCalculatorType;
|
|
984
|
+
(function (OvulationCalculatorType) {
|
|
985
|
+
OvulationCalculatorType[OvulationCalculatorType["trackPeriod"] = 0] = "trackPeriod";
|
|
986
|
+
OvulationCalculatorType[OvulationCalculatorType["conceive"] = 1] = "conceive";
|
|
987
|
+
OvulationCalculatorType[OvulationCalculatorType["avoidPregnancy"] = 2] = "avoidPregnancy";
|
|
988
|
+
})(OvulationCalculatorType || (OvulationCalculatorType = {}));
|
|
989
|
+
const BabyVaccineForm = (_a) => {
|
|
990
|
+
var { formLayout = 'default', submitProps, currentUrl, onSubmit } = _a, props = tslib_es6.__rest(_a, ["formLayout", "submitProps", "currentUrl", "onSubmit"]);
|
|
991
|
+
const { t } = useTranslations.useTranslations();
|
|
992
|
+
const theme = core.useMantineTheme();
|
|
993
|
+
const isMarryBaby = theme.other.template === 'mb';
|
|
994
|
+
const form$1 = form.useForm({
|
|
995
|
+
validate: {
|
|
996
|
+
gender: form.isNotEmpty(t('validation.error.requiredField')),
|
|
997
|
+
age: form.isNotEmpty(t('validation.error.requiredField')),
|
|
998
|
+
},
|
|
999
|
+
});
|
|
1000
|
+
const commonProps = Object.assign({ onSubmit: form$1.onSubmit(onSubmit) }, props);
|
|
1001
|
+
return (React__default["default"].createElement(BabyVaccineFormContext.Provider, { value: { submitProps, currentUrl, form: form$1 } }, formLayout === 'inline' ? (React__default["default"].createElement(InlineLayout, Object.assign({}, commonProps))) : isMarryBaby ? (React__default["default"].createElement(MbLayout$1, Object.assign({ formLayout: formLayout }, commonProps))) : (React__default["default"].createElement(DefaultLayout, Object.assign({}, commonProps)))));
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
const PWGFormContext = React.createContext({});
|
|
1005
|
+
|
|
1006
|
+
const DefaultForm = (_a) => {
|
|
1007
|
+
var props = tslib_es6.__rest(_a, []);
|
|
1008
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
1009
|
+
const { linkTool, form, submitProps } = React.useContext(PWGFormContext);
|
|
1010
|
+
const theme = core.useMantineTheme();
|
|
1011
|
+
const isMarryBaby = theme.other.template === 'mb';
|
|
1012
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "default" }, props),
|
|
1013
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ label: t('pregnancyWeightGain.weekInput'), min: constants.INPUT_RANGE.pregnantWeek.min, max: constants.INPUT_RANGE.pregnantWeek.max, placeholder: `${constants.INPUT_RANGE.pregnantWeek.min} - ${constants.INPUT_RANGE.pregnantWeek.max}` }, form.getInputProps('pregnantWeek'))),
|
|
1014
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ label: t('pregnancyWeightGain.weightBeforeInput'), min: constants.INPUT_RANGE.weight.min, max: constants.INPUT_RANGE.weight.max, placeholder: t('tools.inputPlaceholder', {
|
|
1015
|
+
content: '50',
|
|
1016
|
+
}) }, form.getInputProps('lastWeight'))),
|
|
1017
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ label: t('pregnancyWeightGain.heightInput'), min: constants.INPUT_RANGE.height.min, max: constants.INPUT_RANGE.height.max, placeholder: t('tools.inputPlaceholder', {
|
|
1018
|
+
content: '160',
|
|
1019
|
+
}) }, form.getInputProps('height'))),
|
|
1020
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ label: t('pregnancyWeightGain.weightInput'), min: constants.INPUT_RANGE.weight.min, max: constants.INPUT_RANGE.weight.max, placeholder: t('tools.inputPlaceholder', {
|
|
1021
|
+
content: '50',
|
|
1022
|
+
}) }, form.getInputProps('weight'))),
|
|
1023
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Switching, Object.assign({ label: t('pregnancyWeightGain.havingTwins') }, form.getInputProps('hasTwin'))),
|
|
1024
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", dataEventCategory: "Health Tool", dataEventAction: "Embedded Pregnancy Weight Gain", dataEventLabel: `https://${index$1.domainLocales[isMarryBaby ? 'vi-VN_MB' : locale]}/${linkTool}`, className: "due-date-calculate-button" }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
const InlineForm = (_a) => {
|
|
1028
|
+
var props = tslib_es6.__rest(_a, []);
|
|
1029
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
1030
|
+
const { linkTool, form, submitProps } = React.useContext(PWGFormContext);
|
|
1031
|
+
const theme = core.useMantineTheme();
|
|
1032
|
+
const isMarryBaby = theme.other.template === 'mb';
|
|
1033
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "inline" }, props),
|
|
1034
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('pregnancyWeightGain.weekInput') },
|
|
1035
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: constants.INPUT_RANGE.pregnantWeek.min, max: constants.INPUT_RANGE.pregnantWeek.max, placeholder: `${constants.INPUT_RANGE.pregnantWeek.min} - ${constants.INPUT_RANGE.pregnantWeek.max}`, rightSection: React__default["default"].createElement(constants.HealthToolFormWrapper.Unit, null, t('pwgForm.week')) }, form.getInputProps('pregnantWeek')))),
|
|
1036
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('pregnancyWeightGain.weightBeforeInput') },
|
|
1037
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({}, form.getInputProps('lastWeight'), { min: constants.INPUT_RANGE.weight.min, max: constants.INPUT_RANGE.weight.max, placeholder: t('tools.inputPlaceholder', {
|
|
1038
|
+
content: '50',
|
|
1039
|
+
}), rightSection: React__default["default"].createElement(constants.HealthToolFormWrapper.Unit, null, t('babyGrowth.kg')) }))),
|
|
1040
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('pregnancyWeightGain.heightInput') },
|
|
1041
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({}, form.getInputProps('height'), { min: constants.INPUT_RANGE.height.min, max: constants.INPUT_RANGE.height.max, placeholder: t('tools.inputPlaceholder', {
|
|
1042
|
+
content: '160',
|
|
1043
|
+
}), rightSection: React__default["default"].createElement(constants.HealthToolFormWrapper.Unit, null, t('babyGrowth.cm')) }))),
|
|
1044
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('pregnancyWeightGain.weightInput') },
|
|
1045
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({}, form.getInputProps('weight'), { min: constants.INPUT_RANGE.weight.min, max: constants.INPUT_RANGE.weight.max, placeholder: t('tools.inputPlaceholder', {
|
|
1046
|
+
content: '50',
|
|
1047
|
+
}), rightSection: React__default["default"].createElement(constants.HealthToolFormWrapper.Unit, null, t('babyGrowth.kg')) }))),
|
|
1048
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderInlineControl, { label: t('pregnancyWeightGain.havingTwins'), width: 'none' },
|
|
1049
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Switching, Object.assign({}, form.getInputProps('hasTwin')))),
|
|
1050
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", dataEventCategory: "Health Tool", dataEventAction: "Embedded Pregnancy Weight Gain", dataEventLabel: `https://${index$1.domainLocales[isMarryBaby ? 'vi-VN_MB' : locale]}/${linkTool}`, className: "due-date-calculate-button" }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
const MbLayout = (_a) => {
|
|
1054
|
+
var props = tslib_es6.__rest(_a, []);
|
|
1055
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
1056
|
+
const { linkTool, form, submitProps } = React.useContext(PWGFormContext);
|
|
1057
|
+
const theme = core.useMantineTheme();
|
|
1058
|
+
const isMarryBaby = theme.other.template === 'mb';
|
|
1059
|
+
return (React__default["default"].createElement(constants.HealthToolFormWrapper, Object.assign({ formLayout: "inline" }, props),
|
|
1060
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
1061
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('pregnancyWeightGain.weekInput'), rightSection: t('pregnancy.week') },
|
|
1062
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: constants.INPUT_RANGE.pregnantWeek.min, max: constants.INPUT_RANGE.pregnantWeek.max, placeholder: `${constants.INPUT_RANGE.pregnantWeek.min} - ${constants.INPUT_RANGE.pregnantWeek.max}` }, form.getInputProps('pregnantWeek')))),
|
|
1063
|
+
form.errors.pregnantWeek && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.pregnantWeek))),
|
|
1064
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
1065
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('pregnancyWeightGain.weightBeforeInput'), rightSection: "kg" },
|
|
1066
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: constants.INPUT_RANGE.weight.min, max: constants.INPUT_RANGE.weight.max }, form.getInputProps('lastWeight'), { placeholder: t('tools.inputPlaceholder', {
|
|
1067
|
+
content: '50',
|
|
1068
|
+
}) }))),
|
|
1069
|
+
form.errors.lastWeight && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.lastWeight))),
|
|
1070
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
1071
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('pregnancyWeightGain.heightInput'), rightSection: "cm" },
|
|
1072
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: constants.INPUT_RANGE.height.min, max: constants.INPUT_RANGE.height.max }, form.getInputProps('height'), { placeholder: t('tools.inputPlaceholder', {
|
|
1073
|
+
content: '160',
|
|
1074
|
+
}) }))),
|
|
1075
|
+
form.errors.height && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.height))),
|
|
1076
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.FormRow, null,
|
|
1077
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.BorderBoxControl, { label: t('pregnancyWeightGain.weightInput'), rightSection: "kg" },
|
|
1078
|
+
React__default["default"].createElement(index$2.Input.Number, Object.assign({ min: constants.INPUT_RANGE.weight.min, max: constants.INPUT_RANGE.weight.max }, form.getInputProps('weight'), { placeholder: t('tools.inputPlaceholder', {
|
|
1079
|
+
content: '50',
|
|
1080
|
+
}) }))),
|
|
1081
|
+
form.errors.weight && (React__default["default"].createElement(constants.HealthToolFormWrapper.Error, null, form.errors.weight))),
|
|
1082
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Switching, Object.assign({ label: t('pregnancyWeightGain.havingTwins') }, form.getInputProps('hasTwin'))),
|
|
1083
|
+
React__default["default"].createElement(constants.HealthToolFormWrapper.Submit, Object.assign({ type: "submit", dataEventCategory: "Health Tool", dataEventAction: "Embedded Pregnancy Weight Gain", dataEventLabel: `https://${index$1.domainLocales[isMarryBaby ? 'vi-VN_MB' : locale]}/${linkTool}`, className: "due-date-calculate-button" }, submitProps), t('dueDatePage.lastPeriod.calculate'))));
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
const PWGForm = (_a) => {
|
|
1087
|
+
var { formLayout = 'default', submitProps, onSubmit } = _a, rest = tslib_es6.__rest(_a, ["formLayout", "submitProps", "onSubmit"]);
|
|
1088
|
+
const { t, locale } = useTranslations.useTranslations();
|
|
1089
|
+
const theme = core.useMantineTheme();
|
|
1090
|
+
const isMarryBaby = theme.other.template === 'mb';
|
|
1091
|
+
const form$1 = form.useForm({
|
|
1092
|
+
validate: {
|
|
1093
|
+
pregnantWeek: form.isNotEmpty(t('validation.error.requiredField')),
|
|
1094
|
+
height: form.isNotEmpty(t('validation.error.requiredField')),
|
|
1095
|
+
weight: (value, values) => {
|
|
1096
|
+
return !value
|
|
1097
|
+
? t('validation.error.requiredField')
|
|
1098
|
+
: Number(value) >= Number(values.lastWeight)
|
|
1099
|
+
? null
|
|
1100
|
+
: t('pregnancyWeightGain.weightInput.error');
|
|
1101
|
+
},
|
|
1102
|
+
lastWeight: (value, values) => {
|
|
1103
|
+
return !value
|
|
1104
|
+
? t('validation.error.requiredField')
|
|
1105
|
+
: Number(value) < Number(values.weight)
|
|
1106
|
+
? null
|
|
1107
|
+
: t('pregnancyWeightGain.weightInput.error');
|
|
1108
|
+
},
|
|
1109
|
+
},
|
|
1110
|
+
});
|
|
1111
|
+
const { getHealthToolLink } = useHealthToolCache.useHealthToolsCache(locale);
|
|
1112
|
+
const linkTool = React.useMemo(() => getHealthToolLink(constants$1.HEALTH_TOOL_TYPE.PWG), [getHealthToolLink]);
|
|
1113
|
+
const commonProps = Object.assign({ onSubmit: form$1.onSubmit(onSubmit) }, rest);
|
|
1114
|
+
return (React__default["default"].createElement(PWGFormContext.Provider, { value: {
|
|
1115
|
+
linkTool,
|
|
1116
|
+
form: form$1,
|
|
1117
|
+
submitProps,
|
|
1118
|
+
} }, formLayout === 'inline' ? (React__default["default"].createElement(InlineForm, Object.assign({}, commonProps))) : isMarryBaby ? (React__default["default"].createElement(MbLayout, Object.assign({ formLayout: formLayout }, commonProps))) : (React__default["default"].createElement(DefaultForm, Object.assign({}, commonProps)))));
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
exports.BabyPoopForm = BabyPoopForm;
|
|
1122
|
+
exports.BabyVaccineForm = BabyVaccineForm;
|
|
1123
|
+
exports.BmiForm = BmiForm;
|
|
1124
|
+
exports.DueDateForm = DueDateForm;
|
|
1125
|
+
exports.OvulationForm = OvulationForm;
|
|
1126
|
+
exports.PWGForm = PWGForm;
|
|
1127
|
+
exports.ThrForm = ThrForm;
|