@hhgtech/hhg-components 1.29.88 → 1.29.90
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/{LastPeriod-235fc10e.js → LastPeriod-5e6d2274.js} +1 -1
- package/build/MobileBottomNavigationIcon-3103ca02.js +193 -0
- package/build/{WhatsApp-e6406d8d.js → WhatsApp-21d7b616.js} +1 -1
- package/build/adapters.js +18 -16
- package/build/atoms.js +47 -45
- package/build/babyGrowth.js +82 -80
- package/build/cache.js +2 -2
- package/build/care.js +28 -25
- package/build/careBookingSearchBar.js +1594 -0
- package/build/careBookingSearchBarV2.js +1665 -0
- package/build/components/molecules/popup/index.d.ts +2 -1
- package/build/components.js +125 -115
- package/build/{constants-2d046b25.js → constants-8abd9991.js} +1 -1
- package/build/constants.js +3 -3
- package/build/constantsDomainLocales.js +1 -1
- package/build/constantsRiskScreener.js +2 -2
- package/build/constantsSite.js +2 -2
- package/build/{core-ab09e68b.js → core-e12ff855.js} +1 -1
- package/build/{dataTransform-945e5f4f.js → dataTransform-27a22c74.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/editor-e761dc49.js +986 -0
- package/build/embeddedHeathToolCards_babyGrowth.js +22 -20
- package/build/embeddedHeathToolCards_babyPoop.js +18 -16
- package/build/embeddedHeathToolCards_babyVaccine.js +21 -19
- package/build/embeddedHeathToolCards_bmi_bmi.js +25 -23
- package/build/embeddedHeathToolCards_bmrBmr.js +25 -23
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +21 -19
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +21 -19
- package/build/embeddedHeathToolCards_pwg_pwg.js +26 -24
- package/build/embeddedHeathToolCards_targetHeartRate.js +27 -25
- package/build/esm/{LastPeriod-fcd2b5ec.js → LastPeriod-cd2e1a56.js} +1 -1
- package/build/esm/MobileBottomNavigationIcon-cfcb7894.js +185 -0
- package/build/esm/{WhatsApp-2f54ed26.js → WhatsApp-6e473416.js} +1 -1
- package/build/esm/adapters.js +18 -16
- package/build/esm/atoms.js +44 -42
- package/build/esm/babyGrowth.js +82 -80
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +26 -23
- package/build/esm/careBookingSearchBar.js +1582 -0
- package/build/esm/careBookingSearchBarV2.js +1655 -0
- package/build/esm/components/molecules/popup/index.d.ts +2 -1
- package/build/esm/components.js +93 -83
- package/build/esm/{constants-b68073ea.js → constants-6409f351.js} +1 -1
- package/build/esm/constants.js +3 -3
- package/build/esm/constantsDomainLocales.js +1 -1
- package/build/esm/constantsRiskScreener.js +2 -2
- package/build/esm/constantsSite.js +2 -2
- package/build/esm/{core-bcdf3422.js → core-f2306660.js} +1 -1
- package/build/esm/{dataTransform-c3905a10.js → dataTransform-7074431d.js} +2 -2
- package/build/esm/ecom.js +4 -4
- package/build/esm/editor-f1c53093.js +959 -0
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +22 -20
- package/build/esm/embeddedHeathToolCards_babyPoop.js +18 -16
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +21 -19
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -23
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -23
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +21 -19
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +21 -19
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -24
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -25
- package/build/esm/{fixedBottomAdBlock-bb1a3c50.js → fixedBottomAdBlock-3d6bb6ed.js} +26 -662
- package/build/esm/footer.js +20 -18
- package/build/esm/gAssets.js +2 -2
- package/build/esm/healthToolsCardWrapper.js +17 -15
- package/build/esm/healthToolsForm.js +33 -31
- package/build/esm/hooks.js +15 -15
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-2b20b8ce.js → index-00949e45.js} +2 -2
- package/build/esm/{index-7ab1ac4c.js → index-011e1a41.js} +2 -2
- package/build/esm/{index-e84f16f3.js → index-050b8644.js} +3 -142
- package/build/esm/{index-a7bfcfbd.js → index-0ad45a17.js} +6 -6
- package/build/esm/{index-48fdf51c.js → index-1065c7d0.js} +16 -15
- package/build/esm/{index-b927d85a.js → index-1778704d.js} +12 -11
- package/build/esm/{index-c0790cdc.js → index-1ba53d6c.js} +20 -17
- package/build/esm/{index-a2704991.js → index-21c80677.js} +16 -88
- package/build/esm/{index-8570e132.js → index-296a1099.js} +2 -2
- package/build/esm/index-2f30d1dd.js +860 -0
- package/build/esm/index-3367898a.js +1264 -0
- package/build/esm/{index-11bc6557.js → index-391aad5b.js} +3 -3
- package/build/esm/{index-63d30402.js → index-405b11d3.js} +16 -15
- package/build/esm/{index-d3c3615e.js → index-42286f3e.js} +2 -2
- package/build/esm/{index-1f944c2d.js → index-44ced5ce.js} +5 -5
- package/build/esm/{index-140ea208.js → index-4d512cd9.js} +17 -16
- package/build/esm/{index-2f06b1d8.js → index-51179764.js} +1 -1
- package/build/esm/{index-fcf9a2ce.js → index-52f07e54.js} +14 -13
- package/build/esm/{index-b4cab951.js → index-54d714a2.js} +16 -15
- package/build/esm/index-5bd382e3.js +281 -0
- package/build/esm/{index-7d97103f.js → index-5d2f2783.js} +2 -2
- package/build/esm/{index-d10d5d1f.js → index-5f04e701.js} +4 -4
- package/build/esm/{index-04146795.js → index-670afcce.js} +5 -3
- package/build/esm/{index-17115a3b.js → index-6ce0d042.js} +15 -14
- package/build/esm/{index-e5797070.js → index-6ebc4e40.js} +3 -3
- package/build/esm/{index-fbe76c43.js → index-714d2892.js} +7 -6
- package/build/esm/{index-efdc151c.js → index-75811f98.js} +12 -11
- package/build/esm/{index-321f0612.js → index-78cb9c0e.js} +1 -1
- package/build/esm/{index-19a9a60d.js → index-7a3ac1f6.js} +1 -1
- package/build/esm/{index-29676661.js → index-8002ffd2.js} +6 -6
- package/build/esm/index-82b481bf.js +468 -0
- package/build/esm/{index-83ab0594.js → index-83dba9e4.js} +35 -800
- package/build/esm/{index-f42f0c66.js → index-918a026b.js} +2 -2
- package/build/esm/{index-67603e6c.js → index-9197f143.js} +15 -14
- package/build/esm/{index-69c631bf.js → index-9c7493b6.js} +12 -11
- package/build/esm/{index-2292c1f3.js → index-a0d47b03.js} +2 -2
- package/build/esm/{index-0cf91429.js → index-a134d156.js} +1 -1
- package/build/esm/index-a8b7284e.js +144 -0
- package/build/esm/{index-05075062.js → index-b013dd09.js} +1 -1
- package/build/esm/{index-9a0b3bcd.js → index-b266ccec.js} +7 -7
- package/build/esm/{index-4e92aaf2.js → index-b4efb261.js} +3 -3
- package/build/esm/{index-ef2b1e44.js → index-b87e6e0b.js} +6 -6
- package/build/esm/{index-0e0f3ac6.js → index-ba8e6508.js} +1 -1
- package/build/esm/{index-5303fcd9.js → index-bda0913e.js} +2 -2
- package/build/esm/{index-58ed669e.js → index-c2e1fb70.js} +23 -19
- package/build/esm/{index-b23b0c82.js → index-c8368a30.js} +14 -13
- package/build/esm/{index-877a46df.js → index-cb4b219f.js} +2 -2
- package/build/esm/index-d034201a.js +22 -0
- package/build/esm/{index-69ca7b6a.js → index-d5543323.js} +2 -2
- package/build/esm/index-d66bd239.js +1030 -0
- package/build/esm/{index-155daac5.js → index-da92eee1.js} +2 -2
- package/build/esm/{index-a715b700.js → index-e63aadb3.js} +15 -14
- package/build/esm/{index-5a81cbdd.js → index-e7128232.js} +1 -1
- package/build/esm/{index-58982ea1.js → index-ec003775.js} +3 -3
- package/build/esm/{index-cde1edae.js → index-f0dc90df.js} +21 -19
- package/build/esm/{index-478546e8.js → index-f8cc91fb.js} +12 -11
- package/build/esm/index.js +118 -98
- package/build/esm/index.styles-793c0b30.js +62 -0
- package/build/esm/interfaces/types/Subot.d.ts +3 -3
- package/build/esm/{labelSorting-db27bdad.js → labelSorting-feaa24fb.js} +4 -4
- package/build/esm/lead.js +22 -20
- package/build/esm/{logoIcon-6ed45e55.js → logoIcon-fbc8e7a1.js} +2 -2
- package/build/esm/mantine.js +24 -22
- package/build/esm/misc.js +18 -18
- package/build/esm/miscGetDynamicHealthTool.js +7 -7
- package/build/esm/miscGetSocialList.js +8 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +19 -0
- package/build/esm/mobileBottomNavigationIcon.js +10 -0
- package/build/esm/molecules.js +71 -64
- package/build/esm/moleculesArticleCard.js +85 -0
- package/build/esm/moleculesArticleCardV2.js +171 -0
- package/build/esm/navigation.js +40 -35
- package/build/esm/navigationLogoutPopup.js +116 -0
- package/build/esm/navigationProfileButton.js +43 -0
- package/build/esm/{normalizeLink-fcd22117.js → normalizeLink-136a636d.js} +1 -1
- package/build/esm/onboardingV2.js +27 -25
- package/build/esm/organisms.js +46 -41
- package/build/esm/post-203760fe.js +267 -0
- package/build/esm/profileNavigation.js +441 -0
- package/build/esm/progressBar.js +250 -0
- package/build/esm/pwg.js +21 -19
- package/build/esm/{routing-ed745cc6.js → routing-e57320c2.js} +1 -1
- package/build/esm/subot.js +29 -27
- package/build/esm/surveyOrPremiumBanner.js +30 -28
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-6fc9a327.js → surveyThankyouCard-5a060837.js} +5 -5
- package/build/esm/together/components/molecules/popupFrame/index.d.ts +2 -1
- package/build/esm/together.js +53 -44
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +29 -26
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +56 -47
- package/build/esm/togetherMoleculesCardAuthor.js +41 -0
- package/build/esm/togetherMoleculesPostImagePreview.js +21 -0
- package/build/esm/togetherMoleculesProfileDetail.js +53 -0
- package/build/esm/togetherOrganisms.js +53 -44
- package/build/esm/togetherRichTextEditor.js +27 -0
- package/build/esm/togetherShareBox.js +305 -0
- package/build/esm/{treePopoverMenu-937ef815.js → treePopoverMenu-7845b5c1.js} +18 -17
- package/build/esm/types-5f680f53.js +44 -0
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-d239339f.js → useCategory-c847c3ee.js} +5 -5
- package/build/esm/{useHealthToolCache-e6e0e96c.js → useHealthToolCache-41375a2b.js} +1 -1
- package/build/esm/{useMantineLocale-2ece6eac.js → useMantineLocale-bef42461.js} +5 -5
- package/build/esm/{usePlacesAutocomplete-ecf31643.js → usePlacesAutocomplete-44a9e05c.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +4 -4
- package/build/esm/{useTranslations-160e66cc.js → useTranslations-9767b0ea.js} +1 -1
- package/build/esm/utils-7871047f.js +206 -0
- package/build/esm/{utils-3d9043fb.js → utils-8a1ccf09.js} +4 -4
- package/build/esm/{utils-d78e02e6.js → utils-c1678a05.js} +2 -2
- package/build/esm/vaccination.js +20 -18
- package/build/{fixedBottomAdBlock-87988744.js → fixedBottomAdBlock-bfdbc0df.js} +49 -691
- package/build/footer.js +20 -18
- package/build/gAssets.js +2 -2
- package/build/healthToolsCardWrapper.js +17 -15
- package/build/healthToolsForm.js +33 -31
- package/build/hooks.js +15 -15
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-c016b1bb.js → index-133544cd.js} +14 -13
- package/build/index-137b351f.js +1045 -0
- package/build/{index-92815934.js → index-190832cb.js} +5 -5
- package/build/{index-0772398f.js → index-1b1ac8fe.js} +1 -1
- package/build/{index-a6acde43.js → index-2089929b.js} +38 -34
- package/build/{index-f8a51099.js → index-2c23680e.js} +2 -2
- package/build/index-2d391b09.js +151 -0
- package/build/{index-b040447b.js → index-2f31063d.js} +2 -2
- package/build/{index-d9559ac1.js → index-31045247.js} +2 -2
- package/build/{index-e4004288.js → index-330e16a8.js} +2 -2
- package/build/{index-b8620e16.js → index-3c6a1bfc.js} +2 -2
- package/build/{index-e7b871b4.js → index-3f49c41e.js} +3 -143
- package/build/index-4b1b3672.js +478 -0
- package/build/{index-4a6c95fe.js → index-5209298d.js} +12 -11
- package/build/index-5cc887da.js +870 -0
- package/build/{index-a97a7a53.js → index-5e1337b4.js} +31 -29
- package/build/{index-2de1a14d.js → index-6266a5df.js} +2 -2
- package/build/{index-f3553904.js → index-62f912e0.js} +9 -8
- package/build/{index-84e8b355.js → index-63f2aaa5.js} +15 -14
- package/build/{index-9f995309.js → index-65eb73e7.js} +34 -31
- package/build/{index-6c2d2f25.js → index-67fa5818.js} +24 -99
- package/build/index-69cd0b40.js +1307 -0
- package/build/{index-d39f2445.js → index-6cda2bed.js} +4 -4
- package/build/{index-9add51eb.js → index-74869e06.js} +3 -3
- package/build/{index-227e17fd.js → index-7b74a414.js} +2 -2
- package/build/{index-6ce119f5.js → index-7b8badf9.js} +2 -2
- package/build/{index-bac0bd08.js → index-7dfa541c.js} +3 -3
- package/build/{index-519a6287.js → index-81dcaeb1.js} +12 -11
- package/build/{index-5ddda8f4.js → index-82577dcf.js} +16 -15
- package/build/{index-f05721a0.js → index-870325c1.js} +7 -7
- package/build/{index-a136cba7.js → index-87d6e499.js} +6 -6
- package/build/{index-554ad68c.js → index-8ce24abd.js} +1 -1
- package/build/{index-03834ac7.js → index-8e2a718b.js} +3 -3
- package/build/{index-347a91f6.js → index-930f87f9.js} +1 -1
- package/build/{index-ae03f378.js → index-96e9edfa.js} +16 -15
- package/build/{index-196d4981.js → index-9ca1658b.js} +1 -1
- package/build/{index-8b8263ed.js → index-a0dd7ee6.js} +34 -33
- package/build/{index-c294ccc2.js → index-a94d3a6e.js} +3 -3
- package/build/{index-a688f865.js → index-ae4a2ce9.js} +12 -11
- package/build/{index-1489f027.js → index-b1181a62.js} +3 -3
- package/build/{index-1245ea43.js → index-b74f6d6c.js} +12 -11
- package/build/{index-7ca746d3.js → index-bee8ec72.js} +15 -14
- package/build/index-c0960783.js +289 -0
- package/build/{index-6313ec6f.js → index-c7bc83de.js} +6 -6
- package/build/{index-4dc41ef1.js → index-d414e4f7.js} +5 -3
- package/build/{index-1ebaa446.js → index-e23391ca.js} +16 -15
- package/build/{index-fcf16e35.js → index-e48cde73.js} +2 -2
- package/build/{index-9cc21262.js → index-f00131bf.js} +1 -1
- package/build/{index-7e8732ae.js → index-f0c0316f.js} +1 -1
- package/build/index-f373b62b.js +29 -0
- package/build/{index-66b34bd9.js → index-f477fee8.js} +96 -864
- package/build/{index-5006f129.js → index-f4bd7dd9.js} +6 -6
- package/build/{index-f3f648e1.js → index-f4c71c79.js} +17 -16
- package/build/{index-7024d536.js → index-f7918c25.js} +15 -14
- package/build/{index-9e92431c.js → index-f9aee5dd.js} +2 -2
- package/build/{index-92e82d0d.js → index-fa8957ac.js} +1 -1
- package/build/index.js +182 -162
- package/build/index.styles-07f26519.js +65 -0
- package/build/interfaces/types/Subot.d.ts +3 -3
- package/build/{labelSorting-60b0f16a.js → labelSorting-2d65cd86.js} +4 -4
- package/build/lead.js +22 -20
- package/build/{logoIcon-8e1ff0aa.js → logoIcon-026665b4.js} +2 -2
- package/build/mantine.js +20 -18
- package/build/misc.js +18 -18
- package/build/miscGetDynamicHealthTool.js +7 -7
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +27 -0
- package/build/mobileBottomNavigationIcon.js +18 -0
- package/build/molecules.js +76 -69
- package/build/moleculesArticleCard.js +93 -0
- package/build/moleculesArticleCardV2.js +180 -0
- package/build/navigation.js +40 -35
- package/build/navigationLogoutPopup.js +125 -0
- package/build/navigationProfileButton.js +51 -0
- package/build/onboardingV2.js +29 -27
- package/build/organisms.js +49 -44
- package/build/post-0759bdca.js +303 -0
- package/build/profileNavigation.js +450 -0
- package/build/progressBar.js +260 -0
- package/build/pwg.js +21 -19
- package/build/{routing-d764168d.js → routing-7ba14d2a.js} +1 -1
- package/build/subot.js +28 -26
- package/build/surveyOrPremiumBanner.js +30 -28
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-944ab001.js → surveyThankyouCard-6a2454d1.js} +5 -5
- package/build/together/components/molecules/popupFrame/index.d.ts +2 -1
- package/build/together.js +77 -68
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +29 -26
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +79 -70
- package/build/togetherMoleculesCardAuthor.js +49 -0
- package/build/togetherMoleculesPostImagePreview.js +29 -0
- package/build/togetherMoleculesProfileDetail.js +70 -0
- package/build/togetherOrganisms.js +53 -44
- package/build/togetherRichTextEditor.js +36 -0
- package/build/togetherShareBox.js +314 -0
- package/build/{treePopoverMenu-0cbe3fd0.js → treePopoverMenu-86c7db6d.js} +18 -17
- package/build/types-20cc07c9.js +52 -0
- package/build/types.js +2 -2
- package/build/{useCategory-32558796.js → useCategory-0f8c9201.js} +5 -5
- package/build/{useHealthToolCache-cbe4b1b4.js → useHealthToolCache-c0468424.js} +1 -1
- package/build/{useMantineLocale-992ae094.js → useMantineLocale-b8eca90b.js} +5 -5
- package/build/{usePlacesAutocomplete-c19d396b.js → usePlacesAutocomplete-1d139be6.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +4 -4
- package/build/{useTranslations-5d28e8df.js → useTranslations-4fb7a5ac.js} +1 -1
- package/build/{utils-d3353e9c.js → utils-14192273.js} +2 -2
- package/build/{utils-1a876a51.js → utils-1b9bc7e0.js} +3 -3
- package/build/utils-a4f75f1f.js +229 -0
- package/build/vaccination.js +24 -22
- package/package.json +1 -1
- package/build/esm/index-c7b92115.js +0 -5060
- package/build/esm/types-f387cdcf.js +0 -3433
- package/build/index-2ce324cf.js +0 -5123
- package/build/types-d798cef3.js +0 -3447
- /package/build/{BMI_BOYS.percentile.monthly-2fdec618.js → BMI_BOYS.percentile.monthly-b372ea44.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-4b1616c4.js → BMI_BOYS.percentile.weekly-74d9aa42.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-f7761749.js → BMI_BOYS.percentile.yearly-8983c077.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-6767b0d4.js → BMI_BOYS.zscore.monthly-87a6a1a1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-5c57342b.js → BMI_BOYS.zscore.weekly-943afdf9.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-d970734e.js → BMI_BOYS.zscore.yearly-b60dee5d.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-ba4d972d.js → BMI_GIRLS.percentile.monthly-a92a2367.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-f73dacf3.js → BMI_GIRLS.percentile.weekly-81e2a447.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-a5b59a8c.js → BMI_GIRLS.percentile.yearly-aec7fe9d.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-110d6823.js → BMI_GIRLS.zscore.monthly-a6183959.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-cfe97ba9.js → BMI_GIRLS.zscore.weekly-0bc8803a.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-ab4ae640.js → BMI_GIRLS.zscore.yearly-a3098165.js} +0 -0
- /package/build/{ChevronDown-d37704eb.js → ChevronDown-c29d0fb5.js} +0 -0
- /package/build/{Close-1514c815.js → Close-b7d67405.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-6c797045.js → HEAD CIRCUM_BOYS.percentile.monthly-d4fabdf2.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-7ac501c0.js → HEAD CIRCUM_BOYS.percentile.weekly-32cbc60f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-2999cdb8.js → HEAD CIRCUM_BOYS.percentile.yearly-a37b8f8a.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-7e3a78aa.js → HEAD CIRCUM_BOYS.zscore.monthly-c3f7634f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-2ea72789.js → HEAD CIRCUM_BOYS.zscore.weekly-71ccd3df.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-826ab425.js → HEAD CIRCUM_BOYS.zscore.yearly-a49605c2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-0f1636c1.js → HEAD CIRCUM_GIRLS.percentile.monthly-68c5f17b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-b32da590.js → HEAD CIRCUM_GIRLS.percentile.weekly-09ab91dc.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-850c4e29.js → HEAD CIRCUM_GIRLS.percentile.yearly-f33be7ba.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-f942b53a.js → HEAD CIRCUM_GIRLS.zscore.monthly-283c0ef7.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-26daad32.js → HEAD CIRCUM_GIRLS.zscore.weekly-1feda657.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-0f331108.js → HEAD CIRCUM_GIRLS.zscore.yearly-bcba4238.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-6bfc3799.js → HEIGHT_BOYS.percentile.monthly-977b0b64.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-0ed4b053.js → HEIGHT_BOYS.percentile.weekly-ff1b517f.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-cc4c343d.js → HEIGHT_BOYS.percentile.yearly-e0ed022d.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-b2d384dc.js → HEIGHT_BOYS.zscore.monthly-397f6aa4.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-b65aa792.js → HEIGHT_BOYS.zscore.weekly-dccfdd52.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-0bae3840.js → HEIGHT_BOYS.zscore.yearly-76500a0f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-34960fd2.js → HEIGHT_GIRLS.percentile.monthly-3a7aef92.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-949ca5b1.js → HEIGHT_GIRLS.percentile.weekly-99e3c1c3.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-4c40b714.js → HEIGHT_GIRLS.percentile.yearly-9f01d7d1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-a3856728.js → HEIGHT_GIRLS.zscore.monthly-973ae30d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-b39f321f.js → HEIGHT_GIRLS.zscore.weekly-18ae768b.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-f50c6d58.js → HEIGHT_GIRLS.zscore.yearly-dc42b61a.js} +0 -0
- /package/build/{Locale-e3b7ae56.js → Locale-e697d040.js} +0 -0
- /package/build/{Visible-c6736a66.js → Visible-8c2b5ab1.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-685aabfc.js → WEIGHT_BOYS.percentile.monthly-3f17ac1f.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-3c1a6d2f.js → WEIGHT_BOYS.percentile.weekly-8f2ebf77.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-2bd65c8f.js → WEIGHT_BOYS.percentile.yearly-a9eff519.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-bba8cd92.js → WEIGHT_BOYS.zscore.monthly-a108db0c.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-7bdc0673.js → WEIGHT_BOYS.zscore.weekly-e21f46c5.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-32f635e0.js → WEIGHT_BOYS.zscore.yearly-1309493f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-ad305e84.js → WEIGHT_GIRLS.percentile.monthly-e6ad9d1e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-92e552b6.js → WEIGHT_GIRLS.percentile.weekly-15e2f043.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-df0dd71c.js → WEIGHT_GIRLS.percentile.yearly-788c6b1a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-8820671b.js → WEIGHT_GIRLS.zscore.monthly-ad9bc118.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-31d29b05.js → WEIGHT_GIRLS.zscore.weekly-027d92d0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-f731d1e2.js → WEIGHT_GIRLS.zscore.yearly-2f942e3c.js} +0 -0
- /package/build/{animation-b224626d.js → animation-e179e2c5.js} +0 -0
- /package/build/{cart-149e990d.js → cart-bf783c3f.js} +0 -0
- /package/build/{constants-9c314450.js → constants-0f0f1c47.js} +0 -0
- /package/build/{constants-f9eca9ad.js → constants-7d64d5de.js} +0 -0
- /package/build/{constants-42eed92d.js → constants-f4bb9873.js} +0 -0
- /package/build/{dataTransform-104761fc.js → dataTransform-e07ba759.js} +0 -0
- /package/build/{doctor-d8f36158.js → doctor-40ef3864.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-df1b3770.js → BMI_BOYS.percentile.monthly-bc6b17e9.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-1d9595b1.js → BMI_BOYS.percentile.weekly-8daca1b6.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-6bd2bb46.js → BMI_BOYS.percentile.yearly-391e1be2.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-658792d1.js → BMI_BOYS.zscore.monthly-aec29c0d.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-d3c4d378.js → BMI_BOYS.zscore.weekly-1ab0449c.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-8ad375e2.js → BMI_BOYS.zscore.yearly-01a796dd.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-25f98c64.js → BMI_GIRLS.percentile.monthly-259b596a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-d60b034d.js → BMI_GIRLS.percentile.weekly-c383c66f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-0560df43.js → BMI_GIRLS.percentile.yearly-d62c0a28.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-2104651f.js → BMI_GIRLS.zscore.monthly-7625134f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-37757497.js → BMI_GIRLS.zscore.weekly-0e939010.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-56872c59.js → BMI_GIRLS.zscore.yearly-a63cf9c5.js} +0 -0
- /package/build/esm/{ChevronDown-5633c5e8.js → ChevronDown-47009d66.js} +0 -0
- /package/build/esm/{Close-f541a904.js → Close-7ace7512.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-47e6539d.js → HEAD CIRCUM_BOYS.percentile.monthly-3a2beeac.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-594e065d.js → HEAD CIRCUM_BOYS.percentile.weekly-74d61bf1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-d24f1cc6.js → HEAD CIRCUM_BOYS.percentile.yearly-f13c493e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-94d82cb5.js → HEAD CIRCUM_BOYS.zscore.monthly-205ba143.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-cb0109d0.js → HEAD CIRCUM_BOYS.zscore.weekly-1e22609d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-79a794c9.js → HEAD CIRCUM_BOYS.zscore.yearly-07a6cd70.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-89615b43.js → HEAD CIRCUM_GIRLS.percentile.monthly-6843b424.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-29d9184f.js → HEAD CIRCUM_GIRLS.percentile.weekly-0602fcca.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-140da49d.js → HEAD CIRCUM_GIRLS.percentile.yearly-c47a7e80.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-fe41d0e8.js → HEAD CIRCUM_GIRLS.zscore.monthly-35359b2d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-c6193e75.js → HEAD CIRCUM_GIRLS.zscore.weekly-e60d4541.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-7018fed4.js → HEAD CIRCUM_GIRLS.zscore.yearly-776abe04.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-fae5e6a0.js → HEIGHT_BOYS.percentile.monthly-72427471.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-ddc33aee.js → HEIGHT_BOYS.percentile.weekly-9002aef8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-9e3064f0.js → HEIGHT_BOYS.percentile.yearly-57e7b44e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-7c9e0bb8.js → HEIGHT_BOYS.zscore.monthly-e38229ab.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-50b0a6a0.js → HEIGHT_BOYS.zscore.weekly-0de1c25b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-afb6c4a2.js → HEIGHT_BOYS.zscore.yearly-79fd59a0.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-5c7487f0.js → HEIGHT_GIRLS.percentile.monthly-4b85547a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-33465e14.js → HEIGHT_GIRLS.percentile.weekly-c56f6c67.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ae62b279.js → HEIGHT_GIRLS.percentile.yearly-0ab407d8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-fd13c492.js → HEIGHT_GIRLS.zscore.monthly-bc1b72b1.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-f509ffbe.js → HEIGHT_GIRLS.zscore.weekly-ad1be5c9.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-bf3a867b.js → HEIGHT_GIRLS.zscore.yearly-f66a912e.js} +0 -0
- /package/build/esm/{Locale-81beb37e.js → Locale-ecfc005f.js} +0 -0
- /package/build/esm/{Visible-3d8c22f1.js → Visible-6cf48849.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-4db4c32c.js → WEIGHT_BOYS.percentile.monthly-c6ff1c19.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-5321689a.js → WEIGHT_BOYS.percentile.weekly-4da177a7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-0c2aee80.js → WEIGHT_BOYS.percentile.yearly-9dd4d8d7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-ddf307e5.js → WEIGHT_BOYS.zscore.monthly-824c2f6d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-be1d57ac.js → WEIGHT_BOYS.zscore.weekly-d20f3e4a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-6dab88ff.js → WEIGHT_BOYS.zscore.yearly-727beeda.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-a666fe8a.js → WEIGHT_GIRLS.percentile.monthly-a2813cfb.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-cd85042c.js → WEIGHT_GIRLS.percentile.weekly-5f11b917.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-f22705ec.js → WEIGHT_GIRLS.percentile.yearly-50e69a87.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-9f3f1083.js → WEIGHT_GIRLS.zscore.monthly-401c7b03.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-7dcf0ba5.js → WEIGHT_GIRLS.zscore.weekly-c8c05886.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-c658040c.js → WEIGHT_GIRLS.zscore.yearly-95f19286.js} +0 -0
- /package/build/esm/{animation-db89f033.js → animation-e6680d35.js} +0 -0
- /package/build/esm/{cart-47013af9.js → cart-bf2cc2ab.js} +0 -0
- /package/build/esm/{constants-f9614464.js → constants-7628355c.js} +0 -0
- /package/build/esm/{constants-247d5eb0.js → constants-785ee28c.js} +0 -0
- /package/build/esm/{constants-410be40f.js → constants-ce2232f9.js} +0 -0
- /package/build/esm/{dataTransform-f9e5b4ec.js → dataTransform-65f0e010.js} +0 -0
- /package/build/esm/{doctor-88e78d2c.js → doctor-e9dc9ff4.js} +0 -0
- /package/build/esm/{index-fcd9b927.js → index-0b230567.js} +0 -0
- /package/build/esm/{index-5f214b71.js → index-46c00291.js} +0 -0
- /package/build/esm/{index-6dd5a329.js → index-92017dfa.js} +0 -0
- /package/build/esm/{index-907fffe6.js → index-c1527254.js} +0 -0
- /package/build/esm/{index-24f2f569.js → index-d4eef69b.js} +0 -0
- /package/build/esm/{index-c3d6b2ed.js → index-d531588f.js} +0 -0
- /package/build/esm/{index-0ca51fbb.js → index-efcf28a7.js} +0 -0
- /package/build/esm/{index-6f44d928.js → index-fedbbf85.js} +0 -0
- /package/build/esm/{localizeNumberFormat-be70a31e.js → localizeNumberFormat-636f4afc.js} +0 -0
- /package/build/esm/{number-7e3f376a.js → number-4add588d.js} +0 -0
- /package/build/esm/{other-811b7d93.js → other-f8b0155f.js} +0 -0
- /package/build/esm/{paths-650d5eee.js → paths-8c6b2942.js} +0 -0
- /package/build/esm/{translationsContext-0cbb21e6.js → translationsContext-982b80f4.js} +0 -0
- /package/build/esm/{tslib.es6-3970c414.js → tslib.es6-fd8cab49.js} +0 -0
- /package/build/esm/{types-78bfaf40.js → types-795b39db.js} +0 -0
- /package/build/esm/{useIsInit-3f7af1fd.js → useIsInit-b060587e.js} +0 -0
- /package/build/esm/{useOutsideClick-2fae5fb5.js → useOutsideClick-9dd24b21.js} +0 -0
- /package/build/esm/{useScrollbarSize-2a7e6dd2.js → useScrollbarSize-63b3d369.js} +0 -0
- /package/build/esm/{useUniqueId-d714426d.js → useUniqueId-d61a7b61.js} +0 -0
- /package/build/esm/{utils-cee25689.js → utils-1dbd61fa.js} +0 -0
- /package/build/{index-1d528960.js → index-0e1519d2.js} +0 -0
- /package/build/{index-9f501aac.js → index-3a582f5d.js} +0 -0
- /package/build/{index-20a5cee0.js → index-7a8c6b41.js} +0 -0
- /package/build/{index-41a348a2.js → index-86f9afd6.js} +0 -0
- /package/build/{index-e327613c.js → index-96be5ce0.js} +0 -0
- /package/build/{index-32917720.js → index-b8a5acbb.js} +0 -0
- /package/build/{index-186f9324.js → index-db2b38f4.js} +0 -0
- /package/build/{index-27f25094.js → index-f8017859.js} +0 -0
- /package/build/{localizeNumberFormat-a5804ea2.js → localizeNumberFormat-9697460d.js} +0 -0
- /package/build/{normalizeLink-2878a2ce.js → normalizeLink-3ec047d7.js} +0 -0
- /package/build/{number-35662113.js → number-3ffc7553.js} +0 -0
- /package/build/{other-a7f01b3d.js → other-5c1524b3.js} +0 -0
- /package/build/{paths-488dafd4.js → paths-f15bee7b.js} +0 -0
- /package/build/{translationsContext-951038ad.js → translationsContext-9b528bb0.js} +0 -0
- /package/build/{tslib.es6-145af9ce.js → tslib.es6-5d65f18f.js} +0 -0
- /package/build/{types-aeea2cc2.js → types-4b87fdbb.js} +0 -0
- /package/build/{useIsInit-0c37752a.js → useIsInit-d6139b45.js} +0 -0
- /package/build/{useOutsideClick-aa477d22.js → useOutsideClick-b5ae0665.js} +0 -0
- /package/build/{useScrollbarSize-01b12b72.js → useScrollbarSize-ad6c0522.js} +0 -0
- /package/build/{useUniqueId-17c2097b.js → useUniqueId-5fc9f536.js} +0 -0
- /package/build/{utils-a1cfbdac.js → utils-97ffdcb1.js} +0 -0
|
@@ -0,0 +1,870 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-5d65f18f.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var dayjs = require('dayjs');
|
|
6
|
+
var index$4 = require('./index-67fa5818.js');
|
|
7
|
+
var useTranslations = require('./useTranslations-4fb7a5ac.js');
|
|
8
|
+
var index = require('./index-3c6a1bfc.js');
|
|
9
|
+
var dataTransform = require('./dataTransform-27a22c74.js');
|
|
10
|
+
var togetherApiPaths = require('./togetherApiPaths.js');
|
|
11
|
+
var togetherComponentGlobalContext = require('./utils-1b9bc7e0.js');
|
|
12
|
+
var core$1 = require('@hhgtech/icons/core');
|
|
13
|
+
var core = require('@mantine/core');
|
|
14
|
+
var index$2 = require('./index-0e1519d2.js');
|
|
15
|
+
var index$1 = require('./index-f373b62b.js');
|
|
16
|
+
var togetherMoleculesCardAuthor = require('./index-137b351f.js');
|
|
17
|
+
var index$3 = require('./index-1b1ac8fe.js');
|
|
18
|
+
var miscTheme = require('./miscTheme.js');
|
|
19
|
+
var other = require('@hhgtech/icons/other');
|
|
20
|
+
require('@mantine/dates');
|
|
21
|
+
require('./index-330e16a8.js');
|
|
22
|
+
require('./useMantineLocale-b8eca90b.js');
|
|
23
|
+
var index$6 = require('./index-6266a5df.js');
|
|
24
|
+
var index$5 = require('./index-fa8957ac.js');
|
|
25
|
+
require('./index.styles-07f26519.js');
|
|
26
|
+
require('@mantine/hooks');
|
|
27
|
+
require('./utils-97ffdcb1.js');
|
|
28
|
+
require('./other-5c1524b3.js');
|
|
29
|
+
var styled = require('@emotion/styled');
|
|
30
|
+
var useTogetherAuthRequiredAction = require('./useTogetherAuthRequiredAction.js');
|
|
31
|
+
var post = require('./post-0759bdca.js');
|
|
32
|
+
require('./translationsContext-9b528bb0.js');
|
|
33
|
+
require('string-format');
|
|
34
|
+
|
|
35
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
36
|
+
|
|
37
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
38
|
+
var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
|
|
39
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
40
|
+
|
|
41
|
+
const StyledPostContent = styled__default["default"].div `
|
|
42
|
+
padding: 0.5rem 1rem 1rem;
|
|
43
|
+
line-height: 1.5;
|
|
44
|
+
word-break: break-word;
|
|
45
|
+
.post-content-replying {
|
|
46
|
+
margin-right: 5px;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
display: inline-block;
|
|
49
|
+
&.tag-only {
|
|
50
|
+
margin-right: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
.post-content {
|
|
54
|
+
display: inline;
|
|
55
|
+
white-space: pre-wrap;
|
|
56
|
+
/* > *:first-child, */
|
|
57
|
+
> mention:first-child ~ * {
|
|
58
|
+
&:not(ul),
|
|
59
|
+
&:not(ol) {
|
|
60
|
+
display: inline-block;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
> mention:first-child {
|
|
64
|
+
margin-right: 5px;
|
|
65
|
+
}
|
|
66
|
+
&.has-see-more {
|
|
67
|
+
*:last-child {
|
|
68
|
+
&:not(ul),
|
|
69
|
+
&:not(ol) {
|
|
70
|
+
display: inline;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
img {
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: unset;
|
|
77
|
+
}
|
|
78
|
+
ul,
|
|
79
|
+
ol {
|
|
80
|
+
list-style-position: inside;
|
|
81
|
+
padding-left: 1rem;
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
84
|
+
ol {
|
|
85
|
+
list-style-type: decimal;
|
|
86
|
+
}
|
|
87
|
+
ul {
|
|
88
|
+
list-style-type: disc;
|
|
89
|
+
}
|
|
90
|
+
mention {
|
|
91
|
+
color: ${(props) => props.mentionColor || '#1890ff'};
|
|
92
|
+
padding-right: 4px;
|
|
93
|
+
:hover {
|
|
94
|
+
text-decoration: underline;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
var useStyles = core.createStyles((theme) => {
|
|
101
|
+
return {
|
|
102
|
+
root: {
|
|
103
|
+
mention: {
|
|
104
|
+
color: theme.fn.primaryColor(),
|
|
105
|
+
},
|
|
106
|
+
a: {
|
|
107
|
+
'&,&:visited,&:focus': {
|
|
108
|
+
color: theme.fn.primaryColor(),
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
'.create-post-link': {
|
|
112
|
+
display: 'inline',
|
|
113
|
+
color: theme.fn.primaryColor(),
|
|
114
|
+
cursor: 'pointer',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const PostContent = (_a) => {
|
|
121
|
+
var { trackingCategory, url, className, style, replyingTo, mentionedUser, description: rawDescription, disableShortenContent, mentions = [], maxChars = 1000, hideShowAllBtn, styles, onClickCreatePostLink } = _a, rest = tslib_es6.__rest(_a, ["trackingCategory", "url", "className", "style", "replyingTo", "mentionedUser", "description", "disableShortenContent", "mentions", "maxChars", "hideShowAllBtn", "styles", "onClickCreatePostLink"]);
|
|
122
|
+
const { classes, theme: _theme } = useStyles(undefined,
|
|
123
|
+
// Second argument is responsible for styles api integration
|
|
124
|
+
{ name: 'PostContent', styles });
|
|
125
|
+
const [showAll, setShowAll] = React.useState(false);
|
|
126
|
+
const { t } = useTranslations.useTranslations();
|
|
127
|
+
const { authActionWrapper } = useTogetherAuthRequiredAction.useTogetherAuthRequiredAction();
|
|
128
|
+
const [openPopupExpert, setOpenPopupExpert] = React.useState(false);
|
|
129
|
+
const description = post.decodeMention(post.decodePostUrl(rawDescription || '', 'display'), mentions);
|
|
130
|
+
const { action: { sanitizeFunction }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
131
|
+
const shortenSanitizedContentData = React.useMemo(() => {
|
|
132
|
+
const sanitizedContent = sanitizeFunction(description || '');
|
|
133
|
+
if (disableShortenContent || showAll)
|
|
134
|
+
return {
|
|
135
|
+
showContent: sanitizedContent,
|
|
136
|
+
hasSeeMore: false,
|
|
137
|
+
};
|
|
138
|
+
const firstRound = sanitizedContent.slice(0, maxChars);
|
|
139
|
+
const newLineCompensateLength = maxChars - ((firstRound.match(/<\/div>/g) || []).length - 1) * 27;
|
|
140
|
+
const shortenFirstRound = (firstRound || '').slice(0, newLineCompensateLength < 40 ? 40 : newLineCompensateLength);
|
|
141
|
+
// remove < if we cut off right before start of a new html tag
|
|
142
|
+
const secondRound = sanitizeFunction(shortenFirstRound.replace(/(<|<\/)( +|[a-zA-Z]*)$/gi, ''));
|
|
143
|
+
// don't show see more if not much difference
|
|
144
|
+
const hasSeeMore = secondRound.length < sanitizedContent.length - 10;
|
|
145
|
+
return {
|
|
146
|
+
showContent: hasSeeMore ? secondRound : sanitizedContent,
|
|
147
|
+
hasSeeMore,
|
|
148
|
+
};
|
|
149
|
+
}, [disableShortenContent, showAll, description]);
|
|
150
|
+
const replyName = (mentionedUser === null || mentionedUser === void 0 ? void 0 : mentionedUser.name) || replyingTo;
|
|
151
|
+
const hasExpert = (mentionedUser === null || mentionedUser === void 0 ? void 0 : mentionedUser.role) === 'expert' && !!(mentionedUser === null || mentionedUser === void 0 ? void 0 : mentionedUser.partnerId);
|
|
152
|
+
const contentRef = React.useRef(null);
|
|
153
|
+
const handleCreatePostClick = (e) => {
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
onClickCreatePostLink === null || onClickCreatePostLink === void 0 ? void 0 : onClickCreatePostLink();
|
|
156
|
+
};
|
|
157
|
+
React.useEffect(() => {
|
|
158
|
+
var _a;
|
|
159
|
+
(_a = contentRef === null || contentRef === void 0 ? void 0 : contentRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[data-create-post]').forEach((dom) => {
|
|
160
|
+
dom.addEventListener('click', handleCreatePostClick, {
|
|
161
|
+
passive: true,
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
return () => {
|
|
165
|
+
var _a;
|
|
166
|
+
(_a = contentRef === null || contentRef === void 0 ? void 0 : contentRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[data-create-post]').forEach((dom) => {
|
|
167
|
+
dom.removeEventListener('click', handleCreatePostClick, false);
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
}, [disableShortenContent, showAll, description]);
|
|
171
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
172
|
+
hasExpert && (React__default["default"].createElement(togetherMoleculesCardAuthor.PopupExpert, { isOpen: openPopupExpert, onClose: () => setOpenPopupExpert(false), expertId: String(mentionedUser === null || mentionedUser === void 0 ? void 0 : mentionedUser.partnerId) })),
|
|
173
|
+
React__default["default"].createElement(StyledPostContent, Object.assign({ ref: contentRef, className: `${classes.root} ${className} no-replace-click`, style: style, mentionColor: _theme.fn.primaryColor() }, rest),
|
|
174
|
+
replyName && (React__default["default"].createElement(core.Anchor, { onClick: () => hasExpert && setOpenPopupExpert(true), className: "post-content-replying" },
|
|
175
|
+
"@",
|
|
176
|
+
replyName)),
|
|
177
|
+
(rawDescription === null || rawDescription === void 0 ? void 0 : rawDescription.startsWith('[mention+id=')) && (React__default["default"].createElement("span", { className: "post-content-replying tag-only", style: {
|
|
178
|
+
color: _theme.fn.primaryColor(),
|
|
179
|
+
} }, "@")),
|
|
180
|
+
React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
|
|
181
|
+
__html: shortenSanitizedContentData.showContent,
|
|
182
|
+
}, className: `post-content ${shortenSanitizedContentData.hasSeeMore ? 'has-see-more' : ''}` }),
|
|
183
|
+
shortenSanitizedContentData.hasSeeMore && !showAll && (React__default["default"].createElement("span", null,
|
|
184
|
+
`... `,
|
|
185
|
+
!hideShowAllBtn && (React__default["default"].createElement(core.Anchor, Object.assign({ onClick: (e) => {
|
|
186
|
+
e.preventDefault();
|
|
187
|
+
e.stopPropagation();
|
|
188
|
+
authActionWrapper(() => setShowAll(true));
|
|
189
|
+
}, className: "see-more-text" }, (trackingCategory
|
|
190
|
+
? {
|
|
191
|
+
'data-event-category': trackingCategory,
|
|
192
|
+
'data-event-action': 'See More Post Click',
|
|
193
|
+
'data-event-label': url,
|
|
194
|
+
}
|
|
195
|
+
: {})), t('post.seeMore'))))))));
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
var styles$c = {"loading":"PD6nRZX"};
|
|
199
|
+
|
|
200
|
+
const Loading = ({ className, size = 'md' }) => {
|
|
201
|
+
const { t } = useTranslations.useTranslations();
|
|
202
|
+
return (React__default["default"].createElement("div", { className: `${styles$c.loading} ${className}` },
|
|
203
|
+
React__default["default"].createElement(index.Button, { size: size, color: "transparent", isLoading: true }, t('loading'))));
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
var styles$b = {"category":"l5fL1xL","title":"L-aGKo7"};
|
|
207
|
+
|
|
208
|
+
const CategoryText = ({ children, className = '' }) => {
|
|
209
|
+
return React__default["default"].createElement("div", { className: `${styles$b.category} ${className}` }, children);
|
|
210
|
+
};
|
|
211
|
+
const Title = ({ children, className = '' }) => {
|
|
212
|
+
return React__default["default"].createElement("div", { className: `${styles$b.title} ${className}` }, children);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
var styles$a = {"container":"eaR8ATZ","info":"xM-7K0a"};
|
|
216
|
+
|
|
217
|
+
var styles$9 = {"inner":"DZmf3s7"};
|
|
218
|
+
|
|
219
|
+
const Thumbnail = ({ src, defaultSrc = index$2.CommonGAssets.getAssetPath('logo/logomark.png'), ratio = 1, size = 80, radius = 8, alt, className = '', }) => {
|
|
220
|
+
return (React__default["default"].createElement("div", { className: className },
|
|
221
|
+
React__default["default"].createElement("div", { className: styles$9.inner, style: {
|
|
222
|
+
width: `${size}px`,
|
|
223
|
+
height: `${size * ratio}px`,
|
|
224
|
+
borderRadius: `${radius}px`,
|
|
225
|
+
} },
|
|
226
|
+
React__default["default"].createElement(index$1.ImageWrap, { src: src, backupSrc: defaultSrc, alt: alt }))));
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
const CardArticle = ({ category, title, src, children, className = '', }) => {
|
|
230
|
+
return (React__default["default"].createElement("div", { className: `${styles$a.container} ${className}` },
|
|
231
|
+
React__default["default"].createElement(Thumbnail, { src: src }),
|
|
232
|
+
React__default["default"].createElement("div", { className: styles$a.info }, children || (React__default["default"].createElement("div", null,
|
|
233
|
+
category && React__default["default"].createElement(CategoryText, null, category),
|
|
234
|
+
title && React__default["default"].createElement(Title, null, title))))));
|
|
235
|
+
};
|
|
236
|
+
CardArticle.CategoryText = CategoryText;
|
|
237
|
+
CardArticle.Title = Title;
|
|
238
|
+
|
|
239
|
+
const ArticleCard = ({ featureImage, postTitle, author, categories, isReview, className = '', }) => {
|
|
240
|
+
var _a;
|
|
241
|
+
const note = isReview
|
|
242
|
+
? 'Medically reviewed by Jobelle Ann Dela Cruz Bigalbal, MD'
|
|
243
|
+
: 'Written by Jobelle Ann Dela Cruz Bigalbal, MD';
|
|
244
|
+
return (React__default["default"].createElement(CardArticle, { src: featureImage, className: className },
|
|
245
|
+
React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
246
|
+
React__default["default"].createElement(CardArticle.CategoryText, null, (_a = categories === null || categories === void 0 ? void 0 : categories[0]) === null || _a === void 0 ? void 0 : _a.name),
|
|
247
|
+
React__default["default"].createElement(CardArticle.Title, null, postTitle),
|
|
248
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor$1, { avatarProps: Object.assign(Object.assign({}, author), { size: 32 }), subTitle: React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
249
|
+
note,
|
|
250
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor$1.SubDivider, null),
|
|
251
|
+
'Dec 12, 2022') }))));
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
var styles$8 = {"container":"SFSgnOz","header":"Tf3aoVa","heading":"TOt4QXl","headingIcon":"_5XYN1KT","accBodyGroup":"yE-tZRj","accBodyGroupItem":"LXiGuGT","accBodyGroupDesc":"r4rx-6v","subTitle":"XrHh8-C","subIcon":"c5-Yecd","group":"UBj6nWr","groupBody":"_2vptVBd","articleCardLink":"ZPDAwiR","relatedList":"_6wJn-NR","socialItem":"_21XDdFv","mbChevronWrapper":"LSyr3Zo"};
|
|
255
|
+
|
|
256
|
+
const ProfileDetailContext = React.createContext({});
|
|
257
|
+
|
|
258
|
+
const About = ({ className = '' }) => {
|
|
259
|
+
var _a, _b, _c, _d, _e;
|
|
260
|
+
const { t } = useTranslations.useTranslations();
|
|
261
|
+
const { info, isMarryBaby, currentPageUrl } = React.useContext(ProfileDetailContext);
|
|
262
|
+
const authorProps = info === null || info === void 0 ? void 0 : info.data;
|
|
263
|
+
const social = [
|
|
264
|
+
{
|
|
265
|
+
type: index$3.SocialType.LinkedIn,
|
|
266
|
+
icon: index$2.CommonGAssets.getAssetPath('linkedin.svg'),
|
|
267
|
+
url: (_a = info === null || info === void 0 ? void 0 : info.contact) === null || _a === void 0 ? void 0 : _a.linkedin,
|
|
268
|
+
eventAction: 'Doctor Profile - Linkedin',
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
type: index$3.SocialType.Instagram,
|
|
272
|
+
icon: index$2.CommonGAssets.getAssetPath('instagram.svg'),
|
|
273
|
+
url: (_b = info === null || info === void 0 ? void 0 : info.contact) === null || _b === void 0 ? void 0 : _b.instagram,
|
|
274
|
+
eventAction: 'Doctor Profile - Instagram',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
type: index$3.SocialType.Facebook,
|
|
278
|
+
icon: index$2.CommonGAssets.getAssetPath('facebook.svg'),
|
|
279
|
+
url: (_c = info === null || info === void 0 ? void 0 : info.contact) === null || _c === void 0 ? void 0 : _c.facebook,
|
|
280
|
+
eventAction: 'Doctor Profile - Facebook',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
type: index$3.SocialType.Youtube,
|
|
284
|
+
icon: index$2.CommonGAssets.getAssetPath('youtube.svg'),
|
|
285
|
+
url: (_d = info === null || info === void 0 ? void 0 : info.contact) === null || _d === void 0 ? void 0 : _d.youtube,
|
|
286
|
+
eventAction: 'Doctor Profile - Youtube',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
type: index$3.SocialType.Tiktok,
|
|
290
|
+
icon: index$2.CommonGAssets.getAssetPath('tiktok.svg'),
|
|
291
|
+
url: (_e = info === null || info === void 0 ? void 0 : info.contact) === null || _e === void 0 ? void 0 : _e.tiktok,
|
|
292
|
+
eventAction: 'Doctor Profile - TikTok',
|
|
293
|
+
},
|
|
294
|
+
];
|
|
295
|
+
const accProps = [
|
|
296
|
+
...(((info === null || info === void 0 ? void 0 : info.experiences) || []).length > 0
|
|
297
|
+
? [
|
|
298
|
+
{
|
|
299
|
+
key: 'experience',
|
|
300
|
+
heading: t('profilePanel.experience'),
|
|
301
|
+
iconSrc: index$2.CommonGAssets.getAssetPath(isMarryBaby ? 'award-doc-mb.svg' : 'award-doc.svg'),
|
|
302
|
+
eventAction: 'Doctor Experience Click',
|
|
303
|
+
panel: (React__default["default"].createElement("div", { className: styles$8.accBodyGroup }, info === null || info === void 0 ? void 0 : info.experiences.map((i, idx) => (React__default["default"].createElement("div", { className: styles$8.accBodyGroupItem, key: String(idx) },
|
|
304
|
+
React__default["default"].createElement("div", { className: styles$8.accBodyGroupTitle }, i.title),
|
|
305
|
+
React__default["default"].createElement("div", { className: styles$8.accBodyGroupDesc },
|
|
306
|
+
React__default["default"].createElement("p", null, i.organization),
|
|
307
|
+
React__default["default"].createElement("p", null, i.duration))))))),
|
|
308
|
+
},
|
|
309
|
+
]
|
|
310
|
+
: []),
|
|
311
|
+
...(((info === null || info === void 0 ? void 0 : info.educations) || []).length > 0
|
|
312
|
+
? [
|
|
313
|
+
{
|
|
314
|
+
key: 'education',
|
|
315
|
+
heading: t('profilePanel.education'),
|
|
316
|
+
iconSrc: index$2.CommonGAssets.getAssetPath(isMarryBaby ? 'book-mb.svg' : 'book.svg'),
|
|
317
|
+
eventAction: 'Doctor Degree Click',
|
|
318
|
+
panel: (React__default["default"].createElement("div", { className: styles$8.accBodyGroup }, info === null || info === void 0 ? void 0 : info.educations.map((i, idx) => (React__default["default"].createElement("div", { className: styles$8.accBodyGroupItem, key: String(idx) },
|
|
319
|
+
React__default["default"].createElement("div", { className: styles$8.accBodyGroupTitle }, i.schoolName),
|
|
320
|
+
React__default["default"].createElement("div", { className: styles$8.accBodyGroupDesc },
|
|
321
|
+
React__default["default"].createElement("p", null, i.study),
|
|
322
|
+
React__default["default"].createElement("p", null, i.completedYear))))))),
|
|
323
|
+
},
|
|
324
|
+
]
|
|
325
|
+
: []),
|
|
326
|
+
...(((info === null || info === void 0 ? void 0 : info.awards) || []).length > 0
|
|
327
|
+
? [
|
|
328
|
+
{
|
|
329
|
+
key: 'awards',
|
|
330
|
+
heading: t('profilePanel.awards'),
|
|
331
|
+
iconSrc: index$2.CommonGAssets.getAssetPath(isMarryBaby ? 'award-mb.svg' : 'award.svg'),
|
|
332
|
+
eventAction: 'Doctor Award Click',
|
|
333
|
+
panel: (React__default["default"].createElement("div", { className: styles$8.accBodyGroup }, info === null || info === void 0 ? void 0 : info.awards.map((i, idx) => (React__default["default"].createElement("div", { className: styles$8.accBodyGroupTitle, key: idx }, i.title))))),
|
|
334
|
+
},
|
|
335
|
+
]
|
|
336
|
+
: []),
|
|
337
|
+
];
|
|
338
|
+
const relatedPost = (info === null || info === void 0 ? void 0 : info.relatedPosts) || [];
|
|
339
|
+
const socialList = social.filter((i) => i.url);
|
|
340
|
+
return (React__default["default"].createElement("div", { className: `${styles$8.container} ${className}`, "data-is-marrybaby": isMarryBaby },
|
|
341
|
+
accProps.length > 0 && (React__default["default"].createElement(core.Accordion, { defaultValue: accProps[0].key, chevron: isMarryBaby ? (React__default["default"].createElement("div", { className: styles$8.mbChevronWrapper },
|
|
342
|
+
React__default["default"].createElement(core$1.Plus, { size: 12, color: miscTheme.theme.mbColors.midGray }))) : (React__default["default"].createElement(core$1.Plus, { color: miscTheme.theme.colors.gray400 })), styles: {
|
|
343
|
+
chevron: {
|
|
344
|
+
'&[data-rotate]': {
|
|
345
|
+
'.minus-path': {
|
|
346
|
+
display: 'block',
|
|
347
|
+
},
|
|
348
|
+
'.plus-path': {
|
|
349
|
+
display: 'none',
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
content: {
|
|
354
|
+
display: 'flex',
|
|
355
|
+
flexDirection: 'column',
|
|
356
|
+
gap: '16px',
|
|
357
|
+
padding: '0',
|
|
358
|
+
},
|
|
359
|
+
item: {
|
|
360
|
+
border: 0,
|
|
361
|
+
},
|
|
362
|
+
control: {
|
|
363
|
+
paddingLeft: 0,
|
|
364
|
+
'&:hover': {
|
|
365
|
+
background: 'transparent',
|
|
366
|
+
},
|
|
367
|
+
'*': {
|
|
368
|
+
pointerEvents: 'none',
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
} }, accProps.map((i) => (React__default["default"].createElement(core.Accordion.Item, { key: i.key, value: i.key },
|
|
372
|
+
React__default["default"].createElement(core.Accordion.Control, { "data-event-category": "Together", "data-event-action": i.eventAction, "data-event-label": currentPageUrl },
|
|
373
|
+
React__default["default"].createElement("div", { className: styles$8.header },
|
|
374
|
+
React__default["default"].createElement("div", { className: styles$8.headingIcon },
|
|
375
|
+
React__default["default"].createElement("img", { src: i.iconSrc, loading: "lazy" })),
|
|
376
|
+
React__default["default"].createElement("div", { className: styles$8.heading }, i.heading))),
|
|
377
|
+
React__default["default"].createElement(core.Accordion.Panel, null, i.panel)))))),
|
|
378
|
+
relatedPost.length > 0 && (React__default["default"].createElement("div", { className: styles$8.group },
|
|
379
|
+
React__default["default"].createElement("div", { className: styles$8.subTitle },
|
|
380
|
+
React__default["default"].createElement("img", { className: styles$8.subIcon, src: index$2.CommonGAssets.getAssetPath(isMarryBaby ? 'mb-logo.svg' : 'logo/circle-solid.svg'), loading: "lazy" }),
|
|
381
|
+
t('profilePanel.publishedArticles')),
|
|
382
|
+
React__default["default"].createElement("div", { className: `${styles$8.relatedList}` }, info === null || info === void 0 ? void 0 : info.relatedPosts.map((i) => (React__default["default"].createElement("a", { key: String(i.id), href: `${window.location.origin}${i === null || i === void 0 ? void 0 : i.permalink}`, className: styles$8.articleCardLink },
|
|
383
|
+
React__default["default"].createElement(ArticleCard, Object.assign({ className: 'article-card' }, Object.assign(Object.assign({}, i), (!i.author && {
|
|
384
|
+
author: {
|
|
385
|
+
displayName: authorProps === null || authorProps === void 0 ? void 0 : authorProps.name,
|
|
386
|
+
avatar: authorProps === null || authorProps === void 0 ? void 0 : authorProps.avatar,
|
|
387
|
+
},
|
|
388
|
+
})), { isReview: true })))))))),
|
|
389
|
+
socialList.length > 0 && (React__default["default"].createElement("div", { className: styles$8.group },
|
|
390
|
+
React__default["default"].createElement("div", { className: styles$8.subTitle },
|
|
391
|
+
React__default["default"].createElement("img", { className: styles$8.subIcon, src: index$2.CommonGAssets.getAssetPath(isMarryBaby ? 'social-mb.svg' : 'social.svg'), loading: "lazy" }),
|
|
392
|
+
t('profilePanel.socialLinks')),
|
|
393
|
+
React__default["default"].createElement("div", { className: styles$8.groupBody },
|
|
394
|
+
React__default["default"].createElement(core.Flex, null, social.map((i, idx) => i.url && (React__default["default"].createElement("div", { className: styles$8.socialItem, key: idx },
|
|
395
|
+
React__default["default"].createElement("a", { href: i.url, target: "_blank", rel: "noreferrer" },
|
|
396
|
+
React__default["default"].createElement("img", { src: i.icon, loading: "lazy", width: "32px", "data-event-category": "Together", "data-event-action": i.eventAction, "data-event-label": currentPageUrl })))))))))));
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
var styles$7 = {"container":"GYUElSy","question":"_3C6QpT1","questionTitle":"_9M9VYL6","community":"_1RuSyv3","questionCard":"_1IG-eEp"};
|
|
400
|
+
|
|
401
|
+
const PostCard$1 = ({ post, className = '' }) => {
|
|
402
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
403
|
+
const { t } = useTranslations.useTranslations();
|
|
404
|
+
const { data: { userInfo, env: { togetherBasePath }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
405
|
+
const { authActionWrapper, authorProps, currentPageUrl } = React.useContext(ProfileDetailContext);
|
|
406
|
+
const postHref = `${window.location.origin}${togetherBasePath}/${(_a = post === null || post === void 0 ? void 0 : post.community) === null || _a === void 0 ? void 0 : _a.slug}/${post === null || post === void 0 ? void 0 : post.slug}/`;
|
|
407
|
+
return (React__default["default"].createElement("div", { className: `${styles$7.container} ${className}` },
|
|
408
|
+
React__default["default"].createElement("div", { className: styles$7.header },
|
|
409
|
+
React__default["default"].createElement("div", { className: styles$7.question },
|
|
410
|
+
t('profilePanel.question'),
|
|
411
|
+
' ',
|
|
412
|
+
React__default["default"].createElement(index$4.Anchor, { className: styles$7.questionTitle, href: "#", onClick: () => {
|
|
413
|
+
if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id)) {
|
|
414
|
+
authActionWrapper === null || authActionWrapper === void 0 ? void 0 : authActionWrapper(() => (window.location.href = postHref));
|
|
415
|
+
}
|
|
416
|
+
} },
|
|
417
|
+
"#", post === null || post === void 0 ? void 0 :
|
|
418
|
+
post.title)),
|
|
419
|
+
React__default["default"].createElement("div", { className: styles$7.community }, (_b = post === null || post === void 0 ? void 0 : post.community) === null || _b === void 0 ? void 0 :
|
|
420
|
+
_b.name,
|
|
421
|
+
" - ", post === null || post === void 0 ? void 0 :
|
|
422
|
+
post.createdTime)),
|
|
423
|
+
React__default["default"].createElement("div", { className: styles$7.questionCard },
|
|
424
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor, Object.assign({ className: "card-author" }, authorProps, { role: "user", avatarIcon: React__default["default"].createElement(other.CrossLogo, null), subLine: React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubTextRow, null,
|
|
425
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubText, null, (_e = (_d = (_c = post === null || post === void 0 ? void 0 : post.expertAnswer) === null || _c === void 0 ? void 0 : _c.answer) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.createdTime)) })),
|
|
426
|
+
React__default["default"].createElement(PostContent, { className: "post-content-wrapper", description: ((_h = (_g = (_f = post === null || post === void 0 ? void 0 : post.expertAnswer) === null || _f === void 0 ? void 0 : _f.answer) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.content) || '',
|
|
427
|
+
// disableShortenContent={disableShortenContent}
|
|
428
|
+
mentions: post === null || post === void 0 ? void 0 : post.mentions, "data-testid": "Content of the Post" })),
|
|
429
|
+
React__default["default"].createElement(index$5.Button, { variant: "secondary", "data-event-category": "Together", "data-event-action": "Doctor Reply Click", "data-event-label": currentPageUrl, size: "md", onClick: () => {
|
|
430
|
+
if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id)) {
|
|
431
|
+
authActionWrapper === null || authActionWrapper === void 0 ? void 0 : authActionWrapper(() => (window.location.href = postHref));
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
window.location.href = postHref;
|
|
435
|
+
}
|
|
436
|
+
} }, t('profilePanel.anserwing.viewFull'))));
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
var styles$6 = {"container":"MrdoES3"};
|
|
440
|
+
|
|
441
|
+
var styles$5 = {"container":"_8fd7YMs","thumb":"DomiQfw","content":"-b2qnfL"};
|
|
442
|
+
|
|
443
|
+
const EmptyMessage = ({ message, buttonTxt, imgSrc, onBtnClick }) => {
|
|
444
|
+
const { siteType, isMarryBaby } = React.useContext(ProfileDetailContext);
|
|
445
|
+
return (React__default["default"].createElement("div", { className: styles$5.container },
|
|
446
|
+
React__default["default"].createElement("div", { className: styles$5.thumb },
|
|
447
|
+
React__default["default"].createElement("img", { src: imgSrc ||
|
|
448
|
+
index$2.CommonGAssets.getAssetPath(isMarryBaby ? 'comments-mb.svg' : 'comments.svg'), loading: "lazy" })),
|
|
449
|
+
message && React__default["default"].createElement("div", { className: styles$5.content }, message),
|
|
450
|
+
buttonTxt && (React__default["default"].createElement(index.Button, { size: "md", theme: siteType, color: "secondary", onClick: onBtnClick }, buttonTxt))));
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
const Answering = ({ id }) => {
|
|
454
|
+
const { t } = useTranslations.useTranslations();
|
|
455
|
+
const { data: { locale }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
456
|
+
const { authorProps } = React.useContext(ProfileDetailContext);
|
|
457
|
+
const [posts, setPosts] = React.useState(null);
|
|
458
|
+
const [loading, setLoading] = React.useState(false);
|
|
459
|
+
React.useEffect(() => {
|
|
460
|
+
id &&
|
|
461
|
+
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
462
|
+
var _a;
|
|
463
|
+
setLoading(true);
|
|
464
|
+
const res = yield togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.USER.LIST_ANSWERS, {
|
|
465
|
+
_locale: locale,
|
|
466
|
+
id,
|
|
467
|
+
}), 'GET');
|
|
468
|
+
const resData = (((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.replies) || []).map(dataTransform.formatPost);
|
|
469
|
+
setPosts(resData);
|
|
470
|
+
setLoading(false);
|
|
471
|
+
}))();
|
|
472
|
+
}, []);
|
|
473
|
+
return (React__default["default"].createElement("div", { className: styles$6.container }, loading ? (React__default["default"].createElement(Loading, null)) : (posts !== null &&
|
|
474
|
+
(posts.length > 0 ? (posts.map((i) => (React__default["default"].createElement(PostCard$1, { className: "post-card", key: i.id, post: i })))) : (React__default["default"].createElement(EmptyMessage, { message: t('profilePanel.emptyPostMess.content', {
|
|
475
|
+
name: (authorProps === null || authorProps === void 0 ? void 0 : authorProps.name) || (authorProps === null || authorProps === void 0 ? void 0 : authorProps.username),
|
|
476
|
+
}) }))))));
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
var styles$4 = {"container":"toEutn7","title":"drdisHs","actions":"scNwTvv","skipBtn":"HNlhOdx"};
|
|
480
|
+
|
|
481
|
+
const QuestionCard = (_a) => {
|
|
482
|
+
var _b, _c, _d, _e;
|
|
483
|
+
var { post } = _a, rest = tslib_es6.__rest(_a, ["post"]);
|
|
484
|
+
const { data: { env: { togetherBasePath }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
485
|
+
// const { showSkipQuestionTag } = useContext(ProfileDetailContext)
|
|
486
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
487
|
+
React__default["default"].createElement("div", Object.assign({}, rest, { className: `${styles$4.container} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}` }),
|
|
488
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor, { className: "card-author", avatar: (_b = post === null || post === void 0 ? void 0 : post.author) === null || _b === void 0 ? void 0 : _b.avatar, name: ((_c = post === null || post === void 0 ? void 0 : post.author) === null || _c === void 0 ? void 0 : _c.name) || ((_d = post === null || post === void 0 ? void 0 : post.author) === null || _d === void 0 ? void 0 : _d.username), isAnonymous: Boolean(post === null || post === void 0 ? void 0 : post.isAnonymous), subLine: React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubTextRow, null,
|
|
489
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubText, null, post === null || post === void 0 ? void 0 : post.createdTime)) }),
|
|
490
|
+
React__default["default"].createElement(index$4.Anchor, { href: `${window.location.origin}${togetherBasePath}/${(_e = post === null || post === void 0 ? void 0 : post.community) === null || _e === void 0 ? void 0 : _e.slug}/${post === null || post === void 0 ? void 0 : post.slug}/`, className: styles$4.title, rel: "noreferrer" }, post === null || post === void 0 ? void 0 : post.title))));
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
var styles$3 = {"accordion":"I-uIJ6E","header":"_41WRsj2","heading":"AcOGL93","headingIcon":"JD3dWJN","panel":"dKAgnS8","chevron":"L2Q9T6m","container":"h-pSmhX"};
|
|
494
|
+
|
|
495
|
+
const Care = () => {
|
|
496
|
+
var _a, _b;
|
|
497
|
+
const { t } = useTranslations.useTranslations();
|
|
498
|
+
const { data: { locale, userInfo }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
499
|
+
const { onSkipQuestion, countValues, setCountValues } = React.useContext(ProfileDetailContext);
|
|
500
|
+
const [questions, setQuestions] = React.useState();
|
|
501
|
+
const [communities, setCommunities] = React.useState([]);
|
|
502
|
+
const [fetchLoading, setFetchLoading] = React.useState(false);
|
|
503
|
+
const loginId = userInfo === null || userInfo === void 0 ? void 0 : userInfo.id;
|
|
504
|
+
React.useEffect(() => {
|
|
505
|
+
loginId &&
|
|
506
|
+
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
507
|
+
var _a;
|
|
508
|
+
setFetchLoading(true);
|
|
509
|
+
const res = yield togetherComponentGlobalContext.callApiWithAuth(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.USER.LIST_QUESTION_NEED_REPLY, {
|
|
510
|
+
_locale: locale,
|
|
511
|
+
}), 'GET');
|
|
512
|
+
const tmpCom = [];
|
|
513
|
+
const tmpQuestionByCom = Object.create({});
|
|
514
|
+
(((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.communities) || [])
|
|
515
|
+
.filter((i) => ((i === null || i === void 0 ? void 0 : i.question) || []).length > 0)
|
|
516
|
+
.map((i) => {
|
|
517
|
+
tmpQuestionByCom[i.id] = i.question.map(dataTransform.formatPost);
|
|
518
|
+
delete i.question;
|
|
519
|
+
tmpCom.push(dataTransform.formatCommunity(i));
|
|
520
|
+
});
|
|
521
|
+
setCommunities(tmpCom);
|
|
522
|
+
setQuestions(tmpQuestionByCom);
|
|
523
|
+
setFetchLoading(false);
|
|
524
|
+
}))();
|
|
525
|
+
}, []);
|
|
526
|
+
const handleSkipQuestion = ({ id, communityId }) => {
|
|
527
|
+
if (id && communityId && questions) {
|
|
528
|
+
const newListQuestions = Object.assign(Object.assign({}, questions), { [communityId]: [
|
|
529
|
+
...((questions === null || questions === void 0 ? void 0 : questions[communityId]) || []).filter((i) => i.id !== id),
|
|
530
|
+
] });
|
|
531
|
+
let countLists = 0;
|
|
532
|
+
Object.keys(newListQuestions).map((idx) => (countLists += newListQuestions[idx].length || 0));
|
|
533
|
+
setQuestions(newListQuestions);
|
|
534
|
+
setCountValues(Object.assign(Object.assign({}, countValues), { total_question: countLists }));
|
|
535
|
+
onSkipQuestion === null || onSkipQuestion === void 0 ? void 0 : onSkipQuestion(countLists);
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
return (React__default["default"].createElement("div", { className: styles$3.container }, fetchLoading ? (React__default["default"].createElement(Loading, null)) : (countValues === null || countValues === void 0 ? void 0 : countValues.total_question) > 0 ? (communities.length > 0 && (React__default["default"].createElement(core.Accordion, { className: styles$3.accordion, defaultValue: String(((_b = communities[(_a = Object.keys(communities)) === null || _a === void 0 ? void 0 : _a[0]]) === null || _b === void 0 ? void 0 : _b.id) || ''), styles: (_theme) => ({
|
|
539
|
+
control: {
|
|
540
|
+
padding: '16px',
|
|
541
|
+
border: `1px solid ${_theme.colors.neutral[1]}`,
|
|
542
|
+
borderTopLeftRadius: '8px',
|
|
543
|
+
borderTopRightRadius: '8px',
|
|
544
|
+
'&[aria-expanded="false"]': {
|
|
545
|
+
borderBottom: 0,
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
chevron: {
|
|
549
|
+
width: '32px',
|
|
550
|
+
height: '32px',
|
|
551
|
+
},
|
|
552
|
+
content: {
|
|
553
|
+
padding: 0,
|
|
554
|
+
border: `1px solid ${_theme.colors.neutral[1]}`,
|
|
555
|
+
borderTop: 0,
|
|
556
|
+
borderBottom: 0,
|
|
557
|
+
},
|
|
558
|
+
label: {
|
|
559
|
+
padding: 0,
|
|
560
|
+
},
|
|
561
|
+
item: {
|
|
562
|
+
marginBottom: '16px',
|
|
563
|
+
},
|
|
564
|
+
}), chevron: React__default["default"].createElement("div", { className: styles$3.chevron },
|
|
565
|
+
React__default["default"].createElement(other.ArrowDown, { color: miscTheme.theme.colors.gray600, size: 20 })) }, communities.map((i) => {
|
|
566
|
+
const listing = (questions && (questions === null || questions === void 0 ? void 0 : questions[i.id])) || [];
|
|
567
|
+
return (listing.length > 0 && (React__default["default"].createElement(core.Accordion.Item, { key: i.id, value: String(i.id) },
|
|
568
|
+
React__default["default"].createElement(core.Accordion.Control, null,
|
|
569
|
+
React__default["default"].createElement("div", { className: styles$3.header },
|
|
570
|
+
React__default["default"].createElement("div", { className: styles$3.headingIcon },
|
|
571
|
+
React__default["default"].createElement("img", { src: i.thumbnail, loading: "lazy" })),
|
|
572
|
+
React__default["default"].createElement("div", { className: styles$3.heading }, i.name))),
|
|
573
|
+
React__default["default"].createElement(core.Accordion.Panel, null,
|
|
574
|
+
React__default["default"].createElement("div", { className: styles$3.body }, listing.map((post) => (React__default["default"].createElement(QuestionCard, { className: "question-card", key: post.id, post: post, onSkip: handleSkipQuestion }))))))));
|
|
575
|
+
})))) : (React__default["default"].createElement(EmptyMessage, { message: t('profilePanel.emptyCareMess.content'), imgSrc: index$2.CommonGAssets.getAssetPath('questions.svg') }))));
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
var styles$2 = {"container":"GA-zc-O","mainTxt":"A18McWD","question":"yzr0H0N","questionTitle":"_6gVRc3i","community":"xOzLGrD","questionCard":"IB049vj","linkWrapper":"_8I--vEV"};
|
|
579
|
+
|
|
580
|
+
const PostCard = ({ post, className = '' }) => {
|
|
581
|
+
var _a;
|
|
582
|
+
const { data: { userInfo, env: { togetherBasePath }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
583
|
+
const { t } = useTranslations.useTranslations();
|
|
584
|
+
const theme = core.useMantineTheme();
|
|
585
|
+
const { authActionWrapper, authorProps } = React.useContext(ProfileDetailContext);
|
|
586
|
+
const postHref = `${window.location.origin}${togetherBasePath}/${(_a = post === null || post === void 0 ? void 0 : post.community) === null || _a === void 0 ? void 0 : _a.slug}/${post === null || post === void 0 ? void 0 : post.slug}/`;
|
|
587
|
+
return (React__default["default"].createElement("div", { className: `${styles$2.container} ${className}` },
|
|
588
|
+
React__default["default"].createElement("div", { className: styles$2.questionCard },
|
|
589
|
+
React__default["default"].createElement("a", { "data-event-category": "Together", "data-event-action": "Click Post", "data-event-label": postHref, className: styles$2.linkWrapper, href: postHref, onClick: (e) => {
|
|
590
|
+
if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id)) {
|
|
591
|
+
e.preventDefault();
|
|
592
|
+
authActionWrapper === null || authActionWrapper === void 0 ? void 0 : authActionWrapper(() => (window.location.href = postHref));
|
|
593
|
+
}
|
|
594
|
+
} }),
|
|
595
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor$1, { className: "card-author", avatarProps: {
|
|
596
|
+
avatar: authorProps === null || authorProps === void 0 ? void 0 : authorProps.avatar,
|
|
597
|
+
size: 32,
|
|
598
|
+
} },
|
|
599
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.MainText, { className: styles$2.mainTxt }, post === null || post === void 0 ? void 0 : post.title),
|
|
600
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubTextRow, null,
|
|
601
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubText, null, post === null || post === void 0 ? void 0 : post.createdTime))),
|
|
602
|
+
React__default["default"].createElement(PostContent, { className: "post-content-wrapper", description: post === null || post === void 0 ? void 0 : post.description, mentions: post === null || post === void 0 ? void 0 : post.mentions, maxChars: 200, "data-testid": "Content of the Post", hideShowAllBtn: true }),
|
|
603
|
+
React__default["default"].createElement(index$6.Text, { size: "p3", color: theme.fn.primaryColor() }, t('post.seeMore')))));
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
var styles$1 = {"container":"TSMHoEM"};
|
|
607
|
+
|
|
608
|
+
const Posts = () => {
|
|
609
|
+
const { t } = useTranslations.useTranslations();
|
|
610
|
+
const { data: { locale }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
611
|
+
const { authorId: id, authorProps, isAuthorLogin, onCloseFromPost, } = React.useContext(ProfileDetailContext);
|
|
612
|
+
const [posts, setPosts] = React.useState(null);
|
|
613
|
+
const [loading, setLoading] = React.useState(false);
|
|
614
|
+
React.useEffect(() => {
|
|
615
|
+
id &&
|
|
616
|
+
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
617
|
+
var _a;
|
|
618
|
+
setLoading(true);
|
|
619
|
+
const res = yield togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.USER.LIST_POST, {
|
|
620
|
+
_locale: locale,
|
|
621
|
+
id,
|
|
622
|
+
isAnonymous: 0,
|
|
623
|
+
}), 'GET');
|
|
624
|
+
const resData = (((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.posts) || []).map(dataTransform.formatPost);
|
|
625
|
+
setPosts(resData);
|
|
626
|
+
setLoading(false);
|
|
627
|
+
}))();
|
|
628
|
+
}, [id]);
|
|
629
|
+
return (React__default["default"].createElement("div", { className: styles$1.container }, loading ? (React__default["default"].createElement(Loading, null)) : (posts !== null &&
|
|
630
|
+
(posts.length > 0 ? (posts.map((i) => (React__default["default"].createElement(PostCard, { className: "post-card", key: i.id, post: i })))) : (React__default["default"].createElement(EmptyMessage, { message: t('profilePanel.emptyPostMess.content', {
|
|
631
|
+
name: (authorProps === null || authorProps === void 0 ? void 0 : authorProps.name) || (authorProps === null || authorProps === void 0 ? void 0 : authorProps.username) || '',
|
|
632
|
+
}), buttonTxt: isAuthorLogin && t('profilePanel.createPost'), onBtnClick: () => {
|
|
633
|
+
onCloseFromPost === null || onCloseFromPost === void 0 ? void 0 : onCloseFromPost();
|
|
634
|
+
} }))))));
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
var styles = {"container":"_4Vekw96","info":"DIJdGcB","body":"aQSt4-Q"};
|
|
638
|
+
|
|
639
|
+
const formatExperience = (data) => {
|
|
640
|
+
if (!data)
|
|
641
|
+
return {};
|
|
642
|
+
return {
|
|
643
|
+
title: data === null || data === void 0 ? void 0 : data.title,
|
|
644
|
+
organization: data === null || data === void 0 ? void 0 : data.organization,
|
|
645
|
+
duration: data.duration,
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
const formatEducation = (data) => {
|
|
649
|
+
if (!data)
|
|
650
|
+
return {};
|
|
651
|
+
return {
|
|
652
|
+
completedYear: data === null || data === void 0 ? void 0 : data.completed_year,
|
|
653
|
+
schoolName: data.school_name,
|
|
654
|
+
study: data.study,
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
exports.TabName = void 0;
|
|
659
|
+
(function (TabName) {
|
|
660
|
+
TabName[TabName["About"] = 0] = "About";
|
|
661
|
+
TabName[TabName["Care"] = 1] = "Care";
|
|
662
|
+
TabName[TabName["Answer"] = 2] = "Answer";
|
|
663
|
+
TabName[TabName["Posts"] = 3] = "Posts";
|
|
664
|
+
})(exports.TabName || (exports.TabName = {}));
|
|
665
|
+
exports.UserType = void 0;
|
|
666
|
+
(function (UserType) {
|
|
667
|
+
UserType[UserType["Expert"] = 0] = "Expert";
|
|
668
|
+
UserType[UserType["User"] = 1] = "User";
|
|
669
|
+
})(exports.UserType || (exports.UserType = {}));
|
|
670
|
+
const TabDataInit = {
|
|
671
|
+
experiences: [],
|
|
672
|
+
relatedPosts: [],
|
|
673
|
+
educations: [],
|
|
674
|
+
awards: [],
|
|
675
|
+
contact: {},
|
|
676
|
+
data: {},
|
|
677
|
+
};
|
|
678
|
+
const ProfileDetail = (_a) => {
|
|
679
|
+
var _b;
|
|
680
|
+
var { authorProps, selectedTab, authActionWrapper, onSkipQuestion, onCloseFromPost, hideQuestionTab, hideAnswerTab, showSkipQuestionTag, rolesToShowQuestionsTab = ['expert'], currentPageUrl } = _a, rest = tslib_es6.__rest(_a, ["authorProps", "selectedTab", "authActionWrapper", "onSkipQuestion", "onCloseFromPost", "hideQuestionTab", "hideAnswerTab", "showSkipQuestionTag", "rolesToShowQuestionsTab", "currentPageUrl"]);
|
|
681
|
+
const { data: { locale, userInfo, env: { isMarryBaby }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
682
|
+
const { t } = useTranslations.useTranslations();
|
|
683
|
+
const role = authorProps === null || authorProps === void 0 ? void 0 : authorProps.role;
|
|
684
|
+
const loginRole = userInfo === null || userInfo === void 0 ? void 0 : userInfo.role;
|
|
685
|
+
const id = String(authorProps === null || authorProps === void 0 ? void 0 : authorProps.userId);
|
|
686
|
+
const [countValues, setCountValues] = React.useState();
|
|
687
|
+
const [loading, setLoading] = React.useState(false);
|
|
688
|
+
const [info, setInfo] = React.useState();
|
|
689
|
+
const isAuthorLogin = (userInfo === null || userInfo === void 0 ? void 0 : userInfo._togetherUserId) === (authorProps === null || authorProps === void 0 ? void 0 : authorProps.userId);
|
|
690
|
+
const tabContent = [
|
|
691
|
+
...(rolesToShowQuestionsTab.indexOf(role) !== -1
|
|
692
|
+
? [
|
|
693
|
+
{
|
|
694
|
+
value: exports.TabName.About,
|
|
695
|
+
text: t('profilePanel.tabs.highlight'),
|
|
696
|
+
content: React__default["default"].createElement(About, { id: id, info: info }),
|
|
697
|
+
dataEventCategory: 'Together',
|
|
698
|
+
dataEventAction: 'Doctor Profile Click',
|
|
699
|
+
dataEventLabel: currentPageUrl,
|
|
700
|
+
},
|
|
701
|
+
]
|
|
702
|
+
: []),
|
|
703
|
+
{
|
|
704
|
+
value: exports.TabName.Posts,
|
|
705
|
+
text: t('profilePanel.tabs.posts'),
|
|
706
|
+
content: React__default["default"].createElement(Posts, null),
|
|
707
|
+
hasCountResult: true,
|
|
708
|
+
keyOfCountApi: 'post',
|
|
709
|
+
keyOfResult: 'total_post',
|
|
710
|
+
},
|
|
711
|
+
...(!hideQuestionTab &&
|
|
712
|
+
rolesToShowQuestionsTab.indexOf(loginRole) !== -1 &&
|
|
713
|
+
(userInfo === null || userInfo === void 0 ? void 0 : userInfo._togetherUserId) === (authorProps === null || authorProps === void 0 ? void 0 : authorProps.userId)
|
|
714
|
+
? [
|
|
715
|
+
{
|
|
716
|
+
value: exports.TabName.Care,
|
|
717
|
+
text: `${t('profilePanel.tabs.care')}`,
|
|
718
|
+
content: React__default["default"].createElement(Care, null),
|
|
719
|
+
hasCountResult: true,
|
|
720
|
+
keyOfCountApi: 'question',
|
|
721
|
+
keyOfResult: 'total_question',
|
|
722
|
+
dataEventCategory: 'Together',
|
|
723
|
+
dataEventAction: 'Doctor Questions Click',
|
|
724
|
+
dataEventLabel: currentPageUrl,
|
|
725
|
+
},
|
|
726
|
+
]
|
|
727
|
+
: []),
|
|
728
|
+
...(!hideAnswerTab && rolesToShowQuestionsTab.indexOf(role) !== -1
|
|
729
|
+
? [
|
|
730
|
+
{
|
|
731
|
+
value: exports.TabName.Answer,
|
|
732
|
+
text: `${t('profilePanel.tabs.expertAnswer')}`,
|
|
733
|
+
content: React__default["default"].createElement(Answering, { id: id }),
|
|
734
|
+
hasCountResult: true,
|
|
735
|
+
keyOfCountApi: 'reply',
|
|
736
|
+
keyOfResult: 'total_reply',
|
|
737
|
+
dataEventCategory: 'Together',
|
|
738
|
+
dataEventAction: 'Doctor Reply Tab Click',
|
|
739
|
+
dataEventLabel: currentPageUrl,
|
|
740
|
+
},
|
|
741
|
+
]
|
|
742
|
+
: []),
|
|
743
|
+
];
|
|
744
|
+
const [finalTabContent, setFinalTabContent] = React.useState(null);
|
|
745
|
+
const [activeTab, setActiveTab] = React.useState(null);
|
|
746
|
+
const tabsProps = {
|
|
747
|
+
value: String(activeTab),
|
|
748
|
+
dataList: finalTabContent,
|
|
749
|
+
onTabChange: (n) => setActiveTab(Number(n)),
|
|
750
|
+
};
|
|
751
|
+
const listTabsHasCount = tabContent === null || tabContent === void 0 ? void 0 : tabContent.filter((i) => i === null || i === void 0 ? void 0 : i.hasCountResult);
|
|
752
|
+
React.useEffect(() => {
|
|
753
|
+
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
754
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
755
|
+
setLoading(true);
|
|
756
|
+
const res = yield Promise.all([
|
|
757
|
+
togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.USER.DETAIL, {
|
|
758
|
+
_locale: locale,
|
|
759
|
+
id,
|
|
760
|
+
}), 'GET'),
|
|
761
|
+
...listTabsHasCount.map((i) => {
|
|
762
|
+
return togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.USER.COUNT_TABS, {
|
|
763
|
+
_locale: locale,
|
|
764
|
+
id,
|
|
765
|
+
[i.keyOfCountApi]: 1,
|
|
766
|
+
}), 'GET');
|
|
767
|
+
}),
|
|
768
|
+
]);
|
|
769
|
+
const [restDetail] = res;
|
|
770
|
+
const resInfo = {
|
|
771
|
+
data: restDetail === null || restDetail === void 0 ? void 0 : restDetail.data,
|
|
772
|
+
experiences: (((_b = (_a = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _a === void 0 ? void 0 : _a.fields) === null || _b === void 0 ? void 0 : _b.experiences) || []).map(formatExperience),
|
|
773
|
+
relatedPosts: (((_c = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _c === void 0 ? void 0 : _c.related_post) || []).map((i) => dataTransform.formatArticle(i.post)),
|
|
774
|
+
educations: (((_e = (_d = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _d === void 0 ? void 0 : _d.fields) === null || _e === void 0 ? void 0 : _e.educations) || []).map(formatEducation),
|
|
775
|
+
awards: ((_g = (_f = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _f === void 0 ? void 0 : _f.fields) === null || _g === void 0 ? void 0 : _g.awards_accreditations) || [],
|
|
776
|
+
contact: ((_j = (_h = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _h === void 0 ? void 0 : _h.fields) === null || _j === void 0 ? void 0 : _j.contact) || {},
|
|
777
|
+
};
|
|
778
|
+
(restDetail === null || restDetail === void 0 ? void 0 : restDetail.status) === 1 && setInfo(resInfo);
|
|
779
|
+
const relatedPost = (resInfo === null || resInfo === void 0 ? void 0 : resInfo.relatedPosts) || [];
|
|
780
|
+
const socialList = Object.keys(resInfo.contact).map((i) => { var _a; return ((_a = resInfo === null || resInfo === void 0 ? void 0 : resInfo.contact) === null || _a === void 0 ? void 0 : _a[i]) !== ''; });
|
|
781
|
+
const accInfo = [
|
|
782
|
+
...((resInfo === null || resInfo === void 0 ? void 0 : resInfo.experiences) || []),
|
|
783
|
+
...((resInfo === null || resInfo === void 0 ? void 0 : resInfo.educations) || []),
|
|
784
|
+
...((resInfo === null || resInfo === void 0 ? void 0 : resInfo.awards) || []),
|
|
785
|
+
];
|
|
786
|
+
const showAboutTab = relatedPost.length > 0 || socialList.length > 0 || accInfo.length > 0;
|
|
787
|
+
const tmp = {};
|
|
788
|
+
const listToShow = listTabsHasCount
|
|
789
|
+
.map((i, idx) => {
|
|
790
|
+
var _a, _b, _c;
|
|
791
|
+
const countNumber = ((_c = (_b = (_a = res[idx + 1]) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.counting) === null || _c === void 0 ? void 0 : _c[i.keyOfResult]) || 0;
|
|
792
|
+
if (countNumber > 0) {
|
|
793
|
+
tmp[i.keyOfResult] = countNumber;
|
|
794
|
+
return i;
|
|
795
|
+
}
|
|
796
|
+
else {
|
|
797
|
+
// ONLY SHOW TAB HAS COUNT > 0
|
|
798
|
+
if ([exports.TabName.Care, exports.TabName.Posts].indexOf(i.value) !== -1) {
|
|
799
|
+
return i;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
})
|
|
803
|
+
.filter(Boolean)
|
|
804
|
+
.map((i) => i.value);
|
|
805
|
+
const newTab = tabContent
|
|
806
|
+
.map((i) => {
|
|
807
|
+
const newItem = Object.assign(Object.assign({}, i), { text: i.text +
|
|
808
|
+
(i.keyOfResult ? ` (${(tmp === null || tmp === void 0 ? void 0 : tmp[i.keyOfResult]) || '0'})` : '') });
|
|
809
|
+
if (!newItem.hasCountResult) {
|
|
810
|
+
if (newItem.value === exports.TabName.About) {
|
|
811
|
+
return showAboutTab && newItem;
|
|
812
|
+
}
|
|
813
|
+
else {
|
|
814
|
+
return newItem;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
else {
|
|
818
|
+
if (listToShow.indexOf(newItem.value) !== -1) {
|
|
819
|
+
return newItem;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
})
|
|
823
|
+
.filter(Boolean);
|
|
824
|
+
setFinalTabContent(newTab);
|
|
825
|
+
setActiveTab(selectedTab || ((_k = newTab === null || newTab === void 0 ? void 0 : newTab[0]) === null || _k === void 0 ? void 0 : _k.value));
|
|
826
|
+
setCountValues(tmp);
|
|
827
|
+
setLoading(false);
|
|
828
|
+
}))();
|
|
829
|
+
}, []);
|
|
830
|
+
const userData = info === null || info === void 0 ? void 0 : info.data;
|
|
831
|
+
return (React__default["default"].createElement(ProfileDetailContext.Provider, { value: {
|
|
832
|
+
isMarryBaby,
|
|
833
|
+
siteType: isMarryBaby ? 'marryBaby' : 'helloSites',
|
|
834
|
+
authorId: String((authorProps === null || authorProps === void 0 ? void 0 : authorProps.userId) || ''),
|
|
835
|
+
authActionWrapper,
|
|
836
|
+
onSkipQuestion,
|
|
837
|
+
info,
|
|
838
|
+
authorProps,
|
|
839
|
+
onCloseFromPost,
|
|
840
|
+
countValues,
|
|
841
|
+
setCountValues,
|
|
842
|
+
isAuthorLogin,
|
|
843
|
+
showSkipQuestionTag,
|
|
844
|
+
currentPageUrl,
|
|
845
|
+
} },
|
|
846
|
+
React__default["default"].createElement("div", Object.assign({}, rest, { className: `${styles.container} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}`, "data-is-marrybaby": isMarryBaby }), loading ? (React__default["default"].createElement(Loading, null)) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
847
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor, Object.assign({}, authorProps, { className: "card-author", showDetailPopup: false, subLine: (authorProps === null || authorProps === void 0 ? void 0 : authorProps.role) === 'expert'
|
|
848
|
+
? (userData === null || userData === void 0 ? void 0 : userData.specialty) &&
|
|
849
|
+
(userData === null || userData === void 0 ? void 0 : userData.organisation) && (React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubTextRow, null,
|
|
850
|
+
(userData === null || userData === void 0 ? void 0 : userData.specialty) && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
851
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubText, null, userData === null || userData === void 0 ? void 0 : userData.specialty),
|
|
852
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubDivider, null))),
|
|
853
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubText, null, userData === null || userData === void 0 ? void 0 : userData.organisation)))
|
|
854
|
+
: (userData === null || userData === void 0 ? void 0 : userData.created_at) && (React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubTextRow, null,
|
|
855
|
+
React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor.SubText, null,
|
|
856
|
+
t('profilePanel.joined'),
|
|
857
|
+
' ',
|
|
858
|
+
dayjs__default["default"](userData === null || userData === void 0 ? void 0 : userData.created_at).toNow(true)))) })),
|
|
859
|
+
role === 'expert' && (React__default["default"].createElement("div", { className: styles.info, dangerouslySetInnerHTML: { __html: (_b = info === null || info === void 0 ? void 0 : info.data) === null || _b === void 0 ? void 0 : _b.description } })),
|
|
860
|
+
finalTabContent !== null &&
|
|
861
|
+
activeTab !== null &&
|
|
862
|
+
(finalTabContent.length > 0 ? (React__default["default"].createElement("div", { className: styles.body },
|
|
863
|
+
React__default["default"].createElement(index$4.Tabs, Object.assign({}, tabsProps)))) : (React__default["default"].createElement(EmptyMessage, { message: t('profilePanel.emptyPostMess.content', {
|
|
864
|
+
text: (authorProps === null || authorProps === void 0 ? void 0 : authorProps.name) || (authorProps === null || authorProps === void 0 ? void 0 : authorProps.username) || '',
|
|
865
|
+
}) }))))))));
|
|
866
|
+
};
|
|
867
|
+
|
|
868
|
+
exports.PostContent = PostContent;
|
|
869
|
+
exports.ProfileDetail = ProfileDetail;
|
|
870
|
+
exports.TabDataInit = TabDataInit;
|