@hhgtech/hhg-components 1.29.80 → 1.29.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{index-1250dd06.js → WhatsApp-46f4f408.js} +24 -276
- package/build/adapters.js +17 -16
- package/build/atoms.js +102 -0
- package/build/babyGrowth.js +162 -164
- package/build/cache.js +3 -3
- package/build/care.js +17 -17
- package/build/components.js +181 -163
- package/build/{constants-ca71f9e5.js → constants-223c01fc.js} +2 -2
- package/build/{constants-4e7c419e.js → constants-8743b014.js} +0 -136
- package/build/constants-a78fa8b3.js +318 -0
- package/build/constants-f182fc32.js +425 -0
- package/build/constants.js +3 -3
- package/build/{core-bb2587e7.js → core-9d69a722.js} +2 -2
- package/build/{dataTransform-469b75eb.js → dataTransform-ded2692d.js} +1 -1
- package/build/{index-5d9ad07e.js → dataTransform-e39297c1.js} +3 -52
- package/build/defaultClassWrapper-b7719693.js +21 -0
- package/build/ecom.js +5 -5
- package/build/esm/WhatsApp-c599b715.js +46 -0
- package/build/esm/adapters.js +17 -16
- package/build/esm/atoms.js +59 -0
- package/build/esm/babyGrowth.js +87 -89
- package/build/esm/cache.js +3 -3
- package/build/esm/care.js +17 -17
- package/build/esm/components.js +91 -73
- package/build/esm/constants-a5827634.js +307 -0
- package/build/esm/{constants-7661ce64.js → constants-bb470362.js} +2 -2
- package/build/esm/{constants-508ba335.js → constants-f6b2e49d.js} +1 -127
- package/build/esm/constants-fa475b0f.js +417 -0
- package/build/esm/constants.js +3 -3
- package/build/esm/{core-5a22b83e.js → core-80bfe8b7.js} +2 -2
- package/build/esm/{dataTransform-f5db5afb.js → dataTransform-55f67eed.js} +1 -1
- package/build/esm/{index-9b54376f.js → dataTransform-623716c3.js} +5 -53
- package/build/esm/defaultClassWrapper-00903c00.js +15 -0
- package/build/esm/ecom.js +5 -5
- package/build/esm/fixedBottomAdBlock-60a5d48f.js +3474 -0
- package/build/esm/footer.js +18 -18
- package/build/esm/gAssets.js +4 -4
- package/build/esm/{getDynamicHealthTool-09fda8b3.js → getDynamicHealthTool-82855adc.js} +4 -4
- package/build/esm/{getSocialList-96301dbb.js → getSocialList-7d2cf48d.js} +5 -6
- package/build/esm/healthToolsForm.js +40 -0
- package/build/esm/healthToolsForms.d.ts +7 -0
- package/build/esm/hooks.js +17 -17
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-da2b8f22.js → index-01405723.js} +12 -11
- package/build/esm/index-01b5d2e9.js +202 -0
- package/build/esm/index-02d3f05b.js +1681 -0
- package/build/esm/{index-82861dba.js → index-046778af.js} +2 -2
- package/build/esm/{index-df29c4e0.js → index-049e0270.js} +33 -5
- package/build/esm/index-07f3f47e.js +14 -0
- package/build/esm/index-0b745f46.js +1349 -0
- package/build/esm/{index-e68d4285.js → index-0ca9b175.js} +2 -2
- package/build/esm/{index-c4699d44.js → index-0cd3523c.js} +35 -176
- package/build/esm/index-0ee66974.js +95 -0
- package/build/esm/index-10ab6596.js +489 -0
- package/build/esm/{index-5773eb18.js → index-13d8dd4b.js} +6 -6
- package/build/esm/{index.styled-9e147e72.js → index-1c9b481b.js} +21 -3
- package/build/esm/index-1d3c6ce7.js +195 -0
- package/build/esm/{index-474e0ae5.js → index-21256394.js} +2 -13
- package/build/esm/{index-2d47a346.js → index-219e3a35.js} +11 -10
- package/build/esm/{index-679d5383.js → index-29908d2c.js} +1 -1
- package/build/esm/{utils-ff5d88a2.js → index-2dc7803d.js} +71 -105
- package/build/esm/{index-4dcdce19.js → index-5723381f.js} +2 -2
- package/build/esm/{index-c807ef87.js → index-6210f454.js} +3 -3
- package/build/esm/index-7a1ea734.js +100 -0
- package/build/esm/{index-53a86337.js → index-7c384ae6.js} +5 -5
- package/build/esm/index-8eb04f36.js +130 -0
- package/build/esm/index-8fcf671c.js +335 -0
- package/build/esm/{index-80f4d7df.js → index-9471fca1.js} +2 -2
- package/build/esm/{index-92eedeb0.js → index-9b3a8b6d.js} +12 -201
- package/build/esm/{index-3c7f109c.js → index-9b9c1499.js} +2 -2
- package/build/esm/index-9f99909b.js +54 -0
- package/build/esm/index-ac2a8f95.js +1114 -0
- package/build/esm/index-acf8b60e.js +42 -0
- package/build/esm/index-ad1c7c38.js +275 -0
- package/build/esm/{index-bcd13f1d.js → index-bcedec73.js} +13 -12
- package/build/esm/{index-ef855343.js → index-c013ba1b.js} +4 -4
- package/build/esm/index-c2584051.js +262 -0
- package/build/esm/{types-957334f2.js → index-c430773c.js} +559 -3519
- package/build/esm/index-cdc50618.js +25 -0
- package/build/esm/{index-77dddeb9.js → index-cfedca38.js} +2 -2
- package/build/esm/index-d6a5f5cf.js +557 -0
- package/build/esm/index-e0b0d6a2.js +847 -0
- package/build/esm/index-ea63e0d2.js +148 -0
- package/build/esm/{index-32e2b169.js → index-f22f6e6e.js} +65 -28
- package/build/esm/index-f4b938f2.js +18 -0
- package/build/esm/index-f660abb7.js +156 -0
- package/build/esm/index-fa67d66e.js +789 -0
- package/build/esm/index.js +98 -73
- package/build/esm/labelSorting-7351409a.js +47 -0
- package/build/esm/lead.js +23 -33
- package/build/esm/logoIcon-3a581efb.js +104 -0
- package/build/esm/mantine.js +22 -20
- package/build/esm/misc.js +21 -21
- package/build/esm/molecules.js +88 -0
- package/build/esm/navigation.js +37 -37
- package/build/esm/onboardingV2.js +26 -35
- package/build/esm/organisms.js +57 -0
- package/build/esm/pwg.js +19 -19
- package/build/esm/{routing-7bc3e320.js → routing-9e330438.js} +2 -2
- package/build/esm/subot.js +31 -27
- package/build/esm/surveyOrPremiumBanner.js +45 -0
- package/build/esm/surveyQuestionCard.js +13 -0
- package/build/esm/surveyThankyouCard-ec204631.js +446 -0
- package/build/esm/together.js +52 -45
- package/build/esm/togetherAtoms.js +41 -0
- package/build/esm/togetherComponentGlobalContext.js +12 -0
- package/build/esm/togetherMolecules.js +53 -0
- package/build/esm/togetherOrganisms.js +57 -0
- package/build/esm/treePopoverMenu-cb214db6.js +332 -0
- package/build/esm/types-721e7a66.js +5 -0
- package/build/esm/{types-ee1be1e3.js → types-ffcf5fb4.js} +13 -13
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-7e020652.js → useCategory-553bee0b.js} +5 -5
- package/build/esm/{useHealthToolCache-c70e4fd5.js → useHealthToolCache-6ce1724e.js} +2 -2
- package/build/esm/{useMantineLocale-1373e175.js → useMantineLocale-453f8013.js} +3 -3
- package/build/esm/{usePlacesAutocomplete-4bfe976e.js → usePlacesAutocomplete-8925d4fb.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +60 -0
- package/build/esm/{useTranslations-adad3b06.js → useTranslations-b970f667.js} +1 -1
- package/build/esm/{utils-dee27bfd.js → utils-3b29eb79.js} +8 -356
- package/build/esm/{utils-b14c10f9.js → utils-6d45bdd1.js} +1 -1
- package/build/esm/vaccination.js +18 -29
- package/build/fixedBottomAdBlock-0129a006.js +3521 -0
- package/build/footer.js +18 -18
- package/build/gAssets.js +4 -4
- package/build/{getDynamicHealthTool-357666f7.js → getDynamicHealthTool-f08b5fab.js} +4 -4
- package/build/{getSocialList-c1404aff.js → getSocialList-8cc32f7c.js} +8 -9
- package/build/healthToolsForm.js +54 -0
- package/build/healthToolsForms.d.ts +7 -0
- package/build/hooks.js +17 -17
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/index-00a78d81.js +565 -0
- package/build/index-077bf48f.js +803 -0
- package/build/{index-bf6e5e4e.js → index-0b727664.js} +5 -5
- package/build/{index-917c975c.js → index-10760994.js} +37 -9
- package/build/index-130e0f35.js +1693 -0
- package/build/{index-82a3ba38.js → index-16ed0d98.js} +68 -33
- package/build/{index-040620f6.js → index-1e1d8eb1.js} +13 -12
- package/build/{index-e60c98f8.js → index-1fdf2f01.js} +2 -2
- package/build/{index-61ef343d.js → index-206afefb.js} +4 -4
- package/build/{types-c8956642.js → index-2afbeb3d.js} +761 -3727
- package/build/{index.styled-8aca5145.js → index-2fd9063e.js} +22 -4
- package/build/index-33432b02.js +270 -0
- package/build/index-3eb666e6.js +202 -0
- package/build/{index-94a2b0f9.js → index-405faafa.js} +2 -2
- package/build/index-4357a324.js +136 -0
- package/build/index-466a2c32.js +1362 -0
- package/build/index-4b7d4b5b.js +156 -0
- package/build/{index-5029b5d8.js → index-4bc690c9.js} +1 -1
- package/build/index-4cdcdbbe.js +498 -0
- package/build/index-53e14542.js +102 -0
- package/build/{index-91027d35.js → index-54aeefca.js} +2 -2
- package/build/index-60f6d762.js +1127 -0
- package/build/{index-858f60e0.js → index-64d8db08.js} +2 -2
- package/build/index-6aeb5ff5.js +866 -0
- package/build/index-71843eb4.js +61 -0
- package/build/index-765ed75d.js +209 -0
- package/build/index-7953fb8e.js +167 -0
- package/build/{index-d710511f.js → index-7ecc69af.js} +12 -11
- package/build/index-82c85f9d.js +277 -0
- package/build/index-9e8877c0.js +25 -0
- package/build/index-a2664204.js +107 -0
- package/build/{index-c67602d7.js → index-a6a9855f.js} +1 -13
- package/build/index-a8680a58.js +49 -0
- package/build/{index-ed587907.js → index-a9bbb5aa.js} +11 -10
- package/build/{utils-263a60f7.js → index-a9bdf889.js} +76 -120
- package/build/{index-f0a532c7.js → index-b66ae554.js} +6 -6
- package/build/index-ca616373.js +20 -0
- package/build/{index-b0414701.js → index-d9919cd2.js} +57 -200
- package/build/index-dd074159.js +32 -0
- package/build/{index-94fd9ea6.js → index-dff7ee1b.js} +32 -222
- package/build/{index-3a03bb34.js → index-e3bbd009.js} +2 -2
- package/build/index-ec34e358.js +343 -0
- package/build/{index-8c826f3e.js → index-f222ee45.js} +2 -2
- package/build/{index-2b32b21e.js → index-fd3e1d16.js} +2 -2
- package/build/index.js +251 -226
- package/build/labelSorting-f86081b7.js +53 -0
- package/build/lead.js +29 -39
- package/build/logoIcon-21a16853.js +110 -0
- package/build/mantine.js +24 -23
- package/build/misc.js +21 -21
- package/build/molecules.js +149 -0
- package/build/navigation.js +37 -37
- package/build/onboardingV2.js +45 -54
- package/build/organisms.js +74 -0
- package/build/pwg.js +19 -19
- package/build/{routing-bc8197d8.js → routing-d6c9099a.js} +2 -2
- package/build/subot.js +115 -111
- package/build/surveyOrPremiumBanner.js +53 -0
- package/build/surveyQuestionCard.js +22 -0
- package/build/surveyThankyouCard-5b23b8f6.js +454 -0
- package/build/together.js +100 -93
- package/build/togetherAtoms.js +55 -0
- package/build/togetherComponentGlobalContext.js +26 -0
- package/build/togetherMolecules.js +86 -0
- package/build/togetherOrganisms.js +71 -0
- package/build/treePopoverMenu-c0cb395f.js +343 -0
- package/build/{types-6996fb20.js → types-8d9c5f21.js} +13 -13
- package/build/types-b25ffde0.js +7 -0
- package/build/types.js +1 -1
- package/build/{useCategory-7d1f8a7d.js → useCategory-b695fd3a.js} +5 -5
- package/build/{useHealthToolCache-b7dea4aa.js → useHealthToolCache-048807ea.js} +2 -2
- package/build/{useMantineLocale-b243f628.js → useMantineLocale-0d63dfea.js} +3 -3
- package/build/{usePlacesAutocomplete-08b86d2d.js → usePlacesAutocomplete-9520e525.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +70 -0
- package/build/{useTranslations-d5456a98.js → useTranslations-685f989b.js} +1 -1
- package/build/{utils-9f62698f.js → utils-169c6a7d.js} +16 -375
- package/build/{utils-d421a448.js → utils-1a00c0f8.js} +1 -1
- package/build/vaccination.js +58 -69
- package/package.json +1 -1
- package/build/Instagram-91ba1e26.js +0 -32
- package/build/esm/Instagram-319a8e34.js +0 -26
- package/build/esm/index-13bf84f4.js +0 -298
- package/build/esm/index-1a3f36c3.js +0 -1086
- package/build/esm/index-800b956a.js +0 -7245
- package/build/esm/index-aebf96f3.js +0 -33
- package/build/esm/index-d48b5db6.js +0 -71
- package/build/esm/index-d5b66388.js +0 -23
- package/build/esm/index.styles-0ef0135c.js +0 -1322
- package/build/index-0523771b.js +0 -7324
- package/build/index-20ebc0bd.js +0 -30
- package/build/index-dbf560f2.js +0 -1100
- package/build/index-efcbac97.js +0 -39
- package/build/index-f5103542.js +0 -77
- package/build/index.styles-2bdfde5f.js +0 -1361
- /package/build/{BMI_BOYS.percentile.monthly-c38ce03a.js → BMI_BOYS.percentile.monthly-1aa95e30.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-1eccee42.js → BMI_BOYS.percentile.weekly-61d78e1c.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-0e7d5cb6.js → BMI_BOYS.percentile.yearly-f80e040e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-f72f392f.js → BMI_BOYS.zscore.monthly-a6c7c8ff.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-94fd04e6.js → BMI_BOYS.zscore.weekly-742f7028.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-90d5e091.js → BMI_BOYS.zscore.yearly-c19cccd5.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-de3a9a14.js → BMI_GIRLS.percentile.monthly-089d3981.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-1e1ce2b7.js → BMI_GIRLS.percentile.weekly-0cc52cda.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-70a44f31.js → BMI_GIRLS.percentile.yearly-10bc603f.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-be4399a5.js → BMI_GIRLS.zscore.monthly-c3fe57f3.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-6121376b.js → BMI_GIRLS.zscore.weekly-b83a54db.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-822e7686.js → BMI_GIRLS.zscore.yearly-5f13cda2.js} +0 -0
- /package/build/{ChevronDown-f9d31306.js → ChevronDown-2fd86d66.js} +0 -0
- /package/build/{Close-27e0dcf1.js → Close-711196b0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-5e094c3e.js → HEAD CIRCUM_BOYS.percentile.monthly-03b8d7fb.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-24f827d8.js → HEAD CIRCUM_BOYS.percentile.weekly-9ebd3eb6.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-d7478410.js → HEAD CIRCUM_BOYS.percentile.yearly-8e97b738.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-1123cad6.js → HEAD CIRCUM_BOYS.zscore.monthly-e7892261.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-a5b55615.js → HEAD CIRCUM_BOYS.zscore.weekly-47c5af84.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-0d818764.js → HEAD CIRCUM_BOYS.zscore.yearly-9a1bc325.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-dddf5ad9.js → HEAD CIRCUM_GIRLS.percentile.monthly-d84491d7.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-a80d6989.js → HEAD CIRCUM_GIRLS.percentile.weekly-a6f38c3e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-01850b67.js → HEAD CIRCUM_GIRLS.percentile.yearly-5771d277.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-82890053.js → HEAD CIRCUM_GIRLS.zscore.monthly-e3633bcc.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-069f8c8f.js → HEAD CIRCUM_GIRLS.zscore.weekly-23b0ab1a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-ae5ef237.js → HEAD CIRCUM_GIRLS.zscore.yearly-20f29cf1.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-d0da1664.js → HEIGHT_BOYS.percentile.monthly-57cc12ee.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-55446b8a.js → HEIGHT_BOYS.percentile.weekly-c788506a.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-f2f5b19f.js → HEIGHT_BOYS.percentile.yearly-ac56c1f2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-e6ed98ef.js → HEIGHT_BOYS.zscore.monthly-1bb78253.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-d0d37479.js → HEIGHT_BOYS.zscore.weekly-22737c43.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-4023b808.js → HEIGHT_BOYS.zscore.yearly-90f6cd0a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-6d9aeadc.js → HEIGHT_GIRLS.percentile.monthly-019f80d2.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-2087c9b4.js → HEIGHT_GIRLS.percentile.weekly-ceed9817.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-f98d8b05.js → HEIGHT_GIRLS.percentile.yearly-3e5192ac.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-99d299e3.js → HEIGHT_GIRLS.zscore.monthly-f8fca0b6.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-c46ed349.js → HEIGHT_GIRLS.zscore.weekly-827b17e8.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-fddefca4.js → HEIGHT_GIRLS.zscore.yearly-3cdb483d.js} +0 -0
- /package/build/{Visible-01dfaec9.js → Visible-515a4eec.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-cead8ece.js → WEIGHT_BOYS.percentile.monthly-2ecbd498.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-a97fa31a.js → WEIGHT_BOYS.percentile.weekly-75c9c25c.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c2c41945.js → WEIGHT_BOYS.percentile.yearly-03e7cea6.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-d8de7dc2.js → WEIGHT_BOYS.zscore.monthly-2ff9fb56.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-41a6f6bf.js → WEIGHT_BOYS.zscore.weekly-e9f7fe2d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-5762fa8a.js → WEIGHT_BOYS.zscore.yearly-4a96f34f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-526fb18a.js → WEIGHT_GIRLS.percentile.monthly-5bf09e30.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-6c63ed2b.js → WEIGHT_GIRLS.percentile.weekly-f737ae23.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-0ecdbd3a.js → WEIGHT_GIRLS.percentile.yearly-56ebc8eb.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-0c353536.js → WEIGHT_GIRLS.zscore.monthly-4697d3b5.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-97898ff6.js → WEIGHT_GIRLS.zscore.weekly-3633820e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-cbebe807.js → WEIGHT_GIRLS.zscore.yearly-a9a04790.js} +0 -0
- /package/build/{animation-8605b5bb.js → animation-85d012ee.js} +0 -0
- /package/build/{cart-ab5762b8.js → cart-8877bd63.js} +0 -0
- /package/build/{cookieHelper-b2132ffc.js → cookieHelper-86ae022e.js} +0 -0
- /package/build/{doctor-f121fd79.js → doctor-2c14fed1.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-e507536d.js → BMI_BOYS.percentile.monthly-42ff2c64.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-3cbf7392.js → BMI_BOYS.percentile.weekly-b4a6c521.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-c7d54bc3.js → BMI_BOYS.percentile.yearly-d3bc1a77.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-4d09aca0.js → BMI_BOYS.zscore.monthly-c4506dfa.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-319b78c5.js → BMI_BOYS.zscore.weekly-ddf3b3f9.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-764732c5.js → BMI_BOYS.zscore.yearly-e0e3139e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-5a8e4069.js → BMI_GIRLS.percentile.monthly-96686bcc.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-a2fe6df1.js → BMI_GIRLS.percentile.weekly-c3106a65.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-810fe911.js → BMI_GIRLS.percentile.yearly-b38c1f1f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-afab03b0.js → BMI_GIRLS.zscore.monthly-f8a7836f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-8f4e7198.js → BMI_GIRLS.zscore.weekly-4c1fc771.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-7f043621.js → BMI_GIRLS.zscore.yearly-dce5e66a.js} +0 -0
- /package/build/esm/{ChevronDown-d24fd24b.js → ChevronDown-31ea3e19.js} +0 -0
- /package/build/esm/{Close-6243d246.js → Close-40d598bc.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-91c12176.js → HEAD CIRCUM_BOYS.percentile.monthly-34e3fa1c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-40e77c68.js → HEAD CIRCUM_BOYS.percentile.weekly-d3f3568f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-1a284ec4.js → HEAD CIRCUM_BOYS.percentile.yearly-dfae3ad2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-16f716a6.js → HEAD CIRCUM_BOYS.zscore.monthly-95840c2f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-07d20112.js → HEAD CIRCUM_BOYS.zscore.weekly-8b198c1c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-1201a10a.js → HEAD CIRCUM_BOYS.zscore.yearly-b7d639ad.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-a6348baf.js → HEAD CIRCUM_GIRLS.percentile.monthly-47caa070.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-af26363f.js → HEAD CIRCUM_GIRLS.percentile.weekly-bae46665.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-e7637928.js → HEAD CIRCUM_GIRLS.percentile.yearly-81989cdd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-9be0e0ca.js → HEAD CIRCUM_GIRLS.zscore.monthly-f2f7d985.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-3ffe9dcd.js → HEAD CIRCUM_GIRLS.zscore.weekly-e287ddb7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-d7226db1.js → HEAD CIRCUM_GIRLS.zscore.yearly-8790b62a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-c2e21892.js → HEIGHT_BOYS.percentile.monthly-5d2b6466.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-22018f1e.js → HEIGHT_BOYS.percentile.weekly-a38ad13e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-391cd377.js → HEIGHT_BOYS.percentile.yearly-e4841712.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-e11f50f4.js → HEIGHT_BOYS.zscore.monthly-d8e722f8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-8e2c8306.js → HEIGHT_BOYS.zscore.weekly-a92ea3ca.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-78e974bb.js → HEIGHT_BOYS.zscore.yearly-3af1adce.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-0a49ff89.js → HEIGHT_GIRLS.percentile.monthly-c5203801.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-5e158a8e.js → HEIGHT_GIRLS.percentile.weekly-4c25d07f.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-f5544ab2.js → HEIGHT_GIRLS.percentile.yearly-f91e2e27.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-92f67ec2.js → HEIGHT_GIRLS.zscore.monthly-b2a60aca.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-f5d11f32.js → HEIGHT_GIRLS.zscore.weekly-0a98c520.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-4fe6aad9.js → HEIGHT_GIRLS.zscore.yearly-8070d58f.js} +0 -0
- /package/build/esm/{Visible-7f408f98.js → Visible-e3e4fb6f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-b09ae73a.js → WEIGHT_BOYS.percentile.monthly-b262b97d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-733a24a9.js → WEIGHT_BOYS.percentile.weekly-7e817f9f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-2bfcfc93.js → WEIGHT_BOYS.percentile.yearly-b7f1786a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-c0d3a746.js → WEIGHT_BOYS.zscore.monthly-014af835.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-b41ff498.js → WEIGHT_BOYS.zscore.weekly-4577f724.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-15bb7570.js → WEIGHT_BOYS.zscore.yearly-08fd3f13.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-5b79dea8.js → WEIGHT_GIRLS.percentile.monthly-a6e1aa0d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-33052637.js → WEIGHT_GIRLS.percentile.weekly-4c0b6f94.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-64382b53.js → WEIGHT_GIRLS.percentile.yearly-bf689a3a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-63f19584.js → WEIGHT_GIRLS.zscore.monthly-f82fc3c8.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-938ebce2.js → WEIGHT_GIRLS.zscore.weekly-854ce987.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-016e1cfc.js → WEIGHT_GIRLS.zscore.yearly-2a3b869a.js} +0 -0
- /package/build/esm/{animation-bf170ee9.js → animation-85d9a0ed.js} +0 -0
- /package/build/esm/{cart-5bdb4fa5.js → cart-1ac23ce7.js} +0 -0
- /package/build/esm/{cookieHelper-ff6c13b4.js → cookieHelper-6c3b4790.js} +0 -0
- /package/build/esm/{doctor-f4cadffb.js → doctor-e0c2476d.js} +0 -0
- /package/build/esm/{index-eeedf0f0.js → index-189d7601.js} +0 -0
- /package/build/esm/{index-b87433a0.js → index-21bca818.js} +0 -0
- /package/build/esm/{index-6c0f560b.js → index-266a32ff.js} +0 -0
- /package/build/esm/{index-528e64f4.js → index-8684181f.js} +0 -0
- /package/build/esm/{isProduction-2838b9ae.js → isProduction-1937d355.js} +0 -0
- /package/build/esm/{localizeNumberFormat-9303c122.js → localizeNumberFormat-1f000110.js} +0 -0
- /package/build/esm/{normalizeLink-38ab69f4.js → normalizeLink-7a93ebb9.js} +0 -0
- /package/build/esm/{number-fcae69c7.js → number-1d1ba14a.js} +0 -0
- /package/build/esm/{paths-d1c61fa8.js → paths-b83be1a0.js} +0 -0
- /package/build/esm/{theme-0af1cc3d.js → theme-7dadf4a1.js} +0 -0
- /package/build/esm/{translationsContext-036458b7.js → translationsContext-42a1fa63.js} +0 -0
- /package/build/esm/{tslib.es6-2673b49d.js → tslib.es6-06ba3978.js} +0 -0
- /package/build/esm/{useIsInit-2c5ff93d.js → useIsInit-f4dec279.js} +0 -0
- /package/build/esm/{useOutsideClick-7023de23.js → useOutsideClick-210c1134.js} +0 -0
- /package/build/esm/{useScrollbarSize-dfdab229.js → useScrollbarSize-909ae7ec.js} +0 -0
- /package/build/esm/{useUniqueId-d4b0bdd3.js → useUniqueId-5885911d.js} +0 -0
- /package/build/esm/{utils-511a24f4.js → utils-d7bbdb52.js} +0 -0
- /package/build/{index-18ddaa1b.js → index-1f3fc2e3.js} +0 -0
- /package/build/{index-5c400e5e.js → index-2de1eb4a.js} +0 -0
- /package/build/{index-bced434a.js → index-6fdcd09d.js} +0 -0
- /package/build/{index-c524c362.js → index-bc9e8eae.js} +0 -0
- /package/build/{isProduction-2e55aee3.js → isProduction-20cd663d.js} +0 -0
- /package/build/{localizeNumberFormat-2befc6e4.js → localizeNumberFormat-7ff6bd3a.js} +0 -0
- /package/build/{normalizeLink-0fd36e61.js → normalizeLink-d307f624.js} +0 -0
- /package/build/{number-92da0262.js → number-dddf656c.js} +0 -0
- /package/build/{paths-350514c4.js → paths-7da79c64.js} +0 -0
- /package/build/{theme-f410baf6.js → theme-be20929b.js} +0 -0
- /package/build/{translationsContext-11cafcfc.js → translationsContext-00fdb62e.js} +0 -0
- /package/build/{tslib.es6-4bc45883.js → tslib.es6-bd3f8718.js} +0 -0
- /package/build/{useIsInit-0f6d1879.js → useIsInit-e06b96f5.js} +0 -0
- /package/build/{useOutsideClick-e067cc79.js → useOutsideClick-d95a32b6.js} +0 -0
- /package/build/{useScrollbarSize-ed50b4a6.js → useScrollbarSize-1499b1c3.js} +0 -0
- /package/build/{useUniqueId-4ce69bff.js → useUniqueId-1af8848e.js} +0 -0
- /package/build/{utils-4849d92a.js → utils-15a9772e.js} +0 -0
|
@@ -1,995 +1,432 @@
|
|
|
1
|
-
import React__default, { createContext, useContext, useState,
|
|
2
|
-
import {
|
|
3
|
-
import './
|
|
4
|
-
import '
|
|
5
|
-
import {
|
|
6
|
-
import { a as __awaiter, _ as __rest } from './tslib.es6-2673b49d.js';
|
|
7
|
-
import { Heart, Reply, Comment, CrossLogo, ShieldCheck, Info, Ask, FullScreen, ArrowDown, ArrowRight, Trash, Endorse } from '@hhgtech/icons/other';
|
|
8
|
-
import { useMantineTheme, Box, createStyles, Flex, rem, Checkbox, Portal, Anchor, Accordion, Popover } from '@mantine/core';
|
|
9
|
-
import { D as Dropdown } from './index-679d5383.js';
|
|
10
|
-
import { u as useTranslations } from './useTranslations-adad3b06.js';
|
|
11
|
-
import innertext from 'innertext';
|
|
12
|
-
import { t as theme } from './theme-0af1cc3d.js';
|
|
13
|
-
import { I as ImageWrap, u as useScreenSize, B as Button$1, A as Anchor$1, T as Tabs } from './index-92eedeb0.js';
|
|
14
|
-
import '@mantine/dates';
|
|
15
|
-
import { D as DATE_FNS_LOCALE, d as domainLocales$1 } from './index-c807ef87.js';
|
|
16
|
-
import { L as LOCALE, S as SocialType } from './index-eeedf0f0.js';
|
|
17
|
-
import { C as CommonGAssets } from './index-80f4d7df.js';
|
|
18
|
-
import './useMantineLocale-1373e175.js';
|
|
19
|
-
import '@mantine/hooks';
|
|
20
|
-
import { M as MediaQueries, t as toggleNoScroll, c as safeEncodeURI, a as getPopupWrapperDom } from './utils-511a24f4.js';
|
|
21
|
-
import { A as AuthorBadge, a as BookingBtn, B as BtnChoice, D as Divider } from './index-32e2b169.js';
|
|
22
|
-
import { U as UserAvatar, c as formatTopic, b as formatPost, P as Popup, e as formatComment, a as formatCommunity, g as formatArticle, h as formatCategory } from './index-9b54376f.js';
|
|
23
|
-
import { I as Input } from './index-aebf96f3.js';
|
|
24
|
-
import debounce from 'lodash/debounce';
|
|
25
|
-
import ContentEditable from 'react-contenteditable';
|
|
26
|
-
import { Plus, Close, Check } from '@hhgtech/icons/core';
|
|
27
|
-
import { B as Button } from './index-3c7f109c.js';
|
|
28
|
-
import { H as Heading } from './index-82861dba.js';
|
|
29
|
-
import { d as deleteCookie, g as getCookie } from './cookieHelper-ff6c13b4.js';
|
|
1
|
+
import React__default, { createContext, useContext, useState, useEffect, useMemo, useRef, useCallback } from 'react';
|
|
2
|
+
import { B as Button } from './index-9b9c1499.js';
|
|
3
|
+
import { H as Heading } from './index-046778af.js';
|
|
4
|
+
import { T as Text } from './index-5723381f.js';
|
|
5
|
+
import { M as MediaQueries, t as toggleNoScroll, c as safeEncodeURI, a as getPopupWrapperDom } from './utils-d7bbdb52.js';
|
|
30
6
|
import * as ReactDOM from 'react-dom';
|
|
7
|
+
import { c as callApi, g as getCarePath, C as CARE_PATHS, l as domainLocales, m as getCareHospitalUrl, n as getCareDoctorUrl, k as getCurrentBaseUrl, o as getDiscoverApiPath, p as DISCOVER_PATHS, T as TogetherComponentGlobalContext, d as getApiPath, A as ADMIN_PATHS, P as PATHS, q as callApiWithAdminAuth, b as callApiWithAuth } from './utils-3b29eb79.js';
|
|
31
8
|
import styled from '@emotion/styled';
|
|
32
|
-
import {
|
|
33
|
-
import { a as
|
|
34
|
-
import {
|
|
9
|
+
import { t as theme } from './theme-7dadf4a1.js';
|
|
10
|
+
import { _ as __rest, a as __awaiter } from './tslib.es6-06ba3978.js';
|
|
11
|
+
import { I as Input } from './index-f660abb7.js';
|
|
12
|
+
import { u as useTranslations } from './useTranslations-b970f667.js';
|
|
13
|
+
import { P as Popup, c as formatComment, b as formatPost, a as formatCommunity, e as formatArticle } from './dataTransform-623716c3.js';
|
|
14
|
+
import { M as MAX_IMAGE_UPLOADS, B as BEARER_TOKEN_COOKIE, a as DEFAULT_AVATAR_IMG, D as DEFAULT_IMG } from './constants-a5827634.js';
|
|
15
|
+
import { P as PopoverMenu, C as CardLink } from './index-10ab6596.js';
|
|
16
|
+
import { U as UserAvatar } from './index-9f99909b.js';
|
|
17
|
+
import debounce from 'lodash/debounce';
|
|
18
|
+
import { g as getCookie } from './cookieHelper-6c3b4790.js';
|
|
19
|
+
import { a as useUniqueId } from './useUniqueId-5885911d.js';
|
|
20
|
+
import { createStyles, Box, Flex, rem, Portal, Anchor, useMantineTheme, Accordion } from '@mantine/core';
|
|
21
|
+
import { CrossLogo, ShieldCheck, FullScreen, ArrowDown } from '@hhgtech/icons/other';
|
|
22
|
+
import { I as ImageWrap, u as useScreenSize, A as Anchor$1, T as Tabs } from './index-9b3a8b6d.js';
|
|
23
|
+
import { s as setDefaultClass } from './defaultClassWrapper-00903c00.js';
|
|
35
24
|
import dayjs from 'dayjs';
|
|
25
|
+
import { Plus } from '@hhgtech/icons/core';
|
|
26
|
+
import { C as CommonGAssets } from './index-9471fca1.js';
|
|
27
|
+
import { S as SocialType } from './index-189d7601.js';
|
|
28
|
+
import '@mantine/dates';
|
|
29
|
+
import { d as domainLocales$1 } from './index-6210f454.js';
|
|
30
|
+
import './useMantineLocale-453f8013.js';
|
|
31
|
+
import { B as Button$1 } from './index-1d3c6ce7.js';
|
|
32
|
+
import '@mantine/hooks';
|
|
36
33
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
34
|
+
import { A as AuthorBadge, B as BookingBtn } from './index-f22f6e6e.js';
|
|
37
35
|
import { keyframes } from '@emotion/react';
|
|
38
|
-
import { M as Modal } from './index-
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import '
|
|
42
|
-
import './constants-508ba335.js';
|
|
43
|
-
import './utils-ff5d88a2.js';
|
|
44
|
-
import './index-13bf84f4.js';
|
|
45
|
-
import './index.styled-9e147e72.js';
|
|
46
|
-
import './index-528e64f4.js';
|
|
47
|
-
|
|
48
|
-
const TogetherAuthConfigContext = createContext({});
|
|
49
|
-
const TogetherAuthConfigContextProvider = ({ children, defaultParams, }) => {
|
|
50
|
-
return (React__default.createElement(TogetherAuthConfigContext.Provider, { value: {
|
|
51
|
-
defaultParams,
|
|
52
|
-
} }, children));
|
|
53
|
-
};
|
|
54
|
-
const useTogetherAuthRequiredAction = (propsParams) => {
|
|
55
|
-
const { data: { userInfo, env: { togetherBasePath }, }, } = useContext(TogetherComponentGlobalContext);
|
|
56
|
-
const { defaultParams } = useContext(TogetherAuthConfigContext) || {};
|
|
57
|
-
const isLoggedIn = userInfo === null || userInfo === void 0 ? void 0 : userInfo.id;
|
|
58
|
-
const isFirstInteract = userInfo &&
|
|
59
|
-
typeof userInfo.communities_interacted === 'number' &&
|
|
60
|
-
userInfo.communities_interacted === 0;
|
|
61
|
-
const authActionWrapper = (func, extraParams) => {
|
|
62
|
-
const params = Object.assign(Object.assign(Object.assign({}, defaultParams), propsParams), extraParams);
|
|
63
|
-
if (!isLoggedIn || isFirstInteract) {
|
|
64
|
-
if (!isLoggedIn) {
|
|
65
|
-
deleteCookie(BEARER_TOKEN_COOKIE);
|
|
66
|
-
}
|
|
67
|
-
if (params === null || params === void 0 ? void 0 : params._joinCommunityIds) {
|
|
68
|
-
localStorage.setItem('to_join_community_ids', JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem('to_join_community_ids') || '[]') || [])
|
|
69
|
-
.concat(params._joinCommunityIds)
|
|
70
|
-
.filter(Boolean)))));
|
|
71
|
-
params === null || params === void 0 ? true : delete params._joinCommunityIds;
|
|
72
|
-
}
|
|
73
|
-
if (params === null || params === void 0 ? void 0 : params._joinTopicIds) {
|
|
74
|
-
localStorage.setItem('to_join_topic_ids', JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem('to_join_topic_ids') || '[]') || [])
|
|
75
|
-
.concat(params._joinTopicIds)
|
|
76
|
-
.filter(Boolean)))));
|
|
77
|
-
params === null || params === void 0 ? true : delete params._joinTopicIds;
|
|
78
|
-
}
|
|
79
|
-
const currentLocation = (params === null || params === void 0 ? void 0 : params._location) || window.location.href;
|
|
80
|
-
params === null || params === void 0 ? true : delete params._location;
|
|
81
|
-
window.location.href = getUrlToSignUp(currentLocation, params, togetherBasePath);
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
return func && func();
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
return {
|
|
89
|
-
authActionWrapper,
|
|
90
|
-
params: Object.assign(Object.assign({}, defaultParams), propsParams),
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const StyledCardLink = styled.div `
|
|
95
|
-
.link-info-container {
|
|
96
|
-
padding: 0.5rem 1rem;
|
|
97
|
-
background: ${(props) => props.color || '#f4faff'};
|
|
98
|
-
}
|
|
99
|
-
.link-image-wrapper {
|
|
100
|
-
position: relative;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
width: 100%;
|
|
103
|
-
padding-top: min(280px, 56.25%);
|
|
104
|
-
.link-image-blur {
|
|
105
|
-
position: absolute;
|
|
106
|
-
top: 50%;
|
|
107
|
-
left: 50%;
|
|
108
|
-
width: 110%;
|
|
109
|
-
height: 110%;
|
|
110
|
-
/* Add the blur effect */
|
|
111
|
-
-webkit-filter: blur(8px);
|
|
112
|
-
filter: blur(8px);
|
|
113
|
-
object-fit: cover;
|
|
114
|
-
object-position: center;
|
|
115
|
-
opacity: 0.8;
|
|
116
|
-
transform: translate(-50%, -50%);
|
|
117
|
-
}
|
|
118
|
-
.link-image {
|
|
119
|
-
position: absolute;
|
|
120
|
-
top: 0;
|
|
121
|
-
left: 0;
|
|
122
|
-
width: 100%;
|
|
123
|
-
height: 100%;
|
|
124
|
-
object-fit: contain;
|
|
125
|
-
object-position: center;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
a {
|
|
129
|
-
text-decoration: none;
|
|
130
|
-
}
|
|
131
|
-
&[data-is-marrybaby='true'] {
|
|
132
|
-
overflow: hidden;
|
|
133
|
-
border-radius: 1rem;
|
|
134
|
-
.link-info-container {
|
|
135
|
-
padding-bottom: 1rem;
|
|
136
|
-
p {
|
|
137
|
-
color: #2661ad;
|
|
138
|
-
}
|
|
139
|
-
.link-logo {
|
|
140
|
-
max-width: 2rem;
|
|
141
|
-
height: 13px;
|
|
142
|
-
margin-right: 4px;
|
|
143
|
-
object-fit: contain;
|
|
144
|
-
vertical-align: middle;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
.link-image-wrapper {
|
|
148
|
-
padding-top: min(360px, 56.25%);
|
|
149
|
-
.link-image {
|
|
150
|
-
object-fit: cover;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
`;
|
|
155
|
-
|
|
156
|
-
const CardLink = ({ title, url, image, logo, className, style, noRefetch, }) => {
|
|
157
|
-
const { data: { locale, env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
|
|
158
|
-
const [hideLogo, setHideLogo] = useState(false);
|
|
159
|
-
const _theme = useMantineTheme();
|
|
160
|
-
const noRefetchRef = useRef(noRefetch);
|
|
161
|
-
noRefetchRef.current = noRefetch;
|
|
162
|
-
const [previewData, setPreviewData] = useState(null);
|
|
163
|
-
useEffect(() => {
|
|
164
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
165
|
-
if (noRefetchRef.current)
|
|
166
|
-
return;
|
|
167
|
-
if (!url)
|
|
168
|
-
return setPreviewData(null);
|
|
169
|
-
setPreviewData((_data) => (Object.assign(Object.assign({}, _data), { isFetching: true })));
|
|
170
|
-
callApi(getApiPath(PATHS.FETCH_PREVIEW, {
|
|
171
|
-
_locale: locale,
|
|
172
|
-
}), 'POST', {
|
|
173
|
-
data: {
|
|
174
|
-
link: url,
|
|
175
|
-
},
|
|
176
|
-
headers: {
|
|
177
|
-
'Content-Type': 'application/json',
|
|
178
|
-
},
|
|
179
|
-
})
|
|
180
|
-
.then((res) => {
|
|
181
|
-
var _a, _b, _c;
|
|
182
|
-
setHideLogo(false);
|
|
183
|
-
setPreviewData({
|
|
184
|
-
title: (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.title,
|
|
185
|
-
url,
|
|
186
|
-
image: ((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.image) || ((_c = res === null || res === void 0 ? void 0 : res.data) === null || _c === void 0 ? void 0 : _c.logo),
|
|
187
|
-
// logo: meta.logo,
|
|
188
|
-
});
|
|
189
|
-
})
|
|
190
|
-
.catch(() => {
|
|
191
|
-
setPreviewData(null);
|
|
192
|
-
});
|
|
193
|
-
}))();
|
|
194
|
-
}, [url]);
|
|
195
|
-
const displayImage = (previewData === null || previewData === void 0 ? void 0 : previewData.image) || image;
|
|
196
|
-
const displayTitle = (previewData === null || previewData === void 0 ? void 0 : previewData.title) || title;
|
|
197
|
-
const displayLogo = (previewData === null || previewData === void 0 ? void 0 : previewData.logo) || logo;
|
|
198
|
-
const displayUrl = (previewData === null || previewData === void 0 ? void 0 : previewData.url) || url;
|
|
199
|
-
const urlParts = displayUrl
|
|
200
|
-
.replace('http://', '')
|
|
201
|
-
.replace('https://', '')
|
|
202
|
-
.split(/[/?#]/);
|
|
203
|
-
const domain = urlParts[0];
|
|
204
|
-
const showDefaultRef = useRef(false);
|
|
205
|
-
return (React__default.createElement(StyledCardLink, { "data-is-marrybaby": isMarryBaby, className: `${className} no-replace-click`, style: style, color: _theme.colors[_theme.primaryColor][0] },
|
|
206
|
-
React__default.createElement("a", { href: displayUrl, target: "_blank", rel: "noreferrer" },
|
|
207
|
-
displayImage && (React__default.createElement("div", { className: "link-image-wrapper" },
|
|
208
|
-
!isMarryBaby && (React__default.createElement("img", { className: "link-image-blur", src: displayImage, onError: (e) => {
|
|
209
|
-
if (!showDefaultRef.current) {
|
|
210
|
-
showDefaultRef.current = true;
|
|
211
|
-
e.currentTarget.src = DEFAULT_IMG;
|
|
212
|
-
}
|
|
213
|
-
}, loading: "lazy" })),
|
|
214
|
-
React__default.createElement("img", { className: "link-image", src: displayImage, onError: (e) => {
|
|
215
|
-
if (!showDefaultRef.current) {
|
|
216
|
-
showDefaultRef.current = true;
|
|
217
|
-
e.currentTarget.src = DEFAULT_IMG;
|
|
218
|
-
}
|
|
219
|
-
}, loading: "lazy" }))),
|
|
220
|
-
React__default.createElement("div", { className: "link-info-container" },
|
|
221
|
-
React__default.createElement(Text, { size: "n1" },
|
|
222
|
-
isMarryBaby && displayLogo && !hideLogo && (React__default.createElement("img", { className: "link-logo", src: displayLogo, onError: () => setHideLogo(true), loading: "lazy" })),
|
|
223
|
-
domain),
|
|
224
|
-
React__default.createElement(Heading, { tag: "h6" }, displayTitle)))));
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
const CardReactionsContext = createContext({});
|
|
36
|
+
import { M as Modal } from './index-cfedca38.js';
|
|
37
|
+
import { useTogetherAuthRequiredAction } from './useTogetherAuthRequiredAction.js';
|
|
38
|
+
import './translationsContext-42a1fa63.js';
|
|
39
|
+
import 'string-format';
|
|
228
40
|
|
|
229
|
-
var styles$
|
|
41
|
+
var styles$f = {"row":"dZWeHns","flex":"_8z2nszB","mainTxt":"tMiOKib","subTxt":"uDcqD-2","subTxtRow":"pDlsows","subDivider":"m-HVXw1"};
|
|
230
42
|
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
} }), children));
|
|
43
|
+
const MainText = ({ children, className = '' }) => {
|
|
44
|
+
return React__default.createElement("div", { className: `${styles$f.mainTxt} ${className}` }, children);
|
|
45
|
+
};
|
|
46
|
+
const SubText = ({ children, className = '' }) => {
|
|
47
|
+
return React__default.createElement("div", { className: `${styles$f.subTxt} ${className}` }, children);
|
|
237
48
|
};
|
|
238
|
-
const
|
|
239
|
-
var { children, className = '' } = _a,
|
|
240
|
-
|
|
241
|
-
return (React__default.createElement(Box, Object.assign({ className: `${styles$k.wrapper} ${className}`, "data-event-category": trackingCategory, "data-event-action": "Share Icon Click", "data-event-label": trackingLabel }, boxProps, { onClick: () => {
|
|
242
|
-
onShareClick === null || onShareClick === void 0 ? void 0 : onShareClick();
|
|
243
|
-
} }), children));
|
|
49
|
+
const SubTextRow = (_a) => {
|
|
50
|
+
var { children, className = '' } = _a, rest = __rest(_a, ["children", "className"]);
|
|
51
|
+
return (React__default.createElement("div", Object.assign({ className: `${styles$f.subTxtRow} ${className}` }, rest), children));
|
|
244
52
|
};
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
53
|
+
const SubDivider = ({ className = '' }) => {
|
|
54
|
+
return React__default.createElement("span", { className: `${styles$f.subDivider} ${className}` });
|
|
55
|
+
};
|
|
56
|
+
const Row = ({ children, className = '' }) => {
|
|
57
|
+
return React__default.createElement("div", { className: `${styles$f.row} ${className} row` }, children);
|
|
58
|
+
};
|
|
59
|
+
const ColLeft = ({ children, className = '' }) => {
|
|
60
|
+
return React__default.createElement("div", { className: `${className} col-left` }, children);
|
|
61
|
+
};
|
|
62
|
+
const ColRight = ({ children, className = '' }) => {
|
|
63
|
+
return React__default.createElement("div", { className: `${className} col-right` }, children);
|
|
253
64
|
};
|
|
254
65
|
|
|
255
|
-
var styles$
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
const isMarryBaby = Boolean(isMarryBabyInit)
|
|
266
|
-
? isMarryBabyInit
|
|
267
|
-
: isMarryBabyEnv;
|
|
268
|
-
const { t } = useTranslations();
|
|
269
|
-
// /api/v1/auth/post?post_slug=test-post-title-3607&website_url={{website_url}}
|
|
270
|
-
return (React__default.createElement(CardReactionsContext.Provider, { value: {
|
|
271
|
-
liked,
|
|
272
|
-
loveCount,
|
|
273
|
-
trackingCategory,
|
|
274
|
-
trackingLabel,
|
|
275
|
-
isReplied,
|
|
276
|
-
onLikeClick,
|
|
277
|
-
onShareClick,
|
|
278
|
-
onCommentClick,
|
|
279
|
-
} }, children || (React__default.createElement("div", Object.assign({ className: `${styles$j.wrapper} ${className}`, "data-show-most-engaging": showingMostEngaging, "data-type": type === CardReactionType.post ? 'post' : 'reply', "data-reply-padding": type === CardReactionType.reply && replyPadding, "data-is-marrybaby": isMarryBaby, style: style }, rest),
|
|
280
|
-
React__default.createElement("div", { className: styles$j.inner },
|
|
281
|
-
React__default.createElement("div", { className: styles$j.column },
|
|
282
|
-
React__default.createElement(LikeWrapper, { className: styles$j.clickableIcon },
|
|
283
|
-
React__default.createElement(Text, { className: styles$j.iconTxt, size: "p3", as: "div" },
|
|
284
|
-
React__default.createElement(Heart, { className: "txt-icon", isMarryBaby: isMarryBaby, isSolid: liked, color: liked
|
|
285
|
-
? isMarryBaby
|
|
286
|
-
? theme.mbColors.pink
|
|
287
|
-
: theme.colors.red800
|
|
288
|
-
: '#737373' }),
|
|
289
|
-
hasCountLike && (React__default.createElement("div", { className: styles$j.count }, loveCount)))),
|
|
290
|
-
hasShare && (React__default.createElement(ShareWrapper, { className: styles$j.clickableIcon },
|
|
291
|
-
React__default.createElement(Text, { size: "p3", className: styles$j.iconTxt, as: "div" },
|
|
292
|
-
React__default.createElement(Icon.Share, { isMarryBaby: isMarryBaby })))),
|
|
293
|
-
typeof viewCount !== 'undefined' && (React__default.createElement(Text, { size: "p3", className: styles$j.iconTxt, as: "div" },
|
|
294
|
-
React__default.createElement(Icon.Eye, { isMarryBaby: isMarryBaby }),
|
|
295
|
-
React__default.createElement("div", { className: styles$j.count }, abbreviateNumber(viewCount))))),
|
|
296
|
-
!hideCommentIcon && (React__default.createElement(CommentWrapper, { className: styles$j.clickableIcon },
|
|
297
|
-
React__default.createElement(Text, { size: "p3", className: styles$j.iconTxt, as: "div" },
|
|
298
|
-
isReplied ? (React__default.createElement(Reply, { className: "txt-icon" })) : (React__default.createElement(Comment, { className: "txt-icon", isMarryBaby: isMarryBaby })),
|
|
299
|
-
isReplied ? (t('cardReactions.reply')) : (React__default.createElement("div", { className: styles$j.count }, t('post.commentCount', {
|
|
300
|
-
count: replyCount,
|
|
301
|
-
})))))))))));
|
|
66
|
+
var styles$e = {"container":"sTU4T4I","info":"tCql9Je","avatarWrapper":"_3j7uYhH","avatarIcon":"PHABgoT"};
|
|
67
|
+
|
|
68
|
+
const CardAuthor$1 = ({ avatarProps, title, subTitle, children, className = '', style, onAvatarClick, avatarIcon, dataEventCategory, dataEventAction, dataEventLabel, }) => {
|
|
69
|
+
return (React__default.createElement("div", { className: `${styles$e.container} ${className}`, style: style },
|
|
70
|
+
React__default.createElement("div", { className: styles$e.avatarWrapper, onClick: onAvatarClick, "data-event-category": dataEventCategory, "data-event-action": dataEventAction, "data-event-label": dataEventLabel },
|
|
71
|
+
React__default.createElement(UserAvatar, Object.assign({}, avatarProps)),
|
|
72
|
+
avatarIcon && React__default.createElement("div", { className: styles$e.avatarIcon }, avatarIcon)),
|
|
73
|
+
React__default.createElement("div", { className: `${styles$e.info} ${className}`, style: { minHeight: `${(avatarProps === null || avatarProps === void 0 ? void 0 : avatarProps.size) || 40}px` } }, children || (React__default.createElement(React__default.Fragment, null,
|
|
74
|
+
title && React__default.createElement(MainText, null, title),
|
|
75
|
+
subTitle && React__default.createElement(SubText, null, subTitle))))));
|
|
302
76
|
};
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
item: {
|
|
316
|
-
position: 'relative',
|
|
317
|
-
whiteSpace: 'nowrap',
|
|
318
|
-
padding: '5px 12px',
|
|
319
|
-
// border: '1px solid #e4e8ec',
|
|
320
|
-
background: theme.colors.gray[0],
|
|
321
|
-
borderRadius: '2rem',
|
|
322
|
-
cursor: 'pointer',
|
|
323
|
-
'-webkit-user-drag': 'none',
|
|
324
|
-
userSelect: 'none',
|
|
325
|
-
textDecoration: 'none',
|
|
326
|
-
'*': {
|
|
327
|
-
pointerEvents: 'none',
|
|
328
|
-
},
|
|
329
|
-
'&:first-child': {
|
|
330
|
-
marginLeft: 0,
|
|
77
|
+
CardAuthor$1.MainText = MainText;
|
|
78
|
+
CardAuthor$1.SubText = SubText;
|
|
79
|
+
CardAuthor$1.SubDivider = SubDivider;
|
|
80
|
+
CardAuthor$1.Row = Row;
|
|
81
|
+
CardAuthor$1.ColLeft = ColLeft;
|
|
82
|
+
CardAuthor$1.ColRight = ColRight;
|
|
83
|
+
CardAuthor$1.SubTextRow = SubTextRow;
|
|
84
|
+
|
|
85
|
+
var useStyles$2 = createStyles(() => {
|
|
86
|
+
return {
|
|
87
|
+
root: {
|
|
88
|
+
verticalAlign: 'bottom',
|
|
331
89
|
},
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
const {
|
|
339
|
-
|
|
340
|
-
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
const CardAuthorContext = createContext({});
|
|
94
|
+
|
|
95
|
+
const AuthorBadgeItem = ({ styles, className, classNames, }) => {
|
|
96
|
+
const { role, siteType, title } = useContext(CardAuthorContext);
|
|
97
|
+
const { cx, classes } = useStyles$2(undefined, {
|
|
98
|
+
name: 'AuthorBadgeItem',
|
|
341
99
|
styles,
|
|
342
|
-
|
|
100
|
+
classNames,
|
|
343
101
|
});
|
|
344
|
-
|
|
345
|
-
const [showAll, setShowAll] = useState(!shortenedStyle);
|
|
346
|
-
return (React__default.createElement("div", Object.assign({ onClick: onClick, className: `${classes.wrapper} ${className}`, style: style }, rest),
|
|
347
|
-
(showAll ? topics : topics.slice(0, shortenedNumber)).map((topic, index) => {
|
|
348
|
-
const isMonthTopic = (topic === null || topic === void 0 ? void 0 : topic.dueDateMonth) &&
|
|
349
|
-
(topic === null || topic === void 0 ? void 0 : topic.dueDateMonth) !== 0 &&
|
|
350
|
-
(topic === null || topic === void 0 ? void 0 : topic.dueDateYear) &&
|
|
351
|
-
(topic === null || topic === void 0 ? void 0 : topic.dueDateYear) !== 0;
|
|
352
|
-
return (React__default.createElement("a", { className: classes.item, key: index, "data-event-category": trackingCategory, "data-event-action": "Topic in Post Click", "data-event-label": `${getCurrentBaseUrl(locale)}${togetherBasePath}${topic.url}`, href: topic.isActive && !topic.isHidden
|
|
353
|
-
? `${togetherBasePath}${topic.url}/`
|
|
354
|
-
: undefined },
|
|
355
|
-
React__default.createElement(Text, { size: "p4" },
|
|
356
|
-
React__default.createElement("span", { style: Object.assign({}, (isMonthTopic && {
|
|
357
|
-
textTransform: 'capitalize',
|
|
358
|
-
})), dangerouslySetInnerHTML: {
|
|
359
|
-
__html: isMonthTopic
|
|
360
|
-
? `${format(new Date(2020, Number(topic.dueDateMonth) - 1, 1), 'MMMM', {
|
|
361
|
-
locale: DATE_FNS_LOCALE[locale],
|
|
362
|
-
})}${locale === LOCALE.Vietnam ? '/' : ' '}${topic === null || topic === void 0 ? void 0 : topic.dueDateYear}`
|
|
363
|
-
: (sanitizeFunction === null || sanitizeFunction === void 0 ? void 0 : sanitizeFunction(topic.name)) || topic.name,
|
|
364
|
-
} }))));
|
|
365
|
-
}),
|
|
366
|
-
!showAll && topics.length > shortenedNumber && (React__default.createElement("a", { className: classes.item, href: "#", onClick: (e) => {
|
|
367
|
-
e.preventDefault();
|
|
368
|
-
setShowAll(true);
|
|
369
|
-
} },
|
|
370
|
-
React__default.createElement(Text, { size: "p4" },
|
|
371
|
-
"+",
|
|
372
|
-
t('tagTopic.moreTopics', {
|
|
373
|
-
number: topics.length - shortenedNumber,
|
|
374
|
-
}))))));
|
|
102
|
+
return role ? (React__default.createElement(AuthorBadge, { className: cx(classes.root, className), siteType: siteType, role: role, title: title })) : null;
|
|
375
103
|
};
|
|
376
104
|
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
padding: 16px;
|
|
382
|
-
cursor: pointer;
|
|
383
|
-
&[data-color='gray'] {
|
|
384
|
-
background: ${theme.colors.neutral50};
|
|
385
|
-
}
|
|
386
|
-
&[data-color='white'] {
|
|
387
|
-
border-bottom: 1px solid #e4e8ec;
|
|
388
|
-
background: ${theme.colors.white};
|
|
389
|
-
}
|
|
105
|
+
const DisplayName = () => {
|
|
106
|
+
const { displayName } = useContext(CardAuthorContext);
|
|
107
|
+
return React__default.createElement(Box, null, displayName);
|
|
108
|
+
};
|
|
390
109
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
padding: 8px 0 !important;
|
|
397
|
-
border: none;
|
|
398
|
-
margin-left: 0.5rem;
|
|
399
|
-
background: transparent;
|
|
400
|
-
> span {
|
|
401
|
-
display: flex;
|
|
402
|
-
align-items: center;
|
|
403
|
-
}
|
|
110
|
+
var useStyles$1 = createStyles(() => {
|
|
111
|
+
return {
|
|
112
|
+
root: {},
|
|
113
|
+
};
|
|
114
|
+
});
|
|
404
115
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
116
|
+
const StyledPopup$2 = styled.div `
|
|
117
|
+
position: fixed;
|
|
118
|
+
left: 50%;
|
|
119
|
+
width: 343px;
|
|
120
|
+
background-color: ${theme.colors.white};
|
|
121
|
+
border-radius: ${theme.borderRadius};
|
|
122
|
+
box-shadow: 0px 0px 4px ${theme.colors.gray200};
|
|
123
|
+
transform: translate(-50%, -50%);
|
|
124
|
+
transition: all 0.5s ease-in-out;
|
|
125
|
+
|
|
126
|
+
${MediaQueries.tdUp} {
|
|
127
|
+
width: 750px;
|
|
408
128
|
}
|
|
409
129
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
.label-sort-pin-icon {
|
|
413
|
-
width: 16px;
|
|
414
|
-
height: 16px;
|
|
415
|
-
vertical-align: middle;
|
|
416
|
-
}
|
|
130
|
+
&[data-animation='true'] {
|
|
131
|
+
transition: all 0.5s ease-in-out;
|
|
417
132
|
}
|
|
418
133
|
|
|
419
|
-
&[data-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
&[data-color='gray'] {
|
|
426
|
-
background: #f3f3f3;
|
|
427
|
-
}
|
|
428
|
-
.popover-menu__btn {
|
|
429
|
-
width: unset;
|
|
430
|
-
}
|
|
134
|
+
&[data-open='true'] {
|
|
135
|
+
z-index: 400;
|
|
136
|
+
top: 50%;
|
|
137
|
+
opacity: 1;
|
|
138
|
+
visibility: visible;
|
|
139
|
+
}
|
|
431
140
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
.label-sort-pin-heading {
|
|
440
|
-
color: #fb8c00;
|
|
441
|
-
}
|
|
141
|
+
&[data-open='false'] {
|
|
142
|
+
top: -50%;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.popup-content {
|
|
146
|
+
${MediaQueries.mbDown} {
|
|
147
|
+
display: block;
|
|
442
148
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
149
|
+
display: flex;
|
|
150
|
+
position: relative;
|
|
151
|
+
z-index: 111;
|
|
152
|
+
height: 100%;
|
|
153
|
+
.button-see-more {
|
|
154
|
+
margin: 32px 0;
|
|
155
|
+
padding: 0;
|
|
156
|
+
> * {
|
|
157
|
+
display: inline-block;
|
|
447
158
|
}
|
|
448
159
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
var img$H = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m3.5 20 4.37-4.37'/%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4.956 11.294a1 1 0 0 0 0 1.414l2.918 2.918 2.918 2.918a1 1 0 0 0 1.414 0l1.175-1.175a1 1 0 0 0 .293-.707v-3.936l2.9-2.9 2.31.123c.282.015.56-.091.76-.291l.573-.574a1 1 0 0 0 0-1.414l-4.386-4.386a1 1 0 0 0-1.414 0l-.574.574a1 1 0 0 0-.29.76l.122 2.309-2.9 2.9H6.838a1 1 0 0 0-.707.293z' clip-rule='evenodd'/%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m16.57 9.83-2.9-2.9'/%3e%3c/svg%3e";
|
|
460
|
-
var MBPinOrange = img$H;
|
|
461
|
-
|
|
462
|
-
var img$G = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23FEA21E' stroke-linecap='round' d='m7.186 7.682-3.504 6.132'/%3e%3cpath fill='%23FEA21E' stroke='%23FEA21E' stroke-linejoin='round' stroke-width='.5' d='M3.246 7.784a.25.25 0 0 0 .091.342l5.447 3.145a.25.25 0 0 0 .342-.092 3.39 3.39 0 0 0 .11-3.186l1.622-2.808a2.66 2.66 0 0 0 1.606-1.239.25.25 0 0 0-.092-.341l-4.19-2.42a.25.25 0 0 0-.341.092 2.66 2.66 0 0 0-.27 2.01L5.949 6.095a3.39 3.39 0 0 0-2.703 1.69Z'/%3e%3c/svg%3e";
|
|
463
|
-
var IconPinYellow = img$G;
|
|
464
|
-
|
|
465
|
-
const LabelPin = ({ onClick, color, className, style }) => {
|
|
466
|
-
const { data: { env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
|
|
467
|
-
const { t } = useTranslations();
|
|
468
|
-
return (React__default.createElement(LabelSortPin, { label: React__default.createElement(React__default.Fragment, null,
|
|
469
|
-
isMarryBaby && (React__default.createElement("img", { className: "label-sort-pin-icon", src: MBPinOrange, loading: "lazy" })),
|
|
470
|
-
' ',
|
|
471
|
-
t('label.pinnedPost')), rightLabel: !isMarryBaby && (React__default.createElement("img", { className: "label-sort-pin-icon", src: IconPinYellow, loading: "lazy" })), onClick: onClick, color: 'white' , className: `label-pinned ${className}`, style: style }));
|
|
472
|
-
};
|
|
473
|
-
|
|
474
|
-
var img$F = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%233E3F58' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m8 14 4 4 4-4M16 10l-4-4-4 4'/%3e%3c/svg%3e";
|
|
475
|
-
var MBSortBy = img$F;
|
|
476
|
-
|
|
477
|
-
var img$E = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%238C8C8C' d='M4.5 7h7a.46.46 0 0 0 .351-.165.56.56 0 0 0 .149-.39q0-.226-.149-.391l-3.5-3.89a.458.458 0 0 0-.703 0l-3.5 3.89a.56.56 0 0 0-.148.39q0 .226.148.391Q4.298 7 4.5 7M11.5 9h-7a.46.46 0 0 0-.352.165.56.56 0 0 0-.148.39q0 .226.148.391l3.5 3.889a.46.46 0 0 0 .703 0l3.5-3.889a.56.56 0 0 0 .149-.39q0-.226-.149-.391A.46.46 0 0 0 11.5 9'/%3e%3c/svg%3e";
|
|
478
|
-
var IconSortArrow = img$E;
|
|
479
|
-
|
|
480
|
-
const StyledPopoverMenu = styled.div `
|
|
481
|
-
position: relative;
|
|
482
|
-
display: content;
|
|
483
|
-
|
|
484
|
-
.popover-menu__btn {
|
|
485
|
-
/* position: relative; */
|
|
486
|
-
> span {
|
|
487
|
-
width: 100%;
|
|
488
|
-
height: 100%;
|
|
489
|
-
> img {
|
|
160
|
+
.close-button {
|
|
161
|
+
position: absolute;
|
|
162
|
+
z-index: 100;
|
|
163
|
+
top: 10px;
|
|
164
|
+
right: 10px;
|
|
165
|
+
cursor: pointer;
|
|
166
|
+
width: unset;
|
|
167
|
+
height: unset;
|
|
168
|
+
img {
|
|
490
169
|
width: 100%;
|
|
491
170
|
height: 100%;
|
|
171
|
+
border-radius: 50%;
|
|
492
172
|
}
|
|
493
173
|
}
|
|
494
174
|
}
|
|
495
175
|
|
|
496
|
-
.
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
border-radius: 8px;
|
|
504
|
-
box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.1);
|
|
505
|
-
|
|
506
|
-
&::before {
|
|
507
|
-
position: absolute;
|
|
508
|
-
width: 16px;
|
|
509
|
-
height: 8px;
|
|
510
|
-
background: #fff;
|
|
511
|
-
content: '';
|
|
176
|
+
.main-info {
|
|
177
|
+
padding-bottom: 32px;
|
|
178
|
+
background-color: ${theme.colors.primary50};
|
|
179
|
+
border-radius: ${theme.borderRadius};
|
|
180
|
+
.btn-booking {
|
|
181
|
+
display: flex;
|
|
182
|
+
margin: 12px auto;
|
|
512
183
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
&.--align {
|
|
519
|
-
&-start {
|
|
520
|
-
left: 0;
|
|
521
|
-
|
|
522
|
-
&::before {
|
|
523
|
-
top: 100%;
|
|
524
|
-
left: 16px;
|
|
525
|
-
clip-path: polygon(0 0, 50% 100%, 100% 0);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
&-end {
|
|
530
|
-
left: 100%;
|
|
531
|
-
transform: translateX(calc(-100% + 1rem));
|
|
532
|
-
|
|
533
|
-
&::before {
|
|
534
|
-
top: 100%;
|
|
535
|
-
right: 16px;
|
|
536
|
-
clip-path: polygon(0 0, 50% 100%, 100% 0);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
&-right {
|
|
543
|
-
left: calc(100% + 8px);
|
|
544
|
-
|
|
545
|
-
&.--align {
|
|
546
|
-
&-start {
|
|
547
|
-
top: 0;
|
|
548
|
-
|
|
549
|
-
&::before {
|
|
550
|
-
top: 16px;
|
|
551
|
-
left: 0;
|
|
552
|
-
width: 8px;
|
|
553
|
-
height: 16px;
|
|
554
|
-
clip-path: polygon(0 50%, 100% 0%, 100% 100%);
|
|
555
|
-
transform: translateX(-100%);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
&-end {
|
|
560
|
-
top: 100%;
|
|
561
|
-
transform: translateX(calc(-100% + 1rem));
|
|
562
|
-
|
|
563
|
-
&::before {
|
|
564
|
-
bottom: 16px;
|
|
565
|
-
left: 0;
|
|
566
|
-
width: 8px;
|
|
567
|
-
height: 16px;
|
|
568
|
-
clip-path: polygon(0 50%, 100% 0%, 100% 100%);
|
|
569
|
-
transform: translateX(-100%);
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
&-bottom {
|
|
576
|
-
top: calc(100% + 8px);
|
|
577
|
-
|
|
578
|
-
&.--align {
|
|
579
|
-
&-start {
|
|
580
|
-
left: 0;
|
|
581
|
-
|
|
582
|
-
&::before {
|
|
583
|
-
bottom: 100%;
|
|
584
|
-
left: 16px;
|
|
585
|
-
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
&-end {
|
|
590
|
-
left: 100%;
|
|
591
|
-
transform: translateX(calc(-100% + 1rem));
|
|
592
|
-
|
|
593
|
-
&::before {
|
|
594
|
-
right: 16px;
|
|
595
|
-
bottom: 100%;
|
|
596
|
-
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
&-left {
|
|
603
|
-
left: -8px;
|
|
604
|
-
transform: translateX(-100%);
|
|
605
|
-
|
|
606
|
-
&.--align {
|
|
607
|
-
&-start {
|
|
608
|
-
top: 0;
|
|
609
|
-
|
|
610
|
-
&::before {
|
|
611
|
-
top: 16px;
|
|
612
|
-
left: 100%;
|
|
613
|
-
width: 8px;
|
|
614
|
-
height: 16px;
|
|
615
|
-
clip-path: polygon(0 0%, 100% 50%, 0% 100%);
|
|
616
|
-
transform: translateX(0);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
&-end {
|
|
621
|
-
bottom: 0;
|
|
622
|
-
|
|
623
|
-
&::before {
|
|
624
|
-
bottom: 16px;
|
|
625
|
-
left: 100%;
|
|
626
|
-
width: 8px;
|
|
627
|
-
height: 16px;
|
|
628
|
-
clip-path: polygon(0 0%, 100% 50%, 0% 100%);
|
|
629
|
-
transform: translateX(0);
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
}
|
|
184
|
+
.avatar-title {
|
|
185
|
+
position: relative;
|
|
186
|
+
width: 100%;
|
|
187
|
+
padding-top: 46px;
|
|
188
|
+
text-align: center;
|
|
634
189
|
}
|
|
635
190
|
}
|
|
191
|
+
`;
|
|
192
|
+
const StyledPopupWrapper$2 = styled.div `
|
|
193
|
+
position: fixed;
|
|
194
|
+
z-index: 110;
|
|
195
|
+
top: 0;
|
|
196
|
+
left: 0;
|
|
197
|
+
width: 100%;
|
|
198
|
+
height: 100%;
|
|
199
|
+
align-items: center;
|
|
200
|
+
background: rgba(38, 38, 38, 0.3);
|
|
636
201
|
|
|
637
|
-
&[data-
|
|
638
|
-
|
|
639
|
-
padding: 0;
|
|
640
|
-
border-radius: 12px;
|
|
641
|
-
/* &::before {
|
|
642
|
-
display: none;
|
|
643
|
-
} */
|
|
644
|
-
}
|
|
202
|
+
&[data-open='false'] {
|
|
203
|
+
display: none;
|
|
645
204
|
}
|
|
646
205
|
`;
|
|
647
|
-
const
|
|
206
|
+
const StyledProfileImage$2 = styled.div `
|
|
207
|
+
.image-container {
|
|
208
|
+
.badge-avatar {
|
|
209
|
+
position: absolute;
|
|
210
|
+
right: 0;
|
|
211
|
+
bottom: 0;
|
|
212
|
+
top: 0;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
648
215
|
display: flex;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
216
|
+
justify-content: center;
|
|
217
|
+
padding-bottom: 15px;
|
|
218
|
+
text-align: center;
|
|
219
|
+
.profile-image {
|
|
220
|
+
width: 100px;
|
|
221
|
+
min-width: 100px;
|
|
222
|
+
height: 100px;
|
|
223
|
+
min-height: 100px;
|
|
224
|
+
border-radius: 50%;
|
|
225
|
+
object-fit: cover;
|
|
226
|
+
}
|
|
227
|
+
.badge-avatar {
|
|
228
|
+
width: 24px;
|
|
229
|
+
height: 24px;
|
|
230
|
+
}
|
|
231
|
+
`;
|
|
232
|
+
const StyledTitleContainer$2 = styled.div `
|
|
233
|
+
position: relative;
|
|
234
|
+
z-index: 9;
|
|
235
|
+
.specialty {
|
|
655
236
|
display: flex;
|
|
656
|
-
|
|
237
|
+
flex-wrap: wrap;
|
|
657
238
|
justify-content: center;
|
|
658
|
-
|
|
659
|
-
margin-bottom: 8px;
|
|
239
|
+
}
|
|
660
240
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
width: 16px;
|
|
666
|
-
height: 16px;
|
|
667
|
-
cursor: pointer;
|
|
668
|
-
transform: translateY(-50%);
|
|
669
|
-
}
|
|
241
|
+
padding: 0px 16px;
|
|
242
|
+
text-align: center;
|
|
243
|
+
.specialty {
|
|
244
|
+
justify-content: center;
|
|
670
245
|
}
|
|
671
246
|
|
|
672
|
-
.
|
|
673
|
-
padding
|
|
674
|
-
padding-left: 8px;
|
|
675
|
-
margin-top: -8px;
|
|
676
|
-
margin-bottom: 8px;
|
|
677
|
-
font-size: 14px;
|
|
678
|
-
font-weight: 400;
|
|
679
|
-
line-height: 22px;
|
|
247
|
+
.experience {
|
|
248
|
+
padding: 16px 0px 32px;
|
|
680
249
|
text-align: left;
|
|
250
|
+
.btn-wrapper {
|
|
251
|
+
margin-top: 24px;
|
|
252
|
+
}
|
|
681
253
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
254
|
+
p {
|
|
255
|
+
max-width: 100%;
|
|
256
|
+
-webkit-line-clamp: 4;
|
|
257
|
+
-webkit-box-orient: vertical;
|
|
258
|
+
text-overflow: ellipsis;
|
|
259
|
+
overflow: hidden;
|
|
686
260
|
}
|
|
261
|
+
`;
|
|
262
|
+
const StyledExperienceList = styled.ul `
|
|
263
|
+
padding-left: 18px;
|
|
264
|
+
li {
|
|
265
|
+
list-style-type: disc;
|
|
266
|
+
}
|
|
267
|
+
`;
|
|
687
268
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
position: relative;
|
|
691
|
-
&.bold-item {
|
|
692
|
-
font-weight: 700;
|
|
693
|
-
}
|
|
694
|
-
&:last-child {
|
|
695
|
-
.__btn {
|
|
696
|
-
margin-bottom: 0;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
.__btn {
|
|
701
|
-
position: relative;
|
|
702
|
-
display: flex;
|
|
703
|
-
width: 100%;
|
|
704
|
-
height: 40px;
|
|
705
|
-
align-items: center;
|
|
706
|
-
padding: 0 1rem;
|
|
707
|
-
border: none;
|
|
708
|
-
margin-bottom: 8px;
|
|
709
|
-
color: ${theme.colors.gray800};
|
|
710
|
-
cursor: pointer;
|
|
711
|
-
text-align: left;
|
|
712
|
-
transition: background 0.3s;
|
|
713
|
-
|
|
714
|
-
/* for better gtm tracking result */
|
|
715
|
-
* {
|
|
716
|
-
pointer-events: none;
|
|
717
|
-
}
|
|
718
|
-
&.--checked {
|
|
719
|
-
color: ${theme.colors.gray500};
|
|
720
|
-
pointer-events: none;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
&:hover {
|
|
724
|
-
background: ${theme.colors.gray100};
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
.__icon {
|
|
728
|
-
width: 16px;
|
|
729
|
-
height: 16px;
|
|
730
|
-
margin-right: 0.4rem;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
& > span {
|
|
734
|
-
position: relative;
|
|
269
|
+
var img$p = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e";
|
|
270
|
+
var CloseLight = img$p;
|
|
735
271
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
height: 16px;
|
|
739
|
-
margin-right: 0.4rem;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
272
|
+
var img$o = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3e%3cpath fill='white' stroke='%23E4E8EC' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16'/%3e%3cpath fill='%23FF5331' d='M10.333 7.667V5H7.667v2.667H5v2.667h2.667V13h2.666v-2.666H13V7.667z'/%3e%3c/svg%3e";
|
|
273
|
+
var ReviewerMedical = img$o;
|
|
743
274
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
275
|
+
const StyledLoading = styled.div `
|
|
276
|
+
display: flex;
|
|
277
|
+
align-items: center;
|
|
278
|
+
justify-content: center;
|
|
279
|
+
padding: 1em;
|
|
280
|
+
button {
|
|
281
|
+
position: relative;
|
|
282
|
+
}
|
|
283
|
+
`;
|
|
284
|
+
const circle = keyframes `
|
|
285
|
+
0% {
|
|
286
|
+
transform: rotate(0deg);
|
|
287
|
+
}
|
|
288
|
+
100% {
|
|
289
|
+
transform: rotate(360deg);
|
|
290
|
+
}
|
|
291
|
+
`;
|
|
292
|
+
styled.div `
|
|
293
|
+
display: flex;
|
|
294
|
+
width: fit-content;
|
|
295
|
+
width: -moz-fit-content;
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
align-items: center;
|
|
298
|
+
justify-content: center;
|
|
299
|
+
padding: 1rem 2rem;
|
|
300
|
+
background: white;
|
|
301
|
+
border-radius: ${theme.borderRadius};
|
|
302
|
+
box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),
|
|
303
|
+
-2px 2px 5px rgba(67, 86, 100, 0.123689);
|
|
304
|
+
.loading-spinner {
|
|
305
|
+
width: 24px;
|
|
306
|
+
height: 24px;
|
|
307
|
+
margin-bottom: 0.5rem;
|
|
308
|
+
animation: ${circle} 1.2s linear infinite;
|
|
754
309
|
}
|
|
755
310
|
&[data-is-marrybaby='true'] {
|
|
756
|
-
|
|
757
|
-
padding: 1rem;
|
|
758
|
-
}
|
|
759
|
-
.tree-text-description {
|
|
760
|
-
padding: 0 1rem;
|
|
761
|
-
}
|
|
762
|
-
.__list {
|
|
763
|
-
.__item {
|
|
764
|
-
&:first-child {
|
|
765
|
-
.__btn {
|
|
766
|
-
border-top-left-radius: 12px;
|
|
767
|
-
border-top-right-radius: 12px;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
&:last-child {
|
|
771
|
-
.__btn {
|
|
772
|
-
border-bottom-left-radius: 12px;
|
|
773
|
-
border-bottom-right-radius: 12px;
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
.__btn {
|
|
777
|
-
height: unset;
|
|
778
|
-
padding: 1rem;
|
|
779
|
-
margin-bottom: 0;
|
|
780
|
-
&:hover {
|
|
781
|
-
background: ${theme.mbColors.lightPink};
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}
|
|
311
|
+
box-shadow: none;
|
|
786
312
|
}
|
|
787
313
|
`;
|
|
788
314
|
|
|
789
|
-
const
|
|
790
|
-
const {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
const isShowRef = useRef(isShow);
|
|
794
|
-
useEffect(() => {
|
|
795
|
-
var _a;
|
|
796
|
-
isShowRef.current = isShow;
|
|
797
|
-
if (!isShow)
|
|
798
|
-
return;
|
|
799
|
-
(_a = popoverContent.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
800
|
-
}, [isShow]);
|
|
801
|
-
useEffect(() => {
|
|
802
|
-
const clickHandler = (e) => {
|
|
803
|
-
var _a;
|
|
804
|
-
if (!((_a = popoverContent.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) &&
|
|
805
|
-
isShowRef.current)
|
|
806
|
-
setIsShow(false);
|
|
807
|
-
};
|
|
808
|
-
window.addEventListener('click', clickHandler, {
|
|
809
|
-
passive: true,
|
|
810
|
-
});
|
|
811
|
-
return () => {
|
|
812
|
-
window.removeEventListener('click', clickHandler);
|
|
813
|
-
};
|
|
814
|
-
}, []);
|
|
815
|
-
return (React__default.createElement(StyledPopoverMenu, { "data-is-marrybaby": isMarryBaby, className: className, style: style },
|
|
816
|
-
React__default.createElement(Button, Object.assign({ theme: isMarryBaby ? 'marryBaby' : 'helloSites', className: "popover-menu__btn", size: "md", color: "transparent", onClick: () => setIsShow((v) => !v) }, buttonProps), toggleButtonContent),
|
|
817
|
-
isShow ? (React__default.createElement("div", { ref: popoverContent, className: `popover-menu__content --position-${position} --align-${align}`, tabIndex: 0, onClick: (e) => e.stopPropagation() }, typeof children === 'function'
|
|
818
|
-
? children({
|
|
819
|
-
setShow: setIsShow,
|
|
820
|
-
})
|
|
821
|
-
: children)) : null));
|
|
315
|
+
const Loading$1 = ({ className, size = 'md' }) => {
|
|
316
|
+
const { t } = useTranslations();
|
|
317
|
+
return (React__default.createElement(StyledLoading, { className: className },
|
|
318
|
+
React__default.createElement(Button, { size: size, color: "transparent", isLoading: true }, t('loading'))));
|
|
822
319
|
};
|
|
823
320
|
|
|
824
|
-
|
|
825
|
-
var
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
currentData.type === 'jsx'
|
|
871
|
-
? (_a = currentData === null || currentData === void 0 ? void 0 : currentData.jsxRenderer) === null || _a === void 0 ? void 0 : _a.call(currentData, setShow)
|
|
872
|
-
: null,
|
|
873
|
-
currentData.type === 'list' ? (React__default.createElement("ul", { className: "__list" }, Array.isArray(currentData.list)
|
|
874
|
-
? currentData.list.map((item, index) => (React__default.createElement("li", { key: index, style: item.style, className: `__item ${item.className}` },
|
|
875
|
-
' ',
|
|
876
|
-
React__default.createElement("div", { className: `__btn ${item.selected ? '--checked' : ''}`, onClick: () => handleItemClick(index, item), "data-event-category": item.dataEventCategory, "data-event-action": item.dataEventAction, "data-event-label": item.dataEventLabel },
|
|
877
|
-
item.icon && (React__default.createElement("img", { className: "__icon", src: item.icon, loading: "lazy" })),
|
|
878
|
-
React__default.createElement("span", null, item.label)),
|
|
879
|
-
item.subTree ? (React__default.createElement("img", { className: "__toggle", src: IconChevronRightDark, loading: "lazy" })) : null,
|
|
880
|
-
item.selected ? (React__default.createElement("img", { className: "__toggle", src: IconCheckGray, loading: "lazy" })) : null)))
|
|
881
|
-
: null)) : null)));
|
|
882
|
-
};
|
|
883
|
-
|
|
884
|
-
var LabelSortingValue;
|
|
885
|
-
(function (LabelSortingValue) {
|
|
886
|
-
LabelSortingValue["latest"] = "latest";
|
|
887
|
-
LabelSortingValue["oldest"] = "oldest";
|
|
888
|
-
LabelSortingValue["popular"] = "popular";
|
|
889
|
-
})(LabelSortingValue || (LabelSortingValue = {}));
|
|
890
|
-
const LabelSorting = ({ onChange, className, style, leftLabel, rightLabel, color, value, choices, }) => {
|
|
891
|
-
const { data: { env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
|
|
892
|
-
return (React__default.createElement(LabelSortPin, { label: leftLabel, rightLabel: React__default.createElement(TreePopoverMenu, { position: "bottom", align: "end", data: {
|
|
893
|
-
isShowheader: false,
|
|
894
|
-
type: 'list',
|
|
895
|
-
list: choices.map((c) => ({
|
|
896
|
-
label: c.label,
|
|
897
|
-
onClick: () => onChange && onChange(String(c.value)),
|
|
898
|
-
selected: c.value === value,
|
|
899
|
-
className: 'bold-item',
|
|
900
|
-
})),
|
|
901
|
-
}, toggleButtonContent: React__default.createElement("div", { style: {
|
|
902
|
-
display: 'flex',
|
|
903
|
-
} },
|
|
904
|
-
React__default.createElement(Text, { style: {
|
|
905
|
-
display: 'flex',
|
|
906
|
-
alignItems: 'center',
|
|
907
|
-
fontWeight: 'normal',
|
|
908
|
-
marginRight: 12,
|
|
909
|
-
}, size: "p4" }, rightLabel),
|
|
910
|
-
React__default.createElement("img", { src: isMarryBaby ? MBSortBy : IconSortArrow, style: {
|
|
911
|
-
width: 16,
|
|
912
|
-
height: 16,
|
|
913
|
-
alignSelf: 'center',
|
|
914
|
-
}, loading: "lazy" })) }), color: 'gray' , className: className, style: style }));
|
|
915
|
-
};
|
|
916
|
-
|
|
917
|
-
var styles$i = {"row":"dZWeHns","flex":"_8z2nszB","mainTxt":"tMiOKib","subTxt":"uDcqD-2","subTxtRow":"pDlsows","subDivider":"m-HVXw1"};
|
|
918
|
-
|
|
919
|
-
const MainText = ({ children, className = '' }) => {
|
|
920
|
-
return React__default.createElement("div", { className: `${styles$i.mainTxt} ${className}` }, children);
|
|
921
|
-
};
|
|
922
|
-
const SubText = ({ children, className = '' }) => {
|
|
923
|
-
return React__default.createElement("div", { className: `${styles$i.subTxt} ${className}` }, children);
|
|
924
|
-
};
|
|
925
|
-
const SubTextRow = (_a) => {
|
|
926
|
-
var { children, className = '' } = _a, rest = __rest(_a, ["children", "className"]);
|
|
927
|
-
return (React__default.createElement("div", Object.assign({ className: `${styles$i.subTxtRow} ${className}` }, rest), children));
|
|
928
|
-
};
|
|
929
|
-
const SubDivider = ({ className = '' }) => {
|
|
930
|
-
return React__default.createElement("span", { className: `${styles$i.subDivider} ${className}` });
|
|
931
|
-
};
|
|
932
|
-
const Row = ({ children, className = '' }) => {
|
|
933
|
-
return React__default.createElement("div", { className: `${styles$i.row} ${className} row` }, children);
|
|
934
|
-
};
|
|
935
|
-
const ColLeft = ({ children, className = '' }) => {
|
|
936
|
-
return React__default.createElement("div", { className: `${className} col-left` }, children);
|
|
937
|
-
};
|
|
938
|
-
const ColRight = ({ children, className = '' }) => {
|
|
939
|
-
return React__default.createElement("div", { className: `${className} col-right` }, children);
|
|
940
|
-
};
|
|
941
|
-
|
|
942
|
-
var styles$h = {"container":"sTU4T4I","info":"tCql9Je","avatarWrapper":"_3j7uYhH","avatarIcon":"PHABgoT"};
|
|
943
|
-
|
|
944
|
-
const CardAuthor$1 = ({ avatarProps, title, subTitle, children, className = '', style, onAvatarClick, avatarIcon, dataEventCategory, dataEventAction, dataEventLabel, }) => {
|
|
945
|
-
return (React__default.createElement("div", { className: `${styles$h.container} ${className}`, style: style },
|
|
946
|
-
React__default.createElement("div", { className: styles$h.avatarWrapper, onClick: onAvatarClick, "data-event-category": dataEventCategory, "data-event-action": dataEventAction, "data-event-label": dataEventLabel },
|
|
947
|
-
React__default.createElement(UserAvatar, Object.assign({}, avatarProps)),
|
|
948
|
-
avatarIcon && React__default.createElement("div", { className: styles$h.avatarIcon }, avatarIcon)),
|
|
949
|
-
React__default.createElement("div", { className: `${styles$h.info} ${className}`, style: { minHeight: `${(avatarProps === null || avatarProps === void 0 ? void 0 : avatarProps.size) || 40}px` } }, children || (React__default.createElement(React__default.Fragment, null,
|
|
950
|
-
title && React__default.createElement(MainText, null, title),
|
|
951
|
-
subTitle && React__default.createElement(SubText, null, subTitle))))));
|
|
952
|
-
};
|
|
953
|
-
CardAuthor$1.MainText = MainText;
|
|
954
|
-
CardAuthor$1.SubText = SubText;
|
|
955
|
-
CardAuthor$1.SubDivider = SubDivider;
|
|
956
|
-
CardAuthor$1.Row = Row;
|
|
957
|
-
CardAuthor$1.ColLeft = ColLeft;
|
|
958
|
-
CardAuthor$1.ColRight = ColRight;
|
|
959
|
-
CardAuthor$1.SubTextRow = SubTextRow;
|
|
960
|
-
|
|
961
|
-
var useStyles$2 = createStyles(() => {
|
|
962
|
-
return {
|
|
963
|
-
root: {
|
|
964
|
-
verticalAlign: 'bottom',
|
|
965
|
-
},
|
|
321
|
+
const PopupDoctor = ({ isOpen = true, onClose, enableAnimation = true, doctorId, locale, isMobile, overwriteProfileProps, avatarFallback = CommonGAssets.getAssetPath('avatar.jpg'), trackingCategory = 'Together', }) => {
|
|
322
|
+
var _a, _b, _c;
|
|
323
|
+
const { t } = useTranslations();
|
|
324
|
+
const [doctorInfo, setDoctorInfo] = useState(null);
|
|
325
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
326
|
+
useEffect(() => {
|
|
327
|
+
if (isOpen && doctorId && String(doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.id) !== String(doctorId)) {
|
|
328
|
+
setIsLoading(true);
|
|
329
|
+
try {
|
|
330
|
+
setDoctorInfo(null);
|
|
331
|
+
callApi(getCarePath(CARE_PATHS.GET_DOCTOR_INFO, {
|
|
332
|
+
doctorId: doctorId,
|
|
333
|
+
website_url: domainLocales[locale],
|
|
334
|
+
}), 'get').then((res) => {
|
|
335
|
+
setDoctorInfo(Object.assign(Object.assign({}, res === null || res === void 0 ? void 0 : res._data.doctor), overwriteProfileProps));
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
catch (error) {
|
|
339
|
+
console.error(error);
|
|
340
|
+
}
|
|
341
|
+
setIsLoading(false);
|
|
342
|
+
}
|
|
343
|
+
}, [isOpen, doctorId, doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.id]);
|
|
344
|
+
const experiences = (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.experiences) || [];
|
|
345
|
+
const specialty = (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.specialties) || [];
|
|
346
|
+
const specialtiesList = specialty
|
|
347
|
+
.map((specialty) => (specialty === null || specialty === void 0 ? void 0 : specialty.name) || specialty)
|
|
348
|
+
.join(' • ');
|
|
349
|
+
const formattedExperiences = experiences
|
|
350
|
+
.map((experience) => {
|
|
351
|
+
try {
|
|
352
|
+
return JSON.parse(experience.description);
|
|
353
|
+
}
|
|
354
|
+
catch (e) {
|
|
355
|
+
return experience.description;
|
|
356
|
+
}
|
|
357
|
+
})
|
|
358
|
+
.filter((e) => e.content);
|
|
359
|
+
const renderExperienceText = (experience) => {
|
|
360
|
+
if (experience === null || experience === void 0 ? void 0 : experience.year)
|
|
361
|
+
return `${experience.year} ${experience === null || experience === void 0 ? void 0 : experience.content}`;
|
|
362
|
+
if (experience === null || experience === void 0 ? void 0 : experience.content)
|
|
363
|
+
return experience.content;
|
|
364
|
+
if (typeof experience === 'string')
|
|
365
|
+
return experience;
|
|
366
|
+
return '';
|
|
966
367
|
};
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
368
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
369
|
+
React__default.createElement(StyledPopup$2, { "data-open": isOpen, "data-animation": enableAnimation, onClick: (e) => e.stopPropagation() }, isLoading || !doctorInfo ? (React__default.createElement(Loading$1, null)) : (React__default.createElement("div", { className: "popup-content" },
|
|
370
|
+
React__default.createElement("div", { className: "close-button", onClick: onClose },
|
|
371
|
+
React__default.createElement("img", { src: CloseLight, style: { width: 20, height: 20 }, alt: "close-icon", loading: "lazy" })),
|
|
372
|
+
React__default.createElement("div", { className: "main-info" },
|
|
373
|
+
React__default.createElement("div", { className: "border-banner" }),
|
|
374
|
+
React__default.createElement("div", { className: "avatar-title" },
|
|
375
|
+
React__default.createElement(StyledProfileImage$2, null,
|
|
376
|
+
React__default.createElement("div", { className: "image-container" },
|
|
377
|
+
React__default.createElement("div", { style: { position: 'relative' } },
|
|
378
|
+
React__default.createElement(ImageWrap, { src: doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.avatar, backupSrc: avatarFallback, className: "profile-image", alt: "avatar" }),
|
|
379
|
+
React__default.createElement("img", { className: "badge-avatar", src: ReviewerMedical, alt: "badge", loading: "lazy" })))),
|
|
380
|
+
React__default.createElement(StyledTitleContainer$2, null,
|
|
381
|
+
React__default.createElement(Text, { size: "s3", weight: "semiBold", className: "full-name" }, doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.name),
|
|
382
|
+
React__default.createElement("div", { className: "specialty" },
|
|
383
|
+
specialtiesList && (React__default.createElement(React__default.Fragment, null,
|
|
384
|
+
React__default.createElement(Text, { size: "p4", color: theme.colors.gray800 },
|
|
385
|
+
specialtiesList,
|
|
386
|
+
' • '))),
|
|
387
|
+
React__default.createElement("a", { href: getCareHospitalUrl({
|
|
388
|
+
id: (_a = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _a === void 0 ? void 0 : _a.id,
|
|
389
|
+
name: (_b = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _b === void 0 ? void 0 : _b.name,
|
|
390
|
+
slug: (_c = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _c === void 0 ? void 0 : _c.slug,
|
|
391
|
+
locale,
|
|
392
|
+
}), className: "organisation", target: "_blank", rel: "noreferrer" },
|
|
393
|
+
React__default.createElement(Text, { size: "p4", className: "organisation", color: theme.colors.gray800, style: { textDecoration: 'underline' } }, doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization.name))))),
|
|
394
|
+
!isMobile && (React__default.createElement("div", { className: "btn-wrapper" },
|
|
395
|
+
React__default.createElement("a", { href: getCareDoctorUrl({
|
|
396
|
+
name: doctorInfo.name,
|
|
397
|
+
id: doctorInfo.id,
|
|
398
|
+
locale: locale,
|
|
399
|
+
}) },
|
|
400
|
+
React__default.createElement(Button, { color: "primary", size: "md", className: "btn-booking" }, t('careBooking.bookAnAppointment')))))),
|
|
401
|
+
formattedExperiences && (React__default.createElement(StyledTitleContainer$2, null,
|
|
402
|
+
React__default.createElement("div", { className: "experience" },
|
|
403
|
+
React__default.createElement(Text, { weight: "bold", size: "s3", color: theme.colors.gray800, style: { paddingBottom: 16 } }, t('expert.content.description').toUpperCase()),
|
|
404
|
+
React__default.createElement(StyledExperienceList, null, formattedExperiences.map((experience, i) => (React__default.createElement("li", { key: i },
|
|
405
|
+
React__default.createElement(Text, { size: "p2" }, renderExperienceText(experience)))))),
|
|
406
|
+
isMobile ? (React__default.createElement("div", { className: "btn-wrapper" },
|
|
407
|
+
React__default.createElement("a", { href: getCareDoctorUrl({
|
|
408
|
+
name: doctorInfo.name,
|
|
409
|
+
id: doctorInfo.id,
|
|
410
|
+
locale: locale,
|
|
411
|
+
}) },
|
|
412
|
+
React__default.createElement(Button, { color: "primary", size: "md", className: "btn-booking" }, t('careBooking.bookAnAppointment'))))) : (React__default.createElement("a", { href: getCareDoctorUrl({
|
|
413
|
+
name: doctorInfo.name,
|
|
414
|
+
id: doctorInfo.id,
|
|
415
|
+
locale: locale,
|
|
416
|
+
}) },
|
|
417
|
+
React__default.createElement(Text, { size: "s4", color: "#2D87F3", style: { paddingTop: 24 }, "data-event-category": trackingCategory, "data-event-action": "See Full Doctor Profile", "data-event-label": getCurrentBaseUrl(locale) +
|
|
418
|
+
getCareDoctorUrl({
|
|
419
|
+
name: doctorInfo.name,
|
|
420
|
+
id: doctorInfo.id,
|
|
421
|
+
locale: locale,
|
|
422
|
+
}) }, t('home.seeExpert')))))))))),
|
|
423
|
+
React__default.createElement(StyledPopupWrapper$2, { "data-open": isOpen, onClick: (e) => {
|
|
424
|
+
e.stopPropagation();
|
|
425
|
+
onClose();
|
|
426
|
+
} })));
|
|
984
427
|
};
|
|
985
428
|
|
|
986
|
-
|
|
987
|
-
return {
|
|
988
|
-
root: {},
|
|
989
|
-
};
|
|
990
|
-
});
|
|
991
|
-
|
|
992
|
-
const StyledPopup$2 = styled.div `
|
|
429
|
+
const StyledPopup$1 = styled.div `
|
|
993
430
|
position: fixed;
|
|
994
431
|
left: 50%;
|
|
995
432
|
width: 343px;
|
|
@@ -1053,10 +490,7 @@ const StyledPopup$2 = styled.div `
|
|
|
1053
490
|
padding-bottom: 32px;
|
|
1054
491
|
background-color: ${theme.colors.primary50};
|
|
1055
492
|
border-radius: ${theme.borderRadius};
|
|
1056
|
-
|
|
1057
|
-
display: flex;
|
|
1058
|
-
margin: 12px auto;
|
|
1059
|
-
}
|
|
493
|
+
|
|
1060
494
|
.avatar-title {
|
|
1061
495
|
position: relative;
|
|
1062
496
|
width: 100%;
|
|
@@ -1065,7 +499,7 @@ const StyledPopup$2 = styled.div `
|
|
|
1065
499
|
}
|
|
1066
500
|
}
|
|
1067
501
|
`;
|
|
1068
|
-
const StyledPopupWrapper$
|
|
502
|
+
const StyledPopupWrapper$1 = styled.div `
|
|
1069
503
|
position: fixed;
|
|
1070
504
|
z-index: 110;
|
|
1071
505
|
top: 0;
|
|
@@ -1079,7 +513,7 @@ const StyledPopupWrapper$2 = styled.div `
|
|
|
1079
513
|
display: none;
|
|
1080
514
|
}
|
|
1081
515
|
`;
|
|
1082
|
-
const StyledProfileImage$
|
|
516
|
+
const StyledProfileImage$1 = styled.div `
|
|
1083
517
|
.image-container {
|
|
1084
518
|
.badge-avatar {
|
|
1085
519
|
position: absolute;
|
|
@@ -1105,7 +539,7 @@ const StyledProfileImage$2 = styled.div `
|
|
|
1105
539
|
height: 24px;
|
|
1106
540
|
}
|
|
1107
541
|
`;
|
|
1108
|
-
const StyledTitleContainer$
|
|
542
|
+
const StyledTitleContainer$1 = styled.div `
|
|
1109
543
|
position: relative;
|
|
1110
544
|
z-index: 9;
|
|
1111
545
|
.specialty {
|
|
@@ -1135,337 +569,27 @@ const StyledTitleContainer$2 = styled.div `
|
|
|
1135
569
|
overflow: hidden;
|
|
1136
570
|
}
|
|
1137
571
|
`;
|
|
1138
|
-
const
|
|
1139
|
-
padding-left: 18px;
|
|
1140
|
-
li {
|
|
1141
|
-
list-style-type: disc;
|
|
1142
|
-
}
|
|
1143
|
-
`;
|
|
1144
|
-
|
|
1145
|
-
var img$A = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e";
|
|
1146
|
-
var CloseLight = img$A;
|
|
1147
|
-
|
|
1148
|
-
var img$z = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3e%3cpath fill='white' stroke='%23E4E8EC' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16'/%3e%3cpath fill='%23FF5331' d='M10.333 7.667V5H7.667v2.667H5v2.667h2.667V13h2.666v-2.666H13V7.667z'/%3e%3c/svg%3e";
|
|
1149
|
-
var ReviewerMedical = img$z;
|
|
1150
|
-
|
|
1151
|
-
const StyledLoading = styled.div `
|
|
1152
|
-
display: flex;
|
|
1153
|
-
align-items: center;
|
|
1154
|
-
justify-content: center;
|
|
1155
|
-
padding: 1em;
|
|
1156
|
-
button {
|
|
1157
|
-
position: relative;
|
|
1158
|
-
}
|
|
1159
|
-
`;
|
|
1160
|
-
const circle = keyframes `
|
|
1161
|
-
0% {
|
|
1162
|
-
transform: rotate(0deg);
|
|
1163
|
-
}
|
|
1164
|
-
100% {
|
|
1165
|
-
transform: rotate(360deg);
|
|
1166
|
-
}
|
|
1167
|
-
`;
|
|
1168
|
-
styled.div `
|
|
572
|
+
const StyledItem = styled.div `
|
|
1169
573
|
display: flex;
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
align-items: center;
|
|
1174
|
-
justify-content: center;
|
|
1175
|
-
padding: 1rem 2rem;
|
|
1176
|
-
background: white;
|
|
1177
|
-
border-radius: ${theme.borderRadius};
|
|
1178
|
-
box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),
|
|
1179
|
-
-2px 2px 5px rgba(67, 86, 100, 0.123689);
|
|
1180
|
-
.loading-spinner {
|
|
574
|
+
margin-top: 8px;
|
|
575
|
+
|
|
576
|
+
.bullet-point {
|
|
1181
577
|
width: 24px;
|
|
1182
578
|
height: 24px;
|
|
1183
|
-
margin-bottom: 0.5rem;
|
|
1184
|
-
animation: ${circle} 1.2s linear infinite;
|
|
1185
|
-
}
|
|
1186
|
-
&[data-is-marrybaby='true'] {
|
|
1187
|
-
box-shadow: none;
|
|
1188
579
|
}
|
|
1189
580
|
`;
|
|
1190
581
|
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
return (React__default.createElement(StyledLoading, { className: className },
|
|
1194
|
-
React__default.createElement(Button, { size: size, color: "transparent", isLoading: true }, t('loading'))));
|
|
1195
|
-
};
|
|
582
|
+
var img$n = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e";
|
|
583
|
+
var BulletPoint = img$n;
|
|
1196
584
|
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
const { t } = useTranslations();
|
|
1200
|
-
const [doctorInfo, setDoctorInfo] = useState(null);
|
|
1201
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
1202
|
-
useEffect(() => {
|
|
1203
|
-
if (isOpen && doctorId && String(doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.id) !== String(doctorId)) {
|
|
1204
|
-
setIsLoading(true);
|
|
1205
|
-
try {
|
|
1206
|
-
setDoctorInfo(null);
|
|
1207
|
-
callApi(getCarePath(CARE_PATHS.GET_DOCTOR_INFO, {
|
|
1208
|
-
doctorId: doctorId,
|
|
1209
|
-
website_url: domainLocales[locale],
|
|
1210
|
-
}), 'get').then((res) => {
|
|
1211
|
-
setDoctorInfo(Object.assign(Object.assign({}, res === null || res === void 0 ? void 0 : res._data.doctor), overwriteProfileProps));
|
|
1212
|
-
});
|
|
1213
|
-
}
|
|
1214
|
-
catch (error) {
|
|
1215
|
-
console.error(error);
|
|
1216
|
-
}
|
|
1217
|
-
setIsLoading(false);
|
|
1218
|
-
}
|
|
1219
|
-
}, [isOpen, doctorId, doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.id]);
|
|
1220
|
-
const experiences = (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.experiences) || [];
|
|
1221
|
-
const specialty = (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.specialties) || [];
|
|
1222
|
-
const specialtiesList = specialty
|
|
1223
|
-
.map((specialty) => (specialty === null || specialty === void 0 ? void 0 : specialty.name) || specialty)
|
|
1224
|
-
.join(' • ');
|
|
1225
|
-
const formattedExperiences = experiences
|
|
1226
|
-
.map((experience) => {
|
|
1227
|
-
try {
|
|
1228
|
-
return JSON.parse(experience.description);
|
|
1229
|
-
}
|
|
1230
|
-
catch (e) {
|
|
1231
|
-
return experience.description;
|
|
1232
|
-
}
|
|
1233
|
-
})
|
|
1234
|
-
.filter((e) => e.content);
|
|
1235
|
-
const renderExperienceText = (experience) => {
|
|
1236
|
-
if (experience === null || experience === void 0 ? void 0 : experience.year)
|
|
1237
|
-
return `${experience.year} ${experience === null || experience === void 0 ? void 0 : experience.content}`;
|
|
1238
|
-
if (experience === null || experience === void 0 ? void 0 : experience.content)
|
|
1239
|
-
return experience.content;
|
|
1240
|
-
if (typeof experience === 'string')
|
|
1241
|
-
return experience;
|
|
1242
|
-
return '';
|
|
1243
|
-
};
|
|
1244
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
1245
|
-
React__default.createElement(StyledPopup$2, { "data-open": isOpen, "data-animation": enableAnimation, onClick: (e) => e.stopPropagation() }, isLoading || !doctorInfo ? (React__default.createElement(Loading$1, null)) : (React__default.createElement("div", { className: "popup-content" },
|
|
1246
|
-
React__default.createElement("div", { className: "close-button", onClick: onClose },
|
|
1247
|
-
React__default.createElement("img", { src: CloseLight, style: { width: 20, height: 20 }, alt: "close-icon", loading: "lazy" })),
|
|
1248
|
-
React__default.createElement("div", { className: "main-info" },
|
|
1249
|
-
React__default.createElement("div", { className: "border-banner" }),
|
|
1250
|
-
React__default.createElement("div", { className: "avatar-title" },
|
|
1251
|
-
React__default.createElement(StyledProfileImage$2, null,
|
|
1252
|
-
React__default.createElement("div", { className: "image-container" },
|
|
1253
|
-
React__default.createElement("div", { style: { position: 'relative' } },
|
|
1254
|
-
React__default.createElement(ImageWrap, { src: doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.avatar, backupSrc: avatarFallback, className: "profile-image", alt: "avatar" }),
|
|
1255
|
-
React__default.createElement("img", { className: "badge-avatar", src: ReviewerMedical, alt: "badge", loading: "lazy" })))),
|
|
1256
|
-
React__default.createElement(StyledTitleContainer$2, null,
|
|
1257
|
-
React__default.createElement(Text, { size: "s3", weight: "semiBold", className: "full-name" }, doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.name),
|
|
1258
|
-
React__default.createElement("div", { className: "specialty" },
|
|
1259
|
-
specialtiesList && (React__default.createElement(React__default.Fragment, null,
|
|
1260
|
-
React__default.createElement(Text, { size: "p4", color: theme.colors.gray800 },
|
|
1261
|
-
specialtiesList,
|
|
1262
|
-
' • '))),
|
|
1263
|
-
React__default.createElement("a", { href: getCareHospitalUrl({
|
|
1264
|
-
id: (_a = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _a === void 0 ? void 0 : _a.id,
|
|
1265
|
-
name: (_b = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _b === void 0 ? void 0 : _b.name,
|
|
1266
|
-
slug: (_c = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _c === void 0 ? void 0 : _c.slug,
|
|
1267
|
-
locale,
|
|
1268
|
-
}), className: "organisation", target: "_blank", rel: "noreferrer" },
|
|
1269
|
-
React__default.createElement(Text, { size: "p4", className: "organisation", color: theme.colors.gray800, style: { textDecoration: 'underline' } }, doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization.name))))),
|
|
1270
|
-
!isMobile && (React__default.createElement("div", { className: "btn-wrapper" },
|
|
1271
|
-
React__default.createElement("a", { href: getCareDoctorUrl({
|
|
1272
|
-
name: doctorInfo.name,
|
|
1273
|
-
id: doctorInfo.id,
|
|
1274
|
-
locale: locale,
|
|
1275
|
-
}) },
|
|
1276
|
-
React__default.createElement(Button, { color: "primary", size: "md", className: "btn-booking" }, t('careBooking.bookAnAppointment')))))),
|
|
1277
|
-
formattedExperiences && (React__default.createElement(StyledTitleContainer$2, null,
|
|
1278
|
-
React__default.createElement("div", { className: "experience" },
|
|
1279
|
-
React__default.createElement(Text, { weight: "bold", size: "s3", color: theme.colors.gray800, style: { paddingBottom: 16 } }, t('expert.content.description').toUpperCase()),
|
|
1280
|
-
React__default.createElement(StyledExperienceList, null, formattedExperiences.map((experience, i) => (React__default.createElement("li", { key: i },
|
|
1281
|
-
React__default.createElement(Text, { size: "p2" }, renderExperienceText(experience)))))),
|
|
1282
|
-
isMobile ? (React__default.createElement("div", { className: "btn-wrapper" },
|
|
1283
|
-
React__default.createElement("a", { href: getCareDoctorUrl({
|
|
1284
|
-
name: doctorInfo.name,
|
|
1285
|
-
id: doctorInfo.id,
|
|
1286
|
-
locale: locale,
|
|
1287
|
-
}) },
|
|
1288
|
-
React__default.createElement(Button, { color: "primary", size: "md", className: "btn-booking" }, t('careBooking.bookAnAppointment'))))) : (React__default.createElement("a", { href: getCareDoctorUrl({
|
|
1289
|
-
name: doctorInfo.name,
|
|
1290
|
-
id: doctorInfo.id,
|
|
1291
|
-
locale: locale,
|
|
1292
|
-
}) },
|
|
1293
|
-
React__default.createElement(Text, { size: "s4", color: "#2D87F3", style: { paddingTop: 24 }, "data-event-category": trackingCategory, "data-event-action": "See Full Doctor Profile", "data-event-label": getCurrentBaseUrl(locale) +
|
|
1294
|
-
getCareDoctorUrl({
|
|
1295
|
-
name: doctorInfo.name,
|
|
1296
|
-
id: doctorInfo.id,
|
|
1297
|
-
locale: locale,
|
|
1298
|
-
}) }, t('home.seeExpert')))))))))),
|
|
1299
|
-
React__default.createElement(StyledPopupWrapper$2, { "data-open": isOpen, onClick: (e) => {
|
|
1300
|
-
e.stopPropagation();
|
|
1301
|
-
onClose();
|
|
1302
|
-
} })));
|
|
1303
|
-
};
|
|
1304
|
-
|
|
1305
|
-
const StyledPopup$1 = styled.div `
|
|
1306
|
-
position: fixed;
|
|
1307
|
-
left: 50%;
|
|
1308
|
-
width: 343px;
|
|
1309
|
-
background-color: ${theme.colors.white};
|
|
1310
|
-
border-radius: ${theme.borderRadius};
|
|
1311
|
-
box-shadow: 0px 0px 4px ${theme.colors.gray200};
|
|
1312
|
-
transform: translate(-50%, -50%);
|
|
1313
|
-
transition: all 0.5s ease-in-out;
|
|
1314
|
-
|
|
1315
|
-
${MediaQueries.tdUp} {
|
|
1316
|
-
width: 750px;
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
&[data-animation='true'] {
|
|
1320
|
-
transition: all 0.5s ease-in-out;
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
&[data-open='true'] {
|
|
1324
|
-
z-index: 400;
|
|
1325
|
-
top: 50%;
|
|
1326
|
-
opacity: 1;
|
|
1327
|
-
visibility: visible;
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
&[data-open='false'] {
|
|
1331
|
-
top: -50%;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
.popup-content {
|
|
1335
|
-
${MediaQueries.mbDown} {
|
|
1336
|
-
display: block;
|
|
1337
|
-
}
|
|
1338
|
-
display: flex;
|
|
1339
|
-
position: relative;
|
|
1340
|
-
z-index: 111;
|
|
1341
|
-
height: 100%;
|
|
1342
|
-
.button-see-more {
|
|
1343
|
-
margin: 32px 0;
|
|
1344
|
-
padding: 0;
|
|
1345
|
-
> * {
|
|
1346
|
-
display: inline-block;
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
.close-button {
|
|
1350
|
-
position: absolute;
|
|
1351
|
-
z-index: 100;
|
|
1352
|
-
top: 10px;
|
|
1353
|
-
right: 10px;
|
|
1354
|
-
cursor: pointer;
|
|
1355
|
-
width: unset;
|
|
1356
|
-
height: unset;
|
|
1357
|
-
img {
|
|
1358
|
-
width: 100%;
|
|
1359
|
-
height: 100%;
|
|
1360
|
-
border-radius: 50%;
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
.main-info {
|
|
1366
|
-
padding-bottom: 32px;
|
|
1367
|
-
background-color: ${theme.colors.primary50};
|
|
1368
|
-
border-radius: ${theme.borderRadius};
|
|
1369
|
-
|
|
1370
|
-
.avatar-title {
|
|
1371
|
-
position: relative;
|
|
1372
|
-
width: 100%;
|
|
1373
|
-
padding-top: 46px;
|
|
1374
|
-
text-align: center;
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
`;
|
|
1378
|
-
const StyledPopupWrapper$1 = styled.div `
|
|
1379
|
-
position: fixed;
|
|
1380
|
-
z-index: 110;
|
|
1381
|
-
top: 0;
|
|
1382
|
-
left: 0;
|
|
1383
|
-
width: 100%;
|
|
1384
|
-
height: 100%;
|
|
1385
|
-
align-items: center;
|
|
1386
|
-
background: rgba(38, 38, 38, 0.3);
|
|
1387
|
-
|
|
1388
|
-
&[data-open='false'] {
|
|
1389
|
-
display: none;
|
|
1390
|
-
}
|
|
1391
|
-
`;
|
|
1392
|
-
const StyledProfileImage$1 = styled.div `
|
|
1393
|
-
.image-container {
|
|
1394
|
-
.badge-avatar {
|
|
1395
|
-
position: absolute;
|
|
1396
|
-
right: 0;
|
|
1397
|
-
bottom: 0;
|
|
1398
|
-
top: 0;
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
display: flex;
|
|
1402
|
-
justify-content: center;
|
|
1403
|
-
padding-bottom: 15px;
|
|
1404
|
-
text-align: center;
|
|
1405
|
-
.profile-image {
|
|
1406
|
-
width: 100px;
|
|
1407
|
-
min-width: 100px;
|
|
1408
|
-
height: 100px;
|
|
1409
|
-
min-height: 100px;
|
|
1410
|
-
border-radius: 50%;
|
|
1411
|
-
object-fit: cover;
|
|
1412
|
-
}
|
|
1413
|
-
.badge-avatar {
|
|
1414
|
-
width: 24px;
|
|
1415
|
-
height: 24px;
|
|
1416
|
-
}
|
|
1417
|
-
`;
|
|
1418
|
-
const StyledTitleContainer$1 = styled.div `
|
|
1419
|
-
position: relative;
|
|
1420
|
-
z-index: 9;
|
|
1421
|
-
.specialty {
|
|
1422
|
-
display: flex;
|
|
1423
|
-
flex-wrap: wrap;
|
|
1424
|
-
justify-content: center;
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
padding: 0px 16px;
|
|
1428
|
-
text-align: center;
|
|
1429
|
-
.specialty {
|
|
1430
|
-
justify-content: center;
|
|
1431
|
-
}
|
|
585
|
+
var img$m = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%2345A4FF' d='M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12'/%3e%3cpath fill='%232D87F3' d='M24 12a12 12 0 0 0-.128-1.758l-5.077-5.077L5.041 18.958l4.858 4.858c.682.12 1.384.184 2.1.184 6.628 0 12-5.373 12-12Z'/%3e%3cpath fill='white' d='M9.014 17.824 5.04 18.959l1.135-3.973 2.368.47z'/%3e%3cpath fill='%23F7F9FC' d='M8.544 15.456 5.041 18.96l3.972-1.135z'/%3e%3cpath fill='%23E4E8EC' d='M6.467 18.552 5.45 17.533l-.41 1.427 1.426-.407Z'/%3e%3cpath fill='%23D2D6DC' d='m5.957 18.043-.916.916 1.426-.407z'/%3e%3cpath fill='%23FFD658' d='m15.828 5.331 2.837 2.837-9.651 9.652-2.838-2.837z'/%3e%3cpath fill='%23FFC326' d='m7.594 16.404 9.651-9.651 1.419 1.418-9.652 9.652z'/%3e%3cpath fill='%23FF5331' d='m18.312 8.525-2.837-2.838 1.123-1.123c.44-.44 1.154-.44 1.595 0l1.243 1.243c.44.44.44 1.154 0 1.594z'/%3e%3cpath fill='%23F44D2C' d='m18.816 5.186-1.921 1.92 1.418 1.419 1.124-1.124c.44-.44.44-1.154 0-1.594l-.622-.621Z'/%3e%3c/svg%3e";
|
|
586
|
+
var ReviewerAuthor = img$m;
|
|
1432
587
|
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
text-align: left;
|
|
1436
|
-
.btn-wrapper {
|
|
1437
|
-
margin-top: 24px;
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
p {
|
|
1441
|
-
max-width: 100%;
|
|
1442
|
-
-webkit-line-clamp: 4;
|
|
1443
|
-
-webkit-box-orient: vertical;
|
|
1444
|
-
text-overflow: ellipsis;
|
|
1445
|
-
overflow: hidden;
|
|
1446
|
-
}
|
|
1447
|
-
`;
|
|
1448
|
-
const StyledItem$2 = styled.div `
|
|
1449
|
-
display: flex;
|
|
1450
|
-
margin-top: 8px;
|
|
1451
|
-
|
|
1452
|
-
.bullet-point {
|
|
1453
|
-
width: 24px;
|
|
1454
|
-
height: 24px;
|
|
1455
|
-
}
|
|
1456
|
-
`;
|
|
1457
|
-
|
|
1458
|
-
var img$y = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e";
|
|
1459
|
-
var BulletPoint = img$y;
|
|
588
|
+
var img$l = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='12' fill='%23FFCB37'/%3e%3ccircle cx='12' cy='12' r='10.5' fill='%23FE921D'/%3e%3cpath fill='white' d='M11.443 5.137a.6.6 0 0 1 1.114 0l1.436 3.577a.6.6 0 0 0 .516.375l3.846.26a.6.6 0 0 1 .344 1.06l-2.958 2.471a.6.6 0 0 0-.197.607l.94 3.738a.6.6 0 0 1-.9.655l-3.265-2.05a.6.6 0 0 0-.638 0l-3.265 2.05a.6.6 0 0 1-.9-.655l.94-3.738a.6.6 0 0 0-.198-.607L5.3 10.41a.6.6 0 0 1 .344-1.06l3.846-.26a.6.6 0 0 0 .517-.375z'/%3e%3c/svg%3e";
|
|
589
|
+
var ReviewerExpert = img$l;
|
|
1460
590
|
|
|
1461
|
-
var img$
|
|
1462
|
-
var
|
|
1463
|
-
|
|
1464
|
-
var img$w = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='12' fill='%23FFCB37'/%3e%3ccircle cx='12' cy='12' r='10.5' fill='%23FE921D'/%3e%3cpath fill='white' d='M11.443 5.137a.6.6 0 0 1 1.114 0l1.436 3.577a.6.6 0 0 0 .516.375l3.846.26a.6.6 0 0 1 .344 1.06l-2.958 2.471a.6.6 0 0 0-.197.607l.94 3.738a.6.6 0 0 1-.9.655l-3.265-2.05a.6.6 0 0 0-.638 0l-3.265 2.05a.6.6 0 0 1-.9-.655l.94-3.738a.6.6 0 0 0-.198-.607L5.3 10.41a.6.6 0 0 1 .344-1.06l3.846-.26a.6.6 0 0 0 .517-.375z'/%3e%3c/svg%3e";
|
|
1465
|
-
var ReviewerExpert = img$w;
|
|
1466
|
-
|
|
1467
|
-
var img$v = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%2300C076' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m11.946 5.466-5.28 4.8-2.4-2.182'/%3e%3c/svg%3e";
|
|
1468
|
-
var ReviewerFactCheck = img$v;
|
|
591
|
+
var img$k = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%2300C076' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m11.946 5.466-5.28 4.8-2.4-2.182'/%3e%3c/svg%3e";
|
|
592
|
+
var ReviewerFactCheck = img$k;
|
|
1469
593
|
|
|
1470
594
|
const ReviewerIconMap = {
|
|
1471
595
|
author: ReviewerAuthor,
|
|
@@ -1524,7 +648,7 @@ const PopupExpert = ({ trackingCategory = 'Together', locale, isOpen = true, onC
|
|
|
1524
648
|
? expertInfo.experiences
|
|
1525
649
|
.filter((e) => !!(e && (e.title || e.organization)))
|
|
1526
650
|
.slice(0, 3)
|
|
1527
|
-
.map((experience, index) => (React__default.createElement(StyledItem
|
|
651
|
+
.map((experience, index) => (React__default.createElement(StyledItem, { key: index },
|
|
1528
652
|
React__default.createElement("img", { className: "bullet-point", src: BulletPoint, alt: "point", loading: "lazy" }),
|
|
1529
653
|
React__default.createElement("div", { className: "text-contain" },
|
|
1530
654
|
React__default.createElement(Heading, { tag: "h6", color: theme.colors.gray800 }, experience === null || experience === void 0 ? void 0 : experience.title),
|
|
@@ -1769,11 +893,11 @@ const PopupHospital = ({ isOpen = true, onClose, enableAnimation = true, hospita
|
|
|
1769
893
|
} })));
|
|
1770
894
|
};
|
|
1771
895
|
|
|
1772
|
-
var styles$
|
|
896
|
+
var styles$d = {"modal":"_2UKyiK1","header":"E5ga-tI","heading":"_8Y2nWXX","close":"d0T7kSP"};
|
|
1773
897
|
|
|
1774
898
|
const ProfileDetailModal = ({ open, onClose, children, profileModalProps, }) => {
|
|
1775
899
|
const { t } = useTranslations();
|
|
1776
|
-
return (React__default.createElement(Modal, Object.assign({ title: t('profilePanel.modal.heading'), titleProps: true, className: styles$
|
|
900
|
+
return (React__default.createElement(Modal, Object.assign({ title: t('profilePanel.modal.heading'), titleProps: true, className: styles$d.modal, opened: open, onClose: onClose, overlayOpacity: 0.2, overflow: "inside", transitionProps: {
|
|
1777
901
|
transition: 'slide-left',
|
|
1778
902
|
}, styles: {
|
|
1779
903
|
header: {
|
|
@@ -1923,150 +1047,6 @@ const getDefaultFailNoti = (t) => ({
|
|
|
1923
1047
|
type: 'danger',
|
|
1924
1048
|
});
|
|
1925
1049
|
|
|
1926
|
-
const StyledCreateNewPost = styled.div `
|
|
1927
|
-
position: relative;
|
|
1928
|
-
display: flex;
|
|
1929
|
-
height: 100%;
|
|
1930
|
-
flex-direction: column;
|
|
1931
|
-
padding: 16px 24px;
|
|
1932
|
-
|
|
1933
|
-
.input-group-container {
|
|
1934
|
-
flex: 1;
|
|
1935
|
-
padding-right: 2px;
|
|
1936
|
-
padding-left: 2px;
|
|
1937
|
-
margin-bottom: 0.5rem;
|
|
1938
|
-
-ms-overflow-style: none; /* IE and Edge */
|
|
1939
|
-
overflow-y: auto;
|
|
1940
|
-
scrollbar-width: none; /* Firefox */
|
|
1941
|
-
&::-webkit-scrollbar {
|
|
1942
|
-
display: none;
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
.input-group {
|
|
1947
|
-
:not(:last-child) {
|
|
1948
|
-
margin-bottom: 0.6rem;
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
input:focus,
|
|
1952
|
-
textarea:focus,
|
|
1953
|
-
[contenteditable='true'] {
|
|
1954
|
-
outline: none;
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
label {
|
|
1958
|
-
margin-bottom: 5px;
|
|
1959
|
-
color: ${theme.colors.gray600};
|
|
1960
|
-
/* font-family: 'Open Sans', sans-serif; */
|
|
1961
|
-
font-size: 13px;
|
|
1962
|
-
font-weight: bold;
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
.input-group-label {
|
|
1966
|
-
margin-bottom: 5px;
|
|
1967
|
-
color: ${theme.colors.gray600};
|
|
1968
|
-
/* font-family: 'Open Sans', sans-serif; */
|
|
1969
|
-
font-size: 13px;
|
|
1970
|
-
font-weight: bold;
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
.input-notification {
|
|
1974
|
-
display: flex;
|
|
1975
|
-
|
|
1976
|
-
& > img {
|
|
1977
|
-
width: 16px;
|
|
1978
|
-
height: 16px;
|
|
1979
|
-
margin-top: 1.5px;
|
|
1980
|
-
margin-right: 8px;
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
.tag-list {
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
.warning {
|
|
1989
|
-
margin-top: 16px;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
.submit-btn {
|
|
1993
|
-
width: 100%;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
.switch-label {
|
|
1997
|
-
display: flex;
|
|
1998
|
-
align-items: center;
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
.swich-input-group {
|
|
2002
|
-
padding: 12px 16px;
|
|
2003
|
-
border-radius: 8px;
|
|
2004
|
-
background: ${theme.colors.neutral50};
|
|
2005
|
-
|
|
2006
|
-
&.askdoctor-switch {
|
|
2007
|
-
background: ${theme.colors.primary50};
|
|
2008
|
-
&.mb-color {
|
|
2009
|
-
background: ${theme.mbColors.tonePink};
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
.mantine-Switch-labelWrapper {
|
|
2014
|
-
flex-grow: 1;
|
|
2015
|
-
}
|
|
2016
|
-
.mantine-Checkbox-body {
|
|
2017
|
-
display: flex;
|
|
2018
|
-
width: 100%;
|
|
2019
|
-
align-items: center;
|
|
2020
|
-
justify-content: space-between;
|
|
2021
|
-
}
|
|
2022
|
-
.mantine-Switch-track {
|
|
2023
|
-
margin-bottom: 0;
|
|
2024
|
-
}
|
|
2025
|
-
.label-txt {
|
|
2026
|
-
font-weight: normal;
|
|
2027
|
-
font-size: 14px;
|
|
2028
|
-
color: ${theme.colors.gray800};
|
|
2029
|
-
margin-left: 10px;
|
|
2030
|
-
}
|
|
2031
|
-
}
|
|
2032
|
-
`;
|
|
2033
|
-
const StyledIsQuestion = styled.div `
|
|
2034
|
-
display: flex;
|
|
2035
|
-
width: 100%;
|
|
2036
|
-
align-items: center;
|
|
2037
|
-
justify-content: space-between;
|
|
2038
|
-
padding: 12px 16px;
|
|
2039
|
-
border-radius: 8px;
|
|
2040
|
-
background: ${theme.colors.primary50};
|
|
2041
|
-
|
|
2042
|
-
&[data-is-marry-baby='true'] {
|
|
2043
|
-
background: ${theme.mbColors.tonePink};
|
|
2044
|
-
}
|
|
2045
|
-
.switch-label {
|
|
2046
|
-
display: flex;
|
|
2047
|
-
align-items: center;
|
|
2048
|
-
gap: 12px;
|
|
2049
|
-
}
|
|
2050
|
-
margin-bottom: 12px;
|
|
2051
|
-
`;
|
|
2052
|
-
const StyledError = styled.div `
|
|
2053
|
-
margin-bottom: 12px;
|
|
2054
|
-
color: ${theme.colors.red700};
|
|
2055
|
-
svg {
|
|
2056
|
-
margin-right: 5px;
|
|
2057
|
-
}
|
|
2058
|
-
svg,
|
|
2059
|
-
span {
|
|
2060
|
-
vertical-align: middle;
|
|
2061
|
-
}
|
|
2062
|
-
`;
|
|
2063
|
-
|
|
2064
|
-
var img$u = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cpath fill='%232D87F3' d='M8 14.5a6 6 0 1 0 0-12 6 6 0 0 0 0 12'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 5.5v3M8 11.5h.007'/%3e%3c/svg%3e";
|
|
2065
|
-
var IconAlertCirclePrimary = img$u;
|
|
2066
|
-
|
|
2067
|
-
var img$t = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cpath fill='%23FE921D' d='M8 14.5a6 6 0 1 0 0-12 6 6 0 0 0 0 12'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 5.5v3M8 11.5h.007'/%3e%3c/svg%3e";
|
|
2068
|
-
var IconAlertCircleWarning = img$t;
|
|
2069
|
-
|
|
2070
1050
|
const EncodeUrlRegexMap = {
|
|
2071
1051
|
edit: /<mocka ([^>]*)data-url="true"[^<>]*>(.*?)<\/mocka>/gim,
|
|
2072
1052
|
url: /((?:=")|(?:data-url="true">)|)(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gim,
|
|
@@ -2794,8 +1774,8 @@ const StyledEditorContainer = styled.div `
|
|
|
2794
1774
|
}
|
|
2795
1775
|
`;
|
|
2796
1776
|
|
|
2797
|
-
var img$
|
|
2798
|
-
var IconLink = img$
|
|
1777
|
+
var img$j = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9.545 16H7.091c-.537 0-1.07-.104-1.566-.305a4.1 4.1 0 0 1-1.327-.867A3.96 3.96 0 0 1 3 12c0-1.06.431-2.078 1.198-2.828A4.14 4.14 0 0 1 7.091 8h2.454m4.38 0h2.984c.537 0 1.07.103 1.566.304a4.1 4.1 0 0 1 1.327.868c.38.371.681.812.887 1.297a3.92 3.92 0 0 1 0 3.062 4 4 0 0 1-.887 1.297c-.38.372-.831.667-1.327.867a4.2 4.2 0 0 1-1.566.305h-2.983M9 12h6'/%3e%3c/svg%3e";
|
|
1778
|
+
var IconLink = img$j;
|
|
2799
1779
|
|
|
2800
1780
|
// import 'react-quill/dist/quill.snow.css'
|
|
2801
1781
|
let ReactQuill = null;
|
|
@@ -2994,7 +1974,7 @@ function getSearchName(root) {
|
|
|
2994
1974
|
}
|
|
2995
1975
|
return res;
|
|
2996
1976
|
}
|
|
2997
|
-
const inputModify
|
|
1977
|
+
const inputModify = (value, opts) => {
|
|
2998
1978
|
var _a;
|
|
2999
1979
|
const { formatUrl, bannedWords = [] } = opts || {};
|
|
3000
1980
|
const removedFormat = fixMalformedMention(removeFontFormat(value));
|
|
@@ -3086,7 +2066,7 @@ const RichTextEditor = ({ html, onChange, className, style, onImagePickerClick,
|
|
|
3086
2066
|
fetchPreviewDataRef.current = fetchPreviewData;
|
|
3087
2067
|
const debounceInputModify = useCallback(debounce((v) => {
|
|
3088
2068
|
if (v) {
|
|
3089
|
-
const processedInput = inputModify
|
|
2069
|
+
const processedInput = inputModify(v, {
|
|
3090
2070
|
bannedWords: bannedWordsRef.current,
|
|
3091
2071
|
formatUrl: true,
|
|
3092
2072
|
});
|
|
@@ -3416,645 +2396,85 @@ const LinkToolInputPopover = ({ onAddUrl, setShow }) => {
|
|
|
3416
2396
|
}, isDisabled: !isValid }, t('insert')))));
|
|
3417
2397
|
};
|
|
3418
2398
|
|
|
3419
|
-
var img$
|
|
3420
|
-
var IconCloseCircle = img$
|
|
2399
|
+
var img$i = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath fill='%23262626' d='M12 22.984c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.478-10 10 4.477 10 10 10'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14.828 10.156-5.657 5.657M9.172 10.156l5.657 5.657'/%3e%3c/svg%3e";
|
|
2400
|
+
var IconCloseCircle = img$i;
|
|
3421
2401
|
|
|
3422
|
-
const
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
if (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url)
|
|
3432
|
-
onPreviewUrlChange({
|
|
3433
|
-
title: previewUrl.title || '',
|
|
3434
|
-
url: previewUrl.url || '',
|
|
3435
|
-
image: previewUrl.image || '',
|
|
3436
|
-
description: previewUrl.description || '',
|
|
3437
|
-
});
|
|
3438
|
-
else
|
|
3439
|
-
onPreviewUrlChange(null);
|
|
3440
|
-
}
|
|
3441
|
-
}, [previewUrl]);
|
|
3442
|
-
return (React__default.createElement(StyledCreatePostDescription, { className: className, style: style },
|
|
3443
|
-
React__default.createElement(Text, { size: "p4", className: "description-label" }, t('createPost.popup.description')),
|
|
3444
|
-
React__default.createElement("div", { className: `textarea-control` },
|
|
3445
|
-
React__default.createElement("div", { className: "textarea-wrapper" },
|
|
3446
|
-
React__default.createElement(RichTextEditor, { html: value || '', onChange: onChange, bannedWords: bannedWords, onImagePickerClick: () => { var _a; return (_a = imagePicker.current) === null || _a === void 0 ? void 0 : _a.click(); }, onPreviewUrlChange: setPreviewUrl, onInvalidUrlsChange: onInvalidUrlsChange, isReplying: isReplying }))),
|
|
3447
|
-
React__default.createElement(Text, { size: "p4", className: "count-string" },
|
|
3448
|
-
t('character'),
|
|
3449
|
-
": ",
|
|
3450
|
-
innertext(value || '').length),
|
|
3451
|
-
(!imageSrcs || imageSrcs.length === 0) && previewUrl && (React__default.createElement("div", { className: "link-preview-wrapper" }, previewUrl.isFetching ? (React__default.createElement(Loading$1, null)) : (React__default.createElement(React__default.Fragment, null,
|
|
3452
|
-
React__default.createElement(CardLink, { title: previewUrl.title, url: previewUrl.url || '#', image: previewUrl.image, noRefetch: true }),
|
|
3453
|
-
React__default.createElement("img", { src: IconCloseCircle, className: "icon-close", onClick: () => setPreviewUrl(null), loading: "lazy" }))))),
|
|
3454
|
-
React__default.createElement("input", { ref: imagePicker, type: "file", accept: "image/png, image/gif, image/jpeg", multiple: true, style: { display: 'none' }, onChange: onSelectImages }),
|
|
3455
|
-
imageSrcs.length > MAX_IMAGE_UPLOADS ? (React__default.createElement("div", { className: "input-notification" },
|
|
3456
|
-
React__default.createElement("img", { src: IconAlertCircleWarning, loading: "lazy" }),
|
|
3457
|
-
React__default.createElement(Text, { size: "p4", color: theme.colors.alertWarning }, t(`createPost.popup.warningImage`)))) : null,
|
|
3458
|
-
imageSrcs.length > 0 && (React__default.createElement("div", { className: "image-gallery" }, imageSrcs.map((src, i) => (React__default.createElement("div", { key: i, className: "image-item" },
|
|
3459
|
-
React__default.createElement("img", { src: src, loading: "lazy" }),
|
|
3460
|
-
React__default.createElement("img", { className: "close-btn", src: IconCloseCircle, onClick: () => onRemoveImage(i), loading: "lazy" }))))))));
|
|
3461
|
-
};
|
|
2402
|
+
const StyledPopupDanger = styled.div `
|
|
2403
|
+
[data-type='confirm'] {
|
|
2404
|
+
width: min(360px, 100%);
|
|
2405
|
+
height: auto;
|
|
2406
|
+
&[data-open='false'] {
|
|
2407
|
+
top: calc(-100% - 500px);
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
z-index: 600;
|
|
3462
2411
|
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
textarea:focus,
|
|
3466
|
-
[contenteditable='true'] {
|
|
3467
|
-
outline: none;
|
|
2412
|
+
.header {
|
|
2413
|
+
display: none !important;
|
|
3468
2414
|
}
|
|
3469
2415
|
|
|
3470
|
-
.
|
|
3471
|
-
|
|
2416
|
+
.confirm-dialog {
|
|
2417
|
+
position: relative;
|
|
2418
|
+
overflow: auto;
|
|
3472
2419
|
width: 100%;
|
|
3473
|
-
padding:
|
|
3474
|
-
|
|
2420
|
+
padding-top: 44px;
|
|
2421
|
+
background: #fff;
|
|
3475
2422
|
border-radius: ${theme.borderRadius};
|
|
3476
|
-
font-size: 16px;
|
|
3477
|
-
line-height: 1.2;
|
|
3478
|
-
white-space: nowrap;
|
|
3479
|
-
:focus {
|
|
3480
|
-
border-color: ${theme.colors.primaryBase};
|
|
3481
|
-
box-shadow: 0px 0px 2px 2px ${theme.colors.primary200};
|
|
3482
|
-
}
|
|
3483
|
-
br {
|
|
3484
|
-
display: none;
|
|
3485
|
-
}
|
|
3486
|
-
* {
|
|
3487
|
-
display: inline;
|
|
3488
|
-
white-space: nowrap;
|
|
3489
|
-
}
|
|
3490
|
-
mocka {
|
|
3491
|
-
padding: 2px 6px;
|
|
3492
|
-
border-radius: 1rem;
|
|
3493
|
-
&[data-error='true'] {
|
|
3494
|
-
background-color: #ffeeee;
|
|
3495
|
-
color: red;
|
|
3496
|
-
text-decoration: underline;
|
|
3497
|
-
font-style: bold;
|
|
3498
|
-
}
|
|
3499
|
-
}
|
|
3500
|
-
ol,
|
|
3501
|
-
ul {
|
|
3502
|
-
padding-left: 1rem;
|
|
3503
|
-
}
|
|
3504
|
-
}
|
|
3505
|
-
|
|
3506
|
-
label {
|
|
3507
|
-
display: block;
|
|
3508
|
-
margin-bottom: 5px;
|
|
3509
|
-
color: ${theme.colors.gray600};
|
|
3510
|
-
font-size: 13px;
|
|
3511
|
-
font-weight: bold;
|
|
3512
|
-
}
|
|
3513
2423
|
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
`;
|
|
2424
|
+
.confirm-content {
|
|
2425
|
+
display: flex;
|
|
2426
|
+
flex-direction: column;
|
|
2427
|
+
align-items: center;
|
|
2428
|
+
padding: 0 16px 16px;
|
|
2429
|
+
text-align: center;
|
|
3521
2430
|
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
return processedValue;
|
|
3530
|
-
};
|
|
3531
|
-
const CreatePostTitle = ({ className, style, bannedWords = [], value, onChange, }) => {
|
|
3532
|
-
var _a;
|
|
3533
|
-
const { t } = useTranslations();
|
|
3534
|
-
const [titleValue, setTitleValue] = useState('');
|
|
3535
|
-
const titleRef = useRef(null);
|
|
3536
|
-
useEffect(() => {
|
|
3537
|
-
if (titleRef.current) {
|
|
3538
|
-
const pasteHandler = (e) => {
|
|
3539
|
-
var _a;
|
|
3540
|
-
e.preventDefault();
|
|
3541
|
-
const text = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/plain');
|
|
3542
|
-
document.execCommand('insertHTML', false, text);
|
|
3543
|
-
};
|
|
3544
|
-
const contentDiv = titleRef.current;
|
|
3545
|
-
contentDiv.addEventListener('paste', pasteHandler, {
|
|
3546
|
-
passive: true,
|
|
3547
|
-
});
|
|
3548
|
-
return () => contentDiv.removeEventListener('paste', pasteHandler);
|
|
3549
|
-
}
|
|
3550
|
-
}, [titleRef]);
|
|
3551
|
-
const bannedString = (bannedWords === null || bannedWords === void 0 ? void 0 : bannedWords.join(',')) || '';
|
|
3552
|
-
useEffect(() => {
|
|
3553
|
-
var _a;
|
|
3554
|
-
if (bannedString) {
|
|
3555
|
-
const titleText = (_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText;
|
|
3556
|
-
if (titleText) {
|
|
3557
|
-
const titleValueWithBanned = highlightBadWords(titleText, bannedWords);
|
|
3558
|
-
if (titleValueWithBanned !== titleText) {
|
|
3559
|
-
onChange && onChange(titleValueWithBanned);
|
|
3560
|
-
setTitleValue(titleValueWithBanned);
|
|
3561
|
-
}
|
|
3562
|
-
}
|
|
3563
|
-
}
|
|
3564
|
-
}, [bannedString]);
|
|
3565
|
-
const debounceInputModify = useCallback(debounce(() => {
|
|
3566
|
-
if (titleRef.current) {
|
|
3567
|
-
const shortenString = inputModify(titleRef.current.innerText, {
|
|
3568
|
-
limit: TITLE_LIMIT,
|
|
3569
|
-
bannedWords,
|
|
3570
|
-
});
|
|
3571
|
-
onChange && onChange(shortenString);
|
|
3572
|
-
setTitleValue(shortenString);
|
|
3573
|
-
}
|
|
3574
|
-
}, 300), []);
|
|
3575
|
-
useEffect(() => {
|
|
3576
|
-
setTimeout(() => {
|
|
3577
|
-
var _a;
|
|
3578
|
-
(_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3579
|
-
}, 500);
|
|
3580
|
-
}, []);
|
|
3581
|
-
return (React__default.createElement(StyledCreatePostTitle, { className: className, style: style },
|
|
3582
|
-
React__default.createElement(Input, { name: "title", value: value || titleValue, size: "md", label: t('createPost.title'), CustomInput: React__default.createElement(ContentEditable, { innerRef: titleRef, html: value || titleValue, onChange: () => {
|
|
3583
|
-
if (titleRef.current &&
|
|
3584
|
-
titleRef.current.innerText !== (value || titleValue)) {
|
|
3585
|
-
const initialValue = inputModify(titleRef.current.innerText, {
|
|
3586
|
-
bannedWords,
|
|
3587
|
-
});
|
|
3588
|
-
onChange && onChange(initialValue);
|
|
3589
|
-
setTitleValue(initialValue);
|
|
3590
|
-
debounceInputModify();
|
|
3591
|
-
}
|
|
3592
|
-
}, className: "title-input" }) }),
|
|
3593
|
-
React__default.createElement(Text, { size: "p4", className: "count-string" }, t('createPost.popup.wordCount', {
|
|
3594
|
-
count: ((_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText.length) || 0,
|
|
3595
|
-
max: TITLE_LIMIT,
|
|
3596
|
-
}))));
|
|
3597
|
-
};
|
|
2431
|
+
.title {
|
|
2432
|
+
margin-bottom: 8px;
|
|
2433
|
+
font-size: 24px;
|
|
2434
|
+
line-height: 32px;
|
|
2435
|
+
word-break: break-word;
|
|
2436
|
+
overflow-wrap: break-word;
|
|
2437
|
+
}
|
|
3598
2438
|
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
2439
|
+
.desc {
|
|
2440
|
+
margin-bottom: 24px;
|
|
2441
|
+
color: ${theme.colors.gray500};
|
|
2442
|
+
font-size: 18px;
|
|
2443
|
+
line-height: 24px;
|
|
2444
|
+
text-align: center;
|
|
2445
|
+
word-break: break-word;
|
|
2446
|
+
overflow-wrap: break-word;
|
|
2447
|
+
}
|
|
3604
2448
|
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
margin-bottom: 8px;
|
|
3611
|
-
border-radius: 1rem;
|
|
3612
|
-
color: ${theme.colors.gray800};
|
|
3613
|
-
cursor: pointer;
|
|
3614
|
-
font-size: 13px;
|
|
3615
|
-
line-height: 22px;
|
|
3616
|
-
transition: all 0.2s;
|
|
2449
|
+
.btn-group {
|
|
2450
|
+
display: flex;
|
|
2451
|
+
flex-wrap: wrap;
|
|
2452
|
+
align-items: center;
|
|
2453
|
+
justify-content: center;
|
|
3617
2454
|
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
}
|
|
3623
|
-
&[data-disabled='true'] {
|
|
3624
|
-
background: ${theme.colors.gray100};
|
|
3625
|
-
color: ${theme.colors.gray800};
|
|
2455
|
+
button {
|
|
2456
|
+
margin: 0 4px 0.5rem;
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
3626
2459
|
}
|
|
3627
2460
|
}
|
|
3628
|
-
.
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
2461
|
+
.thumbnail-container {
|
|
2462
|
+
width: 80px;
|
|
2463
|
+
height: 80px;
|
|
2464
|
+
margin-bottom: 32px;
|
|
2465
|
+
.thumbnail {
|
|
2466
|
+
width: 100%;
|
|
2467
|
+
height: 100%;
|
|
3634
2468
|
}
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
background: #
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
color: #3e3f58;
|
|
3645
|
-
}
|
|
3646
|
-
}
|
|
3647
|
-
}
|
|
3648
|
-
`;
|
|
3649
|
-
|
|
3650
|
-
const TopicSelectList = ({ className, style, topics: topicsProp, communityId, onChange, isLoading, disabled, forceTopics, selectedTopics: selectedTopicsProp, noFetch, dataEventCategory, dataEventAction, dataEventLabel, }) => {
|
|
3651
|
-
const { data: { locale, env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
|
|
3652
|
-
const [topics, setTopics] = useState(topicsProp ? [...topicsProp] : []);
|
|
3653
|
-
const [selectedTopics, setSelectedTopics] = useState(selectedTopicsProp ? [...selectedTopicsProp] : []);
|
|
3654
|
-
const [isLoadingTopics, setIsLoadingTopics] = useState(false);
|
|
3655
|
-
const topicsPropRef = useRef(topicsProp);
|
|
3656
|
-
topicsPropRef.current = topicsProp;
|
|
3657
|
-
useEffect(() => {
|
|
3658
|
-
var _a;
|
|
3659
|
-
if (communityId && !noFetch && !((_a = topicsPropRef.current) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
3660
|
-
setTopics([]);
|
|
3661
|
-
setIsLoadingTopics(true);
|
|
3662
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
3663
|
-
var _b;
|
|
3664
|
-
try {
|
|
3665
|
-
const res = yield callApi(getApiPath(PATHS.TOPIC.LIST, {
|
|
3666
|
-
communityId: communityId,
|
|
3667
|
-
_locale: locale,
|
|
3668
|
-
}), 'GET');
|
|
3669
|
-
const topicRes = (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.topics;
|
|
3670
|
-
if (Array.isArray(topicRes)) {
|
|
3671
|
-
setTopics(() => (topicRes === null || topicRes === void 0 ? void 0 : topicRes.map(formatTopic).sort((t1, t2) => (t1.order || 0) - (t2.order || 0))) || []);
|
|
3672
|
-
}
|
|
3673
|
-
}
|
|
3674
|
-
catch (e) {
|
|
3675
|
-
console.log(e);
|
|
3676
|
-
setIsLoadingTopics(false);
|
|
3677
|
-
}
|
|
3678
|
-
setIsLoadingTopics(false);
|
|
3679
|
-
}))();
|
|
3680
|
-
}
|
|
3681
|
-
}, [communityId, noFetch]);
|
|
3682
|
-
const topicsPropString = topicsProp === null || topicsProp === void 0 ? void 0 : topicsProp.map((t) => t.id).join('-');
|
|
3683
|
-
const topicsStateString = topics === null || topics === void 0 ? void 0 : topics.map((t) => t.id).join('-');
|
|
3684
|
-
const forceTopicsPropString = forceTopics === null || forceTopics === void 0 ? void 0 : forceTopics.map((t) => t.id).join('-');
|
|
3685
|
-
useEffect(() => {
|
|
3686
|
-
if (topicsProp &&
|
|
3687
|
-
typeof topicsPropString !== 'undefined' &&
|
|
3688
|
-
topicsPropString !== topicsStateString) {
|
|
3689
|
-
setTopics(topicsProp);
|
|
3690
|
-
}
|
|
3691
|
-
}, [topicsProp, topicsPropString, topicsStateString]);
|
|
3692
|
-
const topicsWithoutForced = useMemo(() => topics.filter((t) => !(forceTopics === null || forceTopics === void 0 ? void 0 : forceTopics.some((ft) => (ft.id && ft.id === t.id) ||
|
|
3693
|
-
(ft.mappedCategoryId &&
|
|
3694
|
-
ft.mappedCategoryId === t.mappedCategoryId)))), [topicsStateString, forceTopicsPropString]);
|
|
3695
|
-
return (React__default.createElement(StyledTopicSelectList, { "data-is-marrybaby": isMarryBaby, className: className, style: style },
|
|
3696
|
-
forceTopics.map((topic) => (React__default.createElement(TopicItem, { key: `${topic.id}-${topic.mappedCategoryId}`, topic: topic, disabled: true, selected: true, dataEventAction: dataEventAction, dataEventCategory: dataEventCategory, dataEventLabel: dataEventLabel }))),
|
|
3697
|
-
topicsWithoutForced.map((topic) => (React__default.createElement(TopicItem, { key: `${topic.id}-${topic.mappedCategoryId}`, topic: topic, disabled: disabled, selected: (selectedTopicsProp || selectedTopics).some((t) => (t.id && t.id === topic.id) ||
|
|
3698
|
-
(t.mappedCategoryId &&
|
|
3699
|
-
t.mappedCategoryId === topic.mappedCategoryId)), onClick: () => {
|
|
3700
|
-
const _selected = selectedTopicsProp || selectedTopics;
|
|
3701
|
-
const foundIndex = _selected.findIndex((_selected) => (_selected.id && _selected.id === topic.id) ||
|
|
3702
|
-
(_selected.mappedCategoryId &&
|
|
3703
|
-
_selected.mappedCategoryId === topic.mappedCategoryId));
|
|
3704
|
-
if (foundIndex !== -1) {
|
|
3705
|
-
_selected.splice(foundIndex, 1);
|
|
3706
|
-
}
|
|
3707
|
-
else {
|
|
3708
|
-
_selected.push(topic);
|
|
3709
|
-
}
|
|
3710
|
-
if (onChange && selectedTopicsProp) {
|
|
3711
|
-
onChange(_selected.slice());
|
|
3712
|
-
}
|
|
3713
|
-
else {
|
|
3714
|
-
onChange && onChange(_selected.slice());
|
|
3715
|
-
setSelectedTopics(_selected.slice());
|
|
3716
|
-
}
|
|
3717
|
-
}, dataEventAction: dataEventAction, dataEventCategory: dataEventCategory, dataEventLabel: dataEventLabel }))),
|
|
3718
|
-
(isLoading || isLoadingTopics) && React__default.createElement(Loading$1, { className: "topic-spinner" })));
|
|
3719
|
-
};
|
|
3720
|
-
const TopicItem = (_a) => {
|
|
3721
|
-
var { topic, disabled, selected, onClick } = _a, rest = __rest(_a, ["topic", "disabled", "selected", "onClick"]);
|
|
3722
|
-
return (React__default.createElement("div", Object.assign({ className: 'tag-item' + (selected ? ' --active' : ''), "data-disabled": disabled, onClick: !disabled ? onClick : undefined }, rest), topic.name));
|
|
3723
|
-
};
|
|
3724
|
-
|
|
3725
|
-
const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose, communities = [], forceSelectCommunity, forceSelectTopics, articleId, optionalTopic, editPostData, defaultCommunity, defaultTopics, noFetchTopic, hideTopicList, selectAskDoctor, showAskDoctorOptions, currentPageUrl, }) => {
|
|
3726
|
-
const isInEditMode = !!(editPostData === null || editPostData === void 0 ? void 0 : editPostData.id);
|
|
3727
|
-
const { data: { locale, env: { isMarryBaby }, }, action: { pushNotifications, sanitizeFunction }, } = useContext(TogetherComponentGlobalContext);
|
|
3728
|
-
const { t } = useTranslations();
|
|
3729
|
-
const [isAnonymous, setIsAnonymous] = useState(false);
|
|
3730
|
-
const [isAskDoctor, setIsAskDoctor] = useState(selectAskDoctor);
|
|
3731
|
-
const [showAskDoctorRequired, setShowAskDoctorRequired] = useState(false);
|
|
3732
|
-
const [specialCharErr, setspecialCharErr] = useState(false);
|
|
3733
|
-
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
3734
|
-
const [titleValue, setTitleValue] = useState('');
|
|
3735
|
-
const [descriptionValue, setDescriptionValue] = useState('');
|
|
3736
|
-
const [communityValue, setCommunityValue] = useState(forceSelectCommunity
|
|
3737
|
-
? {
|
|
3738
|
-
label: forceSelectCommunity.name,
|
|
3739
|
-
value: `${forceSelectCommunity.id || ''}-${forceSelectCommunity.mappedCategoryId || ''}`,
|
|
3740
|
-
}
|
|
3741
|
-
: {
|
|
3742
|
-
label: t('community.choose'),
|
|
3743
|
-
value: '',
|
|
3744
|
-
});
|
|
3745
|
-
const [selectedTopics, setSelectedTopics] = useState([...forceSelectTopics] || []);
|
|
3746
|
-
const [imageFiles, setImageFiles] = useState([]);
|
|
3747
|
-
const [bannedWords, setBannedWords] = useState([]);
|
|
3748
|
-
const currentCommunity = forceSelectCommunity ||
|
|
3749
|
-
communities.find((c) => `${c.id || ''}-${c.mappedCategoryId || ''}` === communityValue.value);
|
|
3750
|
-
const communitiesList = forceSelectCommunity
|
|
3751
|
-
? [forceSelectCommunity]
|
|
3752
|
-
: communities
|
|
3753
|
-
.filter((c) => c.isActive)
|
|
3754
|
-
.sort((a, b) => {
|
|
3755
|
-
if (a.name > b.name)
|
|
3756
|
-
return 1;
|
|
3757
|
-
if (a.name < b.name)
|
|
3758
|
-
return -1;
|
|
3759
|
-
return 0;
|
|
3760
|
-
});
|
|
3761
|
-
const [previewUrl, setPreviewUrl] = useState(null);
|
|
3762
|
-
const [invalidUrls, setInvalidUrls] = useState([]);
|
|
3763
|
-
const isReadyToSubmit = titleValue &&
|
|
3764
|
-
!specialCharErr &&
|
|
3765
|
-
innertext(descriptionValue) &&
|
|
3766
|
-
(optionalTopic || (!optionalTopic && selectedTopics.length > 0)) &&
|
|
3767
|
-
currentCommunity &&
|
|
3768
|
-
(!imageFiles || imageFiles.length <= MAX_IMAGE_UPLOADS) &&
|
|
3769
|
-
!(invalidUrls === null || invalidUrls === void 0 ? void 0 : invalidUrls.length) &&
|
|
3770
|
-
!isSubmitting;
|
|
3771
|
-
// HANDLE etra action when OPEN AND CLOSE
|
|
3772
|
-
useEffect(() => {
|
|
3773
|
-
if (editPostData) {
|
|
3774
|
-
const post = editPostData;
|
|
3775
|
-
setTitleValue(post.title || '');
|
|
3776
|
-
setDescriptionValue(decodeMention(decodePostUrl(post.description || '', 'edit'), post.mentions));
|
|
3777
|
-
setCommunityValue({
|
|
3778
|
-
label: post.community.name,
|
|
3779
|
-
value: `${post.community.id || ''}-${post.community.mappedCategoryId || ''}`,
|
|
3780
|
-
});
|
|
3781
|
-
setSelectedTopics(post.topics || []);
|
|
3782
|
-
setImageFiles(post.photos || []);
|
|
3783
|
-
setIsAnonymous(!!post.isAnonymous || false);
|
|
3784
|
-
setIsAskDoctor(!!post.isAskDoctor || false);
|
|
3785
|
-
}
|
|
3786
|
-
else {
|
|
3787
|
-
if (defaultCommunity) {
|
|
3788
|
-
setCommunityValue({
|
|
3789
|
-
label: defaultCommunity.name,
|
|
3790
|
-
value: `${defaultCommunity.id || ''}-${defaultCommunity.mappedCategoryId || ''}`,
|
|
3791
|
-
});
|
|
3792
|
-
}
|
|
3793
|
-
if (defaultTopics) {
|
|
3794
|
-
setSelectedTopics(defaultTopics);
|
|
3795
|
-
}
|
|
3796
|
-
}
|
|
3797
|
-
}, []);
|
|
3798
|
-
useEffect(() => {
|
|
3799
|
-
setspecialCharErr(titleValue !== '' && !/[a-zA-Z]/.test(titleValue));
|
|
3800
|
-
}, [titleValue]);
|
|
3801
|
-
const onCreateEditSuccess = (res) => {
|
|
3802
|
-
if (onPostCreatedEdited) {
|
|
3803
|
-
onPostCreatedEdited(formatPost(res), isInEditMode);
|
|
3804
|
-
}
|
|
3805
|
-
onClose && onClose();
|
|
3806
|
-
};
|
|
3807
|
-
const submitPost = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3808
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3809
|
-
if (showAskDoctorOptions && typeof isAskDoctor === 'undefined') {
|
|
3810
|
-
setShowAskDoctorRequired(true);
|
|
3811
|
-
return false;
|
|
3812
|
-
}
|
|
3813
|
-
const bodyFormData = yield getPostFormData({
|
|
3814
|
-
title: titleValue,
|
|
3815
|
-
description: descriptionValue,
|
|
3816
|
-
communityId: String((currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.id) || ''),
|
|
3817
|
-
imageFiles,
|
|
3818
|
-
previewUrl,
|
|
3819
|
-
topicIds: selectedTopics === null || selectedTopics === void 0 ? void 0 : selectedTopics.map((topic) => String(topic.id || '')).filter(Boolean),
|
|
3820
|
-
locale,
|
|
3821
|
-
sanitizeFunction,
|
|
3822
|
-
categoryCommunityId: String((currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.mappedCategoryId) || ''),
|
|
3823
|
-
categoryTopicIds: selectedTopics === null || selectedTopics === void 0 ? void 0 : selectedTopics.map((topic) => String(topic.mappedCategoryId || '')).filter(Boolean),
|
|
3824
|
-
isAnonymous: isAnonymous ? 1 : 0,
|
|
3825
|
-
isAskDoctor: isAskDoctor ? 1 : 0,
|
|
3826
|
-
});
|
|
3827
|
-
if (articleId) {
|
|
3828
|
-
bodyFormData.append('article_id', articleId);
|
|
3829
|
-
}
|
|
3830
|
-
let res;
|
|
3831
|
-
if (isInEditMode) {
|
|
3832
|
-
if (editPostData === null || editPostData === void 0 ? void 0 : editPostData.id) {
|
|
3833
|
-
res = yield editPost({
|
|
3834
|
-
id: editPostData.id,
|
|
3835
|
-
formData: bodyFormData,
|
|
3836
|
-
locale,
|
|
3837
|
-
});
|
|
3838
|
-
}
|
|
3839
|
-
}
|
|
3840
|
-
else {
|
|
3841
|
-
res = yield createPost({
|
|
3842
|
-
formData: bodyFormData,
|
|
3843
|
-
locale,
|
|
3844
|
-
isArticleComment: !(currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.id) && !!(currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.mappedCategoryId),
|
|
3845
|
-
});
|
|
3846
|
-
}
|
|
3847
|
-
const resData = res === null || res === void 0 ? void 0 : res.data;
|
|
3848
|
-
if ((resData === null || resData === void 0 ? void 0 : resData.id) && !((_b = (_a = res === null || res === void 0 ? void 0 : res.messages) === null || _a === void 0 ? void 0 : _a.moderation) === null || _b === void 0 ? void 0 : _b.type)) {
|
|
3849
|
-
pushNotifications({
|
|
3850
|
-
message: t('createPost.popup.success'),
|
|
3851
|
-
type: 'success',
|
|
3852
|
-
});
|
|
3853
|
-
onCreateEditSuccess(resData);
|
|
3854
|
-
}
|
|
3855
|
-
else {
|
|
3856
|
-
if (((_d = (_c = res === null || res === void 0 ? void 0 : res.messages) === null || _c === void 0 ? void 0 : _c.moderation) === null || _d === void 0 ? void 0 : _d.type) === 'banned') {
|
|
3857
|
-
pushNotifications({
|
|
3858
|
-
title: t('notification.post.blocked.title'),
|
|
3859
|
-
message: t('notification.post.blocked.message'),
|
|
3860
|
-
type: 'danger',
|
|
3861
|
-
});
|
|
3862
|
-
if (res.messages.moderation.words) {
|
|
3863
|
-
setBannedWords(res.messages.moderation.words);
|
|
3864
|
-
}
|
|
3865
|
-
}
|
|
3866
|
-
else if (((_f = (_e = res === null || res === void 0 ? void 0 : res.messages) === null || _e === void 0 ? void 0 : _e.moderation) === null || _f === void 0 ? void 0 : _f.type) === 'suspect') {
|
|
3867
|
-
pushNotifications({
|
|
3868
|
-
title: t('notification.post.suspect.title'),
|
|
3869
|
-
message: t('notification.post.suspect.message'),
|
|
3870
|
-
type: 'warning',
|
|
3871
|
-
});
|
|
3872
|
-
onClose && onClose();
|
|
3873
|
-
}
|
|
3874
|
-
else if ((_h = (_g = res === null || res === void 0 ? void 0 : res.messages) === null || _g === void 0 ? void 0 : _g.find) === null || _h === void 0 ? void 0 : _h.call(_g, (m) => { var _a; return !!((_a = m === null || m === void 0 ? void 0 : m.includes) === null || _a === void 0 ? void 0 : _a.call(m, 'suspend')); })) {
|
|
3875
|
-
pushNotifications({
|
|
3876
|
-
message: t('notification.suspend.message'),
|
|
3877
|
-
type: 'danger',
|
|
3878
|
-
});
|
|
3879
|
-
onClose && onClose();
|
|
3880
|
-
}
|
|
3881
|
-
else {
|
|
3882
|
-
pushNotifications({
|
|
3883
|
-
message: ((_j = res === null || res === void 0 ? void 0 : res.messages) === null || _j === void 0 ? void 0 : _j[0]) || t('notification.failure'),
|
|
3884
|
-
type: 'danger',
|
|
3885
|
-
});
|
|
3886
|
-
}
|
|
3887
|
-
}
|
|
3888
|
-
});
|
|
3889
|
-
return (React__default.createElement(StyledCreateNewPost, { className: className, style: style },
|
|
3890
|
-
React__default.createElement("div", { className: "input-group-container" },
|
|
3891
|
-
React__default.createElement(CreatePostTitle, { className: "input-group", bannedWords: bannedWords, value: titleValue, onChange: setTitleValue }),
|
|
3892
|
-
specialCharErr && (React__default.createElement(StyledError, null,
|
|
3893
|
-
React__default.createElement(Info, { isSolid: true, color: theme.colors.red700, size: 14 }),
|
|
3894
|
-
React__default.createElement(Text, { size: "p3", as: "span", color: theme.colors.red700 }, t('createPost.popup.specialCharErr')))),
|
|
3895
|
-
React__default.createElement(CreatePostDescription, { className: "input-group", bannedWords: bannedWords, value: descriptionValue, onChange: setDescriptionValue, onPreviewUrlChange: setPreviewUrl, onInvalidUrlsChange: setInvalidUrls, onImageFilesChange: setImageFiles, imageFiles: imageFiles }),
|
|
3896
|
-
showAskDoctorOptions && (React__default.createElement(StyledIsQuestion, { "data-is-marry-baby": isMarryBaby },
|
|
3897
|
-
React__default.createElement("div", { className: "switch-label" },
|
|
3898
|
-
React__default.createElement(Ask, { isMarryBaby: isMarryBaby, size: isMarryBaby ? 32 : 24, color: theme.colors.primaryBase, className: "label-icon" }),
|
|
3899
|
-
React__default.createElement("span", { className: "label-txt" }, t('createPost.askDoctor'))),
|
|
3900
|
-
React__default.createElement(BtnChoice, { value: isAskDoctor, choices: [
|
|
3901
|
-
{
|
|
3902
|
-
label: t('createPost.askDoctorChoice.yes'),
|
|
3903
|
-
value: true,
|
|
3904
|
-
dataEventCategory: 'Together',
|
|
3905
|
-
dataEventAction: 'Write Post Click - Ask Doctor',
|
|
3906
|
-
dataEventLabel: currentPageUrl,
|
|
3907
|
-
},
|
|
3908
|
-
{
|
|
3909
|
-
label: t('createPost.askDoctorChoice.no'),
|
|
3910
|
-
value: false,
|
|
3911
|
-
},
|
|
3912
|
-
], onChange: (v) => {
|
|
3913
|
-
if (typeof v === 'boolean') {
|
|
3914
|
-
setShowAskDoctorRequired(false);
|
|
3915
|
-
setIsAskDoctor(v);
|
|
3916
|
-
}
|
|
3917
|
-
} }))),
|
|
3918
|
-
showAskDoctorRequired && (React__default.createElement(StyledError, null,
|
|
3919
|
-
React__default.createElement(Info, { isSolid: true, color: theme.colors.red700, size: 14 }),
|
|
3920
|
-
React__default.createElement(Text, { size: "p3", as: "span", color: theme.colors.red700 }, t('createPost.message.askDoctorRequire')))),
|
|
3921
|
-
React__default.createElement("div", { className: "input-group" },
|
|
3922
|
-
React__default.createElement(Text, { size: "p4", className: "input-group-label" }, t('admin.community')),
|
|
3923
|
-
React__default.createElement(Dropdown, { options: (communitiesList === null || communitiesList === void 0 ? void 0 : communitiesList.map((c) => ({
|
|
3924
|
-
label: c.name,
|
|
3925
|
-
value: `${c.id || ''}-${c.mappedCategoryId || ''}`,
|
|
3926
|
-
}))) || [], id: "community-picker", placeholder: t('community.choose'), value: communityValue, dropdownLabelTrackingAttributes: {
|
|
3927
|
-
'data-event-category': 'Together',
|
|
3928
|
-
'data-event-action': 'Write Post Click - Choose Community/Topic',
|
|
3929
|
-
'data-event-label': currentPageUrl,
|
|
3930
|
-
}, onChange: (option) => {
|
|
3931
|
-
setCommunityValue({
|
|
3932
|
-
label: option.label,
|
|
3933
|
-
value: String(option.value),
|
|
3934
|
-
});
|
|
3935
|
-
setSelectedTopics([]);
|
|
3936
|
-
}, disabled: !!forceSelectCommunity }),
|
|
3937
|
-
React__default.createElement(Text, { size: "sm", className: "warning", color: theme.colors.gray400 },
|
|
3938
|
-
"* ",
|
|
3939
|
-
t('commentPopup.warning.newPost'))),
|
|
3940
|
-
!hideTopicList && (React__default.createElement("div", { className: "input-group" },
|
|
3941
|
-
React__default.createElement(Text, { size: "p4", className: "input-group-label" }, t('tab.topic')),
|
|
3942
|
-
React__default.createElement("div", { className: "input-notification" },
|
|
3943
|
-
React__default.createElement("img", { src: currentCommunity
|
|
3944
|
-
? IconAlertCirclePrimary
|
|
3945
|
-
: IconAlertCircleWarning, loading: "lazy" }),
|
|
3946
|
-
React__default.createElement(Text, { size: "base", color: theme.colors.gray500 }, t(currentCommunity
|
|
3947
|
-
? 'createPost.popup.primary'
|
|
3948
|
-
: 'createPost.popup.warning'))),
|
|
3949
|
-
currentCommunity && (React__default.createElement(TopicSelectList, { className: "tag-list", communityId: currentCommunity.id, forceTopics: forceSelectTopics, onChange: setSelectedTopics, selectedTopics: selectedTopics, noFetch: noFetchTopic, dataEventCategory: "Together", dataEventAction: "Write Post Click - Choose Community/Topic", dataEventLabel: currentPageUrl }))))),
|
|
3950
|
-
React__default.createElement("div", { className: "form-action" },
|
|
3951
|
-
React__default.createElement("div", { className: "input-group" },
|
|
3952
|
-
React__default.createElement(Checkbox, { className: "swich-input-group", labelPosition: "left", name: "PostAnonymous", checked: isAnonymous, color: isMarryBaby ? 'pink' : undefined, "data-event-category": "Together", "data-event-action": "Write Post Click - Incognito", "data-event-label": currentPageUrl, label: React__default.createElement("div", { className: "switch-label" },
|
|
3953
|
-
React__default.createElement("img", { className: "label-icon", src: CommonGAssets.getAssetPath('anomyous-avatar.svg'), alt: "anomyous avatar", style: { marginRight: '10px', width: '24px' }, loading: "lazy" }),
|
|
3954
|
-
React__default.createElement("span", { className: "label-txt" }, t('createPost.postAnonymous'))), value: "Post Anonymous", onChange: (event) => setIsAnonymous(event.currentTarget.checked), styles: {
|
|
3955
|
-
body: {
|
|
3956
|
-
display: 'flex',
|
|
3957
|
-
width: '100%',
|
|
3958
|
-
justifyContent: 'space-between',
|
|
3959
|
-
alignItems: 'center',
|
|
3960
|
-
},
|
|
3961
|
-
label: {
|
|
3962
|
-
display: 'flex',
|
|
3963
|
-
alignItems: 'center',
|
|
3964
|
-
},
|
|
3965
|
-
} })),
|
|
3966
|
-
React__default.createElement("div", { className: "input-group" },
|
|
3967
|
-
React__default.createElement(Button$1, { className: "submit-btn pointer-event-child-none", size: "lg", "data-event-category": "Ask Doctor", "data-event-action": "Submit Question", "data-event-label": window.location.href, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
3968
|
-
if (isReadyToSubmit && !isSubmitting) {
|
|
3969
|
-
setIsSubmitting(true);
|
|
3970
|
-
try {
|
|
3971
|
-
yield submitPost();
|
|
3972
|
-
}
|
|
3973
|
-
catch (e) {
|
|
3974
|
-
console.error(e);
|
|
3975
|
-
pushNotifications(getDefaultFailNoti(t));
|
|
3976
|
-
}
|
|
3977
|
-
setIsSubmitting(false);
|
|
3978
|
-
}
|
|
3979
|
-
}), disabled: !isReadyToSubmit, loading: isSubmitting }, t('createPost.popup.submit'))))));
|
|
3980
|
-
};
|
|
3981
|
-
|
|
3982
|
-
const StyledPopupDanger = styled.div `
|
|
3983
|
-
[data-type='confirm'] {
|
|
3984
|
-
width: min(360px, 100%);
|
|
3985
|
-
height: auto;
|
|
3986
|
-
&[data-open='false'] {
|
|
3987
|
-
top: calc(-100% - 500px);
|
|
3988
|
-
}
|
|
3989
|
-
}
|
|
3990
|
-
z-index: 600;
|
|
3991
|
-
|
|
3992
|
-
.header {
|
|
3993
|
-
display: none !important;
|
|
3994
|
-
}
|
|
3995
|
-
|
|
3996
|
-
.confirm-dialog {
|
|
3997
|
-
position: relative;
|
|
3998
|
-
overflow: auto;
|
|
3999
|
-
width: 100%;
|
|
4000
|
-
padding-top: 44px;
|
|
4001
|
-
background: #fff;
|
|
4002
|
-
border-radius: ${theme.borderRadius};
|
|
4003
|
-
|
|
4004
|
-
.confirm-content {
|
|
4005
|
-
display: flex;
|
|
4006
|
-
flex-direction: column;
|
|
4007
|
-
align-items: center;
|
|
4008
|
-
padding: 0 16px 16px;
|
|
4009
|
-
text-align: center;
|
|
4010
|
-
|
|
4011
|
-
.title {
|
|
4012
|
-
margin-bottom: 8px;
|
|
4013
|
-
font-size: 24px;
|
|
4014
|
-
line-height: 32px;
|
|
4015
|
-
word-break: break-word;
|
|
4016
|
-
overflow-wrap: break-word;
|
|
4017
|
-
}
|
|
4018
|
-
|
|
4019
|
-
.desc {
|
|
4020
|
-
margin-bottom: 24px;
|
|
4021
|
-
color: ${theme.colors.gray500};
|
|
4022
|
-
font-size: 18px;
|
|
4023
|
-
line-height: 24px;
|
|
4024
|
-
text-align: center;
|
|
4025
|
-
word-break: break-word;
|
|
4026
|
-
overflow-wrap: break-word;
|
|
4027
|
-
}
|
|
4028
|
-
|
|
4029
|
-
.btn-group {
|
|
4030
|
-
display: flex;
|
|
4031
|
-
flex-wrap: wrap;
|
|
4032
|
-
align-items: center;
|
|
4033
|
-
justify-content: center;
|
|
4034
|
-
|
|
4035
|
-
button {
|
|
4036
|
-
margin: 0 4px 0.5rem;
|
|
4037
|
-
}
|
|
4038
|
-
}
|
|
4039
|
-
}
|
|
4040
|
-
}
|
|
4041
|
-
.thumbnail-container {
|
|
4042
|
-
width: 80px;
|
|
4043
|
-
height: 80px;
|
|
4044
|
-
margin-bottom: 32px;
|
|
4045
|
-
.thumbnail {
|
|
4046
|
-
width: 100%;
|
|
4047
|
-
height: 100%;
|
|
4048
|
-
}
|
|
4049
|
-
&.is-icon {
|
|
4050
|
-
display: flex;
|
|
4051
|
-
align-items: center;
|
|
4052
|
-
justify-content: center;
|
|
4053
|
-
background: #e0e9fc;
|
|
4054
|
-
border-radius: 1rem;
|
|
4055
|
-
.thumbnail {
|
|
4056
|
-
width: 40px;
|
|
4057
|
-
height: 40px;
|
|
2469
|
+
&.is-icon {
|
|
2470
|
+
display: flex;
|
|
2471
|
+
align-items: center;
|
|
2472
|
+
justify-content: center;
|
|
2473
|
+
background: #e0e9fc;
|
|
2474
|
+
border-radius: 1rem;
|
|
2475
|
+
.thumbnail {
|
|
2476
|
+
width: 40px;
|
|
2477
|
+
height: 40px;
|
|
4058
2478
|
}
|
|
4059
2479
|
}
|
|
4060
2480
|
}
|
|
@@ -4221,8 +2641,8 @@ const StyledFSBtn = styled.div `
|
|
|
4221
2641
|
align-items: center;
|
|
4222
2642
|
`;
|
|
4223
2643
|
|
|
4224
|
-
var img$
|
|
4225
|
-
var CloseIcon = img$
|
|
2644
|
+
var img$h = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e";
|
|
2645
|
+
var CloseIcon = img$h;
|
|
4226
2646
|
|
|
4227
2647
|
const PopupFrame = ({ className, style, closeIcon, heading = '', children, isOpen = false, hasFullscreen = false, onClose = () => null, }) => {
|
|
4228
2648
|
const [expand, setExpand] = useState(false);
|
|
@@ -4490,14 +2910,14 @@ const StyledInputCommentBar = styled.div `
|
|
|
4490
2910
|
|
|
4491
2911
|
const MainInputTriggerContext = createContext({});
|
|
4492
2912
|
|
|
4493
|
-
var img$
|
|
4494
|
-
var IconCloseCircleLine = img$
|
|
2913
|
+
var img$g = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3ccircle cx='8' cy='8.5' r='6.667' fill='white' stroke='%23404040'/%3e%3cpath stroke='%23404040' stroke-linecap='round' stroke-linejoin='round' d='m10 6.5-4 4M6 6.5l4 4'/%3e%3c/svg%3e";
|
|
2914
|
+
var IconCloseCircleLine = img$g;
|
|
4495
2915
|
|
|
4496
|
-
var img$
|
|
4497
|
-
var IconEnter = img$
|
|
2916
|
+
var img$f = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m7.5 9.734-3.75 3.75 3.75 3.75'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M16.25 4.734v5.569c0 .843-.33 1.653-.915 2.25a3.1 3.1 0 0 1-2.21.931H3.75'/%3e%3c/svg%3e";
|
|
2917
|
+
var IconEnter = img$f;
|
|
4498
2918
|
|
|
4499
|
-
var img$
|
|
4500
|
-
var IconTabEditPrimary = img$
|
|
2919
|
+
var img$e = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.754 4.854H4.492a1.79 1.79 0 0 0-1.789 1.789v12.524a1.79 1.79 0 0 0 1.79 1.789h12.523a1.79 1.79 0 0 0 1.79-1.79v-6.261'/%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M17.463 3.512a1.898 1.898 0 0 1 2.684 2.684l-8.498 8.498-3.579.895.895-3.579z'/%3e%3c/svg%3e";
|
|
2920
|
+
var IconTabEditPrimary = img$e;
|
|
4501
2921
|
|
|
4502
2922
|
const getCommentFormBody = ({ postId, message, photos, link, locale, sanitizeFunction, replyingUserId, replyingUserName, replyingId, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
4503
2923
|
const formData = new FormData();
|
|
@@ -4885,38 +3305,38 @@ const StyledShare = styled.div `
|
|
|
4885
3305
|
}
|
|
4886
3306
|
`;
|
|
4887
3307
|
|
|
4888
|
-
var img$
|
|
4889
|
-
var IconWhatsapp = img$
|
|
3308
|
+
var img$d = "data:image/png;base64,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";
|
|
3309
|
+
var IconWhatsapp = img$d;
|
|
4890
3310
|
|
|
4891
|
-
var img$
|
|
4892
|
-
var IconZalo = img$
|
|
3311
|
+
var img$c = "data:image/png;base64,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";
|
|
3312
|
+
var IconZalo = img$c;
|
|
4893
3313
|
|
|
4894
|
-
var img$
|
|
4895
|
-
var MBIconCopy = img$
|
|
3314
|
+
var img$b = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cg fill='%233e3f58'%3e%3cpath d='m19.726 8.537-.632.151zm0 4.65-.632-.151zm-9.097-8.918.146.633zm4.744 0-.146.633zm1.303 11.983a.65.65 0 1 0 .649 1.126zM6.041 7.23a.65.65 0 0 0 1.182.541zm13.053 1.459a9.34 9.34 0 0 1 0 4.348l1.264.303a10.6 10.6 0 0 0 0-4.953l-1.264.303zm-8.32-3.786a9.94 9.94 0 0 1 4.452 0l.291-1.267a11.24 11.24 0 0 0-5.035 0zm4.452 0c1.925.443 3.419 1.913 3.867 3.786l1.264-.303c-.566-2.363-2.445-4.199-4.84-4.75zm2.099 12.476a6.39 6.39 0 0 0 3.033-4.04l-1.264-.303a5.1 5.1 0 0 1-2.418 3.217zM10.482 3.636A6.47 6.47 0 0 0 6.04 7.23l1.182.541a5.17 5.17 0 0 1 3.551-2.868z'/%3e%3cpath d='m3.274 16.187-.632.151zm0-4.65-.632-.151zm13.451 0-.632.151zm0 4.65.632.151zm-4.354 4.268-.146-.633zm-4.744 0-.146.634zm0-13.186.146.633zm4.744 0-.146.633zm-8.465 8.767a9.34 9.34 0 0 1 0-4.348l-1.264-.303a10.6 10.6 0 0 0 0 4.953l1.264-.303zm12.187-4.348a9.34 9.34 0 0 1 0 4.348l1.264.303a10.6 10.6 0 0 0 0-4.953l-1.264.303zm-3.867 8.133a9.94 9.94 0 0 1-4.452 0l-.291 1.267a11.24 11.24 0 0 0 5.035 0l-.291-1.267zM7.774 7.903a9.94 9.94 0 0 1 4.452 0l.291-1.267a11.24 11.24 0 0 0-5.035 0l.291 1.267zm0 11.919c-1.925-.443-3.419-1.913-3.867-3.786l-1.264.303c.565 2.363 2.445 4.199 4.84 4.75zm4.744 1.267c2.395-.551 4.275-2.387 4.84-4.75l-1.264-.303c-.448 1.872-1.942 3.343-3.867 3.786zm-.291-13.186c1.925.443 3.419 1.913 3.867 3.785l1.264-.303c-.566-2.363-2.445-4.199-4.84-4.75l-.291 1.267zM7.482 6.636c-2.395.551-4.275 2.387-4.84 4.75l1.264.303c.448-1.872 1.942-3.343 3.867-3.785l-.291-1.267zM12.268 21l.083-2.523c.079-.573.221-.867.433-1.075l-.91-.928c-.499.489-.712 1.104-.811 1.827-.096.702-.095 1.596-.095 2.699zm4.205-5.409c-1.126 0-2.035-.001-2.748.093-.731.096-1.354.303-1.85.79l.91.928c.214-.21.519-.352 1.11-.43.609-.08 1.416-.082 2.579-.082z'/%3e%3c/g%3e%3cpath stroke='%233e3f58' stroke-linecap='round' stroke-width='1.3' d='M7 11h3m-3 3h5'/%3e%3c/svg%3e";
|
|
3315
|
+
var MBIconCopy = img$b;
|
|
4896
3316
|
|
|
4897
|
-
var img$
|
|
4898
|
-
var MBIconFacebook = img$
|
|
3317
|
+
var img$a = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none'%3e%3cpath fill='url(%23a)' d='M35 9.583v20.834A4.59 4.59 0 0 1 30.417 35h-4.584V23.333h3.017a.84.84 0 0 0 .833-.733l.309-2.5a.8.8 0 0 0-.2-.65.82.82 0 0 0-.625-.283h-3.334V16.25c0-.917.75-1.667 1.667-1.667h1.667A.836.836 0 0 0 30 13.75v-2.817a.84.84 0 0 0-.758-.825A32 32 0 0 0 26.525 10c-3.667 0-5.692 2.183-5.692 6.142v3.025H17.5a.836.836 0 0 0-.833.833v2.5c0 .458.375.833.833.833h3.333V35H9.583A4.59 4.59 0 0 1 5 30.417V9.583A4.59 4.59 0 0 1 9.583 5h20.834A4.59 4.59 0 0 1 35 9.583'/%3e%3cdefs%3e%3clinearGradient id='a' x1='20' x2='20' y1='5' y2='35' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%234DABF7'/%3e%3cstop offset='1' stop-color='%232668DA'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";
|
|
3318
|
+
var MBIconFacebook = img$a;
|
|
4899
3319
|
|
|
4900
|
-
var img$
|
|
4901
|
-
var MBIconLinkedIn = img$
|
|
3320
|
+
var img$9 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='41' height='40' fill='none'%3e%3cpath fill='%230078D4' d='M35.5 30.833A4.166 4.166 0 0 1 31.333 35H9.667A4.167 4.167 0 0 1 5.5 30.833V9.167A4.167 4.167 0 0 1 9.667 5h21.666A4.166 4.166 0 0 1 35.5 9.167z'/%3e%3cpath fill='black' d='M25.5 30.833v-8.416c0-1.408-.683-2.248-1.827-2.248-.68 0-1.179.382-1.483 1.136-.014.053-.034.271-.026.928l.002 8.6h-5.833V14.999h5.833v.884c.852-.587 1.896-.884 3.115-.884 3.79 0 6.05 2.578 6.05 6.895l.002 8.939zm-15.834 0V14.999h2.88c-1.668 0-2.88-1.226-2.88-2.917s1.232-2.916 2.928-2.916c1.677 0 2.871 1.192 2.905 2.9 0 1.702-1.232 2.933-2.929 2.933h2.93v15.834z' opacity='.05'/%3e%3cpath fill='black' d='M25.917 30.417v-7.999c0-1.644-.859-2.665-2.243-2.665-1.08 0-1.613.76-1.87 1.398-.067.166-.058.824-.055 1.105l.002 8.161h-5v-15h5v1.365c.662-.686 1.729-1.365 3.531-1.365 3.528 0 5.634 2.422 5.634 6.479l.001 8.521zm-15.833 0v-15h5v15zm2.464-15.833c-1.427 0-2.464-1.052-2.464-2.5 0-1.45 1.057-2.5 2.512-2.5 1.436 0 2.459 1.024 2.488 2.49 0 1.458-1.057 2.51-2.512 2.51z' opacity='.07'/%3e%3cpath fill='white' d='M10.5 15.833h4.167V30H10.5zm2.07-1.666h-.023c-1.243 0-2.047-.927-2.047-2.085 0-1.182.83-2.082 2.095-2.082 1.268 0 2.048.9 2.072 2.082 0 1.157-.804 2.085-2.096 2.085M30.5 30h-4.167v-7.582c0-1.832-1.02-3.082-2.66-3.082-1.25 0-1.927.843-2.255 1.658-.12.292-.085 1.099-.085 1.506V30h-4.166V15.833h4.166v2.18c.601-.93 1.542-2.18 3.949-2.18 2.981 0 5.217 1.875 5.217 6.062z'/%3e%3c/svg%3e";
|
|
3321
|
+
var MBIconLinkedIn = img$9;
|
|
4902
3322
|
|
|
4903
|
-
var img$
|
|
4904
|
-
var MBIconMessenger = img$
|
|
3323
|
+
var img$8 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none'%3e%3cpath fill='url(%23a)' d='M36.667 19.584c0 8.975-7.458 16.25-16.666 16.25a17 17 0 0 1-3.987-.47 1.68 1.68 0 0 0-1.15.12l-3.647 1.825a1.417 1.417 0 0 1-2.05-1.267v-3.355a1.7 1.7 0 0 0-.567-1.249c-3.245-2.966-5.266-7.179-5.266-11.854 0-8.975 7.458-16.25 16.667-16.25 9.208 0 16.666 7.275 16.666 16.25'/%3e%3cpath fill='black' d='M29.16 14.41c-.357 0-.703.118-1 .343l-4.745 3.512a.6.6 0 0 1-.363.125.56.56 0 0 1-.341-.113l-3.31-2.492a3.82 3.82 0 0 0-2.298-.765c-1.313 0-2.52.66-3.23 1.764l-1.009 1.575-3.433 5.58a1.63 1.63 0 0 0-.06 1.678c.299.545.862.883 1.47.883.357 0 .703-.118 1-.342l4.746-3.513a.6.6 0 0 1 .362-.125c.125 0 .243.04.342.114l3.31 2.491a3.82 3.82 0 0 0 2.297.765 3.82 3.82 0 0 0 3.23-1.763l1.01-1.576 3.433-5.58a1.63 1.63 0 0 0 .059-1.678 1.68 1.68 0 0 0-1.47-.883' opacity='.05'/%3e%3cpath fill='black' d='M29.161 14.826c-.266 0-.525.09-.75.258L23.665 18.6c-.18.136-.39.207-.61.207a.98.98 0 0 1-.591-.197l-3.311-2.492a3.4 3.4 0 0 0-2.048-.68c-1.17 0-2.246.587-2.879 1.572l-1.008 1.575-3.43 5.574c-.247.387-.266.86-.048 1.259.222.405.656.667 1.104.667.266 0 .525-.09.75-.259l4.747-3.515c.18-.136.39-.206.61-.206a.98.98 0 0 1 .592.196l3.31 2.493c.6.446 1.307.68 2.048.68a3.41 3.41 0 0 0 2.88-1.572l1.008-1.576 3.429-5.573c.247-.387.267-.86.048-1.26a1.28 1.28 0 0 0-1.104-.666Z' opacity='.07'/%3e%3cpath fill='white' d='m28.663 15.417-4.75 3.516c-.509.384-1.2.384-1.7.009L18.9 16.449a3.004 3.004 0 0 0-4.325.784l-1.008 1.575-3.425 5.566c-.5.784.458 1.675 1.2 1.117l4.75-3.517a1.41 1.41 0 0 1 1.7-.008l3.311 2.492a3.004 3.004 0 0 0 4.325-.783l1.009-1.575 3.425-5.567c.5-.783-.459-1.675-1.2-1.116Z'/%3e%3cdefs%3e%3cradialGradient id='a' cx='0' cy='0' r='1' gradientTransform='translate(9.24 35.816)scale(39.6767)' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%231292FF'/%3e%3cstop offset='.079' stop-color='%232982FF'/%3e%3cstop offset='.23' stop-color='%234E69FF'/%3e%3cstop offset='.351' stop-color='%236559FF'/%3e%3cstop offset='.428' stop-color='%236D53FF'/%3e%3cstop offset='.754' stop-color='%23DF47AA'/%3e%3cstop offset='.946' stop-color='%23FF6257'/%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e";
|
|
3324
|
+
var MBIconMessenger = img$8;
|
|
4905
3325
|
|
|
4906
|
-
var img$
|
|
4907
|
-
var MBIconTwitter = img$
|
|
3326
|
+
var img$7 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none'%3e%3cpath fill='%2303A9F4' d='M35 30.833A4.167 4.167 0 0 1 30.833 35H9.167A4.166 4.166 0 0 1 5 30.833V9.167A4.166 4.166 0 0 1 9.167 5h21.666C33.134 5 35 6.865 35 9.167z'/%3e%3cpath fill='white' d='M30 14.267c-.735.325-1.666.631-2.5.733.848-.503 2.194-1.552 2.5-2.5-.793.466-2.226.963-3.16 1.143-.747-.791-1.812-1.143-2.992-1.143C21.58 12.5 20 14.42 20 16.667v1.666c-3.333 0-6.583-2.539-8.606-5a4 4 0 0 0-.556 2.048c0 1.516 1.393 3.054 2.495 3.786-.672-.021-1.946-.535-2.5-.834v.048c0 1.972 1.384 3.311 3.26 3.685-.342.094-.76.434-2.366.434.521 1.613 3.144 2.465 4.94 2.5-1.405 1.09-3.91 1.667-5.834 1.667-.332 0-.512.018-.833-.02 1.815 1.15 4.35 1.686 6.667 1.686 7.547 0 11.666-5.765 11.666-11.141 0-.177-.005-.769-.015-.942.807-.568 1.134-1.163 1.682-1.983'/%3e%3c/svg%3e";
|
|
3327
|
+
var MBIconTwitter = img$7;
|
|
4908
3328
|
|
|
4909
|
-
var img$
|
|
4910
|
-
var MBIconZalo = img$
|
|
3329
|
+
var img$6 = "data:image/png;base64,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";
|
|
3330
|
+
var MBIconZalo = img$6;
|
|
4911
3331
|
|
|
4912
|
-
var img$
|
|
4913
|
-
var IconFacebook = img$
|
|
3332
|
+
var img$5 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='33' height='32' fill='none'%3e%3cpath fill='%233B5998' d='M30.734 0H2.254A1.766 1.766 0 0 0 .5 1.766v28.48C.507 31.217 1.296 32 2.266 32h15.328V19.626h-4.16V14.78h4.16v-3.565c0-4.131 2.525-6.384 6.212-6.384a34 34 0 0 1 3.724.192v4.32h-2.54c-2.007 0-2.397.96-2.397 2.352v3.085h4.787l-.64 4.845h-4.16V32h8.154c.975 0 1.766-.79 1.766-1.766V1.754A1.766 1.766 0 0 0 30.734 0'/%3e%3c/svg%3e";
|
|
3333
|
+
var IconFacebook = img$5;
|
|
4914
3334
|
|
|
4915
|
-
var img$
|
|
4916
|
-
var IconLinkedIn = img$
|
|
3335
|
+
var img$4 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='33' height='32' fill='none'%3e%3crect width='32' height='32' x='.5' fill='%230077B5' rx='4'/%3e%3cpath fill='white' fill-rule='evenodd' d='M11.357 9.07c-.022-1.094-.744-1.927-1.917-1.927S7.5 7.976 7.5 9.07C7.5 10.143 8.244 11 9.395 11h.022c1.196 0 1.94-.857 1.94-1.93m0 3.216H7.5v11.571h3.857zm9.294 0c2.771 0 4.849 1.616 4.849 5.089v6.482h-4.212V17.81c0-1.52-.609-2.556-2.134-2.556-1.163 0-1.856.698-2.16 1.374-.112.242-.14.579-.14.917v6.313h-4.211s.055-10.244 0-11.305h4.212v1.601c.559-.77 1.56-1.867 3.796-1.867' clip-rule='evenodd'/%3e%3c/svg%3e";
|
|
3336
|
+
var IconLinkedIn = img$4;
|
|
4917
3337
|
|
|
4918
|
-
var img$
|
|
4919
|
-
var IconTwitter = img$
|
|
3338
|
+
var img$3 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='33' height='32' fill='none'%3e%3crect width='32' height='32' x='.5' fill='%231FA1F3' rx='4'/%3e%3cpath fill='white' fill-rule='evenodd' d='m16.23 13.235.04.634-.673-.077c-2.455-.298-4.6-1.308-6.42-3.004l-.89-.842-.23.622c-.486 1.385-.175 2.848.836 3.832.54.544.418.621-.512.298-.324-.104-.607-.181-.634-.143-.095.091.229 1.27.485 1.735.35.648 1.066 1.282 1.848 1.657l.66.298-.781.013c-.756 0-.783.013-.702.285.27.841 1.335 1.735 2.523 2.123l.836.272-.729.414a7.9 7.9 0 0 1-3.614.958c-.607.013-1.106.065-1.106.104 0 .13 1.645.854 2.603 1.14 2.873.84 6.285.478 8.848-.959 1.82-1.023 3.641-3.055 4.491-5.023.459-1.049.917-2.965.917-3.884 0-.596.04-.673.796-1.385.445-.415.863-.868.944-.997.135-.246.122-.246-.566-.026-1.147.388-1.309.337-.742-.246.418-.414.917-1.165.917-1.385 0-.04-.202.026-.432.142-.242.13-.782.324-1.187.44l-.728.22-.66-.427c-.365-.233-.877-.492-1.147-.57-.688-.18-1.74-.155-2.36.052-1.687.583-2.752 2.085-2.63 3.729Z' clip-rule='evenodd'/%3e%3c/svg%3e";
|
|
3339
|
+
var IconTwitter = img$3;
|
|
4920
3340
|
|
|
4921
3341
|
const getSocialList = (shareUrl, isMarryBaby) => isMarryBaby
|
|
4922
3342
|
? [
|
|
@@ -5168,8 +3588,8 @@ const StyledSubmitReportForm = styled.div `
|
|
|
5168
3588
|
}
|
|
5169
3589
|
`;
|
|
5170
3590
|
|
|
5171
|
-
var img$
|
|
5172
|
-
var IconAlertCircle = img$
|
|
3591
|
+
var img$2 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12M8 5v3M8 11h.007'/%3e%3c/svg%3e";
|
|
3592
|
+
var IconAlertCircle = img$2;
|
|
5173
3593
|
|
|
5174
3594
|
const SubmitReportForm = ({ className, style, reason, reasonText, onClose, postId, }) => {
|
|
5175
3595
|
const { data: { locale, env: { isMarryBaby }, }, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
|
|
@@ -5554,8 +3974,8 @@ const StyledNotificationBar = styled(NotificationBar) `
|
|
|
5554
3974
|
margin-bottom: 16px;
|
|
5555
3975
|
`;
|
|
5556
3976
|
|
|
5557
|
-
var img$
|
|
5558
|
-
var IconArrowLeft = img$
|
|
3977
|
+
var img$1 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.05 18.06 4 12.038l6.05-6.025M4.002 12.035h15'/%3e%3c/svg%3e";
|
|
3978
|
+
var IconArrowLeft = img$1;
|
|
5559
3979
|
|
|
5560
3980
|
const ImagePreviewPopup = ({ className, style, authorName, images, onClose, onOpenSingleView, alt, }) => {
|
|
5561
3981
|
const { t } = useTranslations();
|
|
@@ -5660,8 +4080,8 @@ const StyledCircleArrow = styled.div `
|
|
|
5660
4080
|
}
|
|
5661
4081
|
`;
|
|
5662
4082
|
|
|
5663
|
-
var img
|
|
5664
|
-
var ChevronRightIcon = img
|
|
4083
|
+
var img = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m6 12.813 4-4-4-4'/%3e%3c/svg%3e";
|
|
4084
|
+
var ChevronRightIcon = img;
|
|
5665
4085
|
|
|
5666
4086
|
const PostSingleImageViewPopup = ({ initialViewIndex, images, onClose, alt, }) => {
|
|
5667
4087
|
const [viewIndex, setViewIndex] = useState(initialViewIndex);
|
|
@@ -5955,30 +4375,30 @@ const SocialLinkPreview = ({ url, image, className, style, baseUrl = '', autoPla
|
|
|
5955
4375
|
React__default.createElement("div", { className: `link-image-wrapper ${(previewData === null || previewData === void 0 ? void 0 : previewData.isFetching) ? 'fetching' : ''}` }, (previewData === null || previewData === void 0 ? void 0 : previewData.isFetching) ? (React__default.createElement(Loading$1, { className: "loading-spinner" })) : (React__default.createElement(ImageWrap, { className: "link-image", src: displayImage || DEFAULT_IMG, backupSrc: DEFAULT_IMG, alt: displayUrl })))))));
|
|
5956
4376
|
};
|
|
5957
4377
|
|
|
5958
|
-
var styles$
|
|
4378
|
+
var styles$c = {"loading":"PD6nRZX"};
|
|
5959
4379
|
|
|
5960
4380
|
const Loading = ({ className, size = 'md' }) => {
|
|
5961
4381
|
const { t } = useTranslations();
|
|
5962
|
-
return (React__default.createElement("div", { className: `${styles$
|
|
4382
|
+
return (React__default.createElement("div", { className: `${styles$c.loading} ${className}` },
|
|
5963
4383
|
React__default.createElement(Button, { size: size, color: "transparent", isLoading: true }, t('loading'))));
|
|
5964
4384
|
};
|
|
5965
4385
|
|
|
5966
|
-
var styles$
|
|
4386
|
+
var styles$b = {"category":"l5fL1xL","title":"L-aGKo7"};
|
|
5967
4387
|
|
|
5968
4388
|
const CategoryText = ({ children, className = '' }) => {
|
|
5969
|
-
return React__default.createElement("div", { className: `${styles$
|
|
4389
|
+
return React__default.createElement("div", { className: `${styles$b.category} ${className}` }, children);
|
|
5970
4390
|
};
|
|
5971
4391
|
const Title = ({ children, className = '' }) => {
|
|
5972
|
-
return React__default.createElement("div", { className: `${styles$
|
|
4392
|
+
return React__default.createElement("div", { className: `${styles$b.title} ${className}` }, children);
|
|
5973
4393
|
};
|
|
5974
4394
|
|
|
5975
|
-
var styles$
|
|
4395
|
+
var styles$a = {"container":"eaR8ATZ","info":"xM-7K0a"};
|
|
5976
4396
|
|
|
5977
|
-
var styles$
|
|
4397
|
+
var styles$9 = {"inner":"DZmf3s7"};
|
|
5978
4398
|
|
|
5979
4399
|
const Thumbnail = ({ src, defaultSrc = CommonGAssets.getAssetPath('logo/logomark.png'), ratio = 1, size = 80, radius = 8, alt, className = '', }) => {
|
|
5980
4400
|
return (React__default.createElement("div", { className: className },
|
|
5981
|
-
React__default.createElement("div", { className: styles$
|
|
4401
|
+
React__default.createElement("div", { className: styles$9.inner, style: {
|
|
5982
4402
|
width: `${size}px`,
|
|
5983
4403
|
height: `${size * ratio}px`,
|
|
5984
4404
|
borderRadius: `${radius}px`,
|
|
@@ -5987,9 +4407,9 @@ const Thumbnail = ({ src, defaultSrc = CommonGAssets.getAssetPath('logo/logomark
|
|
|
5987
4407
|
};
|
|
5988
4408
|
|
|
5989
4409
|
const CardArticle = ({ category, title, src, children, className = '', }) => {
|
|
5990
|
-
return (React__default.createElement("div", { className: `${styles$
|
|
4410
|
+
return (React__default.createElement("div", { className: `${styles$a.container} ${className}` },
|
|
5991
4411
|
React__default.createElement(Thumbnail, { src: src }),
|
|
5992
|
-
React__default.createElement("div", { className: styles$
|
|
4412
|
+
React__default.createElement("div", { className: styles$a.info }, children || (React__default.createElement("div", null,
|
|
5993
4413
|
category && React__default.createElement(CategoryText, null, category),
|
|
5994
4414
|
title && React__default.createElement(Title, null, title))))));
|
|
5995
4415
|
};
|
|
@@ -6011,7 +4431,7 @@ const ArticleCard = ({ featureImage, postTitle, author, categories, isReview, cl
|
|
|
6011
4431
|
'Dec 12, 2022') }))));
|
|
6012
4432
|
};
|
|
6013
4433
|
|
|
6014
|
-
var styles$
|
|
4434
|
+
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"};
|
|
6015
4435
|
|
|
6016
4436
|
const ProfileDetailContext = createContext({});
|
|
6017
4437
|
|
|
@@ -6060,9 +4480,9 @@ const About = ({ className = '' }) => {
|
|
|
6060
4480
|
heading: t('profilePanel.experience'),
|
|
6061
4481
|
iconSrc: CommonGAssets.getAssetPath(isMarryBaby ? 'award-doc-mb.svg' : 'award-doc.svg'),
|
|
6062
4482
|
eventAction: 'Doctor Experience Click',
|
|
6063
|
-
panel: (React__default.createElement("div", { className: styles$
|
|
6064
|
-
React__default.createElement("div", { className: styles$
|
|
6065
|
-
React__default.createElement("div", { className: styles$
|
|
4483
|
+
panel: (React__default.createElement("div", { className: styles$8.accBodyGroup }, info === null || info === void 0 ? void 0 : info.experiences.map((i, idx) => (React__default.createElement("div", { className: styles$8.accBodyGroupItem, key: String(idx) },
|
|
4484
|
+
React__default.createElement("div", { className: styles$8.accBodyGroupTitle }, i.title),
|
|
4485
|
+
React__default.createElement("div", { className: styles$8.accBodyGroupDesc },
|
|
6066
4486
|
React__default.createElement("p", null, i.organization),
|
|
6067
4487
|
React__default.createElement("p", null, i.duration))))))),
|
|
6068
4488
|
},
|
|
@@ -6075,9 +4495,9 @@ const About = ({ className = '' }) => {
|
|
|
6075
4495
|
heading: t('profilePanel.education'),
|
|
6076
4496
|
iconSrc: CommonGAssets.getAssetPath(isMarryBaby ? 'book-mb.svg' : 'book.svg'),
|
|
6077
4497
|
eventAction: 'Doctor Degree Click',
|
|
6078
|
-
panel: (React__default.createElement("div", { className: styles$
|
|
6079
|
-
React__default.createElement("div", { className: styles$
|
|
6080
|
-
React__default.createElement("div", { className: styles$
|
|
4498
|
+
panel: (React__default.createElement("div", { className: styles$8.accBodyGroup }, info === null || info === void 0 ? void 0 : info.educations.map((i, idx) => (React__default.createElement("div", { className: styles$8.accBodyGroupItem, key: String(idx) },
|
|
4499
|
+
React__default.createElement("div", { className: styles$8.accBodyGroupTitle }, i.schoolName),
|
|
4500
|
+
React__default.createElement("div", { className: styles$8.accBodyGroupDesc },
|
|
6081
4501
|
React__default.createElement("p", null, i.study),
|
|
6082
4502
|
React__default.createElement("p", null, i.completedYear))))))),
|
|
6083
4503
|
},
|
|
@@ -6090,15 +4510,15 @@ const About = ({ className = '' }) => {
|
|
|
6090
4510
|
heading: t('profilePanel.awards'),
|
|
6091
4511
|
iconSrc: CommonGAssets.getAssetPath(isMarryBaby ? 'award-mb.svg' : 'award.svg'),
|
|
6092
4512
|
eventAction: 'Doctor Award Click',
|
|
6093
|
-
panel: (React__default.createElement("div", { className: styles$
|
|
4513
|
+
panel: (React__default.createElement("div", { className: styles$8.accBodyGroup }, info === null || info === void 0 ? void 0 : info.awards.map((i, idx) => (React__default.createElement("div", { className: styles$8.accBodyGroupTitle, key: idx }, i.title))))),
|
|
6094
4514
|
},
|
|
6095
4515
|
]
|
|
6096
4516
|
: []),
|
|
6097
4517
|
];
|
|
6098
4518
|
const relatedPost = (info === null || info === void 0 ? void 0 : info.relatedPosts) || [];
|
|
6099
4519
|
const socialList = social.filter((i) => i.url);
|
|
6100
|
-
return (React__default.createElement("div", { className: `${styles$
|
|
6101
|
-
accProps.length > 0 && (React__default.createElement(Accordion, { defaultValue: accProps[0].key, chevron: isMarryBaby ? (React__default.createElement("div", { className: styles$
|
|
4520
|
+
return (React__default.createElement("div", { className: `${styles$8.container} ${className}`, "data-is-marrybaby": isMarryBaby },
|
|
4521
|
+
accProps.length > 0 && (React__default.createElement(Accordion, { defaultValue: accProps[0].key, chevron: isMarryBaby ? (React__default.createElement("div", { className: styles$8.mbChevronWrapper },
|
|
6102
4522
|
React__default.createElement(Plus, { size: 12, color: theme.mbColors.midGray }))) : (React__default.createElement(Plus, { color: theme.colors.gray400 })), styles: {
|
|
6103
4523
|
chevron: {
|
|
6104
4524
|
'&[data-rotate]': {
|
|
@@ -6130,33 +4550,33 @@ const About = ({ className = '' }) => {
|
|
|
6130
4550
|
},
|
|
6131
4551
|
} }, accProps.map((i) => (React__default.createElement(Accordion.Item, { key: i.key, value: i.key },
|
|
6132
4552
|
React__default.createElement(Accordion.Control, { "data-event-category": "Together", "data-event-action": i.eventAction, "data-event-label": currentPageUrl },
|
|
6133
|
-
React__default.createElement("div", { className: styles$
|
|
6134
|
-
React__default.createElement("div", { className: styles$
|
|
4553
|
+
React__default.createElement("div", { className: styles$8.header },
|
|
4554
|
+
React__default.createElement("div", { className: styles$8.headingIcon },
|
|
6135
4555
|
React__default.createElement("img", { src: i.iconSrc, loading: "lazy" })),
|
|
6136
|
-
React__default.createElement("div", { className: styles$
|
|
4556
|
+
React__default.createElement("div", { className: styles$8.heading }, i.heading))),
|
|
6137
4557
|
React__default.createElement(Accordion.Panel, null, i.panel)))))),
|
|
6138
|
-
relatedPost.length > 0 && (React__default.createElement("div", { className: styles$
|
|
6139
|
-
React__default.createElement("div", { className: styles$
|
|
6140
|
-
React__default.createElement("img", { className: styles$
|
|
4558
|
+
relatedPost.length > 0 && (React__default.createElement("div", { className: styles$8.group },
|
|
4559
|
+
React__default.createElement("div", { className: styles$8.subTitle },
|
|
4560
|
+
React__default.createElement("img", { className: styles$8.subIcon, src: CommonGAssets.getAssetPath(isMarryBaby ? 'mb-logo.svg' : 'logo/circle-solid.svg'), loading: "lazy" }),
|
|
6141
4561
|
t('profilePanel.publishedArticles')),
|
|
6142
|
-
React__default.createElement("div", { className: `${styles$
|
|
4562
|
+
React__default.createElement("div", { className: `${styles$8.relatedList}` }, info === null || info === void 0 ? void 0 : info.relatedPosts.map((i) => (React__default.createElement("a", { key: String(i.id), href: `${window.location.origin}${i === null || i === void 0 ? void 0 : i.permalink}`, className: styles$8.articleCardLink },
|
|
6143
4563
|
React__default.createElement(ArticleCard, Object.assign({ className: 'article-card' }, Object.assign(Object.assign({}, i), (!i.author && {
|
|
6144
4564
|
author: {
|
|
6145
4565
|
displayName: authorProps === null || authorProps === void 0 ? void 0 : authorProps.name,
|
|
6146
4566
|
avatar: authorProps === null || authorProps === void 0 ? void 0 : authorProps.avatar,
|
|
6147
4567
|
},
|
|
6148
4568
|
})), { isReview: true })))))))),
|
|
6149
|
-
socialList.length > 0 && (React__default.createElement("div", { className: styles$
|
|
6150
|
-
React__default.createElement("div", { className: styles$
|
|
6151
|
-
React__default.createElement("img", { className: styles$
|
|
4569
|
+
socialList.length > 0 && (React__default.createElement("div", { className: styles$8.group },
|
|
4570
|
+
React__default.createElement("div", { className: styles$8.subTitle },
|
|
4571
|
+
React__default.createElement("img", { className: styles$8.subIcon, src: CommonGAssets.getAssetPath(isMarryBaby ? 'social-mb.svg' : 'social.svg'), loading: "lazy" }),
|
|
6152
4572
|
t('profilePanel.socialLinks')),
|
|
6153
|
-
React__default.createElement("div", { className: styles$
|
|
6154
|
-
React__default.createElement(Flex, null, social.map((i, idx) => i.url && (React__default.createElement("div", { className: styles$
|
|
4573
|
+
React__default.createElement("div", { className: styles$8.groupBody },
|
|
4574
|
+
React__default.createElement(Flex, null, social.map((i, idx) => i.url && (React__default.createElement("div", { className: styles$8.socialItem, key: idx },
|
|
6155
4575
|
React__default.createElement("a", { href: i.url, target: "_blank", rel: "noreferrer" },
|
|
6156
4576
|
React__default.createElement("img", { src: i.icon, loading: "lazy", width: "32px", "data-event-category": "Together", "data-event-action": i.eventAction, "data-event-label": currentPageUrl })))))))))));
|
|
6157
4577
|
};
|
|
6158
4578
|
|
|
6159
|
-
var styles$
|
|
4579
|
+
var styles$7 = {"container":"GYUElSy","question":"_3C6QpT1","questionTitle":"_9M9VYL6","community":"_1RuSyv3","questionCard":"_1IG-eEp"};
|
|
6160
4580
|
|
|
6161
4581
|
const PostCard$1 = ({ post, className = '' }) => {
|
|
6162
4582
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -6164,23 +4584,23 @@ const PostCard$1 = ({ post, className = '' }) => {
|
|
|
6164
4584
|
const { data: { userInfo, env: { togetherBasePath }, }, } = useContext(TogetherComponentGlobalContext);
|
|
6165
4585
|
const { authActionWrapper, authorProps, currentPageUrl } = useContext(ProfileDetailContext);
|
|
6166
4586
|
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}/`;
|
|
6167
|
-
return (React__default.createElement("div", { className: `${styles$
|
|
6168
|
-
React__default.createElement("div", { className: styles$
|
|
6169
|
-
React__default.createElement("div", { className: styles$
|
|
4587
|
+
return (React__default.createElement("div", { className: `${styles$7.container} ${className}` },
|
|
4588
|
+
React__default.createElement("div", { className: styles$7.header },
|
|
4589
|
+
React__default.createElement("div", { className: styles$7.question },
|
|
6170
4590
|
t('profilePanel.question'),
|
|
6171
4591
|
' ',
|
|
6172
|
-
React__default.createElement(Anchor$1, { className: styles$
|
|
4592
|
+
React__default.createElement(Anchor$1, { className: styles$7.questionTitle, href: "#", onClick: () => {
|
|
6173
4593
|
if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id)) {
|
|
6174
4594
|
authActionWrapper === null || authActionWrapper === void 0 ? void 0 : authActionWrapper(() => (window.location.href = postHref));
|
|
6175
4595
|
}
|
|
6176
4596
|
} },
|
|
6177
4597
|
"#", post === null || post === void 0 ? void 0 :
|
|
6178
4598
|
post.title)),
|
|
6179
|
-
React__default.createElement("div", { className: styles$
|
|
4599
|
+
React__default.createElement("div", { className: styles$7.community }, (_b = post === null || post === void 0 ? void 0 : post.community) === null || _b === void 0 ? void 0 :
|
|
6180
4600
|
_b.name,
|
|
6181
4601
|
" - ", post === null || post === void 0 ? void 0 :
|
|
6182
4602
|
post.createdTime)),
|
|
6183
|
-
React__default.createElement("div", { className: styles$
|
|
4603
|
+
React__default.createElement("div", { className: styles$7.questionCard },
|
|
6184
4604
|
React__default.createElement(CardAuthor, Object.assign({ className: "card-author" }, authorProps, { role: "user", avatarIcon: React__default.createElement(CrossLogo, null), subLine: React__default.createElement(CardAuthor.SubTextRow, null,
|
|
6185
4605
|
React__default.createElement(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)) })),
|
|
6186
4606
|
React__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) || '',
|
|
@@ -6196,17 +4616,17 @@ const PostCard$1 = ({ post, className = '' }) => {
|
|
|
6196
4616
|
} }, t('profilePanel.anserwing.viewFull'))));
|
|
6197
4617
|
};
|
|
6198
4618
|
|
|
6199
|
-
var styles$
|
|
4619
|
+
var styles$6 = {"container":"MrdoES3"};
|
|
6200
4620
|
|
|
6201
|
-
var styles$
|
|
4621
|
+
var styles$5 = {"container":"_8fd7YMs","thumb":"DomiQfw","content":"-b2qnfL"};
|
|
6202
4622
|
|
|
6203
4623
|
const EmptyMessage = ({ message, buttonTxt, imgSrc, onBtnClick }) => {
|
|
6204
4624
|
const { siteType, isMarryBaby } = useContext(ProfileDetailContext);
|
|
6205
|
-
return (React__default.createElement("div", { className: styles$
|
|
6206
|
-
React__default.createElement("div", { className: styles$
|
|
4625
|
+
return (React__default.createElement("div", { className: styles$5.container },
|
|
4626
|
+
React__default.createElement("div", { className: styles$5.thumb },
|
|
6207
4627
|
React__default.createElement("img", { src: imgSrc ||
|
|
6208
4628
|
CommonGAssets.getAssetPath(isMarryBaby ? 'comments-mb.svg' : 'comments.svg'), loading: "lazy" })),
|
|
6209
|
-
message && React__default.createElement("div", { className: styles$
|
|
4629
|
+
message && React__default.createElement("div", { className: styles$5.content }, message),
|
|
6210
4630
|
buttonTxt && (React__default.createElement(Button, { size: "md", theme: siteType, color: "secondary", onClick: onBtnClick }, buttonTxt))));
|
|
6211
4631
|
};
|
|
6212
4632
|
|
|
@@ -6230,13 +4650,13 @@ const Answering = ({ id }) => {
|
|
|
6230
4650
|
setLoading(false);
|
|
6231
4651
|
}))();
|
|
6232
4652
|
}, []);
|
|
6233
|
-
return (React__default.createElement("div", { className: styles$
|
|
4653
|
+
return (React__default.createElement("div", { className: styles$6.container }, loading ? (React__default.createElement(Loading, null)) : (posts !== null &&
|
|
6234
4654
|
(posts.length > 0 ? (posts.map((i) => (React__default.createElement(PostCard$1, { className: "post-card", key: i.id, post: i })))) : (React__default.createElement(EmptyMessage, { message: t('profilePanel.emptyPostMess.content', {
|
|
6235
4655
|
name: (authorProps === null || authorProps === void 0 ? void 0 : authorProps.name) || (authorProps === null || authorProps === void 0 ? void 0 : authorProps.username),
|
|
6236
4656
|
}) }))))));
|
|
6237
4657
|
};
|
|
6238
4658
|
|
|
6239
|
-
var styles$
|
|
4659
|
+
var styles$4 = {"container":"toEutn7","title":"drdisHs","actions":"scNwTvv","skipBtn":"HNlhOdx"};
|
|
6240
4660
|
|
|
6241
4661
|
const QuestionCard = (_a) => {
|
|
6242
4662
|
var _b, _c, _d, _e;
|
|
@@ -6244,13 +4664,13 @@ const QuestionCard = (_a) => {
|
|
|
6244
4664
|
const { data: { env: { togetherBasePath }, }, } = useContext(TogetherComponentGlobalContext);
|
|
6245
4665
|
// const { showSkipQuestionTag } = useContext(ProfileDetailContext)
|
|
6246
4666
|
return (React__default.createElement(React__default.Fragment, null,
|
|
6247
|
-
React__default.createElement("div", Object.assign({}, rest, { className: `${styles$
|
|
4667
|
+
React__default.createElement("div", Object.assign({}, rest, { className: `${styles$4.container} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}` }),
|
|
6248
4668
|
React__default.createElement(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.createElement(CardAuthor.SubTextRow, null,
|
|
6249
4669
|
React__default.createElement(CardAuthor.SubText, null, post === null || post === void 0 ? void 0 : post.createdTime)) }),
|
|
6250
|
-
React__default.createElement(Anchor$1, { 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$
|
|
4670
|
+
React__default.createElement(Anchor$1, { 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))));
|
|
6251
4671
|
};
|
|
6252
4672
|
|
|
6253
|
-
var styles$
|
|
4673
|
+
var styles$3 = {"accordion":"I-uIJ6E","header":"_41WRsj2","heading":"AcOGL93","headingIcon":"JD3dWJN","panel":"dKAgnS8","chevron":"L2Q9T6m","container":"h-pSmhX"};
|
|
6254
4674
|
|
|
6255
4675
|
const Care = () => {
|
|
6256
4676
|
var _a, _b;
|
|
@@ -6295,7 +4715,7 @@ const Care = () => {
|
|
|
6295
4715
|
onSkipQuestion === null || onSkipQuestion === void 0 ? void 0 : onSkipQuestion(countLists);
|
|
6296
4716
|
}
|
|
6297
4717
|
};
|
|
6298
|
-
return (React__default.createElement("div", { className: styles$
|
|
4718
|
+
return (React__default.createElement("div", { className: styles$3.container }, fetchLoading ? (React__default.createElement(Loading, null)) : (countValues === null || countValues === void 0 ? void 0 : countValues.total_question) > 0 ? (communities.length > 0 && (React__default.createElement(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) => ({
|
|
6299
4719
|
control: {
|
|
6300
4720
|
padding: '16px',
|
|
6301
4721
|
border: `1px solid ${_theme.colors.neutral[1]}`,
|
|
@@ -6321,21 +4741,21 @@ const Care = () => {
|
|
|
6321
4741
|
item: {
|
|
6322
4742
|
marginBottom: '16px',
|
|
6323
4743
|
},
|
|
6324
|
-
}), chevron: React__default.createElement("div", { className: styles$
|
|
4744
|
+
}), chevron: React__default.createElement("div", { className: styles$3.chevron },
|
|
6325
4745
|
React__default.createElement(ArrowDown, { color: theme.colors.gray600, size: 20 })) }, communities.map((i) => {
|
|
6326
4746
|
const listing = (questions && (questions === null || questions === void 0 ? void 0 : questions[i.id])) || [];
|
|
6327
4747
|
return (listing.length > 0 && (React__default.createElement(Accordion.Item, { key: i.id, value: String(i.id) },
|
|
6328
4748
|
React__default.createElement(Accordion.Control, null,
|
|
6329
|
-
React__default.createElement("div", { className: styles$
|
|
6330
|
-
React__default.createElement("div", { className: styles$
|
|
4749
|
+
React__default.createElement("div", { className: styles$3.header },
|
|
4750
|
+
React__default.createElement("div", { className: styles$3.headingIcon },
|
|
6331
4751
|
React__default.createElement("img", { src: i.thumbnail, loading: "lazy" })),
|
|
6332
|
-
React__default.createElement("div", { className: styles$
|
|
4752
|
+
React__default.createElement("div", { className: styles$3.heading }, i.name))),
|
|
6333
4753
|
React__default.createElement(Accordion.Panel, null,
|
|
6334
|
-
React__default.createElement("div", { className: styles$
|
|
4754
|
+
React__default.createElement("div", { className: styles$3.body }, listing.map((post) => (React__default.createElement(QuestionCard, { className: "question-card", key: post.id, post: post, onSkip: handleSkipQuestion }))))))));
|
|
6335
4755
|
})))) : (React__default.createElement(EmptyMessage, { message: t('profilePanel.emptyCareMess.content'), imgSrc: CommonGAssets.getAssetPath('questions.svg') }))));
|
|
6336
4756
|
};
|
|
6337
4757
|
|
|
6338
|
-
var styles$
|
|
4758
|
+
var styles$2 = {"container":"GA-zc-O","mainTxt":"A18McWD","question":"yzr0H0N","questionTitle":"_6gVRc3i","community":"xOzLGrD","questionCard":"IB049vj","linkWrapper":"_8I--vEV"};
|
|
6339
4759
|
|
|
6340
4760
|
const PostCard = ({ post, className = '' }) => {
|
|
6341
4761
|
var _a;
|
|
@@ -6344,9 +4764,9 @@ const PostCard = ({ post, className = '' }) => {
|
|
|
6344
4764
|
const theme = useMantineTheme();
|
|
6345
4765
|
const { authActionWrapper, authorProps } = useContext(ProfileDetailContext);
|
|
6346
4766
|
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}/`;
|
|
6347
|
-
return (React__default.createElement("div", { className: `${styles$
|
|
6348
|
-
React__default.createElement("div", { className: styles$
|
|
6349
|
-
React__default.createElement("a", { "data-event-category": "Together", "data-event-action": "Click Post", "data-event-label": postHref, className: styles$
|
|
4767
|
+
return (React__default.createElement("div", { className: `${styles$2.container} ${className}` },
|
|
4768
|
+
React__default.createElement("div", { className: styles$2.questionCard },
|
|
4769
|
+
React__default.createElement("a", { "data-event-category": "Together", "data-event-action": "Click Post", "data-event-label": postHref, className: styles$2.linkWrapper, href: postHref, onClick: (e) => {
|
|
6350
4770
|
if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id)) {
|
|
6351
4771
|
e.preventDefault();
|
|
6352
4772
|
authActionWrapper === null || authActionWrapper === void 0 ? void 0 : authActionWrapper(() => (window.location.href = postHref));
|
|
@@ -6356,14 +4776,14 @@ const PostCard = ({ post, className = '' }) => {
|
|
|
6356
4776
|
avatar: authorProps === null || authorProps === void 0 ? void 0 : authorProps.avatar,
|
|
6357
4777
|
size: 32,
|
|
6358
4778
|
} },
|
|
6359
|
-
React__default.createElement(CardAuthor.MainText, { className: styles$
|
|
4779
|
+
React__default.createElement(CardAuthor.MainText, { className: styles$2.mainTxt }, post === null || post === void 0 ? void 0 : post.title),
|
|
6360
4780
|
React__default.createElement(CardAuthor.SubTextRow, null,
|
|
6361
4781
|
React__default.createElement(CardAuthor.SubText, null, post === null || post === void 0 ? void 0 : post.createdTime))),
|
|
6362
4782
|
React__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 }),
|
|
6363
4783
|
React__default.createElement(Text, { size: "p3", color: theme.fn.primaryColor() }, t('post.seeMore')))));
|
|
6364
4784
|
};
|
|
6365
4785
|
|
|
6366
|
-
var styles$
|
|
4786
|
+
var styles$1 = {"container":"TSMHoEM"};
|
|
6367
4787
|
|
|
6368
4788
|
const Posts = () => {
|
|
6369
4789
|
const { t } = useTranslations();
|
|
@@ -6386,7 +4806,7 @@ const Posts = () => {
|
|
|
6386
4806
|
setLoading(false);
|
|
6387
4807
|
}))();
|
|
6388
4808
|
}, [id]);
|
|
6389
|
-
return (React__default.createElement("div", { className: styles$
|
|
4809
|
+
return (React__default.createElement("div", { className: styles$1.container }, loading ? (React__default.createElement(Loading, null)) : (posts !== null &&
|
|
6390
4810
|
(posts.length > 0 ? (posts.map((i) => (React__default.createElement(PostCard, { className: "post-card", key: i.id, post: i })))) : (React__default.createElement(EmptyMessage, { message: t('profilePanel.emptyPostMess.content', {
|
|
6391
4811
|
name: (authorProps === null || authorProps === void 0 ? void 0 : authorProps.name) || (authorProps === null || authorProps === void 0 ? void 0 : authorProps.username) || '',
|
|
6392
4812
|
}), buttonTxt: isAuthorLogin && t('profilePanel.createPost'), onBtnClick: () => {
|
|
@@ -6394,7 +4814,7 @@ const Posts = () => {
|
|
|
6394
4814
|
} }))))));
|
|
6395
4815
|
};
|
|
6396
4816
|
|
|
6397
|
-
var styles
|
|
4817
|
+
var styles = {"container":"_4Vekw96","info":"DIJdGcB","body":"aQSt4-Q"};
|
|
6398
4818
|
|
|
6399
4819
|
const formatExperience = (data) => {
|
|
6400
4820
|
if (!data)
|
|
@@ -6603,7 +5023,7 @@ const ProfileDetail = (_a) => {
|
|
|
6603
5023
|
showSkipQuestionTag,
|
|
6604
5024
|
currentPageUrl,
|
|
6605
5025
|
} },
|
|
6606
|
-
React__default.createElement("div", Object.assign({}, rest, { className: `${styles
|
|
5026
|
+
React__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.createElement(Loading, null)) : (React__default.createElement(React__default.Fragment, null,
|
|
6607
5027
|
React__default.createElement(CardAuthor, Object.assign({}, authorProps, { className: "card-author", showDetailPopup: false, subLine: (authorProps === null || authorProps === void 0 ? void 0 : authorProps.role) === 'expert'
|
|
6608
5028
|
? (userData === null || userData === void 0 ? void 0 : userData.specialty) &&
|
|
6609
5029
|
(userData === null || userData === void 0 ? void 0 : userData.organisation) && (React__default.createElement(CardAuthor.SubTextRow, null,
|
|
@@ -6616,10 +5036,10 @@ const ProfileDetail = (_a) => {
|
|
|
6616
5036
|
t('profilePanel.joined'),
|
|
6617
5037
|
' ',
|
|
6618
5038
|
dayjs(userData === null || userData === void 0 ? void 0 : userData.created_at).toNow(true)))) })),
|
|
6619
|
-
role === 'expert' && (React__default.createElement("div", { className: styles
|
|
5039
|
+
role === 'expert' && (React__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 } })),
|
|
6620
5040
|
finalTabContent !== null &&
|
|
6621
5041
|
activeTab !== null &&
|
|
6622
|
-
(finalTabContent.length > 0 ? (React__default.createElement("div", { className: styles
|
|
5042
|
+
(finalTabContent.length > 0 ? (React__default.createElement("div", { className: styles.body },
|
|
6623
5043
|
React__default.createElement(Tabs, Object.assign({}, tabsProps)))) : (React__default.createElement(EmptyMessage, { message: t('profilePanel.emptyPostMess.content', {
|
|
6624
5044
|
text: (authorProps === null || authorProps === void 0 ? void 0 : authorProps.name) || (authorProps === null || authorProps === void 0 ? void 0 : authorProps.username) || '',
|
|
6625
5045
|
}) }))))))));
|
|
@@ -6633,1384 +5053,4 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
6633
5053
|
ProfileDetail: ProfileDetail
|
|
6634
5054
|
});
|
|
6635
5055
|
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
const SkipQuestionOfExpertBtn = (_a) => {
|
|
6639
|
-
var { post, onSkip, btnText, currentPageUrl } = _a, rest = __rest(_a, ["post", "onSkip", "btnText", "currentPageUrl"]);
|
|
6640
|
-
const { t } = useTranslations();
|
|
6641
|
-
const { data: { locale }, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
|
|
6642
|
-
const [showAlert, setShowAlert] = useState(false);
|
|
6643
|
-
const [loading, setLoading] = useState(false);
|
|
6644
|
-
const _theme = useMantineTheme();
|
|
6645
|
-
const handleSkip = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
6646
|
-
var _b;
|
|
6647
|
-
setLoading(true);
|
|
6648
|
-
const res = yield callApiWithAuth(getApiPath(PATHS.USER.SKIP_QUESTION, {
|
|
6649
|
-
_locale: locale,
|
|
6650
|
-
id: post === null || post === void 0 ? void 0 : post.id,
|
|
6651
|
-
}), 'PUT');
|
|
6652
|
-
if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
|
|
6653
|
-
onSkip === null || onSkip === void 0 ? void 0 : onSkip({ id: (post === null || post === void 0 ? void 0 : post.id) || '', communityId: ((_b = post === null || post === void 0 ? void 0 : post.community) === null || _b === void 0 ? void 0 : _b.id) || '' });
|
|
6654
|
-
setShowAlert(false);
|
|
6655
|
-
pushNotifications({
|
|
6656
|
-
title: '',
|
|
6657
|
-
message: 'Skip success',
|
|
6658
|
-
type: 'success',
|
|
6659
|
-
});
|
|
6660
|
-
}
|
|
6661
|
-
else {
|
|
6662
|
-
pushNotifications({
|
|
6663
|
-
title: '',
|
|
6664
|
-
message: res === null || res === void 0 ? void 0 : res.messages,
|
|
6665
|
-
type: 'danger',
|
|
6666
|
-
});
|
|
6667
|
-
}
|
|
6668
|
-
setLoading(false);
|
|
6669
|
-
}), []);
|
|
6670
|
-
return (React__default.createElement(Popover, { width: 327, withArrow: true, shadow: "md", opened: showAlert },
|
|
6671
|
-
React__default.createElement(Popover.Target, null,
|
|
6672
|
-
React__default.createElement("div", Object.assign({ className: `${styles$2.skipBtn} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}`, onClick: () => setShowAlert(true) }, rest), btnText || t('profilePanel.questionNotClear'))),
|
|
6673
|
-
React__default.createElement(Popover.Dropdown, null,
|
|
6674
|
-
React__default.createElement("div", null,
|
|
6675
|
-
React__default.createElement("div", { className: styles$2.alertHeading }, t('profilePanel.skipQuestion.heading')),
|
|
6676
|
-
React__default.createElement("div", { className: styles$2.alertDesc }, t('profilePanel.skipQuestion.content')),
|
|
6677
|
-
React__default.createElement("div", { className: styles$2.alertAction },
|
|
6678
|
-
React__default.createElement(Button$1, { size: "md", variant: "secondary", leftIcon: React__default.createElement(Close, { color: _theme.fn.primaryColor(), size: 24 }), onClick: () => setShowAlert(false), styles: () => ({
|
|
6679
|
-
leftIcon: {
|
|
6680
|
-
marginRight: 0,
|
|
6681
|
-
},
|
|
6682
|
-
}) }),
|
|
6683
|
-
React__default.createElement(Button$1, { variant: "primary", size: "md", leftIcon: React__default.createElement(Check, { color: 'white', size: 24 }), onClick: handleSkip, loading: loading, "data-event-category": "Together", "data-event-action": "Unclear Question Click", "data-event-label": currentPageUrl, styles: () => ({
|
|
6684
|
-
leftIcon: {
|
|
6685
|
-
marginRight: 0,
|
|
6686
|
-
},
|
|
6687
|
-
}) }))))));
|
|
6688
|
-
};
|
|
6689
|
-
|
|
6690
|
-
var img$8 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%233E3F58' d='M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2'/%3e%3c/svg%3e";
|
|
6691
|
-
var MBMoreSolid = img$8;
|
|
6692
|
-
|
|
6693
|
-
var img$7 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23595959'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e";
|
|
6694
|
-
var IconBookmarkFill = img$7;
|
|
6695
|
-
|
|
6696
|
-
var img$6 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e";
|
|
6697
|
-
var IconBookmark = img$6;
|
|
6698
|
-
|
|
6699
|
-
var img$5 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='3' height='13' fill='none'%3e%3ccircle cx='1.583' cy='6.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 6.417)'/%3e%3ccircle cx='1.583' cy='1.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 1.417)'/%3e%3ccircle cx='1.583' cy='11.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 11.417)'/%3e%3c/svg%3e";
|
|
6700
|
-
var IconKebab = img$5;
|
|
6701
|
-
|
|
6702
|
-
var img$4 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 5.333a2 2 0 1 0 0-4 2 2 0 0 0 0 4M4 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4M12 14.667a2 2 0 1 0 0-4 2 2 0 0 0 0 4M5.727 9.007l4.553 2.653M10.273 4.34 5.727 6.993'/%3e%3c/svg%3e";
|
|
6703
|
-
var IconShareOnMedia = img$4;
|
|
6704
|
-
|
|
6705
|
-
var img$3 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M7.17 3.236H2.995a1.193 1.193 0 0 0-1.193 1.192v8.35a1.193 1.193 0 0 0 1.193 1.192h8.35a1.193 1.193 0 0 0 1.192-1.192V8.603'/%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M11.643 2.341a1.265 1.265 0 0 1 1.789 1.79L7.766 9.795l-2.385.596.596-2.385z'/%3e%3c/svg%3e";
|
|
6706
|
-
var IconTabEdit = img$3;
|
|
6707
|
-
|
|
6708
|
-
var img$2 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M2 4h12'/%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.334 1.334 0 0 1 1.334 1.334V4m2 0v9.333a1.334 1.334 0 0 1-1.334 1.334H4.667a1.334 1.334 0 0 1-1.334-1.334V4zM6.667 7.333v4M9.333 7.333v4'/%3e%3c/svg%3e";
|
|
6709
|
-
var IconTrashBin = img$2;
|
|
6710
|
-
|
|
6711
|
-
// import IconBellOff from '../../../assets/svg/icon-bell-off.svg'
|
|
6712
|
-
// import IconBellOn from '../../../assets/svg/icon-bell-on.svg'
|
|
6713
|
-
const CardPostPopoverMore = ({ authorEmail, onDeletePost, shareUrl, post, className = '', popoverClassName = '', onBookmark, onRemoveBookmark, onEditPost, }) => {
|
|
6714
|
-
const { data: { locale, userInfo, togetherUserId, env: { isMarryBaby }, }, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
|
|
6715
|
-
const { t } = useTranslations();
|
|
6716
|
-
// const [localHasNoti, setLocalHasNoti] = useState(false)
|
|
6717
|
-
const [loading, setLoading] = useState(false);
|
|
6718
|
-
const [isOpenLeavePopup, setIsOpenLeavePopup] = useState(false);
|
|
6719
|
-
const [isOpenSharePopup, setIsOpenSharePopup] = useState(false);
|
|
6720
|
-
const { authActionWrapper } = useTogetherAuthRequiredAction();
|
|
6721
|
-
const isAuthor = authorEmail && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && authorEmail === String(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email);
|
|
6722
|
-
return (React__default.createElement("div", { className: className, onClick: (e) => {
|
|
6723
|
-
e.preventDefault();
|
|
6724
|
-
e.stopPropagation();
|
|
6725
|
-
} },
|
|
6726
|
-
isOpenSharePopup && (React__default.createElement(SharePopup, { url: shareUrl, text: post === null || post === void 0 ? void 0 : post.title, onClose: () => setIsOpenSharePopup(false) })),
|
|
6727
|
-
isOpenLeavePopup && (React__default.createElement(PopupDanger, { thumbnail: CommonGAssets.getAssetPath('trash-bin.svg'), isThumbnailIcon: true, title: t('popup.deletePost.title'), description: t('popup.deletePost.description'), acceptText: t('popup.deletePost.accept'), cancelText: t('popup.deletePost.cancel'), onAccept: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
6728
|
-
if (!(post === null || post === void 0 ? void 0 : post.id) || loading)
|
|
6729
|
-
return;
|
|
6730
|
-
setLoading(true);
|
|
6731
|
-
try {
|
|
6732
|
-
const res = yield deletePost({
|
|
6733
|
-
id: post.id,
|
|
6734
|
-
locale,
|
|
6735
|
-
});
|
|
6736
|
-
if ((res === null || res === void 0 ? void 0 : res.status) === 1)
|
|
6737
|
-
onDeletePost === null || onDeletePost === void 0 ? void 0 : onDeletePost();
|
|
6738
|
-
}
|
|
6739
|
-
catch (_a) { }
|
|
6740
|
-
setLoading(false);
|
|
6741
|
-
}), onClose: () => setIsOpenLeavePopup(false) })),
|
|
6742
|
-
React__default.createElement(TreePopoverMenu, { className: popoverClassName, toggleButtonContent: React__default.createElement("img", { src: isMarryBaby ? MBMoreSolid : IconKebab, loading: "lazy" }), position: "bottom", align: "end", buttonProps: {
|
|
6743
|
-
isLoading: loading,
|
|
6744
|
-
}, data: isAuthor
|
|
6745
|
-
? {
|
|
6746
|
-
isShowheader: false,
|
|
6747
|
-
type: 'list',
|
|
6748
|
-
list: [
|
|
6749
|
-
{
|
|
6750
|
-
icon: IconShareOnMedia,
|
|
6751
|
-
label: t('morePopover.share'),
|
|
6752
|
-
onClick: () => setIsOpenSharePopup(true),
|
|
6753
|
-
},
|
|
6754
|
-
{
|
|
6755
|
-
icon: IconTabEdit,
|
|
6756
|
-
label: t('actionPopover.edit'),
|
|
6757
|
-
onClick: onEditPost,
|
|
6758
|
-
},
|
|
6759
|
-
{
|
|
6760
|
-
icon: IconTrashBin,
|
|
6761
|
-
label: t('actionPopover.delete'),
|
|
6762
|
-
onClick: () => {
|
|
6763
|
-
authActionWrapper(() => setIsOpenLeavePopup(true));
|
|
6764
|
-
},
|
|
6765
|
-
},
|
|
6766
|
-
],
|
|
6767
|
-
}
|
|
6768
|
-
: {
|
|
6769
|
-
isShowheader: false,
|
|
6770
|
-
type: 'list',
|
|
6771
|
-
list: [
|
|
6772
|
-
{
|
|
6773
|
-
icon: IconShareOnMedia,
|
|
6774
|
-
label: t('morePopover.share'),
|
|
6775
|
-
onClick: () => setIsOpenSharePopup(true),
|
|
6776
|
-
},
|
|
6777
|
-
{
|
|
6778
|
-
icon: !!(post === null || post === void 0 ? void 0 : post.bookmarked) ? IconBookmarkFill : IconBookmark,
|
|
6779
|
-
label: !!(post === null || post === void 0 ? void 0 : post.bookmarked)
|
|
6780
|
-
? t('morePopover.unsavePost')
|
|
6781
|
-
: t('morePopover.savePost'),
|
|
6782
|
-
onClick: () => {
|
|
6783
|
-
authActionWrapper(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
6784
|
-
if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) || !(post === null || post === void 0 ? void 0 : post.id))
|
|
6785
|
-
return;
|
|
6786
|
-
if (post === null || post === void 0 ? void 0 : post.bookmarked) {
|
|
6787
|
-
const res = yield callApiWithAuth(getApiPath(PATHS.BOOKMARK.DELETE, {
|
|
6788
|
-
_locale: locale,
|
|
6789
|
-
}), 'DELETE', {
|
|
6790
|
-
data: {
|
|
6791
|
-
post_id: String(post.id),
|
|
6792
|
-
},
|
|
6793
|
-
});
|
|
6794
|
-
if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
|
|
6795
|
-
pushNotifications({
|
|
6796
|
-
title: '',
|
|
6797
|
-
message: 'Removed saved post',
|
|
6798
|
-
type: 'success',
|
|
6799
|
-
displayIcon: IconBookmark,
|
|
6800
|
-
});
|
|
6801
|
-
onRemoveBookmark && onRemoveBookmark();
|
|
6802
|
-
}
|
|
6803
|
-
else {
|
|
6804
|
-
pushNotifications({
|
|
6805
|
-
title: '',
|
|
6806
|
-
message: 'Remove failed',
|
|
6807
|
-
type: 'danger',
|
|
6808
|
-
displayIcon: IconBookmark,
|
|
6809
|
-
});
|
|
6810
|
-
}
|
|
6811
|
-
}
|
|
6812
|
-
else {
|
|
6813
|
-
const res = yield callApiWithAuth(getApiPath(PATHS.BOOKMARK.CREATE, {
|
|
6814
|
-
_locale: locale,
|
|
6815
|
-
}), 'POST', {
|
|
6816
|
-
data: {
|
|
6817
|
-
user_id: togetherUserId || userInfo.id,
|
|
6818
|
-
post_id: post.id,
|
|
6819
|
-
},
|
|
6820
|
-
});
|
|
6821
|
-
if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
|
|
6822
|
-
pushNotifications({
|
|
6823
|
-
title: '',
|
|
6824
|
-
message: 'Post saved',
|
|
6825
|
-
type: 'success',
|
|
6826
|
-
displayIcon: IconBookmarkFill,
|
|
6827
|
-
});
|
|
6828
|
-
onBookmark && onBookmark();
|
|
6829
|
-
}
|
|
6830
|
-
else {
|
|
6831
|
-
pushNotifications({
|
|
6832
|
-
title: '',
|
|
6833
|
-
message: 'Post saved failed',
|
|
6834
|
-
type: 'danger',
|
|
6835
|
-
displayIcon: IconBookmark,
|
|
6836
|
-
});
|
|
6837
|
-
}
|
|
6838
|
-
}
|
|
6839
|
-
}));
|
|
6840
|
-
},
|
|
6841
|
-
},
|
|
6842
|
-
// {
|
|
6843
|
-
// icon: togetherBasePath + '/svg/icon-bell-on.svg',
|
|
6844
|
-
// label: !localHasNoti
|
|
6845
|
-
// ? t( 'morePopover.turnOnNotifications' })
|
|
6846
|
-
// : t( 'morePopover.turnOffNotifications' }),
|
|
6847
|
-
// onClick: () => {
|
|
6848
|
-
// authActionWrapper(async () => {
|
|
6849
|
-
// if (!post?.id || loading) return
|
|
6850
|
-
// setLoading(true)
|
|
6851
|
-
// try {
|
|
6852
|
-
// const res = await followUnfollowPost({
|
|
6853
|
-
// id: post?.id,
|
|
6854
|
-
// locale,
|
|
6855
|
-
// })
|
|
6856
|
-
// if (res?.status === 1) {
|
|
6857
|
-
// pushNotifications({
|
|
6858
|
-
// message: !localHasNoti
|
|
6859
|
-
// ? 'Notification on'
|
|
6860
|
-
// : 'Notification off',
|
|
6861
|
-
// type: !localHasNoti ? 'success' : 'danger',
|
|
6862
|
-
// displayIcon: !localHasNoti ? IconBellOn : IconBellOff,
|
|
6863
|
-
// })
|
|
6864
|
-
// setLocalHasNoti((v) => !v)
|
|
6865
|
-
// }
|
|
6866
|
-
// } catch {}
|
|
6867
|
-
// setLoading(false)
|
|
6868
|
-
// })
|
|
6869
|
-
// },
|
|
6870
|
-
// },
|
|
6871
|
-
{
|
|
6872
|
-
icon: IconAlertCircle,
|
|
6873
|
-
label: t('morePopover.report'),
|
|
6874
|
-
subTree: {
|
|
6875
|
-
title: t('morePopover.report.title'),
|
|
6876
|
-
description: t('morePopover.report.description'),
|
|
6877
|
-
isShowheader: true,
|
|
6878
|
-
type: 'list',
|
|
6879
|
-
list: Object.keys(REPORT_REASON_MAP)
|
|
6880
|
-
.map((k) => ({
|
|
6881
|
-
label: REPORT_REASON_MAP[k].label,
|
|
6882
|
-
reason: REPORT_REASON_MAP[k].reportReasonText,
|
|
6883
|
-
reasonValue: k,
|
|
6884
|
-
}))
|
|
6885
|
-
.map((item) => ({
|
|
6886
|
-
label: t(item.label),
|
|
6887
|
-
subTree: {
|
|
6888
|
-
title: t('morePopover.reportSubmit.title'),
|
|
6889
|
-
description: t('morePopover.reportSubmit.description'),
|
|
6890
|
-
isShowheader: true,
|
|
6891
|
-
type: 'jsx',
|
|
6892
|
-
jsxRenderer: (setShow) => (React__default.createElement(SubmitReportForm, { reason: item.reasonValue, reasonText: t(item.reason), postId: post === null || post === void 0 ? void 0 : post.id, onClose: () => setShow && setShow(false) })),
|
|
6893
|
-
},
|
|
6894
|
-
})),
|
|
6895
|
-
},
|
|
6896
|
-
},
|
|
6897
|
-
],
|
|
6898
|
-
} })));
|
|
6899
|
-
};
|
|
6900
|
-
|
|
6901
|
-
const StyledCardPost$1 = styled.div `
|
|
6902
|
-
position: relative;
|
|
6903
|
-
margin-bottom: 24px;
|
|
6904
|
-
background: white;
|
|
6905
|
-
border-radius: ${theme.borderRadius};
|
|
6906
|
-
|
|
6907
|
-
a {
|
|
6908
|
-
text-decoration: none;
|
|
6909
|
-
}
|
|
6910
|
-
|
|
6911
|
-
${MediaQueries.mbDown} {
|
|
6912
|
-
margin-bottom: 8px;
|
|
6913
|
-
}
|
|
6914
|
-
&.flat-top {
|
|
6915
|
-
border-top-left-radius: 0;
|
|
6916
|
-
border-top-right-radius: 0;
|
|
6917
|
-
}
|
|
6918
|
-
|
|
6919
|
-
.post-pin {
|
|
6920
|
-
padding: 0.5rem 1rem;
|
|
6921
|
-
border-radius: ${theme.borderRadius} 6px 0 0;
|
|
6922
|
-
}
|
|
6923
|
-
.post-author {
|
|
6924
|
-
display: flex;
|
|
6925
|
-
align-items: center;
|
|
6926
|
-
justify-content: space-between;
|
|
6927
|
-
&.comment {
|
|
6928
|
-
padding-right: 2.6rem;
|
|
6929
|
-
}
|
|
6930
|
-
.author-avatar-wrapper {
|
|
6931
|
-
width: 40px;
|
|
6932
|
-
height: 40px;
|
|
6933
|
-
font-size: 20px;
|
|
6934
|
-
${MediaQueries.mbDown} {
|
|
6935
|
-
width: 32px;
|
|
6936
|
-
height: 32px;
|
|
6937
|
-
font-size: 16px;
|
|
6938
|
-
}
|
|
6939
|
-
}
|
|
6940
|
-
}
|
|
6941
|
-
.post-content-link-wrapper {
|
|
6942
|
-
color: inherit;
|
|
6943
|
-
cursor: pointer;
|
|
6944
|
-
.post-content-title {
|
|
6945
|
-
padding: 1rem 1rem 0;
|
|
6946
|
-
word-break: break-word;
|
|
6947
|
-
}
|
|
6948
|
-
}
|
|
6949
|
-
.social-preview-wrapper.has-image {
|
|
6950
|
-
margin-bottom: 5px;
|
|
6951
|
-
}
|
|
6952
|
-
.social-preview-wrapper,
|
|
6953
|
-
.image-preview-wrapper,
|
|
6954
|
-
.link-preview-wrapper {
|
|
6955
|
-
width: 100%;
|
|
6956
|
-
&[data-is-reply='true'] {
|
|
6957
|
-
padding-right: 1rem;
|
|
6958
|
-
padding-left: 1rem;
|
|
6959
|
-
}
|
|
6960
|
-
}
|
|
6961
|
-
.post-topics {
|
|
6962
|
-
padding: 0 1rem;
|
|
6963
|
-
}
|
|
6964
|
-
|
|
6965
|
-
.post-reaction {
|
|
6966
|
-
background: none;
|
|
6967
|
-
border-radius: 0 0 6px 6px;
|
|
6968
|
-
&.hide-top-border {
|
|
6969
|
-
::before {
|
|
6970
|
-
display: none;
|
|
6971
|
-
}
|
|
6972
|
-
}
|
|
6973
|
-
}
|
|
6974
|
-
.most-engaging-wrapper {
|
|
6975
|
-
padding: 1rem;
|
|
6976
|
-
cursor: pointer;
|
|
6977
|
-
.author-avatar-wrapper {
|
|
6978
|
-
width: 2rem;
|
|
6979
|
-
height: 2rem;
|
|
6980
|
-
font-size: 1rem;
|
|
6981
|
-
}
|
|
6982
|
-
.see-more-comments {
|
|
6983
|
-
width: 100%;
|
|
6984
|
-
padding: 12px 0 0;
|
|
6985
|
-
text-align: unset;
|
|
6986
|
-
}
|
|
6987
|
-
}
|
|
6988
|
-
&[data-most-engaging='true'] {
|
|
6989
|
-
border: none;
|
|
6990
|
-
${MediaQueries.mbDown} {
|
|
6991
|
-
margin: 1rem;
|
|
6992
|
-
border: 1px solid #e4e8ec;
|
|
6993
|
-
}
|
|
6994
|
-
}
|
|
6995
|
-
.top-divider {
|
|
6996
|
-
border-color: #e4e8ec;
|
|
6997
|
-
}
|
|
6998
|
-
.popover {
|
|
6999
|
-
.popover-menu__btn {
|
|
7000
|
-
display: flex;
|
|
7001
|
-
width: 1.5rem;
|
|
7002
|
-
height: 1rem;
|
|
7003
|
-
align-items: center;
|
|
7004
|
-
justify-content: center;
|
|
7005
|
-
padding: 0;
|
|
7006
|
-
background: transparent;
|
|
7007
|
-
|
|
7008
|
-
&:hover {
|
|
7009
|
-
background-color: transparent;
|
|
7010
|
-
}
|
|
7011
|
-
}
|
|
7012
|
-
.popover-menu__content {
|
|
7013
|
-
&.--position-bottom {
|
|
7014
|
-
&.--align-end {
|
|
7015
|
-
&::before {
|
|
7016
|
-
right: 12.5px;
|
|
7017
|
-
}
|
|
7018
|
-
}
|
|
7019
|
-
}
|
|
7020
|
-
}
|
|
7021
|
-
}
|
|
7022
|
-
|
|
7023
|
-
&[data-is-marrybaby='true'] {
|
|
7024
|
-
border: 1px solid #f3f3f3;
|
|
7025
|
-
border-radius: 1rem;
|
|
7026
|
-
/* shadow */
|
|
7027
|
-
|
|
7028
|
-
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08);
|
|
7029
|
-
.image-preview-wrapper,
|
|
7030
|
-
.link-preview-wrapper {
|
|
7031
|
-
padding-right: 1rem;
|
|
7032
|
-
padding-left: 1rem;
|
|
7033
|
-
}
|
|
7034
|
-
.popover {
|
|
7035
|
-
.popover-menu__btn {
|
|
7036
|
-
width: 24px;
|
|
7037
|
-
height: 24px;
|
|
7038
|
-
${MediaQueries.mbDown} {
|
|
7039
|
-
width: 18px;
|
|
7040
|
-
height: 18px;
|
|
7041
|
-
}
|
|
7042
|
-
}
|
|
7043
|
-
.popover-menu__content {
|
|
7044
|
-
&.--position-bottom {
|
|
7045
|
-
&.--align-end {
|
|
7046
|
-
&::before {
|
|
7047
|
-
right: 1rem;
|
|
7048
|
-
}
|
|
7049
|
-
width: 350px;
|
|
7050
|
-
${MediaQueries.mbDown} {
|
|
7051
|
-
max-width: calc(320px - 2rem);
|
|
7052
|
-
}
|
|
7053
|
-
}
|
|
7054
|
-
}
|
|
7055
|
-
}
|
|
7056
|
-
}
|
|
7057
|
-
.most-engaging-wrapper {
|
|
7058
|
-
position: relative;
|
|
7059
|
-
padding: 0;
|
|
7060
|
-
&::before {
|
|
7061
|
-
position: absolute;
|
|
7062
|
-
z-index: 5;
|
|
7063
|
-
top: 0;
|
|
7064
|
-
left: 50%;
|
|
7065
|
-
width: calc(100% - 2rem);
|
|
7066
|
-
height: 1px;
|
|
7067
|
-
background: #f3f3f3;
|
|
7068
|
-
content: ' ';
|
|
7069
|
-
transform: translateX(-50%);
|
|
7070
|
-
}
|
|
7071
|
-
}
|
|
7072
|
-
${MediaQueries.mbDown} {
|
|
7073
|
-
margin-bottom: 12px;
|
|
7074
|
-
}
|
|
7075
|
-
}
|
|
7076
|
-
`;
|
|
7077
|
-
|
|
7078
|
-
var img$1 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23a)'%3e%3cpath d='M2 4.008h12m-8.667 0V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008zm-6 3.334v4m2.666-4v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
7079
|
-
var IconDelete = img$1;
|
|
7080
|
-
|
|
7081
|
-
const CardReplyPopover = ({ onDeleteComment, commentId, className = '', popoverClassName = '', }) => {
|
|
7082
|
-
const { data: { env: { isMarryBaby }, locale, }, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
|
|
7083
|
-
const { t } = useTranslations();
|
|
7084
|
-
const [isOpenLeavePopup, setIsOpenLeavePopup] = useState(false);
|
|
7085
|
-
const { authActionWrapper } = useTogetherAuthRequiredAction();
|
|
7086
|
-
return (React__default.createElement("div", { className: className, onClick: (e) => {
|
|
7087
|
-
e.preventDefault();
|
|
7088
|
-
e.stopPropagation();
|
|
7089
|
-
} },
|
|
7090
|
-
isOpenLeavePopup && (React__default.createElement(PopupDanger, { thumbnail: IconDelete, isThumbnailIcon: true, title: t('popup.deleteComment.title'), description: t('popup.deleteComment.description'), acceptText: t('popup.deletePost.accept'), cancelText: t('popup.deletePost.cancel'), onAccept: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
7091
|
-
var _a;
|
|
7092
|
-
if (!commentId)
|
|
7093
|
-
return;
|
|
7094
|
-
const res = yield deleteComment({ id: commentId, locale });
|
|
7095
|
-
if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
|
|
7096
|
-
onDeleteComment && onDeleteComment();
|
|
7097
|
-
pushNotifications({
|
|
7098
|
-
title: '',
|
|
7099
|
-
message: t('notification.success'),
|
|
7100
|
-
type: 'success',
|
|
7101
|
-
});
|
|
7102
|
-
}
|
|
7103
|
-
else {
|
|
7104
|
-
pushNotifications({
|
|
7105
|
-
title: '',
|
|
7106
|
-
message: ((_a = res === null || res === void 0 ? void 0 : res.messages) === null || _a === void 0 ? void 0 : _a[0]) || t('notification.failure'),
|
|
7107
|
-
type: 'danger',
|
|
7108
|
-
});
|
|
7109
|
-
}
|
|
7110
|
-
}), onClose: () => setIsOpenLeavePopup(false) })),
|
|
7111
|
-
React__default.createElement(TreePopoverMenu, { position: "bottom", align: "end", data: {
|
|
7112
|
-
isShowheader: false,
|
|
7113
|
-
type: 'list',
|
|
7114
|
-
list: [
|
|
7115
|
-
// {
|
|
7116
|
-
// icon: _href('/svg/icon-share-on-media.svg'),
|
|
7117
|
-
// label: f({ id: 'morePopover.share' }),
|
|
7118
|
-
// subTree: {
|
|
7119
|
-
// title: f({ id: 'morePopover.shareOn' }),
|
|
7120
|
-
// isShowheader: true,
|
|
7121
|
-
// type: 'jsx',
|
|
7122
|
-
// jsxType: TreeJSXType.share,
|
|
7123
|
-
// data: {
|
|
7124
|
-
// shareUrl: shareUrl,
|
|
7125
|
-
// shareTitle: shareTitle,
|
|
7126
|
-
// },
|
|
7127
|
-
// },
|
|
7128
|
-
// },
|
|
7129
|
-
// {
|
|
7130
|
-
// icon: _href('/svg/icon-tab-edit-2.svg'),
|
|
7131
|
-
// label: f({ id: 'actionPopover.edit' }),
|
|
7132
|
-
// onClick: onEditPost,
|
|
7133
|
-
// },
|
|
7134
|
-
{
|
|
7135
|
-
icon: IconTrashBin,
|
|
7136
|
-
label: t('actionPopover.delete'),
|
|
7137
|
-
onClick: () => {
|
|
7138
|
-
authActionWrapper(() => {
|
|
7139
|
-
setIsOpenLeavePopup(true);
|
|
7140
|
-
});
|
|
7141
|
-
},
|
|
7142
|
-
},
|
|
7143
|
-
],
|
|
7144
|
-
}, className: popoverClassName, toggleButtonContent: React__default.createElement("img", { src: isMarryBaby ? MBMoreSolid : IconKebab, loading: "lazy" }), buttonProps: {
|
|
7145
|
-
// isLoading: loading,
|
|
7146
|
-
} })));
|
|
7147
|
-
};
|
|
7148
|
-
|
|
7149
|
-
const StyledContainer$1 = styled.div `
|
|
7150
|
-
.add-link {
|
|
7151
|
-
color: ${theme.colors.primaryBase};
|
|
7152
|
-
}
|
|
7153
|
-
`;
|
|
7154
|
-
const StyledAlertTag = styled.div `
|
|
7155
|
-
margin: 16px 0;
|
|
7156
|
-
background: ${theme.colors.yellow50};
|
|
7157
|
-
padding: 5px 10px;
|
|
7158
|
-
border-radius: 2px;
|
|
7159
|
-
|
|
7160
|
-
.icon {
|
|
7161
|
-
display: inline-block;
|
|
7162
|
-
vertical-align: middle;
|
|
7163
|
-
margin-right: 6px;
|
|
7164
|
-
}
|
|
7165
|
-
`;
|
|
7166
|
-
const StyledSourceItemWrapper = styled.div `
|
|
7167
|
-
display: flex;
|
|
7168
|
-
align-items: center;
|
|
7169
|
-
gap: 8px;
|
|
7170
|
-
`;
|
|
7171
|
-
const StyledListItems$1 = styled.div `
|
|
7172
|
-
padding: 8px 16px;
|
|
7173
|
-
`;
|
|
7174
|
-
const StyledInputWrapper = styled.div `
|
|
7175
|
-
margin-bottom: 12px;
|
|
7176
|
-
width: 100%;
|
|
7177
|
-
`;
|
|
7178
|
-
|
|
7179
|
-
const StyledContainer = styled.div ``;
|
|
7180
|
-
const StyledHeader = styled.div `
|
|
7181
|
-
margin-bottom: 16px;
|
|
7182
|
-
`;
|
|
7183
|
-
const StyledListItems = styled.div `
|
|
7184
|
-
display: flex;
|
|
7185
|
-
flex-wrap: wrap;
|
|
7186
|
-
row-gap: 16px;
|
|
7187
|
-
${MediaQueries.tdUp} {
|
|
7188
|
-
align-items: center;
|
|
7189
|
-
column-gap: 24px;
|
|
7190
|
-
}
|
|
7191
|
-
`;
|
|
7192
|
-
const StyledItem$1 = styled.a `
|
|
7193
|
-
display: flex;
|
|
7194
|
-
align-items: center;
|
|
7195
|
-
gap: 16px;
|
|
7196
|
-
${MediaQueries.mbDown} {
|
|
7197
|
-
width: 100%;
|
|
7198
|
-
justify-content: space-between;
|
|
7199
|
-
}
|
|
7200
|
-
`;
|
|
7201
|
-
const StyledItemInfo = styled.div `
|
|
7202
|
-
display: flex;
|
|
7203
|
-
align-items: center;
|
|
7204
|
-
gap: 16px;
|
|
7205
|
-
`;
|
|
7206
|
-
const StyledThumb = styled.div `
|
|
7207
|
-
border-radius: ${theme.borderRadius};
|
|
7208
|
-
overflow: hidden;
|
|
7209
|
-
width: 48px;
|
|
7210
|
-
height: 48px;
|
|
7211
|
-
img {
|
|
7212
|
-
object-fit: cover;
|
|
7213
|
-
width: 100%;
|
|
7214
|
-
height: 100%;
|
|
7215
|
-
}
|
|
7216
|
-
`;
|
|
7217
|
-
|
|
7218
|
-
const RecommentCategories = ({ categories }) => {
|
|
7219
|
-
const { t } = useTranslations();
|
|
7220
|
-
const { data: { locale, env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
|
|
7221
|
-
const url = getCurrentBaseUrl$1(locale, isMarryBaby);
|
|
7222
|
-
return (React__default.createElement(StyledContainer, null,
|
|
7223
|
-
React__default.createElement(StyledHeader, null,
|
|
7224
|
-
React__default.createElement(Heading, { tag: "h6", as: "h5" }, t('cardReply.recommentCategories.heading'))),
|
|
7225
|
-
React__default.createElement(StyledListItems, null, categories.map((i) => (React__default.createElement(StyledItem$1, { href: url + i.permalink, key: String(i.termId), target: "_blank" },
|
|
7226
|
-
React__default.createElement(StyledItemInfo, null,
|
|
7227
|
-
React__default.createElement(StyledThumb, null,
|
|
7228
|
-
React__default.createElement("img", { src: i.featureImage ||
|
|
7229
|
-
CommonGAssets.getAssetPath(isMarryBaby ? 'mb-logo.svg' : '/logo/logomark.png'), alt: i.displayName, loading: "lazy" })),
|
|
7230
|
-
React__default.createElement(Text, { size: "s3", weight: "bold" }, i.displayName)),
|
|
7231
|
-
React__default.createElement(ArrowRight, { size: 20, color: theme.colors.gray400 })))))));
|
|
7232
|
-
};
|
|
7233
|
-
|
|
7234
|
-
const StyledItem = styled.a `
|
|
7235
|
-
padding: 12px 0;
|
|
7236
|
-
display: flex;
|
|
7237
|
-
flex-direction: column;
|
|
7238
|
-
gap: 8px;
|
|
7239
|
-
border-top: 1px solid ${theme.colors.neutral100};
|
|
7240
|
-
text-decoration: none;
|
|
7241
|
-
|
|
7242
|
-
&:first-child {
|
|
7243
|
-
border-top: 0;
|
|
7244
|
-
}
|
|
7245
|
-
`;
|
|
7246
|
-
|
|
7247
|
-
const SourceItem = ({ postTitle, articleReviewed, modifiedTime, href, }) => {
|
|
7248
|
-
const { t } = useTranslations();
|
|
7249
|
-
const getDetail = (() => {
|
|
7250
|
-
const { expert, editor, is_author } = articleReviewed;
|
|
7251
|
-
if (expert) {
|
|
7252
|
-
const result = {
|
|
7253
|
-
name: expert.display_name,
|
|
7254
|
-
role: 'expert',
|
|
7255
|
-
avatar: expert.avatar,
|
|
7256
|
-
};
|
|
7257
|
-
if (is_author) {
|
|
7258
|
-
return Object.assign({ title: t('articleAuthor.title.written-by') }, result);
|
|
7259
|
-
}
|
|
7260
|
-
else {
|
|
7261
|
-
if (expert.role === 'expert') {
|
|
7262
|
-
// Is Expert
|
|
7263
|
-
return Object.assign({ title: t('articleAuthor.title.expert') }, result);
|
|
7264
|
-
}
|
|
7265
|
-
else {
|
|
7266
|
-
// Is medical
|
|
7267
|
-
return Object.assign({ title: t('articleAuthor.title.medical') }, result);
|
|
7268
|
-
}
|
|
7269
|
-
}
|
|
7270
|
-
}
|
|
7271
|
-
else if (editor) {
|
|
7272
|
-
return {
|
|
7273
|
-
title: t('articleAuthor.title.fact-check'),
|
|
7274
|
-
name: editor.display_name,
|
|
7275
|
-
avatar: editor.avatar,
|
|
7276
|
-
};
|
|
7277
|
-
}
|
|
7278
|
-
})();
|
|
7279
|
-
return (React__default.createElement(StyledItem, { href: href, title: postTitle, target: "_blank" },
|
|
7280
|
-
React__default.createElement(Text, { size: "s3", as: "h5", weight: "bold" }, postTitle),
|
|
7281
|
-
React__default.createElement("div", null,
|
|
7282
|
-
React__default.createElement(CardAuthor, { avatar: getDetail === null || getDetail === void 0 ? void 0 : getDetail.avatar, avatarProps: {
|
|
7283
|
-
size: 32,
|
|
7284
|
-
}, name: getDetail === null || getDetail === void 0 ? void 0 : getDetail.name, role: getDetail === null || getDetail === void 0 ? void 0 : getDetail.role, hideBackground: true },
|
|
7285
|
-
React__default.createElement(CardAuthor.SubTextRow, null,
|
|
7286
|
-
React__default.createElement(CardAuthor.SubText, null, getDetail === null || getDetail === void 0 ? void 0 :
|
|
7287
|
-
getDetail.title,
|
|
7288
|
-
' ',
|
|
7289
|
-
React__default.createElement("span", { style: { color: theme.colors.gray800 } }, getDetail === null || getDetail === void 0 ? void 0 : getDetail.name)),
|
|
7290
|
-
React__default.createElement(CardAuthor.SubDivider, null),
|
|
7291
|
-
React__default.createElement(CardAuthor.SubText, null, modifiedTime))))));
|
|
7292
|
-
};
|
|
7293
|
-
|
|
7294
|
-
var styles$1 = {"accordion":"CnNZq8D","header":"F4mmgSy","heading":"_8jLruY3","headingIcon":"FE8w-fe","panel":"Yd2a9Nj","chevron":"A7QrQ7A"};
|
|
7295
|
-
|
|
7296
|
-
const SourceList = (_a) => {
|
|
7297
|
-
var { listUrl: listUrlInit, hideSourceList, categorySlug, editMode, collapseSource, onListChange, isMarryBaby } = _a, rest = __rest(_a, ["listUrl", "hideSourceList", "categorySlug", "editMode", "collapseSource", "onListChange", "isMarryBaby"]);
|
|
7298
|
-
const { t } = useTranslations();
|
|
7299
|
-
const [listUrl, setListUrl] = useState(listUrlInit || []);
|
|
7300
|
-
const [data, setData] = useState([]);
|
|
7301
|
-
const [categories, setCategories] = useState([]);
|
|
7302
|
-
const [loading, setLoading] = useState(false);
|
|
7303
|
-
useEffect(() => {
|
|
7304
|
-
!hideSourceList &&
|
|
7305
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
7306
|
-
setLoading(true);
|
|
7307
|
-
const listPaths = listUrl.map((i) => {
|
|
7308
|
-
const url = new URL(i);
|
|
7309
|
-
const pathArr = String(url.pathname)
|
|
7310
|
-
.split('/')
|
|
7311
|
-
.filter((i) => i != '');
|
|
7312
|
-
const origin = url.origin;
|
|
7313
|
-
const isMarrySite = origin.search('marrybaby.vn') !== -1;
|
|
7314
|
-
return {
|
|
7315
|
-
isMarrySite,
|
|
7316
|
-
path: pathArr[pathArr.length - 1],
|
|
7317
|
-
href: i,
|
|
7318
|
-
};
|
|
7319
|
-
});
|
|
7320
|
-
const listApi = [
|
|
7321
|
-
...listPaths.map((i) => callApi(i.isMarrySite
|
|
7322
|
-
? getMarryBabyApiPath(DISCOVER_PATHS.GET_PREVIEW_ARTICLE, {
|
|
7323
|
-
fullSlug: i.path,
|
|
7324
|
-
}, true)
|
|
7325
|
-
: getDiscoverApiPath(DISCOVER_PATHS.GET_PREVIEW_ARTICLE, {
|
|
7326
|
-
fullSlug: i.path,
|
|
7327
|
-
}, true), 'GET')),
|
|
7328
|
-
];
|
|
7329
|
-
const res = yield Promise.all(listApi);
|
|
7330
|
-
setData(res
|
|
7331
|
-
.map((i, index) => {
|
|
7332
|
-
var _a, _b;
|
|
7333
|
-
return ((_a = i === null || i === void 0 ? void 0 : i.data) === null || _a === void 0 ? void 0 : _a.post) && Object.assign(Object.assign({}, formatArticle((_b = i === null || i === void 0 ? void 0 : i.data) === null || _b === void 0 ? void 0 : _b.post)), { href: listPaths[index].href });
|
|
7334
|
-
})
|
|
7335
|
-
.filter(Boolean));
|
|
7336
|
-
setLoading(false);
|
|
7337
|
-
}))();
|
|
7338
|
-
}, []);
|
|
7339
|
-
useEffect(() => {
|
|
7340
|
-
!hideSourceList &&
|
|
7341
|
-
(data === null || data === void 0 ? void 0 : data.length) === 0 &&
|
|
7342
|
-
categorySlug &&
|
|
7343
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
7344
|
-
var _a;
|
|
7345
|
-
const res = yield callApi(isMarryBaby
|
|
7346
|
-
? getMarryBabyApiPath(DISCOVER_PATHS.GET_CATEGORY_OR_ARTICLE_DETAIL, {
|
|
7347
|
-
fullSlug: categorySlug,
|
|
7348
|
-
}, true)
|
|
7349
|
-
: getDiscoverApiPath(DISCOVER_PATHS.GET_CATEGORY_OR_ARTICLE_DETAIL, {
|
|
7350
|
-
fullSlug: categorySlug,
|
|
7351
|
-
}, true), 'GET');
|
|
7352
|
-
(res === null || res === void 0 ? void 0 : res.data) && setCategories([formatCategory((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.category)]);
|
|
7353
|
-
}))();
|
|
7354
|
-
}, [data]);
|
|
7355
|
-
const handleRemoveItem = (idx) => {
|
|
7356
|
-
setListUrl((old) => {
|
|
7357
|
-
const tmp = [...old];
|
|
7358
|
-
tmp.splice(idx, 1);
|
|
7359
|
-
return tmp;
|
|
7360
|
-
});
|
|
7361
|
-
setData((old) => {
|
|
7362
|
-
const tmp = [...old];
|
|
7363
|
-
tmp.splice(idx, 1);
|
|
7364
|
-
return tmp;
|
|
7365
|
-
});
|
|
7366
|
-
};
|
|
7367
|
-
useEffect(() => {
|
|
7368
|
-
onListChange === null || onListChange === void 0 ? void 0 : onListChange(listUrl);
|
|
7369
|
-
}, [listUrl]);
|
|
7370
|
-
return (React__default.createElement("div", Object.assign({}, rest),
|
|
7371
|
-
!editMode && (React__default.createElement(StyledAlertTag, null,
|
|
7372
|
-
React__default.createElement("img", { className: "icon", src: CommonGAssets.getAssetPath('warning.svg'), alt: "warning", style: { marginBottom: '3px', width: '18px' }, loading: "lazy" }),
|
|
7373
|
-
React__default.createElement(Text, { size: "s3", as: "span", dangerouslySetInnerHTML: {
|
|
7374
|
-
__html: t('cardReply.disclaimer'),
|
|
7375
|
-
} }))),
|
|
7376
|
-
!hideSourceList ? (loading ? (React__default.createElement(Loading$1, null)) : data.length > 0 || editMode ? (React__default.createElement(StyledContainer$1, null,
|
|
7377
|
-
React__default.createElement(Accordion, { defaultValue: !collapseSource && 'accordion', styles: {
|
|
7378
|
-
control: {
|
|
7379
|
-
borderRadius: 'inherit',
|
|
7380
|
-
'&[aria-expanded="false"]': {
|
|
7381
|
-
borderBottom: 0,
|
|
7382
|
-
},
|
|
7383
|
-
},
|
|
7384
|
-
chevron: {
|
|
7385
|
-
width: '32px',
|
|
7386
|
-
height: '32px',
|
|
7387
|
-
},
|
|
7388
|
-
content: {
|
|
7389
|
-
padding: 0,
|
|
7390
|
-
borderBottom: 0,
|
|
7391
|
-
borderTop: `1px solid ${theme.colors.neutral100}`,
|
|
7392
|
-
},
|
|
7393
|
-
item: {
|
|
7394
|
-
marginBottom: '16px',
|
|
7395
|
-
borderTopLeftRadius: '8px',
|
|
7396
|
-
borderTopRightRadius: '8px',
|
|
7397
|
-
border: `1px solid ${theme.colors.neutral100}`,
|
|
7398
|
-
borderBottomLeftRadius: '8px',
|
|
7399
|
-
borderBottomRightRadius: '8px',
|
|
7400
|
-
'&[data-active]': {
|
|
7401
|
-
borderBottomLeftRadius: 0,
|
|
7402
|
-
borderBottomRightRadius: 0,
|
|
7403
|
-
},
|
|
7404
|
-
},
|
|
7405
|
-
}, chevron: React__default.createElement("div", { className: styles$1.chevron },
|
|
7406
|
-
React__default.createElement(ArrowDown, { color: theme.colors.gray600, size: 20 })) },
|
|
7407
|
-
React__default.createElement(Accordion.Item, { value: "accordion" },
|
|
7408
|
-
React__default.createElement(Accordion.Control, null,
|
|
7409
|
-
React__default.createElement("div", { className: styles$1.header },
|
|
7410
|
-
React__default.createElement(Heading, { as: "h4", tag: "h6" }, t('cardReply.source')))),
|
|
7411
|
-
React__default.createElement(Accordion.Panel, null,
|
|
7412
|
-
React__default.createElement(StyledListItems$1, null,
|
|
7413
|
-
(data || []).map((i, idx) => (React__default.createElement(StyledSourceItemWrapper, { key: String(idx) },
|
|
7414
|
-
typeof i === 'object' ? (React__default.createElement(SourceItem, Object.assign({}, i))) : (React__default.createElement(StyledInputWrapper, null,
|
|
7415
|
-
React__default.createElement(Input, { style: { width: '100%' }, name: "source-list", value: i || '', size: "sm", onChange: (v) => {
|
|
7416
|
-
setListUrl((old) => {
|
|
7417
|
-
const tmp = [...old];
|
|
7418
|
-
tmp[idx] = v;
|
|
7419
|
-
return tmp;
|
|
7420
|
-
});
|
|
7421
|
-
setData((old) => {
|
|
7422
|
-
const tmp = [...old];
|
|
7423
|
-
tmp[idx] = v;
|
|
7424
|
-
return tmp;
|
|
7425
|
-
});
|
|
7426
|
-
} }))),
|
|
7427
|
-
editMode && (React__default.createElement(Button, { size: "md", color: "transparent", icon: React__default.createElement(Trash, null), onClick: () => handleRemoveItem(idx) }))))),
|
|
7428
|
-
editMode && (React__default.createElement(Button, { className: "add-link", color: "transparent", size: "md", icon: React__default.createElement(Plus, { color: theme.colors.primaryBase, size: 18 }), onClick: () => {
|
|
7429
|
-
setListUrl((old) => [...old, '']);
|
|
7430
|
-
setData((old) => [...old, '']);
|
|
7431
|
-
} }, "Add source")))))))) : (React__default.createElement(RecommentCategories, { categories: categories }))) : null));
|
|
7432
|
-
};
|
|
7433
|
-
|
|
7434
|
-
const StyledCardPost = styled.div `
|
|
7435
|
-
position: relative;
|
|
7436
|
-
margin-bottom: 0;
|
|
7437
|
-
background: white;
|
|
7438
|
-
border-radius: ${theme.borderRadius};
|
|
7439
|
-
|
|
7440
|
-
.verify-tag {
|
|
7441
|
-
margin-top: 12px;
|
|
7442
|
-
}
|
|
7443
|
-
|
|
7444
|
-
.post-author {
|
|
7445
|
-
&.with-popover {
|
|
7446
|
-
padding-right: 2.6rem;
|
|
7447
|
-
}
|
|
7448
|
-
.author-avatar-wrapper {
|
|
7449
|
-
width: 40px;
|
|
7450
|
-
height: 40px;
|
|
7451
|
-
font-size: 20px;
|
|
7452
|
-
${MediaQueries.mbDown} {
|
|
7453
|
-
width: 32px;
|
|
7454
|
-
height: 32px;
|
|
7455
|
-
font-size: 16px;
|
|
7456
|
-
}
|
|
7457
|
-
}
|
|
7458
|
-
}
|
|
7459
|
-
.image-preview-wrapper,
|
|
7460
|
-
.link-preview-wrapper {
|
|
7461
|
-
width: 100%;
|
|
7462
|
-
&[data-is-reply='true'] {
|
|
7463
|
-
padding-right: 1rem;
|
|
7464
|
-
padding-left: 1rem;
|
|
7465
|
-
}
|
|
7466
|
-
}
|
|
7467
|
-
.post-reaction {
|
|
7468
|
-
background: none;
|
|
7469
|
-
border-radius: 0 0 6px 6px;
|
|
7470
|
-
}
|
|
7471
|
-
&[data-is-reply='true'] {
|
|
7472
|
-
> .post-author .author-avatar-wrapper {
|
|
7473
|
-
width: 20px;
|
|
7474
|
-
height: 20px;
|
|
7475
|
-
font-size: 10px;
|
|
7476
|
-
}
|
|
7477
|
-
}
|
|
7478
|
-
&[data-is-reply='false'] {
|
|
7479
|
-
border: 1px solid #e4e8ec;
|
|
7480
|
-
}
|
|
7481
|
-
.expert-wrapper {
|
|
7482
|
-
width: 100%;
|
|
7483
|
-
}
|
|
7484
|
-
&[data-has-booking='true'] {
|
|
7485
|
-
display: grid;
|
|
7486
|
-
.post-author {
|
|
7487
|
-
background-color: ${theme.colors.primary50};
|
|
7488
|
-
}
|
|
7489
|
-
.btn-wrapper {
|
|
7490
|
-
padding: 0 16px;
|
|
7491
|
-
.btn-booking {
|
|
7492
|
-
width: 100%;
|
|
7493
|
-
margin: 12px 0;
|
|
7494
|
-
}
|
|
7495
|
-
}
|
|
7496
|
-
}
|
|
7497
|
-
|
|
7498
|
-
.comment-reply-wrapper {
|
|
7499
|
-
padding: 0 1rem;
|
|
7500
|
-
.more-cmt {
|
|
7501
|
-
.chevron-right {
|
|
7502
|
-
height: 1rem;
|
|
7503
|
-
width: 1rem;
|
|
7504
|
-
vertical-align: middle;
|
|
7505
|
-
}
|
|
7506
|
-
}
|
|
7507
|
-
}
|
|
7508
|
-
.top-divider {
|
|
7509
|
-
border-color: #e4e8ec;
|
|
7510
|
-
}
|
|
7511
|
-
.popover {
|
|
7512
|
-
position: absolute;
|
|
7513
|
-
top: 1.5rem;
|
|
7514
|
-
right: 1rem;
|
|
7515
|
-
.popover-menu__btn {
|
|
7516
|
-
display: flex;
|
|
7517
|
-
width: 1rem;
|
|
7518
|
-
height: 1rem;
|
|
7519
|
-
align-items: center;
|
|
7520
|
-
justify-content: center;
|
|
7521
|
-
padding: 0;
|
|
7522
|
-
background: transparent;
|
|
7523
|
-
|
|
7524
|
-
&:hover {
|
|
7525
|
-
background-color: transparent;
|
|
7526
|
-
}
|
|
7527
|
-
|
|
7528
|
-
.popover-menu__content {
|
|
7529
|
-
&.--position-bottom {
|
|
7530
|
-
&.--align-end {
|
|
7531
|
-
&::before {
|
|
7532
|
-
right: 12.5px;
|
|
7533
|
-
}
|
|
7534
|
-
}
|
|
7535
|
-
}
|
|
7536
|
-
}
|
|
7537
|
-
}
|
|
7538
|
-
}
|
|
7539
|
-
|
|
7540
|
-
&[data-is-marrybaby='true'] {
|
|
7541
|
-
&[data-is-reply='false'] {
|
|
7542
|
-
border: none;
|
|
7543
|
-
}
|
|
7544
|
-
.image-preview-wrapper,
|
|
7545
|
-
.link-preview-wrapper {
|
|
7546
|
-
padding-right: 1rem;
|
|
7547
|
-
padding-left: 1rem;
|
|
7548
|
-
}
|
|
7549
|
-
.popover {
|
|
7550
|
-
.popover-menu__btn {
|
|
7551
|
-
width: 24px;
|
|
7552
|
-
height: 24px;
|
|
7553
|
-
}
|
|
7554
|
-
}
|
|
7555
|
-
|
|
7556
|
-
margin-left: 56px;
|
|
7557
|
-
${MediaQueries.mbDown} {
|
|
7558
|
-
margin-left: 40px;
|
|
7559
|
-
}
|
|
7560
|
-
> .post-author {
|
|
7561
|
-
margin-left: -56px;
|
|
7562
|
-
${MediaQueries.mbDown} {
|
|
7563
|
-
margin-left: -40px;
|
|
7564
|
-
}
|
|
7565
|
-
.author-info {
|
|
7566
|
-
align-items: center;
|
|
7567
|
-
display: flex;
|
|
7568
|
-
align-items: center;
|
|
7569
|
-
.author-info-top {
|
|
7570
|
-
width: 100%;
|
|
7571
|
-
}
|
|
7572
|
-
.author-info-text-wrapper {
|
|
7573
|
-
justify-content: space-between;
|
|
7574
|
-
}
|
|
7575
|
-
}
|
|
7576
|
-
.author-avatar-wrapper {
|
|
7577
|
-
width: 40px;
|
|
7578
|
-
height: 40px;
|
|
7579
|
-
font-size: 20px;
|
|
7580
|
-
${MediaQueries.mbDown} {
|
|
7581
|
-
width: 24px;
|
|
7582
|
-
height: 24px;
|
|
7583
|
-
font-size: 12px;
|
|
7584
|
-
}
|
|
7585
|
-
}
|
|
7586
|
-
}
|
|
7587
|
-
&[data-is-reply] {
|
|
7588
|
-
> .post-author {
|
|
7589
|
-
.author-avatar-wrapper {
|
|
7590
|
-
width: 40px;
|
|
7591
|
-
height: 40px;
|
|
7592
|
-
font-size: 20px;
|
|
7593
|
-
${MediaQueries.mbDown} {
|
|
7594
|
-
width: 24px;
|
|
7595
|
-
height: 24px;
|
|
7596
|
-
font-size: 12px;
|
|
7597
|
-
}
|
|
7598
|
-
}
|
|
7599
|
-
}
|
|
7600
|
-
}
|
|
7601
|
-
|
|
7602
|
-
.comment-reply-wrapper {
|
|
7603
|
-
padding-right: 0;
|
|
7604
|
-
padding-left: 0;
|
|
7605
|
-
}
|
|
7606
|
-
.post-reaction {
|
|
7607
|
-
&::after {
|
|
7608
|
-
position: absolute;
|
|
7609
|
-
bottom: 0;
|
|
7610
|
-
left: 50%;
|
|
7611
|
-
width: calc(100% - 2rem);
|
|
7612
|
-
height: 1px;
|
|
7613
|
-
background: #f3f3f3;
|
|
7614
|
-
content: ' ';
|
|
7615
|
-
transform: translateX(-50%);
|
|
7616
|
-
}
|
|
7617
|
-
}
|
|
7618
|
-
.post-content-wrapper {
|
|
7619
|
-
padding-top: 0;
|
|
7620
|
-
padding-bottom: 0;
|
|
7621
|
-
${MediaQueries.mbDown} {
|
|
7622
|
-
padding-left: 0.5rem;
|
|
7623
|
-
}
|
|
7624
|
-
}
|
|
7625
|
-
|
|
7626
|
-
${MediaQueries.mbDown} {
|
|
7627
|
-
margin-bottom: 12px;
|
|
7628
|
-
}
|
|
7629
|
-
}
|
|
7630
|
-
`;
|
|
7631
|
-
const StyledSourceList = styled(SourceList) `
|
|
7632
|
-
margin-top: 12px;
|
|
7633
|
-
padding: 0.5rem 1rem 1rem;
|
|
7634
|
-
`;
|
|
7635
|
-
|
|
7636
|
-
var styles = {"button":"-dzIuHr"};
|
|
7637
|
-
|
|
7638
|
-
const VerifiedTag = ({ userId, avatar, name, role, title, className, }) => {
|
|
7639
|
-
const { t } = useTranslations();
|
|
7640
|
-
const [openPopup, setOpenPopup] = useState(false);
|
|
7641
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
7642
|
-
React__default.createElement(Button, { className: `${styles.button} ${className}`, color: "success", size: "xs", onClick: () => setOpenPopup(true), style: {
|
|
7643
|
-
padding: '5px 8px',
|
|
7644
|
-
marginBottom: '12px',
|
|
7645
|
-
borderRadius: '4px',
|
|
7646
|
-
} },
|
|
7647
|
-
React__default.createElement("span", { className: "text" },
|
|
7648
|
-
React__default.createElement(Endorse, { isSolid: true, size: 18, color: theme.colors.green800, className: "icon" }),
|
|
7649
|
-
t('cardReply.verifyBy', {
|
|
7650
|
-
name: `${name || ''}`,
|
|
7651
|
-
}))),
|
|
7652
|
-
React__default.createElement(ProfileDetailModal, { open: openPopup, onClose: () => setOpenPopup(false), profileModalProps: { zIndex: 1000 } },
|
|
7653
|
-
React__default.createElement(ProfileDetail, { authorProps: {
|
|
7654
|
-
userId,
|
|
7655
|
-
avatar: avatar,
|
|
7656
|
-
name,
|
|
7657
|
-
role,
|
|
7658
|
-
title,
|
|
7659
|
-
}, hideQuestionTab: true }))));
|
|
7660
|
-
};
|
|
7661
|
-
|
|
7662
|
-
var img = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 12 4-4-4-4'/%3e%3c/svg%3e";
|
|
7663
|
-
var ChevronRightActive = img;
|
|
7664
|
-
|
|
7665
|
-
const COMMENT_LIMIT = 4;
|
|
7666
|
-
const CardReply = ({ className, style, comment: CommentProps, type = 'comment', level = 0, replyingId, onPostCommentSuccess, post, onDeleteComment, refetchComment, hasQuickBookingEnable, handleMakeAppointment, cardAuthorProps, maxChars = 600, disableShortenContent, }) => {
|
|
7667
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
7668
|
-
const { data: { locale, userInfo, env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
|
|
7669
|
-
const { t } = useTranslations();
|
|
7670
|
-
const [comment, setComment] = useState(CommentProps || null);
|
|
7671
|
-
const { id, countLikes, content, replies = [], images = [], author, liked, link, mentionedUser, mentions, } = comment;
|
|
7672
|
-
const { text, replyingTo } = decodeCommentBody(content);
|
|
7673
|
-
const { authActionWrapper } = useTogetherAuthRequiredAction({
|
|
7674
|
-
_joinCommunityIds: [(_a = post === null || post === void 0 ? void 0 : post.community) === null || _a === void 0 ? void 0 : _a.id],
|
|
7675
|
-
_joinTopicIds: (_b = post === null || post === void 0 ? void 0 : post.topics) === null || _b === void 0 ? void 0 : _b.map((t) => t.id),
|
|
7676
|
-
});
|
|
7677
|
-
const [maxRepliesShow, setMaxRepliesShow] = useState(COMMENT_LIMIT);
|
|
7678
|
-
const isCommented = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id)
|
|
7679
|
-
? replies === null || replies === void 0 ? void 0 : replies.some((c) => c.author.id === userInfo.id)
|
|
7680
|
-
: false;
|
|
7681
|
-
const addNewReply = (comment) => {
|
|
7682
|
-
setComment((old) => {
|
|
7683
|
-
// somehow this set state run twice
|
|
7684
|
-
// => we need to check unique comment id before add to array
|
|
7685
|
-
if (!old.replies.find((c) => c.id === comment.id)) {
|
|
7686
|
-
old.replies.unshift(comment);
|
|
7687
|
-
const newComment = Object.assign(Object.assign({}, old), { replies: old.replies.slice(), countReplies: old.countReplies + 1 });
|
|
7688
|
-
refetchComment && refetchComment(newComment);
|
|
7689
|
-
return newComment;
|
|
7690
|
-
}
|
|
7691
|
-
return old;
|
|
7692
|
-
});
|
|
7693
|
-
};
|
|
7694
|
-
const [showInputComment, setShowInputComment] = useState(false);
|
|
7695
|
-
const sortedReplies = useMemo(() => {
|
|
7696
|
-
if (type !== 'comment' || !replies || replies.length == 0)
|
|
7697
|
-
return replies;
|
|
7698
|
-
return replies.sort((a, b) => {
|
|
7699
|
-
const timeA = new Date(a.createdAt).getTime();
|
|
7700
|
-
const timeB = new Date(b.createdAt).getTime();
|
|
7701
|
-
if (timeA > timeB)
|
|
7702
|
-
return -1;
|
|
7703
|
-
if (timeA < timeB)
|
|
7704
|
-
return 1;
|
|
7705
|
-
return 0;
|
|
7706
|
-
});
|
|
7707
|
-
}, [type, replies]);
|
|
7708
|
-
const mergeCountReplies = (replies === null || replies === void 0 ? void 0 : replies.length) || 0;
|
|
7709
|
-
const hasPopover = String(author === null || author === void 0 ? void 0 : author.email) &&
|
|
7710
|
-
(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) &&
|
|
7711
|
-
String(author === null || author === void 0 ? void 0 : author.email) === String(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email);
|
|
7712
|
-
// const isAnonymousOfCurAuthor =
|
|
7713
|
-
// post?.isAnonymous && post?.author?.username === author?.username
|
|
7714
|
-
// const name = isAnonymousOfCurAuthor
|
|
7715
|
-
// ? t('cardPost.anonymous')
|
|
7716
|
-
// : author?.name || author?.username || ''
|
|
7717
|
-
// const avatar = isAnonymousOfCurAuthor ? DEFAULT_AVATAR_IMG : author?.avatar
|
|
7718
|
-
// const username = isAnonymousOfCurAuthor
|
|
7719
|
-
// ? t('cardPost.anonymous')
|
|
7720
|
-
// : author?.username || author?.name || ''
|
|
7721
|
-
const name = (author === null || author === void 0 ? void 0 : author.name) || (author === null || author === void 0 ? void 0 : author.username) || '';
|
|
7722
|
-
const username = (author === null || author === void 0 ? void 0 : author.username) || (author === null || author === void 0 ? void 0 : author.name) || '';
|
|
7723
|
-
const avatar = author === null || author === void 0 ? void 0 : author.avatar;
|
|
7724
|
-
const authorRole = (post === null || post === void 0 ? void 0 : post.isAnonymous) ? undefined : author === null || author === void 0 ? void 0 : author.role;
|
|
7725
|
-
const listMentions = [
|
|
7726
|
-
...((post === null || post === void 0 ? void 0 : post.isAnonymous)
|
|
7727
|
-
? [
|
|
7728
|
-
{
|
|
7729
|
-
id: ((_c = post === null || post === void 0 ? void 0 : post.author) === null || _c === void 0 ? void 0 : _c.id) || 0,
|
|
7730
|
-
name: t('cardPost.anonymous'),
|
|
7731
|
-
},
|
|
7732
|
-
]
|
|
7733
|
-
: []),
|
|
7734
|
-
...(mentions || []),
|
|
7735
|
-
];
|
|
7736
|
-
const [hospitalInfo, setHospitalInfo] = useState(null);
|
|
7737
|
-
const [doctorInfo, setDoctorInfo] = useState(null);
|
|
7738
|
-
useEffect(() => {
|
|
7739
|
-
if (author === null || author === void 0 ? void 0 : author.hospitalId) {
|
|
7740
|
-
const fetchHospitalDetail = (hospitalId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7741
|
-
var _a;
|
|
7742
|
-
const response = yield callApi(getCarePath(CARE_PATHS.GET_HOSPITAL_INFO, {
|
|
7743
|
-
hospital_branch_id: hospitalId,
|
|
7744
|
-
website_url: domainLocales$1[locale],
|
|
7745
|
-
}), 'get');
|
|
7746
|
-
if ((_a = response === null || response === void 0 ? void 0 : response._data) === null || _a === void 0 ? void 0 : _a.branch) {
|
|
7747
|
-
setHospitalInfo(response === null || response === void 0 ? void 0 : response._data.branch);
|
|
7748
|
-
}
|
|
7749
|
-
});
|
|
7750
|
-
fetchHospitalDetail(author.hospitalId);
|
|
7751
|
-
}
|
|
7752
|
-
if (author === null || author === void 0 ? void 0 : author.doctorId) {
|
|
7753
|
-
const fetchDoctorDetail = (doctorId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7754
|
-
var _b;
|
|
7755
|
-
const response = yield callApi(getCarePath(CARE_PATHS.GET_DOCTOR_INFO, {
|
|
7756
|
-
doctorId: doctorId,
|
|
7757
|
-
website_url: domainLocales$1[locale],
|
|
7758
|
-
}), 'get');
|
|
7759
|
-
if ((_b = response === null || response === void 0 ? void 0 : response._data) === null || _b === void 0 ? void 0 : _b.doctor) {
|
|
7760
|
-
setDoctorInfo(response === null || response === void 0 ? void 0 : response._data.doctor);
|
|
7761
|
-
}
|
|
7762
|
-
});
|
|
7763
|
-
fetchDoctorDetail(author.doctorId);
|
|
7764
|
-
}
|
|
7765
|
-
}, [author.hospitalId, author.doctorId]);
|
|
7766
|
-
const isDoctorAvailable = (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.valid_outpatient) || (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.valid_telemedicine);
|
|
7767
|
-
const isHospitalAvailable = ((hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.total_available_service) ||
|
|
7768
|
-
(hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.total_available_doctor)) > 0;
|
|
7769
|
-
const hasQuickBooking = hasQuickBookingEnable && (isDoctorAvailable || isHospitalAvailable);
|
|
7770
|
-
const isChatbotAuthor = ((_d = comment === null || comment === void 0 ? void 0 : comment.author) === null || _d === void 0 ? void 0 : _d.type) === 'chatbot';
|
|
7771
|
-
return (React__default.createElement(TogetherAuthConfigContextProvider, { defaultParams: {
|
|
7772
|
-
_joinCommunityIds: [(_e = post === null || post === void 0 ? void 0 : post.community) === null || _e === void 0 ? void 0 : _e.id],
|
|
7773
|
-
_joinTopicIds: (_f = post === null || post === void 0 ? void 0 : post.topics) === null || _f === void 0 ? void 0 : _f.map((t) => t.id),
|
|
7774
|
-
} },
|
|
7775
|
-
React__default.createElement(StyledCardPost, { className: className, style: style, "data-is-reply": !!level, "data-is-marrybaby": isMarryBaby, "data-has-booking": hasQuickBooking },
|
|
7776
|
-
type === 'reply' && React__default.createElement(Divider, { className: "top-divider", type: "solid" }),
|
|
7777
|
-
React__default.createElement("div", { style: { padding: '16px 16px 0' } },
|
|
7778
|
-
React__default.createElement(CardAuthor, Object.assign({ avatar: avatar, name: name, username: username, timeText: post === null || post === void 0 ? void 0 : post.createdTime, community: post === null || post === void 0 ? void 0 : post.community,
|
|
7779
|
-
// miniIcon="./svg/icon-tag.svg"
|
|
7780
|
-
// authorLabelType={getAuthorLabelFromRoles(author?.role || [])}
|
|
7781
|
-
className: `post-author ${hasPopover ? 'with-popover' : ''}`, type: type, userId: author === null || author === void 0 ? void 0 : author.id, role: authorRole, expertId: author === null || author === void 0 ? void 0 : author.partnerId, title: author === null || author === void 0 ? void 0 : author.title, doctorId: author === null || author === void 0 ? void 0 : author.doctorId, hospitalId: author === null || author === void 0 ? void 0 : author.hospitalId, hasQuickBooking: hasQuickBooking, handleMakeAppointment: handleMakeAppointment, isAnonymous: (comment === null || comment === void 0 ? void 0 : comment.isAnonymous) ||
|
|
7782
|
-
(Boolean(post === null || post === void 0 ? void 0 : post.isAnonymous) &&
|
|
7783
|
-
((_g = post === null || post === void 0 ? void 0 : post.author) === null || _g === void 0 ? void 0 : _g.username) === (author === null || author === void 0 ? void 0 : author.username)), hideBackground: isChatbotAuthor, userType: author === null || author === void 0 ? void 0 : author.type }, cardAuthorProps)),
|
|
7784
|
-
Boolean(comment === null || comment === void 0 ? void 0 : comment.isVerify) && !Boolean(comment === null || comment === void 0 ? void 0 : comment.isOppose) && (React__default.createElement(VerifiedTag, { title: (_h = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _h === void 0 ? void 0 : _h.title, name: (_j = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _j === void 0 ? void 0 : _j.name, userId: (_k = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _k === void 0 ? void 0 : _k.id, role: (_l = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _l === void 0 ? void 0 : _l.role, avatar: (_m = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _m === void 0 ? void 0 : _m.avatar, className: "verify-tag" }))),
|
|
7785
|
-
React__default.createElement(PostContent, { className: "post-content-wrapper", replyingTo: replyingTo, mentionedUser: mentionedUser, description: text, mentions: listMentions, maxChars: maxChars, disableShortenContent: disableShortenContent }),
|
|
7786
|
-
React__default.createElement("span", null),
|
|
7787
|
-
React__default.createElement("span", null),
|
|
7788
|
-
images && images.length > 0 ? (React__default.createElement("div", { key: "image-preview", className: "image-preview-wrapper", "data-is-reply": true },
|
|
7789
|
-
React__default.createElement(PostImagePreview, { images: images, authorName: author === null || author === void 0 ? void 0 : author.username }))) : null,
|
|
7790
|
-
(!images || images.length === 0) && link ? (React__default.createElement("div", { key: "link-preview", className: "link-preview-wrapper", "data-is-reply": true },
|
|
7791
|
-
React__default.createElement(CardLink, { url: link }))) : null,
|
|
7792
|
-
type !== 'most-engaging' ? (React__default.createElement(React__default.Fragment, null,
|
|
7793
|
-
isChatbotAuthor && (React__default.createElement(StyledSourceList, { listUrl: comment === null || comment === void 0 ? void 0 : comment.source, categorySlug: comment === null || comment === void 0 ? void 0 : comment.categorySlug })),
|
|
7794
|
-
React__default.createElement(CardReactions, { type: CardReactionType.reply, loveCount: countLikes, replyCount: mergeCountReplies, className: "post-reaction", liked: liked, isReplied: isCommented, hideCommentIcon: type === 'reply' || isChatbotAuthor, hasShare: false, onCommentClick: () => authActionWrapper(() => setShowInputComment((v) => !v)), onCommentCountClick: () => authActionWrapper(() => {
|
|
7795
|
-
setShowInputComment(true);
|
|
7796
|
-
}), onLikeClick: () => authActionWrapper(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
7797
|
-
if (id) {
|
|
7798
|
-
const res = yield likeUnlikeComment({
|
|
7799
|
-
commentId: id,
|
|
7800
|
-
setLike: !liked,
|
|
7801
|
-
locale,
|
|
7802
|
-
});
|
|
7803
|
-
if (res.status === 1) {
|
|
7804
|
-
setComment((old) => {
|
|
7805
|
-
return Object.assign(Object.assign({}, old), { liked: !liked, countLikes: old.countLikes + (!liked ? 1 : -1) });
|
|
7806
|
-
});
|
|
7807
|
-
}
|
|
7808
|
-
}
|
|
7809
|
-
})) }),
|
|
7810
|
-
showInputComment && (React__default.createElement(InputCommentBar, { replyingId: replyingId || comment.id, replyToName: name, isReply: true, onClose: () => setShowInputComment(false), onPostSuccess: (comment) => {
|
|
7811
|
-
if (type === 'reply') {
|
|
7812
|
-
onPostCommentSuccess && onPostCommentSuccess(comment);
|
|
7813
|
-
}
|
|
7814
|
-
else {
|
|
7815
|
-
addNewReply(comment);
|
|
7816
|
-
}
|
|
7817
|
-
}, post: post, replyingUser: author })),
|
|
7818
|
-
type === 'comment' && replies && replies.length > 0 ? (React__default.createElement("div", { className: "comment-reply-wrapper" }, (_o = sortedReplies === null || sortedReplies === void 0 ? void 0 : sortedReplies.slice(0, maxRepliesShow)) === null || _o === void 0 ? void 0 :
|
|
7819
|
-
_o.map((reply) => (React__default.createElement(CardReply, { key: reply.id, comment: reply, type: "reply", className: "comment-reply-item", level: level + 1, replyingId: id, onPostCommentSuccess: addNewReply, post: post, onDeleteComment: () => {
|
|
7820
|
-
setComment((old) => {
|
|
7821
|
-
return Object.assign(Object.assign({}, old), { replies: old.replies.filter((r) => r.id !== reply.id), countReplies: old.countReplies - 1 });
|
|
7822
|
-
});
|
|
7823
|
-
}, handleMakeAppointment: handleMakeAppointment, hasQuickBookingEnable: hasQuickBookingEnable }))),
|
|
7824
|
-
mergeCountReplies > maxRepliesShow && (React__default.createElement(React__default.Fragment, null,
|
|
7825
|
-
React__default.createElement(Divider, { className: "top-divider", type: "solid" }),
|
|
7826
|
-
React__default.createElement(Button, { className: "more-cmt", size: "lg", color: "ghost", onClick: () => setMaxRepliesShow((m) => m + COMMENT_LIMIT) },
|
|
7827
|
-
t('comment.seeMoreReplies', {
|
|
7828
|
-
count: mergeCountReplies - maxRepliesShow,
|
|
7829
|
-
}),
|
|
7830
|
-
React__default.createElement("img", { className: "chevron-right", src: ChevronRightActive, loading: "lazy" })))))) : null)) : null,
|
|
7831
|
-
hasPopover && (React__default.createElement(CardReplyPopover, { onDeleteComment: onDeleteComment, className: "popover", commentId: comment.id })))));
|
|
7832
|
-
};
|
|
7833
|
-
|
|
7834
|
-
const getMostEngagingComment = (postId, locale) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7835
|
-
var _a, _b, _c;
|
|
7836
|
-
const commentsRes = yield callApiWithOptionalAuth(getApiPath(PATHS.COMMENT.LIST, {
|
|
7837
|
-
postId: postId,
|
|
7838
|
-
_locale: locale,
|
|
7839
|
-
sort: 'popularity',
|
|
7840
|
-
perPage: 1,
|
|
7841
|
-
withoutReply: 1,
|
|
7842
|
-
}), 'GET');
|
|
7843
|
-
return (_c = (_b = (_a = commentsRes === null || commentsRes === void 0 ? void 0 : commentsRes.data) === null || _a === void 0 ? void 0 : _a.comments) === null || _b === void 0 ? void 0 : _b.map(formatComment)) === null || _c === void 0 ? void 0 : _c[0];
|
|
7844
|
-
});
|
|
7845
|
-
const CardPost = ({ className, style, hideViewMoreComment, showMostEngaging, onCommentClick, onCommentCountClick, onMostEngagingCommentClick, onPostCommentSuccess: onPostCommentSuccessProp, disableCardLink, disableShortenContent, onDeletePost, onEditPost, post: postProp, mostEngagingComment: mostEngagingCommentProp, onDeleteComment: onDeleteCommentProp, showInputComment: propsShowInputComment, InlineCommentsComponent, hasQuickBookingEnable, handleMakeAppointment, cardAuthorProps, }) => {
|
|
7846
|
-
const [post, setPost] = useState(postProp);
|
|
7847
|
-
const [isOpenSharePopup, setIsOpenSharePopup] = useState(false);
|
|
7848
|
-
const [mostEngagingComment, setMostEngagingComment] = useState(mostEngagingCommentProp);
|
|
7849
|
-
const { community, topics, author, slug, isPin, liked, photos, mentions, title, description, previewUrl, likesCount, commentsCount, id, commented, } = post;
|
|
7850
|
-
const { data: { locale, env: { isMarryBaby, togetherBasePath }, }, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
|
|
7851
|
-
const { t } = useTranslations();
|
|
7852
|
-
const [showInputComment, setShowInputComment] = useState(propsShowInputComment);
|
|
7853
|
-
const postRelativeHref = `${togetherBasePath}/${(community === null || community === void 0 ? void 0 : community.slug) || '_'}/${slug || ''}`;
|
|
7854
|
-
const postHref = `${getCurrentBaseUrl(locale)}${postRelativeHref}`;
|
|
7855
|
-
const { authActionWrapper } = useTogetherAuthRequiredAction((community === null || community === void 0 ? void 0 : community.slug)
|
|
7856
|
-
? {
|
|
7857
|
-
_joinCommunityIds: [community.id],
|
|
7858
|
-
_joinTopicIds: topics === null || topics === void 0 ? void 0 : topics.map((t) => t.id),
|
|
7859
|
-
// _location: postHref,
|
|
7860
|
-
}
|
|
7861
|
-
: undefined);
|
|
7862
|
-
const [isLikeLoading, setIsLikeLoading] = useState(false);
|
|
7863
|
-
useEffect(() => {
|
|
7864
|
-
setShowInputComment(propsShowInputComment);
|
|
7865
|
-
}, [propsShowInputComment]);
|
|
7866
|
-
const name = (author === null || author === void 0 ? void 0 : author.name) || (author === null || author === void 0 ? void 0 : author.username) || '';
|
|
7867
|
-
const username = (author === null || author === void 0 ? void 0 : author.username) || (author === null || author === void 0 ? void 0 : author.name) || '';
|
|
7868
|
-
const avatar = author === null || author === void 0 ? void 0 : author.avatar;
|
|
7869
|
-
const authorRole = (post === null || post === void 0 ? void 0 : post.isAnonymous) ? undefined : author === null || author === void 0 ? void 0 : author.role;
|
|
7870
|
-
const [hospitalInfo, setHospitalInfo] = useState(null);
|
|
7871
|
-
const [doctorInfo, setDoctorInfo] = useState(null);
|
|
7872
|
-
useEffect(() => {
|
|
7873
|
-
if (author === null || author === void 0 ? void 0 : author.hospitalId) {
|
|
7874
|
-
const fetchHospitalDetail = (hospitalId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7875
|
-
var _a;
|
|
7876
|
-
const response = yield callApi(getCarePath(CARE_PATHS.GET_HOSPITAL_INFO, {
|
|
7877
|
-
hospital_branch_id: hospitalId,
|
|
7878
|
-
website_url: domainLocales[locale],
|
|
7879
|
-
}), 'get');
|
|
7880
|
-
if ((_a = response === null || response === void 0 ? void 0 : response._data) === null || _a === void 0 ? void 0 : _a.branch) {
|
|
7881
|
-
setHospitalInfo(response === null || response === void 0 ? void 0 : response._data.branch);
|
|
7882
|
-
}
|
|
7883
|
-
});
|
|
7884
|
-
fetchHospitalDetail(author.hospitalId);
|
|
7885
|
-
}
|
|
7886
|
-
if (author === null || author === void 0 ? void 0 : author.doctorId) {
|
|
7887
|
-
const fetchDoctorDetail = (doctorId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7888
|
-
var _b;
|
|
7889
|
-
const response = yield callApi(getCarePath(CARE_PATHS.GET_DOCTOR_INFO, {
|
|
7890
|
-
doctorId: doctorId,
|
|
7891
|
-
website_url: domainLocales[locale],
|
|
7892
|
-
}), 'get');
|
|
7893
|
-
if ((_b = response === null || response === void 0 ? void 0 : response._data) === null || _b === void 0 ? void 0 : _b.doctor) {
|
|
7894
|
-
setDoctorInfo(response === null || response === void 0 ? void 0 : response._data.doctor);
|
|
7895
|
-
}
|
|
7896
|
-
});
|
|
7897
|
-
fetchDoctorDetail(author.doctorId);
|
|
7898
|
-
}
|
|
7899
|
-
}, [author.hospitalId, author.doctorId]);
|
|
7900
|
-
const isDoctorAvailable = (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.valid_outpatient) || (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.valid_telemedicine);
|
|
7901
|
-
const isHospitalAvailable = ((hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.total_available_service) ||
|
|
7902
|
-
(hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.total_available_doctor)) > 0;
|
|
7903
|
-
const hasQuickBooking = hasQuickBookingEnable && (isDoctorAvailable || isHospitalAvailable);
|
|
7904
|
-
useEffect(() => {
|
|
7905
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
7906
|
-
if (id &&
|
|
7907
|
-
commentsCount &&
|
|
7908
|
-
showMostEngaging &&
|
|
7909
|
-
!(mostEngagingCommentProp === null || mostEngagingCommentProp === void 0 ? void 0 : mostEngagingCommentProp.id)) {
|
|
7910
|
-
const comment = yield getMostEngagingComment(id, locale);
|
|
7911
|
-
setMostEngagingComment(comment);
|
|
7912
|
-
}
|
|
7913
|
-
}))();
|
|
7914
|
-
}, [id, locale, commentsCount, showMostEngaging, mostEngagingCommentProp === null || mostEngagingCommentProp === void 0 ? void 0 : mostEngagingCommentProp.id]);
|
|
7915
|
-
useEffect(() => {
|
|
7916
|
-
setMostEngagingComment(mostEngagingCommentProp);
|
|
7917
|
-
}, [mostEngagingCommentProp === null || mostEngagingCommentProp === void 0 ? void 0 : mostEngagingCommentProp.id]);
|
|
7918
|
-
const onPostCommentSuccess = (comment) => {
|
|
7919
|
-
if (commentsCount === 0 && !(mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id)) {
|
|
7920
|
-
setMostEngagingComment(comment);
|
|
7921
|
-
}
|
|
7922
|
-
setPost((p) => (Object.assign(Object.assign({}, p), { commentsCount: p.commentsCount + 1, commented: true })));
|
|
7923
|
-
onPostCommentSuccessProp && onPostCommentSuccessProp(comment);
|
|
7924
|
-
};
|
|
7925
|
-
const onDeleteComment = (comment) => __awaiter(void 0, void 0, void 0, function* () {
|
|
7926
|
-
if (commentsCount > 1 &&
|
|
7927
|
-
(mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id) &&
|
|
7928
|
-
(mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id) === (comment === null || comment === void 0 ? void 0 : comment.id)) {
|
|
7929
|
-
const newMostEngaging = yield getMostEngagingComment(id, locale);
|
|
7930
|
-
setMostEngagingComment(newMostEngaging);
|
|
7931
|
-
}
|
|
7932
|
-
setPost((p) => (Object.assign(Object.assign({}, p), { commentsCount: p.commentsCount - 1 })));
|
|
7933
|
-
onDeleteCommentProp && onDeleteCommentProp(comment);
|
|
7934
|
-
});
|
|
7935
|
-
return (React__default.createElement(TogetherAuthConfigContextProvider, { defaultParams: (community === null || community === void 0 ? void 0 : community.slug)
|
|
7936
|
-
? {
|
|
7937
|
-
_joinCommunityIds: [community.id],
|
|
7938
|
-
_joinTopicIds: topics === null || topics === void 0 ? void 0 : topics.map((t) => t.id),
|
|
7939
|
-
// _location: postHref,
|
|
7940
|
-
}
|
|
7941
|
-
: undefined },
|
|
7942
|
-
isOpenSharePopup && (React__default.createElement(SharePopup, { url: postHref, avatar: DEFAULT_IMG, text: title, onClose: () => setIsOpenSharePopup(false) })),
|
|
7943
|
-
React__default.createElement(StyledCardPost$1, { className: className, style: style, "data-is-marrybaby": isMarryBaby },
|
|
7944
|
-
isPin ? React__default.createElement(LabelPin, { className: "post-pin" }) : null,
|
|
7945
|
-
React__default.createElement("div", { style: { position: 'relative', padding: '1rem 1rem 0' } },
|
|
7946
|
-
React__default.createElement(CardAuthor, Object.assign({ avatar: avatar, name: name, username: username, url: disableCardLink ? undefined : postRelativeHref, community: community,
|
|
7947
|
-
// miniIcon="./svg/icon-tag.svg"
|
|
7948
|
-
timeText: post === null || post === void 0 ? void 0 : post.createdTime, className: "post-author", role: authorRole, userId: author === null || author === void 0 ? void 0 : author.id, expertId: author === null || author === void 0 ? void 0 : author.partnerId, doctorId: author === null || author === void 0 ? void 0 : author.doctorId, hospitalId: author === null || author === void 0 ? void 0 : author.hospitalId, title: author === null || author === void 0 ? void 0 : author.title, hasQuickBooking: hasQuickBooking, handleMakeAppointment: handleMakeAppointment, "data-testid": "name", isAnonymous: !!(post === null || post === void 0 ? void 0 : post.isAnonymous), extendEle: React__default.createElement(CardPostPopoverMore, { authorEmail: String(author === null || author === void 0 ? void 0 : author.email), onDeletePost: onDeletePost, shareUrl: postHref, post: post, className: "popover", onEditPost: onEditPost }) }, cardAuthorProps))),
|
|
7949
|
-
React__default.createElement("a", { href: disableCardLink ? undefined : postRelativeHref, className: "post-content-link-wrapper" },
|
|
7950
|
-
title && (React__default.createElement(Heading, { className: "post-content-title", as: "h2", tag: "h5", fontWeight: "bold", "data-testid": "Title of the Post" }, innertext(title))),
|
|
7951
|
-
React__default.createElement(PostContent, { className: "post-content-wrapper", description: description, disableShortenContent: disableShortenContent, mentions: mentions, "data-testid": "Content of the Post" })),
|
|
7952
|
-
React__default.createElement("span", null),
|
|
7953
|
-
React__default.createElement("span", null),
|
|
7954
|
-
React__default.createElement("div", { key: "tag-topic" }, topics && topics.length > 0 ? (React__default.createElement(TagTopic, { topics: topics, className: "post-topics" })) : null),
|
|
7955
|
-
React__default.createElement("div", { key: "social-preview" }, (post === null || post === void 0 ? void 0 : post.introUrl) ? (React__default.createElement("div", { className: `social-preview-wrapper ${!!(photos === null || photos === void 0 ? void 0 : photos.length) ? 'has-image' : ''}` },
|
|
7956
|
-
React__default.createElement(SocialLinkPreview, { url: post.introUrl, image: post.bannerImage }))) : null),
|
|
7957
|
-
React__default.createElement("div", { key: "image-preview" }, !!(photos === null || photos === void 0 ? void 0 : photos.length) ? (React__default.createElement("div", { className: "image-preview-wrapper" },
|
|
7958
|
-
React__default.createElement(PostImagePreview, { images: photos, authorName: author === null || author === void 0 ? void 0 : author.name }))) : null),
|
|
7959
|
-
React__default.createElement("div", { key: "link-preview" }, !(post === null || post === void 0 ? void 0 : post.introUrl) && !(photos === null || photos === void 0 ? void 0 : photos.length) && (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url) ? (React__default.createElement("div", { className: "link-preview-wrapper" },
|
|
7960
|
-
React__default.createElement(CardLink, { title: previewUrl.title, url: previewUrl.url, image: previewUrl.image }))) : null),
|
|
7961
|
-
React__default.createElement(CardReactions, { isMarryBaby: isMarryBaby, type: CardReactionType.post, loveCount: likesCount, replyCount: commentsCount, className: `post-reaction ${(photos === null || photos === void 0 ? void 0 : photos.length) || (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url) ? 'hide-top-border' : ''}`, liked: isLikeLoading ? !liked : liked, isReplied: commented, onCommentClick: () => authActionWrapper(() => {
|
|
7962
|
-
onCommentClick ? onCommentClick() : setShowInputComment((v) => !v);
|
|
7963
|
-
}), onCommentCountClick: () => {
|
|
7964
|
-
authActionWrapper(() => {
|
|
7965
|
-
isMarryBaby
|
|
7966
|
-
? setShowInputComment(true)
|
|
7967
|
-
: onCommentCountClick
|
|
7968
|
-
? onCommentCountClick()
|
|
7969
|
-
: !disableCardLink && (window.location.href = postRelativeHref);
|
|
7970
|
-
});
|
|
7971
|
-
}, onShareClick: () => {
|
|
7972
|
-
setIsOpenSharePopup(true);
|
|
7973
|
-
}, onLikeClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
7974
|
-
if (!id || isLikeLoading)
|
|
7975
|
-
return;
|
|
7976
|
-
setIsLikeLoading(true);
|
|
7977
|
-
try {
|
|
7978
|
-
const res = yield likeUnlikePost({
|
|
7979
|
-
id,
|
|
7980
|
-
locale,
|
|
7981
|
-
});
|
|
7982
|
-
if ((res === null || res === void 0 ? void 0 : res.status) !== 1) {
|
|
7983
|
-
pushNotifications(getDefaultFailNoti(t));
|
|
7984
|
-
}
|
|
7985
|
-
else {
|
|
7986
|
-
setPost((p) => (Object.assign(Object.assign({}, p), { likesCount: (p.likesCount || 0) + (!p.liked ? 1 : -1), liked: !p.liked })));
|
|
7987
|
-
}
|
|
7988
|
-
}
|
|
7989
|
-
catch (_a) {
|
|
7990
|
-
pushNotifications(getDefaultFailNoti(t));
|
|
7991
|
-
}
|
|
7992
|
-
setIsLikeLoading(false);
|
|
7993
|
-
}), showingMostEngaging: !!(showMostEngaging && (mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id)) }),
|
|
7994
|
-
showInputComment && (React__default.createElement(InputCommentBar, { isMainCmt: !propsShowInputComment, onClose: () => setShowInputComment(false), onPostSuccess: onPostCommentSuccess, post: post })),
|
|
7995
|
-
showMostEngaging && (mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id) ? (React__default.createElement("div", { className: "most-engaging-wrapper", onClick: (e) => {
|
|
7996
|
-
if (onMostEngagingCommentClick) {
|
|
7997
|
-
e.stopPropagation();
|
|
7998
|
-
onMostEngagingCommentClick();
|
|
7999
|
-
}
|
|
8000
|
-
else
|
|
8001
|
-
window.location.href = postRelativeHref;
|
|
8002
|
-
} },
|
|
8003
|
-
React__default.createElement(CardReply, { hasQuickBookingEnable: hasQuickBookingEnable, handleMakeAppointment: handleMakeAppointment, comment: mostEngagingComment, post: post, onDeleteComment: () => {
|
|
8004
|
-
onDeleteComment && onDeleteComment(mostEngagingComment);
|
|
8005
|
-
}, className: "most-engaging-comment", type: "most-engaging", key: mostEngagingComment.id, cardAuthorProps: cardAuthorProps }),
|
|
8006
|
-
commentsCount > 1 && !hideViewMoreComment && (React__default.createElement(Button, { className: "see-more-comments", color: "ghost", size: "md" }, t('comment.seeMoreComments', {
|
|
8007
|
-
count: commentsCount - 1,
|
|
8008
|
-
}))))) : null,
|
|
8009
|
-
InlineCommentsComponent)));
|
|
8010
|
-
};
|
|
8011
|
-
|
|
8012
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
8013
|
-
__proto__: null
|
|
8014
|
-
});
|
|
8015
|
-
|
|
8016
|
-
export { SkipQuestionOfExpertBtn as A, CardPost as B, CardLink as C, CardPostPopoverMore as D, CardReply as E, CardReplyPopover as F, PopoverMenu as G, SourceList as H, InputCommentBar as I, LabelSortPin as L, PopupDanger as P, SharePopup as S, TogetherAuthConfigContext as T, VerifiedTag as V, TogetherAuthConfigContextProvider as a, CardReactions as b, TagTopic as c, LabelPin as d, LabelSorting as e, CardAuthor as f, CreateNewPostContent as g, CreatePostDescription as h, CreatePostTitle as i, PopupExpert as j, PopupDoctor as k, PopupHospital as l, TopicSelectList as m, PopupFrame as n, SubmitReportForm as o, ShareBox as p, PostContent as q, ImagePreviewPopup as r, PostSingleImageViewPopup as s, types as t, useTogetherAuthRequiredAction as u, PostImagePreview as v, SocialLinkPreview as w, ProfileDetailModal as x, ProfileDetail as y, TabName as z };
|
|
5056
|
+
export { decodeCommentBody as A, likeUnlikeComment as B, CardAuthor as C, likeUnlikePost as D, InputCommentBar as I, Loading$1 as L, PopupDanger as P, RichTextEditor as R, SharePopup as S, TabName as T, PopupExpert as a, PopupDoctor as b, PopupHospital as c, PopupFrame as d, SubmitReportForm as e, ShareBox as f, PostContent as g, ImagePreviewPopup as h, PostSingleImageViewPopup as i, PostImagePreview as j, SocialLinkPreview as k, ProfileDetailModal as l, ProfileDetail as m, StyledCreatePostDescription as n, IconCloseCircle as o, highlightBadWords as p, decodeMention as q, decodePostUrl as r, getDefaultFailNoti as s, getPostFormData as t, useImagePicker as u, editPost as v, createPost as w, deletePost as x, IconAlertCircle as y, deleteComment as z };
|