@hhgtech/hhg-components 1.29.88 → 1.29.89
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-c8c46da3.js} +1 -1
- package/build/MobileBottomNavigationIcon-efacfc0c.js +193 -0
- package/build/{WhatsApp-e6406d8d.js → WhatsApp-8a1d6d0c.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.js +125 -115
- package/build/{constants-2d046b25.js → constants-f5c5e2ae.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-58a245c5.js} +1 -1
- package/build/{dataTransform-945e5f4f.js → dataTransform-9ec385e3.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/editor-40386fe7.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-46d6c03f.js} +1 -1
- package/build/esm/MobileBottomNavigationIcon-ae6490d7.js +185 -0
- package/build/esm/{WhatsApp-2f54ed26.js → WhatsApp-ed8ce0f2.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.js +93 -83
- package/build/esm/{constants-b68073ea.js → constants-e9ebe043.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-6d8629c2.js} +1 -1
- package/build/esm/{dataTransform-c3905a10.js → dataTransform-2023858d.js} +2 -2
- package/build/esm/ecom.js +4 -4
- package/build/esm/editor-82c3d476.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-2af1606f.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-04146795.js → index-04ba5caa.js} +1 -1
- package/build/esm/{index-69c631bf.js → index-082a24ae.js} +12 -11
- package/build/esm/{index-478546e8.js → index-1313a7ac.js} +12 -11
- package/build/esm/{index-155daac5.js → index-13783871.js} +2 -2
- package/build/esm/{index-48fdf51c.js → index-16a4f1c7.js} +16 -15
- package/build/esm/{index-877a46df.js → index-19f27bd3.js} +2 -2
- package/build/esm/{index-8570e132.js → index-1a2bc551.js} +2 -2
- package/build/esm/{index-fcf9a2ce.js → index-275c8526.js} +14 -13
- package/build/esm/{index-0cf91429.js → index-277566f7.js} +1 -1
- package/build/esm/{index-67603e6c.js → index-2ac50d8f.js} +15 -14
- package/build/esm/{index-19a9a60d.js → index-2c4a2d31.js} +1 -1
- package/build/esm/{index-ef2b1e44.js → index-32a968a1.js} +6 -6
- package/build/esm/{index-cde1edae.js → index-346fd194.js} +21 -19
- package/build/esm/{index-b927d85a.js → index-38b87b21.js} +12 -11
- package/build/esm/{index-a7bfcfbd.js → index-46c22744.js} +6 -6
- package/build/esm/index-4cf37916.js +22 -0
- package/build/esm/{index-a715b700.js → index-4d27d02e.js} +15 -14
- package/build/esm/{index-9a0b3bcd.js → index-52d04cc5.js} +7 -7
- package/build/esm/index-538ca8aa.js +860 -0
- package/build/esm/{index-a2704991.js → index-57da0f13.js} +16 -88
- package/build/esm/{index-b4cab951.js → index-5e17f985.js} +16 -15
- package/build/esm/{index-83ab0594.js → index-605eed95.js} +35 -800
- package/build/esm/{index-5303fcd9.js → index-628c5e84.js} +2 -2
- package/build/esm/{index-321f0612.js → index-64b1cd5c.js} +1 -1
- package/build/esm/index-673fd5bd.js +1264 -0
- package/build/esm/{index-140ea208.js → index-70883b48.js} +17 -16
- package/build/esm/{index-e84f16f3.js → index-71c8b83f.js} +3 -142
- package/build/esm/{index-e5797070.js → index-72c269cf.js} +3 -3
- package/build/esm/index-7ad9db02.js +1030 -0
- package/build/esm/{index-17115a3b.js → index-7ca4ec53.js} +15 -14
- package/build/esm/{index-5a81cbdd.js → index-7decdf27.js} +1 -1
- package/build/esm/index-7e95ba03.js +144 -0
- package/build/esm/{index-11bc6557.js → index-84b3ef3d.js} +3 -3
- package/build/esm/{index-4e92aaf2.js → index-8b9c7b45.js} +3 -3
- package/build/esm/{index-63d30402.js → index-930b0a77.js} +16 -15
- package/build/esm/{index-2292c1f3.js → index-93c8863d.js} +2 -2
- package/build/esm/{index-29676661.js → index-949f771c.js} +6 -6
- package/build/esm/{index-7d97103f.js → index-99551970.js} +2 -2
- package/build/esm/{index-d3c3615e.js → index-9c268a93.js} +2 -2
- package/build/esm/{index-d10d5d1f.js → index-9d7d3a53.js} +4 -4
- package/build/esm/{index-69ca7b6a.js → index-9e220aaa.js} +2 -2
- package/build/esm/{index-58982ea1.js → index-a424a33d.js} +3 -3
- package/build/esm/{index-b23b0c82.js → index-a54b6536.js} +14 -13
- package/build/esm/{index-05075062.js → index-b09ced58.js} +1 -1
- package/build/esm/{index-1f944c2d.js → index-b5ed732f.js} +5 -5
- package/build/esm/{index-0e0f3ac6.js → index-b867d267.js} +1 -1
- package/build/esm/{index-2f06b1d8.js → index-c4b04b5f.js} +1 -1
- package/build/esm/{index-efdc151c.js → index-c5286b89.js} +12 -11
- package/build/esm/{index-2b20b8ce.js → index-cbb45a5d.js} +2 -2
- package/build/esm/{index-f42f0c66.js → index-d4dcfb68.js} +2 -2
- package/build/esm/{index-c0790cdc.js → index-dec46974.js} +20 -17
- package/build/esm/index-e19da15e.js +468 -0
- package/build/esm/{index-fbe76c43.js → index-e1d35fec.js} +7 -6
- package/build/esm/{index-58ed669e.js → index-e477c2a3.js} +23 -19
- package/build/esm/{index-7ab1ac4c.js → index-ed292946.js} +2 -2
- package/build/esm/index-f3f06437.js +281 -0
- package/build/esm/index.js +118 -98
- package/build/esm/index.styles-25454e9c.js +62 -0
- package/build/esm/interfaces/types/Subot.d.ts +3 -3
- package/build/esm/{labelSorting-db27bdad.js → labelSorting-27ecf45e.js} +4 -4
- package/build/esm/lead.js +22 -20
- package/build/esm/{logoIcon-6ed45e55.js → logoIcon-ef6d9e4c.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-d756e5e6.js} +1 -1
- package/build/esm/onboardingV2.js +27 -25
- package/build/esm/organisms.js +46 -41
- package/build/esm/post-86117110.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-b81b8f17.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-1b30aa0b.js} +5 -5
- 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-04ded0ef.js} +18 -17
- package/build/esm/types-3eb97d85.js +44 -0
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-d239339f.js → useCategory-391ffab0.js} +5 -5
- package/build/esm/{useHealthToolCache-e6e0e96c.js → useHealthToolCache-931ab3ca.js} +1 -1
- package/build/esm/{useMantineLocale-2ece6eac.js → useMantineLocale-b29ca68b.js} +5 -5
- package/build/esm/{usePlacesAutocomplete-ecf31643.js → usePlacesAutocomplete-91226a4d.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +4 -4
- package/build/esm/{useTranslations-160e66cc.js → useTranslations-b66d9f2b.js} +1 -1
- package/build/esm/utils-92e2bc22.js +206 -0
- package/build/esm/{utils-d78e02e6.js → utils-f4b925d7.js} +2 -2
- package/build/esm/{utils-3d9043fb.js → utils-f873578b.js} +4 -4
- package/build/esm/vaccination.js +20 -18
- package/build/{fixedBottomAdBlock-87988744.js → fixedBottomAdBlock-605a8692.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-6ce119f5.js → index-0afde39e.js} +2 -2
- package/build/{index-bac0bd08.js → index-0cb2de9d.js} +3 -3
- package/build/{index-84e8b355.js → index-188e2316.js} +15 -14
- package/build/index-1b06e81f.js +151 -0
- package/build/{index-fcf16e35.js → index-1cdccd4e.js} +2 -2
- package/build/index-27e50de1.js +478 -0
- package/build/{index-a688f865.js → index-32abfb15.js} +12 -11
- package/build/{index-a136cba7.js → index-36723718.js} +6 -6
- package/build/{index-9e92431c.js → index-36ba9947.js} +2 -2
- package/build/{index-5006f129.js → index-3c593ede.js} +6 -6
- package/build/{index-6c2d2f25.js → index-4bf6b5da.js} +24 -99
- package/build/{index-5ddda8f4.js → index-4fd69136.js} +16 -15
- package/build/{index-6313ec6f.js → index-526cee72.js} +6 -6
- package/build/{index-92e82d0d.js → index-549b9e8c.js} +1 -1
- package/build/{index-a6acde43.js → index-5b52b076.js} +38 -34
- package/build/{index-8b8263ed.js → index-5dbd317c.js} +34 -33
- package/build/index-5dcd87b7.js +289 -0
- package/build/{index-e4004288.js → index-648aac83.js} +2 -2
- package/build/{index-c294ccc2.js → index-6b7b4292.js} +3 -3
- package/build/{index-2de1a14d.js → index-6b95442c.js} +2 -2
- package/build/{index-9add51eb.js → index-6b9e8dda.js} +3 -3
- package/build/{index-b040447b.js → index-767f9ac6.js} +2 -2
- package/build/{index-1ebaa446.js → index-7ce45455.js} +16 -15
- package/build/{index-f05721a0.js → index-81ff6094.js} +7 -7
- package/build/{index-03834ac7.js → index-86ecfc48.js} +3 -3
- package/build/{index-66b34bd9.js → index-8a19ce1b.js} +96 -864
- package/build/{index-f3553904.js → index-8d9663db.js} +9 -8
- package/build/{index-227e17fd.js → index-9151d357.js} +2 -2
- package/build/index-922020ed.js +1045 -0
- package/build/{index-347a91f6.js → index-a76596ef.js} +1 -1
- package/build/{index-1489f027.js → index-a839c6ca.js} +3 -3
- package/build/{index-4dc41ef1.js → index-a8705384.js} +1 -1
- package/build/{index-b8620e16.js → index-aad249ab.js} +2 -2
- package/build/{index-92815934.js → index-af48fea3.js} +5 -5
- package/build/{index-ae03f378.js → index-b04c5212.js} +16 -15
- package/build/{index-7e8732ae.js → index-b4fd3100.js} +1 -1
- package/build/{index-f3f648e1.js → index-be0a9d63.js} +17 -16
- package/build/{index-d9559ac1.js → index-be262a50.js} +2 -2
- package/build/index-becfec7a.js +1307 -0
- package/build/index-bf3796aa.js +870 -0
- package/build/{index-196d4981.js → index-cc4ce0c4.js} +1 -1
- package/build/{index-9f995309.js → index-cd0db938.js} +34 -31
- package/build/{index-c016b1bb.js → index-d0610b0f.js} +14 -13
- package/build/{index-554ad68c.js → index-d393d57e.js} +1 -1
- package/build/{index-0772398f.js → index-d471ff2d.js} +1 -1
- package/build/{index-7024d536.js → index-d5d9ceb9.js} +15 -14
- package/build/{index-1245ea43.js → index-de26b5d1.js} +12 -11
- package/build/{index-7ca746d3.js → index-dec3abcf.js} +15 -14
- package/build/{index-a97a7a53.js → index-e018af91.js} +31 -29
- package/build/index-e8dc7fdb.js +29 -0
- package/build/{index-4a6c95fe.js → index-f30e56f1.js} +12 -11
- package/build/{index-519a6287.js → index-f6b32484.js} +12 -11
- package/build/{index-d39f2445.js → index-f91ed3be.js} +4 -4
- package/build/{index-e7b871b4.js → index-faa2908c.js} +3 -143
- package/build/{index-9cc21262.js → index-fbb369ff.js} +1 -1
- package/build/{index-f8a51099.js → index-fde11604.js} +2 -2
- package/build/index.js +182 -162
- package/build/index.styles-9031f6d6.js +65 -0
- package/build/interfaces/types/Subot.d.ts +3 -3
- package/build/{labelSorting-60b0f16a.js → labelSorting-11165c8e.js} +4 -4
- package/build/lead.js +22 -20
- package/build/{logoIcon-8e1ff0aa.js → logoIcon-f3283bfd.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-0fec66f4.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-7a9c8608.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-db73c893.js} +5 -5
- 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-61ebd05c.js} +18 -17
- package/build/types-57052089.js +52 -0
- package/build/types.js +2 -2
- package/build/{useCategory-32558796.js → useCategory-d9f73b82.js} +5 -5
- package/build/{useHealthToolCache-cbe4b1b4.js → useHealthToolCache-4b5bfb11.js} +1 -1
- package/build/{useMantineLocale-992ae094.js → useMantineLocale-cc272195.js} +5 -5
- package/build/{usePlacesAutocomplete-c19d396b.js → usePlacesAutocomplete-a0156f14.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +4 -4
- package/build/{useTranslations-5d28e8df.js → useTranslations-8a9fa84d.js} +1 -1
- package/build/{utils-1a876a51.js → utils-251b2841.js} +3 -3
- package/build/{utils-d3353e9c.js → utils-c29214c6.js} +2 -2
- package/build/utils-f47b2d2d.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-5f29289b.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-4b1616c4.js → BMI_BOYS.percentile.weekly-53584232.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-f7761749.js → BMI_BOYS.percentile.yearly-84aaf8fb.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-6767b0d4.js → BMI_BOYS.zscore.monthly-76d7fd0e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-5c57342b.js → BMI_BOYS.zscore.weekly-ed3d66f2.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-d970734e.js → BMI_BOYS.zscore.yearly-7e74f0e8.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-ba4d972d.js → BMI_GIRLS.percentile.monthly-6973d8b0.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-f73dacf3.js → BMI_GIRLS.percentile.weekly-a873a4e6.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-a5b59a8c.js → BMI_GIRLS.percentile.yearly-e86761bb.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-110d6823.js → BMI_GIRLS.zscore.monthly-9a12fa84.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-cfe97ba9.js → BMI_GIRLS.zscore.weekly-5936ed5b.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-ab4ae640.js → BMI_GIRLS.zscore.yearly-d40d8356.js} +0 -0
- /package/build/{ChevronDown-d37704eb.js → ChevronDown-a6775d48.js} +0 -0
- /package/build/{Close-1514c815.js → Close-9fa735bc.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-6c797045.js → HEAD CIRCUM_BOYS.percentile.monthly-873a839f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-7ac501c0.js → HEAD CIRCUM_BOYS.percentile.weekly-bbe3965d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-2999cdb8.js → HEAD CIRCUM_BOYS.percentile.yearly-645dfc78.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-7e3a78aa.js → HEAD CIRCUM_BOYS.zscore.monthly-9fe137bf.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-2ea72789.js → HEAD CIRCUM_BOYS.zscore.weekly-2ccb15fb.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-826ab425.js → HEAD CIRCUM_BOYS.zscore.yearly-48aed724.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-0f1636c1.js → HEAD CIRCUM_GIRLS.percentile.monthly-d99d6d30.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-b32da590.js → HEAD CIRCUM_GIRLS.percentile.weekly-8a49b504.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-850c4e29.js → HEAD CIRCUM_GIRLS.percentile.yearly-d747b0cd.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-f942b53a.js → HEAD CIRCUM_GIRLS.zscore.monthly-8ef18721.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-26daad32.js → HEAD CIRCUM_GIRLS.zscore.weekly-853cca20.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-0f331108.js → HEAD CIRCUM_GIRLS.zscore.yearly-4d5b2175.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-6bfc3799.js → HEIGHT_BOYS.percentile.monthly-070590b8.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-0ed4b053.js → HEIGHT_BOYS.percentile.weekly-56741428.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-cc4c343d.js → HEIGHT_BOYS.percentile.yearly-9c81f767.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-b2d384dc.js → HEIGHT_BOYS.zscore.monthly-729982c3.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-b65aa792.js → HEIGHT_BOYS.zscore.weekly-ddb206fb.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-0bae3840.js → HEIGHT_BOYS.zscore.yearly-5fc7ea6a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-34960fd2.js → HEIGHT_GIRLS.percentile.monthly-8cbc8d18.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-949ca5b1.js → HEIGHT_GIRLS.percentile.weekly-7145e94f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-4c40b714.js → HEIGHT_GIRLS.percentile.yearly-ab0e4f4e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-a3856728.js → HEIGHT_GIRLS.zscore.monthly-b851b1d7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-b39f321f.js → HEIGHT_GIRLS.zscore.weekly-98aef3cf.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-f50c6d58.js → HEIGHT_GIRLS.zscore.yearly-65d990f7.js} +0 -0
- /package/build/{Locale-e3b7ae56.js → Locale-07aceee9.js} +0 -0
- /package/build/{Visible-c6736a66.js → Visible-ddeaf4cc.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-685aabfc.js → WEIGHT_BOYS.percentile.monthly-0ce96694.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-3c1a6d2f.js → WEIGHT_BOYS.percentile.weekly-b5397f20.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-2bd65c8f.js → WEIGHT_BOYS.percentile.yearly-80cccd42.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-bba8cd92.js → WEIGHT_BOYS.zscore.monthly-12907f1f.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-7bdc0673.js → WEIGHT_BOYS.zscore.weekly-a1af17eb.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-32f635e0.js → WEIGHT_BOYS.zscore.yearly-2649ff58.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-ad305e84.js → WEIGHT_GIRLS.percentile.monthly-222d7201.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-92e552b6.js → WEIGHT_GIRLS.percentile.weekly-2997b740.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-df0dd71c.js → WEIGHT_GIRLS.percentile.yearly-3dc5928a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-8820671b.js → WEIGHT_GIRLS.zscore.monthly-742b7617.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-31d29b05.js → WEIGHT_GIRLS.zscore.weekly-5ee1ca40.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-f731d1e2.js → WEIGHT_GIRLS.zscore.yearly-d6ca7d60.js} +0 -0
- /package/build/{animation-b224626d.js → animation-a1ed71d8.js} +0 -0
- /package/build/{cart-149e990d.js → cart-7bc1b943.js} +0 -0
- /package/build/{constants-f9eca9ad.js → constants-4cad9f4d.js} +0 -0
- /package/build/{constants-9c314450.js → constants-81b95117.js} +0 -0
- /package/build/{constants-42eed92d.js → constants-c3b9c9a9.js} +0 -0
- /package/build/{dataTransform-104761fc.js → dataTransform-867c472c.js} +0 -0
- /package/build/{doctor-d8f36158.js → doctor-dca6d1b2.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-df1b3770.js → BMI_BOYS.percentile.monthly-2388d98f.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-1d9595b1.js → BMI_BOYS.percentile.weekly-8ebe6955.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-6bd2bb46.js → BMI_BOYS.percentile.yearly-3a97e95b.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-658792d1.js → BMI_BOYS.zscore.monthly-f7572dcd.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-d3c4d378.js → BMI_BOYS.zscore.weekly-d6281906.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-8ad375e2.js → BMI_BOYS.zscore.yearly-fbebaaca.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-25f98c64.js → BMI_GIRLS.percentile.monthly-a75c8880.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-d60b034d.js → BMI_GIRLS.percentile.weekly-652bc9af.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-0560df43.js → BMI_GIRLS.percentile.yearly-8bcb5a6e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-2104651f.js → BMI_GIRLS.zscore.monthly-ecbe2982.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-37757497.js → BMI_GIRLS.zscore.weekly-3abed735.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-56872c59.js → BMI_GIRLS.zscore.yearly-d88a34a0.js} +0 -0
- /package/build/esm/{ChevronDown-5633c5e8.js → ChevronDown-dfd91883.js} +0 -0
- /package/build/esm/{Close-f541a904.js → Close-b8fc27b1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-47e6539d.js → HEAD CIRCUM_BOYS.percentile.monthly-ff980a90.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-594e065d.js → HEAD CIRCUM_BOYS.percentile.weekly-eb86eac9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-d24f1cc6.js → HEAD CIRCUM_BOYS.percentile.yearly-27ed6504.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-94d82cb5.js → HEAD CIRCUM_BOYS.zscore.monthly-0d345597.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-cb0109d0.js → HEAD CIRCUM_BOYS.zscore.weekly-c182ab46.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-79a794c9.js → HEAD CIRCUM_BOYS.zscore.yearly-d45dbce1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-89615b43.js → HEAD CIRCUM_GIRLS.percentile.monthly-61919e45.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-29d9184f.js → HEAD CIRCUM_GIRLS.percentile.weekly-51fa8f98.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-140da49d.js → HEAD CIRCUM_GIRLS.percentile.yearly-c1fa6006.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-fe41d0e8.js → HEAD CIRCUM_GIRLS.zscore.monthly-4dfc55d8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-c6193e75.js → HEAD CIRCUM_GIRLS.zscore.weekly-b21b5bf1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-7018fed4.js → HEAD CIRCUM_GIRLS.zscore.yearly-c42836fa.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-fae5e6a0.js → HEIGHT_BOYS.percentile.monthly-24ff8afa.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-ddc33aee.js → HEIGHT_BOYS.percentile.weekly-2be7b66e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-9e3064f0.js → HEIGHT_BOYS.percentile.yearly-ac02aa2d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-7c9e0bb8.js → HEIGHT_BOYS.zscore.monthly-b43667dc.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-50b0a6a0.js → HEIGHT_BOYS.zscore.weekly-abcfcf3a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-afb6c4a2.js → HEIGHT_BOYS.zscore.yearly-71598c16.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-5c7487f0.js → HEIGHT_GIRLS.percentile.monthly-7f9d679c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-33465e14.js → HEIGHT_GIRLS.percentile.weekly-6ce1d4e7.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ae62b279.js → HEIGHT_GIRLS.percentile.yearly-c398fd6b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-fd13c492.js → HEIGHT_GIRLS.zscore.monthly-8d33bc28.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-f509ffbe.js → HEIGHT_GIRLS.zscore.weekly-eb44c302.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-bf3a867b.js → HEIGHT_GIRLS.zscore.yearly-10b4d1fe.js} +0 -0
- /package/build/esm/{Locale-81beb37e.js → Locale-b86a7a92.js} +0 -0
- /package/build/esm/{Visible-3d8c22f1.js → Visible-69da852f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-4db4c32c.js → WEIGHT_BOYS.percentile.monthly-fd349fe7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-5321689a.js → WEIGHT_BOYS.percentile.weekly-d5e52d60.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-0c2aee80.js → WEIGHT_BOYS.percentile.yearly-929119b3.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-ddf307e5.js → WEIGHT_BOYS.zscore.monthly-3f0f08cd.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-be1d57ac.js → WEIGHT_BOYS.zscore.weekly-b9fd3298.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-6dab88ff.js → WEIGHT_BOYS.zscore.yearly-9945948d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-a666fe8a.js → WEIGHT_GIRLS.percentile.monthly-1e83ae51.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-cd85042c.js → WEIGHT_GIRLS.percentile.weekly-c3531852.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-f22705ec.js → WEIGHT_GIRLS.percentile.yearly-3c0040b0.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-9f3f1083.js → WEIGHT_GIRLS.zscore.monthly-3baeda15.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-7dcf0ba5.js → WEIGHT_GIRLS.zscore.weekly-2d8e6618.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-c658040c.js → WEIGHT_GIRLS.zscore.yearly-826f5bdd.js} +0 -0
- /package/build/esm/{animation-db89f033.js → animation-7207941a.js} +0 -0
- /package/build/esm/{cart-47013af9.js → cart-4f482601.js} +0 -0
- /package/build/esm/{constants-f9614464.js → constants-0497b893.js} +0 -0
- /package/build/esm/{constants-247d5eb0.js → constants-af02be2a.js} +0 -0
- /package/build/esm/{constants-410be40f.js → constants-f7943ab2.js} +0 -0
- /package/build/esm/{dataTransform-f9e5b4ec.js → dataTransform-610e61bf.js} +0 -0
- /package/build/esm/{doctor-88e78d2c.js → doctor-63e09ada.js} +0 -0
- /package/build/esm/{index-907fffe6.js → index-20192854.js} +0 -0
- /package/build/esm/{index-c3d6b2ed.js → index-20199246.js} +0 -0
- /package/build/esm/{index-6dd5a329.js → index-5364f2db.js} +0 -0
- /package/build/esm/{index-0ca51fbb.js → index-56d0ac47.js} +0 -0
- /package/build/esm/{index-24f2f569.js → index-9f076f64.js} +0 -0
- /package/build/esm/{index-6f44d928.js → index-a2506e52.js} +0 -0
- /package/build/esm/{index-5f214b71.js → index-c130afdc.js} +0 -0
- /package/build/esm/{index-fcd9b927.js → index-c9467e39.js} +0 -0
- /package/build/esm/{localizeNumberFormat-be70a31e.js → localizeNumberFormat-3bf28240.js} +0 -0
- /package/build/esm/{number-7e3f376a.js → number-d26abebe.js} +0 -0
- /package/build/esm/{other-811b7d93.js → other-08d0b30e.js} +0 -0
- /package/build/esm/{paths-650d5eee.js → paths-ce59b252.js} +0 -0
- /package/build/esm/{translationsContext-0cbb21e6.js → translationsContext-8afb0ce3.js} +0 -0
- /package/build/esm/{tslib.es6-3970c414.js → tslib.es6-e0840efa.js} +0 -0
- /package/build/esm/{types-78bfaf40.js → types-41242882.js} +0 -0
- /package/build/esm/{useIsInit-3f7af1fd.js → useIsInit-f59c6bd2.js} +0 -0
- /package/build/esm/{useOutsideClick-2fae5fb5.js → useOutsideClick-12815e56.js} +0 -0
- /package/build/esm/{useScrollbarSize-2a7e6dd2.js → useScrollbarSize-431cf33c.js} +0 -0
- /package/build/esm/{useUniqueId-d714426d.js → useUniqueId-8f710187.js} +0 -0
- /package/build/esm/{utils-cee25689.js → utils-8a1f05c9.js} +0 -0
- /package/build/{index-27f25094.js → index-017f99b2.js} +0 -0
- /package/build/{index-1d528960.js → index-1a6a94cd.js} +0 -0
- /package/build/{index-41a348a2.js → index-668f591b.js} +0 -0
- /package/build/{index-32917720.js → index-70abc2ac.js} +0 -0
- /package/build/{index-20a5cee0.js → index-c6b0831a.js} +0 -0
- /package/build/{index-9f501aac.js → index-ce2d2850.js} +0 -0
- /package/build/{index-186f9324.js → index-e3e72aed.js} +0 -0
- /package/build/{index-e327613c.js → index-f70c0edf.js} +0 -0
- /package/build/{localizeNumberFormat-a5804ea2.js → localizeNumberFormat-30e7f015.js} +0 -0
- /package/build/{normalizeLink-2878a2ce.js → normalizeLink-c1b2b407.js} +0 -0
- /package/build/{number-35662113.js → number-20d56f69.js} +0 -0
- /package/build/{other-a7f01b3d.js → other-eedaf6ca.js} +0 -0
- /package/build/{paths-488dafd4.js → paths-4c182009.js} +0 -0
- /package/build/{translationsContext-951038ad.js → translationsContext-cd046df4.js} +0 -0
- /package/build/{tslib.es6-145af9ce.js → tslib.es6-f3c387c0.js} +0 -0
- /package/build/{types-aeea2cc2.js → types-2614ec58.js} +0 -0
- /package/build/{useIsInit-0c37752a.js → useIsInit-e56642e4.js} +0 -0
- /package/build/{useOutsideClick-aa477d22.js → useOutsideClick-f18dfe3f.js} +0 -0
- /package/build/{useScrollbarSize-01b12b72.js → useScrollbarSize-4aaa4dd1.js} +0 -0
- /package/build/{useUniqueId-17c2097b.js → useUniqueId-621ec272.js} +0 -0
- /package/build/{utils-a1cfbdac.js → utils-ae9740c0.js} +0 -0
|
@@ -0,0 +1,870 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-f3c387c0.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var dayjs = require('dayjs');
|
|
6
|
+
var index$4 = require('./index-4bf6b5da.js');
|
|
7
|
+
var useTranslations = require('./useTranslations-8a9fa84d.js');
|
|
8
|
+
var index = require('./index-aad249ab.js');
|
|
9
|
+
var dataTransform = require('./dataTransform-9ec385e3.js');
|
|
10
|
+
var togetherApiPaths = require('./togetherApiPaths.js');
|
|
11
|
+
var togetherComponentGlobalContext = require('./utils-251b2841.js');
|
|
12
|
+
var core$1 = require('@hhgtech/icons/core');
|
|
13
|
+
var core = require('@mantine/core');
|
|
14
|
+
var index$2 = require('./index-1a6a94cd.js');
|
|
15
|
+
var index$1 = require('./index-e8dc7fdb.js');
|
|
16
|
+
var togetherMoleculesCardAuthor = require('./index-922020ed.js');
|
|
17
|
+
var index$3 = require('./index-d471ff2d.js');
|
|
18
|
+
var miscTheme = require('./miscTheme.js');
|
|
19
|
+
var other = require('@hhgtech/icons/other');
|
|
20
|
+
require('@mantine/dates');
|
|
21
|
+
require('./index-648aac83.js');
|
|
22
|
+
require('./useMantineLocale-cc272195.js');
|
|
23
|
+
var index$6 = require('./index-6b95442c.js');
|
|
24
|
+
var index$5 = require('./index-549b9e8c.js');
|
|
25
|
+
require('./index.styles-9031f6d6.js');
|
|
26
|
+
require('@mantine/hooks');
|
|
27
|
+
require('./utils-ae9740c0.js');
|
|
28
|
+
require('./other-eedaf6ca.js');
|
|
29
|
+
var styled = require('@emotion/styled');
|
|
30
|
+
var useTogetherAuthRequiredAction = require('./useTogetherAuthRequiredAction.js');
|
|
31
|
+
var post = require('./post-0fec66f4.js');
|
|
32
|
+
require('./translationsContext-cd046df4.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;
|