@hhgtech/hhg-components 1.29.79 → 1.29.81
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-aefa01a7.js → WhatsApp-82018096.js} +24 -276
- package/build/adapters.js +17 -16
- package/build/atoms.js +100 -0
- package/build/babyGrowth.js +162 -164
- package/build/cache.js +3 -3
- package/build/care.js +18 -18
- package/build/components.js +179 -163
- package/build/{constants-94957c92.js → constants-3a475a22.js} +2 -2
- package/build/constants-513a9a41.js +318 -0
- package/build/{index-6036e2a0.js → constants-936f45e9.js} +0 -136
- package/build/constants-dd16fb4d.js +425 -0
- package/build/constants.js +3 -3
- package/build/{core-279a7b4f.js → core-9e44ee99.js} +2 -2
- package/build/{index-5033f644.js → dataTransform-6b4d7a4e.js} +85 -134
- package/build/{dataTransform-1c96db25.js → dataTransform-c1701cbd.js} +1 -1
- package/build/defaultClassWrapper-e87ca8ef.js +21 -0
- package/build/ecom.js +5 -5
- package/build/esm/WhatsApp-7d3732e2.js +46 -0
- package/build/esm/adapters.js +17 -16
- package/build/esm/atoms.js +57 -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 -75
- package/build/esm/constants-6bdb97a8.js +417 -0
- package/build/esm/constants-71d9f33b.js +307 -0
- package/build/esm/{constants-78d473b4.js → constants-ebf80e5f.js} +2 -2
- package/build/esm/{index-122dd8ee.js → constants-f77fc231.js} +1 -127
- package/build/esm/constants.js +3 -3
- package/build/esm/{core-2715a7c7.js → core-c72e0ff5.js} +2 -2
- package/build/esm/{index-f672661d.js → dataTransform-3e8e25ba.js} +87 -135
- package/build/esm/{dataTransform-24bd11e8.js → dataTransform-6c032113.js} +1 -1
- package/build/esm/defaultClassWrapper-31caf23b.js +15 -0
- package/build/esm/ecom.js +5 -5
- package/build/esm/fixedBottomAdBlock-13ed4a34.js +3474 -0
- package/build/esm/footer.js +18 -18
- package/build/esm/gAssets.js +4 -4
- package/build/esm/{getDynamicHealthTool-d805169a.js → getDynamicHealthTool-7681e43a.js} +4 -4
- package/build/esm/{getSocialList-c8edb201.js → getSocialList-e8142513.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-16514f4d.js +156 -0
- package/build/esm/{index-2a4e676a.js → index-1da2ca0b.js} +2 -2
- package/build/esm/{utils-45e55363.js → index-1ecbcf21.js} +71 -105
- package/build/esm/{index-e2d856fc.js → index-21eac858.js} +1043 -1232
- package/build/esm/{index-c5b3a3ba.js → index-2774583d.js} +35 -176
- package/build/esm/index-29d04985.js +14 -0
- package/build/esm/index-2b9213cf.js +195 -0
- package/build/esm/index-3078acec.js +275 -0
- package/build/esm/index-376bee14.js +847 -0
- package/build/esm/index-38f50764.js +557 -0
- package/build/esm/index-42ad7763.js +95 -0
- package/build/esm/{index-47a90477.js → index-598ab51b.js} +5 -5
- package/build/esm/{index-ecb46439.js → index-69248434.js} +33 -5
- package/build/esm/index-6ac73f00.js +1114 -0
- package/build/esm/index-703205e3.js +54 -0
- package/build/esm/{index-7c6316a6.js → index-73301602.js} +2 -2
- package/build/esm/index-76d20d3f.js +100 -0
- package/build/esm/{index-ec38e886.js → index-780a08de.js} +2 -2
- package/build/esm/{index-92fd8661.js → index-78255d6c.js} +2 -2
- package/build/esm/{index-9b3bf9da.js → index-7cbe2a10.js} +12 -11
- package/build/esm/{index-5265867b.js → index-7e756cb8.js} +11 -10
- package/build/esm/{index.styled-eb1001c3.js → index-87a2ea8c.js} +21 -3
- package/build/esm/index-88ad2ca3.js +1681 -0
- package/build/esm/index-8952ceac.js +202 -0
- package/build/esm/index-996f7caf.js +148 -0
- package/build/esm/{index-272d3d01.js → index-9f1899f2.js} +4 -4
- package/build/esm/{index-63be4c47.js → index-b1bb27aa.js} +134 -62
- package/build/esm/{index-ef96fd13.js → index-bef3c9bd.js} +3 -3
- package/build/esm/{index-670d21ca.js → index-c1af3a8e.js} +13 -12
- package/build/esm/{index-b2eed677.js → index-c200bff6.js} +2 -2
- package/build/esm/{index-0de64a0f.js → index-cb4afb33.js} +6 -6
- package/build/esm/{index-741ce3ab.js → index-cdac57da.js} +1 -1
- package/build/esm/{index-49d819b7.js → index-cf6beac8.js} +2 -13
- package/build/esm/{index-ad5c69c9.js → index-d218b94e.js} +2 -2
- package/build/esm/index-d6201fa4.js +42 -0
- package/build/esm/index-e104ad21.js +335 -0
- package/build/esm/index-e26514ee.js +262 -0
- package/build/esm/index-f27edf45.js +130 -0
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +89 -73
- package/build/esm/lead.js +23 -33
- package/build/esm/logoIcon-d93bc56e.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-e7ff0e08.js → routing-bebdc8b7.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-bf6080eb.js +446 -0
- package/build/esm/together.js +35 -37
- package/build/esm/{types-37f2c5d4.js → types-2580132c.js} +28 -30
- package/build/esm/{types-ce933060.js → types-be952df2.js} +13 -13
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-8e1387db.js → useCategory-8f109eb7.js} +5 -5
- package/build/esm/{useHealthToolCache-28115f15.js → useHealthToolCache-d97dfa00.js} +2 -2
- package/build/esm/{useMantineLocale-bcfdeb0c.js → useMantineLocale-4fb67342.js} +3 -3
- package/build/esm/{usePlacesAutocomplete-837f491d.js → usePlacesAutocomplete-fe2e4cbe.js} +1 -1
- package/build/esm/{useTranslations-b8c49c9b.js → useTranslations-fbf6a6ab.js} +1 -1
- package/build/esm/{utils-86ef2283.js → utils-cef111b6.js} +1 -1
- package/build/esm/{defaultClassWrapper-fcdfc7a3.js → utils-d5a0b58f.js} +60 -408
- package/build/esm/vaccination.js +18 -29
- package/build/fixedBottomAdBlock-0d4379d1.js +3521 -0
- package/build/footer.js +18 -18
- package/build/gAssets.js +4 -4
- package/build/{getDynamicHealthTool-27b332df.js → getDynamicHealthTool-2a92e1a5.js} +4 -4
- package/build/{getSocialList-d16604ba.js → getSocialList-97e7bcc1.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-058b3c0f.js +1127 -0
- package/build/{index-e914bc7c.js → index-05f106c2.js} +1050 -1240
- package/build/index-06fa8444.js +102 -0
- package/build/{index-e932125b.js → index-1efa7d84.js} +2 -2
- package/build/index-247a9eb2.js +1693 -0
- package/build/{index-4f5ce9db.js → index-264eeddd.js} +2 -2
- package/build/index-3d0d22b3.js +565 -0
- package/build/index-3dcb9bc6.js +61 -0
- package/build/{index-aff82754.js → index-4af08ec2.js} +2 -2
- package/build/index-6acb08c0.js +343 -0
- package/build/{index-1b7f73fa.js → index-6bc3f8c3.js} +5 -5
- package/build/{index-a903fdaa.js → index-6c27b627.js} +58 -201
- package/build/index-73cde644.js +156 -0
- package/build/{index-65765b10.js → index-77a2b9ee.js} +1 -1
- package/build/{index-dbaa00eb.js → index-7c1dc717.js} +12 -11
- package/build/index-7da7b531.js +107 -0
- package/build/{index-8c04d412.js → index-838b0f95.js} +6 -6
- package/build/index-a7de42d1.js +202 -0
- package/build/{index-517f6538.js → index-a86ea1b6.js} +2 -2
- package/build/index-aa818139.js +49 -0
- package/build/{index-4cd9cc62.js → index-b773bc3d.js} +4 -4
- package/build/index-bef2bc73.js +136 -0
- package/build/{utils-120200ad.js → index-c225ef22.js} +76 -120
- package/build/{index-42621fec.js → index-c2900d8c.js} +2 -2
- package/build/index-cb0544e5.js +866 -0
- package/build/{index-5aac5fb6.js → index-d34cd464.js} +2 -2
- package/build/{index-4026b8c5.js → index-d5b4089d.js} +141 -68
- package/build/index-dba2e361.js +20 -0
- package/build/{index-586f0a4f.js → index-dcbd8bf3.js} +37 -9
- package/build/index-dd1392e3.js +167 -0
- package/build/{index-875d81d3.js → index-def9867a.js} +11 -10
- package/build/index-e0bf03ac.js +277 -0
- package/build/index-ee964d3c.js +209 -0
- package/build/index-f10efb61.js +270 -0
- package/build/{index-701c74a1.js → index-f1f4fbb9.js} +13 -12
- package/build/{index-27c71242.js → index-f28c47ce.js} +1 -13
- package/build/{index-e39f5b25.js → index-f6575703.js} +2 -2
- package/build/{index.styled-8c14cf6c.js → index-fe7345fa.js} +22 -4
- package/build/index.css +1 -1
- package/build/index.js +190 -174
- package/build/lead.js +29 -39
- package/build/logoIcon-ee9a5501.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-40d4f591.js → routing-f6d54205.js} +2 -2
- package/build/subot.js +113 -109
- package/build/surveyOrPremiumBanner.js +53 -0
- package/build/surveyQuestionCard.js +22 -0
- package/build/surveyThankyouCard-ead6b355.js +454 -0
- package/build/together.js +41 -43
- package/build/{types-692f1edc.js → types-4ba4268f.js} +49 -49
- package/build/{types-ade68559.js → types-6c5643a2.js} +203 -205
- package/build/types.js +1 -1
- package/build/{useCategory-bbe47716.js → useCategory-e2c91f59.js} +5 -5
- package/build/{useHealthToolCache-80cb8990.js → useHealthToolCache-2a53367b.js} +2 -2
- package/build/{useMantineLocale-97b962eb.js → useMantineLocale-a4f0c61d.js} +3 -3
- package/build/{usePlacesAutocomplete-99a452c0.js → usePlacesAutocomplete-c76d0caf.js} +1 -1
- package/build/{useTranslations-76f64595.js → useTranslations-200168a3.js} +1 -1
- package/build/{defaultClassWrapper-feaae206.js → utils-95d9832e.js} +68 -427
- package/build/{utils-dc4471cf.js → utils-af695515.js} +1 -1
- package/build/vaccination.js +58 -69
- package/package.json +1 -1
- package/build/Instagram-5735e971.js +0 -32
- package/build/esm/Instagram-98c713bc.js +0 -26
- package/build/esm/index-18a80466.js +0 -33
- package/build/esm/index-1f6890ad.js +0 -1086
- package/build/esm/index-40fc06d9.js +0 -298
- package/build/esm/index-47d01c08.js +0 -23
- package/build/esm/index-687f9ee4.js +0 -71
- package/build/esm/index-aeb4ceda.js +0 -7245
- package/build/esm/index.styles-bff4ac47.js +0 -1322
- package/build/index-561d71d9.js +0 -7324
- package/build/index-5ff91adf.js +0 -39
- package/build/index-74b64958.js +0 -77
- package/build/index-84f7ce80.js +0 -30
- package/build/index-c9e324de.js +0 -1100
- package/build/index.styles-61201019.js +0 -1361
- /package/build/{BMI_BOYS.percentile.monthly-b2166d34.js → BMI_BOYS.percentile.monthly-71fb1c9f.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-8b80b329.js → BMI_BOYS.percentile.weekly-b2b344a7.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-233e699b.js → BMI_BOYS.percentile.yearly-031ddade.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-17ed8572.js → BMI_BOYS.zscore.monthly-bb1f9962.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-36c9735b.js → BMI_BOYS.zscore.weekly-d6198d53.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-e43d7246.js → BMI_BOYS.zscore.yearly-48255337.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-94ddebb1.js → BMI_GIRLS.percentile.monthly-e3e284ee.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-dc53474b.js → BMI_GIRLS.percentile.weekly-9f2d3977.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-897e47f7.js → BMI_GIRLS.percentile.yearly-c79f34ce.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-44dcd046.js → BMI_GIRLS.zscore.monthly-11092df0.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-6e9400e5.js → BMI_GIRLS.zscore.weekly-5c375d2b.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-3cd8c63d.js → BMI_GIRLS.zscore.yearly-adbba8e3.js} +0 -0
- /package/build/{ChevronDown-2775b53a.js → ChevronDown-f7e25d61.js} +0 -0
- /package/build/{Close-f419724f.js → Close-36b0da99.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-35ed4380.js → HEAD CIRCUM_BOYS.percentile.monthly-163b99ad.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-c7dc736d.js → HEAD CIRCUM_BOYS.percentile.weekly-c9882014.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-4c3b2318.js → HEAD CIRCUM_BOYS.percentile.yearly-9d2bc91e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-1f1cc8dd.js → HEAD CIRCUM_BOYS.zscore.monthly-1d2a215c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-67593063.js → HEAD CIRCUM_BOYS.zscore.weekly-1f139c91.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-197c548c.js → HEAD CIRCUM_BOYS.zscore.yearly-ba15501b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-47029e7a.js → HEAD CIRCUM_GIRLS.percentile.monthly-a546201a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-faf6b122.js → HEAD CIRCUM_GIRLS.percentile.weekly-66cd5a7e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-f79cdc09.js → HEAD CIRCUM_GIRLS.percentile.yearly-9db3c653.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-329fc5a0.js → HEAD CIRCUM_GIRLS.zscore.monthly-0405e2cb.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-aa73a5d6.js → HEAD CIRCUM_GIRLS.zscore.weekly-b2cc3ad2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-5fdab08f.js → HEAD CIRCUM_GIRLS.zscore.yearly-3115f993.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-190579ee.js → HEIGHT_BOYS.percentile.monthly-35138a98.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-d902f59f.js → HEIGHT_BOYS.percentile.weekly-0216c35b.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-87254461.js → HEIGHT_BOYS.percentile.yearly-f698e45d.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-c741a8bb.js → HEIGHT_BOYS.zscore.monthly-01195728.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-c0b2c6c0.js → HEIGHT_BOYS.zscore.weekly-993e9cf2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-1a506923.js → HEIGHT_BOYS.zscore.yearly-fee3ed69.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-9b2b4c93.js → HEIGHT_GIRLS.percentile.monthly-27b2474a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-5ddecf9a.js → HEIGHT_GIRLS.percentile.weekly-77bff236.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-fa289855.js → HEIGHT_GIRLS.percentile.yearly-6200a720.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-c9db2d0d.js → HEIGHT_GIRLS.zscore.monthly-94978e64.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-c38c0951.js → HEIGHT_GIRLS.zscore.weekly-7951beb1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-d78a2a93.js → HEIGHT_GIRLS.zscore.yearly-c2eca714.js} +0 -0
- /package/build/{Visible-34df6ee7.js → Visible-eee51ba6.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-7a5f3721.js → WEIGHT_BOYS.percentile.monthly-6a6f901b.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-d86f23fa.js → WEIGHT_BOYS.percentile.weekly-737fb867.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c154651c.js → WEIGHT_BOYS.percentile.yearly-7772b5e5.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-8f39952a.js → WEIGHT_BOYS.zscore.monthly-8db2e7d6.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-3118363f.js → WEIGHT_BOYS.zscore.weekly-ddd37c1a.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-d463cfe7.js → WEIGHT_BOYS.zscore.yearly-332a8f7b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-4d025f09.js → WEIGHT_GIRLS.percentile.monthly-3edad688.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-89f1f560.js → WEIGHT_GIRLS.percentile.weekly-f113a82a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-e79630f6.js → WEIGHT_GIRLS.percentile.yearly-95afbeaf.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-64bd7db5.js → WEIGHT_GIRLS.zscore.monthly-d27c4bd4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-628674eb.js → WEIGHT_GIRLS.zscore.weekly-2b113519.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-5bb1b712.js → WEIGHT_GIRLS.zscore.yearly-c82b04db.js} +0 -0
- /package/build/{animation-21a29164.js → animation-e1375a3b.js} +0 -0
- /package/build/{cart-cd1f9e9e.js → cart-67147d06.js} +0 -0
- /package/build/{cookieHelper-6fd4e238.js → cookieHelper-17491ce8.js} +0 -0
- /package/build/{doctor-15fac518.js → doctor-17b525f8.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-bc430a4a.js → BMI_BOYS.percentile.monthly-7c9d4923.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-404f8241.js → BMI_BOYS.percentile.weekly-c410294a.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-cc6a1393.js → BMI_BOYS.percentile.yearly-695a4fe2.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-e94926d8.js → BMI_BOYS.zscore.monthly-9fb9f281.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-8d1da103.js → BMI_BOYS.zscore.weekly-d2109e4b.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-94f8b37e.js → BMI_BOYS.zscore.yearly-bfa5361b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-356bd71d.js → BMI_GIRLS.percentile.monthly-f5f60596.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-72979d47.js → BMI_GIRLS.percentile.weekly-26e4e864.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-729c84f5.js → BMI_GIRLS.percentile.yearly-5a2b297d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-6dea8018.js → BMI_GIRLS.zscore.monthly-4e80bed5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-da7a5d01.js → BMI_GIRLS.zscore.weekly-03b79f0b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-0b0a5cae.js → BMI_GIRLS.zscore.yearly-822ed949.js} +0 -0
- /package/build/esm/{ChevronDown-5f18ca6b.js → ChevronDown-74267eb8.js} +0 -0
- /package/build/esm/{Close-87c65991.js → Close-372aa467.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-1c910c23.js → HEAD CIRCUM_BOYS.percentile.monthly-21b04c4c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-2da702f0.js → HEAD CIRCUM_BOYS.percentile.weekly-049a9d97.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-9fbeb684.js → HEAD CIRCUM_BOYS.percentile.yearly-a4bbbaba.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-c93df36e.js → HEAD CIRCUM_BOYS.zscore.monthly-7cb348c6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-930f82b2.js → HEAD CIRCUM_BOYS.zscore.weekly-678a1a52.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-f7523042.js → HEAD CIRCUM_BOYS.zscore.yearly-db81b17e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-d93ddef7.js → HEAD CIRCUM_GIRLS.percentile.monthly-cee33cd5.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-2c7db258.js → HEAD CIRCUM_GIRLS.percentile.weekly-2cec19c3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-07202ee1.js → HEAD CIRCUM_GIRLS.percentile.yearly-5949e664.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-fafa785c.js → HEAD CIRCUM_GIRLS.zscore.monthly-7c2bffab.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-28b41bdb.js → HEAD CIRCUM_GIRLS.zscore.weekly-356dd00a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-c5b3bc8b.js → HEAD CIRCUM_GIRLS.zscore.yearly-e7b62215.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-0a092d31.js → HEIGHT_BOYS.percentile.monthly-359c4335.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-5827b445.js → HEIGHT_BOYS.percentile.weekly-a4d4acd3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-b88283c2.js → HEIGHT_BOYS.percentile.yearly-ec9a7f9b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-d275f074.js → HEIGHT_BOYS.zscore.monthly-12331258.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-20bbf392.js → HEIGHT_BOYS.zscore.weekly-172054d3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-2eea3a9c.js → HEIGHT_BOYS.zscore.yearly-bb47a3be.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-9ad65492.js → HEIGHT_GIRLS.percentile.monthly-c93c0b34.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-898065d3.js → HEIGHT_GIRLS.percentile.weekly-f1f83097.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ac5ceb79.js → HEIGHT_GIRLS.percentile.yearly-ccee4e55.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-327bdfa5.js → HEIGHT_GIRLS.zscore.monthly-caf5410c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-e25ddbc7.js → HEIGHT_GIRLS.zscore.weekly-b1e28b0e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-5531c2e3.js → HEIGHT_GIRLS.zscore.yearly-c3af35d3.js} +0 -0
- /package/build/esm/{Visible-70c720bb.js → Visible-3f9d7dca.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-e199416b.js → WEIGHT_BOYS.percentile.monthly-8a4647df.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-0965076a.js → WEIGHT_BOYS.percentile.weekly-a2a6adf1.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-d04404d7.js → WEIGHT_BOYS.percentile.yearly-073df8b7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-be1ae0cd.js → WEIGHT_BOYS.zscore.monthly-bb9e73d2.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-8b6854c4.js → WEIGHT_BOYS.zscore.weekly-ef32ce7a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-bd90b96f.js → WEIGHT_BOYS.zscore.yearly-6cc77688.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-a4bb8428.js → WEIGHT_GIRLS.percentile.monthly-a4b518bc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-c288d810.js → WEIGHT_GIRLS.percentile.weekly-dcedaebb.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-73a5ae07.js → WEIGHT_GIRLS.percentile.yearly-9e66577e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-cbcfdab4.js → WEIGHT_GIRLS.zscore.monthly-c07cb81f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-185ff336.js → WEIGHT_GIRLS.zscore.weekly-9c5c3e8e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-c31a0aee.js → WEIGHT_GIRLS.zscore.yearly-e99ce511.js} +0 -0
- /package/build/esm/{animation-9a3ca482.js → animation-0b2299dc.js} +0 -0
- /package/build/esm/{cart-5f758c33.js → cart-f961dadc.js} +0 -0
- /package/build/esm/{cookieHelper-9c963e09.js → cookieHelper-73ce3871.js} +0 -0
- /package/build/esm/{doctor-1d62f054.js → doctor-8a07ca44.js} +0 -0
- /package/build/esm/{index-931414db.js → index-782fed08.js} +0 -0
- /package/build/esm/{index-4687d5f8.js → index-b65a8764.js} +0 -0
- /package/build/esm/{index-90e772e4.js → index-c3264b34.js} +0 -0
- /package/build/esm/{index-877eed06.js → index-e3787b20.js} +0 -0
- /package/build/esm/{isProduction-d39b7ab2.js → isProduction-5684a28c.js} +0 -0
- /package/build/esm/{localizeNumberFormat-f838842a.js → localizeNumberFormat-42ae8d89.js} +0 -0
- /package/build/esm/{normalizeLink-65565106.js → normalizeLink-d6f57223.js} +0 -0
- /package/build/esm/{number-cad310d0.js → number-13f075cf.js} +0 -0
- /package/build/esm/{paths-8fc18a86.js → paths-49a813e7.js} +0 -0
- /package/build/esm/{theme-eb1b39f6.js → theme-f18c2351.js} +0 -0
- /package/build/esm/{translationsContext-dfb42bf8.js → translationsContext-f3d1a7bd.js} +0 -0
- /package/build/esm/{tslib.es6-efad16cf.js → tslib.es6-761239c7.js} +0 -0
- /package/build/esm/{useIsInit-f341c0e8.js → useIsInit-ee864235.js} +0 -0
- /package/build/esm/{useOutsideClick-e10b28ce.js → useOutsideClick-7451aa57.js} +0 -0
- /package/build/esm/{useScrollbarSize-594c61c3.js → useScrollbarSize-84bb5b47.js} +0 -0
- /package/build/esm/{useUniqueId-d5f7586b.js → useUniqueId-c23213b6.js} +0 -0
- /package/build/esm/{utils-0d590d5e.js → utils-f8761b9d.js} +0 -0
- /package/build/{index-d54d6c50.js → index-97ebd7e1.js} +0 -0
- /package/build/{index-d8c60733.js → index-ba3797bb.js} +0 -0
- /package/build/{index-d628859e.js → index-bba97c2e.js} +0 -0
- /package/build/{index-0b957c10.js → index-df5cd44b.js} +0 -0
- /package/build/{isProduction-7f7f09ad.js → isProduction-aa963bf9.js} +0 -0
- /package/build/{localizeNumberFormat-011e6f65.js → localizeNumberFormat-90d4f9d5.js} +0 -0
- /package/build/{normalizeLink-23b10200.js → normalizeLink-451ae6d8.js} +0 -0
- /package/build/{number-249e0e0b.js → number-c2338382.js} +0 -0
- /package/build/{paths-02f54499.js → paths-e0bbfce7.js} +0 -0
- /package/build/{theme-416e0fd4.js → theme-e4f7f487.js} +0 -0
- /package/build/{translationsContext-6f3c14ea.js → translationsContext-39528d2f.js} +0 -0
- /package/build/{tslib.es6-dd1fc8f2.js → tslib.es6-7e140b89.js} +0 -0
- /package/build/{useIsInit-bb64ffbf.js → useIsInit-38cec0c4.js} +0 -0
- /package/build/{useOutsideClick-bd35bba1.js → useOutsideClick-e579e1ac.js} +0 -0
- /package/build/{useScrollbarSize-57b0fd8a.js → useScrollbarSize-5a8be010.js} +0 -0
- /package/build/{useUniqueId-4bafae28.js → useUniqueId-8929fe5f.js} +0 -0
- /package/build/{utils-3a589c92.js → utils-524bda7c.js} +0 -0
|
@@ -1,51 +1,49 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var index$1 = require('./index-
|
|
5
|
-
require('./translationsContext-
|
|
4
|
+
var index$1 = require('./index-d34cd464.js');
|
|
5
|
+
require('./translationsContext-39528d2f.js');
|
|
6
6
|
require('string-format');
|
|
7
|
-
var
|
|
8
|
-
var tslib_es6 = require('./tslib.es6-
|
|
7
|
+
var utils = require('./utils-95d9832e.js');
|
|
8
|
+
var tslib_es6 = require('./tslib.es6-7e140b89.js');
|
|
9
9
|
var other = require('@hhgtech/icons/other');
|
|
10
10
|
var core = require('@mantine/core');
|
|
11
|
-
var index$d = require('./index-
|
|
12
|
-
var useTranslations = require('./useTranslations-
|
|
11
|
+
var index$d = require('./index-77a2b9ee.js');
|
|
12
|
+
var useTranslations = require('./useTranslations-200168a3.js');
|
|
13
13
|
var innertext = require('innertext');
|
|
14
|
-
var theme = require('./theme-
|
|
15
|
-
var index$9 = require('./index-
|
|
14
|
+
var theme = require('./theme-e4f7f487.js');
|
|
15
|
+
var index$9 = require('./index-05f106c2.js');
|
|
16
16
|
require('@mantine/dates');
|
|
17
|
-
var index$4 = require('./index-
|
|
18
|
-
var index$5 = require('./index-
|
|
19
|
-
var index$a = require('./index-
|
|
20
|
-
require('./useMantineLocale-
|
|
17
|
+
var index$4 = require('./index-a86ea1b6.js');
|
|
18
|
+
var index$5 = require('./index-df5cd44b.js');
|
|
19
|
+
var index$a = require('./index-1efa7d84.js');
|
|
20
|
+
require('./useMantineLocale-a4f0c61d.js');
|
|
21
|
+
var index$e = require('./index-a7de42d1.js');
|
|
21
22
|
require('@mantine/hooks');
|
|
22
|
-
var utils = require('./utils-
|
|
23
|
-
var index$8 = require('./index-
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
var utils$1 = require('./utils-524bda7c.js');
|
|
24
|
+
var index$8 = require('./index-d5b4089d.js');
|
|
25
|
+
var dataTransform = require('./dataTransform-6b4d7a4e.js');
|
|
26
|
+
var constants = require('./constants-513a9a41.js');
|
|
27
|
+
var index$c = require('./index-dd1392e3.js');
|
|
26
28
|
var debounce = require('lodash/debounce');
|
|
27
29
|
var ContentEditable = require('react-contenteditable');
|
|
28
30
|
var core$1 = require('@hhgtech/icons/core');
|
|
29
|
-
var index$6 = require('./index-
|
|
30
|
-
var index$2 = require('./index-
|
|
31
|
-
var cookieHelper = require('./cookieHelper-
|
|
31
|
+
var index$6 = require('./index-c2900d8c.js');
|
|
32
|
+
var index$2 = require('./index-4af08ec2.js');
|
|
33
|
+
var cookieHelper = require('./cookieHelper-17491ce8.js');
|
|
32
34
|
var ReactDOM = require('react-dom');
|
|
33
35
|
var styled = require('@emotion/styled');
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
+
var defaultClassWrapper = require('./defaultClassWrapper-e87ca8ef.js');
|
|
37
|
+
var index$3 = require('./index-dcbd8bf3.js');
|
|
38
|
+
var number = require('./number-c2338382.js');
|
|
36
39
|
var dateFns = require('date-fns');
|
|
37
40
|
var dayjs = require('dayjs');
|
|
38
41
|
var relativeTime = require('dayjs/plugin/relativeTime');
|
|
42
|
+
var index$7 = require('./index-3dcb9bc6.js');
|
|
39
43
|
var react = require('@emotion/react');
|
|
40
|
-
var index$b = require('./index-
|
|
41
|
-
var useUniqueId = require('./useUniqueId-
|
|
42
|
-
var routing = require('./routing-
|
|
43
|
-
require('./index.styles-61201019.js');
|
|
44
|
-
require('./index-6036e2a0.js');
|
|
45
|
-
require('./utils-120200ad.js');
|
|
46
|
-
require('./index-aefa01a7.js');
|
|
47
|
-
require('./index.styled-8c14cf6c.js');
|
|
48
|
-
require('./index-d54d6c50.js');
|
|
44
|
+
var index$b = require('./index-264eeddd.js');
|
|
45
|
+
var useUniqueId = require('./useUniqueId-8929fe5f.js');
|
|
46
|
+
var routing = require('./routing-f6d54205.js');
|
|
49
47
|
|
|
50
48
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
51
49
|
|
|
@@ -83,7 +81,7 @@ const TogetherAuthConfigContextProvider = ({ children, defaultParams, }) => {
|
|
|
83
81
|
} }, children));
|
|
84
82
|
};
|
|
85
83
|
const useTogetherAuthRequiredAction = (propsParams) => {
|
|
86
|
-
const { data: { userInfo, env: { togetherBasePath }, }, } = React.useContext(
|
|
84
|
+
const { data: { userInfo, env: { togetherBasePath }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
87
85
|
const { defaultParams } = React.useContext(TogetherAuthConfigContext) || {};
|
|
88
86
|
const isLoggedIn = userInfo === null || userInfo === void 0 ? void 0 : userInfo.id;
|
|
89
87
|
const isFirstInteract = userInfo &&
|
|
@@ -93,7 +91,7 @@ const useTogetherAuthRequiredAction = (propsParams) => {
|
|
|
93
91
|
const params = Object.assign(Object.assign(Object.assign({}, defaultParams), propsParams), extraParams);
|
|
94
92
|
if (!isLoggedIn || isFirstInteract) {
|
|
95
93
|
if (!isLoggedIn) {
|
|
96
|
-
cookieHelper.deleteCookie(
|
|
94
|
+
cookieHelper.deleteCookie(constants.BEARER_TOKEN_COOKIE);
|
|
97
95
|
}
|
|
98
96
|
if (params === null || params === void 0 ? void 0 : params._joinCommunityIds) {
|
|
99
97
|
localStorage.setItem('to_join_community_ids', JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem('to_join_community_ids') || '[]') || [])
|
|
@@ -109,7 +107,7 @@ const useTogetherAuthRequiredAction = (propsParams) => {
|
|
|
109
107
|
}
|
|
110
108
|
const currentLocation = (params === null || params === void 0 ? void 0 : params._location) || window.location.href;
|
|
111
109
|
params === null || params === void 0 ? true : delete params._location;
|
|
112
|
-
window.location.href =
|
|
110
|
+
window.location.href = utils.getUrlToSignUp(currentLocation, params, togetherBasePath);
|
|
113
111
|
return null;
|
|
114
112
|
}
|
|
115
113
|
else {
|
|
@@ -185,7 +183,7 @@ const StyledCardLink = styled__default["default"].div `
|
|
|
185
183
|
`;
|
|
186
184
|
|
|
187
185
|
const CardLink = ({ title, url, image, logo, className, style, noRefetch, }) => {
|
|
188
|
-
const { data: { locale, env: { isMarryBaby }, }, } = React.useContext(
|
|
186
|
+
const { data: { locale, env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
189
187
|
const [hideLogo, setHideLogo] = React.useState(false);
|
|
190
188
|
const _theme = core.useMantineTheme();
|
|
191
189
|
const noRefetchRef = React.useRef(noRefetch);
|
|
@@ -198,7 +196,7 @@ const CardLink = ({ title, url, image, logo, className, style, noRefetch, }) =>
|
|
|
198
196
|
if (!url)
|
|
199
197
|
return setPreviewData(null);
|
|
200
198
|
setPreviewData((_data) => (Object.assign(Object.assign({}, _data), { isFetching: true })));
|
|
201
|
-
|
|
199
|
+
utils.callApi(utils.getApiPath(utils.PATHS.FETCH_PREVIEW, {
|
|
202
200
|
_locale: locale,
|
|
203
201
|
}), 'POST', {
|
|
204
202
|
data: {
|
|
@@ -239,13 +237,13 @@ const CardLink = ({ title, url, image, logo, className, style, noRefetch, }) =>
|
|
|
239
237
|
!isMarryBaby && (React__default["default"].createElement("img", { className: "link-image-blur", src: displayImage, onError: (e) => {
|
|
240
238
|
if (!showDefaultRef.current) {
|
|
241
239
|
showDefaultRef.current = true;
|
|
242
|
-
e.currentTarget.src =
|
|
240
|
+
e.currentTarget.src = constants.DEFAULT_IMG;
|
|
243
241
|
}
|
|
244
242
|
}, loading: "lazy" })),
|
|
245
243
|
React__default["default"].createElement("img", { className: "link-image", src: displayImage, onError: (e) => {
|
|
246
244
|
if (!showDefaultRef.current) {
|
|
247
245
|
showDefaultRef.current = true;
|
|
248
|
-
e.currentTarget.src =
|
|
246
|
+
e.currentTarget.src = constants.DEFAULT_IMG;
|
|
249
247
|
}
|
|
250
248
|
}, loading: "lazy" }))),
|
|
251
249
|
React__default["default"].createElement("div", { className: "link-info-container" },
|
|
@@ -292,7 +290,7 @@ var CardReactionType;
|
|
|
292
290
|
})(CardReactionType || (CardReactionType = {}));
|
|
293
291
|
const CardReactions = (_a) => {
|
|
294
292
|
var { type, viewCount, loveCount = 0, replyCount = 0, replyPadding, liked, isReplied, onCommentClick, onLikeClick, onShareClick, className, style, hideCommentIcon, showingMostEngaging, isMarryBaby: isMarryBabyInit, hasShare = true, hasCountLike = true, trackingCategory = 'Together', trackingLabel = '', children } = _a, rest = tslib_es6.__rest(_a, ["type", "viewCount", "loveCount", "replyCount", "replyPadding", "liked", "isReplied", "onCommentClick", "onLikeClick", "onShareClick", "className", "style", "hideCommentIcon", "showingMostEngaging", "isMarryBaby", "hasShare", "hasCountLike", "trackingCategory", "trackingLabel", "children"]);
|
|
295
|
-
const { data: { env: { isMarryBaby: isMarryBabyEnv }, }, } = React.useContext(
|
|
293
|
+
const { data: { env: { isMarryBaby: isMarryBabyEnv }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
296
294
|
const isMarryBaby = Boolean(isMarryBabyInit)
|
|
297
295
|
? isMarryBabyInit
|
|
298
296
|
: isMarryBabyEnv;
|
|
@@ -372,7 +370,7 @@ const TagTopic = (_a) => {
|
|
|
372
370
|
styles,
|
|
373
371
|
unstyled,
|
|
374
372
|
});
|
|
375
|
-
const { data: { env: { togetherBasePath }, }, action: { sanitizeFunction }, } = React.useContext(
|
|
373
|
+
const { data: { env: { togetherBasePath }, }, action: { sanitizeFunction }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
376
374
|
const [showAll, setShowAll] = React.useState(!shortenedStyle);
|
|
377
375
|
return (React__default["default"].createElement("div", Object.assign({ onClick: onClick, className: `${classes.wrapper} ${className}`, style: style }, rest),
|
|
378
376
|
(showAll ? topics : topics.slice(0, shortenedNumber)).map((topic, index) => {
|
|
@@ -380,7 +378,7 @@ const TagTopic = (_a) => {
|
|
|
380
378
|
(topic === null || topic === void 0 ? void 0 : topic.dueDateMonth) !== 0 &&
|
|
381
379
|
(topic === null || topic === void 0 ? void 0 : topic.dueDateYear) &&
|
|
382
380
|
(topic === null || topic === void 0 ? void 0 : topic.dueDateYear) !== 0;
|
|
383
|
-
return (React__default["default"].createElement("a", { className: classes.item, key: index, "data-event-category": trackingCategory, "data-event-action": "Topic in Post Click", "data-event-label": `${
|
|
381
|
+
return (React__default["default"].createElement("a", { className: classes.item, key: index, "data-event-category": trackingCategory, "data-event-action": "Topic in Post Click", "data-event-label": `${utils.getCurrentBaseUrl(locale)}${togetherBasePath}${topic.url}`, href: topic.isActive && !topic.isHidden
|
|
384
382
|
? `${togetherBasePath}${topic.url}/`
|
|
385
383
|
: undefined },
|
|
386
384
|
React__default["default"].createElement(index$1.Text, { size: "p4" },
|
|
@@ -472,7 +470,7 @@ const StyledLabelSortPin = styled__default["default"].div `
|
|
|
472
470
|
}
|
|
473
471
|
}
|
|
474
472
|
&.label-sorting {
|
|
475
|
-
${utils.MediaQueries.tdUp} {
|
|
473
|
+
${utils$1.MediaQueries.tdUp} {
|
|
476
474
|
padding-bottom: 1.5rem;
|
|
477
475
|
margin-bottom: -0.75rem;
|
|
478
476
|
}
|
|
@@ -481,7 +479,7 @@ const StyledLabelSortPin = styled__default["default"].div `
|
|
|
481
479
|
`;
|
|
482
480
|
|
|
483
481
|
const LabelSortPin = ({ label, rightLabel, onClick, color, className, style, }) => {
|
|
484
|
-
const { data: { env: { isMarryBaby }, }, } = React.useContext(
|
|
482
|
+
const { data: { env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
485
483
|
return (React__default["default"].createElement(StyledLabelSortPin, { "data-is-marrybaby": isMarryBaby, "data-color": color, onClick: onClick, className: className, style: style },
|
|
486
484
|
React__default["default"].createElement(index$1.Text, { className: "label-sort-pin-heading", size: isMarryBaby ? 'p4' : 'p3', weight: "bold" }, label),
|
|
487
485
|
rightLabel));
|
|
@@ -494,7 +492,7 @@ var img$G = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width=
|
|
|
494
492
|
var IconPinYellow = img$G;
|
|
495
493
|
|
|
496
494
|
const LabelPin = ({ onClick, color, className, style }) => {
|
|
497
|
-
const { data: { env: { isMarryBaby }, }, } = React.useContext(
|
|
495
|
+
const { data: { env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
498
496
|
const { t } = useTranslations.useTranslations();
|
|
499
497
|
return (React__default["default"].createElement(LabelSortPin, { label: React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
500
498
|
isMarryBaby && (React__default["default"].createElement("img", { className: "label-sort-pin-icon", src: MBPinOrange, loading: "lazy" })),
|
|
@@ -818,7 +816,7 @@ const StyledTree = styled__default["default"].div `
|
|
|
818
816
|
`;
|
|
819
817
|
|
|
820
818
|
const PopoverMenu = ({ className, style, toggleButtonContent, position = 'bottom', align = 'end', children, buttonProps, }) => {
|
|
821
|
-
const { data: { env: { isMarryBaby }, }, } = React.useContext(
|
|
819
|
+
const { data: { env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
822
820
|
const [isShow, setIsShow] = React.useState(false);
|
|
823
821
|
const popoverContent = React.useRef(null);
|
|
824
822
|
const isShowRef = React.useRef(isShow);
|
|
@@ -919,7 +917,7 @@ var LabelSortingValue;
|
|
|
919
917
|
LabelSortingValue["popular"] = "popular";
|
|
920
918
|
})(LabelSortingValue || (LabelSortingValue = {}));
|
|
921
919
|
const LabelSorting = ({ onChange, className, style, leftLabel, rightLabel, color, value, choices, }) => {
|
|
922
|
-
const { data: { env: { isMarryBaby }, }, } = React.useContext(
|
|
920
|
+
const { data: { env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
923
921
|
return (React__default["default"].createElement(LabelSortPin, { label: leftLabel, rightLabel: React__default["default"].createElement(TreePopoverMenu, { position: "bottom", align: "end", data: {
|
|
924
922
|
isShowheader: false,
|
|
925
923
|
type: 'list',
|
|
@@ -1030,7 +1028,7 @@ const StyledPopup$2 = styled__default["default"].div `
|
|
|
1030
1028
|
transform: translate(-50%, -50%);
|
|
1031
1029
|
transition: all 0.5s ease-in-out;
|
|
1032
1030
|
|
|
1033
|
-
${utils.MediaQueries.tdUp} {
|
|
1031
|
+
${utils$1.MediaQueries.tdUp} {
|
|
1034
1032
|
width: 750px;
|
|
1035
1033
|
}
|
|
1036
1034
|
|
|
@@ -1050,7 +1048,7 @@ const StyledPopup$2 = styled__default["default"].div `
|
|
|
1050
1048
|
}
|
|
1051
1049
|
|
|
1052
1050
|
.popup-content {
|
|
1053
|
-
${utils.MediaQueries.mbDown} {
|
|
1051
|
+
${utils$1.MediaQueries.mbDown} {
|
|
1054
1052
|
display: block;
|
|
1055
1053
|
}
|
|
1056
1054
|
display: flex;
|
|
@@ -1235,9 +1233,9 @@ const PopupDoctor = ({ isOpen = true, onClose, enableAnimation = true, doctorId,
|
|
|
1235
1233
|
setIsLoading(true);
|
|
1236
1234
|
try {
|
|
1237
1235
|
setDoctorInfo(null);
|
|
1238
|
-
|
|
1236
|
+
utils.callApi(utils.getCarePath(utils.CARE_PATHS.GET_DOCTOR_INFO, {
|
|
1239
1237
|
doctorId: doctorId,
|
|
1240
|
-
website_url:
|
|
1238
|
+
website_url: utils.domainLocales[locale],
|
|
1241
1239
|
}), 'get').then((res) => {
|
|
1242
1240
|
setDoctorInfo(Object.assign(Object.assign({}, res === null || res === void 0 ? void 0 : res._data.doctor), overwriteProfileProps));
|
|
1243
1241
|
});
|
|
@@ -1291,7 +1289,7 @@ const PopupDoctor = ({ isOpen = true, onClose, enableAnimation = true, doctorId,
|
|
|
1291
1289
|
React__default["default"].createElement(index$1.Text, { size: "p4", color: theme.theme.colors.gray800 },
|
|
1292
1290
|
specialtiesList,
|
|
1293
1291
|
' • '))),
|
|
1294
|
-
React__default["default"].createElement("a", { href:
|
|
1292
|
+
React__default["default"].createElement("a", { href: utils.getCareHospitalUrl({
|
|
1295
1293
|
id: (_a = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _a === void 0 ? void 0 : _a.id,
|
|
1296
1294
|
name: (_b = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _b === void 0 ? void 0 : _b.name,
|
|
1297
1295
|
slug: (_c = doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization) === null || _c === void 0 ? void 0 : _c.slug,
|
|
@@ -1299,7 +1297,7 @@ const PopupDoctor = ({ isOpen = true, onClose, enableAnimation = true, doctorId,
|
|
|
1299
1297
|
}), className: "organisation", target: "_blank", rel: "noreferrer" },
|
|
1300
1298
|
React__default["default"].createElement(index$1.Text, { size: "p4", className: "organisation", color: theme.theme.colors.gray800, style: { textDecoration: 'underline' } }, doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.organization.name))))),
|
|
1301
1299
|
!isMobile && (React__default["default"].createElement("div", { className: "btn-wrapper" },
|
|
1302
|
-
React__default["default"].createElement("a", { href:
|
|
1300
|
+
React__default["default"].createElement("a", { href: utils.getCareDoctorUrl({
|
|
1303
1301
|
name: doctorInfo.name,
|
|
1304
1302
|
id: doctorInfo.id,
|
|
1305
1303
|
locale: locale,
|
|
@@ -1311,18 +1309,18 @@ const PopupDoctor = ({ isOpen = true, onClose, enableAnimation = true, doctorId,
|
|
|
1311
1309
|
React__default["default"].createElement(StyledExperienceList, null, formattedExperiences.map((experience, i) => (React__default["default"].createElement("li", { key: i },
|
|
1312
1310
|
React__default["default"].createElement(index$1.Text, { size: "p2" }, renderExperienceText(experience)))))),
|
|
1313
1311
|
isMobile ? (React__default["default"].createElement("div", { className: "btn-wrapper" },
|
|
1314
|
-
React__default["default"].createElement("a", { href:
|
|
1312
|
+
React__default["default"].createElement("a", { href: utils.getCareDoctorUrl({
|
|
1315
1313
|
name: doctorInfo.name,
|
|
1316
1314
|
id: doctorInfo.id,
|
|
1317
1315
|
locale: locale,
|
|
1318
1316
|
}) },
|
|
1319
|
-
React__default["default"].createElement(index$6.Button, { color: "primary", size: "md", className: "btn-booking" }, t('careBooking.bookAnAppointment'))))) : (React__default["default"].createElement("a", { href:
|
|
1317
|
+
React__default["default"].createElement(index$6.Button, { color: "primary", size: "md", className: "btn-booking" }, t('careBooking.bookAnAppointment'))))) : (React__default["default"].createElement("a", { href: utils.getCareDoctorUrl({
|
|
1320
1318
|
name: doctorInfo.name,
|
|
1321
1319
|
id: doctorInfo.id,
|
|
1322
1320
|
locale: locale,
|
|
1323
1321
|
}) },
|
|
1324
|
-
React__default["default"].createElement(index$1.Text, { size: "s4", color: "#2D87F3", style: { paddingTop: 24 }, "data-event-category": trackingCategory, "data-event-action": "See Full Doctor Profile", "data-event-label":
|
|
1325
|
-
|
|
1322
|
+
React__default["default"].createElement(index$1.Text, { size: "s4", color: "#2D87F3", style: { paddingTop: 24 }, "data-event-category": trackingCategory, "data-event-action": "See Full Doctor Profile", "data-event-label": utils.getCurrentBaseUrl(locale) +
|
|
1323
|
+
utils.getCareDoctorUrl({
|
|
1326
1324
|
name: doctorInfo.name,
|
|
1327
1325
|
id: doctorInfo.id,
|
|
1328
1326
|
locale: locale,
|
|
@@ -1343,7 +1341,7 @@ const StyledPopup$1 = styled__default["default"].div `
|
|
|
1343
1341
|
transform: translate(-50%, -50%);
|
|
1344
1342
|
transition: all 0.5s ease-in-out;
|
|
1345
1343
|
|
|
1346
|
-
${utils.MediaQueries.tdUp} {
|
|
1344
|
+
${utils$1.MediaQueries.tdUp} {
|
|
1347
1345
|
width: 750px;
|
|
1348
1346
|
}
|
|
1349
1347
|
|
|
@@ -1363,7 +1361,7 @@ const StyledPopup$1 = styled__default["default"].div `
|
|
|
1363
1361
|
}
|
|
1364
1362
|
|
|
1365
1363
|
.popup-content {
|
|
1366
|
-
${utils.MediaQueries.mbDown} {
|
|
1364
|
+
${utils$1.MediaQueries.mbDown} {
|
|
1367
1365
|
display: block;
|
|
1368
1366
|
}
|
|
1369
1367
|
display: flex;
|
|
@@ -1516,7 +1514,7 @@ const PopupExpert = ({ trackingCategory = 'Together', locale, isOpen = true, onC
|
|
|
1516
1514
|
setIsLoading(true);
|
|
1517
1515
|
try {
|
|
1518
1516
|
setExpertInfo(null);
|
|
1519
|
-
|
|
1517
|
+
utils.callApi(utils.getDiscoverApiPath(utils.DISCOVER_PATHS.GET_EXPERT_BY_ID, {
|
|
1520
1518
|
id: expertId,
|
|
1521
1519
|
}), 'get').then((res) => {
|
|
1522
1520
|
setExpertInfo(Object.assign(Object.assign({}, res === null || res === void 0 ? void 0 : res.data), overwriteProfileProps));
|
|
@@ -1562,7 +1560,7 @@ const PopupExpert = ({ trackingCategory = 'Together', locale, isOpen = true, onC
|
|
|
1562
1560
|
React__default["default"].createElement(index$1.Text, { size: "p2", color: theme.theme.colors.gray500 }, experience === null || experience === void 0 ? void 0 : experience.organization)))))
|
|
1563
1561
|
: false),
|
|
1564
1562
|
React__default["default"].createElement("a", { href: expertInfo === null || expertInfo === void 0 ? void 0 : expertInfo.profile_url, style: { display: 'inline-block', paddingTop: 24 } },
|
|
1565
|
-
React__default["default"].createElement(index$1.Text, { as: "span", size: "s4", color: "#2D87F3", "data-event-category": trackingCategory, "data-event-action": "See Full Doctor Profile", "data-event-label":
|
|
1563
|
+
React__default["default"].createElement(index$1.Text, { as: "span", size: "s4", color: "#2D87F3", "data-event-category": trackingCategory, "data-event-action": "See Full Doctor Profile", "data-event-label": utils.getCurrentBaseUrl(locale) + (expertInfo === null || expertInfo === void 0 ? void 0 : expertInfo.profile_url) }, t('home.seeExpert')))))))),
|
|
1566
1564
|
React__default["default"].createElement(StyledPopupWrapper$1, { "data-open": isOpen, onClick: (e) => {
|
|
1567
1565
|
e.stopPropagation();
|
|
1568
1566
|
onClose();
|
|
@@ -1579,7 +1577,7 @@ const StyledPopup = styled__default["default"].div `
|
|
|
1579
1577
|
transform: translate(-50%, -50%);
|
|
1580
1578
|
transition: all 0.5s ease-in-out;
|
|
1581
1579
|
|
|
1582
|
-
${utils.MediaQueries.tdUp} {
|
|
1580
|
+
${utils$1.MediaQueries.tdUp} {
|
|
1583
1581
|
width: 750px;
|
|
1584
1582
|
}
|
|
1585
1583
|
|
|
@@ -1599,7 +1597,7 @@ const StyledPopup = styled__default["default"].div `
|
|
|
1599
1597
|
}
|
|
1600
1598
|
|
|
1601
1599
|
.popup-content {
|
|
1602
|
-
${utils.MediaQueries.mbDown} {
|
|
1600
|
+
${utils$1.MediaQueries.mbDown} {
|
|
1603
1601
|
display: block;
|
|
1604
1602
|
}
|
|
1605
1603
|
display: flex;
|
|
@@ -1722,9 +1720,9 @@ const PopupHospital = ({ isOpen = true, onClose, enableAnimation = true, hospita
|
|
|
1722
1720
|
setIsLoading(true);
|
|
1723
1721
|
try {
|
|
1724
1722
|
setHospitalInfo(null);
|
|
1725
|
-
|
|
1723
|
+
utils.callApi(utils.getCarePath(utils.CARE_PATHS.GET_HOSPITAL_INFO, {
|
|
1726
1724
|
hospital_branch_id: hospitalId,
|
|
1727
|
-
website_url:
|
|
1725
|
+
website_url: utils.domainLocales[locale],
|
|
1728
1726
|
}), 'get').then((res) => {
|
|
1729
1727
|
setHospitalInfo(Object.assign(Object.assign({}, res === null || res === void 0 ? void 0 : res._data.branch), overwriteProfileProps));
|
|
1730
1728
|
});
|
|
@@ -1755,14 +1753,14 @@ const PopupHospital = ({ isOpen = true, onClose, enableAnimation = true, hospita
|
|
|
1755
1753
|
specialties && (React__default["default"].createElement(index$1.Text, { size: "p4", color: theme.theme.colors.gray800 },
|
|
1756
1754
|
formatSpecialties.join(' • '),
|
|
1757
1755
|
'•')),
|
|
1758
|
-
React__default["default"].createElement("a", { href:
|
|
1756
|
+
React__default["default"].createElement("a", { href: utils.getCareHospitalUrl({
|
|
1759
1757
|
id: hospitalInfo.id,
|
|
1760
1758
|
name: hospitalInfo.name,
|
|
1761
1759
|
slug: hospitalInfo.slug,
|
|
1762
1760
|
locale,
|
|
1763
1761
|
}), className: "organisation", target: "_blank", rel: "noreferrer" },
|
|
1764
1762
|
React__default["default"].createElement(index$1.Text, { size: "p4", className: "organisation", color: theme.theme.colors.gray800, style: { textDecoration: 'underline' } }, hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.name))))),
|
|
1765
|
-
!isMobile && (React__default["default"].createElement("a", { href:
|
|
1763
|
+
!isMobile && (React__default["default"].createElement("a", { href: utils.getCareHospitalUrl({
|
|
1766
1764
|
id: hospitalInfo.id,
|
|
1767
1765
|
name: hospitalInfo.name,
|
|
1768
1766
|
slug: hospitalInfo.slug,
|
|
@@ -1774,21 +1772,21 @@ const PopupHospital = ({ isOpen = true, onClose, enableAnimation = true, hospita
|
|
|
1774
1772
|
React__default["default"].createElement("div", { className: "experience" },
|
|
1775
1773
|
React__default["default"].createElement(index$1.Text, { weight: "bold", size: "s3", color: theme.theme.colors.gray800, style: { paddingBottom: 16 } }, t('hospital.content.description').toUpperCase()),
|
|
1776
1774
|
React__default["default"].createElement(index$1.Text, { size: "p2", color: theme.theme.colors.gray500 }, hospitalInfo.about),
|
|
1777
|
-
isMobile ? (React__default["default"].createElement("a", { href:
|
|
1775
|
+
isMobile ? (React__default["default"].createElement("a", { href: utils.getCareHospitalUrl({
|
|
1778
1776
|
id: hospitalInfo.id,
|
|
1779
1777
|
name: hospitalInfo.name,
|
|
1780
1778
|
slug: hospitalInfo.slug,
|
|
1781
1779
|
locale,
|
|
1782
1780
|
}) },
|
|
1783
1781
|
React__default["default"].createElement("div", { className: "btn-wrapper" },
|
|
1784
|
-
React__default["default"].createElement(index$6.Button, { color: "primary", size: "md", className: "btn-booking" }, t('careBooking.bookAnAppointment'))))) : (React__default["default"].createElement("a", { href:
|
|
1782
|
+
React__default["default"].createElement(index$6.Button, { color: "primary", size: "md", className: "btn-booking" }, t('careBooking.bookAnAppointment'))))) : (React__default["default"].createElement("a", { href: utils.getCareHospitalUrl({
|
|
1785
1783
|
id: hospitalInfo.id,
|
|
1786
1784
|
name: hospitalInfo.name,
|
|
1787
1785
|
slug: hospitalInfo.slug,
|
|
1788
1786
|
locale,
|
|
1789
1787
|
}) },
|
|
1790
|
-
React__default["default"].createElement(index$1.Text, { size: "s4", color: "#2D87F3", as: "span", "data-event-category": trackingCategory, "data-event-action": "See Full Hospital Profile", "data-event-label":
|
|
1791
|
-
|
|
1788
|
+
React__default["default"].createElement(index$1.Text, { size: "s4", color: "#2D87F3", as: "span", "data-event-category": trackingCategory, "data-event-action": "See Full Hospital Profile", "data-event-label": utils.getCurrentBaseUrl(locale) +
|
|
1789
|
+
utils.getCareHospitalUrl({
|
|
1792
1790
|
id: hospitalInfo.id,
|
|
1793
1791
|
name: hospitalInfo.name,
|
|
1794
1792
|
slug: hospitalInfo.slug,
|
|
@@ -1832,7 +1830,7 @@ const ProfileDetailModal = ({ open, onClose, children, profileModalProps, }) =>
|
|
|
1832
1830
|
dayjs__default["default"].extend(relativeTime__default["default"]);
|
|
1833
1831
|
const _CardAuthor = (props) => {
|
|
1834
1832
|
const { className = '', community, name, username, url, avatar: avatarProp, role: roleProp, title, userType = 'user', expertId, specialty, organisation, isMarryBaby: isMarryBabyProp, doctorId, hospitalId, hasQuickBooking, handleMakeAppointment, communityTrackingAttr, isAnonymous, showDetailPopup, subLine, authActionWrapper, profileProps, profileModalProps, extendEle, avatarProps, hideInfo, timeText, onCloseFromPost, avatarIcon, badgeIconSize, hideBackground, children, styles, dataEventCategory, dataEventAction, dataEventLabel, } = props;
|
|
1835
|
-
const { data: { locale, router, env: { isMarryBaby: isMarryBabyContext, togetherBasePath }, }, } = React.useContext(
|
|
1833
|
+
const { data: { locale, router, env: { isMarryBaby: isMarryBabyContext, togetherBasePath }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
1836
1834
|
const { isMobile } = index$9.useScreenSize();
|
|
1837
1835
|
const { t } = useTranslations.useTranslations();
|
|
1838
1836
|
const { classes } = useStyles$1(undefined,
|
|
@@ -1862,7 +1860,7 @@ const _CardAuthor = (props) => {
|
|
|
1862
1860
|
}
|
|
1863
1861
|
};
|
|
1864
1862
|
React.useEffect(() => {
|
|
1865
|
-
utils.toggleNoScroll(openPopupExpert);
|
|
1863
|
+
utils$1.toggleNoScroll(openPopupExpert);
|
|
1866
1864
|
}, [openPopupExpert]);
|
|
1867
1865
|
const [open, setOpen] = React.useState(false);
|
|
1868
1866
|
const isExpert = (props === null || props === void 0 ? void 0 : props.role) === 'expert';
|
|
@@ -2349,10 +2347,10 @@ const uploadAndGetSrc = (file, locale, isAdmin) => typeof file === 'string'
|
|
|
2349
2347
|
});
|
|
2350
2348
|
imageFormData.append('image', compressed);
|
|
2351
2349
|
}
|
|
2352
|
-
const callApiFunction = isAdmin ?
|
|
2353
|
-
const imageRes = yield callApiFunction(
|
|
2354
|
-
?
|
|
2355
|
-
:
|
|
2350
|
+
const callApiFunction = isAdmin ? utils.callApiWithAdminAuth : utils.callApiWithAuth;
|
|
2351
|
+
const imageRes = yield callApiFunction(utils.getApiPath(isAdmin
|
|
2352
|
+
? utils.ADMIN_PATHS.COMMENT.IMAGE_UPLOAD
|
|
2353
|
+
: utils.PATHS.COMMENT.IMAGE_UPLOAD, {
|
|
2356
2354
|
_locale: locale,
|
|
2357
2355
|
}), 'POST', {
|
|
2358
2356
|
data: imageFormData,
|
|
@@ -2363,7 +2361,7 @@ const uploadAndGetSrc = (file, locale, isAdmin) => typeof file === 'string'
|
|
|
2363
2361
|
const likeUnlikePost = ({ id, locale, }) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2364
2362
|
if (!id)
|
|
2365
2363
|
return;
|
|
2366
|
-
const res = yield
|
|
2364
|
+
const res = yield utils.callApiWithAuth(utils.getApiPath(utils.PATHS.POST.LIKE, {
|
|
2367
2365
|
id,
|
|
2368
2366
|
_locale: locale,
|
|
2369
2367
|
}), 'GET');
|
|
@@ -2372,7 +2370,7 @@ const likeUnlikePost = ({ id, locale, }) => tslib_es6.__awaiter(void 0, void 0,
|
|
|
2372
2370
|
const deletePost = ({ id, locale, }) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2373
2371
|
if (!id)
|
|
2374
2372
|
return;
|
|
2375
|
-
const res = yield
|
|
2373
|
+
const res = yield utils.callApiWithAuth(utils.getApiPath(utils.PATHS.POST.DELETE, {
|
|
2376
2374
|
id,
|
|
2377
2375
|
_locale: locale,
|
|
2378
2376
|
}), 'DELETE');
|
|
@@ -2399,9 +2397,9 @@ introUrl, bannerUrl, scheduleTime, isAnonymous, isAskDoctor, }) => tslib_es6.__a
|
|
|
2399
2397
|
(previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.description) &&
|
|
2400
2398
|
bodyFormData.append('preview_description', previewUrl.description);
|
|
2401
2399
|
(previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url) &&
|
|
2402
|
-
bodyFormData.append('preview_link', utils.safeEncodeURI(previewUrl.url));
|
|
2400
|
+
bodyFormData.append('preview_link', utils$1.safeEncodeURI(previewUrl.url));
|
|
2403
2401
|
(previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.image) &&
|
|
2404
|
-
bodyFormData.append('preview_image', utils.safeEncodeURI(previewUrl.image));
|
|
2402
|
+
bodyFormData.append('preview_image', utils$1.safeEncodeURI(previewUrl.image));
|
|
2405
2403
|
topicIds === null || topicIds === void 0 ? void 0 : topicIds.forEach((topicId) => {
|
|
2406
2404
|
bodyFormData.append('topics[]', String(topicId || ''));
|
|
2407
2405
|
});
|
|
@@ -2414,7 +2412,7 @@ introUrl, bannerUrl, scheduleTime, isAnonymous, isAskDoctor, }) => tslib_es6.__a
|
|
|
2414
2412
|
resolve(uploadAndGetSrc(file, locale));
|
|
2415
2413
|
}, index * 2000);
|
|
2416
2414
|
})));
|
|
2417
|
-
imageSrcs === null || imageSrcs === void 0 ? void 0 : imageSrcs.filter(Boolean).slice(0,
|
|
2415
|
+
imageSrcs === null || imageSrcs === void 0 ? void 0 : imageSrcs.filter(Boolean).slice(0, constants.MAX_IMAGE_UPLOADS).forEach((imageFile, index) => {
|
|
2418
2416
|
bodyFormData.append(`images[${index}]`, imageFile);
|
|
2419
2417
|
});
|
|
2420
2418
|
}
|
|
@@ -2434,7 +2432,7 @@ introUrl, bannerUrl, scheduleTime, isAnonymous, isAskDoctor, }) => tslib_es6.__a
|
|
|
2434
2432
|
return bodyFormData;
|
|
2435
2433
|
});
|
|
2436
2434
|
const createPost = ({ locale, formData, isArticleComment, }) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2437
|
-
const res = yield
|
|
2435
|
+
const res = yield utils.callApiWithAuth(utils.getApiPath(isArticleComment ? utils.PATHS.POST.CREATE_ARTICLE_COMMENT : utils.PATHS.POST.CREATE, {
|
|
2438
2436
|
_locale: locale,
|
|
2439
2437
|
}), 'POST', {
|
|
2440
2438
|
data: formData,
|
|
@@ -2442,7 +2440,7 @@ const createPost = ({ locale, formData, isArticleComment, }) => tslib_es6.__awai
|
|
|
2442
2440
|
return res;
|
|
2443
2441
|
});
|
|
2444
2442
|
const editPost = ({ id, locale, formData, }) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2445
|
-
const res = yield
|
|
2443
|
+
const res = yield utils.callApiWithAuth(utils.getApiPath(utils.PATHS.POST.UPDATE, {
|
|
2446
2444
|
id,
|
|
2447
2445
|
_locale: locale,
|
|
2448
2446
|
}), 'POST', {
|
|
@@ -2453,7 +2451,7 @@ const editPost = ({ id, locale, formData, }) => tslib_es6.__awaiter(void 0, void
|
|
|
2453
2451
|
const reportPost = ({ id, reason, locale, }) => {
|
|
2454
2452
|
const formData = new FormData();
|
|
2455
2453
|
formData.append('reason', reason);
|
|
2456
|
-
return
|
|
2454
|
+
return utils.callApiWithAuth(utils.getApiPath(utils.PATHS.POST.REPORT, {
|
|
2457
2455
|
_locale: locale,
|
|
2458
2456
|
id,
|
|
2459
2457
|
}), 'POST', {
|
|
@@ -3079,7 +3077,7 @@ const RichTextEditor = ({ html, onChange, className, style, onImagePickerClick,
|
|
|
3079
3077
|
bannedWordsRef.current = bannedWords;
|
|
3080
3078
|
const [invalidUrls, setInvalidUrls] = React.useState([]);
|
|
3081
3079
|
const [previewUrl, setPreviewUrl] = React.useState(null);
|
|
3082
|
-
const { data: { locale }, } = React.useContext(
|
|
3080
|
+
const { data: { locale }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
3083
3081
|
const bannedString = (bannedWords === null || bannedWords === void 0 ? void 0 : bannedWords.join(',')) || '';
|
|
3084
3082
|
React.useEffect(() => {
|
|
3085
3083
|
var _a, _b;
|
|
@@ -3092,7 +3090,7 @@ const RichTextEditor = ({ html, onChange, className, style, onImagePickerClick,
|
|
|
3092
3090
|
url,
|
|
3093
3091
|
isFetching: true,
|
|
3094
3092
|
});
|
|
3095
|
-
|
|
3093
|
+
utils.callApi(utils.getApiPath(utils.PATHS.FETCH_PREVIEW, {
|
|
3096
3094
|
_locale: locale,
|
|
3097
3095
|
}), 'POST', {
|
|
3098
3096
|
data: {
|
|
@@ -3222,12 +3220,12 @@ const RichTextEditor = ({ html, onChange, className, style, onImagePickerClick,
|
|
|
3222
3220
|
if (!name || !DOMRect) {
|
|
3223
3221
|
return setFoundUsers([]);
|
|
3224
3222
|
}
|
|
3225
|
-
const res = yield ((((_e = cookieHelper.getCookie(
|
|
3226
|
-
?
|
|
3223
|
+
const res = yield ((((_e = cookieHelper.getCookie(constants.BEARER_TOKEN_COOKIE)) === null || _e === void 0 ? void 0 : _e.length) || 0) > 0
|
|
3224
|
+
? utils.callApiWithAuth(utils.getApiPath(utils.PATHS.SEARCH_USER, {
|
|
3227
3225
|
_locale: locale,
|
|
3228
3226
|
name: name,
|
|
3229
3227
|
}), 'get')
|
|
3230
|
-
:
|
|
3228
|
+
: utils.callApiWithAdminAuth(utils.getApiPath(utils.ADMIN_PATHS.SEARCH_USER, {
|
|
3231
3229
|
_locale: locale,
|
|
3232
3230
|
name: name,
|
|
3233
3231
|
}), 'get'));
|
|
@@ -3405,7 +3403,7 @@ const URL_WARN_MAP = [
|
|
|
3405
3403
|
'notification.urlWrongFormat',
|
|
3406
3404
|
];
|
|
3407
3405
|
const LinkToolInputPopover = ({ onAddUrl, setShow }) => {
|
|
3408
|
-
const { data: { env: { isMarryBaby }, }, } = React.useContext(
|
|
3406
|
+
const { data: { env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
3409
3407
|
const { t } = useTranslations.useTranslations();
|
|
3410
3408
|
const [urlValue, setUrlValue] = React.useState('');
|
|
3411
3409
|
const [textValue, setTextValue] = React.useState('');
|
|
@@ -3483,7 +3481,7 @@ const CreatePostDescription = ({ className, style, bannedWords = [], value, onCh
|
|
|
3483
3481
|
React__default["default"].createElement(CardLink, { title: previewUrl.title, url: previewUrl.url || '#', image: previewUrl.image, noRefetch: true }),
|
|
3484
3482
|
React__default["default"].createElement("img", { src: IconCloseCircle, className: "icon-close", onClick: () => setPreviewUrl(null), loading: "lazy" }))))),
|
|
3485
3483
|
React__default["default"].createElement("input", { ref: imagePicker, type: "file", accept: "image/png, image/gif, image/jpeg", multiple: true, style: { display: 'none' }, onChange: onSelectImages }),
|
|
3486
|
-
imageSrcs.length >
|
|
3484
|
+
imageSrcs.length > constants.MAX_IMAGE_UPLOADS ? (React__default["default"].createElement("div", { className: "input-notification" },
|
|
3487
3485
|
React__default["default"].createElement("img", { src: IconAlertCircleWarning, loading: "lazy" }),
|
|
3488
3486
|
React__default["default"].createElement(index$1.Text, { size: "p4", color: theme.theme.colors.alertWarning }, t(`createPost.popup.warningImage`)))) : null,
|
|
3489
3487
|
imageSrcs.length > 0 && (React__default["default"].createElement("div", { className: "image-gallery" }, imageSrcs.map((src, i) => (React__default["default"].createElement("div", { key: i, className: "image-item" },
|
|
@@ -3679,7 +3677,7 @@ const StyledTopicSelectList = styled__default["default"].div `
|
|
|
3679
3677
|
`;
|
|
3680
3678
|
|
|
3681
3679
|
const TopicSelectList = ({ className, style, topics: topicsProp, communityId, onChange, isLoading, disabled, forceTopics, selectedTopics: selectedTopicsProp, noFetch, dataEventCategory, dataEventAction, dataEventLabel, }) => {
|
|
3682
|
-
const { data: { locale, env: { isMarryBaby }, }, } = React.useContext(
|
|
3680
|
+
const { data: { locale, env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
3683
3681
|
const [topics, setTopics] = React.useState(topicsProp ? [...topicsProp] : []);
|
|
3684
3682
|
const [selectedTopics, setSelectedTopics] = React.useState(selectedTopicsProp ? [...selectedTopicsProp] : []);
|
|
3685
3683
|
const [isLoadingTopics, setIsLoadingTopics] = React.useState(false);
|
|
@@ -3693,13 +3691,13 @@ const TopicSelectList = ({ className, style, topics: topicsProp, communityId, on
|
|
|
3693
3691
|
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3694
3692
|
var _b;
|
|
3695
3693
|
try {
|
|
3696
|
-
const res = yield
|
|
3694
|
+
const res = yield utils.callApi(utils.getApiPath(utils.PATHS.TOPIC.LIST, {
|
|
3697
3695
|
communityId: communityId,
|
|
3698
3696
|
_locale: locale,
|
|
3699
3697
|
}), 'GET');
|
|
3700
3698
|
const topicRes = (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.topics;
|
|
3701
3699
|
if (Array.isArray(topicRes)) {
|
|
3702
|
-
setTopics(() => (topicRes === null || topicRes === void 0 ? void 0 : topicRes.map(
|
|
3700
|
+
setTopics(() => (topicRes === null || topicRes === void 0 ? void 0 : topicRes.map(dataTransform.formatTopic).sort((t1, t2) => (t1.order || 0) - (t2.order || 0))) || []);
|
|
3703
3701
|
}
|
|
3704
3702
|
}
|
|
3705
3703
|
catch (e) {
|
|
@@ -3755,7 +3753,7 @@ const TopicItem = (_a) => {
|
|
|
3755
3753
|
|
|
3756
3754
|
const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose, communities = [], forceSelectCommunity, forceSelectTopics, articleId, optionalTopic, editPostData, defaultCommunity, defaultTopics, noFetchTopic, hideTopicList, selectAskDoctor, showAskDoctorOptions, currentPageUrl, }) => {
|
|
3757
3755
|
const isInEditMode = !!(editPostData === null || editPostData === void 0 ? void 0 : editPostData.id);
|
|
3758
|
-
const { data: { locale, env: { isMarryBaby }, }, action: { pushNotifications, sanitizeFunction }, } = React.useContext(
|
|
3756
|
+
const { data: { locale, env: { isMarryBaby }, }, action: { pushNotifications, sanitizeFunction }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
3759
3757
|
const { t } = useTranslations.useTranslations();
|
|
3760
3758
|
const [isAnonymous, setIsAnonymous] = React.useState(false);
|
|
3761
3759
|
const [isAskDoctor, setIsAskDoctor] = React.useState(selectAskDoctor);
|
|
@@ -3796,7 +3794,7 @@ const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose,
|
|
|
3796
3794
|
innertext__default["default"](descriptionValue) &&
|
|
3797
3795
|
(optionalTopic || (!optionalTopic && selectedTopics.length > 0)) &&
|
|
3798
3796
|
currentCommunity &&
|
|
3799
|
-
(!imageFiles || imageFiles.length <=
|
|
3797
|
+
(!imageFiles || imageFiles.length <= constants.MAX_IMAGE_UPLOADS) &&
|
|
3800
3798
|
!(invalidUrls === null || invalidUrls === void 0 ? void 0 : invalidUrls.length) &&
|
|
3801
3799
|
!isSubmitting;
|
|
3802
3800
|
// HANDLE etra action when OPEN AND CLOSE
|
|
@@ -3831,7 +3829,7 @@ const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose,
|
|
|
3831
3829
|
}, [titleValue]);
|
|
3832
3830
|
const onCreateEditSuccess = (res) => {
|
|
3833
3831
|
if (onPostCreatedEdited) {
|
|
3834
|
-
onPostCreatedEdited(
|
|
3832
|
+
onPostCreatedEdited(dataTransform.formatPost(res), isInEditMode);
|
|
3835
3833
|
}
|
|
3836
3834
|
onClose && onClose();
|
|
3837
3835
|
};
|
|
@@ -3995,7 +3993,7 @@ const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose,
|
|
|
3995
3993
|
},
|
|
3996
3994
|
} })),
|
|
3997
3995
|
React__default["default"].createElement("div", { className: "input-group" },
|
|
3998
|
-
React__default["default"].createElement(index$
|
|
3996
|
+
React__default["default"].createElement(index$e.Button, { 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: () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3999
3997
|
if (isReadyToSubmit && !isSubmitting) {
|
|
4000
3998
|
setIsSubmitting(true);
|
|
4001
3999
|
try {
|
|
@@ -4095,7 +4093,7 @@ const StyledPopupDanger = styled__default["default"].div `
|
|
|
4095
4093
|
overflow: hidden;
|
|
4096
4094
|
border-radius: 1rem;
|
|
4097
4095
|
&[data-open='true'] {
|
|
4098
|
-
${utils.MediaQueries.mbDown} {
|
|
4096
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4099
4097
|
top: 100%;
|
|
4100
4098
|
transform: translate(-50%, -100%);
|
|
4101
4099
|
max-width: unset;
|
|
@@ -4107,12 +4105,12 @@ const StyledPopupDanger = styled__default["default"].div `
|
|
|
4107
4105
|
}
|
|
4108
4106
|
.popup-content {
|
|
4109
4107
|
.close-button {
|
|
4110
|
-
${utils.MediaQueries.mbDown} {
|
|
4108
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4111
4109
|
display: none;
|
|
4112
4110
|
}
|
|
4113
4111
|
}
|
|
4114
4112
|
.confirm-dialog {
|
|
4115
|
-
${utils.MediaQueries.mbDown} {
|
|
4113
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4116
4114
|
background: unset;
|
|
4117
4115
|
position: relative;
|
|
4118
4116
|
overflow-x: hidden;
|
|
@@ -4132,7 +4130,7 @@ const StyledPopupDanger = styled__default["default"].div `
|
|
|
4132
4130
|
}
|
|
4133
4131
|
.confirm-content {
|
|
4134
4132
|
padding: 0 40px 40px;
|
|
4135
|
-
${utils.MediaQueries.mbDown} {
|
|
4133
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4136
4134
|
padding-left: 1.5rem;
|
|
4137
4135
|
padding-right: 1.5rem;
|
|
4138
4136
|
}
|
|
@@ -4151,7 +4149,7 @@ const StyledPopupDanger = styled__default["default"].div `
|
|
|
4151
4149
|
}
|
|
4152
4150
|
}
|
|
4153
4151
|
.thumbnail-container {
|
|
4154
|
-
${utils.MediaQueries.mbDown} {
|
|
4152
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4155
4153
|
display: none;
|
|
4156
4154
|
}
|
|
4157
4155
|
&.is-icon {
|
|
@@ -4173,7 +4171,7 @@ const StyledPopupDanger = styled__default["default"].div `
|
|
|
4173
4171
|
height: 24px;
|
|
4174
4172
|
}
|
|
4175
4173
|
}
|
|
4176
|
-
${utils.MediaQueries.mbDown} {
|
|
4174
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4177
4175
|
display: flex;
|
|
4178
4176
|
}
|
|
4179
4177
|
}
|
|
@@ -4258,7 +4256,7 @@ var CloseIcon = img$q;
|
|
|
4258
4256
|
const PopupFrame = ({ className, style, closeIcon, heading = '', children, isOpen = false, hasFullscreen = false, onClose = () => null, }) => {
|
|
4259
4257
|
const [expand, setExpand] = React.useState(false);
|
|
4260
4258
|
return (React__default["default"].createElement(StyledPopupFrame, { className: className, style: style, isExpand: expand, hasFullscreen: hasFullscreen },
|
|
4261
|
-
React__default["default"].createElement(
|
|
4259
|
+
React__default["default"].createElement(dataTransform.Popup, { type: "confirm", onClose: onClose, isOpen: isOpen, closeIcon: closeIcon || React__default["default"].createElement("img", { src: CloseIcon, loading: "lazy" }), enableAnimation: !hasFullscreen },
|
|
4262
4260
|
React__default["default"].createElement("div", { className: "header" },
|
|
4263
4261
|
React__default["default"].createElement(index$2.Heading, { tag: "h5" }, heading),
|
|
4264
4262
|
hasFullscreen && (React__default["default"].createElement(StyledFSBtn, { onClick: () => setExpand(!expand) },
|
|
@@ -4267,13 +4265,13 @@ const PopupFrame = ({ className, style, closeIcon, heading = '', children, isOpe
|
|
|
4267
4265
|
};
|
|
4268
4266
|
|
|
4269
4267
|
const PopupDanger = ({ className, isMarryBaby: isMarryBabyProp, style, title, description, acceptText, cancelText, onAccept, onCancel, thumbnail, isThumbnailIcon, onClose, acceptBtnTracking, acceptBtnProps, cancelBtnProps, }) => {
|
|
4270
|
-
const { data: { env: { isMarryBaby: isMarryBabyContext }, }, } = React.useContext(
|
|
4268
|
+
const { data: { env: { isMarryBaby: isMarryBabyContext }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
4271
4269
|
const isMarryBaby = typeof isMarryBabyProp === 'boolean' ? isMarryBabyProp : isMarryBabyContext;
|
|
4272
4270
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
4273
4271
|
React.useEffect(() => {
|
|
4274
|
-
utils.toggleNoScroll(true);
|
|
4272
|
+
utils$1.toggleNoScroll(true);
|
|
4275
4273
|
setTimeout(() => setIsOpen(true), 0);
|
|
4276
|
-
return () => utils.toggleNoScroll(false);
|
|
4274
|
+
return () => utils$1.toggleNoScroll(false);
|
|
4277
4275
|
}, []);
|
|
4278
4276
|
if (typeof window === 'undefined')
|
|
4279
4277
|
return null;
|
|
@@ -4295,7 +4293,7 @@ const PopupDanger = ({ className, isMarryBaby: isMarryBabyProp, style, title, de
|
|
|
4295
4293
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
4296
4294
|
} }, cancelBtnProps), cancelText)))),
|
|
4297
4295
|
isMarryBaby && thumbnail && (React__default["default"].createElement("div", { className: `thumbnail-container is-mobile ${isThumbnailIcon ? 'is-icon' : ''}` },
|
|
4298
|
-
React__default["default"].createElement("img", { className: "thumbnail", src: thumbnail, loading: "lazy" }))))), utils.getPopupWrapperDom());
|
|
4296
|
+
React__default["default"].createElement("img", { className: "thumbnail", src: thumbnail, loading: "lazy" }))))), utils$1.getPopupWrapperDom());
|
|
4299
4297
|
};
|
|
4300
4298
|
|
|
4301
4299
|
const StyledInputCommentBar = styled__default["default"].div `
|
|
@@ -4412,12 +4410,12 @@ const StyledInputCommentBar = styled__default["default"].div `
|
|
|
4412
4410
|
.as-input {
|
|
4413
4411
|
font-size: 16px;
|
|
4414
4412
|
font-weight: ${theme.theme.sizes.fwRegular};
|
|
4415
|
-
${utils.MediaQueries.mbDown} {
|
|
4413
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4416
4414
|
font-size: 22px;
|
|
4417
4415
|
line-height: 1.2;
|
|
4418
4416
|
}
|
|
4419
4417
|
|
|
4420
|
-
${utils.MediaQueries.mbUp} {
|
|
4418
|
+
${utils$1.MediaQueries.mbUp} {
|
|
4421
4419
|
font-size: 26px;
|
|
4422
4420
|
line-height: 1.2;
|
|
4423
4421
|
}
|
|
@@ -4427,12 +4425,12 @@ const StyledInputCommentBar = styled__default["default"].div `
|
|
|
4427
4425
|
.as-input {
|
|
4428
4426
|
font-weight: ${theme.theme.sizes.fwRegular};
|
|
4429
4427
|
line-height: 22px;
|
|
4430
|
-
${utils.MediaQueries.mbDown} {
|
|
4428
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4431
4429
|
font-size: 14px;
|
|
4432
4430
|
line-height: 1.2;
|
|
4433
4431
|
}
|
|
4434
4432
|
|
|
4435
|
-
${utils.MediaQueries.mbUp} {
|
|
4433
|
+
${utils$1.MediaQueries.mbUp} {
|
|
4436
4434
|
font-size: 16px;
|
|
4437
4435
|
line-height: 1.2;
|
|
4438
4436
|
}
|
|
@@ -4442,12 +4440,12 @@ const StyledInputCommentBar = styled__default["default"].div `
|
|
|
4442
4440
|
.as-input {
|
|
4443
4441
|
font-weight: ${theme.theme.sizes.fwRegular};
|
|
4444
4442
|
line-height: 20px;
|
|
4445
|
-
${utils.MediaQueries.mbDown} {
|
|
4443
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4446
4444
|
font-size: 13px;
|
|
4447
4445
|
line-height: 1.5;
|
|
4448
4446
|
}
|
|
4449
4447
|
|
|
4450
|
-
${utils.MediaQueries.mbUp} {
|
|
4448
|
+
${utils$1.MediaQueries.mbUp} {
|
|
4451
4449
|
font-size: 13px;
|
|
4452
4450
|
line-height: 1.5;
|
|
4453
4451
|
}
|
|
@@ -4538,7 +4536,7 @@ const getCommentFormBody = ({ postId, message, photos, link, locale, sanitizeFun
|
|
|
4538
4536
|
const imageSrcs = yield Promise.all(photos === null || photos === void 0 ? void 0 : photos.map((file) => uploadAndGetSrc(file, locale)));
|
|
4539
4537
|
imageSrcs
|
|
4540
4538
|
.filter(Boolean)
|
|
4541
|
-
.slice(0,
|
|
4539
|
+
.slice(0, constants.MAX_IMAGE_UPLOADS)
|
|
4542
4540
|
.forEach((photo) => {
|
|
4543
4541
|
formData.append('images[]', photo);
|
|
4544
4542
|
});
|
|
@@ -4560,7 +4558,7 @@ const getCommentFormBody = ({ postId, message, photos, link, locale, sanitizeFun
|
|
|
4560
4558
|
return formData;
|
|
4561
4559
|
});
|
|
4562
4560
|
const submitComment = (formData, locale) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
4563
|
-
return
|
|
4561
|
+
return utils.callApiWithAuth(utils.getApiPath(utils.PATHS.COMMENT.CREATE, {
|
|
4564
4562
|
_locale: locale,
|
|
4565
4563
|
}), 'POST', {
|
|
4566
4564
|
data: formData,
|
|
@@ -4584,27 +4582,27 @@ const decodeCommentBody = (s) => {
|
|
|
4584
4582
|
};
|
|
4585
4583
|
};
|
|
4586
4584
|
const submitReply = (formData, locale) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
4587
|
-
return
|
|
4585
|
+
return utils.callApiWithAuth(utils.getApiPath(utils.PATHS.COMMENT.REPLY, {
|
|
4588
4586
|
_locale: locale,
|
|
4589
4587
|
}), 'POST', {
|
|
4590
4588
|
data: formData,
|
|
4591
4589
|
});
|
|
4592
4590
|
});
|
|
4593
4591
|
const likeUnlikeComment = ({ commentId, setLike = false, locale, }) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
4594
|
-
return
|
|
4592
|
+
return utils.callApiWithAuth(utils.getApiPath(setLike ? utils.PATHS.COMMENT.LIKE : utils.PATHS.COMMENT.UNLIKE, {
|
|
4595
4593
|
_locale: locale,
|
|
4596
4594
|
id: commentId,
|
|
4597
4595
|
}), 'GET');
|
|
4598
4596
|
});
|
|
4599
4597
|
const deleteComment = ({ id, locale, }) => {
|
|
4600
|
-
return
|
|
4598
|
+
return utils.callApiWithAuth(utils.getApiPath(utils.PATHS.COMMENT.DELETE, {
|
|
4601
4599
|
_locale: locale,
|
|
4602
4600
|
id: id,
|
|
4603
4601
|
}), 'DELETE');
|
|
4604
4602
|
};
|
|
4605
4603
|
|
|
4606
4604
|
const InputCommentBar = ({ isReply, className, onClose, replyToName, style, replyingId, replyingUser, onPostSuccess, post, isMarryBaby: isMarryBabyProp, }) => {
|
|
4607
|
-
const { action: { pushNotifications, sanitizeFunction }, data: { userInfo, locale, env: { isMarryBaby: isMarryBabyContext }, }, } = React.useContext(
|
|
4605
|
+
const { action: { pushNotifications, sanitizeFunction }, data: { userInfo, locale, env: { isMarryBaby: isMarryBabyContext }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
4608
4606
|
const isMarryBaby = typeof isMarryBabyProp === 'boolean' ? isMarryBabyProp : isMarryBabyContext;
|
|
4609
4607
|
const { t } = useTranslations.useTranslations();
|
|
4610
4608
|
const { onSelectImages, onRemoveImage, imageSrcs, onRemoveAllImages, imageFiles, } = useImagePicker();
|
|
@@ -4627,7 +4625,7 @@ const InputCommentBar = ({ isReply, className, onClose, replyToName, style, repl
|
|
|
4627
4625
|
setText('');
|
|
4628
4626
|
onRemoveAllImages();
|
|
4629
4627
|
onClose && onClose();
|
|
4630
|
-
const newComment =
|
|
4628
|
+
const newComment = dataTransform.formatComment(res.data);
|
|
4631
4629
|
if (typeof newComment.images === 'string') {
|
|
4632
4630
|
newComment.images = JSON.parse(newComment.images);
|
|
4633
4631
|
}
|
|
@@ -4717,7 +4715,7 @@ const InputCommentBar = ({ isReply, className, onClose, replyToName, style, repl
|
|
|
4717
4715
|
} })),
|
|
4718
4716
|
React__default["default"].createElement("img", { src: IconCloseCircleLine, className: "icon-close-comment", onClick: () => onClose && onClose(), loading: "lazy" }))),
|
|
4719
4717
|
React__default["default"].createElement("div", { className: "input-container", ref: mainInput },
|
|
4720
|
-
React__default["default"].createElement(index$7.UserAvatar, { className: `avatar-wrapper ${isReply ? 'avatar-wrapper-reply' : ''}`, avatar: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) ? userInfo.avatar :
|
|
4718
|
+
React__default["default"].createElement(index$7.UserAvatar, { className: `avatar-wrapper ${isReply ? 'avatar-wrapper-reply' : ''}`, avatar: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) ? userInfo.avatar : constants.DEFAULT_AVATAR_IMG, username: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username) }),
|
|
4721
4719
|
React__default["default"].createElement("input", { ref: imagePicker, onChange: onSelectImages, type: "file", multiple: true, accept: "image/png,image/jpeg", name: "images", style: { display: 'none' } }),
|
|
4722
4720
|
React__default["default"].createElement(index$c.Input
|
|
4723
4721
|
// actionIcon={
|
|
@@ -4866,7 +4864,7 @@ const StyledShare = styled__default["default"].div `
|
|
|
4866
4864
|
}
|
|
4867
4865
|
|
|
4868
4866
|
&[data-is-marrybaby='true'] {
|
|
4869
|
-
${utils.MediaQueries.mbDown} {
|
|
4867
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4870
4868
|
padding: 0.5rem;
|
|
4871
4869
|
}
|
|
4872
4870
|
.share__social {
|
|
@@ -4877,7 +4875,7 @@ const StyledShare = styled__default["default"].div `
|
|
|
4877
4875
|
align-items: center;
|
|
4878
4876
|
justify-content: center;
|
|
4879
4877
|
text-align: center;
|
|
4880
|
-
${utils.MediaQueries.mbDown} {
|
|
4878
|
+
${utils$1.MediaQueries.mbDown} {
|
|
4881
4879
|
margin: 0;
|
|
4882
4880
|
}
|
|
4883
4881
|
& > img {
|
|
@@ -5005,7 +5003,7 @@ const getSocialList = (shareUrl, isMarryBaby) => isMarryBaby
|
|
|
5005
5003
|
},
|
|
5006
5004
|
];
|
|
5007
5005
|
const ShareBox = ({ className, trackingCategory = 'Together', style, shareUrl, title, }) => {
|
|
5008
|
-
const { action: { pushNotifications }, data: { env: { isMarryBaby }, }, } = React.useContext(
|
|
5006
|
+
const { action: { pushNotifications }, data: { env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
5009
5007
|
const { t } = useTranslations.useTranslations();
|
|
5010
5008
|
const input = React.useRef(null);
|
|
5011
5009
|
const [copied, setCopied] = React.useState(false);
|
|
@@ -5058,13 +5056,13 @@ const ShareBox = ({ className, trackingCategory = 'Together', style, shareUrl, t
|
|
|
5058
5056
|
};
|
|
5059
5057
|
|
|
5060
5058
|
const SharePopup = ({ trackingCategory, className, style, url, avatar, text, onClose, }) => {
|
|
5061
|
-
const { data: { env: { isMarryBaby }, }, } = React.useContext(
|
|
5059
|
+
const { data: { env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
5062
5060
|
const { t } = useTranslations.useTranslations();
|
|
5063
5061
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
5064
5062
|
React.useEffect(() => {
|
|
5065
|
-
utils.toggleNoScroll(true);
|
|
5063
|
+
utils$1.toggleNoScroll(true);
|
|
5066
5064
|
setTimeout(() => setIsOpen(true), 0);
|
|
5067
|
-
return () => utils.toggleNoScroll(false);
|
|
5065
|
+
return () => utils$1.toggleNoScroll(false);
|
|
5068
5066
|
}, []);
|
|
5069
5067
|
return (React__default["default"].createElement(core.Portal, null,
|
|
5070
5068
|
React__default["default"].createElement(StyledSharePopup, { "data-is-marrybaby": isMarryBaby, className: className, style: style },
|
|
@@ -5136,7 +5134,7 @@ const StyledSharePopup = styled__default["default"].div `
|
|
|
5136
5134
|
overflow: hidden;
|
|
5137
5135
|
border-radius: 1rem;
|
|
5138
5136
|
&[data-open='true'] {
|
|
5139
|
-
${utils.MediaQueries.mbDown} {
|
|
5137
|
+
${utils$1.MediaQueries.mbDown} {
|
|
5140
5138
|
max-width: unset;
|
|
5141
5139
|
width: 100%;
|
|
5142
5140
|
top: 100%;
|
|
@@ -5203,7 +5201,7 @@ var img$b = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width=
|
|
|
5203
5201
|
var IconAlertCircle = img$b;
|
|
5204
5202
|
|
|
5205
5203
|
const SubmitReportForm = ({ className, style, reason, reasonText, onClose, postId, }) => {
|
|
5206
|
-
const { data: { locale, env: { isMarryBaby }, }, action: { pushNotifications }, } = React.useContext(
|
|
5204
|
+
const { data: { locale, env: { isMarryBaby }, }, action: { pushNotifications }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
5207
5205
|
const { t } = useTranslations.useTranslations();
|
|
5208
5206
|
const [loading, setLoading] = React.useState(false);
|
|
5209
5207
|
return (React__default["default"].createElement(StyledSubmitReportForm, { "data-is-marrybaby": isMarryBaby, className: className, style: style },
|
|
@@ -5323,7 +5321,7 @@ const PostContent = (_a) => {
|
|
|
5323
5321
|
const { authActionWrapper } = useTogetherAuthRequiredAction();
|
|
5324
5322
|
const [openPopupExpert, setOpenPopupExpert] = React.useState(false);
|
|
5325
5323
|
const description = decodeMention(decodePostUrl(rawDescription || '', 'display'), mentions);
|
|
5326
|
-
const { action: { sanitizeFunction }, } = React.useContext(
|
|
5324
|
+
const { action: { sanitizeFunction }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
5327
5325
|
const shortenSanitizedContentData = React.useMemo(() => {
|
|
5328
5326
|
const sanitizedContent = sanitizeFunction(description || '');
|
|
5329
5327
|
if (disableShortenContent || showAll)
|
|
@@ -5396,7 +5394,7 @@ const StyledWrapper$1 = styled__default["default"].div `
|
|
|
5396
5394
|
background: ${(props) => props.bgColor};
|
|
5397
5395
|
border-left: 3px solid ${(props) => props.highlight};
|
|
5398
5396
|
|
|
5399
|
-
${utils.MediaQueries.mbUp} {
|
|
5397
|
+
${utils$1.MediaQueries.mbUp} {
|
|
5400
5398
|
padding: 12px 12px 12px 17px;
|
|
5401
5399
|
}
|
|
5402
5400
|
`;
|
|
@@ -5682,7 +5680,7 @@ const StyledCircleArrow = styled__default["default"].div `
|
|
|
5682
5680
|
opacity: 0.5;
|
|
5683
5681
|
}
|
|
5684
5682
|
}
|
|
5685
|
-
${utils.MediaQueries.tdUp} {
|
|
5683
|
+
${utils$1.MediaQueries.tdUp} {
|
|
5686
5684
|
padding: 8px;
|
|
5687
5685
|
> img {
|
|
5688
5686
|
width: 30px;
|
|
@@ -5795,7 +5793,7 @@ const SensitiveMask = ({ image, showIcon = true }) => {
|
|
|
5795
5793
|
};
|
|
5796
5794
|
|
|
5797
5795
|
const PostImagePreview = ({ className, images = [], style, authorName, isSensitive = false, alt, }) => {
|
|
5798
|
-
const { data: { env: { isMarryBaby }, }, } = React.useContext(
|
|
5796
|
+
const { data: { env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
5799
5797
|
const { t } = useTranslations.useTranslations();
|
|
5800
5798
|
const moreImageCount = `+ ${(images.length || 0) - 4}`;
|
|
5801
5799
|
const [isOpenImagePreview, setIsOpenImagePreview] = React.useState(false);
|
|
@@ -5806,17 +5804,17 @@ const PostImagePreview = ({ className, images = [], style, authorName, isSensiti
|
|
|
5806
5804
|
React.useEffect(() => {
|
|
5807
5805
|
return () => {
|
|
5808
5806
|
if (hasSetNoScroll.current) {
|
|
5809
|
-
utils.toggleNoScroll(false);
|
|
5807
|
+
utils$1.toggleNoScroll(false);
|
|
5810
5808
|
}
|
|
5811
5809
|
};
|
|
5812
5810
|
}, []);
|
|
5813
5811
|
React.useEffect(() => {
|
|
5814
5812
|
if (isOpenImagePreview || singleImageViewIndex >= 0) {
|
|
5815
|
-
utils.toggleNoScroll(true);
|
|
5813
|
+
utils$1.toggleNoScroll(true);
|
|
5816
5814
|
hasSetNoScroll.current = true;
|
|
5817
5815
|
}
|
|
5818
5816
|
else {
|
|
5819
|
-
utils.toggleNoScroll(false);
|
|
5817
|
+
utils$1.toggleNoScroll(false);
|
|
5820
5818
|
hasSetNoScroll.current = false;
|
|
5821
5819
|
}
|
|
5822
5820
|
}, [isOpenImagePreview, singleImageViewIndex]);
|
|
@@ -5882,7 +5880,7 @@ const StyledSocialLinkPreview = styled__default["default"].div `
|
|
|
5882
5880
|
`;
|
|
5883
5881
|
|
|
5884
5882
|
const SocialLinkPreview = ({ url, image, className, style, baseUrl = '', autoPlay = true, }) => {
|
|
5885
|
-
const { data: { locale }, } = React.useContext(
|
|
5883
|
+
const { data: { locale }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
5886
5884
|
const [previewData, setPreviewData] = React.useState(null);
|
|
5887
5885
|
React.useEffect(() => {
|
|
5888
5886
|
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -5899,7 +5897,7 @@ const SocialLinkPreview = ({ url, image, className, style, baseUrl = '', autoPla
|
|
|
5899
5897
|
// image: res?.image || res?.logo,
|
|
5900
5898
|
// }),
|
|
5901
5899
|
// )
|
|
5902
|
-
|
|
5900
|
+
utils.callApi(utils.getApiPath(utils.PATHS.FETCH_PREVIEW, {
|
|
5903
5901
|
_locale: locale,
|
|
5904
5902
|
}, undefined, baseUrl), 'POST', {
|
|
5905
5903
|
data: {
|
|
@@ -5983,7 +5981,7 @@ const SocialLinkPreview = ({ url, image, className, style, baseUrl = '', autoPla
|
|
|
5983
5981
|
width: responsiveWidth.current,
|
|
5984
5982
|
transform: 'translate(-50%, -50%)',
|
|
5985
5983
|
}, scrolling: "no", frameBorder: "0", allowFullScreen: true, allow: "autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share", loading: "lazy" })) : null)) : (React__default["default"].createElement("a", { href: displayUrl, target: "_blank", rel: "noreferrer" },
|
|
5986
|
-
React__default["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["default"].createElement(Loading$1, { className: "loading-spinner" })) : (React__default["default"].createElement(index$9.ImageWrap, { className: "link-image", src: displayImage ||
|
|
5984
|
+
React__default["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["default"].createElement(Loading$1, { className: "loading-spinner" })) : (React__default["default"].createElement(index$9.ImageWrap, { className: "link-image", src: displayImage || constants.DEFAULT_IMG, backupSrc: constants.DEFAULT_IMG, alt: displayUrl })))))));
|
|
5987
5985
|
};
|
|
5988
5986
|
|
|
5989
5987
|
var styles$f = {"loading":"PD6nRZX"};
|
|
@@ -6192,7 +6190,7 @@ var styles$a = {"container":"GYUElSy","question":"_3C6QpT1","questionTitle":"_9M
|
|
|
6192
6190
|
const PostCard$1 = ({ post, className = '' }) => {
|
|
6193
6191
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6194
6192
|
const { t } = useTranslations.useTranslations();
|
|
6195
|
-
const { data: { userInfo, env: { togetherBasePath }, }, } = React.useContext(
|
|
6193
|
+
const { data: { userInfo, env: { togetherBasePath }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6196
6194
|
const { authActionWrapper, authorProps, currentPageUrl } = React.useContext(ProfileDetailContext);
|
|
6197
6195
|
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}/`;
|
|
6198
6196
|
return (React__default["default"].createElement("div", { className: `${styles$a.container} ${className}` },
|
|
@@ -6217,7 +6215,7 @@ const PostCard$1 = ({ post, className = '' }) => {
|
|
|
6217
6215
|
React__default["default"].createElement(PostContent, { className: "post-content-wrapper", description: ((_h = (_g = (_f = post === null || post === void 0 ? void 0 : post.expertAnswer) === null || _f === void 0 ? void 0 : _f.answer) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.content) || '',
|
|
6218
6216
|
// disableShortenContent={disableShortenContent}
|
|
6219
6217
|
mentions: post === null || post === void 0 ? void 0 : post.mentions, "data-testid": "Content of the Post" })),
|
|
6220
|
-
React__default["default"].createElement(index$
|
|
6218
|
+
React__default["default"].createElement(index$e.Button, { variant: "secondary", "data-event-category": "Together", "data-event-action": "Doctor Reply Click", "data-event-label": currentPageUrl, size: "md", onClick: () => {
|
|
6221
6219
|
if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id)) {
|
|
6222
6220
|
authActionWrapper === null || authActionWrapper === void 0 ? void 0 : authActionWrapper(() => (window.location.href = postHref));
|
|
6223
6221
|
}
|
|
@@ -6243,7 +6241,7 @@ const EmptyMessage = ({ message, buttonTxt, imgSrc, onBtnClick }) => {
|
|
|
6243
6241
|
|
|
6244
6242
|
const Answering = ({ id }) => {
|
|
6245
6243
|
const { t } = useTranslations.useTranslations();
|
|
6246
|
-
const { data: { locale }, } = React.useContext(
|
|
6244
|
+
const { data: { locale }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6247
6245
|
const { authorProps } = React.useContext(ProfileDetailContext);
|
|
6248
6246
|
const [posts, setPosts] = React.useState(null);
|
|
6249
6247
|
const [loading, setLoading] = React.useState(false);
|
|
@@ -6252,11 +6250,11 @@ const Answering = ({ id }) => {
|
|
|
6252
6250
|
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
6253
6251
|
var _a;
|
|
6254
6252
|
setLoading(true);
|
|
6255
|
-
const res = yield
|
|
6253
|
+
const res = yield utils.callApi(utils.getApiPath(utils.PATHS.USER.LIST_ANSWERS, {
|
|
6256
6254
|
_locale: locale,
|
|
6257
6255
|
id,
|
|
6258
6256
|
}), 'GET');
|
|
6259
|
-
const resData = (((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.replies) || []).map(
|
|
6257
|
+
const resData = (((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.replies) || []).map(dataTransform.formatPost);
|
|
6260
6258
|
setPosts(resData);
|
|
6261
6259
|
setLoading(false);
|
|
6262
6260
|
}))();
|
|
@@ -6272,7 +6270,7 @@ var styles$7 = {"container":"toEutn7","title":"drdisHs","actions":"scNwTvv","ski
|
|
|
6272
6270
|
const QuestionCard = (_a) => {
|
|
6273
6271
|
var _b, _c, _d, _e;
|
|
6274
6272
|
var { post } = _a, rest = tslib_es6.__rest(_a, ["post"]);
|
|
6275
|
-
const { data: { env: { togetherBasePath }, }, } = React.useContext(
|
|
6273
|
+
const { data: { env: { togetherBasePath }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6276
6274
|
// const { showSkipQuestionTag } = useContext(ProfileDetailContext)
|
|
6277
6275
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
6278
6276
|
React__default["default"].createElement("div", Object.assign({}, rest, { className: `${styles$7.container} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}` }),
|
|
@@ -6286,7 +6284,7 @@ var styles$6 = {"accordion":"I-uIJ6E","header":"_41WRsj2","heading":"AcOGL93","h
|
|
|
6286
6284
|
const Care = () => {
|
|
6287
6285
|
var _a, _b;
|
|
6288
6286
|
const { t } = useTranslations.useTranslations();
|
|
6289
|
-
const { data: { locale, userInfo }, } = React.useContext(
|
|
6287
|
+
const { data: { locale, userInfo }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6290
6288
|
const { onSkipQuestion, countValues, setCountValues } = React.useContext(ProfileDetailContext);
|
|
6291
6289
|
const [questions, setQuestions] = React.useState();
|
|
6292
6290
|
const [communities, setCommunities] = React.useState([]);
|
|
@@ -6297,7 +6295,7 @@ const Care = () => {
|
|
|
6297
6295
|
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
6298
6296
|
var _a;
|
|
6299
6297
|
setFetchLoading(true);
|
|
6300
|
-
const res = yield
|
|
6298
|
+
const res = yield utils.callApiWithAuth(utils.getApiPath(utils.PATHS.USER.LIST_QUESTION_NEED_REPLY, {
|
|
6301
6299
|
_locale: locale,
|
|
6302
6300
|
}), 'GET');
|
|
6303
6301
|
const tmpCom = [];
|
|
@@ -6305,9 +6303,9 @@ const Care = () => {
|
|
|
6305
6303
|
(((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.communities) || [])
|
|
6306
6304
|
.filter((i) => ((i === null || i === void 0 ? void 0 : i.question) || []).length > 0)
|
|
6307
6305
|
.map((i) => {
|
|
6308
|
-
tmpQuestionByCom[i.id] = i.question.map(
|
|
6306
|
+
tmpQuestionByCom[i.id] = i.question.map(dataTransform.formatPost);
|
|
6309
6307
|
delete i.question;
|
|
6310
|
-
tmpCom.push(
|
|
6308
|
+
tmpCom.push(dataTransform.formatCommunity(i));
|
|
6311
6309
|
});
|
|
6312
6310
|
setCommunities(tmpCom);
|
|
6313
6311
|
setQuestions(tmpQuestionByCom);
|
|
@@ -6370,7 +6368,7 @@ var styles$5 = {"container":"GA-zc-O","mainTxt":"A18McWD","question":"yzr0H0N","
|
|
|
6370
6368
|
|
|
6371
6369
|
const PostCard = ({ post, className = '' }) => {
|
|
6372
6370
|
var _a;
|
|
6373
|
-
const { data: { userInfo, env: { togetherBasePath }, }, } = React.useContext(
|
|
6371
|
+
const { data: { userInfo, env: { togetherBasePath }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6374
6372
|
const { t } = useTranslations.useTranslations();
|
|
6375
6373
|
const theme = core.useMantineTheme();
|
|
6376
6374
|
const { authActionWrapper, authorProps } = React.useContext(ProfileDetailContext);
|
|
@@ -6398,7 +6396,7 @@ var styles$4 = {"container":"TSMHoEM"};
|
|
|
6398
6396
|
|
|
6399
6397
|
const Posts = () => {
|
|
6400
6398
|
const { t } = useTranslations.useTranslations();
|
|
6401
|
-
const { data: { locale }, } = React.useContext(
|
|
6399
|
+
const { data: { locale }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6402
6400
|
const { authorId: id, authorProps, isAuthorLogin, onCloseFromPost, } = React.useContext(ProfileDetailContext);
|
|
6403
6401
|
const [posts, setPosts] = React.useState(null);
|
|
6404
6402
|
const [loading, setLoading] = React.useState(false);
|
|
@@ -6407,12 +6405,12 @@ const Posts = () => {
|
|
|
6407
6405
|
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
6408
6406
|
var _a;
|
|
6409
6407
|
setLoading(true);
|
|
6410
|
-
const res = yield
|
|
6408
|
+
const res = yield utils.callApi(utils.getApiPath(utils.PATHS.USER.LIST_POST, {
|
|
6411
6409
|
_locale: locale,
|
|
6412
6410
|
id,
|
|
6413
6411
|
isAnonymous: 0,
|
|
6414
6412
|
}), 'GET');
|
|
6415
|
-
const resData = (((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.posts) || []).map(
|
|
6413
|
+
const resData = (((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.posts) || []).map(dataTransform.formatPost);
|
|
6416
6414
|
setPosts(resData);
|
|
6417
6415
|
setLoading(false);
|
|
6418
6416
|
}))();
|
|
@@ -6469,7 +6467,7 @@ const TabDataInit = {
|
|
|
6469
6467
|
const ProfileDetail = (_a) => {
|
|
6470
6468
|
var _b;
|
|
6471
6469
|
var { authorProps, selectedTab, authActionWrapper, onSkipQuestion, onCloseFromPost, hideQuestionTab, hideAnswerTab, showSkipQuestionTag, rolesToShowQuestionsTab = ['expert'], currentPageUrl } = _a, rest = tslib_es6.__rest(_a, ["authorProps", "selectedTab", "authActionWrapper", "onSkipQuestion", "onCloseFromPost", "hideQuestionTab", "hideAnswerTab", "showSkipQuestionTag", "rolesToShowQuestionsTab", "currentPageUrl"]);
|
|
6472
|
-
const { data: { locale, userInfo, env: { isMarryBaby }, }, } = React.useContext(
|
|
6470
|
+
const { data: { locale, userInfo, env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6473
6471
|
const { t } = useTranslations.useTranslations();
|
|
6474
6472
|
const role = authorProps === null || authorProps === void 0 ? void 0 : authorProps.role;
|
|
6475
6473
|
const loginRole = userInfo === null || userInfo === void 0 ? void 0 : userInfo.role;
|
|
@@ -6545,12 +6543,12 @@ const ProfileDetail = (_a) => {
|
|
|
6545
6543
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6546
6544
|
setLoading(true);
|
|
6547
6545
|
const res = yield Promise.all([
|
|
6548
|
-
|
|
6546
|
+
utils.callApi(utils.getApiPath(utils.PATHS.USER.DETAIL, {
|
|
6549
6547
|
_locale: locale,
|
|
6550
6548
|
id,
|
|
6551
6549
|
}), 'GET'),
|
|
6552
6550
|
...listTabsHasCount.map((i) => {
|
|
6553
|
-
return
|
|
6551
|
+
return utils.callApi(utils.getApiPath(utils.PATHS.USER.COUNT_TABS, {
|
|
6554
6552
|
_locale: locale,
|
|
6555
6553
|
id,
|
|
6556
6554
|
[i.keyOfCountApi]: 1,
|
|
@@ -6561,7 +6559,7 @@ const ProfileDetail = (_a) => {
|
|
|
6561
6559
|
const resInfo = {
|
|
6562
6560
|
data: restDetail === null || restDetail === void 0 ? void 0 : restDetail.data,
|
|
6563
6561
|
experiences: (((_b = (_a = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _a === void 0 ? void 0 : _a.fields) === null || _b === void 0 ? void 0 : _b.experiences) || []).map(formatExperience),
|
|
6564
|
-
relatedPosts: (((_c = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _c === void 0 ? void 0 : _c.related_post) || []).map((i) =>
|
|
6562
|
+
relatedPosts: (((_c = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _c === void 0 ? void 0 : _c.related_post) || []).map((i) => dataTransform.formatArticle(i.post)),
|
|
6565
6563
|
educations: (((_e = (_d = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _d === void 0 ? void 0 : _d.fields) === null || _e === void 0 ? void 0 : _e.educations) || []).map(formatEducation),
|
|
6566
6564
|
awards: ((_g = (_f = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _f === void 0 ? void 0 : _f.fields) === null || _g === void 0 ? void 0 : _g.awards_accreditations) || [],
|
|
6567
6565
|
contact: ((_j = (_h = restDetail === null || restDetail === void 0 ? void 0 : restDetail.data) === null || _h === void 0 ? void 0 : _h.fields) === null || _j === void 0 ? void 0 : _j.contact) || {},
|
|
@@ -6669,14 +6667,14 @@ var styles$2 = {"skipBtn":"KsWg8i6","alertHeading":"_9tS0EUN","alertDesc":"kyyRK
|
|
|
6669
6667
|
const SkipQuestionOfExpertBtn = (_a) => {
|
|
6670
6668
|
var { post, onSkip, btnText, currentPageUrl } = _a, rest = tslib_es6.__rest(_a, ["post", "onSkip", "btnText", "currentPageUrl"]);
|
|
6671
6669
|
const { t } = useTranslations.useTranslations();
|
|
6672
|
-
const { data: { locale }, action: { pushNotifications }, } = React.useContext(
|
|
6670
|
+
const { data: { locale }, action: { pushNotifications }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6673
6671
|
const [showAlert, setShowAlert] = React.useState(false);
|
|
6674
6672
|
const [loading, setLoading] = React.useState(false);
|
|
6675
6673
|
const _theme = core.useMantineTheme();
|
|
6676
6674
|
const handleSkip = React.useCallback(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
6677
6675
|
var _b;
|
|
6678
6676
|
setLoading(true);
|
|
6679
|
-
const res = yield
|
|
6677
|
+
const res = yield utils.callApiWithAuth(utils.getApiPath(utils.PATHS.USER.SKIP_QUESTION, {
|
|
6680
6678
|
_locale: locale,
|
|
6681
6679
|
id: post === null || post === void 0 ? void 0 : post.id,
|
|
6682
6680
|
}), 'PUT');
|
|
@@ -6706,12 +6704,12 @@ const SkipQuestionOfExpertBtn = (_a) => {
|
|
|
6706
6704
|
React__default["default"].createElement("div", { className: styles$2.alertHeading }, t('profilePanel.skipQuestion.heading')),
|
|
6707
6705
|
React__default["default"].createElement("div", { className: styles$2.alertDesc }, t('profilePanel.skipQuestion.content')),
|
|
6708
6706
|
React__default["default"].createElement("div", { className: styles$2.alertAction },
|
|
6709
|
-
React__default["default"].createElement(index$
|
|
6707
|
+
React__default["default"].createElement(index$e.Button, { size: "md", variant: "secondary", leftIcon: React__default["default"].createElement(core$1.Close, { color: _theme.fn.primaryColor(), size: 24 }), onClick: () => setShowAlert(false), styles: () => ({
|
|
6710
6708
|
leftIcon: {
|
|
6711
6709
|
marginRight: 0,
|
|
6712
6710
|
},
|
|
6713
6711
|
}) }),
|
|
6714
|
-
React__default["default"].createElement(index$
|
|
6712
|
+
React__default["default"].createElement(index$e.Button, { variant: "primary", size: "md", leftIcon: React__default["default"].createElement(core$1.Check, { color: 'white', size: 24 }), onClick: handleSkip, loading: loading, "data-event-category": "Together", "data-event-action": "Unclear Question Click", "data-event-label": currentPageUrl, styles: () => ({
|
|
6715
6713
|
leftIcon: {
|
|
6716
6714
|
marginRight: 0,
|
|
6717
6715
|
},
|
|
@@ -6742,7 +6740,7 @@ var IconTrashBin = img$2;
|
|
|
6742
6740
|
// import IconBellOff from '../../../assets/svg/icon-bell-off.svg'
|
|
6743
6741
|
// import IconBellOn from '../../../assets/svg/icon-bell-on.svg'
|
|
6744
6742
|
const CardPostPopoverMore = ({ authorEmail, onDeletePost, shareUrl, post, className = '', popoverClassName = '', onBookmark, onRemoveBookmark, onEditPost, }) => {
|
|
6745
|
-
const { data: { locale, userInfo, togetherUserId, env: { isMarryBaby }, }, action: { pushNotifications }, } = React.useContext(
|
|
6743
|
+
const { data: { locale, userInfo, togetherUserId, env: { isMarryBaby }, }, action: { pushNotifications }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
6746
6744
|
const { t } = useTranslations.useTranslations();
|
|
6747
6745
|
// const [localHasNoti, setLocalHasNoti] = useState(false)
|
|
6748
6746
|
const [loading, setLoading] = React.useState(false);
|
|
@@ -6815,7 +6813,7 @@ const CardPostPopoverMore = ({ authorEmail, onDeletePost, shareUrl, post, classN
|
|
|
6815
6813
|
if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) || !(post === null || post === void 0 ? void 0 : post.id))
|
|
6816
6814
|
return;
|
|
6817
6815
|
if (post === null || post === void 0 ? void 0 : post.bookmarked) {
|
|
6818
|
-
const res = yield
|
|
6816
|
+
const res = yield utils.callApiWithAuth(utils.getApiPath(utils.PATHS.BOOKMARK.DELETE, {
|
|
6819
6817
|
_locale: locale,
|
|
6820
6818
|
}), 'DELETE', {
|
|
6821
6819
|
data: {
|
|
@@ -6841,7 +6839,7 @@ const CardPostPopoverMore = ({ authorEmail, onDeletePost, shareUrl, post, classN
|
|
|
6841
6839
|
}
|
|
6842
6840
|
}
|
|
6843
6841
|
else {
|
|
6844
|
-
const res = yield
|
|
6842
|
+
const res = yield utils.callApiWithAuth(utils.getApiPath(utils.PATHS.BOOKMARK.CREATE, {
|
|
6845
6843
|
_locale: locale,
|
|
6846
6844
|
}), 'POST', {
|
|
6847
6845
|
data: {
|
|
@@ -6907,10 +6905,10 @@ const CardPostPopoverMore = ({ authorEmail, onDeletePost, shareUrl, post, classN
|
|
|
6907
6905
|
description: t('morePopover.report.description'),
|
|
6908
6906
|
isShowheader: true,
|
|
6909
6907
|
type: 'list',
|
|
6910
|
-
list: Object.keys(
|
|
6908
|
+
list: Object.keys(constants.REPORT_REASON_MAP)
|
|
6911
6909
|
.map((k) => ({
|
|
6912
|
-
label:
|
|
6913
|
-
reason:
|
|
6910
|
+
label: constants.REPORT_REASON_MAP[k].label,
|
|
6911
|
+
reason: constants.REPORT_REASON_MAP[k].reportReasonText,
|
|
6914
6912
|
reasonValue: k,
|
|
6915
6913
|
}))
|
|
6916
6914
|
.map((item) => ({
|
|
@@ -6939,7 +6937,7 @@ const StyledCardPost$1 = styled__default["default"].div `
|
|
|
6939
6937
|
text-decoration: none;
|
|
6940
6938
|
}
|
|
6941
6939
|
|
|
6942
|
-
${utils.MediaQueries.mbDown} {
|
|
6940
|
+
${utils$1.MediaQueries.mbDown} {
|
|
6943
6941
|
margin-bottom: 8px;
|
|
6944
6942
|
}
|
|
6945
6943
|
&.flat-top {
|
|
@@ -6962,7 +6960,7 @@ const StyledCardPost$1 = styled__default["default"].div `
|
|
|
6962
6960
|
width: 40px;
|
|
6963
6961
|
height: 40px;
|
|
6964
6962
|
font-size: 20px;
|
|
6965
|
-
${utils.MediaQueries.mbDown} {
|
|
6963
|
+
${utils$1.MediaQueries.mbDown} {
|
|
6966
6964
|
width: 32px;
|
|
6967
6965
|
height: 32px;
|
|
6968
6966
|
font-size: 16px;
|
|
@@ -7018,7 +7016,7 @@ const StyledCardPost$1 = styled__default["default"].div `
|
|
|
7018
7016
|
}
|
|
7019
7017
|
&[data-most-engaging='true'] {
|
|
7020
7018
|
border: none;
|
|
7021
|
-
${utils.MediaQueries.mbDown} {
|
|
7019
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7022
7020
|
margin: 1rem;
|
|
7023
7021
|
border: 1px solid #e4e8ec;
|
|
7024
7022
|
}
|
|
@@ -7066,7 +7064,7 @@ const StyledCardPost$1 = styled__default["default"].div `
|
|
|
7066
7064
|
.popover-menu__btn {
|
|
7067
7065
|
width: 24px;
|
|
7068
7066
|
height: 24px;
|
|
7069
|
-
${utils.MediaQueries.mbDown} {
|
|
7067
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7070
7068
|
width: 18px;
|
|
7071
7069
|
height: 18px;
|
|
7072
7070
|
}
|
|
@@ -7078,7 +7076,7 @@ const StyledCardPost$1 = styled__default["default"].div `
|
|
|
7078
7076
|
right: 1rem;
|
|
7079
7077
|
}
|
|
7080
7078
|
width: 350px;
|
|
7081
|
-
${utils.MediaQueries.mbDown} {
|
|
7079
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7082
7080
|
max-width: calc(320px - 2rem);
|
|
7083
7081
|
}
|
|
7084
7082
|
}
|
|
@@ -7100,7 +7098,7 @@ const StyledCardPost$1 = styled__default["default"].div `
|
|
|
7100
7098
|
transform: translateX(-50%);
|
|
7101
7099
|
}
|
|
7102
7100
|
}
|
|
7103
|
-
${utils.MediaQueries.mbDown} {
|
|
7101
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7104
7102
|
margin-bottom: 12px;
|
|
7105
7103
|
}
|
|
7106
7104
|
}
|
|
@@ -7110,7 +7108,7 @@ var img$1 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width=
|
|
|
7110
7108
|
var IconDelete = img$1;
|
|
7111
7109
|
|
|
7112
7110
|
const CardReplyPopover = ({ onDeleteComment, commentId, className = '', popoverClassName = '', }) => {
|
|
7113
|
-
const { data: { env: { isMarryBaby }, locale, }, action: { pushNotifications }, } = React.useContext(
|
|
7111
|
+
const { data: { env: { isMarryBaby }, locale, }, action: { pushNotifications }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
7114
7112
|
const { t } = useTranslations.useTranslations();
|
|
7115
7113
|
const [isOpenLeavePopup, setIsOpenLeavePopup] = React.useState(false);
|
|
7116
7114
|
const { authActionWrapper } = useTogetherAuthRequiredAction();
|
|
@@ -7215,7 +7213,7 @@ const StyledListItems = styled__default["default"].div `
|
|
|
7215
7213
|
display: flex;
|
|
7216
7214
|
flex-wrap: wrap;
|
|
7217
7215
|
row-gap: 16px;
|
|
7218
|
-
${utils.MediaQueries.tdUp} {
|
|
7216
|
+
${utils$1.MediaQueries.tdUp} {
|
|
7219
7217
|
align-items: center;
|
|
7220
7218
|
column-gap: 24px;
|
|
7221
7219
|
}
|
|
@@ -7224,7 +7222,7 @@ const StyledItem$1 = styled__default["default"].a `
|
|
|
7224
7222
|
display: flex;
|
|
7225
7223
|
align-items: center;
|
|
7226
7224
|
gap: 16px;
|
|
7227
|
-
${utils.MediaQueries.mbDown} {
|
|
7225
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7228
7226
|
width: 100%;
|
|
7229
7227
|
justify-content: space-between;
|
|
7230
7228
|
}
|
|
@@ -7248,7 +7246,7 @@ const StyledThumb = styled__default["default"].div `
|
|
|
7248
7246
|
|
|
7249
7247
|
const RecommentCategories = ({ categories }) => {
|
|
7250
7248
|
const { t } = useTranslations.useTranslations();
|
|
7251
|
-
const { data: { locale, env: { isMarryBaby }, }, } = React.useContext(
|
|
7249
|
+
const { data: { locale, env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
7252
7250
|
const url = routing.getCurrentBaseUrl(locale, isMarryBaby);
|
|
7253
7251
|
return (React__default["default"].createElement(StyledContainer, null,
|
|
7254
7252
|
React__default["default"].createElement(StyledHeader, null,
|
|
@@ -7349,11 +7347,11 @@ const SourceList = (_a) => {
|
|
|
7349
7347
|
};
|
|
7350
7348
|
});
|
|
7351
7349
|
const listApi = [
|
|
7352
|
-
...listPaths.map((i) =>
|
|
7353
|
-
?
|
|
7350
|
+
...listPaths.map((i) => utils.callApi(i.isMarrySite
|
|
7351
|
+
? utils.getMarryBabyApiPath(utils.DISCOVER_PATHS.GET_PREVIEW_ARTICLE, {
|
|
7354
7352
|
fullSlug: i.path,
|
|
7355
7353
|
}, true)
|
|
7356
|
-
:
|
|
7354
|
+
: utils.getDiscoverApiPath(utils.DISCOVER_PATHS.GET_PREVIEW_ARTICLE, {
|
|
7357
7355
|
fullSlug: i.path,
|
|
7358
7356
|
}, true), 'GET')),
|
|
7359
7357
|
];
|
|
@@ -7361,7 +7359,7 @@ const SourceList = (_a) => {
|
|
|
7361
7359
|
setData(res
|
|
7362
7360
|
.map((i, index) => {
|
|
7363
7361
|
var _a, _b;
|
|
7364
|
-
return ((_a = i === null || i === void 0 ? void 0 : i.data) === null || _a === void 0 ? void 0 : _a.post) && Object.assign(Object.assign({},
|
|
7362
|
+
return ((_a = i === null || i === void 0 ? void 0 : i.data) === null || _a === void 0 ? void 0 : _a.post) && Object.assign(Object.assign({}, dataTransform.formatArticle((_b = i === null || i === void 0 ? void 0 : i.data) === null || _b === void 0 ? void 0 : _b.post)), { href: listPaths[index].href });
|
|
7365
7363
|
})
|
|
7366
7364
|
.filter(Boolean));
|
|
7367
7365
|
setLoading(false);
|
|
@@ -7373,14 +7371,14 @@ const SourceList = (_a) => {
|
|
|
7373
7371
|
categorySlug &&
|
|
7374
7372
|
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
7375
7373
|
var _a;
|
|
7376
|
-
const res = yield
|
|
7377
|
-
?
|
|
7374
|
+
const res = yield utils.callApi(isMarryBaby
|
|
7375
|
+
? utils.getMarryBabyApiPath(utils.DISCOVER_PATHS.GET_CATEGORY_OR_ARTICLE_DETAIL, {
|
|
7378
7376
|
fullSlug: categorySlug,
|
|
7379
7377
|
}, true)
|
|
7380
|
-
:
|
|
7378
|
+
: utils.getDiscoverApiPath(utils.DISCOVER_PATHS.GET_CATEGORY_OR_ARTICLE_DETAIL, {
|
|
7381
7379
|
fullSlug: categorySlug,
|
|
7382
7380
|
}, true), 'GET');
|
|
7383
|
-
(res === null || res === void 0 ? void 0 : res.data) && setCategories([
|
|
7381
|
+
(res === null || res === void 0 ? void 0 : res.data) && setCategories([dataTransform.formatCategory((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.category)]);
|
|
7384
7382
|
}))();
|
|
7385
7383
|
}, [data]);
|
|
7386
7384
|
const handleRemoveItem = (idx) => {
|
|
@@ -7480,7 +7478,7 @@ const StyledCardPost = styled__default["default"].div `
|
|
|
7480
7478
|
width: 40px;
|
|
7481
7479
|
height: 40px;
|
|
7482
7480
|
font-size: 20px;
|
|
7483
|
-
${utils.MediaQueries.mbDown} {
|
|
7481
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7484
7482
|
width: 32px;
|
|
7485
7483
|
height: 32px;
|
|
7486
7484
|
font-size: 16px;
|
|
@@ -7585,12 +7583,12 @@ const StyledCardPost = styled__default["default"].div `
|
|
|
7585
7583
|
}
|
|
7586
7584
|
|
|
7587
7585
|
margin-left: 56px;
|
|
7588
|
-
${utils.MediaQueries.mbDown} {
|
|
7586
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7589
7587
|
margin-left: 40px;
|
|
7590
7588
|
}
|
|
7591
7589
|
> .post-author {
|
|
7592
7590
|
margin-left: -56px;
|
|
7593
|
-
${utils.MediaQueries.mbDown} {
|
|
7591
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7594
7592
|
margin-left: -40px;
|
|
7595
7593
|
}
|
|
7596
7594
|
.author-info {
|
|
@@ -7608,7 +7606,7 @@ const StyledCardPost = styled__default["default"].div `
|
|
|
7608
7606
|
width: 40px;
|
|
7609
7607
|
height: 40px;
|
|
7610
7608
|
font-size: 20px;
|
|
7611
|
-
${utils.MediaQueries.mbDown} {
|
|
7609
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7612
7610
|
width: 24px;
|
|
7613
7611
|
height: 24px;
|
|
7614
7612
|
font-size: 12px;
|
|
@@ -7621,7 +7619,7 @@ const StyledCardPost = styled__default["default"].div `
|
|
|
7621
7619
|
width: 40px;
|
|
7622
7620
|
height: 40px;
|
|
7623
7621
|
font-size: 20px;
|
|
7624
|
-
${utils.MediaQueries.mbDown} {
|
|
7622
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7625
7623
|
width: 24px;
|
|
7626
7624
|
height: 24px;
|
|
7627
7625
|
font-size: 12px;
|
|
@@ -7649,12 +7647,12 @@ const StyledCardPost = styled__default["default"].div `
|
|
|
7649
7647
|
.post-content-wrapper {
|
|
7650
7648
|
padding-top: 0;
|
|
7651
7649
|
padding-bottom: 0;
|
|
7652
|
-
${utils.MediaQueries.mbDown} {
|
|
7650
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7653
7651
|
padding-left: 0.5rem;
|
|
7654
7652
|
}
|
|
7655
7653
|
}
|
|
7656
7654
|
|
|
7657
|
-
${utils.MediaQueries.mbDown} {
|
|
7655
|
+
${utils$1.MediaQueries.mbDown} {
|
|
7658
7656
|
margin-bottom: 12px;
|
|
7659
7657
|
}
|
|
7660
7658
|
}
|
|
@@ -7696,7 +7694,7 @@ var ChevronRightActive = img;
|
|
|
7696
7694
|
const COMMENT_LIMIT = 4;
|
|
7697
7695
|
const CardReply = ({ className, style, comment: CommentProps, type = 'comment', level = 0, replyingId, onPostCommentSuccess, post, onDeleteComment, refetchComment, hasQuickBookingEnable, handleMakeAppointment, cardAuthorProps, maxChars = 600, disableShortenContent, }) => {
|
|
7698
7696
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
7699
|
-
const { data: { locale, userInfo, env: { isMarryBaby }, }, } = React.useContext(
|
|
7697
|
+
const { data: { locale, userInfo, env: { isMarryBaby }, }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
7700
7698
|
const { t } = useTranslations.useTranslations();
|
|
7701
7699
|
const [comment, setComment] = React.useState(CommentProps || null);
|
|
7702
7700
|
const { id, countLikes, content, replies = [], images = [], author, liked, link, mentionedUser, mentions, } = comment;
|
|
@@ -7770,7 +7768,7 @@ const CardReply = ({ className, style, comment: CommentProps, type = 'comment',
|
|
|
7770
7768
|
if (author === null || author === void 0 ? void 0 : author.hospitalId) {
|
|
7771
7769
|
const fetchHospitalDetail = (hospitalId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
7772
7770
|
var _a;
|
|
7773
|
-
const response = yield
|
|
7771
|
+
const response = yield utils.callApi(utils.getCarePath(utils.CARE_PATHS.GET_HOSPITAL_INFO, {
|
|
7774
7772
|
hospital_branch_id: hospitalId,
|
|
7775
7773
|
website_url: index$4.domainLocales[locale],
|
|
7776
7774
|
}), 'get');
|
|
@@ -7783,7 +7781,7 @@ const CardReply = ({ className, style, comment: CommentProps, type = 'comment',
|
|
|
7783
7781
|
if (author === null || author === void 0 ? void 0 : author.doctorId) {
|
|
7784
7782
|
const fetchDoctorDetail = (doctorId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
7785
7783
|
var _b;
|
|
7786
|
-
const response = yield
|
|
7784
|
+
const response = yield utils.callApi(utils.getCarePath(utils.CARE_PATHS.GET_DOCTOR_INFO, {
|
|
7787
7785
|
doctorId: doctorId,
|
|
7788
7786
|
website_url: index$4.domainLocales[locale],
|
|
7789
7787
|
}), 'get');
|
|
@@ -7864,25 +7862,25 @@ const CardReply = ({ className, style, comment: CommentProps, type = 'comment',
|
|
|
7864
7862
|
|
|
7865
7863
|
const getMostEngagingComment = (postId, locale) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
7866
7864
|
var _a, _b, _c;
|
|
7867
|
-
const commentsRes = yield
|
|
7865
|
+
const commentsRes = yield utils.callApiWithOptionalAuth(utils.getApiPath(utils.PATHS.COMMENT.LIST, {
|
|
7868
7866
|
postId: postId,
|
|
7869
7867
|
_locale: locale,
|
|
7870
7868
|
sort: 'popularity',
|
|
7871
7869
|
perPage: 1,
|
|
7872
7870
|
withoutReply: 1,
|
|
7873
7871
|
}), 'GET');
|
|
7874
|
-
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(
|
|
7872
|
+
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(dataTransform.formatComment)) === null || _c === void 0 ? void 0 : _c[0];
|
|
7875
7873
|
});
|
|
7876
7874
|
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, }) => {
|
|
7877
7875
|
const [post, setPost] = React.useState(postProp);
|
|
7878
7876
|
const [isOpenSharePopup, setIsOpenSharePopup] = React.useState(false);
|
|
7879
7877
|
const [mostEngagingComment, setMostEngagingComment] = React.useState(mostEngagingCommentProp);
|
|
7880
7878
|
const { community, topics, author, slug, isPin, liked, photos, mentions, title, description, previewUrl, likesCount, commentsCount, id, commented, } = post;
|
|
7881
|
-
const { data: { locale, env: { isMarryBaby, togetherBasePath }, }, action: { pushNotifications }, } = React.useContext(
|
|
7879
|
+
const { data: { locale, env: { isMarryBaby, togetherBasePath }, }, action: { pushNotifications }, } = React.useContext(utils.TogetherComponentGlobalContext);
|
|
7882
7880
|
const { t } = useTranslations.useTranslations();
|
|
7883
7881
|
const [showInputComment, setShowInputComment] = React.useState(propsShowInputComment);
|
|
7884
7882
|
const postRelativeHref = `${togetherBasePath}/${(community === null || community === void 0 ? void 0 : community.slug) || '_'}/${slug || ''}`;
|
|
7885
|
-
const postHref = `${
|
|
7883
|
+
const postHref = `${utils.getCurrentBaseUrl(locale)}${postRelativeHref}`;
|
|
7886
7884
|
const { authActionWrapper } = useTogetherAuthRequiredAction((community === null || community === void 0 ? void 0 : community.slug)
|
|
7887
7885
|
? {
|
|
7888
7886
|
_joinCommunityIds: [community.id],
|
|
@@ -7904,9 +7902,9 @@ const CardPost = ({ className, style, hideViewMoreComment, showMostEngaging, onC
|
|
|
7904
7902
|
if (author === null || author === void 0 ? void 0 : author.hospitalId) {
|
|
7905
7903
|
const fetchHospitalDetail = (hospitalId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
7906
7904
|
var _a;
|
|
7907
|
-
const response = yield
|
|
7905
|
+
const response = yield utils.callApi(utils.getCarePath(utils.CARE_PATHS.GET_HOSPITAL_INFO, {
|
|
7908
7906
|
hospital_branch_id: hospitalId,
|
|
7909
|
-
website_url:
|
|
7907
|
+
website_url: utils.domainLocales[locale],
|
|
7910
7908
|
}), 'get');
|
|
7911
7909
|
if ((_a = response === null || response === void 0 ? void 0 : response._data) === null || _a === void 0 ? void 0 : _a.branch) {
|
|
7912
7910
|
setHospitalInfo(response === null || response === void 0 ? void 0 : response._data.branch);
|
|
@@ -7917,9 +7915,9 @@ const CardPost = ({ className, style, hideViewMoreComment, showMostEngaging, onC
|
|
|
7917
7915
|
if (author === null || author === void 0 ? void 0 : author.doctorId) {
|
|
7918
7916
|
const fetchDoctorDetail = (doctorId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
7919
7917
|
var _b;
|
|
7920
|
-
const response = yield
|
|
7918
|
+
const response = yield utils.callApi(utils.getCarePath(utils.CARE_PATHS.GET_DOCTOR_INFO, {
|
|
7921
7919
|
doctorId: doctorId,
|
|
7922
|
-
website_url:
|
|
7920
|
+
website_url: utils.domainLocales[locale],
|
|
7923
7921
|
}), 'get');
|
|
7924
7922
|
if ((_b = response === null || response === void 0 ? void 0 : response._data) === null || _b === void 0 ? void 0 : _b.doctor) {
|
|
7925
7923
|
setDoctorInfo(response === null || response === void 0 ? void 0 : response._data.doctor);
|
|
@@ -7970,7 +7968,7 @@ const CardPost = ({ className, style, hideViewMoreComment, showMostEngaging, onC
|
|
|
7970
7968
|
// _location: postHref,
|
|
7971
7969
|
}
|
|
7972
7970
|
: undefined },
|
|
7973
|
-
isOpenSharePopup && (React__default["default"].createElement(SharePopup, { url: postHref, avatar:
|
|
7971
|
+
isOpenSharePopup && (React__default["default"].createElement(SharePopup, { url: postHref, avatar: constants.DEFAULT_IMG, text: title, onClose: () => setIsOpenSharePopup(false) })),
|
|
7974
7972
|
React__default["default"].createElement(StyledCardPost$1, { className: className, style: style, "data-is-marrybaby": isMarryBaby },
|
|
7975
7973
|
isPin ? React__default["default"].createElement(LabelPin, { className: "post-pin" }) : null,
|
|
7976
7974
|
React__default["default"].createElement("div", { style: { position: 'relative', padding: '1rem 1rem 0' } },
|