@hhgtech/hhg-components 1.29.255-beta-1 → 1.29.255-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{LastPeriod-a49e09ac.js → LastPeriod-e978edf6.js} +1 -1
- package/build/{MobileBottomNavigationIcon-a9f285f8.js → MobileBottomNavigationIcon-f5f8912a.js} +3 -3
- package/build/{Spinner-661cd614.js → Spinner-261ca12b.js} +1 -1
- package/build/{WhatsApp-339413d1.js → WhatsApp-1e25de7e.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +49 -49
- package/build/babyGrowth.js +83 -83
- package/build/cache.js +2 -2
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components.js +114 -114
- package/build/{constants-6e3dc4eb.js → constants-9221f489.js} +1 -1
- package/build/constants.js +3 -3
- package/build/constantsDomainLocales.js +1 -1
- package/build/constantsRiskScreener.js +2 -2
- package/build/constantsSite.js +2 -2
- package/build/{core-501219e2.js → core-2eca7a56.js} +1 -1
- package/build/{dataTransform-4a308e0b.js → dataTransform-92d8add2.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-a8b0af34.js → editor-4a8f53ef.js} +30 -19
- package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{LastPeriod-56e551d6.js → LastPeriod-079996eb.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-33fd3156.js → MobileBottomNavigationIcon-7c987843.js} +3 -3
- package/build/esm/{Spinner-e2ea892f.js → Spinner-3aebab92.js} +1 -1
- package/build/esm/{WhatsApp-a666172c.js → WhatsApp-f98c35ac.js} +1 -1
- package/build/esm/adapters.js +19 -19
- package/build/esm/atoms.js +46 -46
- package/build/esm/babyGrowth.js +83 -83
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components.js +90 -90
- package/build/esm/{constants-dfbb02bb.js → constants-9bf6d063.js} +1 -1
- package/build/esm/constants.js +3 -3
- package/build/esm/constantsDomainLocales.js +1 -1
- package/build/esm/constantsRiskScreener.js +2 -2
- package/build/esm/constantsSite.js +2 -2
- package/build/esm/{core-4744f6f3.js → core-56a5f8a1.js} +1 -1
- package/build/esm/{dataTransform-9db75e68.js → dataTransform-04bb1b6b.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-1909a687.js → editor-10538ef7.js} +30 -19
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
- package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
- package/build/esm/{fixedBottomAdBlock-ed7ed4e2.js → fixedBottomAdBlock-9aec1c7f.js} +24 -23
- package/build/esm/footer.js +21 -21
- package/build/esm/gAssets.js +2 -2
- package/build/esm/healthToolsCardWrapper.js +18 -18
- package/build/esm/healthToolsForm.js +33 -33
- package/build/esm/hooks/usePreview.d.ts +16 -0
- package/build/esm/hooks.js +13 -13
- package/build/esm/i18n/translationKeys.d.ts +1 -1
- package/build/esm/i18n-values/en-PH.js +19 -0
- package/build/esm/i18n-values/hi-IN.js +19 -0
- package/build/esm/i18n-values/id-ID.js +19 -0
- package/build/esm/i18n-values/km-KH.js +20 -1
- package/build/esm/i18n-values/ms-MY.js +19 -0
- package/build/esm/i18n-values/my-MM.js +19 -0
- package/build/esm/i18n-values/th-TH.js +19 -0
- package/build/esm/i18n-values/tl-PH.js +19 -0
- package/build/esm/i18n-values/vi-VN.js +21 -1
- package/build/esm/i18n-values/vi-VN_MB.js +21 -1
- package/build/esm/i18n-values/zh-TW.js +22 -2
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-c673db76.js → index-057f2d1e.js} +2 -2
- package/build/esm/{index-1238c5b2.js → index-0756189f.js} +1 -1
- package/build/esm/{index-9f130a7f.js → index-08173da2.js} +6 -6
- package/build/esm/{index-559a0e6c.js → index-0ad66e2a.js} +16 -16
- package/build/esm/{index-e097a083.js → index-0ca935e6.js} +17 -17
- package/build/esm/{index-f68089de.js → index-0d6026dd.js} +2 -2
- package/build/esm/{index-01a221d1.js → index-1279323a.js} +15 -16
- package/build/esm/{index-e9050315.js → index-14226fb8.js} +13 -13
- package/build/esm/{index-1e71f4d7.js → index-14c2df62.js} +16 -16
- package/build/esm/{index-dc16bdc0.js → index-1641f810.js} +3 -3
- package/build/esm/index-1aa56c6c.js +1588 -0
- package/build/esm/{index-e7672482.js → index-233a4b0d.js} +21 -21
- package/build/esm/{index-abc47616.js → index-296a5f9a.js} +16 -16
- package/build/esm/{index-5d76c658.js → index-2e250193.js} +23 -6
- package/build/esm/{index-333f6856.js → index-364b0558.js} +7 -7
- package/build/esm/{index-85fe2034.js → index-38d50b59.js} +2 -2
- package/build/esm/{index-fa000615.js → index-3d881675.js} +13 -13
- package/build/esm/{index-fd84432b.js → index-3f9bbff5.js} +2 -2
- package/build/esm/{index-6231daa6.js → index-4586a7e6.js} +10 -10
- package/build/esm/{index-27b67e91.js → index-4d27d4d5.js} +17 -17
- package/build/esm/{index-43894578.js → index-55d2ff10.js} +2 -2
- package/build/esm/{index-feb05153.js → index-65bf5308.js} +16 -15
- package/build/esm/{index-33515e5d.js → index-65eb86b8.js} +3 -3
- package/build/esm/{index-e78813d5.js → index-6c4793d3.js} +24 -24
- package/build/esm/{index-9f27b7f4.js → index-6cd3f5e8.js} +15 -15
- package/build/esm/{index-1898da73.js → index-6d78a8a7.js} +2 -2
- package/build/esm/{index-0f4fba5c.js → index-78b3180a.js} +1 -1
- package/build/esm/{index-72976151.js → index-78b6be16.js} +3 -3
- package/build/esm/{index-1b795ea9.js → index-7e8aa571.js} +1 -1
- package/build/esm/{index-f8e0219d.js → index-7eb25449.js} +51 -45
- package/build/esm/{index-638cd733.js → index-819907ad.js} +3 -3
- package/build/esm/{index-63354509.js → index-85fddfd7.js} +1 -1
- package/build/esm/{index-c244d627.js → index-8ca04504.js} +1 -1
- package/build/esm/{index-c027fd0f.js → index-8f2e9737.js} +13 -13
- package/build/esm/{index-980ec7b9.js → index-8f716c39.js} +2 -2
- package/build/esm/{index-12fa6251.js → index-9711efd0.js} +4 -4
- package/build/esm/{index-5f0e8146.js → index-98c3fc54.js} +2 -2
- package/build/esm/{index-31369166.js → index-9927839b.js} +6 -6
- package/build/esm/{index-1d13b259.js → index-a2d9e627.js} +3 -3
- package/build/esm/{index-de634c83.js → index-a595566d.js} +11 -12
- package/build/esm/{index-d7c755b0.js → index-a60a7164.js} +146 -146
- package/build/esm/{index-d5632995.js → index-afea9eed.js} +1 -1
- package/build/esm/{index-386913a0.js → index-b0bd9cb3.js} +1 -1
- package/build/esm/{index-52d845a4.js → index-b6896227.js} +6 -6
- package/build/esm/{index-a064e7e2.js → index-c196772c.js} +3 -3
- package/build/esm/{index-28ada555.js → index-cae39c98.js} +1 -1
- package/build/esm/{index-de9892e3.js → index-cec1bbdc.js} +2 -2
- package/build/esm/{index-63a7f6e0.js → index-cf637bb0.js} +17 -17
- package/build/esm/{index-9208e3bb.js → index-cff54956.js} +30 -30
- package/build/esm/{index-64ceb47f.js → index-d63e0760.js} +2 -2
- package/build/esm/{index-99134425.js → index-d6986ca4.js} +13 -13
- package/build/esm/{index-e4c9d352.js → index-d9364bb7.js} +5 -5
- package/build/esm/{index-7374342d.js → index-dd765da5.js} +18 -18
- package/build/esm/{index-6577c177.js → index-e466cbf4.js} +213 -132
- package/build/esm/{index-d10a5a55.js → index-e57c93fa.js} +3 -3
- package/build/esm/{index-41e2e754.js → index-e5c5350b.js} +2 -2
- package/build/esm/{index-485a662c.js → index-e92c278a.js} +7 -7
- package/build/esm/{index-5ec12ba9.js → index-f0fa0bcd.js} +1 -1
- package/build/esm/{index-520d2095.js → index-f7477ebe.js} +5 -5
- package/build/esm/{index-59e6c9c3.js → index-f993926f.js} +2 -2
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +112 -112
- package/build/esm/index.styles-eab929da.js +35 -0
- package/build/esm/interfaces/types/index.d.ts +1 -1
- package/build/esm/{labelSorting-cf27ba75.js → labelSorting-acef7ac3.js} +4 -4
- package/build/esm/lead.js +24 -24
- package/build/esm/{logoIcon-ba7fdeb5.js → logoIcon-5aa1e54b.js} +2 -2
- package/build/esm/mantine.js +25 -25
- package/build/esm/misc.js +16 -16
- package/build/esm/miscGetDynamicHealthTool.js +4 -4
- package/build/esm/miscGetSocialList.js +8 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +69 -69
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +16 -16
- package/build/esm/navigation.js +40 -40
- package/build/esm/navigationLogoutPopup.js +9 -9
- package/build/esm/navigationProfileButton.js +23 -23
- package/build/esm/onboardingV2.js +29 -29
- package/build/esm/organisms.js +44 -44
- package/build/esm/{post-6b45ad4f.js → post-e0ff144e.js} +3 -3
- package/build/esm/profileNavigation.js +19 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -22
- package/build/esm/ssoV2.js +26 -26
- package/build/esm/{store-7c55f360.js → store-f24285e6.js} +3 -3
- package/build/esm/subot.js +33 -33
- package/build/esm/surveyOrPremiumBanner.js +31 -31
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-bade79b4.js → surveyThankyouCard-270b1fef.js} +5 -5
- package/build/esm/together/assets/icons/Ask.d.ts +7 -0
- package/build/esm/together/components/atoms/cardReactions/index.d.ts +2 -1
- package/build/esm/together/components/molecules/createNewPostContent/index.d.ts +6 -2
- package/build/esm/together/components/molecules/createNewPostContent/index.styled.d.ts +4 -0
- package/build/esm/together/components/molecules/createNewPostContent/type.d.ts +4 -0
- package/build/esm/together/components/molecules/createPostCommunity/index.d.ts +25 -0
- package/build/esm/together/components/molecules/createPostCommunity/index.styled.d.ts +9 -0
- package/build/esm/together/components/molecules/createPostCommunity/index.styles.d.ts +12 -0
- package/build/esm/together/components/molecules/createPostDescription/index.d.ts +2 -1
- package/build/esm/together/components/molecules/createPostPhotos/index.d.ts +7 -0
- package/build/esm/together/components/molecules/createPostVideo/index.d.ts +8 -0
- package/build/esm/together/components/molecules/createPostVideo/socialLinkPopup/index.d.ts +12 -0
- package/build/esm/together/components/molecules/createPostVideo/socialLinkPopup/index.styled.d.ts +15 -0
- package/build/esm/together/components/molecules/postPhotosReview/index.d.ts +8 -0
- package/build/esm/together/components/molecules/postPhotosReview/index.styled.d.ts +5 -0
- package/build/esm/together/components/molecules/postPhotosReview/index.styles.d.ts +12 -0
- package/build/esm/together/components/molecules/postVideoReview/index.d.ts +10 -0
- package/build/esm/together/components/molecules/postVideoReview/index.styled.d.ts +5 -0
- package/build/esm/together/components/molecules/postVideoReview/index.styles.d.ts +12 -0
- package/build/esm/together/components/organisms/cardPost/cardPostPopover.d.ts +1 -1
- package/build/esm/together/components/organisms/cardPost/index.d.ts +2 -1
- package/build/esm/together.js +53 -52
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +30 -30
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +48 -47
- package/build/esm/togetherMoleculesCardAuthor.js +27 -27
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +37 -37
- package/build/esm/togetherOrganisms.js +47 -47
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +15 -12
- package/build/esm/{treePopoverMenu-f50ac599.js → treePopoverMenu-55dd0cf6.js} +27 -27
- package/build/esm/{types-98c0eb4f.js → types-3173cc94.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-1ad6f5bd.js → useCategory-e8f7ddf8.js} +5 -5
- package/build/esm/{useHealthToolCache-c202d504.js → useHealthToolCache-2cba8952.js} +1 -1
- package/build/esm/{useMantineLocale-fbe0d85f.js → useMantineLocale-897de7b5.js} +5 -5
- package/build/esm/{usePlacesAutocomplete-e46d35f4.js → usePlacesAutocomplete-b1a4d70d.js} +1 -1
- package/build/esm/useScreenSize-72a6e414.js +50 -0
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-ea08e466.js → utils-226da7e7.js} +2 -2
- package/build/esm/{utils-03c20d75.js → utils-63a40dac.js} +2 -2
- package/build/esm/{utils-a30adc88.js → utils-d7a79b14.js} +4 -4
- package/build/esm/vaccination.js +21 -21
- package/build/{fixedBottomAdBlock-0d90f775.js → fixedBottomAdBlock-77d47ed1.js} +25 -24
- package/build/footer.js +21 -21
- package/build/gAssets.js +2 -2
- package/build/healthToolsCardWrapper.js +18 -18
- package/build/healthToolsForm.js +33 -33
- package/build/hooks/usePreview.d.ts +16 -0
- package/build/hooks.js +13 -13
- package/build/i18n/translationKeys.d.ts +1 -1
- package/build/i18n-values/en-PH.js +19 -0
- package/build/i18n-values/hi-IN.js +19 -0
- package/build/i18n-values/id-ID.js +19 -0
- package/build/i18n-values/km-KH.js +20 -1
- package/build/i18n-values/ms-MY.js +19 -0
- package/build/i18n-values/my-MM.js +19 -0
- package/build/i18n-values/th-TH.js +19 -0
- package/build/i18n-values/tl-PH.js +19 -0
- package/build/i18n-values/vi-VN.js +21 -1
- package/build/i18n-values/vi-VN_MB.js +21 -1
- package/build/i18n-values/zh-TW.js +22 -2
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-1e59ac18.js → index-024879f9.js} +2 -2
- package/build/{index-0a8fd916.js → index-06890150.js} +2 -2
- package/build/{index-e26057ef.js → index-0af1a89b.js} +2 -2
- package/build/{index-c39f90c0.js → index-1186fa5d.js} +1 -1
- package/build/{index-600be142.js → index-120a5070.js} +30 -30
- package/build/{index-94a2380e.js → index-123951cf.js} +23 -6
- package/build/{index-40968de6.js → index-1701cefe.js} +13 -13
- package/build/{index-a36ae2dd.js → index-176bf9ce.js} +2 -2
- package/build/{index-8875bd63.js → index-211f83c7.js} +2 -2
- package/build/{index-1b6ff5d2.js → index-2473a275.js} +3 -3
- package/build/{index-9c30fb0f.js → index-257127f0.js} +15 -15
- package/build/{index-cbf8013f.js → index-2987ce11.js} +1 -1
- package/build/{index-b7771139.js → index-2aae5e03.js} +3 -3
- package/build/{index-1193605d.js → index-2b1586aa.js} +13 -13
- package/build/{index-d9e2317d.js → index-2c4a10c7.js} +2 -2
- package/build/{index-359555bb.js → index-2f425921.js} +63 -63
- package/build/{index-e7f40c6c.js → index-3048d656.js} +3 -3
- package/build/{index-fce1fbe0.js → index-35d69f6d.js} +3 -3
- package/build/{index-876b0554.js → index-36fb2a30.js} +6 -6
- package/build/{index-c05017fc.js → index-37948e56.js} +18 -18
- package/build/index-3e80af41.js +1602 -0
- package/build/{index-ab91b4aa.js → index-41fe3c8c.js} +16 -16
- package/build/{index-417c9098.js → index-436b0626.js} +7 -7
- package/build/{index-0fbb70e6.js → index-4757077a.js} +147 -147
- package/build/{index-e8085041.js → index-4e3b8553.js} +2 -2
- package/build/{index-1d2f7127.js → index-4e4b2fec.js} +1 -1
- package/build/{index-0fb405b1.js → index-51f51570.js} +3 -3
- package/build/{index-b7f8ef88.js → index-52d4c791.js} +12 -12
- package/build/{index-bbcb1695.js → index-587c0854.js} +1 -1
- package/build/{index-99663cb3.js → index-5b9089ad.js} +17 -17
- package/build/{index-b79fefb7.js → index-642504fb.js} +10 -10
- package/build/{index-ead61105.js → index-704aca93.js} +213 -132
- package/build/{index-cbc3d699.js → index-7a2f707e.js} +2 -2
- package/build/{index-7fc1402c.js → index-8080f047.js} +13 -13
- package/build/{index-79d8be3f.js → index-808cfcbf.js} +2 -2
- package/build/{index-92f73c98.js → index-83dfec88.js} +2 -2
- package/build/{index-9cc8a110.js → index-84ea2727.js} +17 -17
- package/build/{index-2f965d34.js → index-88c46691.js} +13 -13
- package/build/{index-23482812.js → index-8c1c9ab3.js} +2 -2
- package/build/{index-ffe46049.js → index-97b39f68.js} +3 -3
- package/build/{index-0c9daa95.js → index-99784eb3.js} +1 -1
- package/build/{index-5c72b88a.js → index-9b459b73.js} +5 -5
- package/build/{index-7470b041.js → index-a3488c7c.js} +5 -5
- package/build/{index-ebf999c6.js → index-a9a1f171.js} +3 -3
- package/build/{index-4c1df74e.js → index-b0e50283.js} +50 -44
- package/build/{index-f6e67f1a.js → index-b13987b2.js} +1 -1
- package/build/{index-ec5786d9.js → index-b4452e14.js} +20 -21
- package/build/{index-e9cd2fc3.js → index-b4d5f71d.js} +2 -2
- package/build/{index-6e7190c1.js → index-b54c0584.js} +45 -46
- package/build/{index-a13ac487.js → index-ba506126.js} +2 -2
- package/build/{index-4775a6e3.js → index-bbbcd8fd.js} +4 -4
- package/build/{index-f5ceb6c4.js → index-be099908.js} +16 -16
- package/build/{index-efc112b4.js → index-cb3cbc02.js} +20 -20
- package/build/{index-b6f472df.js → index-cf80bf25.js} +50 -50
- package/build/{index-f378d164.js → index-d43aeb0f.js} +16 -16
- package/build/{index-ff414a50.js → index-d941c26d.js} +1 -1
- package/build/{index-e5b8cfe3.js → index-e6ebebfe.js} +6 -6
- package/build/{index-acce4797.js → index-eda91895.js} +1 -1
- package/build/{index-7964ea1e.js → index-f2d7d476.js} +17 -17
- package/build/{index-1c77f9c8.js → index-fc5e0fbe.js} +18 -17
- package/build/index.css +1 -1
- package/build/index.js +157 -157
- package/build/index.styles-d7aa47c6.js +37 -0
- package/build/interfaces/types/index.d.ts +1 -1
- package/build/{labelSorting-e5b411c3.js → labelSorting-7d1252e2.js} +4 -4
- package/build/lead.js +24 -24
- package/build/{logoIcon-4380c43d.js → logoIcon-6e1dee46.js} +3 -3
- package/build/mantine.js +22 -22
- package/build/misc.js +16 -16
- package/build/miscGetDynamicHealthTool.js +4 -4
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +69 -69
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +18 -18
- package/build/navigation.js +40 -40
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +23 -23
- package/build/onboardingV2.js +31 -31
- package/build/organisms.js +44 -44
- package/build/{post-5377dd29.js → post-32e0928d.js} +2 -2
- package/build/profileNavigation.js +19 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -22
- package/build/ssoV2.js +25 -25
- package/build/{store-19323e07.js → store-49419a3e.js} +3 -3
- package/build/subot.js +32 -32
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-bdfceda3.js → surveyThankyouCard-e3b96ecc.js} +5 -5
- package/build/together/assets/icons/Ask.d.ts +7 -0
- package/build/together/components/atoms/cardReactions/index.d.ts +2 -1
- package/build/together/components/molecules/createNewPostContent/index.d.ts +6 -2
- package/build/together/components/molecules/createNewPostContent/index.styled.d.ts +4 -0
- package/build/together/components/molecules/createNewPostContent/type.d.ts +4 -0
- package/build/together/components/molecules/createPostCommunity/index.d.ts +25 -0
- package/build/together/components/molecules/createPostCommunity/index.styled.d.ts +9 -0
- package/build/together/components/molecules/createPostCommunity/index.styles.d.ts +12 -0
- package/build/together/components/molecules/createPostDescription/index.d.ts +2 -1
- package/build/together/components/molecules/createPostPhotos/index.d.ts +7 -0
- package/build/together/components/molecules/createPostVideo/index.d.ts +8 -0
- package/build/together/components/molecules/createPostVideo/socialLinkPopup/index.d.ts +12 -0
- package/build/together/components/molecules/createPostVideo/socialLinkPopup/index.styled.d.ts +15 -0
- package/build/together/components/molecules/postPhotosReview/index.d.ts +8 -0
- package/build/together/components/molecules/postPhotosReview/index.styled.d.ts +5 -0
- package/build/together/components/molecules/postPhotosReview/index.styles.d.ts +12 -0
- package/build/together/components/molecules/postVideoReview/index.d.ts +10 -0
- package/build/together/components/molecules/postVideoReview/index.styled.d.ts +5 -0
- package/build/together/components/molecules/postVideoReview/index.styles.d.ts +12 -0
- package/build/together/components/organisms/cardPost/cardPostPopover.d.ts +1 -1
- package/build/together/components/organisms/cardPost/index.d.ts +2 -1
- package/build/together.js +53 -52
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +48 -47
- package/build/togetherMoleculesCardAuthor.js +27 -27
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +37 -37
- package/build/togetherOrganisms.js +47 -47
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +19 -16
- package/build/{treePopoverMenu-90e6c497.js → treePopoverMenu-d7d7606d.js} +28 -28
- package/build/{types-82089964.js → types-9019cbf8.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-5d620b0c.js → useCategory-730ad168.js} +5 -5
- package/build/{useHealthToolCache-42764d8b.js → useHealthToolCache-40f11368.js} +1 -1
- package/build/{useMantineLocale-df553a85.js → useMantineLocale-07f0e967.js} +5 -5
- package/build/{usePlacesAutocomplete-c0d7e519.js → usePlacesAutocomplete-925da3d8.js} +1 -1
- package/build/{index-94c7aa0a.js → useScreenSize-377d423a.js} +30 -1
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-5abd04f3.js → utils-00bc3b27.js} +3 -3
- package/build/{utils-73b2a15c.js → utils-047b33e2.js} +2 -2
- package/build/{utils-831595ab.js → utils-2e2fb97e.js} +2 -2
- package/build/vaccination.js +25 -25
- package/package.json +1 -1
- package/build/esm/index-e09202bf.js +0 -22
- package/build/esm/index-e4d7c08b.js +0 -913
- package/build/esm/index.styles-c8f0bcdf.js +0 -64
- package/build/index-afe2faf7.js +0 -927
- package/build/index.styles-07513b4a.js +0 -67
- /package/build/{BMI_BOYS.percentile.monthly-b194da14.js → BMI_BOYS.percentile.monthly-90c63d14.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-ec6c69d3.js → BMI_BOYS.percentile.weekly-e07825ff.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-46719ff5.js → BMI_BOYS.percentile.yearly-ecfb4811.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-482901d6.js → BMI_BOYS.zscore.monthly-cc7c89e1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-225568de.js → BMI_BOYS.zscore.weekly-6dd1da70.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-a252a912.js → BMI_BOYS.zscore.yearly-254f7b56.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-4d8b4eb2.js → BMI_GIRLS.percentile.monthly-ba7eab70.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-af009b15.js → BMI_GIRLS.percentile.weekly-de9e1b2a.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-542dbed5.js → BMI_GIRLS.percentile.yearly-59c82a18.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-26d46964.js → BMI_GIRLS.zscore.monthly-0c152106.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-9257075f.js → BMI_GIRLS.zscore.weekly-dac29565.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-68890e63.js → BMI_GIRLS.zscore.yearly-28f3b883.js} +0 -0
- /package/build/{ChevronDown-f564cb15.js → ChevronDown-7faa448b.js} +0 -0
- /package/build/{Close-55b74750.js → Close-2d5f227e.js} +0 -0
- /package/build/{Google-b46681e7.js → Google-749907f2.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-728d94f7.js → HEAD CIRCUM_BOYS.percentile.monthly-b6fc017c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-a38b311c.js → HEAD CIRCUM_BOYS.percentile.weekly-786cca3b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-35572fa8.js → HEAD CIRCUM_BOYS.percentile.yearly-84c22b3d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-c0635989.js → HEAD CIRCUM_BOYS.zscore.monthly-2d11ed07.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-6a3237d7.js → HEAD CIRCUM_BOYS.zscore.weekly-54d2199b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-eb40dca6.js → HEAD CIRCUM_BOYS.zscore.yearly-73601e98.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-df1ef165.js → HEAD CIRCUM_GIRLS.percentile.monthly-8a06ec52.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-97861dd8.js → HEAD CIRCUM_GIRLS.percentile.weekly-abec48a9.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-9a492044.js → HEAD CIRCUM_GIRLS.percentile.yearly-d31d9558.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-ce9baa14.js → HEAD CIRCUM_GIRLS.zscore.monthly-f7e55982.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-1d352768.js → HEAD CIRCUM_GIRLS.zscore.weekly-d7518680.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-e18972a5.js → HEAD CIRCUM_GIRLS.zscore.yearly-ad98b487.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-945641ff.js → HEIGHT_BOYS.percentile.monthly-f759334e.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-2b2a0983.js → HEIGHT_BOYS.percentile.weekly-acb7807a.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-f4ec49b8.js → HEIGHT_BOYS.percentile.yearly-345c714c.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-d8f097fd.js → HEIGHT_BOYS.zscore.monthly-e9127ee2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-ca870d22.js → HEIGHT_BOYS.zscore.weekly-b3e40201.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-52355027.js → HEIGHT_BOYS.zscore.yearly-3bdfcd03.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-9d423433.js → HEIGHT_GIRLS.percentile.monthly-b5c12e56.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-a455b76d.js → HEIGHT_GIRLS.percentile.weekly-6efa19c7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-059d0a18.js → HEIGHT_GIRLS.percentile.yearly-efb45d46.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-3b7683a4.js → HEIGHT_GIRLS.zscore.monthly-ea34114e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-b14b42d5.js → HEIGHT_GIRLS.zscore.weekly-741873c2.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-20c7e5c6.js → HEIGHT_GIRLS.zscore.yearly-4954cc77.js} +0 -0
- /package/build/{Locale-bcde8996.js → Locale-7bb0fc27.js} +0 -0
- /package/build/{Visible-2bb88c95.js → Visible-0f5c8717.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-85c444cc.js → WEIGHT_BOYS.percentile.monthly-c692a394.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-a47b4ed2.js → WEIGHT_BOYS.percentile.weekly-c5810888.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-374b1995.js → WEIGHT_BOYS.percentile.yearly-42f18fc2.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-44e2f2e7.js → WEIGHT_BOYS.zscore.monthly-416af87d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-b08c0f41.js → WEIGHT_BOYS.zscore.weekly-2b0e2165.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-5921b3a0.js → WEIGHT_BOYS.zscore.yearly-9d382ca9.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-984bf7ce.js → WEIGHT_GIRLS.percentile.monthly-466d3860.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-2cb8fb73.js → WEIGHT_GIRLS.percentile.weekly-833a1be5.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-6c98923d.js → WEIGHT_GIRLS.percentile.yearly-f789982a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-ed2c531e.js → WEIGHT_GIRLS.zscore.monthly-7d0c15e0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-f9ecb392.js → WEIGHT_GIRLS.zscore.weekly-9f1069f7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-68ef941b.js → WEIGHT_GIRLS.zscore.yearly-73ae1d15.js} +0 -0
- /package/build/{animation-ea977495.js → animation-6f3b7847.js} +0 -0
- /package/build/{constants-e9691110.js → constants-2d91b0e1.js} +0 -0
- /package/build/{constants-4d7147a1.js → constants-9781ee0c.js} +0 -0
- /package/build/{constants-01354d80.js → constants-e9c423db.js} +0 -0
- /package/build/{dataTransform-3d45068d.js → dataTransform-0a3530e2.js} +0 -0
- /package/build/{doctor-f1e2bd10.js → doctor-a5ab1034.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-676746a9.js → BMI_BOYS.percentile.monthly-412abb5f.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-4ed23841.js → BMI_BOYS.percentile.weekly-f4e955d0.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-98c98167.js → BMI_BOYS.percentile.yearly-001dd466.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-47916b32.js → BMI_BOYS.zscore.monthly-59f049ab.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-daaed956.js → BMI_BOYS.zscore.weekly-aac900c4.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-eab0342a.js → BMI_BOYS.zscore.yearly-6dca440a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-dfb759bb.js → BMI_GIRLS.percentile.monthly-bebf51b4.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-d29de620.js → BMI_GIRLS.percentile.weekly-2a2b4eb7.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-25fa0330.js → BMI_GIRLS.percentile.yearly-24ebd799.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-fc206d4e.js → BMI_GIRLS.zscore.monthly-eecb1682.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-98306141.js → BMI_GIRLS.zscore.weekly-2e1488eb.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-e4d0a11b.js → BMI_GIRLS.zscore.yearly-b75ac0b9.js} +0 -0
- /package/build/esm/{ChevronDown-2dece328.js → ChevronDown-ab409ca4.js} +0 -0
- /package/build/esm/{Close-414861c0.js → Close-255717e5.js} +0 -0
- /package/build/esm/{Google-0a3ac5a5.js → Google-e4d9094f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-22e90b94.js → HEAD CIRCUM_BOYS.percentile.monthly-6037f594.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-138252c3.js → HEAD CIRCUM_BOYS.percentile.weekly-d737c37e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-45d0204c.js → HEAD CIRCUM_BOYS.percentile.yearly-31efd59d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-b251ea89.js → HEAD CIRCUM_BOYS.zscore.monthly-a8f7ddd6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-c0993a4a.js → HEAD CIRCUM_BOYS.zscore.weekly-d24e81d8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-ceac2f5f.js → HEAD CIRCUM_BOYS.zscore.yearly-1d62e084.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-e4f09030.js → HEAD CIRCUM_GIRLS.percentile.monthly-1a981973.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-9d21592c.js → HEAD CIRCUM_GIRLS.percentile.weekly-84bba439.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-3a37d7d1.js → HEAD CIRCUM_GIRLS.percentile.yearly-1b9b6720.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-efff377c.js → HEAD CIRCUM_GIRLS.zscore.monthly-ffcc7685.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-21aa2b28.js → HEAD CIRCUM_GIRLS.zscore.weekly-f337d25b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-99a4f0e8.js → HEAD CIRCUM_GIRLS.zscore.yearly-38c72ae9.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-529d91e6.js → HEIGHT_BOYS.percentile.monthly-da590313.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-d786c46b.js → HEIGHT_BOYS.percentile.weekly-1a1ffe4b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-f2b98286.js → HEIGHT_BOYS.percentile.yearly-914f3a91.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-9fd64cb2.js → HEIGHT_BOYS.zscore.monthly-09a91a77.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-f5fb170c.js → HEIGHT_BOYS.zscore.weekly-24952bd6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-75ff7389.js → HEIGHT_BOYS.zscore.yearly-533c9933.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-20d7dc21.js → HEIGHT_GIRLS.percentile.monthly-20adde21.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-163bcbf7.js → HEIGHT_GIRLS.percentile.weekly-5c089a72.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-133e9b9b.js → HEIGHT_GIRLS.percentile.yearly-0337efde.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-1f697249.js → HEIGHT_GIRLS.zscore.monthly-31da8973.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-64f7cfb0.js → HEIGHT_GIRLS.zscore.weekly-e925388a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-5d3a1f36.js → HEIGHT_GIRLS.zscore.yearly-1d982762.js} +0 -0
- /package/build/esm/{Locale-ca77b0a8.js → Locale-e3bf3674.js} +0 -0
- /package/build/esm/{Visible-ba31ca23.js → Visible-9cdd11c7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-a42e34eb.js → WEIGHT_BOYS.percentile.monthly-675875d5.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-c519e3e5.js → WEIGHT_BOYS.percentile.weekly-4380822d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-58cd559f.js → WEIGHT_BOYS.percentile.yearly-5f03ab81.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-ed9e4281.js → WEIGHT_BOYS.zscore.monthly-7d53891c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-bb18ed2b.js → WEIGHT_BOYS.zscore.weekly-2b996595.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-ce3809ed.js → WEIGHT_BOYS.zscore.yearly-9938a7b4.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-cc6d74d0.js → WEIGHT_GIRLS.percentile.monthly-ced675a4.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-faec125e.js → WEIGHT_GIRLS.percentile.weekly-a7f88686.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-ee45c3d5.js → WEIGHT_GIRLS.percentile.yearly-dd257495.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-328c309f.js → WEIGHT_GIRLS.zscore.monthly-22f9f972.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-27ddd67a.js → WEIGHT_GIRLS.zscore.weekly-c21c9fbb.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-f351e8ae.js → WEIGHT_GIRLS.zscore.yearly-58662d5a.js} +0 -0
- /package/build/esm/{animation-26ededa5.js → animation-b5fb6e1a.js} +0 -0
- /package/build/esm/{constants-24c945ff.js → constants-5ba4a06d.js} +0 -0
- /package/build/esm/{constants-63e3976e.js → constants-5d7dd1df.js} +0 -0
- /package/build/esm/{constants-4c555a78.js → constants-78902e5d.js} +0 -0
- /package/build/esm/{dataTransform-9fb86241.js → dataTransform-76f664d7.js} +0 -0
- /package/build/esm/{doctor-fa923c90.js → doctor-69b1c79d.js} +0 -0
- /package/build/esm/{index-f2dcdbdd.js → index-1127f8ba.js} +0 -0
- /package/build/esm/{index-7efb2ae6.js → index-4e256236.js} +0 -0
- /package/build/esm/{index-56c187d2.js → index-51f857f3.js} +0 -0
- /package/build/esm/{index-ae467e8a.js → index-8bc6741b.js} +0 -0
- /package/build/esm/{index-e15f4ebc.js → index-935a1f87.js} +0 -0
- /package/build/esm/{index-5ae6e655.js → index-c512146f.js} +0 -0
- /package/build/esm/{index-b960d7d2.js → index-cec2beab.js} +0 -0
- /package/build/esm/{index-ef4ef49a.js → index-cf5fc080.js} +0 -0
- /package/build/esm/{index-2f48ca28.js → index-f2dba474.js} +0 -0
- /package/build/esm/{localizeNumberFormat-a97ed6c7.js → localizeNumberFormat-ebf106eb.js} +0 -0
- /package/build/esm/{normalizeLink-4b5bf175.js → normalizeLink-5aca6bda.js} +0 -0
- /package/build/esm/{other-b2d9a044.js → other-6a7e1e43.js} +0 -0
- /package/build/esm/{paths-ddb6c4d8.js → paths-ced0fa9d.js} +0 -0
- /package/build/esm/{translationsContext-842b9deb.js → translationsContext-b0754e46.js} +0 -0
- /package/build/esm/{tslib.es6-1ac4ffe8.js → tslib.es6-a8899474.js} +0 -0
- /package/build/esm/{types-6790ba3a.js → types-54f52760.js} +0 -0
- /package/build/esm/{useIsInit-5732296a.js → useIsInit-65199c88.js} +0 -0
- /package/build/esm/{useOutsideClick-cbeba8ee.js → useOutsideClick-ab916fd7.js} +0 -0
- /package/build/esm/{useScrollbarSize-ac8256a4.js → useScrollbarSize-6c8a0342.js} +0 -0
- /package/build/esm/{useUniqueId-1ae14697.js → useUniqueId-f3f12863.js} +0 -0
- /package/build/esm/{utils-45fdcf7b.js → utils-bc4ce115.js} +0 -0
- /package/build/{index-80b90ecc.js → index-1bf23cbd.js} +0 -0
- /package/build/{index-315d9154.js → index-21ca1caf.js} +0 -0
- /package/build/{index-bbaaa76f.js → index-2e07a2d4.js} +0 -0
- /package/build/{index-1d17957f.js → index-36eaf39f.js} +0 -0
- /package/build/{index-be7ea2d7.js → index-501d871a.js} +0 -0
- /package/build/{index-5ba31c22.js → index-5dbab2ac.js} +0 -0
- /package/build/{index-a194922e.js → index-79f3a881.js} +0 -0
- /package/build/{index-022ab6d3.js → index-88fdd18c.js} +0 -0
- /package/build/{index-2201ea63.js → index-c67997e3.js} +0 -0
- /package/build/{localizeNumberFormat-7d547f95.js → localizeNumberFormat-e3fbff3c.js} +0 -0
- /package/build/{normalizeLink-1d312a04.js → normalizeLink-6b538145.js} +0 -0
- /package/build/{other-f35b1b1a.js → other-c659c2a9.js} +0 -0
- /package/build/{paths-a0e2dcbf.js → paths-181d46e2.js} +0 -0
- /package/build/{translationsContext-d89d941c.js → translationsContext-f85183a8.js} +0 -0
- /package/build/{tslib.es6-9e523431.js → tslib.es6-a80079d2.js} +0 -0
- /package/build/{types-908ee804.js → types-ca3505ea.js} +0 -0
- /package/build/{useIsInit-1fbe61dd.js → useIsInit-f20269ea.js} +0 -0
- /package/build/{useOutsideClick-42a8525c.js → useOutsideClick-32d65391.js} +0 -0
- /package/build/{useScrollbarSize-5d9399f0.js → useScrollbarSize-8efcf2fd.js} +0 -0
- /package/build/{useUniqueId-12b2db9f.js → useUniqueId-b4cc4b18.js} +0 -0
- /package/build/{utils-d865acbe.js → utils-8980d405.js} +0 -0
|
@@ -0,0 +1,1588 @@
|
|
|
1
|
+
import { a as __awaiter, _ as __rest } from './tslib.es6-a8899474.js';
|
|
2
|
+
import React__default, { useState, useRef, useEffect, useCallback, useContext, useMemo } from 'react';
|
|
3
|
+
import { Info } from '@hhgtech/icons/other';
|
|
4
|
+
import { D as Dropdown } from './index-f2dba474.js';
|
|
5
|
+
import { u as useTranslations } from './index-8ca04504.js';
|
|
6
|
+
import innertext from 'innertext';
|
|
7
|
+
import { theme } from './miscTheme.js';
|
|
8
|
+
import { I as Input$1 } from './index-a595566d.js';
|
|
9
|
+
import { useMantineTheme, Popover } from '@mantine/core';
|
|
10
|
+
import '@mantine/dates';
|
|
11
|
+
import './index-057f2d1e.js';
|
|
12
|
+
import './index-afea9eed.js';
|
|
13
|
+
import './index-1127f8ba.js';
|
|
14
|
+
import './useMantineLocale-897de7b5.js';
|
|
15
|
+
import { T as Text } from './index-6d78a8a7.js';
|
|
16
|
+
import { B as Button } from './index-0756189f.js';
|
|
17
|
+
import './index.styles-eab929da.js';
|
|
18
|
+
import '@mantine/hooks';
|
|
19
|
+
import { M as MediaQueries } from './utils-bc4ce115.js';
|
|
20
|
+
import './other-6a7e1e43.js';
|
|
21
|
+
import './index-78b6be16.js';
|
|
22
|
+
import { u as useImagePicker, a as PopupFrame, d as IconCloseCircle, g as getDefaultFailNoti, e as getPostFormData, f as editPost, h as createPost } from './index-a60a7164.js';
|
|
23
|
+
import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath, p as getCurrentHref, b as callApiWithAuth } from './utils-d7a79b14.js';
|
|
24
|
+
import styled from '@emotion/styled';
|
|
25
|
+
import { b as formatPost, c as formatTopic } from './dataTransform-04bb1b6b.js';
|
|
26
|
+
import { M as MAX_IMAGE_UPLOADS } from './constants-5d7dd1df.js';
|
|
27
|
+
import { h as highlightBadWords, f as fixMalformedMention, r as removeFontFormat, a as removeEdittedBannedWord, w as wrapAnchorAroundUrls, g as getUrlsFromEditorString, A as ALLOW_DOMAIN_URL, e as escapeRegExp, d as decodeMention, b as decodePostUrl } from './post-e0ff144e.js';
|
|
28
|
+
import { C as CardAuthor, L as Loading$1 } from './index-1279323a.js';
|
|
29
|
+
import { S as StyledCreatePostDescription, R as RichTextEditor } from './editor-10538ef7.js';
|
|
30
|
+
import { I as Input } from './index-d63e0760.js';
|
|
31
|
+
import debounce from 'lodash/debounce';
|
|
32
|
+
import ContentEditable from 'react-contenteditable';
|
|
33
|
+
import { PATHS } from './togetherApiPaths.js';
|
|
34
|
+
import { L as Loading } from './index-98c3fc54.js';
|
|
35
|
+
import { C as CardLink } from './index-f7477ebe.js';
|
|
36
|
+
import { B as BtnChoice } from './index-f0fa0bcd.js';
|
|
37
|
+
import { L as LOCALE } from './Locale-e3bf3674.js';
|
|
38
|
+
import { Close, Check } from '@hhgtech/icons/core';
|
|
39
|
+
|
|
40
|
+
const Ask = ({ size }) => {
|
|
41
|
+
return (React__default.createElement("svg", { width: size, height: size, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
42
|
+
React__default.createElement("g", { filter: "url(#filter0_i_4664_166540)" },
|
|
43
|
+
React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "#2D87F3" }),
|
|
44
|
+
React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint0_radial_4664_166540)" }),
|
|
45
|
+
React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint1_radial_4664_166540)" }),
|
|
46
|
+
React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint2_radial_4664_166540)" }),
|
|
47
|
+
React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint3_radial_4664_166540)" })),
|
|
48
|
+
React__default.createElement("mask", { id: "path-2-inside-1_4664_166540", fill: "white" },
|
|
49
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.7157 18.4674C12.7317 18.7466 13.0316 18.914 13.2709 18.7693C14.5525 17.9944 15.6319 16.9936 16.509 15.767C17.503 14.378 18 12.8301 18 11.1232C18 10.2884 17.8438 9.50974 17.5313 8.78711C17.2188 8.06448 16.7908 7.43231 16.2473 6.89059C15.7033 6.34837 15.0688 5.92152 14.3438 5.61004C13.6188 5.29856 12.8375 5.14282 12 5.14282C10.325 5.14282 8.90625 5.72217 7.74375 6.88087C6.58125 8.03956 6 9.45367 6 11.1232C6 12.7927 6.58125 14.2068 7.74375 15.3655C8.90625 16.5242 10.325 17.1036 12 17.1036H12.2761C12.4789 17.1036 12.6466 17.2619 12.6582 17.4644L12.7157 18.4674ZM11.7825 13.2206C11.9205 13.5131 12.3366 13.5131 12.4747 13.2206L12.9337 12.2483C12.9718 12.1678 13.0367 12.103 13.1173 12.0652L14.0898 11.6091C14.3834 11.4714 14.3834 11.0538 14.0898 10.916L13.1173 10.4599C13.0367 10.4221 12.9718 10.3573 12.9337 10.2768L12.4747 9.30447C12.3366 9.01202 11.9205 9.01202 11.7825 9.30447L11.3234 10.2768C11.2854 10.3573 11.2204 10.4221 11.1398 10.4599L10.1673 10.916C9.87373 11.0538 9.87373 11.4714 10.1673 11.6091L11.1398 12.0652C11.2204 12.103 11.2854 12.1678 11.3234 12.2483L11.7825 13.2206Z" })),
|
|
50
|
+
React__default.createElement("g", { filter: "url(#filter1_i_4664_166540)" },
|
|
51
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.7157 18.4674C12.7317 18.7466 13.0316 18.914 13.2709 18.7693C14.5525 17.9944 15.6319 16.9936 16.509 15.767C17.503 14.378 18 12.8301 18 11.1232C18 10.2884 17.8438 9.50974 17.5313 8.78711C17.2188 8.06448 16.7908 7.43231 16.2473 6.89059C15.7033 6.34837 15.0688 5.92152 14.3438 5.61004C13.6188 5.29856 12.8375 5.14282 12 5.14282C10.325 5.14282 8.90625 5.72217 7.74375 6.88087C6.58125 8.03956 6 9.45367 6 11.1232C6 12.7927 6.58125 14.2068 7.74375 15.3655C8.90625 16.5242 10.325 17.1036 12 17.1036H12.2761C12.4789 17.1036 12.6466 17.2619 12.6582 17.4644L12.7157 18.4674ZM11.7825 13.2206C11.9205 13.5131 12.3366 13.5131 12.4747 13.2206L12.9337 12.2483C12.9718 12.1678 13.0367 12.103 13.1173 12.0652L14.0898 11.6091C14.3834 11.4714 14.3834 11.0538 14.0898 10.916L13.1173 10.4599C13.0367 10.4221 12.9718 10.3573 12.9337 10.2768L12.4747 9.30447C12.3366 9.01202 11.9205 9.01202 11.7825 9.30447L11.3234 10.2768C11.2854 10.3573 11.2204 10.4221 11.1398 10.4599L10.1673 10.916C9.87373 11.0538 9.87373 11.4714 10.1673 11.6091L11.1398 12.0652C11.2204 12.103 11.2854 12.1678 11.3234 12.2483L11.7825 13.2206Z", fill: "white" })),
|
|
52
|
+
React__default.createElement("path", { d: "M13.2709 18.7693L13.2214 18.6874L13.2709 18.7693ZM12.7157 18.4674L12.6202 18.4729L12.7157 18.4674ZM16.509 15.767L16.4312 15.7113L16.4312 15.7113L16.509 15.767ZM17.5313 8.78711L17.4434 8.82509L17.5313 8.78711ZM16.2473 6.89059L16.1797 6.95836L16.2473 6.89059ZM14.3438 5.61004L14.306 5.69795H14.306L14.3438 5.61004ZM7.74375 6.88087L7.6762 6.8131L7.74375 6.88087ZM7.74375 15.3655L7.8113 15.2977L7.74375 15.3655ZM12.6582 17.4644L12.7537 17.4589L12.6582 17.4644ZM12.4747 13.2206L12.5612 13.2615L12.4747 13.2206ZM11.7825 13.2206L11.869 13.1798L11.7825 13.2206ZM12.9337 12.2483L13.0203 12.2892L12.9337 12.2483ZM13.1173 12.0652L13.1579 12.1518L13.1173 12.0652ZM14.0898 11.6091L14.0491 11.5224L14.0898 11.6091ZM14.0898 10.916L14.1304 10.8294H14.1304L14.0898 10.916ZM13.1173 10.4599L13.1579 10.3733H13.1579L13.1173 10.4599ZM12.9337 10.2768L12.8472 10.3176L12.9337 10.2768ZM12.4747 9.30447L12.5612 9.26361L12.4747 9.30447ZM11.7825 9.30447L11.6959 9.26361V9.26361L11.7825 9.30447ZM11.3234 10.2768L11.4099 10.3176L11.3234 10.2768ZM11.1398 10.4599L11.0992 10.3733L11.1398 10.4599ZM10.1673 10.916L10.1267 10.8294L10.1673 10.916ZM10.1673 11.6091L10.208 11.5224L10.1673 11.6091ZM11.1398 12.0652L11.0992 12.1518L11.1398 12.0652ZM11.3234 12.2483L11.4099 12.2075L11.3234 12.2483ZM13.2214 18.6874C13.0474 18.7926 12.8233 18.6734 12.8112 18.4619L12.6202 18.4729C12.64 18.8198 13.0159 19.0353 13.3204 18.8512L13.2214 18.6874ZM16.4312 15.7113C15.5616 16.9274 14.4918 17.9193 13.2214 18.6874L13.3204 18.8512C14.6133 18.0695 15.7022 17.0598 16.5868 15.8226L16.4312 15.7113ZM17.9043 11.1232C17.9043 12.8101 17.4136 14.3386 16.4312 15.7113L16.5868 15.8226C17.5924 14.4175 18.0957 12.8501 18.0957 11.1232H17.9043ZM17.4434 8.82509C17.7504 9.53501 17.9043 10.3007 17.9043 11.1232H18.0957C18.0957 10.2762 17.9371 9.48446 17.6191 8.74913L17.4434 8.82509ZM16.1797 6.95836C16.7144 7.4913 17.1356 8.11329 17.4434 8.82509L17.6191 8.74913C17.3019 8.01567 16.8671 7.37332 16.3148 6.82281L16.1797 6.95836ZM14.306 5.69795C15.0202 6.00479 15.6445 6.42491 16.1797 6.95836L16.3148 6.82281C15.762 6.27182 15.1173 5.83824 14.3815 5.52212L14.306 5.69795ZM12 5.23851C12.8253 5.23851 13.5936 5.39191 14.306 5.69795L14.3815 5.52212C13.6439 5.20521 12.8497 5.04714 12 5.04714V5.23851ZM7.8113 6.94864C8.95546 5.80823 10.3497 5.23851 12 5.23851V5.04714C10.3003 5.04714 8.85704 5.63612 7.6762 6.8131L7.8113 6.94864ZM6.09569 11.1232C6.09569 9.47861 6.66716 8.08904 7.8113 6.94864L7.6762 6.8131C6.49534 7.99009 5.90431 9.42873 5.90431 11.1232H6.09569ZM7.8113 15.2977C6.66716 14.1573 6.09569 12.7678 6.09569 11.1232H5.90431C5.90431 12.8177 6.49534 14.2563 7.6762 15.4333L7.8113 15.2977ZM12 17.0079C10.3497 17.0079 8.95546 16.4382 7.8113 15.2977L7.6762 15.4333C8.85704 16.6103 10.3003 17.1993 12 17.1993V17.0079ZM12.2761 17.0079H12V17.1993H12.2761V17.0079ZM12.7537 17.4589C12.7392 17.2057 12.5297 17.0079 12.2761 17.0079V17.1993C12.4282 17.1993 12.5539 17.318 12.5627 17.4699L12.7537 17.4589ZM12.8112 18.4619L12.7537 17.4589L12.5627 17.4699L12.6202 18.4729L12.8112 18.4619ZM12.3881 13.1798C12.2846 13.3991 11.9725 13.3991 11.869 13.1798L11.6959 13.2615C11.8685 13.627 12.3886 13.627 12.5612 13.2615L12.3881 13.1798ZM12.8472 12.2075L12.3881 13.1798L12.5612 13.2615L13.0203 12.2892L12.8472 12.2075ZM13.0767 11.9786C12.9759 12.0259 12.8947 12.1068 12.8472 12.2075L13.0203 12.2892C13.0488 12.2288 13.0975 12.1802 13.1579 12.1518L13.0767 11.9786ZM14.0491 11.5224L13.0767 11.9786L13.1579 12.1518L14.1304 11.6957L14.0491 11.5224ZM14.0491 11.0027C14.2694 11.106 14.2694 11.4192 14.0491 11.5224L14.1304 11.6957C14.4974 11.5236 14.4974 11.0016 14.1304 10.8294L14.0491 11.0027ZM13.0767 10.5465L14.0491 11.0027L14.1304 10.8294L13.1579 10.3733L13.0767 10.5465ZM12.8472 10.3176C12.8947 10.4183 12.9759 10.4992 13.0767 10.5465L13.1579 10.3733C13.0975 10.3449 13.0488 10.2963 13.0203 10.2359L12.8472 10.3176ZM12.3881 9.34532L12.8472 10.3176L13.0203 10.2359L12.5612 9.26361L12.3881 9.34532ZM11.869 9.34532C11.9725 9.12598 12.2846 9.12598 12.3881 9.34532L12.5612 9.26361C12.3886 8.89806 11.8685 8.89806 11.6959 9.26361L11.869 9.34532ZM11.4099 10.3176L11.869 9.34532L11.6959 9.26361L11.2369 10.2359L11.4099 10.3176ZM11.1805 10.5465C11.2812 10.4992 11.3624 10.4183 11.4099 10.3176L11.2369 10.2359C11.2083 10.2963 11.1597 10.3449 11.0992 10.3733L11.1805 10.5465ZM10.208 11.0027L11.1805 10.5465L11.0992 10.3733L10.1267 10.8294L10.208 11.0027ZM10.208 11.5224C9.98777 11.4192 9.98776 11.106 10.208 11.0027L10.1267 10.8294C9.75969 11.0016 9.75969 11.5236 10.1267 11.6957L10.208 11.5224ZM11.1805 11.9786L10.208 11.5224L10.1267 11.6957L11.0992 12.1518L11.1805 11.9786ZM11.4099 12.2075C11.3624 12.1068 11.2812 12.0259 11.1805 11.9786L11.0992 12.1518C11.1597 12.1802 11.2083 12.2288 11.2369 12.2892L11.4099 12.2075ZM11.869 13.1798L11.4099 12.2075L11.2369 12.2892L11.6959 13.2615L11.869 13.1798Z", fill: "url(#paint4_linear_4664_166540)", mask: "url(#path-2-inside-1_4664_166540)" }),
|
|
53
|
+
React__default.createElement("g", { filter: "url(#filter2_i_4664_166540)" },
|
|
54
|
+
React__default.createElement("path", { d: "M22.0963 4.65404L22.3807 5.27459C22.5111 5.55904 22.9153 5.55904 23.0456 5.27459L23.33 4.65404C23.3666 4.57438 23.4305 4.51048 23.5101 4.47396L24.1307 4.18955C24.4151 4.05918 24.4151 3.65501 24.1307 3.52463L23.5101 3.24022C23.4305 3.20371 23.3666 3.1398 23.33 3.06014L23.0456 2.43959C22.9153 2.15514 22.5111 2.15514 22.3807 2.43959L22.0963 3.06014C22.0598 3.1398 21.9959 3.20371 21.9162 3.24022L21.2957 3.52463C21.0112 3.65501 21.0112 4.05917 21.2957 4.18955L21.9162 4.47396C21.9959 4.51048 22.0598 4.57438 22.0963 4.65404Z", fill: "#2D87F3" })),
|
|
55
|
+
React__default.createElement("defs", null,
|
|
56
|
+
React__default.createElement("filter", { id: "filter0_i_4664_166540", x: "1.71094", y: "1.71423", width: "22.5703", height: "24.5714", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
57
|
+
React__default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
58
|
+
React__default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
59
|
+
React__default.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
|
60
|
+
React__default.createElement("feOffset", { dx: "2", dy: "4" }),
|
|
61
|
+
React__default.createElement("feGaussianBlur", { stdDeviation: "8" }),
|
|
62
|
+
React__default.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
63
|
+
React__default.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0" }),
|
|
64
|
+
React__default.createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
|
|
65
|
+
React__default.createElement("filter", { id: "filter1_i_4664_166540", x: "6", y: "5.14282", width: "12.7655", height: "14.4451", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
66
|
+
React__default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
67
|
+
React__default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
68
|
+
React__default.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
|
69
|
+
React__default.createElement("feOffset", { dx: "0.765488", dy: "0.765488" }),
|
|
70
|
+
React__default.createElement("feGaussianBlur", { stdDeviation: "0.765488" }),
|
|
71
|
+
React__default.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
72
|
+
React__default.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0" }),
|
|
73
|
+
React__default.createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
|
|
74
|
+
React__default.createElement("filter", { id: "filter2_i_4664_166540", x: "21.0859", y: "2.2262", width: "3.98924", height: "3.99315", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
75
|
+
React__default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
76
|
+
React__default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
77
|
+
React__default.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
|
|
78
|
+
React__default.createElement("feOffset", { dx: "0.731427", dy: "0.731427" }),
|
|
79
|
+
React__default.createElement("feGaussianBlur", { stdDeviation: "0.731427" }),
|
|
80
|
+
React__default.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
81
|
+
React__default.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0" }),
|
|
82
|
+
React__default.createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
|
|
83
|
+
React__default.createElement("radialGradient", { id: "paint0_radial_4664_166540", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(24.0421 -0.4454) rotate(130.991) scale(30.1148 29.3127)" },
|
|
84
|
+
React__default.createElement("stop", { stopColor: "#3D6CFD" }),
|
|
85
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#3C6BFD", stopOpacity: "0" })),
|
|
86
|
+
React__default.createElement("radialGradient", { id: "paint1_radial_4664_166540", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(0.893037 -8.6813) rotate(65.1606) scale(37.2296 21.2343)" },
|
|
87
|
+
React__default.createElement("stop", { stopColor: "#A3F1FF" }),
|
|
88
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#AEF3FF", stopOpacity: "0" })),
|
|
89
|
+
React__default.createElement("radialGradient", { id: "paint2_radial_4664_166540", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(3.31808 22.2857) rotate(-45) scale(8.6368 7.70429)" },
|
|
90
|
+
React__default.createElement("stop", { stopColor: "#9EFF3F" }),
|
|
91
|
+
React__default.createElement("stop", { offset: "0.963398", stopColor: "#93FF3E", stopOpacity: "0" })),
|
|
92
|
+
React__default.createElement("radialGradient", { id: "paint3_radial_4664_166540", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(24.4386 32.3518) rotate(-119.24) scale(35.1115 12.2522)" },
|
|
93
|
+
React__default.createElement("stop", { stopColor: "#02FAF8" }),
|
|
94
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#01FCFC", stopOpacity: "0" })),
|
|
95
|
+
React__default.createElement("linearGradient", { id: "paint4_linear_4664_166540", x1: "12", y1: "4.93885", x2: "12", y2: "19.0338", gradientUnits: "userSpaceOnUse" },
|
|
96
|
+
React__default.createElement("stop", { stopColor: "white" }),
|
|
97
|
+
React__default.createElement("stop", { offset: "0.0965062", stopColor: "white", stopOpacity: "0" }),
|
|
98
|
+
React__default.createElement("stop", { offset: "0.706019", stopColor: "white", stopOpacity: "0.53" }),
|
|
99
|
+
React__default.createElement("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })))));
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const StyledCreateNewPost = styled.div `
|
|
103
|
+
position: relative;
|
|
104
|
+
display: flex;
|
|
105
|
+
height: 100%;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
padding: 16px 24px;
|
|
108
|
+
|
|
109
|
+
${MediaQueries.mbDown} {
|
|
110
|
+
padding: 16px 16px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.input-group-container {
|
|
114
|
+
flex: 1;
|
|
115
|
+
padding-right: 2px;
|
|
116
|
+
padding-left: 2px;
|
|
117
|
+
margin-bottom: 24px;
|
|
118
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
119
|
+
overflow-y: auto;
|
|
120
|
+
scrollbar-width: none; /* Firefox */
|
|
121
|
+
&::-webkit-scrollbar {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.input-group {
|
|
127
|
+
:not(:last-child) {
|
|
128
|
+
margin-bottom: 0.6rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
input:focus,
|
|
132
|
+
textarea:focus,
|
|
133
|
+
[contenteditable='true'] {
|
|
134
|
+
outline: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
label {
|
|
138
|
+
margin-bottom: 5px;
|
|
139
|
+
color: ${theme.colors.gray600};
|
|
140
|
+
/* font-family: 'Open Sans', sans-serif; */
|
|
141
|
+
font-size: 13px;
|
|
142
|
+
font-weight: bold;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.input-group-label {
|
|
146
|
+
margin-bottom: 5px;
|
|
147
|
+
color: ${theme.colors.gray600};
|
|
148
|
+
/* font-family: 'Open Sans', sans-serif; */
|
|
149
|
+
font-size: 13px;
|
|
150
|
+
font-weight: bold;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.input-notification {
|
|
154
|
+
display: flex;
|
|
155
|
+
|
|
156
|
+
& > img {
|
|
157
|
+
width: 16px;
|
|
158
|
+
height: 16px;
|
|
159
|
+
margin-top: 1.5px;
|
|
160
|
+
margin-right: 8px;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.tag-list {
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.warning {
|
|
169
|
+
margin-top: 16px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.submit-btn {
|
|
173
|
+
width: 100%;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.switch-label {
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.swich-input-group {
|
|
182
|
+
padding: 12px 16px;
|
|
183
|
+
border-radius: 8px;
|
|
184
|
+
background: ${theme.colors.neutral50};
|
|
185
|
+
|
|
186
|
+
&.askdoctor-switch {
|
|
187
|
+
background: ${theme.colors.primary50};
|
|
188
|
+
&.mb-color {
|
|
189
|
+
background: ${theme.mbColors.tonePink};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mantine-Switch-labelWrapper {
|
|
194
|
+
flex-grow: 1;
|
|
195
|
+
}
|
|
196
|
+
.mantine-Checkbox-body {
|
|
197
|
+
display: flex;
|
|
198
|
+
width: 100%;
|
|
199
|
+
align-items: center;
|
|
200
|
+
justify-content: space-between;
|
|
201
|
+
}
|
|
202
|
+
.mantine-Switch-track {
|
|
203
|
+
margin-bottom: 0;
|
|
204
|
+
}
|
|
205
|
+
.label-txt {
|
|
206
|
+
font-weight: normal;
|
|
207
|
+
font-size: 14px;
|
|
208
|
+
color: ${theme.colors.gray800};
|
|
209
|
+
margin-left: 10px;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
`;
|
|
213
|
+
const StyledIsQuestion = styled.div `
|
|
214
|
+
display: flex;
|
|
215
|
+
width: 100%;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: space-between;
|
|
218
|
+
padding: 8px 12px;
|
|
219
|
+
border-radius: 0 0 8px 8px;
|
|
220
|
+
background: ${theme.colors.neutral50};
|
|
221
|
+
border: 1px solid ${theme.colors.gray200};
|
|
222
|
+
gap: 12px;
|
|
223
|
+
|
|
224
|
+
&.has-error {
|
|
225
|
+
border: 1px solid ${theme.colors.red600};
|
|
226
|
+
}
|
|
227
|
+
&.error-description {
|
|
228
|
+
border: 1px solid ${theme.colors.red600};
|
|
229
|
+
border-top: none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&[data-is-marry-baby='true'] {
|
|
233
|
+
background: ${theme.mbColors.tonePink};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.switch-label {
|
|
237
|
+
display: flex;
|
|
238
|
+
gap: 4px;
|
|
239
|
+
align-items: flex-start;
|
|
240
|
+
|
|
241
|
+
svg {
|
|
242
|
+
margin-top: 2px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.wrapper-text {
|
|
246
|
+
.label-txt {
|
|
247
|
+
color: ${theme.colors.gray800};
|
|
248
|
+
font-size: 14px;
|
|
249
|
+
font-weight: 600;
|
|
250
|
+
line-height: 22px;
|
|
251
|
+
}
|
|
252
|
+
.description-txt {
|
|
253
|
+
color: ${theme.colors.gray700};
|
|
254
|
+
font-size: 12px;
|
|
255
|
+
font-weight: 400;
|
|
256
|
+
line-height: 18px;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
button {
|
|
262
|
+
height: 40px;
|
|
263
|
+
&:hover,
|
|
264
|
+
&.primary {
|
|
265
|
+
border-radius: 4px;
|
|
266
|
+
border: 1px solid ${theme.colors.blue100};
|
|
267
|
+
background: ${theme.colors.blue50};
|
|
268
|
+
color: ${theme.colors.primaryBase};
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
`;
|
|
272
|
+
const StyledError = styled.div `
|
|
273
|
+
margin-bottom: 12px;
|
|
274
|
+
color: ${theme.colors.red700};
|
|
275
|
+
svg {
|
|
276
|
+
margin-right: 5px;
|
|
277
|
+
}
|
|
278
|
+
svg,
|
|
279
|
+
span {
|
|
280
|
+
vertical-align: middle;
|
|
281
|
+
}
|
|
282
|
+
`;
|
|
283
|
+
const StyledFormGroupInner = styled.div `
|
|
284
|
+
.swich-input-group {
|
|
285
|
+
padding: 12px 16px;
|
|
286
|
+
border-radius: 8px;
|
|
287
|
+
background: ${theme.colors.neutral50};
|
|
288
|
+
|
|
289
|
+
&.askdoctor-switch {
|
|
290
|
+
background: ${theme.colors.blue50};
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.switch-label {
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: center;
|
|
296
|
+
}
|
|
297
|
+
.mantine-Switch-labelWrapper {
|
|
298
|
+
flex-grow: 1;
|
|
299
|
+
}
|
|
300
|
+
.mantine-Checkbox-body {
|
|
301
|
+
display: flex;
|
|
302
|
+
width: 100%;
|
|
303
|
+
align-items: center;
|
|
304
|
+
justify-content: space-between;
|
|
305
|
+
}
|
|
306
|
+
.mantine-Switch-track {
|
|
307
|
+
margin-bottom: 0;
|
|
308
|
+
}
|
|
309
|
+
.label-txt {
|
|
310
|
+
font-weight: normal;
|
|
311
|
+
font-size: 14px;
|
|
312
|
+
color: ${theme.colors.gray800};
|
|
313
|
+
margin-left: 14px;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
`;
|
|
317
|
+
const StylePostAction = styled.div `
|
|
318
|
+
display: flex;
|
|
319
|
+
gap: 12px;
|
|
320
|
+
.avatar {
|
|
321
|
+
width: 40px;
|
|
322
|
+
height: 40px;
|
|
323
|
+
border-radius: 100%;
|
|
324
|
+
|
|
325
|
+
img {
|
|
326
|
+
border-radius: 100%;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.author-avatar {
|
|
330
|
+
.col-left {
|
|
331
|
+
display: none;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.post-action-form {
|
|
337
|
+
display: flex;
|
|
338
|
+
flex-direction: column;
|
|
339
|
+
gap: 4px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.post-action-by {
|
|
343
|
+
color: ${theme.colors.gray800};
|
|
344
|
+
font-size: 16px;
|
|
345
|
+
font-weight: 600;
|
|
346
|
+
line-height: 24px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.post-action-result {
|
|
350
|
+
display: flex;
|
|
351
|
+
position: relative;
|
|
352
|
+
&:after {
|
|
353
|
+
content: '';
|
|
354
|
+
display: inline-block;
|
|
355
|
+
width: 5px;
|
|
356
|
+
height: 5px;
|
|
357
|
+
background-color: ${theme.colors.error};
|
|
358
|
+
border-radius: 100%;
|
|
359
|
+
position: absolute;
|
|
360
|
+
right: 7px;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.dropdown-post-action {
|
|
365
|
+
background: ${theme.colors.white} !important;
|
|
366
|
+
border-radius: 2px;
|
|
367
|
+
border: 1px solid ${theme.colors.neutral200} !important;
|
|
368
|
+
|
|
369
|
+
> div {
|
|
370
|
+
padding: 3px 8px;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
span {
|
|
374
|
+
flex: 1;
|
|
375
|
+
color: ${theme.colors.gray600};
|
|
376
|
+
font-size: 12px;
|
|
377
|
+
font-weight: 600;
|
|
378
|
+
line-height: 18px;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
ul {
|
|
382
|
+
width: 130px;
|
|
383
|
+
li {
|
|
384
|
+
img {
|
|
385
|
+
flex: 0 0 16px;
|
|
386
|
+
width: 16px;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
`;
|
|
392
|
+
const StyleSessionRow = styled.div `
|
|
393
|
+
display: inline-flex;
|
|
394
|
+
gap: 8px;
|
|
395
|
+
align-items: center;
|
|
396
|
+
cursor: pointer;
|
|
397
|
+
|
|
398
|
+
.session-title {
|
|
399
|
+
color: ${theme.colors.gray700};
|
|
400
|
+
font-size: 14px;
|
|
401
|
+
font-weight: 400;
|
|
402
|
+
line-height: 22px;
|
|
403
|
+
flex: 1;
|
|
404
|
+
}
|
|
405
|
+
`;
|
|
406
|
+
|
|
407
|
+
var img$5 = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.61638 3.56867C4.84773 2.87459 5.49727 2.40642 6.2289 2.40642C6.67971 2.40642 7.11204 2.58549 7.43084 2.90429L8.0013 3.47475L8.57177 2.90429C8.89056 2.58549 9.32289 2.40642 9.7737 2.40642C10.5053 2.40642 11.1549 2.8746 11.3862 3.56868L12.3331 6.40934H3.66948L4.61638 3.56867ZM15.3346 6.40934H13.4644L12.4043 3.22931C12.0269 2.09701 10.9673 1.33325 9.7737 1.33325C9.12365 1.33325 8.49715 1.56149 8.0013 1.97363C7.50546 1.56149 6.87895 1.33325 6.2289 1.33325C5.03534 1.33325 3.9757 2.09702 3.59828 3.22931L2.53825 6.40934H0.667969V6.94592C0.667969 8.17681 1.6658 9.17465 2.89669 9.17465H13.1059C14.3368 9.17465 15.3346 8.17681 15.3346 6.94592V6.40934ZM2.89669 8.10148C2.45219 8.10148 2.0663 7.85049 1.87301 7.48251H14.1296C13.9363 7.85049 13.5504 8.10148 13.1059 8.10148H2.89669ZM5.0398 13.178C4.17021 13.178 3.46467 12.4742 3.46252 11.6046L3.46239 11.5528C4.48802 11.2233 5.59156 11.2232 6.61724 11.5526L6.61704 11.6065C6.61386 12.4753 5.90864 13.178 5.0398 13.178ZM7.25616 10.6398C5.82875 10.0967 4.25135 10.0966 2.82397 10.6398L1.6558 10.6397L1.65577 11.7129L2.39168 11.7129C2.45056 13.1251 3.61394 14.2511 5.0398 14.2511C6.46547 14.2511 7.62898 13.1253 7.68788 11.7129H8.31416C8.37305 13.1251 9.53643 14.2511 10.9623 14.2511C12.388 14.2511 13.5515 13.1253 13.6104 11.7129L14.3468 11.7129L14.3468 10.6397L13.1786 10.6398C11.7512 10.0966 10.1738 10.0966 8.74644 10.6398H7.25616ZM10.9623 13.178C10.0927 13.178 9.38716 12.4742 9.385 11.6046L9.38487 11.5528C10.4105 11.2233 11.514 11.2232 12.5397 11.5526L12.5395 11.6065C12.5363 12.4753 11.8311 13.178 10.9623 13.178Z' fill='%23404040'/%3e%3c/svg%3e";
|
|
408
|
+
var IconAnonymous = img$5;
|
|
409
|
+
|
|
410
|
+
var img$4 = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.67419 2.06156C4.13645 2.62563 2.1956 4.77487 1.94427 7.41667H4.77719C4.91981 5.4892 5.5776 3.64052 6.67419 2.06156ZM9.32581 2.06156C10.4224 3.64052 11.0802 5.4892 11.2228 7.41667H14.0557C13.8044 4.77487 11.8636 2.62563 9.32581 2.06156ZM10.0526 7.41667C9.89538 5.52352 9.18073 3.71931 8 2.23244C6.81927 3.71931 6.10463 5.52352 5.94744 7.41667H10.0526ZM10.0526 8.58333C9.89547 10.4766 9.18081 12.281 8 13.7679C6.81919 12.281 6.10453 10.4766 5.94741 8.58333H10.0526ZM4.77717 8.58333H1.94427C2.19559 11.225 4.13629 13.3742 6.6739 13.9384C5.57741 12.3594 4.91971 10.5108 4.77717 8.58333ZM9.32611 13.9384C10.4226 12.3594 11.0803 10.5108 11.2228 8.58333H14.0557C13.8044 11.225 11.8637 13.3742 9.32611 13.9384ZM8 15.25C12.0041 15.25 15.25 12.0041 15.25 8C15.25 3.99594 12.0041 0.75 8 0.75C3.99594 0.75 0.75 3.99594 0.75 8C0.75 12.0041 3.99594 15.25 8 15.25Z' fill='%23404040'/%3e%3c/svg%3e";
|
|
411
|
+
var IconPublic = img$4;
|
|
412
|
+
|
|
413
|
+
styled.div `
|
|
414
|
+
background-color: white;
|
|
415
|
+
z-index: 1000;
|
|
416
|
+
top: 0;
|
|
417
|
+
left: 0;
|
|
418
|
+
height: 100%;
|
|
419
|
+
position: absolute;
|
|
420
|
+
width: 100%;
|
|
421
|
+
|
|
422
|
+
.drawer-header {
|
|
423
|
+
display: flex;
|
|
424
|
+
gap: 12px;
|
|
425
|
+
align-items: center;
|
|
426
|
+
padding: 12px 16px;
|
|
427
|
+
border-bottom: 1px solid ${theme.colors.gray200};
|
|
428
|
+
|
|
429
|
+
.input-group-label {
|
|
430
|
+
flex: 1;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
img {
|
|
434
|
+
cursor: pointer;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
p {
|
|
438
|
+
flex: 1;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.drawer-content {
|
|
443
|
+
padding: 16px;
|
|
444
|
+
display: flex;
|
|
445
|
+
flex-direction: column;
|
|
446
|
+
gap: 16px;
|
|
447
|
+
overflow-y: auto;
|
|
448
|
+
height: calc(100% - 49px);
|
|
449
|
+
|
|
450
|
+
.input-field-label {
|
|
451
|
+
margin-bottom: 8px;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
&.drawer-content-full-screen {
|
|
455
|
+
max-width: 680px;
|
|
456
|
+
margin: 0 auto;
|
|
457
|
+
padding: 16px 24px;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
`;
|
|
461
|
+
const StyleCommunityReivew = styled.div `
|
|
462
|
+
display: flex;
|
|
463
|
+
flex-direction: column;
|
|
464
|
+
gap: 8px;
|
|
465
|
+
margin-top: 8px;
|
|
466
|
+
|
|
467
|
+
.topic-review {
|
|
468
|
+
display: flex;
|
|
469
|
+
gap: 4px;
|
|
470
|
+
flex-wrap: wrap;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.community-review {
|
|
474
|
+
.tag-item {
|
|
475
|
+
background-color: ${theme.colors.neutral50};
|
|
476
|
+
|
|
477
|
+
img {
|
|
478
|
+
border-radius: 50%;
|
|
479
|
+
margin-right: 8px;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
`;
|
|
484
|
+
|
|
485
|
+
var img$3 = "data:image/svg+xml,%3csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.86019 13.3957C4.98735 13.5229 5.14492 13.5865 5.33291 13.5865H13.3233L15.9771 16.2403V5.91343C15.9771 5.72546 15.9135 5.56789 15.7864 5.44072C15.6592 5.31356 15.5016 5.24998 15.3136 5.24998H14.1887V12.036L13.9507 11.798H4.66944V12.923C4.66944 13.111 4.73302 13.2686 4.86019 13.3957ZM2.01562 3.28847V12.9519L4.66944 10.298H12.0252C12.2132 10.298 12.3708 10.2345 12.4979 10.1073C12.6251 9.98014 12.6887 9.82257 12.6887 9.63459V3.28847C12.6887 3.10048 12.6251 2.94291 12.4979 2.81574C12.3708 2.68858 12.2132 2.625 12.0252 2.625H2.67909C2.49111 2.625 2.33353 2.68858 2.20637 2.81574C2.07921 2.94291 2.01562 3.10048 2.01562 3.28847Z' fill='%232D87F3'/%3e%3c/svg%3e";
|
|
486
|
+
var IconCommunity = img$3;
|
|
487
|
+
|
|
488
|
+
const PostCommunityReview = ({ selectedTopics, currentCommunity }) => {
|
|
489
|
+
return (React__default.createElement(StyleCommunityReivew, null,
|
|
490
|
+
React__default.createElement("div", { className: "community-review" },
|
|
491
|
+
React__default.createElement(Button, { skipHover: true, size: "md", radius: "xl", className: "tag-item", variant: "tertiary" },
|
|
492
|
+
React__default.createElement(Text, { size: "p4", as: "span", color: "inherit" }, currentCommunity.name))),
|
|
493
|
+
React__default.createElement("div", { className: "topic-review", style: { display: 'none' } }, selectedTopics.map((topic) => {
|
|
494
|
+
return (React__default.createElement(Button, { skipHover: true, size: "sm", radius: "xl", className: "tag-item", key: topic.id, variant: "tertiary" },
|
|
495
|
+
React__default.createElement(Text, { size: "p4", as: "span", color: "inherit" }, topic.name)));
|
|
496
|
+
}))));
|
|
497
|
+
};
|
|
498
|
+
const CreatePostCommunity = ({ communitiesList, currentCommunity, selectedTopics, forceTopics, communityValue,
|
|
499
|
+
// error,
|
|
500
|
+
isFullscreen, isInEditMode, setSelectedTopics, setCommunityValue, removeKeyError, }) => {
|
|
501
|
+
const { t } = useTranslations();
|
|
502
|
+
const props = {
|
|
503
|
+
communitiesList,
|
|
504
|
+
currentCommunity,
|
|
505
|
+
selectedTopics,
|
|
506
|
+
communityValue,
|
|
507
|
+
isFullscreen,
|
|
508
|
+
isInEditMode,
|
|
509
|
+
forceTopics,
|
|
510
|
+
setSelectedTopics,
|
|
511
|
+
setCommunityValue,
|
|
512
|
+
removeKeyError,
|
|
513
|
+
};
|
|
514
|
+
console.log(props);
|
|
515
|
+
return (React__default.createElement("div", { className: "input-group" },
|
|
516
|
+
React__default.createElement(StyleSessionRow, null,
|
|
517
|
+
React__default.createElement("img", { alt: "anonymous-icon", src: IconCommunity, style: {
|
|
518
|
+
width: '18px',
|
|
519
|
+
height: '18px',
|
|
520
|
+
objectFit: 'contain',
|
|
521
|
+
marginLeft: 'auto',
|
|
522
|
+
} }),
|
|
523
|
+
React__default.createElement("div", { className: "session-title" }, t('createPost.communityAndTopic'))),
|
|
524
|
+
React__default.createElement(PostCommunityReview, { selectedTopics: selectedTopics, currentCommunity: currentCommunity })));
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
const CreatePostDescription = ({ className, style, bannedWords = [], value, onChange, onPreviewUrlChange, onInvalidUrlsChange,
|
|
528
|
+
// onImageFilesChange,
|
|
529
|
+
// imageFiles: imageFilesProp,
|
|
530
|
+
isReplying, footerEditor, }) => {
|
|
531
|
+
const { t } = useTranslations();
|
|
532
|
+
const [previewUrl, setPreviewUrl] = useState(null);
|
|
533
|
+
const imagePicker = useRef(null);
|
|
534
|
+
// const {
|
|
535
|
+
// onSelectImages,
|
|
536
|
+
// onRemoveImage,
|
|
537
|
+
// imageSrcs,
|
|
538
|
+
// // imageFiles,
|
|
539
|
+
// } = useImagePicker(imageFilesProp, onImageFilesChange)
|
|
540
|
+
useEffect(() => {
|
|
541
|
+
if (onPreviewUrlChange) {
|
|
542
|
+
if (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url)
|
|
543
|
+
onPreviewUrlChange({
|
|
544
|
+
title: previewUrl.title || '',
|
|
545
|
+
url: previewUrl.url || '',
|
|
546
|
+
image: previewUrl.image || '',
|
|
547
|
+
description: previewUrl.description || '',
|
|
548
|
+
});
|
|
549
|
+
else
|
|
550
|
+
onPreviewUrlChange(null);
|
|
551
|
+
}
|
|
552
|
+
}, [previewUrl]);
|
|
553
|
+
return (React__default.createElement(StyledCreatePostDescription, { className: className, style: style },
|
|
554
|
+
React__default.createElement(Text, { size: "p4", className: "description-label" }, t('createPost.popup.description')),
|
|
555
|
+
React__default.createElement("div", { className: `textarea-control` },
|
|
556
|
+
React__default.createElement("div", { className: "textarea-wrapper" },
|
|
557
|
+
React__default.createElement(RichTextEditor, { html: value || '', onChange: onChange, bannedWords: bannedWords, onImagePickerClick: () => { var _a; return (_a = imagePicker.current) === null || _a === void 0 ? void 0 : _a.click(); }, onPreviewUrlChange: setPreviewUrl, onInvalidUrlsChange: onInvalidUrlsChange, isReplying: isReplying }))),
|
|
558
|
+
footerEditor,
|
|
559
|
+
React__default.createElement(Text, { size: "p4", className: "count-string" },
|
|
560
|
+
t('character'),
|
|
561
|
+
": ",
|
|
562
|
+
innertext(value || '').length)));
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
var img$2 = "data:image/svg+xml,%3csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.01875 14.9812C3.28125 15.2437 3.60193 15.375 3.98078 15.375H14.0192C14.398 15.375 14.7187 15.2437 14.9812 14.9812C15.2437 14.7187 15.375 14.398 15.375 14.0192V3.98078C15.375 3.60193 15.2437 3.28125 14.9812 3.01875C14.7187 2.75625 14.398 2.625 14.0192 2.625H3.98078C3.60193 2.625 3.28125 2.75625 3.01875 3.01875C2.75625 3.28125 2.625 3.60193 2.625 3.98078V14.0192C2.625 14.398 2.75625 14.7187 3.01875 14.9812ZM12.3173 12.5625H5.74041C5.60483 12.5625 5.50435 12.5009 5.43896 12.3779C5.37358 12.2548 5.38608 12.1355 5.47646 12.0202L6.65914 10.4466C6.72933 10.3563 6.81851 10.3111 6.92668 10.3111C7.03486 10.3111 7.12404 10.3538 7.19423 10.4394L8.42306 12.0144L10.2577 9.62453C10.3279 9.53414 10.4182 9.48894 10.5288 9.48894C10.6394 9.48894 10.7298 9.53414 10.8 9.62453L12.5884 12.0202C12.674 12.1355 12.6841 12.2548 12.6187 12.3779C12.5533 12.5009 12.4528 12.5625 12.3173 12.5625Z' fill='%2300B16A'/%3e%3c/svg%3e";
|
|
566
|
+
var IconPhone = img$2;
|
|
567
|
+
|
|
568
|
+
const CreatePostPhotos = ({ imageFiles: imageFilesInit, setImageFiles, }) => {
|
|
569
|
+
const imageRef = useRef(null);
|
|
570
|
+
const { t } = useTranslations();
|
|
571
|
+
const { onSelectImages } = useImagePicker(imageFilesInit, setImageFiles);
|
|
572
|
+
const handleClick = () => {
|
|
573
|
+
var _a;
|
|
574
|
+
(_a = imageRef === null || imageRef === void 0 ? void 0 : imageRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
575
|
+
};
|
|
576
|
+
return (React__default.createElement("div", { className: "input-group" },
|
|
577
|
+
React__default.createElement(StyleSessionRow, { onClick: handleClick },
|
|
578
|
+
React__default.createElement("img", { alt: "anonymous-icon", src: IconPhone, style: {
|
|
579
|
+
width: '18px',
|
|
580
|
+
height: '18px',
|
|
581
|
+
objectFit: 'contain',
|
|
582
|
+
marginLeft: 'auto',
|
|
583
|
+
} }),
|
|
584
|
+
React__default.createElement("div", { className: "session-title" }, t('createPost.photos'))),
|
|
585
|
+
React__default.createElement("input", { ref: imageRef, type: "file", accept: "image/png, image/gif, image/jpeg", multiple: true, style: { display: 'none' }, onChange: (e) => onSelectImages(e) })));
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
const StyledCreatePostTitle = styled.div `
|
|
589
|
+
input:focus,
|
|
590
|
+
textarea:focus,
|
|
591
|
+
[contenteditable='true'] {
|
|
592
|
+
outline: none;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.title-input {
|
|
596
|
+
overflow: hidden;
|
|
597
|
+
width: 100%;
|
|
598
|
+
padding: 12px 16px;
|
|
599
|
+
border: solid 1px #d9d9d9;
|
|
600
|
+
border-radius: ${theme.borderRadius};
|
|
601
|
+
font-size: 16px;
|
|
602
|
+
line-height: 1.2;
|
|
603
|
+
white-space: nowrap;
|
|
604
|
+
:focus {
|
|
605
|
+
border-color: ${theme.colors.primaryBase};
|
|
606
|
+
box-shadow: 0px 0px 2px 2px ${theme.colors.primary200};
|
|
607
|
+
}
|
|
608
|
+
br {
|
|
609
|
+
display: none;
|
|
610
|
+
}
|
|
611
|
+
* {
|
|
612
|
+
display: inline;
|
|
613
|
+
white-space: nowrap;
|
|
614
|
+
}
|
|
615
|
+
mocka {
|
|
616
|
+
padding: 2px 6px;
|
|
617
|
+
border-radius: 1rem;
|
|
618
|
+
&[data-error='true'] {
|
|
619
|
+
background-color: #ffeeee;
|
|
620
|
+
color: red;
|
|
621
|
+
text-decoration: underline;
|
|
622
|
+
font-style: bold;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
ol,
|
|
626
|
+
ul {
|
|
627
|
+
padding-left: 1rem;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
label {
|
|
632
|
+
display: block;
|
|
633
|
+
margin-bottom: 5px;
|
|
634
|
+
color: ${theme.colors.gray600};
|
|
635
|
+
font-size: 13px;
|
|
636
|
+
font-weight: bold;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.count-string {
|
|
640
|
+
margin-top: 5px;
|
|
641
|
+
color: ${theme.colors.gray500};
|
|
642
|
+
font-size: 11px;
|
|
643
|
+
text-align: right;
|
|
644
|
+
}
|
|
645
|
+
`;
|
|
646
|
+
|
|
647
|
+
const TITLE_LIMIT = 120;
|
|
648
|
+
const inputModify$1 = (value, opts) => {
|
|
649
|
+
if (!opts)
|
|
650
|
+
return value;
|
|
651
|
+
const { limit, bannedWords = [] } = opts;
|
|
652
|
+
const shorten = typeof limit === 'number' && limit >= 0 ? value.substring(0, limit) : value;
|
|
653
|
+
const processedValue = highlightBadWords(shorten, bannedWords);
|
|
654
|
+
return processedValue;
|
|
655
|
+
};
|
|
656
|
+
const CreatePostTitle = ({ className, style, bannedWords = [], value, onChange, }) => {
|
|
657
|
+
var _a;
|
|
658
|
+
const { t } = useTranslations();
|
|
659
|
+
const [titleValue, setTitleValue] = useState('');
|
|
660
|
+
const titleRef = useRef(null);
|
|
661
|
+
useEffect(() => {
|
|
662
|
+
if (titleRef.current) {
|
|
663
|
+
const pasteHandler = (e) => {
|
|
664
|
+
var _a;
|
|
665
|
+
e.preventDefault();
|
|
666
|
+
const text = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/plain');
|
|
667
|
+
document.execCommand('insertHTML', false, text);
|
|
668
|
+
};
|
|
669
|
+
const contentDiv = titleRef.current;
|
|
670
|
+
contentDiv.addEventListener('paste', pasteHandler, {
|
|
671
|
+
passive: true,
|
|
672
|
+
});
|
|
673
|
+
return () => contentDiv.removeEventListener('paste', pasteHandler);
|
|
674
|
+
}
|
|
675
|
+
}, [titleRef]);
|
|
676
|
+
const bannedString = (bannedWords === null || bannedWords === void 0 ? void 0 : bannedWords.join(',')) || '';
|
|
677
|
+
useEffect(() => {
|
|
678
|
+
var _a;
|
|
679
|
+
if (bannedString) {
|
|
680
|
+
const titleText = (_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText;
|
|
681
|
+
if (titleText) {
|
|
682
|
+
const titleValueWithBanned = highlightBadWords(titleText, bannedWords);
|
|
683
|
+
if (titleValueWithBanned !== titleText) {
|
|
684
|
+
onChange && onChange(titleValueWithBanned);
|
|
685
|
+
setTitleValue(titleValueWithBanned);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}, [bannedString]);
|
|
690
|
+
const debounceInputModify = useCallback(debounce(() => {
|
|
691
|
+
if (titleRef.current) {
|
|
692
|
+
const shortenString = inputModify$1(titleRef.current.innerText, {
|
|
693
|
+
limit: TITLE_LIMIT,
|
|
694
|
+
bannedWords,
|
|
695
|
+
});
|
|
696
|
+
onChange && onChange(shortenString);
|
|
697
|
+
setTitleValue(shortenString);
|
|
698
|
+
}
|
|
699
|
+
}, 300), []);
|
|
700
|
+
useEffect(() => {
|
|
701
|
+
setTimeout(() => {
|
|
702
|
+
var _a;
|
|
703
|
+
(_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
704
|
+
}, 500);
|
|
705
|
+
}, []);
|
|
706
|
+
return (React__default.createElement(StyledCreatePostTitle, { className: className, style: style },
|
|
707
|
+
React__default.createElement(Input, { name: "title", value: value || titleValue, size: "md", label: t('createPost.title'), CustomInput: React__default.createElement(ContentEditable, { innerRef: titleRef, html: value || titleValue, onChange: () => {
|
|
708
|
+
if (titleRef.current &&
|
|
709
|
+
titleRef.current.innerText !== (value || titleValue)) {
|
|
710
|
+
const initialValue = inputModify$1(titleRef.current.innerText, {
|
|
711
|
+
bannedWords,
|
|
712
|
+
});
|
|
713
|
+
onChange && onChange(initialValue);
|
|
714
|
+
setTitleValue(initialValue);
|
|
715
|
+
debounceInputModify();
|
|
716
|
+
}
|
|
717
|
+
}, className: "title-input" }) }),
|
|
718
|
+
React__default.createElement(Text, { size: "p4", className: "count-string" }, t('createPost.popup.wordCount', {
|
|
719
|
+
count: ((_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText.length) || 0,
|
|
720
|
+
max: TITLE_LIMIT,
|
|
721
|
+
}))));
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
const StyledPopupFrame = styled(PopupFrame) `
|
|
725
|
+
& > div[data-open]:first-child {
|
|
726
|
+
z-index: 1000;
|
|
727
|
+
height: auto;
|
|
728
|
+
max-width: 448px;
|
|
729
|
+
}
|
|
730
|
+
.custom-media-dialog {
|
|
731
|
+
padding: 1rem;
|
|
732
|
+
.image-gallery {
|
|
733
|
+
display: none;
|
|
734
|
+
.image-item {
|
|
735
|
+
&.no-image {
|
|
736
|
+
cursor: pointer;
|
|
737
|
+
}
|
|
738
|
+
.camera-btn {
|
|
739
|
+
position: absolute;
|
|
740
|
+
top: calc(100% - 32px);
|
|
741
|
+
right: 8px;
|
|
742
|
+
left: unset;
|
|
743
|
+
width: 24px;
|
|
744
|
+
height: 24px;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
.custom-media-add-btn {
|
|
749
|
+
margin-left: auto;
|
|
750
|
+
display: block;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
`;
|
|
754
|
+
const StyledInput = styled(Input$1) `
|
|
755
|
+
margin-bottom: 10px;
|
|
756
|
+
`;
|
|
757
|
+
const StyleWrapperInfo = styled.div `
|
|
758
|
+
display: flex;
|
|
759
|
+
gap: 4px;
|
|
760
|
+
align-items: flex-start;
|
|
761
|
+
margin-bottom: 14px;
|
|
762
|
+
|
|
763
|
+
img {
|
|
764
|
+
margin-top: 2px;
|
|
765
|
+
}
|
|
766
|
+
`;
|
|
767
|
+
|
|
768
|
+
var img$1 = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8.0026 1.33334C4.3206 1.33334 1.33594 4.31801 1.33594 8.00001C1.33594 11.682 4.3206 14.6667 8.0026 14.6667C11.6846 14.6667 14.6693 11.682 14.6693 8.00001C14.6693 4.31801 11.6846 1.33334 8.0026 1.33334ZM8.0026 11.3333C7.6346 11.3333 7.33594 11.0347 7.33594 10.6667V8.00001C7.33594 7.63201 7.6346 7.33334 8.0026 7.33334C8.3706 7.33334 8.66927 7.63201 8.66927 8.00001V10.6667C8.66927 11.0347 8.3706 11.3333 8.0026 11.3333ZM8.33594 6.00001H7.66927C7.48527 6.00001 7.33594 5.85068 7.33594 5.66668V5.00001C7.33594 4.81601 7.48527 4.66668 7.66927 4.66668H8.33594C8.51994 4.66668 8.66927 4.81601 8.66927 5.00001V5.66668C8.66927 5.85068 8.51994 6.00001 8.33594 6.00001Z' fill='%232D87F3'/%3e%3c/svg%3e";
|
|
769
|
+
var IconInfo = img$1;
|
|
770
|
+
|
|
771
|
+
const SocialLinkPopup = ({ isOpen, onClose, onSocialLinkChanged, socialLinkData, }) => {
|
|
772
|
+
const { t } = useTranslations();
|
|
773
|
+
const imagePickerRef = useRef(null);
|
|
774
|
+
const [socialLink, setSocialLinkUrl] = useState('');
|
|
775
|
+
const { onSelectImages, onRemoveImage, imageSrcs, imageFiles } = useImagePicker();
|
|
776
|
+
useEffect(() => {
|
|
777
|
+
if (isOpen) {
|
|
778
|
+
setSocialLinkUrl((socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) || '');
|
|
779
|
+
}
|
|
780
|
+
}, [isOpen]);
|
|
781
|
+
const isAcceptedLink = socialLink.includes('youtu.be') ||
|
|
782
|
+
socialLink.includes('youtube.com') ||
|
|
783
|
+
socialLink.includes('facebook.com') ||
|
|
784
|
+
socialLink.includes('fb.watch') ||
|
|
785
|
+
socialLink.includes('tiktok.com');
|
|
786
|
+
const isValid = !!socialLink && isAcceptedLink;
|
|
787
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
788
|
+
React__default.createElement("input", { ref: imagePickerRef, type: "file", accept: "image/png, image/gif, image/jpeg", style: { display: 'none' }, onChange: onSelectImages }),
|
|
789
|
+
React__default.createElement(StyledPopupFrame, { isOpen: isOpen, onClose: onClose, heading: "Insert", style: {
|
|
790
|
+
zIndex: 3,
|
|
791
|
+
} },
|
|
792
|
+
React__default.createElement("div", { className: "custom-media-dialog", onClick: (e) => e.stopPropagation() },
|
|
793
|
+
React__default.createElement(StyledInput, { size: "md", name: "custom-media-url", placeholder: "URL", value: socialLink, onChange: (v) => setSocialLinkUrl(v), label: "" }),
|
|
794
|
+
React__default.createElement(StyleWrapperInfo, null,
|
|
795
|
+
React__default.createElement("img", { src: IconInfo, alt: "" }),
|
|
796
|
+
React__default.createElement(Text, { size: "c2", color: "#737373" }, t('editor.addSocialLink.warningDomain'))),
|
|
797
|
+
!imageSrcs[0] ? (React__default.createElement("div", { className: "image-gallery" },
|
|
798
|
+
React__default.createElement("div", { className: "image-item no-image", onClick: () => { var _a; return (_a = imagePickerRef.current) === null || _a === void 0 ? void 0 : _a.click(); } }))) : (React__default.createElement("div", { className: "image-gallery" },
|
|
799
|
+
React__default.createElement("div", { className: "image-item" },
|
|
800
|
+
React__default.createElement("img", { src: imageSrcs[0], alt: "" }),
|
|
801
|
+
React__default.createElement("img", { className: "close-btn", alt: "", onClick: () => onRemoveImage(0) })))),
|
|
802
|
+
React__default.createElement(Button, { color: "primary", size: "md", variant: "primary", type: "button", className: "custom-media-add-btn", onClick: (e) => {
|
|
803
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
804
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
805
|
+
if (isValid) {
|
|
806
|
+
onSocialLinkChanged === null || onSocialLinkChanged === void 0 ? void 0 : onSocialLinkChanged({
|
|
807
|
+
url: !socialLink.includes('http')
|
|
808
|
+
? 'https://' + socialLink
|
|
809
|
+
: socialLink,
|
|
810
|
+
banner: imageFiles[0],
|
|
811
|
+
});
|
|
812
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
813
|
+
}
|
|
814
|
+
}, disabled: !isValid }, t('editor.addSocialLink.addLink'))))));
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
var img = "data:image/svg+xml,%3csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.23078 14.625C2.85193 14.625 2.53125 14.4937 2.26875 14.2312C2.00625 13.9687 1.875 13.648 1.875 13.2692V4.73078C1.875 4.35193 2.00625 4.03125 2.26875 3.76875C2.53125 3.50625 2.85193 3.375 3.23078 3.375H14.7692C15.148 3.375 15.4687 3.50625 15.7312 3.76875C15.9937 4.03125 16.125 4.35193 16.125 4.73078V10.315C15.8029 10.1922 15.4534 10.125 15.0882 10.125H11.9117C10.3036 10.125 8.99998 11.4286 8.99998 13.0368C8.99998 13.6227 9.17304 14.1682 9.47085 14.625H3.23078ZM7.83606 11.6899L11.5846 9.28988C11.6875 9.21969 11.7389 9.12306 11.7389 8.99998C11.7389 8.87691 11.6875 8.78028 11.5846 8.71009L7.83606 6.31011C7.72067 6.23222 7.60456 6.22597 7.48774 6.29136C7.37091 6.35673 7.3125 6.45721 7.3125 6.59278V11.4072C7.3125 11.5428 7.37091 11.6432 7.48774 11.7086C7.60456 11.774 7.72067 11.7677 7.83606 11.6899ZM10.7181 14.6953C11.1136 15.0907 11.5889 15.2884 12.1442 15.2884H12.8099C12.9325 15.2884 13.0352 15.247 13.1182 15.1642C13.2011 15.0813 13.2426 14.9786 13.2426 14.856C13.2426 14.7333 13.2011 14.6305 13.1182 14.5475C13.0352 14.4646 12.9325 14.4231 12.8099 14.4231H12.1442C11.8269 14.4231 11.5553 14.3101 11.3293 14.0841C11.1033 13.8582 10.9903 13.5865 10.9903 13.2692C10.9903 12.9519 11.1033 12.6803 11.3293 12.4543C11.5553 12.2284 11.8269 12.1154 12.1442 12.1154H12.8099C12.9325 12.1154 13.0352 12.074 13.1182 11.9911C13.2011 11.9083 13.2426 11.8055 13.2426 11.6829C13.2426 11.5602 13.2011 11.4574 13.1182 11.3745C13.0352 11.2915 12.9325 11.25 12.8099 11.25H12.1442C11.5889 11.25 11.1136 11.4477 10.7181 11.8432C10.3227 12.2386 10.125 12.7139 10.125 13.2692C10.125 13.8245 10.3227 14.2999 10.7181 14.6953ZM12.2686 13.5775C12.3515 13.6604 12.4543 13.7019 12.5769 13.7019H15.1731C15.2957 13.7019 15.3984 13.6605 15.4814 13.5776C15.5643 13.4948 15.6058 13.3921 15.6058 13.2694C15.6058 13.1468 15.5643 13.044 15.4814 12.961C15.3984 12.878 15.2957 12.8365 15.1731 12.8365H12.5769C12.4543 12.8365 12.3515 12.878 12.2686 12.9608C12.1857 13.0436 12.1442 13.1464 12.1442 13.269C12.1442 13.3917 12.1857 13.4945 12.2686 13.5775ZM14.9401 15.2884H15.6058C16.161 15.2884 16.6364 15.0911 17.0318 14.6966C17.4273 14.3019 17.625 13.8268 17.625 13.271C17.625 12.7068 17.4273 12.2289 17.0318 11.8374C16.6364 11.4458 16.161 11.25 15.6058 11.25H14.9401C14.8175 11.25 14.7147 11.2914 14.6318 11.3743C14.5488 11.4571 14.5074 11.5598 14.5074 11.6825C14.5074 11.8051 14.5488 11.908 14.6318 11.9909C14.7147 12.0739 14.8175 12.1154 14.9401 12.1154H15.6058C15.9231 12.1154 16.1947 12.2284 16.4207 12.4543C16.6466 12.6803 16.7596 12.9519 16.7596 13.2692C16.7596 13.5865 16.6466 13.8582 16.4207 14.0841C16.1947 14.3101 15.9231 14.4231 15.6058 14.4231H14.9401C14.8175 14.4231 14.7147 14.4645 14.6318 14.5473C14.5488 14.6302 14.5074 14.7329 14.5074 14.8556C14.5074 14.9782 14.5488 15.081 14.6318 15.164C14.7147 15.247 14.8175 15.2884 14.9401 15.2884Z' fill='%23F44D2C'/%3e%3c/svg%3e";
|
|
818
|
+
var IconVideo = img;
|
|
819
|
+
|
|
820
|
+
const CreatePostVideo = ({ socialLinkData, setSocialLinkData, }) => {
|
|
821
|
+
const { t } = useTranslations();
|
|
822
|
+
const [activeModal, setActiveModal] = useState(false);
|
|
823
|
+
const handleClick = () => {
|
|
824
|
+
setActiveModal(true);
|
|
825
|
+
};
|
|
826
|
+
return (React__default.createElement("div", { className: "input-group" },
|
|
827
|
+
React__default.createElement(StyleSessionRow, { onClick: handleClick },
|
|
828
|
+
React__default.createElement("img", { alt: "anonymous-icon", src: IconVideo, style: {
|
|
829
|
+
width: '18px',
|
|
830
|
+
height: '18px',
|
|
831
|
+
objectFit: 'contain',
|
|
832
|
+
marginLeft: 'auto',
|
|
833
|
+
} }),
|
|
834
|
+
React__default.createElement("div", { className: "session-title" }, t('createPost.videoOrLink'))),
|
|
835
|
+
React__default.createElement(SocialLinkPopup, { isOpen: activeModal, onClose: () => setActiveModal(false), onSocialLinkChanged: setSocialLinkData, socialLinkData: socialLinkData })));
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
const StyleReviewPhoto = styled.div `
|
|
839
|
+
.mantine-Text-root {
|
|
840
|
+
margin-bottom: 4px;
|
|
841
|
+
}
|
|
842
|
+
.preview-images-container {
|
|
843
|
+
display: flex;
|
|
844
|
+
gap: 8px;
|
|
845
|
+
overflow-x: auto;
|
|
846
|
+
overflow-y: hidden;
|
|
847
|
+
.image-src-wrapper {
|
|
848
|
+
flex: 0 0 140px;
|
|
849
|
+
width: 140px;
|
|
850
|
+
height: 96px;
|
|
851
|
+
border-radius: 4px;
|
|
852
|
+
position: relative;
|
|
853
|
+
img {
|
|
854
|
+
border-radius: 4px;
|
|
855
|
+
}
|
|
856
|
+
.icon-close {
|
|
857
|
+
position: absolute;
|
|
858
|
+
top: 6px;
|
|
859
|
+
right: 6px;
|
|
860
|
+
cursor: pointer;
|
|
861
|
+
z-index: 10;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
`;
|
|
866
|
+
|
|
867
|
+
const PostPhotosReview = ({ error, imageFiles: imageFilesInit, setImageFiles, removeKeyError, }) => {
|
|
868
|
+
const { t } = useTranslations();
|
|
869
|
+
const { imageSrcs, onRemoveImage } = useImagePicker(imageFilesInit, setImageFiles);
|
|
870
|
+
return (React__default.createElement(StyleReviewPhoto, { className: "input-group" },
|
|
871
|
+
React__default.createElement(Text, { size: "p5", weight: "semiBold" }, t('createPost.photos')),
|
|
872
|
+
React__default.createElement("div", { className: "preview-images-container" }, imageSrcs === null || imageSrcs === void 0 ? void 0 : imageSrcs.map((src, index) => {
|
|
873
|
+
return (React__default.createElement("div", { className: "image-src-wrapper", key: index },
|
|
874
|
+
React__default.createElement("img", { src: src, className: "preview-image", alt: "", style: {
|
|
875
|
+
width: '100%',
|
|
876
|
+
height: '100%',
|
|
877
|
+
objectFit: 'cover',
|
|
878
|
+
} }),
|
|
879
|
+
React__default.createElement("img", { alt: "", className: "icon-close", src: IconCloseCircle, onClick: () => {
|
|
880
|
+
removeKeyError && removeKeyError('photos');
|
|
881
|
+
onRemoveImage(index);
|
|
882
|
+
} })));
|
|
883
|
+
})),
|
|
884
|
+
error && (error === null || error === void 0 ? void 0 : error.photos) && (React__default.createElement(StyledError, null,
|
|
885
|
+
React__default.createElement(Text, { size: "p5", color: theme.colors.red600 }, error.photos)))));
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
const inputModify = (value, opts) => {
|
|
889
|
+
var _a;
|
|
890
|
+
const { formatUrl, bannedWords = [] } = opts || {};
|
|
891
|
+
const removedFormat = fixMalformedMention(removeFontFormat(value));
|
|
892
|
+
if (!formatUrl)
|
|
893
|
+
return {
|
|
894
|
+
value: highlightBadWords(removedFormat, bannedWords),
|
|
895
|
+
};
|
|
896
|
+
let descriptionWithWrappedAnchor = removeEdittedBannedWord(wrapAnchorAroundUrls(removedFormat));
|
|
897
|
+
const urls = getUrlsFromEditorString(removedFormat);
|
|
898
|
+
if (urls) {
|
|
899
|
+
const invalidUrls = [];
|
|
900
|
+
let previewUrl = '';
|
|
901
|
+
urls.forEach((url) => {
|
|
902
|
+
if (!url)
|
|
903
|
+
return;
|
|
904
|
+
try {
|
|
905
|
+
const jsUrl = new URL(url);
|
|
906
|
+
// Check url has must into domain hellohealthgroup
|
|
907
|
+
if (!ALLOW_DOMAIN_URL.some((o) => jsUrl.origin.endsWith(o))) {
|
|
908
|
+
invalidUrls.push('notification.limitUrlDomain');
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
// Check url have special character
|
|
912
|
+
if (url.endsWith('&')) {
|
|
913
|
+
invalidUrls.push('notification.urlWrongFormat');
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
catch (_a) {
|
|
918
|
+
invalidUrls.push(url);
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
if (invalidUrls.length > 0) {
|
|
922
|
+
descriptionWithWrappedAnchor = descriptionWithWrappedAnchor
|
|
923
|
+
.replace(new RegExp(`data-url="true">(${invalidUrls.map(escapeRegExp).join('|')})<`, 'gi'), 'data-error="true" data-url="true">$1<')
|
|
924
|
+
.replace(new RegExp(`data-href="(${invalidUrls
|
|
925
|
+
.map(escapeRegExp)
|
|
926
|
+
.join('|')})" data-url="true">`, 'gi'), 'data-href="$1" data-error="true" data-url="true">');
|
|
927
|
+
}
|
|
928
|
+
previewUrl = (_a = urls.filter((u) => invalidUrls.indexOf(u) === -1)) === null || _a === void 0 ? void 0 : _a[0];
|
|
929
|
+
return {
|
|
930
|
+
invalidUrls,
|
|
931
|
+
previewUrl,
|
|
932
|
+
value: highlightBadWords(descriptionWithWrappedAnchor, bannedWords),
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
return {
|
|
936
|
+
value: highlightBadWords(descriptionWithWrappedAnchor, bannedWords),
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
const usePreviewUrl = (bannedWords, onChange) => {
|
|
940
|
+
const { data: { locale }, } = useContext(TogetherComponentGlobalContext);
|
|
941
|
+
const [previewUrl, setPreviewUrl] = useState(null);
|
|
942
|
+
const bannedWordsRef = useRef([]);
|
|
943
|
+
bannedWordsRef.current = bannedWords;
|
|
944
|
+
const fetchPreviewData = (url) => {
|
|
945
|
+
if (!previewUrl || previewUrl.url !== url) {
|
|
946
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl({
|
|
947
|
+
url,
|
|
948
|
+
isFetching: true,
|
|
949
|
+
});
|
|
950
|
+
callApi(getApiPath(PATHS.FETCH_PREVIEW, {
|
|
951
|
+
_locale: locale,
|
|
952
|
+
}), 'POST', {
|
|
953
|
+
data: {
|
|
954
|
+
link: url,
|
|
955
|
+
},
|
|
956
|
+
headers: {
|
|
957
|
+
'Content-Type': 'application/json',
|
|
958
|
+
},
|
|
959
|
+
})
|
|
960
|
+
.then((res) => {
|
|
961
|
+
var _a, _b, _c, _d;
|
|
962
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl({
|
|
963
|
+
title: (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.title,
|
|
964
|
+
description: (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.description,
|
|
965
|
+
image: ((_c = res === null || res === void 0 ? void 0 : res.data) === null || _c === void 0 ? void 0 : _c.image) || ((_d = res === null || res === void 0 ? void 0 : res.data) === null || _d === void 0 ? void 0 : _d.logo),
|
|
966
|
+
url,
|
|
967
|
+
});
|
|
968
|
+
})
|
|
969
|
+
.catch(() => {
|
|
970
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
const fetchPreviewDataRef = useRef(fetchPreviewData);
|
|
975
|
+
fetchPreviewDataRef.current = fetchPreviewData;
|
|
976
|
+
const [invalidUrls, setInvalidUrls] = useState([]);
|
|
977
|
+
const debounceInputModify = useCallback(debounce((v) => {
|
|
978
|
+
if (v) {
|
|
979
|
+
const processedInput = inputModify(v, {
|
|
980
|
+
bannedWords: bannedWordsRef.current,
|
|
981
|
+
formatUrl: true,
|
|
982
|
+
});
|
|
983
|
+
const { invalidUrls: _invalidUrls, previewUrl: _previewUrl, value, } = processedInput;
|
|
984
|
+
if (_invalidUrls && (_invalidUrls === null || _invalidUrls === void 0 ? void 0 : _invalidUrls.length)) {
|
|
985
|
+
setInvalidUrls(_invalidUrls);
|
|
986
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
setInvalidUrls([]);
|
|
990
|
+
if (_previewUrl) {
|
|
991
|
+
fetchPreviewDataRef.current(_previewUrl);
|
|
992
|
+
}
|
|
993
|
+
else
|
|
994
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
|
|
995
|
+
if (value !== v) {
|
|
996
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
}, 500), []);
|
|
1001
|
+
return {
|
|
1002
|
+
previewUrl,
|
|
1003
|
+
setPreviewUrl,
|
|
1004
|
+
invalidUrls,
|
|
1005
|
+
debounceInputModify,
|
|
1006
|
+
fetchPreviewData,
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
const StyleReviewVideo = styled.div `
|
|
1011
|
+
.link-preview-wrapper {
|
|
1012
|
+
position: relative;
|
|
1013
|
+
.icon-close {
|
|
1014
|
+
position: absolute;
|
|
1015
|
+
top: 6px;
|
|
1016
|
+
right: 6px;
|
|
1017
|
+
cursor: pointer;
|
|
1018
|
+
z-index: 10;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
.mantine-Text-root {
|
|
1022
|
+
margin-bottom: 4px;
|
|
1023
|
+
}
|
|
1024
|
+
`;
|
|
1025
|
+
|
|
1026
|
+
const PostVideoReview = ({ socialLinkData, bannedWords, onChange, onInvalidUrlsChange, onSocialLinkChanged, }) => {
|
|
1027
|
+
const { t } = useTranslations();
|
|
1028
|
+
const { invalidUrls, previewUrl, fetchPreviewData, setPreviewUrl } = usePreviewUrl(bannedWords || [], onChange);
|
|
1029
|
+
useEffect(() => {
|
|
1030
|
+
if (socialLinkData && socialLinkData.url) {
|
|
1031
|
+
fetchPreviewData(socialLinkData.url);
|
|
1032
|
+
}
|
|
1033
|
+
}, [socialLinkData, fetchPreviewData]);
|
|
1034
|
+
useEffect(() => {
|
|
1035
|
+
if (invalidUrls) {
|
|
1036
|
+
onInvalidUrlsChange === null || onInvalidUrlsChange === void 0 ? void 0 : onInvalidUrlsChange(invalidUrls);
|
|
1037
|
+
}
|
|
1038
|
+
}, [invalidUrls]);
|
|
1039
|
+
return (React__default.createElement(StyleReviewVideo, { className: "input-group" },
|
|
1040
|
+
React__default.createElement(Text, { size: "p5", weight: "semiBold" }, t('createPost.video')),
|
|
1041
|
+
React__default.createElement("div", { className: "link-preview-wrapper" }, (socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) && previewUrl && (React__default.createElement("div", { className: "link-preview-wrapper" }, previewUrl.isFetching ? (React__default.createElement(Loading, null)) : (React__default.createElement(React__default.Fragment, null,
|
|
1042
|
+
React__default.createElement(CardLink, { title: previewUrl.title, url: previewUrl.url || '#', image: previewUrl.image, noRefetch: true }),
|
|
1043
|
+
React__default.createElement("img", { alt: "", src: IconCloseCircle, className: "icon-close", onClick: () => {
|
|
1044
|
+
setPreviewUrl(null);
|
|
1045
|
+
onSocialLinkChanged && onSocialLinkChanged(null);
|
|
1046
|
+
} }))))))));
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
const MAX_SIZE_FILE_UPLOAD = 10 * 1024 * 1024;
|
|
1050
|
+
const applySpecialCharSite = [
|
|
1051
|
+
LOCALE.PhilippinesEnglish,
|
|
1052
|
+
LOCALE.PhilippinesTagalog,
|
|
1053
|
+
LOCALE.Indonesia,
|
|
1054
|
+
LOCALE.Malaysia,
|
|
1055
|
+
LOCALE.Vietnam,
|
|
1056
|
+
];
|
|
1057
|
+
const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose, communities = [], forceSelectCommunity, forceSelectTopics, articleId, optionalTopic, editPostData, defaultCommunity, defaultTopics, selectAskDoctor, showAskDoctorOptions, userInfo, }) => {
|
|
1058
|
+
const isInEditMode = !!(editPostData === null || editPostData === void 0 ? void 0 : editPostData.id);
|
|
1059
|
+
const { data: { locale, router, env: { togetherBasePath }, }, action: { pushNotifications, sanitizeFunction }, } = useContext(TogetherComponentGlobalContext);
|
|
1060
|
+
const { asPath } = router || {};
|
|
1061
|
+
const { t } = useTranslations();
|
|
1062
|
+
// const [isAnonymous, setIsAnonymous] = useState<boolean>(false)
|
|
1063
|
+
const [isAskDoctor, setIsAskDoctor] = useState(selectAskDoctor);
|
|
1064
|
+
const [specialCharErr, setspecialCharErr] = useState(false);
|
|
1065
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
1066
|
+
const [titleValue, setTitleValue] = useState('');
|
|
1067
|
+
const [descriptionValue, setDescriptionValue] = useState('');
|
|
1068
|
+
const [communityValue, setCommunityValue] = useState(forceSelectCommunity
|
|
1069
|
+
? {
|
|
1070
|
+
label: forceSelectCommunity.name,
|
|
1071
|
+
value: `${forceSelectCommunity.id || ''}-${forceSelectCommunity.mappedCategoryId || ''}`,
|
|
1072
|
+
}
|
|
1073
|
+
: {
|
|
1074
|
+
label: t('community.choose'),
|
|
1075
|
+
value: '',
|
|
1076
|
+
});
|
|
1077
|
+
const [selectedTopics, setSelectedTopics] = useState([...forceSelectTopics] || []);
|
|
1078
|
+
const [socialLinkData, setSocialLinkData] = useState();
|
|
1079
|
+
const [error, setError] = useState({});
|
|
1080
|
+
const [imageFiles, setImageFiles] = useState([]);
|
|
1081
|
+
const [bannedWords, setBannedWords] = useState([]);
|
|
1082
|
+
const [postActionValue, setPostActionValue] = useState({
|
|
1083
|
+
label: t('cardPost.public'),
|
|
1084
|
+
value: 'public',
|
|
1085
|
+
});
|
|
1086
|
+
const { imageSrcs = [] } = useImagePicker(imageFiles);
|
|
1087
|
+
const currentCommunity = forceSelectCommunity ||
|
|
1088
|
+
communities.find((c) => `${c.id || ''}-${c.mappedCategoryId || ''}` === communityValue.value);
|
|
1089
|
+
const communitiesList = forceSelectCommunity
|
|
1090
|
+
? [forceSelectCommunity]
|
|
1091
|
+
: communities
|
|
1092
|
+
.filter((c) => c.isActive)
|
|
1093
|
+
.sort((a, b) => {
|
|
1094
|
+
if (a.name > b.name)
|
|
1095
|
+
return 1;
|
|
1096
|
+
if (a.name < b.name)
|
|
1097
|
+
return -1;
|
|
1098
|
+
return 0;
|
|
1099
|
+
});
|
|
1100
|
+
const [previewUrl, setPreviewUrl] = useState(null);
|
|
1101
|
+
const [invalidUrls, setInvalidUrls] = useState([]);
|
|
1102
|
+
const isReadyToSubmit = titleValue &&
|
|
1103
|
+
!specialCharErr &&
|
|
1104
|
+
innertext(descriptionValue) &&
|
|
1105
|
+
(optionalTopic || (!optionalTopic && selectedTopics.length > 0)) &&
|
|
1106
|
+
currentCommunity &&
|
|
1107
|
+
(!imageFiles || imageFiles.length <= MAX_IMAGE_UPLOADS) &&
|
|
1108
|
+
!(invalidUrls === null || invalidUrls === void 0 ? void 0 : invalidUrls.length) &&
|
|
1109
|
+
!isSubmitting;
|
|
1110
|
+
const postActionType = [
|
|
1111
|
+
{
|
|
1112
|
+
label: t('cardPost.public'),
|
|
1113
|
+
value: 'public',
|
|
1114
|
+
icon: (React__default.createElement("img", { alt: "anonymous-icon", src: IconPublic, style: {
|
|
1115
|
+
width: '100%',
|
|
1116
|
+
height: '100%',
|
|
1117
|
+
objectFit: 'contain',
|
|
1118
|
+
marginLeft: 'auto',
|
|
1119
|
+
} })),
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
label: t('cardPost.anonymous'),
|
|
1123
|
+
value: 'anonymous',
|
|
1124
|
+
icon: (React__default.createElement("img", { alt: "anonymous-icon", src: IconAnonymous, style: {
|
|
1125
|
+
width: '100%',
|
|
1126
|
+
height: '100%',
|
|
1127
|
+
objectFit: 'contain',
|
|
1128
|
+
marginLeft: 'auto',
|
|
1129
|
+
} })),
|
|
1130
|
+
},
|
|
1131
|
+
];
|
|
1132
|
+
// HANDLE etra action when OPEN AND CLOSE
|
|
1133
|
+
useEffect(() => {
|
|
1134
|
+
if (editPostData) {
|
|
1135
|
+
const post = editPostData;
|
|
1136
|
+
setTitleValue(post.title || '');
|
|
1137
|
+
setDescriptionValue(decodeMention(decodePostUrl(post.description || '', 'edit'), post.mentions));
|
|
1138
|
+
setCommunityValue({
|
|
1139
|
+
label: post.community.name,
|
|
1140
|
+
value: `${post.community.id || ''}-${post.community.mappedCategoryId || ''}`,
|
|
1141
|
+
});
|
|
1142
|
+
setSelectedTopics(post.topics || []);
|
|
1143
|
+
setImageFiles(post.photos || []);
|
|
1144
|
+
// setIsAnonymous(!!post.isAnonymous || false)
|
|
1145
|
+
setIsAskDoctor(!!post.isAskDoctor || false);
|
|
1146
|
+
}
|
|
1147
|
+
else {
|
|
1148
|
+
if (defaultCommunity) {
|
|
1149
|
+
setCommunityValue({
|
|
1150
|
+
label: defaultCommunity.name,
|
|
1151
|
+
value: `${defaultCommunity.id || ''}-${defaultCommunity.mappedCategoryId || ''}`,
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
if (defaultTopics) {
|
|
1155
|
+
setSelectedTopics(defaultTopics);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
}, []);
|
|
1159
|
+
useEffect(() => {
|
|
1160
|
+
setspecialCharErr(applySpecialCharSite.includes(locale) &&
|
|
1161
|
+
titleValue !== '' &&
|
|
1162
|
+
!/[a-zA-Z]/.test(titleValue));
|
|
1163
|
+
setError({});
|
|
1164
|
+
}, [titleValue]);
|
|
1165
|
+
const onCreateEditSuccess = (res) => {
|
|
1166
|
+
if (onPostCreatedEdited) {
|
|
1167
|
+
onPostCreatedEdited(formatPost(res), isInEditMode);
|
|
1168
|
+
}
|
|
1169
|
+
onClose && onClose();
|
|
1170
|
+
};
|
|
1171
|
+
const validationUploadPhoto = (files) => {
|
|
1172
|
+
const errorMessage = Object.assign({}, error);
|
|
1173
|
+
if (files && files.length > 10) {
|
|
1174
|
+
errorMessage.photos = t('createPost.message.photoMaxium');
|
|
1175
|
+
}
|
|
1176
|
+
if (files && files.length) {
|
|
1177
|
+
const inValidSizeFile = files.some((file) => (file === null || file === void 0 ? void 0 : file.size) > MAX_SIZE_FILE_UPLOAD);
|
|
1178
|
+
if (inValidSizeFile) {
|
|
1179
|
+
errorMessage.photos = t('createPost.message.photoSize');
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
setError(errorMessage);
|
|
1183
|
+
};
|
|
1184
|
+
const validationPost = () => {
|
|
1185
|
+
let hasError = false;
|
|
1186
|
+
const errorMessage = {};
|
|
1187
|
+
const description = innertext(descriptionValue);
|
|
1188
|
+
if (!description) {
|
|
1189
|
+
errorMessage.description = t('createPost.message.requiredDescription');
|
|
1190
|
+
hasError = true;
|
|
1191
|
+
}
|
|
1192
|
+
if (isInEditMode && !titleValue) {
|
|
1193
|
+
errorMessage.title = t('createPost.message.requiredTitle');
|
|
1194
|
+
hasError = true;
|
|
1195
|
+
}
|
|
1196
|
+
if (description && description.split(' ').length < 10) {
|
|
1197
|
+
errorMessage.description = t('createPost.message.lengthDescription');
|
|
1198
|
+
hasError = true;
|
|
1199
|
+
}
|
|
1200
|
+
if (showAskDoctorOptions &&
|
|
1201
|
+
!(errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.description) &&
|
|
1202
|
+
typeof isAskDoctor === 'undefined') {
|
|
1203
|
+
errorMessage.askDoctor = t('createPost.message.askDoctorRequireMess');
|
|
1204
|
+
hasError = true;
|
|
1205
|
+
}
|
|
1206
|
+
if (imageFiles && imageFiles.length > 10) {
|
|
1207
|
+
errorMessage.photos = t('createPost.message.photoMaxium');
|
|
1208
|
+
hasError = true;
|
|
1209
|
+
}
|
|
1210
|
+
if (imageFiles && imageFiles.length) {
|
|
1211
|
+
const inValidSizeFile = imageFiles.some((file) => (file === null || file === void 0 ? void 0 : file.size) > MAX_SIZE_FILE_UPLOAD);
|
|
1212
|
+
if (inValidSizeFile) {
|
|
1213
|
+
errorMessage.photos = t('createPost.message.photoSize');
|
|
1214
|
+
hasError = true;
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
if (invalidUrls && invalidUrls.length) {
|
|
1218
|
+
errorMessage.video = 'Invalid video url';
|
|
1219
|
+
hasError = true;
|
|
1220
|
+
}
|
|
1221
|
+
setError(errorMessage);
|
|
1222
|
+
return hasError;
|
|
1223
|
+
};
|
|
1224
|
+
const removeKeyError = (deleteKey) => {
|
|
1225
|
+
if (error[deleteKey]) {
|
|
1226
|
+
const _a = Object.assign({}, error), _b = `${deleteKey}`, value = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
|
1227
|
+
setError(rest);
|
|
1228
|
+
console.log(value);
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
const submitPost = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1232
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1233
|
+
const isError = validationPost();
|
|
1234
|
+
if (isError)
|
|
1235
|
+
return;
|
|
1236
|
+
const bodyFormData = yield getPostFormData({
|
|
1237
|
+
title: titleValue,
|
|
1238
|
+
description: descriptionValue,
|
|
1239
|
+
communityId: String((currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.id) || ''),
|
|
1240
|
+
imageFiles,
|
|
1241
|
+
previewUrl,
|
|
1242
|
+
topicIds: selectedTopics === null || selectedTopics === void 0 ? void 0 : selectedTopics.map((topic) => String(topic.id || '')).filter(Boolean),
|
|
1243
|
+
locale,
|
|
1244
|
+
sanitizeFunction,
|
|
1245
|
+
categoryCommunityId: String((currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.mappedCategoryId) || ''),
|
|
1246
|
+
categoryTopicIds: selectedTopics === null || selectedTopics === void 0 ? void 0 : selectedTopics.map((topic) => String((topic === null || topic === void 0 ? void 0 : topic.mappedCategoryId) || '')).filter(Boolean),
|
|
1247
|
+
isAnonymous: (postActionValue === null || postActionValue === void 0 ? void 0 : postActionValue.value) === 'anonymous' ? 1 : 0,
|
|
1248
|
+
isAskDoctor: isAskDoctor ? 1 : 0,
|
|
1249
|
+
});
|
|
1250
|
+
if (articleId) {
|
|
1251
|
+
bodyFormData.append('article_id', articleId);
|
|
1252
|
+
}
|
|
1253
|
+
let res;
|
|
1254
|
+
if (isInEditMode) {
|
|
1255
|
+
if (editPostData === null || editPostData === void 0 ? void 0 : editPostData.id) {
|
|
1256
|
+
res = yield editPost({
|
|
1257
|
+
id: editPostData.id,
|
|
1258
|
+
formData: bodyFormData,
|
|
1259
|
+
locale,
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
else {
|
|
1264
|
+
res = yield createPost({
|
|
1265
|
+
formData: bodyFormData,
|
|
1266
|
+
locale,
|
|
1267
|
+
isArticleComment: !(currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.id) && !!(currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.mappedCategoryId),
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
const resData = res === null || res === void 0 ? void 0 : res.data;
|
|
1271
|
+
if ((resData === null || resData === void 0 ? void 0 : resData.id) && !((_b = (_a = res === null || res === void 0 ? void 0 : res.messages) === null || _a === void 0 ? void 0 : _a.moderation) === null || _b === void 0 ? void 0 : _b.type)) {
|
|
1272
|
+
pushNotifications({
|
|
1273
|
+
message: t('createPost.popup.success'),
|
|
1274
|
+
type: 'success',
|
|
1275
|
+
});
|
|
1276
|
+
onCreateEditSuccess(resData);
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
if (((_d = (_c = res === null || res === void 0 ? void 0 : res.messages) === null || _c === void 0 ? void 0 : _c.moderation) === null || _d === void 0 ? void 0 : _d.type) === 'banned') {
|
|
1280
|
+
pushNotifications({
|
|
1281
|
+
title: t('notification.post.blocked.title'),
|
|
1282
|
+
message: t('notification.post.blocked.message'),
|
|
1283
|
+
type: 'danger',
|
|
1284
|
+
});
|
|
1285
|
+
if (res.messages.moderation.words) {
|
|
1286
|
+
setBannedWords(res.messages.moderation.words);
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
else if (((_f = (_e = res === null || res === void 0 ? void 0 : res.messages) === null || _e === void 0 ? void 0 : _e.moderation) === null || _f === void 0 ? void 0 : _f.type) === 'suspect') {
|
|
1290
|
+
pushNotifications({
|
|
1291
|
+
title: t('notification.post.suspect.title'),
|
|
1292
|
+
message: t('notification.post.suspect.message'),
|
|
1293
|
+
type: 'warning',
|
|
1294
|
+
});
|
|
1295
|
+
onClose && onClose();
|
|
1296
|
+
}
|
|
1297
|
+
else if ((_h = (_g = res === null || res === void 0 ? void 0 : res.messages) === null || _g === void 0 ? void 0 : _g.find) === null || _h === void 0 ? void 0 : _h.call(_g, (m) => { var _a; return !!((_a = m === null || m === void 0 ? void 0 : m.includes) === null || _a === void 0 ? void 0 : _a.call(m, 'suspend')); })) {
|
|
1298
|
+
pushNotifications({
|
|
1299
|
+
message: t('notification.suspend.message'),
|
|
1300
|
+
type: 'danger',
|
|
1301
|
+
});
|
|
1302
|
+
onClose && onClose();
|
|
1303
|
+
}
|
|
1304
|
+
else {
|
|
1305
|
+
pushNotifications({
|
|
1306
|
+
message: ((_j = res === null || res === void 0 ? void 0 : res.messages) === null || _j === void 0 ? void 0 : _j[0]) || t('notification.failure'),
|
|
1307
|
+
type: 'danger',
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
return (React__default.createElement(StyledCreateNewPost, { className: `${className} create-post-popup-frame`, style: style },
|
|
1313
|
+
React__default.createElement("div", { className: "input-group-container" },
|
|
1314
|
+
React__default.createElement(StyledFormGroupInner, null,
|
|
1315
|
+
React__default.createElement("div", { className: "input-group" },
|
|
1316
|
+
React__default.createElement(StylePostAction, null,
|
|
1317
|
+
React__default.createElement("div", { className: "avatar" }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) ? (React__default.createElement("img", { alt: "avatar-icon", src: userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar, style: {
|
|
1318
|
+
width: '100%',
|
|
1319
|
+
height: '100%',
|
|
1320
|
+
objectFit: 'contain',
|
|
1321
|
+
marginLeft: 'auto',
|
|
1322
|
+
} })) : (React__default.createElement(CardAuthor, { showDetailPopup: false, avatar: "", avatarProps: { size: 40 }, name: userInfo === null || userInfo === void 0 ? void 0 : userInfo.name, userId: userInfo === null || userInfo === void 0 ? void 0 : userInfo.userId, className: "author-avatar" }))),
|
|
1323
|
+
React__default.createElement("div", { className: "post-action-form" },
|
|
1324
|
+
React__default.createElement("div", { className: "post-action-by" }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || ''),
|
|
1325
|
+
React__default.createElement(Dropdown, { disabled: isInEditMode, options: postActionType, id: "post-action-type", size: "sm", className: "dropdown-post-action", placeholder: t('community.choose'), value: postActionValue, onChange: (option) => {
|
|
1326
|
+
setPostActionValue({
|
|
1327
|
+
label: option.label,
|
|
1328
|
+
value: String(option.value),
|
|
1329
|
+
});
|
|
1330
|
+
}, placeholderIcon: React__default.createElement("div", { className: "post-action-result" }, postActionValue.value === 'public' ? (React__default.createElement("img", { alt: "public-icon", src: IconPublic, style: {
|
|
1331
|
+
width: '100%',
|
|
1332
|
+
height: '100%',
|
|
1333
|
+
objectFit: 'contain',
|
|
1334
|
+
marginLeft: 'auto',
|
|
1335
|
+
} })) : (React__default.createElement("img", { alt: "anonymous-icon", src: IconAnonymous, style: {
|
|
1336
|
+
width: '100%',
|
|
1337
|
+
height: '100%',
|
|
1338
|
+
objectFit: 'contain',
|
|
1339
|
+
marginLeft: 'auto',
|
|
1340
|
+
} }))), style: {
|
|
1341
|
+
zIndex: 10,
|
|
1342
|
+
width: 'calc(100% + 20px)',
|
|
1343
|
+
} })))),
|
|
1344
|
+
React__default.createElement(CreatePostTitle, { className: "input-group", bannedWords: bannedWords, value: titleValue, onChange: setTitleValue }),
|
|
1345
|
+
specialCharErr && (React__default.createElement(StyledError, null,
|
|
1346
|
+
React__default.createElement(Info, { isSolid: true, color: theme.colors.red700, size: 14 }),
|
|
1347
|
+
React__default.createElement(Text, { size: "p3", as: "span", color: theme.colors.red700 }, t('createPost.popup.specialCharErr')))),
|
|
1348
|
+
React__default.createElement("div", { className: "input-group" },
|
|
1349
|
+
React__default.createElement(CreatePostDescription, { bannedWords: bannedWords, value: descriptionValue, onChange: (v) => {
|
|
1350
|
+
setDescriptionValue(v);
|
|
1351
|
+
removeKeyError('description');
|
|
1352
|
+
}, onPreviewUrlChange: setPreviewUrl, onInvalidUrlsChange: setInvalidUrls, onImageFilesChange: setImageFiles, imageFiles: imageFiles, className: `${error && (error === null || error === void 0 ? void 0 : error.description) ? 'error-description' : ''} ${showAskDoctorOptions ? 'has-ask-doctor-option' : ''}`, footerEditor: React__default.createElement(React__default.Fragment, null,
|
|
1353
|
+
showAskDoctorOptions && (React__default.createElement(StyledIsQuestion, { color: "", className: `${error && (error === null || error === void 0 ? void 0 : error.askDoctor) ? 'has-error' : ''} ${error && (error === null || error === void 0 ? void 0 : error.description) ? 'error-description' : ''}` },
|
|
1354
|
+
React__default.createElement("div", { className: "switch-label" },
|
|
1355
|
+
React__default.createElement(Ask, { size: 24 }),
|
|
1356
|
+
React__default.createElement("div", { className: "wrapper-text" },
|
|
1357
|
+
React__default.createElement("div", { className: "label-txt" }, t('createPost.askDoctor')),
|
|
1358
|
+
React__default.createElement("div", { className: "description-txt" }, t('createPost.askDoctor.description')))),
|
|
1359
|
+
React__default.createElement(BtnChoice, { value: isAskDoctor, choices: [
|
|
1360
|
+
{
|
|
1361
|
+
label: t('createPost.askDoctorChoice.yes'),
|
|
1362
|
+
value: true,
|
|
1363
|
+
dataEventCategory: 'Together',
|
|
1364
|
+
dataEventAction: 'Write Post Click - Ask Doctor',
|
|
1365
|
+
dataEventLabel: getCurrentHref(locale, togetherBasePath, asPath),
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
label: t('createPost.askDoctorChoice.no'),
|
|
1369
|
+
value: false,
|
|
1370
|
+
},
|
|
1371
|
+
], onChange: (v) => {
|
|
1372
|
+
if (typeof v === 'boolean') {
|
|
1373
|
+
setIsAskDoctor(v);
|
|
1374
|
+
removeKeyError('askDoctor');
|
|
1375
|
+
}
|
|
1376
|
+
} }))),
|
|
1377
|
+
error && (error === null || error === void 0 ? void 0 : error.askDoctor) && (React__default.createElement(StyledError, { style: { margin: '4px 0 0' } },
|
|
1378
|
+
React__default.createElement(Text, { size: "p5", as: "span", color: theme.colors.red600 }, error.askDoctor))),
|
|
1379
|
+
error && (error === null || error === void 0 ? void 0 : error.description) && (React__default.createElement(StyledError, { style: { margin: '4px 0 0' } },
|
|
1380
|
+
React__default.createElement(Text, { size: "p5", as: "span", color: theme.colors.red600 }, error.description)))) })),
|
|
1381
|
+
imageSrcs.length > 0 && (React__default.createElement(PostPhotosReview, { imageFiles: imageFiles, error: error, setImageFiles: setImageFiles, removeKeyError: removeKeyError })),
|
|
1382
|
+
socialLinkData && (React__default.createElement(PostVideoReview, { bannedWords: bannedWords, socialLinkData: socialLinkData, onSocialLinkChanged: setSocialLinkData, onInvalidUrlsChange: setInvalidUrls, onChange: (v) => {
|
|
1383
|
+
setDescriptionValue(v);
|
|
1384
|
+
} })),
|
|
1385
|
+
React__default.createElement(CreatePostCommunity, { communitiesList: communitiesList, currentCommunity: currentCommunity, selectedTopics: selectedTopics, forceTopics: forceSelectTopics, communityValue: communityValue, error: error, isFullscreen: false, isInEditMode: isInEditMode, setSelectedTopics: setSelectedTopics, setCommunityValue: setCommunityValue }),
|
|
1386
|
+
React__default.createElement(CreatePostPhotos, { imageFiles: imageFiles, setImageFiles: (data) => {
|
|
1387
|
+
setImageFiles(data);
|
|
1388
|
+
validationUploadPhoto(data);
|
|
1389
|
+
} }),
|
|
1390
|
+
React__default.createElement(CreatePostVideo, { socialLinkData: socialLinkData, setSocialLinkData: setSocialLinkData }))),
|
|
1391
|
+
React__default.createElement("div", { className: "form-action" },
|
|
1392
|
+
React__default.createElement("div", { className: "input-group" },
|
|
1393
|
+
React__default.createElement(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: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1394
|
+
if (isReadyToSubmit && !isSubmitting) {
|
|
1395
|
+
setIsSubmitting(true);
|
|
1396
|
+
try {
|
|
1397
|
+
yield submitPost();
|
|
1398
|
+
}
|
|
1399
|
+
catch (e) {
|
|
1400
|
+
console.error(e);
|
|
1401
|
+
pushNotifications(getDefaultFailNoti(t));
|
|
1402
|
+
}
|
|
1403
|
+
setIsSubmitting(false);
|
|
1404
|
+
}
|
|
1405
|
+
}), disabled: !isReadyToSubmit, loading: isSubmitting }, t('createPost.popup.submit'))))));
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
const StyledTopicSelectList = styled.div `
|
|
1409
|
+
display: flex;
|
|
1410
|
+
width: 100%;
|
|
1411
|
+
flex-wrap: wrap;
|
|
1412
|
+
margin-top: 1rem;
|
|
1413
|
+
|
|
1414
|
+
.tag-item {
|
|
1415
|
+
min-height: 32px;
|
|
1416
|
+
padding: 5px 12px;
|
|
1417
|
+
border: 1px solid ${theme.colors.neutral100};
|
|
1418
|
+
margin-right: 1rem;
|
|
1419
|
+
margin-bottom: 8px;
|
|
1420
|
+
border-radius: 1rem;
|
|
1421
|
+
color: ${theme.colors.gray800};
|
|
1422
|
+
cursor: pointer;
|
|
1423
|
+
font-size: 13px;
|
|
1424
|
+
line-height: 22px;
|
|
1425
|
+
transition: all 0.2s;
|
|
1426
|
+
|
|
1427
|
+
&.--active {
|
|
1428
|
+
border-color: ${theme.colors.primary50};
|
|
1429
|
+
background: ${theme.colors.primary50};
|
|
1430
|
+
color: ${theme.colors.primaryBase};
|
|
1431
|
+
}
|
|
1432
|
+
&[data-disabled='true'] {
|
|
1433
|
+
background: ${theme.colors.gray100};
|
|
1434
|
+
color: ${theme.colors.gray800};
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
.topic-spinner {
|
|
1438
|
+
margin-right: auto;
|
|
1439
|
+
margin-left: auto;
|
|
1440
|
+
& > button {
|
|
1441
|
+
width: 24px;
|
|
1442
|
+
height: 24px;
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
&[data-is-marrybaby='true'] {
|
|
1446
|
+
.tag-item {
|
|
1447
|
+
border-color: transparent;
|
|
1448
|
+
background: #f3f3f3;
|
|
1449
|
+
color: #3e3f58;
|
|
1450
|
+
&.--active {
|
|
1451
|
+
border-color: #b6cdff;
|
|
1452
|
+
background: #e0e9fb;
|
|
1453
|
+
color: #3e3f58;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
`;
|
|
1458
|
+
|
|
1459
|
+
const TopicSelectList = ({ className, style, topics: topicsProp, communityId, onChange, isLoading, disabled, forceTopics, selectedTopics: selectedTopicsProp, noFetch, dataEventCategory, dataEventAction, dataEventLabel, }) => {
|
|
1460
|
+
const { data: { locale, env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
|
|
1461
|
+
const [topics, setTopics] = useState(topicsProp ? [...topicsProp] : []);
|
|
1462
|
+
const [selectedTopics, setSelectedTopics] = useState(selectedTopicsProp ? [...selectedTopicsProp] : []);
|
|
1463
|
+
const [isLoadingTopics, setIsLoadingTopics] = useState(false);
|
|
1464
|
+
const topicsPropRef = useRef(topicsProp);
|
|
1465
|
+
topicsPropRef.current = topicsProp;
|
|
1466
|
+
useEffect(() => {
|
|
1467
|
+
var _a;
|
|
1468
|
+
if (communityId && !noFetch && !((_a = topicsPropRef.current) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
1469
|
+
setTopics([]);
|
|
1470
|
+
setIsLoadingTopics(true);
|
|
1471
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
1472
|
+
var _b;
|
|
1473
|
+
try {
|
|
1474
|
+
const res = yield callApi(getApiPath(PATHS.TOPIC.LIST, {
|
|
1475
|
+
communityId: communityId,
|
|
1476
|
+
_locale: locale,
|
|
1477
|
+
}), 'GET');
|
|
1478
|
+
const topicRes = (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.topics;
|
|
1479
|
+
if (Array.isArray(topicRes)) {
|
|
1480
|
+
setTopics(() => (topicRes === null || topicRes === void 0 ? void 0 : topicRes.map(formatTopic).sort((t1, t2) => (t1.order || 0) - (t2.order || 0))) || []);
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
catch (e) {
|
|
1484
|
+
console.log(e);
|
|
1485
|
+
setIsLoadingTopics(false);
|
|
1486
|
+
}
|
|
1487
|
+
setIsLoadingTopics(false);
|
|
1488
|
+
}))();
|
|
1489
|
+
}
|
|
1490
|
+
}, [communityId, noFetch]);
|
|
1491
|
+
const topicsPropString = topicsProp === null || topicsProp === void 0 ? void 0 : topicsProp.map((t) => t.id).join('-');
|
|
1492
|
+
const topicsStateString = topics === null || topics === void 0 ? void 0 : topics.map((t) => t.id).join('-');
|
|
1493
|
+
const forceTopicsPropString = forceTopics === null || forceTopics === void 0 ? void 0 : forceTopics.map((t) => t.id).join('-');
|
|
1494
|
+
useEffect(() => {
|
|
1495
|
+
if (topicsProp &&
|
|
1496
|
+
typeof topicsPropString !== 'undefined' &&
|
|
1497
|
+
topicsPropString !== topicsStateString) {
|
|
1498
|
+
setTopics(topicsProp);
|
|
1499
|
+
}
|
|
1500
|
+
}, [topicsProp, topicsPropString, topicsStateString]);
|
|
1501
|
+
const topicsWithoutForced = useMemo(() => topics.filter((t) => !(forceTopics === null || forceTopics === void 0 ? void 0 : forceTopics.some((ft) => (ft.id && ft.id === t.id) ||
|
|
1502
|
+
(ft.mappedCategoryId &&
|
|
1503
|
+
ft.mappedCategoryId === t.mappedCategoryId)))), [topicsStateString, forceTopicsPropString]);
|
|
1504
|
+
return (React__default.createElement(StyledTopicSelectList, { "data-is-marrybaby": isMarryBaby, className: className, style: style },
|
|
1505
|
+
forceTopics.map((topic) => (React__default.createElement(TopicItem, { key: `${topic.id}-${topic.mappedCategoryId}`, topic: topic, disabled: true, selected: true, dataEventAction: dataEventAction, dataEventCategory: dataEventCategory, dataEventLabel: dataEventLabel }))),
|
|
1506
|
+
topicsWithoutForced.map((topic) => (React__default.createElement(TopicItem, { key: `${topic.id}-${topic.mappedCategoryId}`, topic: topic, disabled: disabled, selected: (selectedTopicsProp || selectedTopics).some((t) => (t.id && t.id === topic.id) ||
|
|
1507
|
+
(t.mappedCategoryId &&
|
|
1508
|
+
t.mappedCategoryId === topic.mappedCategoryId)), onClick: () => {
|
|
1509
|
+
const _selected = selectedTopicsProp || selectedTopics;
|
|
1510
|
+
const foundIndex = _selected.findIndex((_selected) => (_selected.id && _selected.id === topic.id) ||
|
|
1511
|
+
(_selected.mappedCategoryId &&
|
|
1512
|
+
_selected.mappedCategoryId === topic.mappedCategoryId));
|
|
1513
|
+
if (foundIndex !== -1) {
|
|
1514
|
+
_selected.splice(foundIndex, 1);
|
|
1515
|
+
}
|
|
1516
|
+
else {
|
|
1517
|
+
_selected.push(topic);
|
|
1518
|
+
}
|
|
1519
|
+
if (onChange && selectedTopicsProp) {
|
|
1520
|
+
onChange(_selected.slice());
|
|
1521
|
+
}
|
|
1522
|
+
else {
|
|
1523
|
+
onChange && onChange(_selected.slice());
|
|
1524
|
+
setSelectedTopics(_selected.slice());
|
|
1525
|
+
}
|
|
1526
|
+
}, dataEventAction: dataEventAction, dataEventCategory: dataEventCategory, dataEventLabel: dataEventLabel }))),
|
|
1527
|
+
(isLoading || isLoadingTopics) && React__default.createElement(Loading$1, { className: "topic-spinner" })));
|
|
1528
|
+
};
|
|
1529
|
+
const TopicItem = (_a) => {
|
|
1530
|
+
var { topic, disabled, selected, onClick } = _a, rest = __rest(_a, ["topic", "disabled", "selected", "onClick"]);
|
|
1531
|
+
return (React__default.createElement("div", Object.assign({ className: 'tag-item' + (selected ? ' --active' : ''), "data-disabled": disabled, onClick: !disabled ? onClick : undefined }, rest), topic.name));
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1534
|
+
var styles = {"skipBtn":"KsWg8i6","alertHeading":"_9tS0EUN","alertDesc":"kyyRKlb","alertAction":"-Uqqka-"};
|
|
1535
|
+
|
|
1536
|
+
const SkipQuestionOfExpertBtn = (_a) => {
|
|
1537
|
+
var { post, onSkip, btnText, currentPageUrl } = _a, rest = __rest(_a, ["post", "onSkip", "btnText", "currentPageUrl"]);
|
|
1538
|
+
const { t } = useTranslations();
|
|
1539
|
+
const { data: { locale }, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
|
|
1540
|
+
const [showAlert, setShowAlert] = useState(false);
|
|
1541
|
+
const [loading, setLoading] = useState(false);
|
|
1542
|
+
const _theme = useMantineTheme();
|
|
1543
|
+
const handleSkip = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
1544
|
+
var _b;
|
|
1545
|
+
setLoading(true);
|
|
1546
|
+
const res = yield callApiWithAuth(getApiPath(PATHS.USER.SKIP_QUESTION, {
|
|
1547
|
+
_locale: locale,
|
|
1548
|
+
id: post === null || post === void 0 ? void 0 : post.id,
|
|
1549
|
+
}), 'PUT');
|
|
1550
|
+
if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
|
|
1551
|
+
onSkip === null || onSkip === void 0 ? void 0 : onSkip({ id: (post === null || post === void 0 ? void 0 : post.id) || '', communityId: ((_b = post === null || post === void 0 ? void 0 : post.community) === null || _b === void 0 ? void 0 : _b.id) || '' });
|
|
1552
|
+
setShowAlert(false);
|
|
1553
|
+
pushNotifications({
|
|
1554
|
+
title: '',
|
|
1555
|
+
message: 'Skip success',
|
|
1556
|
+
type: 'success',
|
|
1557
|
+
});
|
|
1558
|
+
}
|
|
1559
|
+
else {
|
|
1560
|
+
pushNotifications({
|
|
1561
|
+
title: '',
|
|
1562
|
+
message: res === null || res === void 0 ? void 0 : res.messages,
|
|
1563
|
+
type: 'danger',
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
setLoading(false);
|
|
1567
|
+
}), []);
|
|
1568
|
+
return (React__default.createElement(Popover, { width: 327, withArrow: true, shadow: "md", opened: showAlert },
|
|
1569
|
+
React__default.createElement(Popover.Target, null,
|
|
1570
|
+
React__default.createElement("div", Object.assign({ className: `${styles.skipBtn} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}`, onClick: () => setShowAlert(true) }, rest), btnText || t('profilePanel.questionNotClear'))),
|
|
1571
|
+
React__default.createElement(Popover.Dropdown, null,
|
|
1572
|
+
React__default.createElement("div", null,
|
|
1573
|
+
React__default.createElement("div", { className: styles.alertHeading }, t('profilePanel.skipQuestion.heading')),
|
|
1574
|
+
React__default.createElement("div", { className: styles.alertDesc }, t('profilePanel.skipQuestion.content')),
|
|
1575
|
+
React__default.createElement("div", { className: styles.alertAction },
|
|
1576
|
+
React__default.createElement(Button, { size: "md", variant: "secondary", leftIcon: React__default.createElement(Close, { color: _theme.fn.primaryColor(), size: 24 }), onClick: () => setShowAlert(false), styles: () => ({
|
|
1577
|
+
leftIcon: {
|
|
1578
|
+
marginRight: 0,
|
|
1579
|
+
},
|
|
1580
|
+
}) }),
|
|
1581
|
+
React__default.createElement(Button, { variant: "primary", size: "md", leftIcon: React__default.createElement(Check, { color: 'white', size: 24 }), onClick: handleSkip, loading: loading, "data-event-category": "Together", "data-event-action": "Unclear Question Click", "data-event-label": currentPageUrl, styles: () => ({
|
|
1582
|
+
leftIcon: {
|
|
1583
|
+
marginRight: 0,
|
|
1584
|
+
},
|
|
1585
|
+
}) }))))));
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1588
|
+
export { CreateNewPostContent as C, SkipQuestionOfExpertBtn as S, TopicSelectList as T, CreatePostDescription as a, CreatePostTitle as b };
|