@hhgtech/hhg-components 1.29.51 → 1.29.53
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-409eb648.js → WhatsApp-cb38dfbc.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-578872ae.js → constants-30040652.js} +2 -2
- package/build/{constants-aad53565.js → constants-b8c83ec0.js} +2 -2
- package/build/constants.js +3 -3
- package/build/{core-97560fab.js → core-9997cb9d.js} +2 -2
- package/build/{dataTransform-6b0a78b0.js → dataTransform-6baf38a1.js} +1 -1
- package/build/ecom.js +5 -5
- package/build/esm/{WhatsApp-370fa9b4.js → WhatsApp-45f563a5.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-efb49fb7.js → constants-237bf26e.js} +2 -2
- package/build/esm/{constants-c7b13a83.js → constants-5abd80ae.js} +2 -2
- package/build/esm/constants.js +3 -3
- package/build/esm/{core-84591d4a.js → core-f96ad15b.js} +2 -2
- package/build/esm/{dataTransform-f07bb157.js → dataTransform-fb283547.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-e4d327b2.js → getDynamicHealthTool-8cf3cfb9.js} +4 -4
- package/build/esm/{getSocialList-7f49a211.js → getSocialList-02d441ea.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-ac04c1ac.js → index-07763101.js} +12 -12
- package/build/esm/{index-a76abfac.js → index-220ec410.js} +2 -2
- package/build/esm/{index-248fac6d.js → index-2652cd4b.js} +2 -2
- package/build/esm/{index-852ccb18.js → index-29cd6f45.js} +5 -5
- package/build/esm/{index-8408e283.js → index-33bb0919.js} +2 -2
- package/build/esm/{index-47f8e931.js → index-389dde95.js} +2 -2
- package/build/esm/{index-2259858f.js → index-490769d1.js} +6 -6
- package/build/esm/{index-2ce40f6c.js → index-60e034fa.js} +10 -10
- package/build/esm/{index-e21cf6fb.js → index-69d11255.js} +2 -2
- package/build/esm/{index-a7aa10b4.js → index-70a5bb4e.js} +47 -54
- package/build/esm/{index-45d8a4fa.js → index-74b124d6.js} +32 -32
- package/build/esm/{index-7d8501c7.js → index-7b567178.js} +1 -1
- package/build/esm/{index-42d274cb.js → index-88a5efef.js} +2 -2
- package/build/esm/{index-8985d6dd.js → index-950c7d1b.js} +4 -4
- package/build/esm/{index-503a721c.js → index-c0683199.js} +2 -2
- package/build/esm/{index-b3e8492d.js → index-c281667e.js} +2 -2
- package/build/esm/{index-555ac4dd.js → index-ca1afc9d.js} +4 -4
- package/build/esm/{index-22a21489.js → index-df854178.js} +3 -3
- package/build/esm/{index-97804909.js → index-ea459555.js} +4 -4
- package/build/esm/{index-1762392c.js → index-eb85a5db.js} +9 -9
- package/build/esm/{index-459aba91.js → index-ebceeb50.js} +9 -9
- package/build/esm/{index-a62f2708.js → index-f38ddfbc.js} +11 -11
- package/build/esm/{index-8837144e.js → index-fde93563.js} +200 -334
- package/build/esm/{index-2de97eef.js → index-fe77395f.js} +2 -2
- package/build/esm/index.js +65 -66
- package/build/esm/{index.styled-02b62a71.js → index.styled-5b4ea6dd.js} +2 -2
- package/build/esm/{index.styles-ac40e929.js → index.styles-e85e1f77.js} +6 -6
- package/build/esm/interfaces/types/BabyGrowth.d.ts +8 -7
- package/build/esm/lead/components/form/index.d.ts +3 -2
- package/build/esm/lead.js +30 -30
- 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-b8d2dc0e.js → routing-3aa51994.js} +2 -2
- package/build/esm/subot.js +22 -22
- package/build/esm/together.js +34 -34
- package/build/esm/{types-dcc4ed5a.js → types-827513de.js} +30 -30
- package/build/esm/{types-92108142.js → types-ac2c6eb8.js} +13 -13
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-53274540.js → useCategory-26341b94.js} +5 -5
- package/build/esm/{useHealthToolCache-435d29b7.js → useHealthToolCache-2c381d04.js} +2 -2
- package/build/esm/{useMantineLocale-fb92dd2a.js → useMantineLocale-bab7b711.js} +3 -3
- package/build/esm/{usePlacesAutocomplete-d76d5cf0.js → usePlacesAutocomplete-a79f8b82.js} +1 -1
- package/build/esm/{useTranslations-316c0734.js → useTranslations-e0e32bb6.js} +1 -1
- package/build/esm/{utils-f7568d48.js → utils-0812c948.js} +5 -5
- package/build/esm/{utils-d697d289.js → utils-20eca4e7.js} +4 -4
- package/build/esm/{utils-208d34bc.js → utils-ab9bffb2.js} +1 -1
- package/build/esm/vaccination.js +26 -26
- package/build/footer.js +18 -18
- package/build/gAssets.js +4 -4
- package/build/{getDynamicHealthTool-9e3d2b0e.js → getDynamicHealthTool-bda867b5.js} +4 -4
- package/build/{getSocialList-a399cb1f.js → getSocialList-8cfe2752.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-71b08225.js → index-03d484bc.js} +4 -4
- package/build/{index-c7ea967a.js → index-0911e051.js} +9 -9
- package/build/{index-a2e2b026.js → index-0e48f2c7.js} +2 -2
- package/build/{index-93c8de8e.js → index-1a7e903f.js} +2 -2
- package/build/{index-ee035284.js → index-1c9d11b6.js} +3 -3
- package/build/{index-3776dbc5.js → index-417b1b46.js} +9 -9
- package/build/{index-88339ebc.js → index-48a709a0.js} +4 -4
- package/build/{index-1ba0775e.js → index-4a6ad86d.js} +4 -4
- package/build/{index-a88bc400.js → index-56cb33a1.js} +2 -2
- package/build/{index-24d7ba92.js → index-579899b7.js} +5 -5
- package/build/{index-67d3245f.js → index-7443fc87.js} +2 -2
- package/build/{index-502fbff4.js → index-7df96dee.js} +2 -2
- package/build/{index-cdf1b314.js → index-94765f32.js} +6 -6
- package/build/{index-e9723f74.js → index-9a6a5f56.js} +2 -2
- package/build/{index-30079af7.js → index-9c278fc8.js} +32 -32
- package/build/{index-d23581c6.js → index-a2ed1024.js} +11 -11
- package/build/{index-832f0fc8.js → index-a919a908.js} +12 -12
- package/build/{index-7633fd38.js → index-ac47df5a.js} +64 -71
- package/build/{index-97b8ebf4.js → index-b623d43b.js} +2 -2
- package/build/{index-71a7f02a.js → index-c0456ffc.js} +10 -10
- package/build/{index-a0c9e023.js → index-dd2b1931.js} +199 -332
- package/build/{index-116baa81.js → index-ea607fdd.js} +2 -2
- package/build/{index-a7c4050a.js → index-ecb62402.js} +1 -1
- package/build/{index-35cf992c.js → index-fad88d16.js} +2 -2
- package/build/index.js +65 -66
- package/build/{index.styled-efebda18.js → index.styled-25b52f73.js} +2 -2
- package/build/{index.styles-a7d9d993.js → index.styles-05672bdf.js} +6 -6
- package/build/interfaces/types/BabyGrowth.d.ts +8 -7
- package/build/lead/components/form/index.d.ts +3 -2
- package/build/lead.js +30 -30
- 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-06dad653.js → routing-7ab16458.js} +2 -2
- package/build/subot.js +22 -22
- package/build/together.js +34 -34
- package/build/{types-dc7f439a.js → types-0795a18d.js} +13 -13
- package/build/{types-1ddcc9eb.js → types-19dd7e28.js} +30 -30
- package/build/types.js +1 -1
- package/build/{useCategory-0b1d70c5.js → useCategory-b84b44b1.js} +5 -5
- package/build/{useHealthToolCache-5268c57a.js → useHealthToolCache-5b1a04a1.js} +2 -2
- package/build/{useMantineLocale-00217974.js → useMantineLocale-97e15b0f.js} +3 -3
- package/build/{usePlacesAutocomplete-78d55792.js → usePlacesAutocomplete-e1baec71.js} +1 -1
- package/build/{useTranslations-2c3345cb.js → useTranslations-915ad0dd.js} +1 -1
- package/build/{utils-b1594f5d.js → utils-48264a2e.js} +1 -1
- package/build/{utils-d29cba24.js → utils-d9ad007c.js} +4 -4
- package/build/{utils-b13f7d7d.js → utils-ec8ab190.js} +5 -5
- 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-ad570099.js → BMI_BOYS.percentile.monthly-c2ed27cc.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-802cb0c3.js → BMI_BOYS.percentile.weekly-4725cdf6.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-c5fcfde0.js → BMI_BOYS.percentile.yearly-deffe47f.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-4085d1c0.js → BMI_BOYS.zscore.monthly-5f83feff.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-e4879d2a.js → BMI_BOYS.zscore.weekly-0e4bd4c1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-a1137cc6.js → BMI_BOYS.zscore.yearly-5f0d5769.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-28c71e21.js → BMI_GIRLS.percentile.monthly-b38702b5.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-31f1591b.js → BMI_GIRLS.percentile.weekly-f1ff1d8e.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-528c6aeb.js → BMI_GIRLS.percentile.yearly-75951505.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-4fce7106.js → BMI_GIRLS.zscore.monthly-59c58dbf.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-75a378f8.js → BMI_GIRLS.zscore.weekly-1a59d407.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-f20192cd.js → BMI_GIRLS.zscore.yearly-f89ef5df.js} +0 -0
- /package/build/{ChevronDown-86a47310.js → ChevronDown-f065b0df.js} +0 -0
- /package/build/{Close-c294ca6c.js → Close-7f74d35a.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-34d32a18.js → HEAD CIRCUM_BOYS.percentile.monthly-5f9b8da8.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-f455e6ff.js → HEAD CIRCUM_BOYS.percentile.weekly-cdad8e1f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-964828c7.js → HEAD CIRCUM_BOYS.percentile.yearly-888d8be0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-1689c6f7.js → HEAD CIRCUM_BOYS.zscore.monthly-35979e17.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-b6dcb8ed.js → HEAD CIRCUM_BOYS.zscore.weekly-6e4c911d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-1cc8a573.js → HEAD CIRCUM_BOYS.zscore.yearly-5cfda617.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-eb4a65f7.js → HEAD CIRCUM_GIRLS.percentile.monthly-120c03a5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-b310409f.js → HEAD CIRCUM_GIRLS.percentile.weekly-65de75e2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-5c1a2fca.js → HEAD CIRCUM_GIRLS.percentile.yearly-1b744dad.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-853f285d.js → HEAD CIRCUM_GIRLS.zscore.monthly-06f73dfd.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b09b5657.js → HEAD CIRCUM_GIRLS.zscore.weekly-a1a8bee8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-27b20bcd.js → HEAD CIRCUM_GIRLS.zscore.yearly-6b910166.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-44a98489.js → HEIGHT_BOYS.percentile.monthly-7b0c71f8.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-d27f1a0d.js → HEIGHT_BOYS.percentile.weekly-d26f7395.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-a375efe0.js → HEIGHT_BOYS.percentile.yearly-1980dd00.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-a9e7b5d1.js → HEIGHT_BOYS.zscore.monthly-3dde5734.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-e090a2c8.js → HEIGHT_BOYS.zscore.weekly-c3045046.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-db1b4e0d.js → HEIGHT_BOYS.zscore.yearly-5fe6bc79.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-cb1b78f6.js → HEIGHT_GIRLS.percentile.monthly-f70f2d42.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-872e5494.js → HEIGHT_GIRLS.percentile.weekly-e022777a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-fe720e49.js → HEIGHT_GIRLS.percentile.yearly-e288b84c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-c4229a35.js → HEIGHT_GIRLS.zscore.monthly-45de8691.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-a4a9d604.js → HEIGHT_GIRLS.zscore.weekly-eb643602.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-7a305a4e.js → HEIGHT_GIRLS.zscore.yearly-3bc0a847.js} +0 -0
- /package/build/{Visible-0ddaf8a7.js → Visible-267b2221.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-920ad578.js → WEIGHT_BOYS.percentile.monthly-95a98585.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-60c1f77a.js → WEIGHT_BOYS.percentile.weekly-27868a23.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-5c2cee14.js → WEIGHT_BOYS.percentile.yearly-cc8ee5be.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-063067b9.js → WEIGHT_BOYS.zscore.monthly-0b8d93aa.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-e489f580.js → WEIGHT_BOYS.zscore.weekly-28518d97.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-14f7dba6.js → WEIGHT_BOYS.zscore.yearly-c902fa63.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-01e46d2c.js → WEIGHT_GIRLS.percentile.monthly-e3a1df63.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-73aa962d.js → WEIGHT_GIRLS.percentile.weekly-e6fe3333.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-408acb7c.js → WEIGHT_GIRLS.percentile.yearly-e741a293.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-306da96a.js → WEIGHT_GIRLS.zscore.monthly-cd9dd66c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-2fa26aa0.js → WEIGHT_GIRLS.zscore.weekly-02b221aa.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-808f7bd7.js → WEIGHT_GIRLS.zscore.yearly-09b5f043.js} +0 -0
- /package/build/{animation-f6ec572f.js → animation-c69d4dbb.js} +0 -0
- /package/build/{cart-7fbf1634.js → cart-ffe72541.js} +0 -0
- /package/build/{cookieHelper-7291b54d.js → cookieHelper-535fc08c.js} +0 -0
- /package/build/{doctor-531577d0.js → doctor-5fbb4b42.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-6ed55954.js → BMI_BOYS.percentile.monthly-aaeafbff.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-68cbdcfe.js → BMI_BOYS.percentile.weekly-a276e03d.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-638cf76b.js → BMI_BOYS.percentile.yearly-463bb5ec.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-dcaf5338.js → BMI_BOYS.zscore.monthly-adafb062.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-ebe0b167.js → BMI_BOYS.zscore.weekly-1e294854.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-407d1bb4.js → BMI_BOYS.zscore.yearly-8eed19f0.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-bf74cb0b.js → BMI_GIRLS.percentile.monthly-c0499a7e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-b112429f.js → BMI_GIRLS.percentile.weekly-39a5a828.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-088e28ca.js → BMI_GIRLS.percentile.yearly-4a5d06f5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-b5395a27.js → BMI_GIRLS.zscore.monthly-ff53d794.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-135662f2.js → BMI_GIRLS.zscore.weekly-9fcb581a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-a377039d.js → BMI_GIRLS.zscore.yearly-a0ecf7d8.js} +0 -0
- /package/build/esm/{ChevronDown-8d72633d.js → ChevronDown-fdde711a.js} +0 -0
- /package/build/esm/{Close-55bcea20.js → Close-423e7e32.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-760f4aa0.js → HEAD CIRCUM_BOYS.percentile.monthly-ab963383.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-9f9868be.js → HEAD CIRCUM_BOYS.percentile.weekly-1816fe9e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-0fac07fd.js → HEAD CIRCUM_BOYS.percentile.yearly-06260856.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-6e6936a3.js → HEAD CIRCUM_BOYS.zscore.monthly-5d152662.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-cc6481d9.js → HEAD CIRCUM_BOYS.zscore.weekly-33489539.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-f4b5e48c.js → HEAD CIRCUM_BOYS.zscore.yearly-7177c741.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-9e8a1d61.js → HEAD CIRCUM_GIRLS.percentile.monthly-ee67b7e9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-67812fc8.js → HEAD CIRCUM_GIRLS.percentile.weekly-b0a175cc.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-741d6cb9.js → HEAD CIRCUM_GIRLS.percentile.yearly-4af37f8d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-1a297a7c.js → HEAD CIRCUM_GIRLS.zscore.monthly-1d52192a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-02c8f0c2.js → HEAD CIRCUM_GIRLS.zscore.weekly-2acc251c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-8135f9ae.js → HEAD CIRCUM_GIRLS.zscore.yearly-68a7839a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-e851a980.js → HEIGHT_BOYS.percentile.monthly-649ec5d7.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-7132fe98.js → HEIGHT_BOYS.percentile.weekly-eb6b828e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-a451ed53.js → HEIGHT_BOYS.percentile.yearly-bb239908.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-53369106.js → HEIGHT_BOYS.zscore.monthly-f6590adf.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-1e26ade0.js → HEIGHT_BOYS.zscore.weekly-bea64b23.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-aa28c3f4.js → HEIGHT_BOYS.zscore.yearly-d695c278.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-5e8df353.js → HEIGHT_GIRLS.percentile.monthly-803d686b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-bc3b89da.js → HEIGHT_GIRLS.percentile.weekly-82636593.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-c138a4ef.js → HEIGHT_GIRLS.percentile.yearly-9cd8748f.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-d30794c7.js → HEIGHT_GIRLS.zscore.monthly-1cd92335.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-468fc6f0.js → HEIGHT_GIRLS.zscore.weekly-1c97a9f6.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-87ebbe36.js → HEIGHT_GIRLS.zscore.yearly-14009ab5.js} +0 -0
- /package/build/esm/{Visible-ad268539.js → Visible-b7897d46.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-e6c4fa74.js → WEIGHT_BOYS.percentile.monthly-c05f79e7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-c4715d73.js → WEIGHT_BOYS.percentile.weekly-4667adc4.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-8396bae5.js → WEIGHT_BOYS.percentile.yearly-0c3c8f46.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-b100dcc5.js → WEIGHT_BOYS.zscore.monthly-a0421e15.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-ab1092f6.js → WEIGHT_BOYS.zscore.weekly-b7436f96.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-157dd615.js → WEIGHT_BOYS.zscore.yearly-ed3e8f38.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-eadda93a.js → WEIGHT_GIRLS.percentile.monthly-91d38202.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-7c43df50.js → WEIGHT_GIRLS.percentile.weekly-95e3b1d1.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-697c7223.js → WEIGHT_GIRLS.percentile.yearly-76c32403.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-c19d33b1.js → WEIGHT_GIRLS.zscore.monthly-421df2ca.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-d0916486.js → WEIGHT_GIRLS.zscore.weekly-35c54895.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-860e342d.js → WEIGHT_GIRLS.zscore.yearly-ff4f6972.js} +0 -0
- /package/build/esm/{animation-20dfe350.js → animation-818236bc.js} +0 -0
- /package/build/esm/{cart-bdae5d77.js → cart-027aee8d.js} +0 -0
- /package/build/esm/{cookieHelper-e1f149c2.js → cookieHelper-04eae938.js} +0 -0
- /package/build/esm/{doctor-203cddf4.js → doctor-ba272d72.js} +0 -0
- /package/build/esm/{index-688699fe.js → index-40f9b748.js} +0 -0
- /package/build/esm/{index-98e21f05.js → index-82876b90.js} +0 -0
- /package/build/esm/{index-e97d55a4.js → index-aeabc5e3.js} +0 -0
- /package/build/esm/{index-57a190bd.js → index-e6291202.js} +0 -0
- /package/build/esm/{isProduction-46c886c7.js → isProduction-45f87241.js} +0 -0
- /package/build/esm/{localizeNumberFormat-cfa50cd3.js → localizeNumberFormat-e250f29c.js} +0 -0
- /package/build/esm/{normalizeLink-e591e5ec.js → normalizeLink-e59ab3db.js} +0 -0
- /package/build/esm/{number-e89fa4f4.js → number-a21fd9a6.js} +0 -0
- /package/build/esm/{paths-14da7f36.js → paths-eb162467.js} +0 -0
- /package/build/esm/{theme-dae2e863.js → theme-16a78dab.js} +0 -0
- /package/build/esm/{translationsContext-be05e641.js → translationsContext-6d9c7378.js} +0 -0
- /package/build/esm/{tslib.es6-3dda5943.js → tslib.es6-0512e36a.js} +0 -0
- /package/build/esm/{useIsInit-178b5c7b.js → useIsInit-11a8e32b.js} +0 -0
- /package/build/esm/{useOutsideClick-f7e2b4eb.js → useOutsideClick-0b434ee5.js} +0 -0
- /package/build/esm/{useScrollbarSize-d7f2decf.js → useScrollbarSize-cb2b479c.js} +0 -0
- /package/build/esm/{useUniqueId-960839c2.js → useUniqueId-108bf35f.js} +0 -0
- /package/build/esm/{utils-87717b30.js → utils-0dd2f1f2.js} +0 -0
- /package/build/{index-8abde3c2.js → index-2641eda3.js} +0 -0
- /package/build/{index-de8a91d1.js → index-b88a70a2.js} +0 -0
- /package/build/{index-c62b7a15.js → index-c4b3c901.js} +0 -0
- /package/build/{index-0635c28a.js → index-f5d10d9d.js} +0 -0
- /package/build/{isProduction-d3017f48.js → isProduction-0d48f509.js} +0 -0
- /package/build/{localizeNumberFormat-8706cd66.js → localizeNumberFormat-115a808d.js} +0 -0
- /package/build/{normalizeLink-cc493bc6.js → normalizeLink-2155e490.js} +0 -0
- /package/build/{number-d6fc3bb9.js → number-3151f1d1.js} +0 -0
- /package/build/{paths-074c77be.js → paths-a620b4a3.js} +0 -0
- /package/build/{theme-4b8b4bcf.js → theme-ce1f3e0e.js} +0 -0
- /package/build/{translationsContext-996f51c2.js → translationsContext-35111cf8.js} +0 -0
- /package/build/{tslib.es6-d60f44b8.js → tslib.es6-86aebc01.js} +0 -0
- /package/build/{useIsInit-08680ec3.js → useIsInit-c6aa9de7.js} +0 -0
- /package/build/{useOutsideClick-b76ebb5e.js → useOutsideClick-e49aacc5.js} +0 -0
- /package/build/{useScrollbarSize-173507d3.js → useScrollbarSize-b514cea0.js} +0 -0
- /package/build/{useUniqueId-11df2bdc.js → useUniqueId-bbb13b18.js} +0 -0
- /package/build/{utils-985a243c.js → utils-6a718ecc.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-0dd2f1f2.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-e85e1f77.js';
|
|
5
|
+
import { T as Text } from './index-c0683199.js';
|
|
6
|
+
import { t as theme } from './theme-16a78dab.js';
|
|
7
|
+
import { M as MarryBabyText } from './index-fe77395f.js';
|
|
8
|
+
import { T as Text$1 } from './index-60e034fa.js';
|
|
9
|
+
import { u as useScrollbarSize } from './useScrollbarSize-cb2b479c.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-852ccb18.js';
|
|
23
|
-
import { u as useTranslations } from './useTranslations-316c0734.js';
|
|
12
|
+
import { s as setDefaultClass } from './utils-0812c948.js';
|
|
13
|
+
import { _ as __rest } from './tslib.es6-0512e36a.js';
|
|
14
|
+
import { useForm, isNotEmpty } from '@mantine/form';
|
|
15
|
+
import { R as Radio, B as Button, c as Input$1 } from './index-eb85a5db.js';
|
|
16
|
+
import { C as CommonGAssets } from './index-33bb0919.js';
|
|
17
|
+
import './constants-5abd80ae.js';
|
|
18
|
+
import './index-e6291202.js';
|
|
19
|
+
import './utils-20eca4e7.js';
|
|
20
|
+
import { D as DatePicker } from './index-29cd6f45.js';
|
|
21
|
+
import { u as useTranslations } from './useTranslations-e0e32bb6.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-bab7b711.js';
|
|
24
|
+
import './index-c281667e.js';
|
|
25
|
+
import './WhatsApp-45f563a5.js';
|
|
26
|
+
import './index.styled-5b4ea6dd.js';
|
|
27
|
+
import './index-aeabc5e3.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
|
});
|
|
@@ -387,17 +384,7 @@ const Modal = ({ type = 'lead', closeIcon, isOpen = true, onClose, children, cla
|
|
|
387
384
|
children))), elRef.current);
|
|
388
385
|
};
|
|
389
386
|
|
|
390
|
-
var
|
|
391
|
-
(function (DueDateCalculatorType) {
|
|
392
|
-
DueDateCalculatorType[DueDateCalculatorType["lastPeriod"] = 0] = "lastPeriod";
|
|
393
|
-
DueDateCalculatorType[DueDateCalculatorType["conception"] = 1] = "conception";
|
|
394
|
-
DueDateCalculatorType[DueDateCalculatorType["IVF"] = 2] = "IVF";
|
|
395
|
-
})(DueDateCalculatorType || (DueDateCalculatorType = {}));
|
|
396
|
-
const DateToInputValue = (date) => {
|
|
397
|
-
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
var useStyles$9 = createStyles(() => {
|
|
387
|
+
var useStyles$a = createStyles(() => {
|
|
401
388
|
return {
|
|
402
389
|
root: {
|
|
403
390
|
justifyContent: 'flex-start',
|
|
@@ -418,7 +405,7 @@ var useStyles$9 = createStyles(() => {
|
|
|
418
405
|
|
|
419
406
|
const ChipGroup = (_a) => {
|
|
420
407
|
var { data = [], label, isMobile, layout = 'horizonal', classNames, styles } = _a, props = __rest(_a, ["data", "label", "isMobile", "layout", "classNames", "styles"]);
|
|
421
|
-
const { classes, theme } = useStyles$
|
|
408
|
+
const { classes, theme } = useStyles$a(undefined, {
|
|
422
409
|
name: 'ChipGroup',
|
|
423
410
|
classNames,
|
|
424
411
|
styles,
|
|
@@ -485,7 +472,7 @@ const ChipGroup = (_a) => {
|
|
|
485
472
|
|
|
486
473
|
const FormLayoutContext = createContext({});
|
|
487
474
|
|
|
488
|
-
const useStyles$
|
|
475
|
+
const useStyles$9 = createStyles(() => {
|
|
489
476
|
return {
|
|
490
477
|
root: {
|
|
491
478
|
display: 'flex',
|
|
@@ -496,7 +483,7 @@ const useStyles$8 = createStyles(() => {
|
|
|
496
483
|
});
|
|
497
484
|
const FormRow = (_a) => {
|
|
498
485
|
var { styles, classNames, className, children } = _a, props = __rest(_a, ["styles", "classNames", "className", "children"]);
|
|
499
|
-
const { classes, cx } = useStyles$
|
|
486
|
+
const { classes, cx } = useStyles$9(undefined, {
|
|
500
487
|
name: 'HealthToolFormWrapper__FormRow',
|
|
501
488
|
styles,
|
|
502
489
|
classNames,
|
|
@@ -504,7 +491,7 @@ const FormRow = (_a) => {
|
|
|
504
491
|
return (React__default.createElement(Box, Object.assign({ className: cx(className, classes.root) }, props), children));
|
|
505
492
|
};
|
|
506
493
|
|
|
507
|
-
var useStyles$
|
|
494
|
+
var useStyles$8 = createStyles((theme, { formLayout }) => {
|
|
508
495
|
return {
|
|
509
496
|
root: {
|
|
510
497
|
display: 'flex',
|
|
@@ -526,7 +513,7 @@ var useStyles$7 = createStyles((theme, { formLayout }) => {
|
|
|
526
513
|
};
|
|
527
514
|
});
|
|
528
515
|
|
|
529
|
-
const useStyles$
|
|
516
|
+
const useStyles$7 = createStyles((theme, { formLayout }) => {
|
|
530
517
|
const isMarryBaby = theme.other.template === 'mb';
|
|
531
518
|
return {
|
|
532
519
|
root: Object.assign(Object.assign({ minWidth: rem(180) }, (formLayout === 'inline' && {
|
|
@@ -540,7 +527,7 @@ const useStyles$6 = createStyles((theme, { formLayout }) => {
|
|
|
540
527
|
const SubmitBtn = (_a) => {
|
|
541
528
|
var { styles, classNames, className } = _a, props = __rest(_a, ["styles", "classNames", "className"]);
|
|
542
529
|
const { formLayout } = useContext(FormLayoutContext);
|
|
543
|
-
const { classes, cx } = useStyles$
|
|
530
|
+
const { classes, cx } = useStyles$7({ formLayout }, {
|
|
544
531
|
name: 'HealthToolFormWrapper__SubmitBtn',
|
|
545
532
|
styles,
|
|
546
533
|
classNames,
|
|
@@ -583,7 +570,7 @@ const Switching = (_a) => {
|
|
|
583
570
|
}) }))));
|
|
584
571
|
};
|
|
585
572
|
|
|
586
|
-
const useStyles$
|
|
573
|
+
const useStyles$6 = createStyles((theme) => {
|
|
587
574
|
return {
|
|
588
575
|
root: {
|
|
589
576
|
color: theme.colors.gray[6],
|
|
@@ -594,7 +581,7 @@ const useStyles$5 = createStyles((theme) => {
|
|
|
594
581
|
});
|
|
595
582
|
const Unit = (_a) => {
|
|
596
583
|
var { styles, classNames, className } = _a, props = __rest(_a, ["styles", "classNames", "className"]);
|
|
597
|
-
const { classes, cx } = useStyles$
|
|
584
|
+
const { classes, cx } = useStyles$6(undefined, {
|
|
598
585
|
name: 'HealthToolFormWrapper__UnitText',
|
|
599
586
|
styles,
|
|
600
587
|
classNames,
|
|
@@ -602,7 +589,7 @@ const Unit = (_a) => {
|
|
|
602
589
|
return React__default.createElement(Text, Object.assign({ size: "p4", className: cx(className, classes.root) }, props));
|
|
603
590
|
};
|
|
604
591
|
|
|
605
|
-
var useStyles$
|
|
592
|
+
var useStyles$5 = createStyles(() => {
|
|
606
593
|
return {
|
|
607
594
|
root: {
|
|
608
595
|
display: 'flex',
|
|
@@ -643,7 +630,7 @@ var useStyles$4 = createStyles(() => {
|
|
|
643
630
|
|
|
644
631
|
const BorderBoxControl = (_a) => {
|
|
645
632
|
var { label, rightSection, children, styles, className, classNames } = _a, props = __rest(_a, ["label", "rightSection", "children", "styles", "className", "classNames"]);
|
|
646
|
-
const { classes, cx } = useStyles$
|
|
633
|
+
const { classes, cx } = useStyles$5(undefined, {
|
|
647
634
|
name: 'HealthToolFormWrapper__BorderBoxControl',
|
|
648
635
|
styles,
|
|
649
636
|
classNames,
|
|
@@ -655,7 +642,7 @@ const BorderBoxControl = (_a) => {
|
|
|
655
642
|
rightSection && (React__default.createElement(Box, { className: classes.rightSection }, typeof rightSection === 'string' ? (React__default.createElement(Text, { size: "p4" }, rightSection)) : (rightSection)))));
|
|
656
643
|
};
|
|
657
644
|
|
|
658
|
-
var useStyles$
|
|
645
|
+
var useStyles$4 = createStyles((theme, { width, direction }) => {
|
|
659
646
|
return {
|
|
660
647
|
row: {
|
|
661
648
|
display: 'flex',
|
|
@@ -693,7 +680,7 @@ var useStyles$3 = createStyles((theme, { width, direction }) => {
|
|
|
693
680
|
});
|
|
694
681
|
|
|
695
682
|
const BorderInlineControl = ({ label, children, styles, classNames, direction = 'row', width = 180, }) => {
|
|
696
|
-
const { classes } = useStyles$
|
|
683
|
+
const { classes } = useStyles$4({ width, direction }, {
|
|
697
684
|
name: 'HealthToolFormWrapper__BorderInlineControl',
|
|
698
685
|
styles,
|
|
699
686
|
classNames,
|
|
@@ -703,7 +690,7 @@ const BorderInlineControl = ({ label, children, styles, classNames, direction =
|
|
|
703
690
|
React__default.createElement(Box, { className: classes.content }, flattenChildren(children).map((i, idx) => (React__default.createElement(Box, { key: idx, className: classes.control }, i))))));
|
|
704
691
|
};
|
|
705
692
|
|
|
706
|
-
const useStyles$
|
|
693
|
+
const useStyles$3 = createStyles(() => {
|
|
707
694
|
return {
|
|
708
695
|
root: {
|
|
709
696
|
color: 'red',
|
|
@@ -714,7 +701,7 @@ const useStyles$2 = createStyles(() => {
|
|
|
714
701
|
});
|
|
715
702
|
const Error = (_a) => {
|
|
716
703
|
var { styles, classNames, className } = _a, props = __rest(_a, ["styles", "classNames", "className"]);
|
|
717
|
-
const { classes, cx } = useStyles$
|
|
704
|
+
const { classes, cx } = useStyles$3(undefined, {
|
|
718
705
|
name: 'HealthToolFormWrapper__UnitText',
|
|
719
706
|
styles,
|
|
720
707
|
classNames,
|
|
@@ -722,7 +709,7 @@ const Error = (_a) => {
|
|
|
722
709
|
return React__default.createElement(Text, Object.assign({ size: "p4", className: cx(className, classes.root) }, props));
|
|
723
710
|
};
|
|
724
711
|
|
|
725
|
-
var useStyles$
|
|
712
|
+
var useStyles$2 = createStyles((theme$1) => {
|
|
726
713
|
const isMarryBaby = theme$1.other.template === 'mb';
|
|
727
714
|
return {
|
|
728
715
|
root: {
|
|
@@ -737,7 +724,7 @@ var useStyles$1 = createStyles((theme$1) => {
|
|
|
737
724
|
|
|
738
725
|
const Control = (_a) => {
|
|
739
726
|
var { className, styles, classNames } = _a, rest = __rest(_a, ["className", "styles", "classNames"]);
|
|
740
|
-
const { classes, cx } = useStyles$
|
|
727
|
+
const { classes, cx } = useStyles$2(undefined, {
|
|
741
728
|
name: 'HealthToolFormWrapper__Control',
|
|
742
729
|
styles,
|
|
743
730
|
classNames,
|
|
@@ -748,7 +735,7 @@ const Control = (_a) => {
|
|
|
748
735
|
const _HealthToolFormWrapper = (_a) => {
|
|
749
736
|
var { children, formLayout: formLayoutProp, styles, classNames, className, component = 'form' } = _a, rest = __rest(_a, ["children", "formLayout", "styles", "classNames", "className", "component"]);
|
|
750
737
|
const formLayout = formLayoutProp || 'default';
|
|
751
|
-
const { classes, cx } = useStyles$
|
|
738
|
+
const { classes, cx } = useStyles$8({ formLayout }, {
|
|
752
739
|
name: 'HealthToolFormWrapper',
|
|
753
740
|
styles,
|
|
754
741
|
classNames,
|
|
@@ -771,150 +758,39 @@ HealthToolFormWrapper.ChipGroup = ChipGroup;
|
|
|
771
758
|
|
|
772
759
|
const BabyGrowthFormContext = createContext({});
|
|
773
760
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
& .displayIcon {
|
|
789
|
-
pointer-events: none;
|
|
790
|
-
}
|
|
791
|
-
`;
|
|
792
|
-
const StyledTextField = styled(Input$1) `
|
|
793
|
-
& label {
|
|
794
|
-
position: absolute;
|
|
795
|
-
z-index: 1;
|
|
796
|
-
top: 16px;
|
|
797
|
-
|
|
798
|
-
left: 16px;
|
|
799
|
-
color: ${theme.mbColors.midGray};
|
|
800
|
-
pointer-events: none;
|
|
801
|
-
transition: all 0.2s ease;
|
|
802
|
-
white-space: nowrap;
|
|
803
|
-
overflow: hidden;
|
|
804
|
-
text-overflow: ellipsis;
|
|
805
|
-
max-width: 240px;
|
|
806
|
-
|
|
807
|
-
&[data-size='label2'] {
|
|
808
|
-
font-size: 12px;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
${MediaQueries.tdDown} {
|
|
812
|
-
max-width: 220px;
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
& input,
|
|
816
|
-
.mantine-Input-input {
|
|
817
|
-
::placeholder {
|
|
818
|
-
color: ${theme.mbColors.gray};
|
|
819
|
-
font-size: 14px;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
::-webkit-input-placeholder {
|
|
823
|
-
/* Chrome/Opera/Safari */
|
|
824
|
-
color: ${theme.mbColors.gray};
|
|
825
|
-
font-size: 14px;
|
|
826
|
-
}
|
|
827
|
-
::-moz-placeholder {
|
|
828
|
-
/* Firefox 19+ */
|
|
829
|
-
color: ${theme.mbColors.gray};
|
|
830
|
-
font-size: 14px;
|
|
831
|
-
}
|
|
832
|
-
:-ms-input-placeholder {
|
|
833
|
-
/* IE 10+ */
|
|
834
|
-
color: ${theme.mbColors.gray};
|
|
835
|
-
font-size: 14px;
|
|
836
|
-
}
|
|
837
|
-
:-moz-placeholder {
|
|
838
|
-
/* Firefox 18- */
|
|
839
|
-
color: ${theme.mbColors.gray};
|
|
840
|
-
font-size: 14px;
|
|
841
|
-
}
|
|
842
|
-
height: ${(props) => (props.size === 'sm' ? 48 : 72)}px !important;
|
|
843
|
-
padding-top: 27px !important;
|
|
844
|
-
border-color: ${theme.mbColors.lightGray} !important;
|
|
845
|
-
background-color: ${theme.colors.white};
|
|
846
|
-
border-radius: 16px !important;
|
|
847
|
-
transition: all 0.2s ease;
|
|
848
|
-
padding-top: ${(props) => (props.value ? '38px' : '27px')} !important;
|
|
849
|
-
|
|
850
|
-
&:focus,
|
|
851
|
-
&:hover {
|
|
852
|
-
border-color: ${theme.mbColors.pink};
|
|
853
|
-
box-shadow: none;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
.mantine-Input-rightSection,
|
|
857
|
-
.mantine-Input-leftSection {
|
|
858
|
-
padding-top: 20px;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
&[data-has-action-icon] {
|
|
862
|
-
input,
|
|
863
|
-
.mantine-Input-input {
|
|
864
|
-
padding-top: ${(props) => (props.value ? '38px' : '27px')} !important;
|
|
865
|
-
padding-bottom: ${(props) => (props.value ? '16px' : '27px')} !important;
|
|
866
|
-
height: unset !important;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
label {
|
|
870
|
-
position: absolute;
|
|
871
|
-
z-index: 1;
|
|
872
|
-
top: 16px;
|
|
873
|
-
padding-right: 46px;
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
`;
|
|
877
|
-
|
|
878
|
-
styled.div `
|
|
879
|
-
display: flex;
|
|
880
|
-
flex-direction: column;
|
|
881
|
-
gap: 16px;
|
|
882
|
-
padding-block: 40px;
|
|
883
|
-
|
|
884
|
-
&[data-theme='true'] {
|
|
885
|
-
padding-block: 0;
|
|
886
|
-
padding-top: 12px;
|
|
887
|
-
}
|
|
888
|
-
`;
|
|
889
|
-
const StyledFormControl = styled.div `
|
|
890
|
-
display: flex;
|
|
891
|
-
flex-direction: column;
|
|
892
|
-
gap: 6px;
|
|
893
|
-
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
|
+
};
|
|
894
775
|
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
`;
|
|
904
|
-
const StyledRow = styled.div `
|
|
905
|
-
display: flex;
|
|
906
|
-
width: 100%;
|
|
907
|
-
align-items: center;
|
|
908
|
-
justify-content: space-between;
|
|
909
|
-
gap: 16px;
|
|
910
|
-
> div {
|
|
911
|
-
width: 100%;
|
|
912
|
-
}
|
|
913
|
-
`;
|
|
776
|
+
var useStyles$1 = createStyles((theme) => {
|
|
777
|
+
return {
|
|
778
|
+
unit: {
|
|
779
|
+
color: theme.colors.gray[4],
|
|
780
|
+
fontWeight: 'normal',
|
|
781
|
+
},
|
|
782
|
+
};
|
|
783
|
+
});
|
|
914
784
|
|
|
915
|
-
const DefaultForm = (
|
|
785
|
+
const DefaultForm = (_a) => {
|
|
786
|
+
var { styles, classNames } = _a, props = __rest(_a, ["styles", "classNames"]);
|
|
916
787
|
const { t } = useTranslations();
|
|
917
|
-
const {
|
|
788
|
+
const { form, currentUrl, submitProps } = useContext(BabyGrowthFormContext);
|
|
789
|
+
const { classes } = useStyles$1(undefined, {
|
|
790
|
+
name: 'BabyGrowthForm__DefaultForm',
|
|
791
|
+
styles,
|
|
792
|
+
classNames,
|
|
793
|
+
});
|
|
918
794
|
const commonDateProps = {
|
|
919
795
|
placeholder: 'DD/MM/YYYY',
|
|
920
796
|
popoverProps: {
|
|
@@ -922,67 +798,44 @@ const DefaultForm = (props) => {
|
|
|
922
798
|
},
|
|
923
799
|
};
|
|
924
800
|
return (React__default.createElement(HealthToolFormWrapper, Object.assign({ formLayout: "default" }, props),
|
|
925
|
-
React__default.createElement(
|
|
926
|
-
|
|
801
|
+
React__default.createElement(HealthToolFormWrapper.FormRow, null,
|
|
802
|
+
React__default.createElement(HealthToolFormWrapper.Control, null,
|
|
803
|
+
React__default.createElement(GenderOptionControl, Object.assign({ isBaby: true, genderValue: {
|
|
927
804
|
male: 'boy',
|
|
928
805
|
female: 'girl',
|
|
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
|
-
|
|
961
|
-
|
|
962
|
-
React__default.createElement(Text, { size: "s4", weight: "semiBold" }, t('babyGrowth.height')),
|
|
963
|
-
React__default.createElement(Text, { as: "span", size: "n1", color: theme.colors.gray400 }, t('babyGrowth.cm'))),
|
|
964
|
-
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() }))) }),
|
|
965
|
-
React__default.createElement(Controller, { control: control, name: "weight", render: ({ field: { onChange, value }, fieldState: { error }, }) => (React__default.createElement(StyledFormControl, null,
|
|
966
|
-
React__default.createElement(StyledInlineLabel, { size: "label1", htmlFor: "weight" },
|
|
967
|
-
React__default.createElement(Text, { size: "s4", weight: "semiBold" }, t('babyGrowth.weight')),
|
|
968
|
-
React__default.createElement(Text, { as: "span", size: "n1", color: theme.colors.gray400 }, t('babyGrowth.kg'))),
|
|
969
|
-
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() }))) })),
|
|
970
|
-
React__default.createElement(StyledRow, null,
|
|
971
|
-
React__default.createElement(Controller, { control: control, name: "head", render: ({ field: { onChange, value }, fieldState: { error }, }) => (React__default.createElement(StyledFormControl, null,
|
|
972
|
-
React__default.createElement(StyledInlineLabel, { size: "label1", htmlFor: "head" },
|
|
973
|
-
React__default.createElement(Text, { size: "s4", weight: "semiBold" }, t('babyGrowth.headCircumference')),
|
|
974
|
-
React__default.createElement(Text, { as: "span", size: "n1", color: theme.colors.gray400 }, t('babyGrowth.cm'))),
|
|
975
|
-
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() }))) }),
|
|
976
|
-
React__default.createElement(Controller, { control: control, name: "bmi", render: ({ field: { value } }) => (React__default.createElement(StyledFormControl, null,
|
|
977
|
-
React__default.createElement(StyledInlineLabel, { size: "label1", htmlFor: "bmi" },
|
|
978
|
-
React__default.createElement(Text, { size: "s4", weight: "semiBold" }, t('babyGrowth.input.bmi')),
|
|
979
|
-
React__default.createElement(Text, { as: "span", size: "n1", color: theme.colors.gray400 }, t('babyGrowth.kg.m2'))),
|
|
980
|
-
React__default.createElement(Input$1, { name: "bmi", size: "md", type: "number", value: String(value), isDisabled: true }))) })),
|
|
981
|
-
React__default.createElement(Controller, { control: control, name: "measurementDate", render: ({ field: { onChange }, fieldState: { error } }) => (React__default.createElement(StyledFormControl, null,
|
|
982
|
-
React__default.createElement(StyledInlineLabel, { size: "label1", htmlFor: "measurementDate" },
|
|
983
|
-
React__default.createElement(Text, { as: "label", size: "s4", weight: "semiBold" }, t('babyGrowth.input.measurementDate'))),
|
|
984
|
-
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' : '' })))) }),
|
|
985
|
-
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'))));
|
|
986
839
|
};
|
|
987
840
|
|
|
988
841
|
var useStyles = createStyles((theme) => {
|
|
@@ -1002,54 +855,6 @@ var useStyles = createStyles((theme) => {
|
|
|
1002
855
|
};
|
|
1003
856
|
});
|
|
1004
857
|
|
|
1005
|
-
const InlineForm = (_a) => {
|
|
1006
|
-
var { styles, classNames } = _a, props = __rest(_a, ["styles", "classNames"]);
|
|
1007
|
-
const { t } = useTranslations();
|
|
1008
|
-
const { control, currentUrl, isEmptyThreeFields, submitProps } = useContext(BabyGrowthFormContext);
|
|
1009
|
-
const { classes, cx } = useStyles(undefined, {
|
|
1010
|
-
name: 'BabyGrowthForm__InlineForm',
|
|
1011
|
-
styles,
|
|
1012
|
-
classNames,
|
|
1013
|
-
});
|
|
1014
|
-
const commonDateProps = {
|
|
1015
|
-
placeholder: 'DD/MM/YYYY',
|
|
1016
|
-
popoverProps: {
|
|
1017
|
-
withinPortal: true,
|
|
1018
|
-
},
|
|
1019
|
-
};
|
|
1020
|
-
return (React__default.createElement(HealthToolFormWrapper, Object.assign({ formLayout: "inline", className: classes.root }, props),
|
|
1021
|
-
React__default.createElement(Controller, { control: control, name: "gender", render: ({ field: { onChange } }) => (React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('tools.selectBabyGender') },
|
|
1022
|
-
React__default.createElement(GenderOptionControl, { type: "radio", hideLabel: true, isBaby: true, genderValue: {
|
|
1023
|
-
male: 'boy',
|
|
1024
|
-
female: 'girl',
|
|
1025
|
-
}, onChange: onChange }))) }),
|
|
1026
|
-
React__default.createElement(Controller, { control: control, name: "birthday", render: ({ field: { onChange }, fieldState: { error } }) => {
|
|
1027
|
-
return (React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.input.birthday') },
|
|
1028
|
-
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { className: cx(error ? 'error' : ''), onChange: onChange, maxDate: new Date() }))));
|
|
1029
|
-
} }),
|
|
1030
|
-
React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: "BMI", styles: {
|
|
1031
|
-
control: {
|
|
1032
|
-
'&:first-child': {
|
|
1033
|
-
width: 'auto',
|
|
1034
|
-
},
|
|
1035
|
-
},
|
|
1036
|
-
} },
|
|
1037
|
-
React__default.createElement(Controller, { control: control, name: "bmi", render: ({ field: { value } }) => (React__default.createElement(React__default.Fragment, null,
|
|
1038
|
-
React__default.createElement(Text, { size: "p3" },
|
|
1039
|
-
React__default.createElement("span", { className: classes.bmiVal }, !isNaN(Number(value)) && value !== '0' ? value : ''),
|
|
1040
|
-
t('babyGrowth.kg.m2')))) }),
|
|
1041
|
-
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' : '') },
|
|
1042
|
-
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')) }))) }),
|
|
1043
|
-
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' : '') },
|
|
1044
|
-
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')) }))) })),
|
|
1045
|
-
React__default.createElement(Controller, { control: control, name: "head", render: ({ field: { onChange, value }, fieldState: { error } }) => (React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.headCircumference') },
|
|
1046
|
-
React__default.createElement(Box, { className: cx(isEmptyThreeFields || (error === null || error === void 0 ? void 0 : error.message) ? 'error' : '') },
|
|
1047
|
-
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')) })))) }),
|
|
1048
|
-
React__default.createElement(Controller, { control: control, name: "measurementDate", render: ({ field: { onChange } }) => (React__default.createElement(HealthToolFormWrapper.BorderInlineControl, { label: t('babyGrowth.input.measurementDate') },
|
|
1049
|
-
React__default.createElement(DatePicker, Object.assign({}, commonDateProps, { defaultValue: new Date(), onChange: onChange, maxDate: new Date() })))) }),
|
|
1050
|
-
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'))));
|
|
1051
|
-
};
|
|
1052
|
-
|
|
1053
858
|
/**
|
|
1054
859
|
* Using {@link Intl.NumberFormat} to covert a number to string base on its locale
|
|
1055
860
|
* @param {number} num - Number to convert
|
|
@@ -1083,43 +888,104 @@ const bmiCalculate = (height = 0, weight = 0) => {
|
|
|
1083
888
|
return 0;
|
|
1084
889
|
};
|
|
1085
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
|
+
|
|
1086
955
|
const BabyGrowthForm = (_a) => {
|
|
1087
|
-
var { onSubmit,
|
|
1088
|
-
const
|
|
1089
|
-
const
|
|
1090
|
-
|
|
1091
|
-
const { control, setValue, watch, handleSubmit, formState: { isSubmitted }, } = useForm({
|
|
1092
|
-
resolver: yupResolver(schema),
|
|
1093
|
-
mode: 'onSubmit',
|
|
1094
|
-
defaultValues: {
|
|
1095
|
-
name: '',
|
|
1096
|
-
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: {
|
|
1097
960
|
measurementDate: new Date(),
|
|
1098
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
|
+
},
|
|
1099
982
|
});
|
|
1100
|
-
const
|
|
1101
|
-
const height = watch('height');
|
|
1102
|
-
const head = watch('head');
|
|
1103
|
-
const isEmptyThreeFields = useMemo(() => isSubmitted && !weight && !height && !head, [isSubmitted, weight, height, head]);
|
|
1104
|
-
useEffect(() => {
|
|
1105
|
-
const bmi = bmiCalculate(height, weight);
|
|
1106
|
-
setValue('bmi', String(bmi) || '0');
|
|
1107
|
-
}, [weight, height]);
|
|
1108
|
-
const currentUrl = useMemo(() => {
|
|
1109
|
-
if (typeof window !== 'undefined') {
|
|
1110
|
-
return window.location.href;
|
|
1111
|
-
}
|
|
1112
|
-
else
|
|
1113
|
-
return '';
|
|
1114
|
-
}, []);
|
|
1115
|
-
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);
|
|
1116
984
|
return (React__default.createElement(BabyGrowthFormContext.Provider, { value: {
|
|
1117
|
-
isEmptyThreeFields,
|
|
1118
|
-
control,
|
|
1119
|
-
currentUrl,
|
|
1120
|
-
siteType,
|
|
1121
985
|
submitProps,
|
|
986
|
+
currentUrl,
|
|
987
|
+
form,
|
|
1122
988
|
} }, formLayout === 'default' ? (React__default.createElement(DefaultForm, Object.assign({}, commonProps))) : (React__default.createElement(InlineForm, Object.assign({}, commonProps)))));
|
|
1123
989
|
};
|
|
1124
990
|
|
|
1125
|
-
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 };
|