@hhgtech/hhg-components 1.29.50 → 1.29.52
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/{WhatsApp-9f6f69af.js → WhatsApp-f40127bd.js} +1 -1
- package/build/adapters.js +15 -15
- package/build/babyGrowth.js +81 -83
- package/build/cache.js +3 -3
- package/build/care.js +17 -17
- package/build/components/atoms/inputMB/index.styled.d.ts +4 -4
- package/build/components/babyGrowth/babyGrowthForm/context.d.ts +4 -6
- package/build/components/babyGrowth/babyGrowthForm/index.d.ts +2 -4
- package/build/components/babyGrowth/babyGrowthForm/layout/default/index.d.ts +2 -2
- package/build/components/babyGrowth/babyGrowthForm/layout/default/index.styles.d.ts +8 -0
- package/build/components/molecules/embeddedHeathToolCards/baby-growth/index.d.ts +3 -9
- package/build/components/molecules/healthTools/form/constants.d.ts +14 -0
- package/build/components/molecules/healthTools/form/pwgForm/index.d.ts +0 -14
- package/build/components.js +57 -58
- package/build/{constants-5c28f543.js → constants-1b53f849.js} +2 -2
- package/build/{constants-d3f55eb5.js → constants-ae50d420.js} +2 -2
- package/build/constants.js +3 -3
- package/build/{core-024871eb.js → core-1ad52d91.js} +2 -2
- package/build/{dataTransform-e51d2124.js → dataTransform-f38d179b.js} +1 -1
- package/build/ecom.js +5 -5
- package/build/esm/{WhatsApp-1be66710.js → WhatsApp-2e4a47c3.js} +1 -1
- package/build/esm/adapters.js +15 -15
- package/build/esm/babyGrowth.js +82 -84
- package/build/esm/cache.js +3 -3
- package/build/esm/care.js +17 -17
- package/build/esm/components/atoms/inputMB/index.styled.d.ts +4 -4
- package/build/esm/components/babyGrowth/babyGrowthForm/context.d.ts +4 -6
- package/build/esm/components/babyGrowth/babyGrowthForm/index.d.ts +2 -4
- package/build/esm/components/babyGrowth/babyGrowthForm/layout/default/index.d.ts +2 -2
- package/build/esm/components/babyGrowth/babyGrowthForm/layout/default/index.styles.d.ts +8 -0
- package/build/esm/components/molecules/embeddedHeathToolCards/baby-growth/index.d.ts +3 -9
- package/build/esm/components/molecules/healthTools/form/constants.d.ts +14 -0
- package/build/esm/components/molecules/healthTools/form/pwgForm/index.d.ts +0 -14
- package/build/esm/components.js +57 -58
- package/build/esm/{constants-4a7e0e4d.js → constants-3e3e3680.js} +2 -2
- package/build/esm/{constants-c13138b3.js → constants-ba9a9e8c.js} +2 -2
- package/build/esm/constants.js +3 -3
- package/build/esm/{core-2e778416.js → core-493b5b9d.js} +2 -2
- package/build/esm/{dataTransform-689d4d4f.js → dataTransform-c01913c0.js} +1 -1
- package/build/esm/ecom.js +5 -5
- package/build/esm/footer.js +18 -18
- package/build/esm/gAssets.js +4 -4
- package/build/esm/{getDynamicHealthTool-ea396642.js → getDynamicHealthTool-cfdada17.js} +4 -4
- package/build/esm/{getSocialList-b06d9711.js → getSocialList-5917fcf2.js} +4 -4
- package/build/esm/hooks.js +17 -17
- package/build/esm/i18n-values/en-PH.js +2 -2
- package/build/esm/i18n-values/hi-IN.js +2 -2
- package/build/esm/i18n-values/id-ID.js +1 -1
- package/build/esm/i18n-values/km-KH.js +2 -2
- package/build/esm/i18n-values/tl-PH.js +2 -2
- package/build/esm/i18n-values/vi-VN.js +2 -2
- package/build/esm/i18n-values/vi-VN_MB.js +2 -2
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-ae40da42.js → index-065ddaab.js} +10 -10
- package/build/esm/{index-70bdb38c.js → index-09dc0a6c.js} +9 -9
- package/build/esm/{index-af6f5782.js → index-16066a1f.js} +2 -2
- package/build/esm/{index-f39a4894.js → index-249e0999.js} +2 -2
- package/build/esm/{index-19f4092d.js → index-26808cfe.js} +202 -334
- package/build/esm/{index-5eaf6a7e.js → index-3e456b77.js} +4 -4
- package/build/esm/{index-ca3fe93b.js → index-4aaf653e.js} +2 -2
- package/build/esm/{index-61feed82.js → index-5c40f305.js} +2 -2
- package/build/esm/{index-b3a3e26b.js → index-5cd52fbe.js} +2 -2
- package/build/esm/{index-4de64c33.js → index-702597d1.js} +2 -2
- package/build/esm/{index-34b81f9b.js → index-7c9b10e5.js} +2 -2
- package/build/esm/{index-1ae91c0d.js → index-8699ee64.js} +4 -4
- package/build/esm/{index-8e69737d.js → index-95efef1a.js} +47 -54
- package/build/esm/{index-eac3e7f0.js → index-a24f5695.js} +2 -2
- package/build/esm/{index-ae6b9656.js → index-a98b7866.js} +32 -32
- package/build/esm/{index-15a971ba.js → index-ab3620a8.js} +5 -5
- package/build/esm/{index-ee16168c.js → index-bd0c181d.js} +12 -12
- package/build/esm/{index-a304099f.js → index-c2bdb30e.js} +11 -11
- package/build/esm/{index-a8e20c56.js → index-c354db55.js} +3 -3
- package/build/esm/{index-b13711f0.js → index-c9813436.js} +2 -2
- package/build/esm/{index-84830868.js → index-ccb062a4.js} +6 -6
- package/build/esm/{index-82899714.js → index-d1a29587.js} +9 -9
- package/build/esm/{index-cb4af25a.js → index-d9ace9a7.js} +4 -4
- package/build/esm/{index-3e8fbb37.js → index-e85b0fa3.js} +1 -1
- package/build/esm/index.js +65 -66
- package/build/esm/{index.styled-f4fc1284.js → index.styled-5e0dbc0e.js} +2 -2
- package/build/esm/{index.styles-7320c409.js → index.styles-c952a50d.js} +6 -6
- package/build/esm/interfaces/types/BabyGrowth.d.ts +8 -7
- package/build/esm/lead.js +28 -28
- package/build/esm/mantine.js +20 -20
- package/build/esm/misc.js +19 -19
- package/build/esm/navigation.js +35 -35
- package/build/esm/onboardingV2.js +31 -31
- package/build/esm/pwg.js +19 -19
- package/build/esm/{routing-95cfab29.js → routing-e66c94bc.js} +2 -2
- package/build/esm/subot.js +22 -22
- package/build/esm/together.js +34 -34
- package/build/esm/{types-2156d1b5.js → types-23400d0a.js} +13 -13
- package/build/esm/{types-44e24a0e.js → types-33fd3339.js} +30 -30
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-cca0acc3.js → useCategory-4361a487.js} +5 -5
- package/build/esm/{useHealthToolCache-74d20eb7.js → useHealthToolCache-7a91a134.js} +2 -2
- package/build/esm/{useMantineLocale-71f69a40.js → useMantineLocale-ff4c2bdd.js} +3 -3
- package/build/esm/{usePlacesAutocomplete-688785a8.js → usePlacesAutocomplete-b68263ae.js} +1 -1
- package/build/esm/{useTranslations-92cd9bf1.js → useTranslations-1224dd3c.js} +1 -1
- package/build/esm/{utils-05639753.js → utils-18d37208.js} +4 -4
- package/build/esm/{utils-de7079a1.js → utils-f74cbe98.js} +1 -1
- package/build/esm/{utils-5add73a5.js → utils-f8e04d49.js} +5 -5
- package/build/esm/vaccination.js +26 -26
- package/build/footer.js +18 -18
- package/build/gAssets.js +4 -4
- package/build/{getDynamicHealthTool-c1a87250.js → getDynamicHealthTool-3f5ac9bd.js} +4 -4
- package/build/{getSocialList-3a5dd977.js → getSocialList-2cfa8076.js} +4 -4
- package/build/hooks.js +17 -17
- package/build/i18n-values/en-PH.js +2 -2
- package/build/i18n-values/hi-IN.js +2 -2
- package/build/i18n-values/id-ID.js +1 -1
- package/build/i18n-values/km-KH.js +2 -2
- package/build/i18n-values/tl-PH.js +2 -2
- package/build/i18n-values/vi-VN.js +2 -2
- package/build/i18n-values/vi-VN_MB.js +2 -2
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-d6bf17ab.js → index-0405bb1b.js} +2 -2
- package/build/{index-707fe948.js → index-0614dd1d.js} +6 -6
- package/build/{index-cd8f0707.js → index-0c98fddc.js} +32 -32
- package/build/{index-f83abf37.js → index-136b557d.js} +1 -1
- package/build/{index-7b596fbf.js → index-20cfc9d6.js} +2 -2
- package/build/{index-6024f45e.js → index-37eaa7f2.js} +4 -4
- package/build/{index-f2add40f.js → index-38081aa4.js} +2 -2
- package/build/{index-bbc4831e.js → index-419a4ee8.js} +11 -11
- package/build/{index-b5573b03.js → index-68f6a6b0.js} +4 -4
- package/build/{index-2ac1aef4.js → index-6d6aa136.js} +2 -2
- package/build/{index-91e73ad5.js → index-7961ad2f.js} +64 -71
- package/build/{index-b7a61ad0.js → index-7d75636e.js} +2 -2
- package/build/{index-4dade093.js → index-821ea91e.js} +2 -2
- package/build/{index-d5e593eb.js → index-87e8dc28.js} +4 -4
- package/build/{index-5e7693cb.js → index-9abffef7.js} +5 -5
- package/build/{index-45a0e378.js → index-ad05c025.js} +2 -2
- package/build/{index-08cd8d89.js → index-b3b3b671.js} +201 -332
- package/build/{index-923c1723.js → index-b9de628d.js} +2 -2
- package/build/{index-5c44d074.js → index-cba0f80b.js} +9 -9
- package/build/{index-28749094.js → index-ce2c211e.js} +9 -9
- package/build/{index-093a15c9.js → index-d5203ee9.js} +2 -2
- package/build/{index-efbee2ed.js → index-dd00ac2f.js} +3 -3
- package/build/{index-fb02c5e7.js → index-e97cbd7b.js} +12 -12
- package/build/{index-63f65918.js → index-f8aa0489.js} +10 -10
- package/build/index.js +65 -66
- package/build/{index.styled-b863d776.js → index.styled-42d385d1.js} +2 -2
- package/build/{index.styles-6c93de7f.js → index.styles-a831c092.js} +6 -6
- package/build/interfaces/types/BabyGrowth.d.ts +8 -7
- package/build/lead.js +28 -28
- package/build/mantine.js +17 -17
- package/build/misc.js +19 -19
- package/build/navigation.js +35 -35
- package/build/onboardingV2.js +30 -30
- package/build/pwg.js +19 -19
- package/build/{routing-03569452.js → routing-0205ce2a.js} +2 -2
- package/build/subot.js +22 -22
- package/build/together.js +34 -34
- package/build/{types-82bf3907.js → types-000de79b.js} +30 -30
- package/build/{types-54be80b0.js → types-903a0a73.js} +13 -13
- package/build/types.js +1 -1
- package/build/{useCategory-e3b5f96e.js → useCategory-8472f32b.js} +5 -5
- package/build/{useHealthToolCache-0404da7c.js → useHealthToolCache-335d4490.js} +2 -2
- package/build/{useMantineLocale-4a8a3d64.js → useMantineLocale-b4e13a21.js} +3 -3
- package/build/{usePlacesAutocomplete-a169506b.js → usePlacesAutocomplete-91f12375.js} +1 -1
- package/build/{useTranslations-bc60e1a4.js → useTranslations-009eb48b.js} +1 -1
- package/build/{utils-05ac5a9f.js → utils-116a01c0.js} +5 -5
- package/build/{utils-d7da7bb2.js → utils-39567dcd.js} +1 -1
- package/build/{utils-5fe87759.js → utils-c88d0fe2.js} +4 -4
- package/build/vaccination.js +26 -26
- package/package.json +1 -1
- package/build/components/babyGrowth/babyGrowthForm/layout/default/index.styled.d.ts +0 -16
- package/build/esm/components/babyGrowth/babyGrowthForm/layout/default/index.styled.d.ts +0 -16
- /package/build/{BMI_BOYS.percentile.monthly-314269ec.js → BMI_BOYS.percentile.monthly-e5e5d8b2.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-27263d2b.js → BMI_BOYS.percentile.weekly-c1544964.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-0ebac22c.js → BMI_BOYS.percentile.yearly-5d629191.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-8c197869.js → BMI_BOYS.zscore.monthly-629ae074.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-7492ac12.js → BMI_BOYS.zscore.weekly-c3253aee.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-9a44a26c.js → BMI_BOYS.zscore.yearly-b739a58d.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-f1eecbfd.js → BMI_GIRLS.percentile.monthly-a9147e38.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-5df053d8.js → BMI_GIRLS.percentile.weekly-16603cec.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-77bc265b.js → BMI_GIRLS.percentile.yearly-783fbffb.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-68ffac4d.js → BMI_GIRLS.zscore.monthly-2ce49831.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-4235f7b7.js → BMI_GIRLS.zscore.weekly-c723cfad.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-63648d95.js → BMI_GIRLS.zscore.yearly-0fd731e7.js} +0 -0
- /package/build/{ChevronDown-07484743.js → ChevronDown-791f1cf6.js} +0 -0
- /package/build/{Close-f47693a6.js → Close-f9db868b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-2c5cdd97.js → HEAD CIRCUM_BOYS.percentile.monthly-fe208bc2.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-d279c387.js → HEAD CIRCUM_BOYS.percentile.weekly-1a13bb6e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-7023da49.js → HEAD CIRCUM_BOYS.percentile.yearly-f9f8b115.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-ff2b315e.js → HEAD CIRCUM_BOYS.zscore.monthly-3734345a.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-a1450130.js → HEAD CIRCUM_BOYS.zscore.weekly-1b32674d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-f4666cac.js → HEAD CIRCUM_BOYS.zscore.yearly-eda966ba.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-9c2110c2.js → HEAD CIRCUM_GIRLS.percentile.monthly-d0c4d732.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-df0c24dd.js → HEAD CIRCUM_GIRLS.percentile.weekly-d71ea5e7.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-4095b22f.js → HEAD CIRCUM_GIRLS.percentile.yearly-47f86f4e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-fe9a52a6.js → HEAD CIRCUM_GIRLS.zscore.monthly-de923a73.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-bd79e43c.js → HEAD CIRCUM_GIRLS.zscore.weekly-92b9fd39.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-1d31a424.js → HEAD CIRCUM_GIRLS.zscore.yearly-d0d7444f.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-5df88d40.js → HEIGHT_BOYS.percentile.monthly-226433b5.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-517d6800.js → HEIGHT_BOYS.percentile.weekly-9be5000f.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-48c70d02.js → HEIGHT_BOYS.percentile.yearly-1be99316.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-94907d08.js → HEIGHT_BOYS.zscore.monthly-79469272.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-8f76f977.js → HEIGHT_BOYS.zscore.weekly-779dcfd1.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-de0e84d8.js → HEIGHT_BOYS.zscore.yearly-13d35347.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-b1b7bc1a.js → HEIGHT_GIRLS.percentile.monthly-5950913e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-3fd42e9f.js → HEIGHT_GIRLS.percentile.weekly-bd20f461.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-fe8bc8d4.js → HEIGHT_GIRLS.percentile.yearly-9f043a5a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-f08d980a.js → HEIGHT_GIRLS.zscore.monthly-eef327c1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-e7423252.js → HEIGHT_GIRLS.zscore.weekly-380a62bb.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-7e918afc.js → HEIGHT_GIRLS.zscore.yearly-2dfdebc1.js} +0 -0
- /package/build/{Visible-824aedb8.js → Visible-80167fcb.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-cd0ab8d7.js → WEIGHT_BOYS.percentile.monthly-13e0f685.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-fa78fa79.js → WEIGHT_BOYS.percentile.weekly-011b4551.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-9e0e4814.js → WEIGHT_BOYS.percentile.yearly-7e749079.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-816d0c23.js → WEIGHT_BOYS.zscore.monthly-2b1da485.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-a39f64a8.js → WEIGHT_BOYS.zscore.weekly-51bed42c.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-d5984d43.js → WEIGHT_BOYS.zscore.yearly-99830821.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-a2935d3c.js → WEIGHT_GIRLS.percentile.monthly-8db2717e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-ed0f2d12.js → WEIGHT_GIRLS.percentile.weekly-dc568e4c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-343ace96.js → WEIGHT_GIRLS.percentile.yearly-1d8348b5.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-96a7b5dd.js → WEIGHT_GIRLS.zscore.monthly-1cb19342.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-fcc79658.js → WEIGHT_GIRLS.zscore.weekly-fc7fa007.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-6a5673cf.js → WEIGHT_GIRLS.zscore.yearly-95cb4bb1.js} +0 -0
- /package/build/{animation-1499211b.js → animation-d2b9b1cb.js} +0 -0
- /package/build/{cart-c64f14a4.js → cart-7540e730.js} +0 -0
- /package/build/{cookieHelper-ebd91cf1.js → cookieHelper-3ae40331.js} +0 -0
- /package/build/{doctor-dc2e8cfe.js → doctor-6fb13b0c.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-19fd1ca6.js → BMI_BOYS.percentile.monthly-85ad2cda.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-3500769a.js → BMI_BOYS.percentile.weekly-e5f563e8.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-58df4c51.js → BMI_BOYS.percentile.yearly-171dbe39.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-037d18e8.js → BMI_BOYS.zscore.monthly-09bd6ed4.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-7f8b0fbc.js → BMI_BOYS.zscore.weekly-aa59052d.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-9ddd7a7d.js → BMI_BOYS.zscore.yearly-73c1075e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-0294efdd.js → BMI_GIRLS.percentile.monthly-614fb6af.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-da2787ac.js → BMI_GIRLS.percentile.weekly-754e0839.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-b4635059.js → BMI_GIRLS.percentile.yearly-e6d2aed9.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-399452c5.js → BMI_GIRLS.zscore.monthly-62f8ed37.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-eb764183.js → BMI_GIRLS.zscore.weekly-f2a12b3f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-5fc230ec.js → BMI_GIRLS.zscore.yearly-e33fc4c5.js} +0 -0
- /package/build/esm/{ChevronDown-02dfaae7.js → ChevronDown-535e6ac7.js} +0 -0
- /package/build/esm/{Close-2d51e549.js → Close-26582b39.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-3444f43e.js → HEAD CIRCUM_BOYS.percentile.monthly-a12f4a38.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-ab26f105.js → HEAD CIRCUM_BOYS.percentile.weekly-0a86b0a2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-9086b21d.js → HEAD CIRCUM_BOYS.percentile.yearly-c4363352.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-c9e5649c.js → HEAD CIRCUM_BOYS.zscore.monthly-1cdd052d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-4bda9e43.js → HEAD CIRCUM_BOYS.zscore.weekly-9d48a5a2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-4970545a.js → HEAD CIRCUM_BOYS.zscore.yearly-8c2a2e26.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-cf5b98ce.js → HEAD CIRCUM_GIRLS.percentile.monthly-c86dad2f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-5e103a9e.js → HEAD CIRCUM_GIRLS.percentile.weekly-a8a491d7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-5f0d7d20.js → HEAD CIRCUM_GIRLS.percentile.yearly-5253e11e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-453c6af9.js → HEAD CIRCUM_GIRLS.zscore.monthly-0d1e1b1a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-c5a0e11d.js → HEAD CIRCUM_GIRLS.zscore.weekly-a0d940bb.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-f9c70c08.js → HEAD CIRCUM_GIRLS.zscore.yearly-5cebe4b5.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-29d573a0.js → HEIGHT_BOYS.percentile.monthly-9575cf0c.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-f5c2a39c.js → HEIGHT_BOYS.percentile.weekly-14083b2d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-6f6d2df6.js → HEIGHT_BOYS.percentile.yearly-c9172379.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-4f6404ae.js → HEIGHT_BOYS.zscore.monthly-f0891fa2.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-0ebbdee8.js → HEIGHT_BOYS.zscore.weekly-d43eddc2.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-828a31cb.js → HEIGHT_BOYS.zscore.yearly-9ef934f3.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-f4ee2c52.js → HEIGHT_GIRLS.percentile.monthly-76d084a7.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-69992d4a.js → HEIGHT_GIRLS.percentile.weekly-24fcbe9b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-a358c87d.js → HEIGHT_GIRLS.percentile.yearly-247ca454.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-985f789b.js → HEIGHT_GIRLS.zscore.monthly-127d55db.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-2f5a6a9a.js → HEIGHT_GIRLS.zscore.weekly-f4333e87.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-f194fb27.js → HEIGHT_GIRLS.zscore.yearly-578754b8.js} +0 -0
- /package/build/esm/{Visible-91ac8482.js → Visible-5481497a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-50e7335c.js → WEIGHT_BOYS.percentile.monthly-bb01566f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-726fa29d.js → WEIGHT_BOYS.percentile.weekly-f7b397af.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-43a44b65.js → WEIGHT_BOYS.percentile.yearly-33fc95d9.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-92feb62a.js → WEIGHT_BOYS.zscore.monthly-175e671b.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-5475a934.js → WEIGHT_BOYS.zscore.weekly-1a491178.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-286c090d.js → WEIGHT_BOYS.zscore.yearly-e9939791.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-643c02b4.js → WEIGHT_GIRLS.percentile.monthly-970597b9.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-f50ea8d7.js → WEIGHT_GIRLS.percentile.weekly-23b9ce14.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-521fd899.js → WEIGHT_GIRLS.percentile.yearly-f87bff69.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-baada40d.js → WEIGHT_GIRLS.zscore.monthly-5ce0a54f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-ba2bfd41.js → WEIGHT_GIRLS.zscore.weekly-353a9a63.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-721bf476.js → WEIGHT_GIRLS.zscore.yearly-e7cb886a.js} +0 -0
- /package/build/esm/{animation-3aed249d.js → animation-67530299.js} +0 -0
- /package/build/esm/{cart-f91105a7.js → cart-ee45c742.js} +0 -0
- /package/build/esm/{cookieHelper-c24cfce1.js → cookieHelper-c9e2970e.js} +0 -0
- /package/build/esm/{doctor-88d154ee.js → doctor-da72e9c1.js} +0 -0
- /package/build/esm/{index-d9d9b57a.js → index-3b739e0a.js} +0 -0
- /package/build/esm/{index-530a553a.js → index-7349f216.js} +0 -0
- /package/build/esm/{index-7d1050c3.js → index-9efc4b34.js} +0 -0
- /package/build/esm/{index-c96af862.js → index-ad64a253.js} +0 -0
- /package/build/esm/{isProduction-7431bdac.js → isProduction-714870b0.js} +0 -0
- /package/build/esm/{localizeNumberFormat-bd815352.js → localizeNumberFormat-ef1e5414.js} +0 -0
- /package/build/esm/{normalizeLink-40bf2a65.js → normalizeLink-0bbbd99d.js} +0 -0
- /package/build/esm/{number-ab59ae3d.js → number-a2485985.js} +0 -0
- /package/build/esm/{paths-924e71ac.js → paths-42e5bdff.js} +0 -0
- /package/build/esm/{theme-74f03581.js → theme-1d964e10.js} +0 -0
- /package/build/esm/{translationsContext-d1ca80ac.js → translationsContext-d3eb8396.js} +0 -0
- /package/build/esm/{tslib.es6-2db0387d.js → tslib.es6-774c232c.js} +0 -0
- /package/build/esm/{useIsInit-2e885e97.js → useIsInit-6a411d38.js} +0 -0
- /package/build/esm/{useOutsideClick-6b675cd3.js → useOutsideClick-b108bb63.js} +0 -0
- /package/build/esm/{useScrollbarSize-df8e096a.js → useScrollbarSize-1ea0e6f3.js} +0 -0
- /package/build/esm/{useUniqueId-bb76ec2a.js → useUniqueId-ce13052b.js} +0 -0
- /package/build/esm/{utils-e45859ac.js → utils-fb3af6f2.js} +0 -0
- /package/build/{index-60d88f0d.js → index-2928aa46.js} +0 -0
- /package/build/{index-39d2d622.js → index-3020fbb9.js} +0 -0
- /package/build/{index-4a248667.js → index-42f69aed.js} +0 -0
- /package/build/{index-95dd48d9.js → index-cbe6a47b.js} +0 -0
- /package/build/{isProduction-e3567668.js → isProduction-289a1262.js} +0 -0
- /package/build/{localizeNumberFormat-e886e573.js → localizeNumberFormat-d7a46d71.js} +0 -0
- /package/build/{normalizeLink-706dbda3.js → normalizeLink-a11063c1.js} +0 -0
- /package/build/{number-9e69cc51.js → number-09726dda.js} +0 -0
- /package/build/{paths-5e08a79d.js → paths-9d4b84d8.js} +0 -0
- /package/build/{theme-96521ad9.js → theme-000e9faf.js} +0 -0
- /package/build/{translationsContext-c5d5018a.js → translationsContext-d3337da3.js} +0 -0
- /package/build/{tslib.es6-6acd8f78.js → tslib.es6-74ec9016.js} +0 -0
- /package/build/{useIsInit-f31a2f91.js → useIsInit-3f27fbe6.js} +0 -0
- /package/build/{useOutsideClick-02a0e90d.js → useOutsideClick-2087f360.js} +0 -0
- /package/build/{useScrollbarSize-535e231b.js → useScrollbarSize-e31eaad0.js} +0 -0
- /package/build/{useUniqueId-a6d7cc7e.js → useUniqueId-02f0765e.js} +0 -0
- /package/build/{utils-0aa72d17.js → utils-6b130b4d.js} +0 -0
|
@@ -1,35 +1,32 @@
|
|
|
1
1
|
import React__default, { useRef, useEffect, useState, useMemo, createContext, useContext } from 'react';
|
|
2
2
|
import { Portal, Box, Flex, rem, createStyles, Input, Chip, useMantineTheme, Switch } from '@mantine/core';
|
|
3
|
-
import { t as toggleNoScroll, M as MediaQueries } from './utils-
|
|
4
|
-
import { w as StyledBackdrop, x as StyledDrawer, y as StyledDrawerPanel, z as StyledDrawerContent, A as StyledRadioImageGroup, B as StyledRadioImageItem, C as useStyles$
|
|
5
|
-
import { T as Text } from './index-
|
|
6
|
-
import { t as theme } from './theme-
|
|
7
|
-
import { M as MarryBabyText } from './index-
|
|
8
|
-
import { T as Text$1 } from './index-
|
|
9
|
-
import { u as useScrollbarSize } from './useScrollbarSize-
|
|
3
|
+
import { t as toggleNoScroll, M as MediaQueries } from './utils-fb3af6f2.js';
|
|
4
|
+
import { w as StyledBackdrop, x as StyledDrawer, y as StyledDrawerPanel, z as StyledDrawerContent, A as StyledRadioImageGroup, B as StyledRadioImageItem, C as useStyles$b } from './index.styles-c952a50d.js';
|
|
5
|
+
import { T as Text } from './index-5c40f305.js';
|
|
6
|
+
import { t as theme } from './theme-1d964e10.js';
|
|
7
|
+
import { M as MarryBabyText } from './index-4aaf653e.js';
|
|
8
|
+
import { T as Text$1 } from './index-065ddaab.js';
|
|
9
|
+
import { u as useScrollbarSize } from './useScrollbarSize-1ea0e6f3.js';
|
|
10
10
|
import { createPortal } from 'react-dom';
|
|
11
11
|
import styled from '@emotion/styled';
|
|
12
|
-
import { s as setDefaultClass } from './utils-
|
|
13
|
-
import { _ as __rest } from './tslib.es6-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import './
|
|
22
|
-
import { D as DatePicker } from './index-15a971ba.js';
|
|
23
|
-
import { u as useTranslations } from './useTranslations-92cd9bf1.js';
|
|
12
|
+
import { s as setDefaultClass } from './utils-f8e04d49.js';
|
|
13
|
+
import { _ as __rest } from './tslib.es6-774c232c.js';
|
|
14
|
+
import { useForm, isNotEmpty } from '@mantine/form';
|
|
15
|
+
import { R as Radio, B as Button, c as Input$1 } from './index-d1a29587.js';
|
|
16
|
+
import { C as CommonGAssets } from './index-249e0999.js';
|
|
17
|
+
import './constants-3e3e3680.js';
|
|
18
|
+
import './index-ad64a253.js';
|
|
19
|
+
import './utils-18d37208.js';
|
|
20
|
+
import { D as DatePicker } from './index-ab3620a8.js';
|
|
21
|
+
import { u as useTranslations } from './useTranslations-1224dd3c.js';
|
|
24
22
|
import '@mantine/hooks';
|
|
25
|
-
import './useMantineLocale-
|
|
26
|
-
import './index-
|
|
27
|
-
import './WhatsApp-
|
|
28
|
-
import './index.styled-
|
|
29
|
-
import './index-
|
|
30
|
-
import {
|
|
23
|
+
import './useMantineLocale-ff4c2bdd.js';
|
|
24
|
+
import './index-5cd52fbe.js';
|
|
25
|
+
import './WhatsApp-2e4a47c3.js';
|
|
26
|
+
import './index.styled-5e0dbc0e.js';
|
|
27
|
+
import './index-7349f216.js';
|
|
28
|
+
import { BabyBoyMB, BabyGirlMB } from '@hhgtech/icons/other';
|
|
31
29
|
import '@mantine/dates';
|
|
32
|
-
import 'date-fns';
|
|
33
30
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
34
31
|
|
|
35
32
|
const Backdrop = ({ open = false, onClickOutside, }) => {
|
|
@@ -101,7 +98,7 @@ const GenderOptionControl = (_a) => {
|
|
|
101
98
|
female: 'female',
|
|
102
99
|
}, type = 'button', hideLabel } = _a, radioProps = __rest(_a, ["label", "availableValue", "styles", "isBaby", "genderValue", "type", "hideLabel"]);
|
|
103
100
|
const { t } = useTranslations();
|
|
104
|
-
const { classes, cx, theme } = useStyles$
|
|
101
|
+
const { classes, cx, theme } = useStyles$b({ type }, {
|
|
105
102
|
name: 'GenderOptionControl',
|
|
106
103
|
styles,
|
|
107
104
|
});
|
|
@@ -159,12 +156,14 @@ const StyledModal = setDefaultClass(styled.div `
|
|
|
159
156
|
position: relative;
|
|
160
157
|
z-index: 111;
|
|
161
158
|
height: 100%;
|
|
159
|
+
padding: 24px;
|
|
162
160
|
}
|
|
163
161
|
}
|
|
164
162
|
.hhg-modal__content {
|
|
165
163
|
position: relative;
|
|
166
164
|
z-index: 111;
|
|
167
165
|
height: 100%;
|
|
166
|
+
padding: 16px;
|
|
168
167
|
}
|
|
169
168
|
.hhg-modal__video {
|
|
170
169
|
position: relative;
|
|
@@ -385,17 +384,7 @@ const Modal = ({ type = 'lead', closeIcon, isOpen = true, onClose, children, cla
|
|
|
385
384
|
children))), elRef.current);
|
|
386
385
|
};
|
|
387
386
|
|
|
388
|
-
var
|
|
389
|
-
(function (DueDateCalculatorType) {
|
|
390
|
-
DueDateCalculatorType[DueDateCalculatorType["lastPeriod"] = 0] = "lastPeriod";
|
|
391
|
-
DueDateCalculatorType[DueDateCalculatorType["conception"] = 1] = "conception";
|
|
392
|
-
DueDateCalculatorType[DueDateCalculatorType["IVF"] = 2] = "IVF";
|
|
393
|
-
})(DueDateCalculatorType || (DueDateCalculatorType = {}));
|
|
394
|
-
const DateToInputValue = (date) => {
|
|
395
|
-
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
var useStyles$9 = createStyles(() => {
|
|
387
|
+
var useStyles$a = createStyles(() => {
|
|
399
388
|
return {
|
|
400
389
|
root: {
|
|
401
390
|
justifyContent: 'flex-start',
|
|
@@ -416,7 +405,7 @@ var useStyles$9 = createStyles(() => {
|
|
|
416
405
|
|
|
417
406
|
const ChipGroup = (_a) => {
|
|
418
407
|
var { data = [], label, isMobile, layout = 'horizonal', classNames, styles } = _a, props = __rest(_a, ["data", "label", "isMobile", "layout", "classNames", "styles"]);
|
|
419
|
-
const { classes, theme } = useStyles$
|
|
408
|
+
const { classes, theme } = useStyles$a(undefined, {
|
|
420
409
|
name: 'ChipGroup',
|
|
421
410
|
classNames,
|
|
422
411
|
styles,
|
|
@@ -483,7 +472,7 @@ const ChipGroup = (_a) => {
|
|
|
483
472
|
|
|
484
473
|
const FormLayoutContext = createContext({});
|
|
485
474
|
|
|
486
|
-
const useStyles$
|
|
475
|
+
const useStyles$9 = createStyles(() => {
|
|
487
476
|
return {
|
|
488
477
|
root: {
|
|
489
478
|
display: 'flex',
|
|
@@ -494,7 +483,7 @@ const useStyles$8 = createStyles(() => {
|
|
|
494
483
|
});
|
|
495
484
|
const FormRow = (_a) => {
|
|
496
485
|
var { styles, classNames, className, children } = _a, props = __rest(_a, ["styles", "classNames", "className", "children"]);
|
|
497
|
-
const { classes, cx } = useStyles$
|
|
486
|
+
const { classes, cx } = useStyles$9(undefined, {
|
|
498
487
|
name: 'HealthToolFormWrapper__FormRow',
|
|
499
488
|
styles,
|
|
500
489
|
classNames,
|
|
@@ -502,7 +491,7 @@ const FormRow = (_a) => {
|
|
|
502
491
|
return (React__default.createElement(Box, Object.assign({ className: cx(className, classes.root) }, props), children));
|
|
503
492
|
};
|
|
504
493
|
|
|
505
|
-
var useStyles$
|
|
494
|
+
var useStyles$8 = createStyles((theme, { formLayout }) => {
|
|
506
495
|
return {
|
|
507
496
|
root: {
|
|
508
497
|
display: 'flex',
|
|
@@ -524,7 +513,7 @@ var useStyles$7 = createStyles((theme, { formLayout }) => {
|
|
|
524
513
|
};
|
|
525
514
|
});
|
|
526
515
|
|
|
527
|
-
const useStyles$
|
|
516
|
+
const useStyles$7 = createStyles((theme, { formLayout }) => {
|
|
528
517
|
const isMarryBaby = theme.other.template === 'mb';
|
|
529
518
|
return {
|
|
530
519
|
root: Object.assign(Object.assign({ minWidth: rem(180) }, (formLayout === 'inline' && {
|
|
@@ -538,7 +527,7 @@ const useStyles$6 = createStyles((theme, { formLayout }) => {
|
|
|
538
527
|
const SubmitBtn = (_a) => {
|
|
539
528
|
var { styles, classNames, className } = _a, props = __rest(_a, ["styles", "classNames", "className"]);
|
|
540
529
|
const { formLayout } = useContext(FormLayoutContext);
|
|
541
|
-
const { classes, cx } = useStyles$
|
|
530
|
+
const { classes, cx } = useStyles$7({ formLayout }, {
|
|
542
531
|
name: 'HealthToolFormWrapper__SubmitBtn',
|
|
543
532
|
styles,
|
|
544
533
|
classNames,
|
|
@@ -581,7 +570,7 @@ const Switching = (_a) => {
|
|
|
581
570
|
}) }))));
|
|
582
571
|
};
|
|
583
572
|
|
|
584
|
-
const useStyles$
|
|
573
|
+
const useStyles$6 = createStyles((theme) => {
|
|
585
574
|
return {
|
|
586
575
|
root: {
|
|
587
576
|
color: theme.colors.gray[6],
|
|
@@ -592,7 +581,7 @@ const useStyles$5 = createStyles((theme) => {
|
|
|
592
581
|
});
|
|
593
582
|
const Unit = (_a) => {
|
|
594
583
|
var { styles, classNames, className } = _a, props = __rest(_a, ["styles", "classNames", "className"]);
|
|
595
|
-
const { classes, cx } = useStyles$
|
|
584
|
+
const { classes, cx } = useStyles$6(undefined, {
|
|
596
585
|
name: 'HealthToolFormWrapper__UnitText',
|
|
597
586
|
styles,
|
|
598
587
|
classNames,
|
|
@@ -600,7 +589,7 @@ const Unit = (_a) => {
|
|
|
600
589
|
return React__default.createElement(Text, Object.assign({ size: "p4", className: cx(className, classes.root) }, props));
|
|
601
590
|
};
|
|
602
591
|
|
|
603
|
-
var useStyles$
|
|
592
|
+
var useStyles$5 = createStyles(() => {
|
|
604
593
|
return {
|
|
605
594
|
root: {
|
|
606
595
|
display: 'flex',
|
|
@@ -641,7 +630,7 @@ var useStyles$4 = createStyles(() => {
|
|
|
641
630
|
|
|
642
631
|
const BorderBoxControl = (_a) => {
|
|
643
632
|
var { label, rightSection, children, styles, className, classNames } = _a, props = __rest(_a, ["label", "rightSection", "children", "styles", "className", "classNames"]);
|
|
644
|
-
const { classes, cx } = useStyles$
|
|
633
|
+
const { classes, cx } = useStyles$5(undefined, {
|
|
645
634
|
name: 'HealthToolFormWrapper__BorderBoxControl',
|
|
646
635
|
styles,
|
|
647
636
|
classNames,
|
|
@@ -653,7 +642,7 @@ const BorderBoxControl = (_a) => {
|
|
|
653
642
|
rightSection && (React__default.createElement(Box, { className: classes.rightSection }, typeof rightSection === 'string' ? (React__default.createElement(Text, { size: "p4" }, rightSection)) : (rightSection)))));
|
|
654
643
|
};
|
|
655
644
|
|
|
656
|
-
var useStyles$
|
|
645
|
+
var useStyles$4 = createStyles((theme, { width, direction }) => {
|
|
657
646
|
return {
|
|
658
647
|
row: {
|
|
659
648
|
display: 'flex',
|
|
@@ -691,7 +680,7 @@ var useStyles$3 = createStyles((theme, { width, direction }) => {
|
|
|
691
680
|
});
|
|
692
681
|
|
|
693
682
|
const BorderInlineControl = ({ label, children, styles, classNames, direction = 'row', width = 180, }) => {
|
|
694
|
-
const { classes } = useStyles$
|
|
683
|
+
const { classes } = useStyles$4({ width, direction }, {
|
|
695
684
|
name: 'HealthToolFormWrapper__BorderInlineControl',
|
|
696
685
|
styles,
|
|
697
686
|
classNames,
|
|
@@ -701,7 +690,7 @@ const BorderInlineControl = ({ label, children, styles, classNames, direction =
|
|
|
701
690
|
React__default.createElement(Box, { className: classes.content }, flattenChildren(children).map((i, idx) => (React__default.createElement(Box, { key: idx, className: classes.control }, i))))));
|
|
702
691
|
};
|
|
703
692
|
|
|
704
|
-
const useStyles$
|
|
693
|
+
const useStyles$3 = createStyles(() => {
|
|
705
694
|
return {
|
|
706
695
|
root: {
|
|
707
696
|
color: 'red',
|
|
@@ -712,7 +701,7 @@ const useStyles$2 = createStyles(() => {
|
|
|
712
701
|
});
|
|
713
702
|
const Error = (_a) => {
|
|
714
703
|
var { styles, classNames, className } = _a, props = __rest(_a, ["styles", "classNames", "className"]);
|
|
715
|
-
const { classes, cx } = useStyles$
|
|
704
|
+
const { classes, cx } = useStyles$3(undefined, {
|
|
716
705
|
name: 'HealthToolFormWrapper__UnitText',
|
|
717
706
|
styles,
|
|
718
707
|
classNames,
|
|
@@ -720,7 +709,7 @@ const Error = (_a) => {
|
|
|
720
709
|
return React__default.createElement(Text, Object.assign({ size: "p4", className: cx(className, classes.root) }, props));
|
|
721
710
|
};
|
|
722
711
|
|
|
723
|
-
var useStyles$
|
|
712
|
+
var useStyles$2 = createStyles((theme$1) => {
|
|
724
713
|
const isMarryBaby = theme$1.other.template === 'mb';
|
|
725
714
|
return {
|
|
726
715
|
root: {
|
|
@@ -735,7 +724,7 @@ var useStyles$1 = createStyles((theme$1) => {
|
|
|
735
724
|
|
|
736
725
|
const Control = (_a) => {
|
|
737
726
|
var { className, styles, classNames } = _a, rest = __rest(_a, ["className", "styles", "classNames"]);
|
|
738
|
-
const { classes, cx } = useStyles$
|
|
727
|
+
const { classes, cx } = useStyles$2(undefined, {
|
|
739
728
|
name: 'HealthToolFormWrapper__Control',
|
|
740
729
|
styles,
|
|
741
730
|
classNames,
|
|
@@ -746,7 +735,7 @@ const Control = (_a) => {
|
|
|
746
735
|
const _HealthToolFormWrapper = (_a) => {
|
|
747
736
|
var { children, formLayout: formLayoutProp, styles, classNames, className, component = 'form' } = _a, rest = __rest(_a, ["children", "formLayout", "styles", "classNames", "className", "component"]);
|
|
748
737
|
const formLayout = formLayoutProp || 'default';
|
|
749
|
-
const { classes, cx } = useStyles$
|
|
738
|
+
const { classes, cx } = useStyles$8({ formLayout }, {
|
|
750
739
|
name: 'HealthToolFormWrapper',
|
|
751
740
|
styles,
|
|
752
741
|
classNames,
|
|
@@ -769,150 +758,39 @@ HealthToolFormWrapper.ChipGroup = ChipGroup;
|
|
|
769
758
|
|
|
770
759
|
const BabyGrowthFormContext = createContext({});
|
|
771
760
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
& .displayIcon {
|
|
787
|
-
pointer-events: none;
|
|
788
|
-
}
|
|
789
|
-
`;
|
|
790
|
-
const StyledTextField = styled(Input$1) `
|
|
791
|
-
& label {
|
|
792
|
-
position: absolute;
|
|
793
|
-
z-index: 1;
|
|
794
|
-
top: 16px;
|
|
795
|
-
|
|
796
|
-
left: 16px;
|
|
797
|
-
color: ${theme.mbColors.midGray};
|
|
798
|
-
pointer-events: none;
|
|
799
|
-
transition: all 0.2s ease;
|
|
800
|
-
white-space: nowrap;
|
|
801
|
-
overflow: hidden;
|
|
802
|
-
text-overflow: ellipsis;
|
|
803
|
-
max-width: 240px;
|
|
804
|
-
|
|
805
|
-
&[data-size='label2'] {
|
|
806
|
-
font-size: 12px;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
${MediaQueries.tdDown} {
|
|
810
|
-
max-width: 220px;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
& input,
|
|
814
|
-
.mantine-Input-input {
|
|
815
|
-
::placeholder {
|
|
816
|
-
color: ${theme.mbColors.gray};
|
|
817
|
-
font-size: 14px;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
::-webkit-input-placeholder {
|
|
821
|
-
/* Chrome/Opera/Safari */
|
|
822
|
-
color: ${theme.mbColors.gray};
|
|
823
|
-
font-size: 14px;
|
|
824
|
-
}
|
|
825
|
-
::-moz-placeholder {
|
|
826
|
-
/* Firefox 19+ */
|
|
827
|
-
color: ${theme.mbColors.gray};
|
|
828
|
-
font-size: 14px;
|
|
829
|
-
}
|
|
830
|
-
:-ms-input-placeholder {
|
|
831
|
-
/* IE 10+ */
|
|
832
|
-
color: ${theme.mbColors.gray};
|
|
833
|
-
font-size: 14px;
|
|
834
|
-
}
|
|
835
|
-
:-moz-placeholder {
|
|
836
|
-
/* Firefox 18- */
|
|
837
|
-
color: ${theme.mbColors.gray};
|
|
838
|
-
font-size: 14px;
|
|
839
|
-
}
|
|
840
|
-
height: ${(props) => (props.size === 'sm' ? 48 : 72)}px !important;
|
|
841
|
-
padding-top: 27px !important;
|
|
842
|
-
border-color: ${theme.mbColors.lightGray} !important;
|
|
843
|
-
background-color: ${theme.colors.white};
|
|
844
|
-
border-radius: 16px !important;
|
|
845
|
-
transition: all 0.2s ease;
|
|
846
|
-
padding-top: ${(props) => (props.value ? '38px' : '27px')} !important;
|
|
847
|
-
|
|
848
|
-
&:focus,
|
|
849
|
-
&:hover {
|
|
850
|
-
border-color: ${theme.mbColors.pink};
|
|
851
|
-
box-shadow: none;
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
.mantine-Input-rightSection,
|
|
855
|
-
.mantine-Input-leftSection {
|
|
856
|
-
padding-top: 20px;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
&[data-has-action-icon] {
|
|
860
|
-
input,
|
|
861
|
-
.mantine-Input-input {
|
|
862
|
-
padding-top: ${(props) => (props.value ? '38px' : '27px')} !important;
|
|
863
|
-
padding-bottom: ${(props) => (props.value ? '16px' : '27px')} !important;
|
|
864
|
-
height: unset !important;
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
label {
|
|
868
|
-
position: absolute;
|
|
869
|
-
z-index: 1;
|
|
870
|
-
top: 16px;
|
|
871
|
-
padding-right: 46px;
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
`;
|
|
875
|
-
|
|
876
|
-
styled.div `
|
|
877
|
-
display: flex;
|
|
878
|
-
flex-direction: column;
|
|
879
|
-
gap: 16px;
|
|
880
|
-
padding-block: 40px;
|
|
881
|
-
|
|
882
|
-
&[data-theme='true'] {
|
|
883
|
-
padding-block: 0;
|
|
884
|
-
padding-top: 12px;
|
|
885
|
-
}
|
|
886
|
-
`;
|
|
887
|
-
const StyledFormControl = styled.div `
|
|
888
|
-
display: flex;
|
|
889
|
-
flex-direction: column;
|
|
890
|
-
gap: 6px;
|
|
891
|
-
margin-top: auto;
|
|
761
|
+
const INPUT_RANGE = {
|
|
762
|
+
height: {
|
|
763
|
+
min: 1,
|
|
764
|
+
max: 300,
|
|
765
|
+
},
|
|
766
|
+
weight: {
|
|
767
|
+
min: 1,
|
|
768
|
+
max: 200,
|
|
769
|
+
},
|
|
770
|
+
pregnantWeek: {
|
|
771
|
+
min: 1,
|
|
772
|
+
max: 40,
|
|
773
|
+
},
|
|
774
|
+
};
|
|
892
775
|
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
`;
|
|
902
|
-
const StyledRow = styled.div `
|
|
903
|
-
display: flex;
|
|
904
|
-
width: 100%;
|
|
905
|
-
align-items: center;
|
|
906
|
-
justify-content: space-between;
|
|
907
|
-
gap: 16px;
|
|
908
|
-
> div {
|
|
909
|
-
width: 100%;
|
|
910
|
-
}
|
|
911
|
-
`;
|
|
776
|
+
var useStyles$1 = createStyles((theme) => {
|
|
777
|
+
return {
|
|
778
|
+
unit: {
|
|
779
|
+
color: theme.colors.gray[4],
|
|
780
|
+
fontWeight: 'normal',
|
|
781
|
+
},
|
|
782
|
+
};
|
|
783
|
+
});
|
|
912
784
|
|
|
913
|
-
const DefaultForm = (
|
|
785
|
+
const DefaultForm = (_a) => {
|
|
786
|
+
var { styles, classNames } = _a, props = __rest(_a, ["styles", "classNames"]);
|
|
914
787
|
const { t } = useTranslations();
|
|
915
|
-
const {
|
|
788
|
+
const { form, currentUrl, submitProps } = useContext(BabyGrowthFormContext);
|
|
789
|
+
const { classes } = useStyles$1(undefined, {
|
|
790
|
+
name: 'BabyGrowthForm__DefaultForm',
|
|
791
|
+
styles,
|
|
792
|
+
classNames,
|
|
793
|
+
});
|
|
916
794
|
const commonDateProps = {
|
|
917
795
|
placeholder: 'DD/MM/YYYY',
|
|
918
796
|
popoverProps: {
|
|
@@ -920,67 +798,44 @@ const DefaultForm = (props) => {
|
|
|
920
798
|
},
|
|
921
799
|
};
|
|
922
800
|
return (React__default.createElement(HealthToolFormWrapper, Object.assign({ formLayout: "default" }, props),
|
|
923
|
-
React__default.createElement(
|
|
924
|
-
|
|
801
|
+
React__default.createElement(HealthToolFormWrapper.FormRow, null,
|
|
802
|
+
React__default.createElement(HealthToolFormWrapper.Control, null,
|
|
803
|
+
React__default.createElement(GenderOptionControl, Object.assign({ isBaby: true, genderValue: {
|
|
925
804
|
male: 'boy',
|
|
926
805
|
female: 'girl',
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
React__default.createElement(Text, { size: "s4", weight: "semiBold" }, t('babyGrowth.height')),
|
|
961
|
-
React__default.createElement(Text, { as: "span", size: "n1", color: theme.colors.gray400 }, t('babyGrowth.cm'))),
|
|
962
|
-
React__default.createElement(Input$1, { className: isEmptyThreeFields || (error === null || error === void 0 ? void 0 : error.message) ? 'error-input' : '', name: "height", placeholder: "0", size: "md", value: String(value), onChange: onChange, type: "number", onKeyDown: (e) => ['e', 'E', '+', '-'].includes(e.key) && e.preventDefault(), onWheelCapture: (event) => event.currentTarget.blur() }))) }),
|
|
963
|
-
React__default.createElement(Controller, { control: control, name: "weight", render: ({ field: { onChange, value }, fieldState: { error }, }) => (React__default.createElement(StyledFormControl, null,
|
|
964
|
-
React__default.createElement(StyledInlineLabel, { size: "label1", htmlFor: "weight" },
|
|
965
|
-
React__default.createElement(Text, { size: "s4", weight: "semiBold" }, t('babyGrowth.weight')),
|
|
966
|
-
React__default.createElement(Text, { as: "span", size: "n1", color: theme.colors.gray400 }, t('babyGrowth.kg'))),
|
|
967
|
-
React__default.createElement(Input$1, { className: isEmptyThreeFields || (error === null || error === void 0 ? void 0 : error.message) ? 'error-input' : '', name: "weight", placeholder: "0", size: "md", value: String(value), onChange: onChange, type: "number", onKeyDown: (e) => ['e', 'E', '+', '-'].includes(e.key) && e.preventDefault(), onWheelCapture: (event) => event.currentTarget.blur() }))) })),
|
|
968
|
-
React__default.createElement(StyledRow, null,
|
|
969
|
-
React__default.createElement(Controller, { control: control, name: "head", render: ({ field: { onChange, value }, fieldState: { error }, }) => (React__default.createElement(StyledFormControl, null,
|
|
970
|
-
React__default.createElement(StyledInlineLabel, { size: "label1", htmlFor: "head" },
|
|
971
|
-
React__default.createElement(Text, { size: "s4", weight: "semiBold" }, t('babyGrowth.headCircumference')),
|
|
972
|
-
React__default.createElement(Text, { as: "span", size: "n1", color: theme.colors.gray400 }, t('babyGrowth.cm'))),
|
|
973
|
-
React__default.createElement(Input$1, { className: isEmptyThreeFields || (error === null || error === void 0 ? void 0 : error.message) ? 'error-input' : '', name: "head", placeholder: "0", size: "md", value: String(value), onChange: onChange, type: "number", onKeyDown: (e) => ['e', 'E', '+', '-'].includes(e.key) && e.preventDefault(), onWheelCapture: (event) => event.currentTarget.blur() }))) }),
|
|
974
|
-
React__default.createElement(Controller, { control: control, name: "bmi", render: ({ field: { value } }) => (React__default.createElement(StyledFormControl, null,
|
|
975
|
-
React__default.createElement(StyledInlineLabel, { size: "label1", htmlFor: "bmi" },
|
|
976
|
-
React__default.createElement(Text, { size: "s4", weight: "semiBold" }, t('babyGrowth.input.bmi')),
|
|
977
|
-
React__default.createElement(Text, { as: "span", size: "n1", color: theme.colors.gray400 }, t('babyGrowth.kg.m2'))),
|
|
978
|
-
React__default.createElement(Input$1, { name: "bmi", size: "md", type: "number", value: String(value), isDisabled: true }))) })),
|
|
979
|
-
React__default.createElement(Controller, { control: control, name: "measurementDate", render: ({ field: { onChange }, fieldState: { error } }) => (React__default.createElement(StyledFormControl, null,
|
|
980
|
-
React__default.createElement(StyledInlineLabel, { size: "label1", htmlFor: "measurementDate" },
|
|
981
|
-
React__default.createElement(Text, { as: "label", size: "s4", weight: "semiBold" }, t('babyGrowth.input.measurementDate'))),
|
|
982
|
-
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { defaultValue: new Date(), onChange: onChange, maxDate: new Date(), className: (error === null || error === void 0 ? void 0 : error.message) ? 'error-input' : '' })))) }),
|
|
983
|
-
React__default.createElement(HealthToolFormWrapper.Submit, Object.assign({ type: "submit", variant: 'primary', "data-event-category": "Health Tool", "data-event-action": "Baby Growth", "data-event-label": currentUrl }, submitProps), t('babyGrowth.input.submit'))))));
|
|
806
|
+
} }, form.getInputProps('gender'), { error: null }))),
|
|
807
|
+
form.errors.gender && (React__default.createElement(HealthToolFormWrapper.Error, null, form.errors.gender))),
|
|
808
|
+
React__default.createElement(HealthToolFormWrapper.FormRow, null,
|
|
809
|
+
React__default.createElement(Input$1.Wrapper, { label: t('babyGrowth.input.birthday') },
|
|
810
|
+
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { maxDate: new Date() }, form.getInputProps('birthday'), { error: null, onChange: (v) => {
|
|
811
|
+
v && form.validateField('measurementDate');
|
|
812
|
+
form.getInputProps('birthday').onChange(v);
|
|
813
|
+
} }))),
|
|
814
|
+
form.errors.birthday && (React__default.createElement(HealthToolFormWrapper.Error, null, form.errors.birthday))),
|
|
815
|
+
React__default.createElement(Input$1.Number, Object.assign({ label: React__default.createElement(React__default.Fragment, null,
|
|
816
|
+
t('babyGrowth.height'),
|
|
817
|
+
React__default.createElement("span", { className: classes.unit }, t('babyGrowth.cm'))) }, form.getInputProps('height'), { placeholder: t('babyGrowth.height'), min: INPUT_RANGE.height.min, max: INPUT_RANGE.height.max, onChange: (v) => {
|
|
818
|
+
v && form.validateField('checkMesureVal');
|
|
819
|
+
form.getInputProps('height').onChange(v);
|
|
820
|
+
} })),
|
|
821
|
+
React__default.createElement(Input$1.Number, Object.assign({ label: React__default.createElement(React__default.Fragment, null,
|
|
822
|
+
t('babyGrowth.weight'),
|
|
823
|
+
React__default.createElement("span", { className: classes.unit }, t('babyGrowth.kg'))) }, form.getInputProps('weight'), { placeholder: t('babyGrowth.weight'), min: INPUT_RANGE.weight.min, max: INPUT_RANGE.weight.max, onChange: (v) => {
|
|
824
|
+
v && form.validateField('checkMesureVal');
|
|
825
|
+
form.getInputProps('weight').onChange(v);
|
|
826
|
+
} })),
|
|
827
|
+
React__default.createElement(Input$1.Number, Object.assign({ label: React__default.createElement(React__default.Fragment, null,
|
|
828
|
+
t('babyGrowth.head'),
|
|
829
|
+
React__default.createElement("span", { className: classes.unit }, t('babyGrowth.kg'))) }, form.getInputProps('head'), { placeholder: t('babyGrowth.head'), onChange: (v) => {
|
|
830
|
+
v && form.validateField('checkMesureVal');
|
|
831
|
+
form.getInputProps('head').onChange(v);
|
|
832
|
+
} })),
|
|
833
|
+
form.errors.checkMesureVal && (React__default.createElement(HealthToolFormWrapper.Error, null, form.errors.checkMesureVal)),
|
|
834
|
+
React__default.createElement(HealthToolFormWrapper.FormRow, null,
|
|
835
|
+
React__default.createElement(Input$1.Wrapper, { label: t('babyGrowth.input.measurementDate') },
|
|
836
|
+
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { defaultValue: new Date() }, form.getInputProps('measurementDate'), { maxDate: new Date(), error: null }))),
|
|
837
|
+
form.errors.measurementDate && (React__default.createElement(HealthToolFormWrapper.Error, null, form.errors.measurementDate))),
|
|
838
|
+
React__default.createElement(HealthToolFormWrapper.Submit, Object.assign({ type: "submit", "data-event-category": "Health Tool", "data-event-action": "Baby Growth", "data-event-label": currentUrl }, submitProps), t('babyGrowth.input.submit'))));
|
|
984
839
|
};
|
|
985
840
|
|
|
986
841
|
var useStyles = createStyles((theme) => {
|
|
@@ -1000,54 +855,6 @@ var useStyles = createStyles((theme) => {
|
|
|
1000
855
|
};
|
|
1001
856
|
});
|
|
1002
857
|
|
|
1003
|
-
const InlineForm = (_a) => {
|
|
1004
|
-
var { styles, classNames } = _a, props = __rest(_a, ["styles", "classNames"]);
|
|
1005
|
-
const { t } = useTranslations();
|
|
1006
|
-
const { control, currentUrl, isEmptyThreeFields, submitProps } = useContext(BabyGrowthFormContext);
|
|
1007
|
-
const { classes, cx } = useStyles(undefined, {
|
|
1008
|
-
name: 'BabyGrowthForm__InlineForm',
|
|
1009
|
-
styles,
|
|
1010
|
-
classNames,
|
|
1011
|
-
});
|
|
1012
|
-
const commonDateProps = {
|
|
1013
|
-
placeholder: 'DD/MM/YYYY',
|
|
1014
|
-
popoverProps: {
|
|
1015
|
-
withinPortal: true,
|
|
1016
|
-
},
|
|
1017
|
-
};
|
|
1018
|
-
return (React__default.createElement(HealthToolFormWrapper, Object.assign({ formLayout: "inline", className: classes.root }, props),
|
|
1019
|
-
React__default.createElement(Controller, { control: control, name: "gender", render: ({ field: { onChange } }) => (React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('tools.selectBabyGender') },
|
|
1020
|
-
React__default.createElement(GenderOptionControl, { type: "radio", hideLabel: true, isBaby: true, genderValue: {
|
|
1021
|
-
male: 'boy',
|
|
1022
|
-
female: 'girl',
|
|
1023
|
-
}, onChange: onChange }))) }),
|
|
1024
|
-
React__default.createElement(Controller, { control: control, name: "birthday", render: ({ field: { onChange }, fieldState: { error } }) => {
|
|
1025
|
-
return (React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.input.birthday') },
|
|
1026
|
-
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { className: cx(error ? 'error' : ''), onChange: onChange, maxDate: new Date() }))));
|
|
1027
|
-
} }),
|
|
1028
|
-
React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: "BMI", styles: {
|
|
1029
|
-
control: {
|
|
1030
|
-
'&:first-child': {
|
|
1031
|
-
width: 'auto',
|
|
1032
|
-
},
|
|
1033
|
-
},
|
|
1034
|
-
} },
|
|
1035
|
-
React__default.createElement(Controller, { control: control, name: "bmi", render: ({ field: { value } }) => (React__default.createElement(React__default.Fragment, null,
|
|
1036
|
-
React__default.createElement(Text, { size: "p3" },
|
|
1037
|
-
React__default.createElement("span", { className: classes.bmiVal }, !isNaN(Number(value)) && value !== '0' ? value : ''),
|
|
1038
|
-
t('babyGrowth.kg.m2')))) }),
|
|
1039
|
-
React__default.createElement(Controller, { control: control, name: "height", render: ({ field: { onChange, value }, fieldState: { error } }) => (React__default.createElement(Box, { className: cx(isEmptyThreeFields || (error === null || error === void 0 ? void 0 : error.message) ? 'error' : '') },
|
|
1040
|
-
React__default.createElement(Input$2, { name: "height", placeholder: t('babyGrowth.height'), size: "md", value: String(value), onChange: onChange, type: "number", onKeyDown: (e) => ['e', 'E', '+', '-'].includes(e.key) && e.preventDefault(), onWheelCapture: (event) => event.currentTarget.blur(), rightSection: React__default.createElement(HealthToolFormWrapper.Unit, null, t('babyGrowth.cm')) }))) }),
|
|
1041
|
-
React__default.createElement(Controller, { control: control, name: "weight", render: ({ field: { onChange, value }, fieldState: { error } }) => (React__default.createElement(Box, { className: cx(isEmptyThreeFields || (error === null || error === void 0 ? void 0 : error.message) ? 'error' : '') },
|
|
1042
|
-
React__default.createElement(Input$2, { name: "weight", placeholder: t('babyGrowth.weight'), size: "md", value: String(value), onChange: onChange, type: "number", onKeyDown: (e) => ['e', 'E', '+', '-'].includes(e.key) && e.preventDefault(), onWheelCapture: (event) => event.currentTarget.blur(), rightSection: React__default.createElement(HealthToolFormWrapper.Unit, null, t('babyGrowth.kg')) }))) })),
|
|
1043
|
-
React__default.createElement(Controller, { control: control, name: "head", render: ({ field: { onChange, value }, fieldState: { error } }) => (React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.headCircumference') },
|
|
1044
|
-
React__default.createElement(Box, { className: cx(isEmptyThreeFields || (error === null || error === void 0 ? void 0 : error.message) ? 'error' : '') },
|
|
1045
|
-
React__default.createElement(Input$2, { name: "head", placeholder: "0", size: "md", value: String(value), onChange: onChange, type: "number", onKeyDown: (e) => ['e', 'E', '+', '-'].includes(e.key) && e.preventDefault(), onWheelCapture: (event) => event.currentTarget.blur(), rightSection: React__default.createElement(HealthToolFormWrapper.Unit, null, t('babyGrowth.cm')) })))) }),
|
|
1046
|
-
React__default.createElement(Controller, { control: control, name: "measurementDate", render: ({ field: { onChange } }) => (React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.input.measurementDate') },
|
|
1047
|
-
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { defaultValue: new Date(), onChange: onChange, maxDate: new Date() })))) }),
|
|
1048
|
-
React__default.createElement(HealthToolFormWrapper.Submit, Object.assign({ type: "submit", "data-event-category": "Health Tool", "data-event-action": "Baby Growth", "data-event-label": currentUrl, className: classes.submitBtn }, submitProps), t('babyGrowth.input.submit'))));
|
|
1049
|
-
};
|
|
1050
|
-
|
|
1051
858
|
/**
|
|
1052
859
|
* Using {@link Intl.NumberFormat} to covert a number to string base on its locale
|
|
1053
860
|
* @param {number} num - Number to convert
|
|
@@ -1081,43 +888,104 @@ const bmiCalculate = (height = 0, weight = 0) => {
|
|
|
1081
888
|
return 0;
|
|
1082
889
|
};
|
|
1083
890
|
|
|
891
|
+
const InlineForm = (_a) => {
|
|
892
|
+
var { styles, classNames } = _a, props = __rest(_a, ["styles", "classNames"]);
|
|
893
|
+
const { t } = useTranslations();
|
|
894
|
+
const { form, currentUrl, submitProps } = useContext(BabyGrowthFormContext);
|
|
895
|
+
const { classes } = useStyles(undefined, {
|
|
896
|
+
name: 'BabyGrowthForm__InlineForm',
|
|
897
|
+
styles,
|
|
898
|
+
classNames,
|
|
899
|
+
});
|
|
900
|
+
const commonDateProps = {
|
|
901
|
+
placeholder: 'DD/MM/YYYY',
|
|
902
|
+
popoverProps: {
|
|
903
|
+
withinPortal: true,
|
|
904
|
+
},
|
|
905
|
+
};
|
|
906
|
+
return (React__default.createElement(HealthToolFormWrapper, Object.assign({ formLayout: "inline" }, props),
|
|
907
|
+
React__default.createElement(HealthToolFormWrapper.FormRow, null,
|
|
908
|
+
React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('tools.selectBabyGender') },
|
|
909
|
+
React__default.createElement(GenderOptionControl, Object.assign({ type: "radio", hideLabel: true, isBaby: true, genderValue: {
|
|
910
|
+
male: 'boy',
|
|
911
|
+
female: 'girl',
|
|
912
|
+
} }, form.getInputProps('gender')))),
|
|
913
|
+
form.errors.gender && (React__default.createElement(HealthToolFormWrapper.Error, null, form.errors.gender))),
|
|
914
|
+
React__default.createElement(HealthToolFormWrapper.FormRow, null,
|
|
915
|
+
React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.input.birthday') },
|
|
916
|
+
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { maxDate: new Date() }, form.getInputProps('birthday'), { error: null, onChange: (v) => {
|
|
917
|
+
v && form.validateField('measurementDate');
|
|
918
|
+
form.getInputProps('birthday').onChange(v);
|
|
919
|
+
} }))),
|
|
920
|
+
form.errors.birthday && (React__default.createElement(HealthToolFormWrapper.Error, null, form.errors.birthday))),
|
|
921
|
+
React__default.createElement(HealthToolFormWrapper.FormRow, null,
|
|
922
|
+
React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: "BMI", styles: {
|
|
923
|
+
control: {
|
|
924
|
+
'&:first-child': {
|
|
925
|
+
width: 'auto',
|
|
926
|
+
},
|
|
927
|
+
},
|
|
928
|
+
} },
|
|
929
|
+
React__default.createElement(Text, { size: "p3" },
|
|
930
|
+
React__default.createElement("span", { className: classes.bmiVal }, form.getInputProps('height').value &&
|
|
931
|
+
form.getInputProps('weight').value &&
|
|
932
|
+
bmiCalculate(Number(form.getInputProps('height').value), Number(form.getInputProps('weight').value))),
|
|
933
|
+
t('babyGrowth.kg.m2')),
|
|
934
|
+
React__default.createElement(Input$1.Number, Object.assign({}, form.getInputProps('height'), { placeholder: t('babyGrowth.height'), min: INPUT_RANGE.height.min, max: INPUT_RANGE.height.max, onChange: (v) => {
|
|
935
|
+
v && form.validateField('checkMesureVal');
|
|
936
|
+
form.getInputProps('height').onChange(v);
|
|
937
|
+
}, rightSection: React__default.createElement(HealthToolFormWrapper.Unit, null, t('babyGrowth.cm')) })),
|
|
938
|
+
React__default.createElement(Input$1.Number, Object.assign({}, form.getInputProps('weight'), { placeholder: t('babyGrowth.weight'), min: INPUT_RANGE.weight.min, max: INPUT_RANGE.weight.max, onChange: (v) => {
|
|
939
|
+
v && form.validateField('checkMesureVal');
|
|
940
|
+
form.getInputProps('weight').onChange(v);
|
|
941
|
+
}, rightSection: React__default.createElement(HealthToolFormWrapper.Unit, null, t('babyGrowth.kg')) }))),
|
|
942
|
+
React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.head') },
|
|
943
|
+
React__default.createElement(Input$1.Number, Object.assign({}, form.getInputProps('head'), { placeholder: t('babyGrowth.head'), onChange: (v) => {
|
|
944
|
+
v && form.validateField('checkMesureVal');
|
|
945
|
+
form.getInputProps('head').onChange(v);
|
|
946
|
+
}, rightSection: React__default.createElement(HealthToolFormWrapper.Unit, null, t('babyGrowth.cm')) }))),
|
|
947
|
+
form.errors.checkMesureVal && (React__default.createElement(HealthToolFormWrapper.Error, null, form.errors.checkMesureVal))),
|
|
948
|
+
React__default.createElement(HealthToolFormWrapper.FormRow, null,
|
|
949
|
+
React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.input.measurementDate') },
|
|
950
|
+
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { maxDate: new Date() }, form.getInputProps('measurementDate'), { error: null }))),
|
|
951
|
+
form.errors.measurementDate && (React__default.createElement(HealthToolFormWrapper.Error, null, form.errors.measurementDate))),
|
|
952
|
+
React__default.createElement(HealthToolFormWrapper.Submit, Object.assign({ type: "submit", "data-event-category": "Health Tool", "data-event-action": "Baby Growth", "data-event-label": currentUrl, className: classes.submitBtn }, submitProps), t('babyGrowth.input.submit'))));
|
|
953
|
+
};
|
|
954
|
+
|
|
1084
955
|
const BabyGrowthForm = (_a) => {
|
|
1085
|
-
var { onSubmit,
|
|
1086
|
-
const
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1089
|
-
const { control, setValue, watch, handleSubmit, formState: { isSubmitted }, } = useForm({
|
|
1090
|
-
resolver: yupResolver(schema),
|
|
1091
|
-
mode: 'onSubmit',
|
|
1092
|
-
defaultValues: {
|
|
1093
|
-
name: '',
|
|
1094
|
-
gender: Gender.Boy,
|
|
956
|
+
var { onSubmit, formLayout = 'default', submitProps, currentUrl } = _a, rest = __rest(_a, ["onSubmit", "formLayout", "submitProps", "currentUrl"]);
|
|
957
|
+
const { t } = useTranslations();
|
|
958
|
+
const form = useForm({
|
|
959
|
+
initialValues: {
|
|
1095
960
|
measurementDate: new Date(),
|
|
1096
961
|
},
|
|
962
|
+
validate: {
|
|
963
|
+
gender: isNotEmpty(t('validation.error.requiredField')),
|
|
964
|
+
birthday: isNotEmpty(t('validation.error.requiredField')),
|
|
965
|
+
measurementDate: (value, values) => {
|
|
966
|
+
return values.birthday
|
|
967
|
+
? values.birthday instanceof Date &&
|
|
968
|
+
value instanceof Date &&
|
|
969
|
+
values.birthday.getTime() <= value.getTime()
|
|
970
|
+
? null
|
|
971
|
+
: t('babyGrowth.error.measurementDateLowerThanBirthday', {
|
|
972
|
+
name: '',
|
|
973
|
+
})
|
|
974
|
+
: null;
|
|
975
|
+
},
|
|
976
|
+
checkMesureVal: (_value, values) => {
|
|
977
|
+
return values.head || values.height || values.weight
|
|
978
|
+
? null
|
|
979
|
+
: t('babyGrowth.error.atLeastOneOf');
|
|
980
|
+
},
|
|
981
|
+
},
|
|
1097
982
|
});
|
|
1098
|
-
const
|
|
1099
|
-
const height = watch('height');
|
|
1100
|
-
const head = watch('head');
|
|
1101
|
-
const isEmptyThreeFields = useMemo(() => isSubmitted && !weight && !height && !head, [isSubmitted, weight, height, head]);
|
|
1102
|
-
useEffect(() => {
|
|
1103
|
-
const bmi = bmiCalculate(height, weight);
|
|
1104
|
-
setValue('bmi', String(bmi) || '0');
|
|
1105
|
-
}, [weight, height]);
|
|
1106
|
-
const currentUrl = useMemo(() => {
|
|
1107
|
-
if (typeof window !== 'undefined') {
|
|
1108
|
-
return window.location.href;
|
|
1109
|
-
}
|
|
1110
|
-
else
|
|
1111
|
-
return '';
|
|
1112
|
-
}, []);
|
|
1113
|
-
const commonProps = Object.assign({ onSubmit: handleSubmit(onSubmit, onError) }, rest);
|
|
983
|
+
const commonProps = Object.assign({ onSubmit: form.onSubmit((v) => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(Object.assign(Object.assign({}, v), { bmi: bmiCalculate(Number(form.getInputProps('height').value), Number(form.getInputProps('weight').value)).toString() }))) }, rest);
|
|
1114
984
|
return (React__default.createElement(BabyGrowthFormContext.Provider, { value: {
|
|
1115
|
-
isEmptyThreeFields,
|
|
1116
|
-
control,
|
|
1117
|
-
currentUrl,
|
|
1118
|
-
siteType,
|
|
1119
985
|
submitProps,
|
|
986
|
+
currentUrl,
|
|
987
|
+
form,
|
|
1120
988
|
} }, formLayout === 'default' ? (React__default.createElement(DefaultForm, Object.assign({}, commonProps))) : (React__default.createElement(InlineForm, Object.assign({}, commonProps)))));
|
|
1121
989
|
};
|
|
1122
990
|
|
|
1123
|
-
export { BabyGrowthForm as B, Drawer as D, GenderOptionControl as G, HealthToolFormWrapper as H,
|
|
991
|
+
export { BabyGrowthForm as B, Drawer as D, GenderOptionControl as G, HealthToolFormWrapper as H, INPUT_RANGE as I, Modal as M, RadioImageGroup as R };
|