@hhgtech/hhg-components 1.29.254 → 1.29.255-beta-2
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-fbd4e5bb.js → LastPeriod-0c637137.js} +1 -1
- package/build/{MobileBottomNavigationIcon-d1dcfe4d.js → MobileBottomNavigationIcon-8c1d1f23.js} +3 -3
- package/build/{Spinner-9dfb3f6b.js → Spinner-c67245b9.js} +1 -1
- package/build/{WhatsApp-e3e419fe.js → WhatsApp-f220845d.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-e6c18dfc.js → constants-d95e8ef0.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-7a0772ec.js → core-85345255.js} +1 -1
- package/build/{dataTransform-6ed700b2.js → dataTransform-73e5b86d.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-ec5d2147.js → editor-0bfcc284.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-d5988f0f.js → LastPeriod-1aa6bef7.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-ad89876c.js → MobileBottomNavigationIcon-31265297.js} +3 -3
- package/build/esm/{Spinner-9f3a29fc.js → Spinner-99caf1a3.js} +1 -1
- package/build/esm/{WhatsApp-80686abd.js → WhatsApp-0701455e.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-f0832ca9.js → constants-ac7719f7.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-58447428.js → core-0911bca5.js} +1 -1
- package/build/esm/{dataTransform-6d723379.js → dataTransform-c59d342b.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-4473d609.js → editor-673f6dc2.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-f64c7a51.js → fixedBottomAdBlock-5e5e2ecd.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 +14 -0
- package/build/esm/i18n-values/hi-IN.js +14 -0
- package/build/esm/i18n-values/id-ID.js +14 -0
- package/build/esm/i18n-values/km-KH.js +15 -1
- package/build/esm/i18n-values/ms-MY.js +14 -0
- package/build/esm/i18n-values/my-MM.js +14 -0
- package/build/esm/i18n-values/th-TH.js +14 -0
- package/build/esm/i18n-values/tl-PH.js +14 -0
- package/build/esm/i18n-values/vi-VN.js +16 -1
- package/build/esm/i18n-values/vi-VN_MB.js +16 -1
- package/build/esm/i18n-values/zh-TW.js +17 -2
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-8ddb662c.js → index-03094b6d.js} +1 -1
- package/build/esm/{index-7858930f.js → index-048e9fc6.js} +2 -2
- package/build/esm/{index-058eec91.js → index-0bf9034f.js} +24 -24
- package/build/esm/{index-1c7bf834.js → index-0e42e7f3.js} +2 -2
- package/build/esm/{index-256772f2.js → index-1022a217.js} +1 -1
- package/build/esm/{index-19395870.js → index-14a43c1d.js} +2 -2
- package/build/esm/{index-ca7d4755.js → index-18737196.js} +16 -16
- package/build/esm/{index-03ef8cbb.js → index-18c578fb.js} +13 -13
- package/build/esm/{index-1773f193.js → index-19b74ca6.js} +2 -2
- package/build/esm/{index-cff61939.js → index-250256ec.js} +1 -1
- package/build/esm/{index-d4d0dd65.js → index-2711c53b.js} +16 -16
- package/build/esm/{index-2786f165.js → index-2beda035.js} +6 -6
- package/build/esm/{index-7e4fd259.js → index-2cd2e5d4.js} +16 -15
- package/build/esm/{index-4f39822b.js → index-2cff4351.js} +11 -11
- package/build/esm/{index-d6f247a4.js → index-31cb2a58.js} +16 -16
- package/build/esm/{index-e993ad6f.js → index-373da840.js} +17 -17
- package/build/esm/{index-0ac48ef7.js → index-39a7cce9.js} +6 -6
- package/build/esm/{index-9bcfb6d1.js → index-3df8a021.js} +3 -3
- package/build/esm/{index-8a6addff.js → index-47ea38ea.js} +2 -2
- package/build/esm/{index-35f19ff8.js → index-49b2487e.js} +2 -2
- package/build/esm/{index-f359050c.js → index-526eee34.js} +213 -132
- package/build/esm/{index-21854a95.js → index-538a8bbc.js} +2 -2
- package/build/esm/{index-192cc20f.js → index-57857dcb.js} +1 -1
- package/build/esm/{index-a9234885.js → index-5ac6a7f5.js} +7 -7
- package/build/esm/{index-06ab367e.js → index-5d6dde44.js} +13 -13
- package/build/esm/{index-868a491d.js → index-67ee3e39.js} +3 -3
- package/build/esm/{index-a9b9edbd.js → index-68cf44c7.js} +3 -3
- package/build/esm/{index-8d3ffcd6.js → index-7104374d.js} +1 -1
- package/build/esm/{index-bde06578.js → index-7cec1d5a.js} +5 -5
- package/build/esm/{index-171e610e.js → index-84f3fd36.js} +3 -3
- package/build/esm/{index-a04caa23.js → index-8648e2f2.js} +21 -21
- package/build/esm/{index-23f2aa21.js → index-8c2aa9c0.js} +17 -17
- package/build/esm/{index-2393519a.js → index-8dd5f040.js} +6 -6
- package/build/esm/{index-af42cf8d.js → index-916851db.js} +15 -15
- package/build/esm/{index-c8b991cd.js → index-94e45ed1.js} +15 -16
- package/build/esm/{index-5c02cb77.js → index-954ba898.js} +2 -2
- package/build/esm/{index-f07baf29.js → index-97675e2b.js} +1 -1
- package/build/esm/{index-148054b4.js → index-9b77086c.js} +2 -2
- package/build/esm/{index-07d6fa1f.js → index-9e6b0348.js} +51 -45
- package/build/esm/{index-3a80641e.js → index-a5b04b14.js} +4 -4
- package/build/esm/{index-e346e77f.js → index-a8aec5b0.js} +146 -146
- package/build/esm/{index-b2bc2203.js → index-adf47d6c.js} +13 -13
- package/build/esm/{index-26c68038.js → index-ae1334ac.js} +11 -12
- package/build/esm/{index-bd57c1db.js → index-aff85140.js} +30 -30
- package/build/esm/{index-7c1e97d5.js → index-b0319878.js} +13 -13
- package/build/esm/{index-99c11e8f.js → index-b3c1a701.js} +1 -1
- package/build/esm/{index-c85b7689.js → index-b663100e.js} +1 -1
- package/build/esm/{index-32300b21.js → index-b89314d2.js} +18 -18
- package/build/esm/{index-9096163c.js → index-cea5bebe.js} +2 -2
- package/build/esm/{index-22f4d410.js → index-d2dd4e5d.js} +5 -5
- package/build/esm/{index-1e69e0c1.js → index-dd1b47f2.js} +3 -3
- package/build/esm/index-de60e48f.js +1588 -0
- package/build/esm/{index-5125f23d.js → index-e050cf26.js} +3 -3
- package/build/esm/{index-c9711431.js → index-e263fed6.js} +17 -17
- package/build/esm/{index-35d005f9.js → index-e34d7b7e.js} +6 -6
- package/build/esm/{index-6ca459c4.js → index-eea25cf6.js} +1 -1
- package/build/esm/{index-2c17b04a.js → index-f14a5626.js} +3 -3
- package/build/esm/{index-5ab42a56.js → index-f389381b.js} +2 -2
- package/build/esm/{index-d6a32a48.js → index-f3ee79b3.js} +2 -2
- package/build/esm/{index-83e3eb00.js → index-fc574477.js} +7 -7
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +112 -112
- package/build/esm/index.styles-6c2014f4.js +35 -0
- package/build/esm/interfaces/types/index.d.ts +1 -1
- package/build/esm/{labelSorting-cb3c0a8a.js → labelSorting-08ca2f72.js} +4 -4
- package/build/esm/lead.js +24 -24
- package/build/esm/{logoIcon-ff78fdc0.js → logoIcon-f6991e15.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-cb43fea4.js → post-4ffa6d7b.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 +29 -29
- package/build/esm/{store-eefa7acb.js → store-6dea086a.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-80426015.js → surveyThankyouCard-0118bcd5.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-12009b2c.js → treePopoverMenu-1b261723.js} +27 -27
- package/build/esm/{types-dd1d0814.js → types-71d9e968.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-7b9846c9.js → useCategory-b346b27d.js} +5 -5
- package/build/esm/{useHealthToolCache-7f338ced.js → useHealthToolCache-74c385a1.js} +1 -1
- package/build/esm/{useMantineLocale-a3e6c303.js → useMantineLocale-0dbd92de.js} +5 -5
- package/build/esm/{usePlacesAutocomplete-f41adc47.js → usePlacesAutocomplete-7e52d1db.js} +1 -1
- package/build/esm/useScreenSize-53f42112.js +50 -0
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-6e2977c2.js → utils-2e6dad62.js} +2 -2
- package/build/esm/{utils-2aa1807a.js → utils-5f56b50b.js} +4 -4
- package/build/esm/{utils-8275d2db.js → utils-dac4279f.js} +2 -2
- package/build/esm/vaccination.js +21 -21
- package/build/{fixedBottomAdBlock-353e7653.js → fixedBottomAdBlock-5f80b69e.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 +14 -0
- package/build/i18n-values/hi-IN.js +14 -0
- package/build/i18n-values/id-ID.js +14 -0
- package/build/i18n-values/km-KH.js +15 -1
- package/build/i18n-values/ms-MY.js +14 -0
- package/build/i18n-values/my-MM.js +14 -0
- package/build/i18n-values/th-TH.js +14 -0
- package/build/i18n-values/tl-PH.js +14 -0
- package/build/i18n-values/vi-VN.js +16 -1
- package/build/i18n-values/vi-VN_MB.js +16 -1
- package/build/i18n-values/zh-TW.js +17 -2
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-d176482c.js → index-0fe71e41.js} +2 -2
- package/build/{index-fd1fb4be.js → index-111867d4.js} +17 -17
- package/build/{index-f3a3bdc7.js → index-14075e73.js} +18 -18
- package/build/{index-2da744ec.js → index-14ccc1cb.js} +2 -2
- package/build/{index-c3b93ec8.js → index-160990b1.js} +5 -5
- package/build/index-194ce9bb.js +1602 -0
- package/build/{index-91b42e47.js → index-2ed5e004.js} +3 -3
- package/build/{index-7a371430.js → index-2ef7ee3d.js} +18 -17
- package/build/{index-8e250492.js → index-322c7b5c.js} +12 -12
- package/build/{index-5df84f1b.js → index-37aacf75.js} +6 -6
- package/build/{index-201427b8.js → index-3bdc4a3a.js} +30 -30
- package/build/{index-ebb7495f.js → index-440c4beb.js} +13 -13
- package/build/{index-b9e583e5.js → index-4b1a4564.js} +3 -3
- package/build/{index-3c9582be.js → index-54f69dfe.js} +3 -3
- package/build/{index-6bb0ed88.js → index-55eb8874.js} +1 -1
- package/build/{index-f17e0dc7.js → index-5743ee78.js} +2 -2
- package/build/{index-f2d11b8b.js → index-5766eab7.js} +63 -63
- package/build/{index-acff76f5.js → index-5ca7e3cf.js} +1 -1
- package/build/{index-331f4771.js → index-5f078e18.js} +50 -50
- package/build/{index-6cf2534d.js → index-6251d476.js} +2 -2
- package/build/{index-70a3252f.js → index-6605b019.js} +3 -3
- package/build/{index-81e43c14.js → index-69940730.js} +5 -5
- package/build/{index-9bb566d1.js → index-6a5fa0c6.js} +2 -2
- package/build/{index-a11ed612.js → index-6ce24cb6.js} +16 -16
- package/build/{index-769d63e8.js → index-72ee30dd.js} +147 -147
- package/build/{index-f8284202.js → index-72f3e7d1.js} +16 -16
- package/build/{index-6351607e.js → index-79fba52e.js} +2 -2
- package/build/{index-170adfc7.js → index-7b478dd5.js} +4 -4
- package/build/{index-d540c73e.js → index-7ec0f4cb.js} +2 -2
- package/build/{index-ae4ea429.js → index-7faeaf7f.js} +1 -1
- package/build/{index-69fe1bb9.js → index-807fd6f0.js} +1 -1
- package/build/{index-e24bd5ac.js → index-8ce00c47.js} +2 -2
- package/build/{index-a559bb30.js → index-9148fd18.js} +1 -1
- package/build/{index-8960a4d9.js → index-92081bdb.js} +7 -7
- package/build/{index-7da55532.js → index-932a1f22.js} +1 -1
- package/build/{index-951abf2c.js → index-95c0685c.js} +17 -17
- package/build/{index-e30c7e6c.js → index-9a4053a2.js} +2 -2
- package/build/{index-e69a8960.js → index-9b89c641.js} +13 -13
- package/build/{index-0e9e1127.js → index-a0a8db36.js} +16 -16
- package/build/{index-93e13cbe.js → index-a14c3067.js} +2 -2
- package/build/{index-89f851dd.js → index-a507c427.js} +13 -13
- package/build/{index-828dfa8b.js → index-a82be18e.js} +50 -44
- package/build/{index-684fe065.js → index-a91d646d.js} +1 -1
- package/build/{index-f5297fa9.js → index-ad52ddd5.js} +3 -3
- package/build/{index-549a9d0a.js → index-b18202e6.js} +13 -13
- package/build/{index-e3d90690.js → index-b7cb4d31.js} +45 -46
- package/build/{index-be646d43.js → index-bdacdac1.js} +11 -11
- package/build/{index-59ad8a4c.js → index-c83c67dc.js} +2 -2
- package/build/{index-63768ff9.js → index-c8ebbc07.js} +213 -132
- package/build/{index-c4db2775.js → index-cab63cde.js} +1 -1
- package/build/{index-5dc995d6.js → index-d10cca36.js} +17 -17
- package/build/{index-0f4fe09b.js → index-d395078c.js} +3 -3
- package/build/{index-b5dc2b35.js → index-de9feacd.js} +6 -6
- package/build/{index-f8494f0a.js → index-dfed79c5.js} +15 -15
- package/build/{index-e7f8c511.js → index-e984be60.js} +3 -3
- package/build/{index-0b84cca2.js → index-ea197777.js} +20 -20
- package/build/{index-031820fd.js → index-f54b7c33.js} +20 -21
- package/build/{index-662b261c.js → index-f7daf644.js} +6 -6
- package/build/{index-0d9eba5c.js → index-fa6f4951.js} +2 -2
- package/build/{index-9e0dc55b.js → index-ff6f20f3.js} +2 -2
- package/build/index.css +1 -1
- package/build/index.js +157 -157
- package/build/index.styles-acab6f44.js +37 -0
- package/build/interfaces/types/index.d.ts +1 -1
- package/build/{labelSorting-e9f96f52.js → labelSorting-fa66470a.js} +4 -4
- package/build/lead.js +24 -24
- package/build/{logoIcon-ade4419e.js → logoIcon-8fd417b1.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-e28c1da8.js → post-2ba663b9.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 +28 -28
- package/build/{store-4c81a015.js → store-4227a68d.js} +3 -3
- package/build/subot.js +32 -32
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-a2b5a014.js → surveyThankyouCard-59c20fd7.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-073862f5.js → treePopoverMenu-fdfcd067.js} +28 -28
- package/build/{types-a0ed62f3.js → types-bc7ec9c2.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-6a1a419c.js → useCategory-b53fb697.js} +5 -5
- package/build/{useHealthToolCache-0c197cf1.js → useHealthToolCache-3b1dce9d.js} +1 -1
- package/build/{useMantineLocale-64c96485.js → useMantineLocale-995feb60.js} +5 -5
- package/build/{usePlacesAutocomplete-96d8083a.js → usePlacesAutocomplete-a9e7050d.js} +1 -1
- package/build/{index-6d9e7124.js → useScreenSize-46168818.js} +30 -1
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-fd28507d.js → utils-c999b93f.js} +2 -2
- package/build/{utils-ebbb2531.js → utils-f7de2ad1.js} +2 -2
- package/build/{utils-f446154c.js → utils-ff0f9884.js} +3 -3
- package/build/vaccination.js +25 -25
- package/package.json +1 -1
- package/build/esm/index-48212c81.js +0 -913
- package/build/esm/index-dfc937ed.js +0 -22
- package/build/esm/index.styles-6ff04d36.js +0 -64
- package/build/index-28672d4b.js +0 -927
- package/build/index.styles-0fca29e2.js +0 -67
- /package/build/{BMI_BOYS.percentile.monthly-0d6eb528.js → BMI_BOYS.percentile.monthly-96486615.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-cfdd147d.js → BMI_BOYS.percentile.weekly-24fff206.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-42715a6a.js → BMI_BOYS.percentile.yearly-02e78ce5.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-c97d6109.js → BMI_BOYS.zscore.monthly-1dd2cb96.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-b89acf46.js → BMI_BOYS.zscore.weekly-a97fe5cf.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-57a6df10.js → BMI_BOYS.zscore.yearly-30cc554c.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-c44e0f1a.js → BMI_GIRLS.percentile.monthly-06f82b93.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-3ce245a7.js → BMI_GIRLS.percentile.weekly-e254114a.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-fbfdd4e7.js → BMI_GIRLS.percentile.yearly-5e1d8c9e.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-124fd299.js → BMI_GIRLS.zscore.monthly-f3e0d929.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-fa044446.js → BMI_GIRLS.zscore.weekly-60c368e6.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-9a939db5.js → BMI_GIRLS.zscore.yearly-cdc82299.js} +0 -0
- /package/build/{ChevronDown-ed2cd6cc.js → ChevronDown-022875d7.js} +0 -0
- /package/build/{Close-82b886d0.js → Close-79bcab87.js} +0 -0
- /package/build/{Google-d99f7018.js → Google-ba628384.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-1c29d1ce.js → HEAD CIRCUM_BOYS.percentile.monthly-8698fad6.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-c26744ce.js → HEAD CIRCUM_BOYS.percentile.weekly-1150cd7a.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-a20ffddb.js → HEAD CIRCUM_BOYS.percentile.yearly-8df65cb5.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-a4cb5294.js → HEAD CIRCUM_BOYS.zscore.monthly-d53b730d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-85fb0dac.js → HEAD CIRCUM_BOYS.zscore.weekly-033cf4bc.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-3aca7791.js → HEAD CIRCUM_BOYS.zscore.yearly-e6eae769.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-d82fac00.js → HEAD CIRCUM_GIRLS.percentile.monthly-5d94f68b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-5ab04348.js → HEAD CIRCUM_GIRLS.percentile.weekly-6e7f0223.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-1bf8b056.js → HEAD CIRCUM_GIRLS.percentile.yearly-054b72dc.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-0a22a199.js → HEAD CIRCUM_GIRLS.zscore.monthly-9d8429c7.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-8aa5c609.js → HEAD CIRCUM_GIRLS.zscore.weekly-7e3ea514.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-3ea23edf.js → HEAD CIRCUM_GIRLS.zscore.yearly-48461fe3.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-1b76aa02.js → HEIGHT_BOYS.percentile.monthly-2cb436c0.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-34972fe1.js → HEIGHT_BOYS.percentile.weekly-6ef2c367.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-522a89e1.js → HEIGHT_BOYS.percentile.yearly-7cf0ea70.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-de82c4be.js → HEIGHT_BOYS.zscore.monthly-58cb193c.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-1fe0898f.js → HEIGHT_BOYS.zscore.weekly-9ac9efd2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-b686f868.js → HEIGHT_BOYS.zscore.yearly-a6729429.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-8181756b.js → HEIGHT_GIRLS.percentile.monthly-b3447c6c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-0bfae6a6.js → HEIGHT_GIRLS.percentile.weekly-fd826de7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-465ffb9e.js → HEIGHT_GIRLS.percentile.yearly-7ec2d946.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-1ef1b880.js → HEIGHT_GIRLS.zscore.monthly-0790ab55.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-a76a941b.js → HEIGHT_GIRLS.zscore.weekly-5033417a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-15ec12ab.js → HEIGHT_GIRLS.zscore.yearly-e36df92d.js} +0 -0
- /package/build/{Locale-3d43dc61.js → Locale-db2e77cb.js} +0 -0
- /package/build/{Visible-c45258b6.js → Visible-0712a644.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-9aa8e22e.js → WEIGHT_BOYS.percentile.monthly-12e3b29e.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-64cfca52.js → WEIGHT_BOYS.percentile.weekly-8969f3da.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-4655c439.js → WEIGHT_BOYS.percentile.yearly-b24551f5.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-1467104f.js → WEIGHT_BOYS.zscore.monthly-00d9048f.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-ba36900c.js → WEIGHT_BOYS.zscore.weekly-f9a733d8.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-480ff452.js → WEIGHT_BOYS.zscore.yearly-a17a6972.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-ed335c4d.js → WEIGHT_GIRLS.percentile.monthly-7a1b818d.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-8d60a8a7.js → WEIGHT_GIRLS.percentile.weekly-a91284f5.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-1e075882.js → WEIGHT_GIRLS.percentile.yearly-e0dd3ff4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-c4d5c13a.js → WEIGHT_GIRLS.zscore.monthly-1fbef692.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-5d7cf545.js → WEIGHT_GIRLS.zscore.weekly-2714f800.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-9b9619f2.js → WEIGHT_GIRLS.zscore.yearly-121a13bc.js} +0 -0
- /package/build/{animation-38982abc.js → animation-465e46fc.js} +0 -0
- /package/build/{constants-ab46e8d8.js → constants-1a9f28f9.js} +0 -0
- /package/build/{constants-7b5c9b12.js → constants-89ab5c82.js} +0 -0
- /package/build/{constants-40ee2675.js → constants-a60aa81b.js} +0 -0
- /package/build/{dataTransform-2ba0d067.js → dataTransform-1c426dd8.js} +0 -0
- /package/build/{doctor-9395b328.js → doctor-77e27a85.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-8c368c6d.js → BMI_BOYS.percentile.monthly-03a37354.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-a5131a64.js → BMI_BOYS.percentile.weekly-b148638d.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-d21ed23b.js → BMI_BOYS.percentile.yearly-4258de5f.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-aaa1498a.js → BMI_BOYS.zscore.monthly-17ced0cd.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-cac1445e.js → BMI_BOYS.zscore.weekly-a3177e9e.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-fa76a9d1.js → BMI_BOYS.zscore.yearly-45d99ca8.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-46882154.js → BMI_GIRLS.percentile.monthly-35910cc3.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-ea7ec289.js → BMI_GIRLS.percentile.weekly-eadcc9e7.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-382c7d82.js → BMI_GIRLS.percentile.yearly-ff67801a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-5f7f7581.js → BMI_GIRLS.zscore.monthly-8501806e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-1282d40b.js → BMI_GIRLS.zscore.weekly-cd41d258.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-c6342b9f.js → BMI_GIRLS.zscore.yearly-b82d4953.js} +0 -0
- /package/build/esm/{ChevronDown-8c01c121.js → ChevronDown-ea38600e.js} +0 -0
- /package/build/esm/{Close-a814bd91.js → Close-5fd5e33d.js} +0 -0
- /package/build/esm/{Google-c90ffebc.js → Google-c68d3743.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-04acea4c.js → HEAD CIRCUM_BOYS.percentile.monthly-9908b4a3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-0eeb0047.js → HEAD CIRCUM_BOYS.percentile.weekly-32ad1d11.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-71e3a265.js → HEAD CIRCUM_BOYS.percentile.yearly-9387e50f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-e5776b6b.js → HEAD CIRCUM_BOYS.zscore.monthly-09817ca6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-75eaf085.js → HEAD CIRCUM_BOYS.zscore.weekly-7705e415.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-24ce2823.js → HEAD CIRCUM_BOYS.zscore.yearly-f25f87d7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-aa0f1d44.js → HEAD CIRCUM_GIRLS.percentile.monthly-4a0a8ef2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-ce8c318e.js → HEAD CIRCUM_GIRLS.percentile.weekly-2a27538d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-46105da7.js → HEAD CIRCUM_GIRLS.percentile.yearly-23062648.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-28adbf68.js → HEAD CIRCUM_GIRLS.zscore.monthly-ddc6d259.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-3e75f31f.js → HEAD CIRCUM_GIRLS.zscore.weekly-22ab9c5c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-8e558e67.js → HEAD CIRCUM_GIRLS.zscore.yearly-35247077.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-79f24431.js → HEIGHT_BOYS.percentile.monthly-2716b2a1.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-697eb585.js → HEIGHT_BOYS.percentile.weekly-c6d833cc.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-eecfead6.js → HEIGHT_BOYS.percentile.yearly-a144797f.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-4cab804c.js → HEIGHT_BOYS.zscore.monthly-ab73643f.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-7041d219.js → HEIGHT_BOYS.zscore.weekly-4ce0f6b4.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-1eb6da29.js → HEIGHT_BOYS.zscore.yearly-c31fdc5d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-46389a86.js → HEIGHT_GIRLS.percentile.monthly-5c09c93d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-08c5e33c.js → HEIGHT_GIRLS.percentile.weekly-5ffb6a06.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-6c7d2746.js → HEIGHT_GIRLS.percentile.yearly-d0cac825.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-283dfe24.js → HEIGHT_GIRLS.zscore.monthly-820293d6.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-cc231470.js → HEIGHT_GIRLS.zscore.weekly-2524fc98.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-90ed03d0.js → HEIGHT_GIRLS.zscore.yearly-f9697123.js} +0 -0
- /package/build/esm/{Locale-369869c7.js → Locale-b39bbdfa.js} +0 -0
- /package/build/esm/{Visible-72706b66.js → Visible-0d299379.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-0d247b43.js → WEIGHT_BOYS.percentile.monthly-444a123f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-293bd310.js → WEIGHT_BOYS.percentile.weekly-e53892ce.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-cf2ff565.js → WEIGHT_BOYS.percentile.yearly-3105f161.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-f5a822dc.js → WEIGHT_BOYS.zscore.monthly-aeafd342.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-dff3ddb5.js → WEIGHT_BOYS.zscore.weekly-95a47cc4.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-e2bd3403.js → WEIGHT_BOYS.zscore.yearly-201b35b6.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-7a16d61d.js → WEIGHT_GIRLS.percentile.monthly-d06ab8da.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-e0baeb40.js → WEIGHT_GIRLS.percentile.weekly-1a6faa64.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-222f62d1.js → WEIGHT_GIRLS.percentile.yearly-bd42342b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-6b676802.js → WEIGHT_GIRLS.zscore.monthly-1f4433a4.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-5b95d149.js → WEIGHT_GIRLS.zscore.weekly-137661db.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-f9d52efc.js → WEIGHT_GIRLS.zscore.yearly-2001a1df.js} +0 -0
- /package/build/esm/{animation-1669e12e.js → animation-e2c25be8.js} +0 -0
- /package/build/esm/{constants-22558da8.js → constants-257c3360.js} +0 -0
- /package/build/esm/{constants-ac14ff62.js → constants-58ee65bd.js} +0 -0
- /package/build/esm/{constants-74cccebb.js → constants-80426928.js} +0 -0
- /package/build/esm/{dataTransform-1ce27c01.js → dataTransform-06ec14e6.js} +0 -0
- /package/build/esm/{doctor-96778caa.js → doctor-b571ef1e.js} +0 -0
- /package/build/esm/{index-a701f432.js → index-071508db.js} +0 -0
- /package/build/esm/{index-04a7eb3b.js → index-0b04ccf8.js} +0 -0
- /package/build/esm/{index-1d59ae5b.js → index-0b4c20b3.js} +0 -0
- /package/build/esm/{index-1fec3138.js → index-22a31b3a.js} +0 -0
- /package/build/esm/{index-d54e8d94.js → index-45a0b05a.js} +0 -0
- /package/build/esm/{index-86d20df3.js → index-a49af701.js} +0 -0
- /package/build/esm/{index-6164e1cd.js → index-b6d97b04.js} +0 -0
- /package/build/esm/{index-c7eb8988.js → index-e21b171d.js} +0 -0
- /package/build/esm/{index-a8cb13ba.js → index-f1d5d03d.js} +0 -0
- /package/build/esm/{localizeNumberFormat-8fd42ff3.js → localizeNumberFormat-d59e39db.js} +0 -0
- /package/build/esm/{normalizeLink-8e20aecf.js → normalizeLink-400e3713.js} +0 -0
- /package/build/esm/{other-4bb614a8.js → other-aa9e63cc.js} +0 -0
- /package/build/esm/{paths-d2e9cff2.js → paths-26d586dd.js} +0 -0
- /package/build/esm/{translationsContext-65b321de.js → translationsContext-7754cd73.js} +0 -0
- /package/build/esm/{tslib.es6-d473b5b7.js → tslib.es6-ab8a2400.js} +0 -0
- /package/build/esm/{types-d094baaf.js → types-74864a9a.js} +0 -0
- /package/build/esm/{useIsInit-094386eb.js → useIsInit-87a540e3.js} +0 -0
- /package/build/esm/{useOutsideClick-c8e3207e.js → useOutsideClick-6c90ad72.js} +0 -0
- /package/build/esm/{useScrollbarSize-021647b1.js → useScrollbarSize-cc38ed47.js} +0 -0
- /package/build/esm/{useUniqueId-522e7175.js → useUniqueId-32072130.js} +0 -0
- /package/build/esm/{utils-4b182318.js → utils-8fca923c.js} +0 -0
- /package/build/{index-bcb20ee0.js → index-07d7e51d.js} +0 -0
- /package/build/{index-a93f3ec8.js → index-456f4a70.js} +0 -0
- /package/build/{index-d044f3dd.js → index-47aef47f.js} +0 -0
- /package/build/{index-de60afc5.js → index-5d22b173.js} +0 -0
- /package/build/{index-d9e8f09f.js → index-754d79ce.js} +0 -0
- /package/build/{index-634e30c3.js → index-855a4195.js} +0 -0
- /package/build/{index-b27dea68.js → index-b4639f39.js} +0 -0
- /package/build/{index-9c43d9d8.js → index-c81a53e5.js} +0 -0
- /package/build/{index-2d574258.js → index-d09c6f4c.js} +0 -0
- /package/build/{localizeNumberFormat-07fcd19d.js → localizeNumberFormat-c6a9317f.js} +0 -0
- /package/build/{normalizeLink-81ac71ed.js → normalizeLink-584effeb.js} +0 -0
- /package/build/{other-1f83bfda.js → other-3aca54dd.js} +0 -0
- /package/build/{paths-1d1f9491.js → paths-c5c8fd85.js} +0 -0
- /package/build/{translationsContext-3a4a1574.js → translationsContext-0b6151a9.js} +0 -0
- /package/build/{tslib.es6-8af68a32.js → tslib.es6-ba74242f.js} +0 -0
- /package/build/{types-462778f9.js → types-b8ae3d23.js} +0 -0
- /package/build/{useIsInit-d283ec70.js → useIsInit-b63be920.js} +0 -0
- /package/build/{useOutsideClick-8587c07d.js → useOutsideClick-da1bda34.js} +0 -0
- /package/build/{useScrollbarSize-87dc84d6.js → useScrollbarSize-2906ab77.js} +0 -0
- /package/build/{useUniqueId-d09f4899.js → useUniqueId-d321f919.js} +0 -0
- /package/build/{utils-88ba9396.js → utils-79522a9e.js} +0 -0
|
@@ -0,0 +1,1588 @@
|
|
|
1
|
+
import { a as __awaiter, _ as __rest } from './tslib.es6-ab8a2400.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-a49af701.js';
|
|
5
|
+
import { u as useTranslations } from './index-eea25cf6.js';
|
|
6
|
+
import innertext from 'innertext';
|
|
7
|
+
import { theme } from './miscTheme.js';
|
|
8
|
+
import { I as Input$1 } from './index-ae1334ac.js';
|
|
9
|
+
import { useMantineTheme, Popover } from '@mantine/core';
|
|
10
|
+
import '@mantine/dates';
|
|
11
|
+
import './index-048e9fc6.js';
|
|
12
|
+
import './index-97675e2b.js';
|
|
13
|
+
import './index-b6d97b04.js';
|
|
14
|
+
import './useMantineLocale-0dbd92de.js';
|
|
15
|
+
import { T as Text } from './index-0e42e7f3.js';
|
|
16
|
+
import { B as Button } from './index-b3c1a701.js';
|
|
17
|
+
import './index.styles-6c2014f4.js';
|
|
18
|
+
import '@mantine/hooks';
|
|
19
|
+
import { M as MediaQueries } from './utils-8fca923c.js';
|
|
20
|
+
import './other-aa9e63cc.js';
|
|
21
|
+
import './index-84f3fd36.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-a8aec5b0.js';
|
|
23
|
+
import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath, p as getCurrentHref, b as callApiWithAuth } from './utils-5f56b50b.js';
|
|
24
|
+
import styled from '@emotion/styled';
|
|
25
|
+
import { b as formatPost, c as formatTopic } from './dataTransform-c59d342b.js';
|
|
26
|
+
import { M as MAX_IMAGE_UPLOADS } from './constants-58ee65bd.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-4ffa6d7b.js';
|
|
28
|
+
import { C as CardAuthor, L as Loading$1 } from './index-94e45ed1.js';
|
|
29
|
+
import { S as StyledCreatePostDescription, R as RichTextEditor } from './editor-673f6dc2.js';
|
|
30
|
+
import { I as Input } from './index-954ba898.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-538a8bbc.js';
|
|
35
|
+
import { C as CardLink } from './index-7cec1d5a.js';
|
|
36
|
+
import { B as BtnChoice } from './index-b663100e.js';
|
|
37
|
+
import { L as LOCALE } from './Locale-b39bbdfa.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 };
|