@hhgtech/hhg-components 1.29.255 → 1.29.257
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-647877c3.js → LastPeriod-cced7ae6.js} +1 -1
- package/build/{MobileBottomNavigationIcon-c72c94b1.js → MobileBottomNavigationIcon-e6ca8167.js} +3 -3
- package/build/{Spinner-2ef57315.js → Spinner-f6c19e1f.js} +1 -1
- package/build/{WhatsApp-83a20850.js → WhatsApp-e4c8a092.js} +1 -1
- package/build/adapters.js +19 -19
- package/build/atoms.js +46 -46
- 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 +90 -90
- package/build/{constants-1cc36328.js → constants-8e0a9aa3.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-8ca9bc0c.js → core-9917ee29.js} +1 -1
- package/build/{dataTransform-0d78fcff.js → dataTransform-5b86a813.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-4442a163.js → editor-24076d3e.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-3db09d18.js → LastPeriod-d7ebf57f.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-ffb0633f.js → MobileBottomNavigationIcon-752df463.js} +3 -3
- package/build/esm/{Spinner-a3e64cf2.js → Spinner-447201c3.js} +1 -1
- package/build/esm/{WhatsApp-f8ec28ce.js → WhatsApp-e91ad7a7.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-e9677ee3.js → constants-80e52705.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-27cd7727.js → core-e2994679.js} +1 -1
- package/build/esm/{dataTransform-a19ddc8d.js → dataTransform-f63769fa.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-d7addd70.js → editor-01735174.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-15e7537b.js → fixedBottomAdBlock-080bfd59.js} +23 -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-35872353.js → index-023e14a5.js} +1 -1
- package/build/esm/{index-ef8af124.js → index-0924abd2.js} +1 -1
- package/build/esm/{index-e014aa13.js → index-0b9e0529.js} +2 -2
- package/build/esm/{index-17c2ddd0.js → index-11a9bf00.js} +15 -15
- package/build/esm/{index-56ddfba6.js → index-12af5b47.js} +21 -21
- package/build/esm/{index-e06b730e.js → index-1387e1de.js} +15 -15
- package/build/esm/{index-47b7b478.js → index-176b1755.js} +10 -10
- package/build/esm/{index-f4d04773.js → index-1892a9d1.js} +3 -3
- package/build/esm/{index-9c37d508.js → index-1afb7406.js} +1 -1
- package/build/esm/{index-434e586a.js → index-1b2aa557.js} +2 -2
- package/build/esm/{index-daaf5d70.js → index-24e4e854.js} +3 -3
- package/build/esm/{index-6a3c2aae.js → index-35746b73.js} +5 -5
- package/build/esm/{index-f245a430.js → index-378ce8d5.js} +1 -1
- package/build/esm/{index-6b1e8f6c.js → index-3a813e19.js} +2 -2
- package/build/esm/{index-48ebe2e7.js → index-46b8e58b.js} +30 -30
- package/build/esm/{index-bcfb1c9e.js → index-46fa2099.js} +24 -24
- package/build/esm/{index-1d8c2957.js → index-4f4c1ea9.js} +2 -2
- package/build/esm/{index-839346be.js → index-4f6087ac.js} +2 -2
- package/build/esm/{index-244707e4.js → index-51da6241.js} +7 -7
- package/build/esm/{index-5182fa9d.js → index-52038b72.js} +4 -4
- package/build/esm/{index-cbb715a1.js → index-60caa8d9.js} +13 -13
- package/build/esm/{index-2f0b80a1.js → index-61d38c57.js} +2 -2
- package/build/esm/{index-9c1e9fee.js → index-68bc9cb8.js} +13 -13
- package/build/esm/{index-2e565b13.js → index-7430706d.js} +1 -1
- package/build/esm/{index-ea3c14eb.js → index-7535033c.js} +1 -1
- package/build/esm/{index-8bbc889d.js → index-7b711eb0.js} +16 -16
- package/build/esm/{index-1ae4801b.js → index-7e1b9aab.js} +6 -6
- package/build/esm/{index-2a523664.js → index-7f084e96.js} +3 -3
- package/build/esm/{index-4eb0527a.js → index-84286d9e.js} +16 -16
- package/build/esm/{index-9ed4be6b.js → index-88cc335f.js} +3 -3
- package/build/esm/{index-ae0c384e.js → index-89f861b2.js} +12 -12
- package/build/esm/{index-4eb6c756.js → index-8c0177c7.js} +17 -17
- package/build/esm/{index-6c944fe8.js → index-8e93fd7d.js} +2 -2
- package/build/esm/{index-7c38f120.js → index-8f4080b6.js} +6 -6
- package/build/esm/{index-03ff44b3.js → index-924ffa5f.js} +13 -13
- package/build/esm/{index-f2b11138.js → index-92ac8a44.js} +146 -146
- package/build/esm/{index-f6ef9854.js → index-9c698b33.js} +3 -3
- package/build/esm/{index-f0bf0eed.js → index-9edfd1f5.js} +5 -5
- package/build/esm/{index-3fddc4d8.js → index-ac1e8d5b.js} +1 -1
- package/build/esm/{index-aef27e71.js → index-adbd5a1a.js} +32 -32
- package/build/esm/{index-c96910dd.js → index-ae457f71.js} +17 -17
- package/build/esm/{index-36c08add.js → index-b74971fb.js} +190 -117
- package/build/esm/{index-09649328.js → index-bbcecb07.js} +1 -1
- package/build/esm/{index-47452bf8.js → index-bf220293.js} +3 -3
- package/build/esm/{index-76ce4ed7.js → index-c2af6ffc.js} +1 -1
- package/build/esm/{index-b26e51ec.js → index-c62e286b.js} +16 -16
- package/build/esm/{index-1880f8a3.js → index-c7bd804f.js} +2 -2
- package/build/esm/{index-2eb679bb.js → index-cfec5d75.js} +2 -2
- package/build/esm/{index-f3c6f5f7.js → index-d4b7acdf.js} +7 -7
- package/build/esm/{index-4132d697.js → index-d5721dcb.js} +6 -6
- package/build/esm/index-d5be2978.js +1578 -0
- package/build/esm/{index-a064b97a.js → index-d63df1ed.js} +1 -1
- package/build/esm/{index-862f8eaf.js → index-dd829b66.js} +18 -18
- package/build/esm/{index-65da8c34.js → index-e0165d07.js} +2 -2
- package/build/esm/{index-79b55d37.js → index-e05cce33.js} +2 -2
- package/build/esm/{index-7acc7acc.js → index-e0b58347.js} +13 -13
- package/build/esm/{index-131e2b6b.js → index-e45acd0c.js} +6 -6
- package/build/esm/{index-494fb244.js → index-ea9ae9dc.js} +2 -2
- package/build/esm/{index-1185b1e5.js → index-efc77867.js} +17 -17
- package/build/esm/{index-f7368d5b.js → index-f169c6de.js} +16 -16
- package/build/esm/{index-36dea16b.js → index-f2cd8699.js} +3 -3
- package/build/esm/index.js +112 -112
- package/build/esm/{index.styles-08e39b53.js → index.styles-15ce859c.js} +1 -1
- package/build/esm/interfaces/types/index.d.ts +1 -1
- package/build/esm/{labelSorting-ec1bf6da.js → labelSorting-11972ce5.js} +4 -4
- package/build/esm/lead.js +24 -24
- package/build/esm/{logoIcon-15b6e029.js → logoIcon-4cb83b01.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-5d0b96db.js → post-4bdeecde.js} +3 -3
- package/build/esm/profileNavigation.js +19 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -22
- package/build/esm/ssoV2.js +26 -26
- package/build/esm/{store-2c4a73fd.js → store-b478aeb2.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-ceeeaf75.js → surveyThankyouCard-b8c8a12d.js} +5 -5
- package/build/esm/together/assets/icons/Ask.d.ts +7 -0
- 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.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 +10 -10
- package/build/esm/{treePopoverMenu-b1f48071.js → treePopoverMenu-9100bba2.js} +18 -18
- package/build/esm/{types-e3de1646.js → types-46e3d0a7.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-ab47c91e.js → useCategory-57f930bb.js} +5 -5
- package/build/esm/{useHealthToolCache-2ec381e3.js → useHealthToolCache-b288c86a.js} +1 -1
- package/build/esm/{useMantineLocale-6d8b743c.js → useMantineLocale-96512e71.js} +5 -5
- package/build/esm/{usePlacesAutocomplete-b883fb59.js → usePlacesAutocomplete-8d46f82b.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-5a12e69e.js → utils-01c2ac83.js} +4 -4
- package/build/esm/{utils-f8b3581f.js → utils-3786ea8d.js} +2 -2
- package/build/esm/{utils-23094e0e.js → utils-5c0260b6.js} +2 -2
- package/build/esm/vaccination.js +21 -21
- package/build/{fixedBottomAdBlock-245489f3.js → fixedBottomAdBlock-a9f91d42.js} +23 -23
- 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-e929edea.js → index-001c16f3.js} +1 -1
- package/build/{index-0732378e.js → index-048f3b44.js} +2 -2
- package/build/{index-06775ce7.js → index-05692d24.js} +15 -15
- package/build/{index-f6c1b74e.js → index-06870b5e.js} +6 -6
- package/build/{index-46f868a5.js → index-0a5a1b01.js} +2 -2
- package/build/{index-a3cbebe1.js → index-0f04fc87.js} +2 -2
- package/build/{index-138cbcd6.js → index-1f44306e.js} +5 -5
- package/build/{index-ca06b50c.js → index-2865c943.js} +5 -5
- package/build/{index-b72f9bff.js → index-29c9db23.js} +18 -18
- package/build/{index-82080e24.js → index-2d4a31d1.js} +2 -2
- package/build/{index-c7a827cb.js → index-32978398.js} +6 -6
- package/build/{index-b7d15577.js → index-38415838.js} +21 -21
- package/build/{index-17122bdb.js → index-4507208c.js} +24 -24
- package/build/{index-299140fb.js → index-4751e786.js} +1 -1
- package/build/{index-b7c7906c.js → index-482be234.js} +7 -7
- package/build/{index-8ecc4b05.js → index-4a29f013.js} +2 -2
- package/build/{index-bfe67266.js → index-4bacf357.js} +2 -2
- package/build/{index-195b7b4c.js → index-4fcc98dd.js} +2 -2
- package/build/{index-644c08bb.js → index-51d2ca96.js} +1 -1
- package/build/{index-4dfbfe3c.js → index-538d14e8.js} +16 -16
- package/build/{index-4f0dd547.js → index-538fdb6c.js} +16 -16
- package/build/index-55ca8405.js +1592 -0
- package/build/{index-664f2b18.js → index-5710ccd2.js} +1 -1
- package/build/{index-69132b09.js → index-5bf98a3d.js} +17 -17
- package/build/{index-c5042444.js → index-5e5c8266.js} +1 -1
- package/build/{index-274b902f.js → index-6095d808.js} +17 -17
- package/build/{index-3cb6d701.js → index-6163d416.js} +12 -12
- package/build/{index-ce282721.js → index-6a6b03cd.js} +13 -13
- package/build/{index-b02ac86d.js → index-6acf01b0.js} +32 -32
- package/build/{index-9bcf2f6e.js → index-6c20d3d8.js} +30 -30
- package/build/{index-ee186536.js → index-7204cc38.js} +16 -16
- package/build/{index-875a6c7e.js → index-72615a0b.js} +3 -3
- package/build/{index-a1f8763b.js → index-77be7245.js} +17 -17
- package/build/{index-63c15184.js → index-7f340c95.js} +13 -13
- package/build/{index-a2263587.js → index-86a4b373.js} +3 -3
- package/build/{index-9519a5fd.js → index-9d45a28a.js} +3 -3
- package/build/{index-8fdebfd3.js → index-a07d57da.js} +1 -1
- package/build/{index-a03b58f0.js → index-a108dd1a.js} +2 -2
- package/build/{index-a12e742e.js → index-a6423cc9.js} +1 -1
- package/build/{index-2696743a.js → index-a66fb661.js} +3 -3
- package/build/{index-f3236d5a.js → index-bebff3fe.js} +7 -7
- package/build/{index-118bcd6b.js → index-bf4e59f8.js} +16 -16
- package/build/{index-ab8e6171.js → index-cc2f235e.js} +13 -13
- package/build/{index-fbd6df2e.js → index-cf6083e0.js} +146 -146
- package/build/{index-6968f65d.js → index-d24b7607.js} +4 -4
- package/build/{index-15b83521.js → index-d2589ce9.js} +1 -1
- package/build/{index-6335af8c.js → index-d4b5a53a.js} +2 -2
- package/build/{index-b7324289.js → index-d675bac3.js} +2 -2
- package/build/{index-adf15e38.js → index-dc127258.js} +1 -1
- package/build/{index-b37ae53d.js → index-ddaaa630.js} +1 -1
- package/build/{index-934d23cd.js → index-e1c57e47.js} +13 -13
- package/build/{index-85abf965.js → index-e347a515.js} +3 -3
- package/build/{index-17494419.js → index-e54701fa.js} +3 -3
- package/build/{index-2522a49d.js → index-e8a6e5b1.js} +190 -117
- package/build/{index-ad540dfe.js → index-e942ce94.js} +3 -3
- package/build/{index-a14e421b.js → index-f30d7935.js} +2 -2
- package/build/{index-04e2ac6e.js → index-f5be0d5b.js} +10 -10
- package/build/{index-6c60c508.js → index-f98fbacb.js} +6 -6
- package/build/{index-78754361.js → index-fb458d2a.js} +2 -2
- package/build/{index-1f1435d9.js → index-fc4cd44a.js} +6 -6
- package/build/{index-4a4120eb.js → index-fe8f488b.js} +15 -15
- package/build/index.js +112 -112
- package/build/{index.styles-5731896a.js → index.styles-6a6bfae9.js} +1 -1
- package/build/interfaces/types/index.d.ts +1 -1
- package/build/{labelSorting-1eb76308.js → labelSorting-cce89186.js} +4 -4
- package/build/lead.js +24 -24
- package/build/{logoIcon-b499558c.js → logoIcon-03b96846.js} +2 -2
- 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 +16 -16
- package/build/navigation.js +40 -40
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +23 -23
- package/build/onboardingV2.js +28 -28
- package/build/organisms.js +44 -44
- package/build/{post-a74ba975.js → post-8e39f08c.js} +2 -2
- package/build/profileNavigation.js +19 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -22
- package/build/ssoV2.js +25 -25
- package/build/{store-df580b27.js → store-6c70e440.js} +3 -3
- package/build/subot.js +32 -32
- package/build/surveyOrPremiumBanner.js +31 -31
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-b602fa84.js → surveyThankyouCard-aa6087ea.js} +5 -5
- package/build/together/assets/icons/Ask.d.ts +7 -0
- 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.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 +10 -10
- package/build/{treePopoverMenu-4135e5cb.js → treePopoverMenu-c0bf689c.js} +18 -18
- package/build/{types-ee77bf59.js → types-2f8ee628.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-2173d365.js → useCategory-8d9a0e06.js} +5 -5
- package/build/{useHealthToolCache-8fd7bf92.js → useHealthToolCache-0a3bfe0f.js} +1 -1
- package/build/{useMantineLocale-234052de.js → useMantineLocale-fd4a8d94.js} +5 -5
- package/build/{usePlacesAutocomplete-0f7477ef.js → usePlacesAutocomplete-511227cc.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-93342687.js → utils-0a1343a8.js} +2 -2
- package/build/{utils-b072c91b.js → utils-a644087f.js} +3 -3
- package/build/{utils-61af8020.js → utils-ff95b95e.js} +2 -2
- package/build/vaccination.js +21 -21
- package/package.json +1 -1
- package/build/esm/index-fad75d62.js +0 -913
- package/build/index-6da374f3.js +0 -927
- /package/build/{BMI_BOYS.percentile.monthly-c09efa33.js → BMI_BOYS.percentile.monthly-54bee4f9.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-ef50b0f6.js → BMI_BOYS.percentile.weekly-26cbc55d.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-9c8d197d.js → BMI_BOYS.percentile.yearly-cc7e66e9.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-411cf7a2.js → BMI_BOYS.zscore.monthly-1af56e4d.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-8581710c.js → BMI_BOYS.zscore.weekly-7ebf95cf.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-a6c82356.js → BMI_BOYS.zscore.yearly-7e21fbe6.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-59c005a9.js → BMI_GIRLS.percentile.monthly-10d4a777.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-a68142d1.js → BMI_GIRLS.percentile.weekly-14599c39.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-e052180a.js → BMI_GIRLS.percentile.yearly-1059ee32.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-9cef049d.js → BMI_GIRLS.zscore.monthly-5a381a83.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-bbf4adf5.js → BMI_GIRLS.zscore.weekly-5b9af99c.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-d5bf9d4e.js → BMI_GIRLS.zscore.yearly-0c3b7bc8.js} +0 -0
- /package/build/{ChevronDown-fbafaed7.js → ChevronDown-631abac5.js} +0 -0
- /package/build/{Close-f39f0374.js → Close-4ccb725b.js} +0 -0
- /package/build/{Google-8d688c1d.js → Google-a3912181.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-f27ca68e.js → HEAD CIRCUM_BOYS.percentile.monthly-1efc4af9.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-07391ddb.js → HEAD CIRCUM_BOYS.percentile.weekly-59329e79.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-13f534e1.js → HEAD CIRCUM_BOYS.percentile.yearly-3b5ea097.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-e2ebe212.js → HEAD CIRCUM_BOYS.zscore.monthly-f7753005.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-f413f37c.js → HEAD CIRCUM_BOYS.zscore.weekly-bc996b94.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-4d96f947.js → HEAD CIRCUM_BOYS.zscore.yearly-38178d70.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-2fd46b6f.js → HEAD CIRCUM_GIRLS.percentile.monthly-be05b10f.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-6eb33338.js → HEAD CIRCUM_GIRLS.percentile.weekly-5bc8286a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-0462deb7.js → HEAD CIRCUM_GIRLS.percentile.yearly-79ea368e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-76d6f310.js → HEAD CIRCUM_GIRLS.zscore.monthly-3e39e602.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-9fb77076.js → HEAD CIRCUM_GIRLS.zscore.weekly-52643232.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-6a05f1a7.js → HEAD CIRCUM_GIRLS.zscore.yearly-71cab9b7.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-065f56b9.js → HEIGHT_BOYS.percentile.monthly-debb4f9b.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-500ea40a.js → HEIGHT_BOYS.percentile.weekly-dee8eef5.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-e3a69d7d.js → HEIGHT_BOYS.percentile.yearly-b3ee6be8.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-b00ecfa5.js → HEIGHT_BOYS.zscore.monthly-f8719e1a.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-f5633da4.js → HEIGHT_BOYS.zscore.weekly-2d4cff5f.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-4f6423de.js → HEIGHT_BOYS.zscore.yearly-1deda9fa.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-46f228f1.js → HEIGHT_GIRLS.percentile.monthly-dee8df0c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-a4c00d92.js → HEIGHT_GIRLS.percentile.weekly-7d0f1bc3.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-84eaa7c1.js → HEIGHT_GIRLS.percentile.yearly-109db985.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-24df323c.js → HEIGHT_GIRLS.zscore.monthly-13f1500c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-463192bb.js → HEIGHT_GIRLS.zscore.weekly-7f69edd8.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-ddba7973.js → HEIGHT_GIRLS.zscore.yearly-9d9352fe.js} +0 -0
- /package/build/{Locale-7729f820.js → Locale-96dc68da.js} +0 -0
- /package/build/{Visible-d59d1865.js → Visible-28f93c50.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-2b40cb5a.js → WEIGHT_BOYS.percentile.monthly-03d60931.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-c5eb3a0a.js → WEIGHT_BOYS.percentile.weekly-a44c3932.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-36d11a43.js → WEIGHT_BOYS.percentile.yearly-6aa6081c.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-817857ec.js → WEIGHT_BOYS.zscore.monthly-957480c9.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-046b4d60.js → WEIGHT_BOYS.zscore.weekly-3a6b2f0f.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-8b824bb6.js → WEIGHT_BOYS.zscore.yearly-09cbaee2.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-3ba15cd9.js → WEIGHT_GIRLS.percentile.monthly-118f0a6a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-ba07938a.js → WEIGHT_GIRLS.percentile.weekly-50be2769.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-7a3bc369.js → WEIGHT_GIRLS.percentile.yearly-4dd5d3a4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-026bf8ff.js → WEIGHT_GIRLS.zscore.monthly-497bf0d2.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-b3761c45.js → WEIGHT_GIRLS.zscore.weekly-2790c8b4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-241642df.js → WEIGHT_GIRLS.zscore.yearly-8e3b346c.js} +0 -0
- /package/build/{animation-eea33b50.js → animation-a97af0b4.js} +0 -0
- /package/build/{constants-23150110.js → constants-62ae24f3.js} +0 -0
- /package/build/{constants-2a9ec4cd.js → constants-6e362bc4.js} +0 -0
- /package/build/{constants-e05edfd4.js → constants-e79299ac.js} +0 -0
- /package/build/{dataTransform-377a8abc.js → dataTransform-051ae298.js} +0 -0
- /package/build/{doctor-1e66ff11.js → doctor-82a60589.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-c33d5a51.js → BMI_BOYS.percentile.monthly-29d68e5a.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-2142f77b.js → BMI_BOYS.percentile.weekly-66d70c3d.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-6159ffb5.js → BMI_BOYS.percentile.yearly-754b8542.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-ada09181.js → BMI_BOYS.zscore.monthly-46822c5a.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-edc422ed.js → BMI_BOYS.zscore.weekly-e65f52d1.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-ae47e229.js → BMI_BOYS.zscore.yearly-f97fc005.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-37f28356.js → BMI_GIRLS.percentile.monthly-4a4da13c.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-13e3215d.js → BMI_GIRLS.percentile.weekly-56bd8d32.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-6f7f31e6.js → BMI_GIRLS.percentile.yearly-432ccba5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-eb7c31da.js → BMI_GIRLS.zscore.monthly-0ba81df9.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-13003bd8.js → BMI_GIRLS.zscore.weekly-f24fd86d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-619f74e2.js → BMI_GIRLS.zscore.yearly-ae49734c.js} +0 -0
- /package/build/esm/{ChevronDown-366f4c97.js → ChevronDown-4419a5d2.js} +0 -0
- /package/build/esm/{Close-6c262379.js → Close-253133ee.js} +0 -0
- /package/build/esm/{Google-002b53ae.js → Google-6cda4e80.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-3b62bf9a.js → HEAD CIRCUM_BOYS.percentile.monthly-a8b5c5e0.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-d4738364.js → HEAD CIRCUM_BOYS.percentile.weekly-9bcdcdc2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-af36b0e0.js → HEAD CIRCUM_BOYS.percentile.yearly-4cb5776b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-1bae9d8f.js → HEAD CIRCUM_BOYS.zscore.monthly-a8bd9d83.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-73984bb0.js → HEAD CIRCUM_BOYS.zscore.weekly-167ff364.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-b4aac2ba.js → HEAD CIRCUM_BOYS.zscore.yearly-722bbf2a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-a144d28e.js → HEAD CIRCUM_GIRLS.percentile.monthly-a6fcfd45.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-af2964c5.js → HEAD CIRCUM_GIRLS.percentile.weekly-da5e1813.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-f6ddce97.js → HEAD CIRCUM_GIRLS.percentile.yearly-0c19a1e5.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-69eaaad1.js → HEAD CIRCUM_GIRLS.zscore.monthly-1b92fd77.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-a7bceb85.js → HEAD CIRCUM_GIRLS.zscore.weekly-50bf84ad.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-46951905.js → HEAD CIRCUM_GIRLS.zscore.yearly-8084415d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-69b2d8bb.js → HEIGHT_BOYS.percentile.monthly-d3dcc98c.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-15458540.js → HEIGHT_BOYS.percentile.weekly-90c36ad5.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-757eaf11.js → HEIGHT_BOYS.percentile.yearly-091b70cb.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-571040c1.js → HEIGHT_BOYS.zscore.monthly-c5a2eed6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-5e49391a.js → HEIGHT_BOYS.zscore.weekly-ff3636fd.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-b9fbd523.js → HEIGHT_BOYS.zscore.yearly-05363add.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-739c2a3d.js → HEIGHT_GIRLS.percentile.monthly-0865eab8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-a03af2e0.js → HEIGHT_GIRLS.percentile.weekly-bd32ce56.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-f0e03ef9.js → HEIGHT_GIRLS.percentile.yearly-53538217.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-8857382a.js → HEIGHT_GIRLS.zscore.monthly-808b7194.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-3bd4ab5f.js → HEIGHT_GIRLS.zscore.weekly-6cdc4e26.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-22a4334c.js → HEIGHT_GIRLS.zscore.yearly-21913e97.js} +0 -0
- /package/build/esm/{Locale-bb619c10.js → Locale-5495def8.js} +0 -0
- /package/build/esm/{Visible-f6f456d9.js → Visible-3209ee02.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-170c241a.js → WEIGHT_BOYS.percentile.monthly-780b1e5b.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-77bed609.js → WEIGHT_BOYS.percentile.weekly-fc48f5ae.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-96a88255.js → WEIGHT_BOYS.percentile.yearly-3e58951c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-423f6fb4.js → WEIGHT_BOYS.zscore.monthly-5141c10f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-d0e58b42.js → WEIGHT_BOYS.zscore.weekly-6cb6efcd.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-8e8396c0.js → WEIGHT_BOYS.zscore.yearly-0e4cab50.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-98149138.js → WEIGHT_GIRLS.percentile.monthly-74b5256a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-fb6c3e90.js → WEIGHT_GIRLS.percentile.weekly-a51da84f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-dfc9fe50.js → WEIGHT_GIRLS.percentile.yearly-f8594155.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-89c1f8a6.js → WEIGHT_GIRLS.zscore.monthly-1a75f8dc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-2b2db79a.js → WEIGHT_GIRLS.zscore.weekly-1af7c305.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-25bc1891.js → WEIGHT_GIRLS.zscore.yearly-49908c8b.js} +0 -0
- /package/build/esm/{animation-b4b8edac.js → animation-9473ee26.js} +0 -0
- /package/build/esm/{constants-8e018757.js → constants-5f2dbe09.js} +0 -0
- /package/build/esm/{constants-abbe915a.js → constants-db3306e9.js} +0 -0
- /package/build/esm/{constants-cb5a7fd0.js → constants-fa4bebfd.js} +0 -0
- /package/build/esm/{dataTransform-581f339a.js → dataTransform-16405f88.js} +0 -0
- /package/build/esm/{doctor-c6cb7f68.js → doctor-0f4475ed.js} +0 -0
- /package/build/esm/{index-988d51c5.js → index-01cdc8aa.js} +0 -0
- /package/build/esm/{index-7be97cef.js → index-28662829.js} +0 -0
- /package/build/esm/{index-e42ffb21.js → index-336d80fc.js} +0 -0
- /package/build/esm/{index-29d81893.js → index-3a321f9c.js} +0 -0
- /package/build/esm/{index-ebfe74f0.js → index-47069a63.js} +0 -0
- /package/build/esm/{index-b617f14d.js → index-5fa98fe4.js} +0 -0
- /package/build/esm/{index-e942c2ea.js → index-6a95d83e.js} +0 -0
- /package/build/esm/{index-0cfc4fb4.js → index-d125f8cf.js} +0 -0
- /package/build/esm/{index-0a379e78.js → index-d8e00a78.js} +0 -0
- /package/build/esm/{localizeNumberFormat-d7d000f5.js → localizeNumberFormat-ff3c5bd2.js} +0 -0
- /package/build/esm/{normalizeLink-30ad82cf.js → normalizeLink-511be84c.js} +0 -0
- /package/build/esm/{other-3575130c.js → other-b2d18cf9.js} +0 -0
- /package/build/esm/{paths-b73fd913.js → paths-c71da839.js} +0 -0
- /package/build/esm/{translationsContext-1cd2e30a.js → translationsContext-91a20f7f.js} +0 -0
- /package/build/esm/{tslib.es6-52958ee8.js → tslib.es6-2e543b13.js} +0 -0
- /package/build/esm/{types-0df2293f.js → types-1df224fd.js} +0 -0
- /package/build/esm/{useIsInit-ab5fe172.js → useIsInit-768209be.js} +0 -0
- /package/build/esm/{useOutsideClick-d6e790bc.js → useOutsideClick-01c19ae6.js} +0 -0
- /package/build/esm/{useScrollbarSize-04abc36a.js → useScrollbarSize-1b1014bd.js} +0 -0
- /package/build/esm/{useUniqueId-550be503.js → useUniqueId-772dfaa1.js} +0 -0
- /package/build/esm/{utils-da43426c.js → utils-cbd22536.js} +0 -0
- /package/build/{index-31448e57.js → index-5cc64a69.js} +0 -0
- /package/build/{index-f720a8e7.js → index-821ff45d.js} +0 -0
- /package/build/{index-33986637.js → index-a78e43f5.js} +0 -0
- /package/build/{index-57b22ff5.js → index-a8fe595c.js} +0 -0
- /package/build/{index-0a95712f.js → index-b5256d64.js} +0 -0
- /package/build/{index-943be1e0.js → index-e1b256c0.js} +0 -0
- /package/build/{index-152b5d6d.js → index-e82aa39d.js} +0 -0
- /package/build/{index-bdcc04ee.js → index-f27b6a50.js} +0 -0
- /package/build/{index-be852417.js → index-f889bd32.js} +0 -0
- /package/build/{localizeNumberFormat-29cc719b.js → localizeNumberFormat-1a04cfd4.js} +0 -0
- /package/build/{normalizeLink-4d1d066d.js → normalizeLink-4fa661a6.js} +0 -0
- /package/build/{other-a38f566b.js → other-f85ced39.js} +0 -0
- /package/build/{paths-a1512163.js → paths-9631a764.js} +0 -0
- /package/build/{translationsContext-4dc20069.js → translationsContext-fe406087.js} +0 -0
- /package/build/{tslib.es6-e8964004.js → tslib.es6-73bc9f1c.js} +0 -0
- /package/build/{types-9ea371d5.js → types-b76a8fbd.js} +0 -0
- /package/build/{useIsInit-accb74ec.js → useIsInit-975ab48f.js} +0 -0
- /package/build/{useOutsideClick-b892ea47.js → useOutsideClick-b690477a.js} +0 -0
- /package/build/{useScrollbarSize-e3d9da0b.js → useScrollbarSize-a4cb3884.js} +0 -0
- /package/build/{useUniqueId-707f278a.js → useUniqueId-aa92b3fb.js} +0 -0
- /package/build/{utils-2f182098.js → utils-429b8e78.js} +0 -0
|
@@ -0,0 +1,1592 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-73bc9f1c.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var other = require('@hhgtech/icons/other');
|
|
6
|
+
var index$8 = require('./index-e82aa39d.js');
|
|
7
|
+
var index = require('./index-5e5c8266.js');
|
|
8
|
+
var innertext = require('innertext');
|
|
9
|
+
var miscTheme = require('./miscTheme.js');
|
|
10
|
+
var index$5 = require('./index-6163d416.js');
|
|
11
|
+
var core = require('@mantine/core');
|
|
12
|
+
require('@mantine/dates');
|
|
13
|
+
require('./index-a108dd1a.js');
|
|
14
|
+
require('./index-001c16f3.js');
|
|
15
|
+
require('./index-b5256d64.js');
|
|
16
|
+
require('./useMantineLocale-fd4a8d94.js');
|
|
17
|
+
var index$2 = require('./index-2d4a31d1.js');
|
|
18
|
+
var index$1 = require('./index-5710ccd2.js');
|
|
19
|
+
require('./index.styles-6a6bfae9.js');
|
|
20
|
+
require('@mantine/hooks');
|
|
21
|
+
var utils = require('./utils-429b8e78.js');
|
|
22
|
+
require('./other-f85ced39.js');
|
|
23
|
+
require('./index-e54701fa.js');
|
|
24
|
+
var index$3 = require('./index-cf6083e0.js');
|
|
25
|
+
var togetherComponentGlobalContext = require('./utils-a644087f.js');
|
|
26
|
+
var styled = require('@emotion/styled');
|
|
27
|
+
var dataTransform = require('./dataTransform-5b86a813.js');
|
|
28
|
+
var constants = require('./constants-62ae24f3.js');
|
|
29
|
+
var post = require('./post-8e39f08c.js');
|
|
30
|
+
var togetherMoleculesCardAuthor = require('./index-bf4e59f8.js');
|
|
31
|
+
var togetherRichTextEditor = require('./editor-24076d3e.js');
|
|
32
|
+
var index$4 = require('./index-f30d7935.js');
|
|
33
|
+
var debounce = require('lodash/debounce');
|
|
34
|
+
var ContentEditable = require('react-contenteditable');
|
|
35
|
+
var togetherApiPaths = require('./togetherApiPaths.js');
|
|
36
|
+
var index$6 = require('./index-048f3b44.js');
|
|
37
|
+
var index$7 = require('./index-1f44306e.js');
|
|
38
|
+
var index$9 = require('./index-ddaaa630.js');
|
|
39
|
+
var core$1 = require('@hhgtech/icons/core');
|
|
40
|
+
|
|
41
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
42
|
+
|
|
43
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
44
|
+
var innertext__default = /*#__PURE__*/_interopDefault(innertext);
|
|
45
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
46
|
+
var debounce__default = /*#__PURE__*/_interopDefault(debounce);
|
|
47
|
+
var ContentEditable__default = /*#__PURE__*/_interopDefault(ContentEditable);
|
|
48
|
+
|
|
49
|
+
const Ask = ({ size }) => {
|
|
50
|
+
return (React__default["default"].createElement("svg", { width: size, height: size, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
51
|
+
React__default["default"].createElement("g", { filter: "url(#filter0_i_4664_166540)" },
|
|
52
|
+
React__default["default"].createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "#2D87F3" }),
|
|
53
|
+
React__default["default"].createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint0_radial_4664_166540)" }),
|
|
54
|
+
React__default["default"].createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint1_radial_4664_166540)" }),
|
|
55
|
+
React__default["default"].createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint2_radial_4664_166540)" }),
|
|
56
|
+
React__default["default"].createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint3_radial_4664_166540)" })),
|
|
57
|
+
React__default["default"].createElement("mask", { id: "path-2-inside-1_4664_166540", fill: "white" },
|
|
58
|
+
React__default["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" })),
|
|
59
|
+
React__default["default"].createElement("g", { filter: "url(#filter1_i_4664_166540)" },
|
|
60
|
+
React__default["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" })),
|
|
61
|
+
React__default["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)" }),
|
|
62
|
+
React__default["default"].createElement("g", { filter: "url(#filter2_i_4664_166540)" },
|
|
63
|
+
React__default["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" })),
|
|
64
|
+
React__default["default"].createElement("defs", null,
|
|
65
|
+
React__default["default"].createElement("filter", { id: "filter0_i_4664_166540", x: "1.71094", y: "1.71423", width: "22.5703", height: "24.5714", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
66
|
+
React__default["default"].createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
67
|
+
React__default["default"].createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
68
|
+
React__default["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["default"].createElement("feOffset", { dx: "2", dy: "4" }),
|
|
70
|
+
React__default["default"].createElement("feGaussianBlur", { stdDeviation: "8" }),
|
|
71
|
+
React__default["default"].createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
72
|
+
React__default["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["default"].createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
|
|
74
|
+
React__default["default"].createElement("filter", { id: "filter1_i_4664_166540", x: "6", y: "5.14282", width: "12.7655", height: "14.4451", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
75
|
+
React__default["default"].createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
76
|
+
React__default["default"].createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
77
|
+
React__default["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["default"].createElement("feOffset", { dx: "0.765488", dy: "0.765488" }),
|
|
79
|
+
React__default["default"].createElement("feGaussianBlur", { stdDeviation: "0.765488" }),
|
|
80
|
+
React__default["default"].createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
81
|
+
React__default["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["default"].createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
|
|
83
|
+
React__default["default"].createElement("filter", { id: "filter2_i_4664_166540", x: "21.0859", y: "2.2262", width: "3.98924", height: "3.99315", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
84
|
+
React__default["default"].createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
85
|
+
React__default["default"].createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
86
|
+
React__default["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" }),
|
|
87
|
+
React__default["default"].createElement("feOffset", { dx: "0.731427", dy: "0.731427" }),
|
|
88
|
+
React__default["default"].createElement("feGaussianBlur", { stdDeviation: "0.731427" }),
|
|
89
|
+
React__default["default"].createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
90
|
+
React__default["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" }),
|
|
91
|
+
React__default["default"].createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
|
|
92
|
+
React__default["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)" },
|
|
93
|
+
React__default["default"].createElement("stop", { stopColor: "#3D6CFD" }),
|
|
94
|
+
React__default["default"].createElement("stop", { offset: "1", stopColor: "#3C6BFD", stopOpacity: "0" })),
|
|
95
|
+
React__default["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)" },
|
|
96
|
+
React__default["default"].createElement("stop", { stopColor: "#A3F1FF" }),
|
|
97
|
+
React__default["default"].createElement("stop", { offset: "1", stopColor: "#AEF3FF", stopOpacity: "0" })),
|
|
98
|
+
React__default["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)" },
|
|
99
|
+
React__default["default"].createElement("stop", { stopColor: "#9EFF3F" }),
|
|
100
|
+
React__default["default"].createElement("stop", { offset: "0.963398", stopColor: "#93FF3E", stopOpacity: "0" })),
|
|
101
|
+
React__default["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)" },
|
|
102
|
+
React__default["default"].createElement("stop", { stopColor: "#02FAF8" }),
|
|
103
|
+
React__default["default"].createElement("stop", { offset: "1", stopColor: "#01FCFC", stopOpacity: "0" })),
|
|
104
|
+
React__default["default"].createElement("linearGradient", { id: "paint4_linear_4664_166540", x1: "12", y1: "4.93885", x2: "12", y2: "19.0338", gradientUnits: "userSpaceOnUse" },
|
|
105
|
+
React__default["default"].createElement("stop", { stopColor: "white" }),
|
|
106
|
+
React__default["default"].createElement("stop", { offset: "0.0965062", stopColor: "white", stopOpacity: "0" }),
|
|
107
|
+
React__default["default"].createElement("stop", { offset: "0.706019", stopColor: "white", stopOpacity: "0.53" }),
|
|
108
|
+
React__default["default"].createElement("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })))));
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const StyledCreateNewPost = styled__default["default"].div `
|
|
112
|
+
position: relative;
|
|
113
|
+
display: flex;
|
|
114
|
+
height: 100%;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
padding: 16px 24px;
|
|
117
|
+
|
|
118
|
+
${utils.MediaQueries.mbDown} {
|
|
119
|
+
padding: 16px 16px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.input-group-container {
|
|
123
|
+
flex: 1;
|
|
124
|
+
padding-right: 2px;
|
|
125
|
+
padding-left: 2px;
|
|
126
|
+
margin-bottom: 24px;
|
|
127
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
128
|
+
overflow-y: auto;
|
|
129
|
+
scrollbar-width: none; /* Firefox */
|
|
130
|
+
&::-webkit-scrollbar {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.input-group {
|
|
136
|
+
:not(:last-child) {
|
|
137
|
+
margin-bottom: 0.6rem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
input:focus,
|
|
141
|
+
textarea:focus,
|
|
142
|
+
[contenteditable='true'] {
|
|
143
|
+
outline: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
label {
|
|
147
|
+
margin-bottom: 5px;
|
|
148
|
+
color: ${miscTheme.theme.colors.gray600};
|
|
149
|
+
/* font-family: 'Open Sans', sans-serif; */
|
|
150
|
+
font-size: 13px;
|
|
151
|
+
font-weight: bold;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.input-group-label {
|
|
155
|
+
margin-bottom: 5px;
|
|
156
|
+
color: ${miscTheme.theme.colors.gray600};
|
|
157
|
+
/* font-family: 'Open Sans', sans-serif; */
|
|
158
|
+
font-size: 13px;
|
|
159
|
+
font-weight: bold;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.input-notification {
|
|
163
|
+
display: flex;
|
|
164
|
+
|
|
165
|
+
& > img {
|
|
166
|
+
width: 16px;
|
|
167
|
+
height: 16px;
|
|
168
|
+
margin-top: 1.5px;
|
|
169
|
+
margin-right: 8px;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.tag-list {
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.warning {
|
|
178
|
+
margin-top: 16px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.submit-btn {
|
|
182
|
+
width: 100%;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.switch-label {
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.swich-input-group {
|
|
191
|
+
padding: 12px 16px;
|
|
192
|
+
border-radius: 8px;
|
|
193
|
+
background: ${miscTheme.theme.colors.neutral50};
|
|
194
|
+
|
|
195
|
+
&.askdoctor-switch {
|
|
196
|
+
background: ${miscTheme.theme.colors.primary50};
|
|
197
|
+
&.mb-color {
|
|
198
|
+
background: ${miscTheme.theme.mbColors.tonePink};
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.mantine-Switch-labelWrapper {
|
|
203
|
+
flex-grow: 1;
|
|
204
|
+
}
|
|
205
|
+
.mantine-Checkbox-body {
|
|
206
|
+
display: flex;
|
|
207
|
+
width: 100%;
|
|
208
|
+
align-items: center;
|
|
209
|
+
justify-content: space-between;
|
|
210
|
+
}
|
|
211
|
+
.mantine-Switch-track {
|
|
212
|
+
margin-bottom: 0;
|
|
213
|
+
}
|
|
214
|
+
.label-txt {
|
|
215
|
+
font-weight: normal;
|
|
216
|
+
font-size: 14px;
|
|
217
|
+
color: ${miscTheme.theme.colors.gray800};
|
|
218
|
+
margin-left: 10px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
`;
|
|
222
|
+
const StyledIsQuestion = styled__default["default"].div `
|
|
223
|
+
display: flex;
|
|
224
|
+
width: 100%;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: space-between;
|
|
227
|
+
padding: 8px 12px;
|
|
228
|
+
border-radius: 0 0 8px 8px;
|
|
229
|
+
background: ${miscTheme.theme.colors.neutral50};
|
|
230
|
+
border: 1px solid ${miscTheme.theme.colors.gray200};
|
|
231
|
+
gap: 12px;
|
|
232
|
+
|
|
233
|
+
&.has-error {
|
|
234
|
+
border: 1px solid ${miscTheme.theme.colors.red600};
|
|
235
|
+
}
|
|
236
|
+
&.error-description {
|
|
237
|
+
border: 1px solid ${miscTheme.theme.colors.red600};
|
|
238
|
+
border-top: none;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&[data-is-marry-baby='true'] {
|
|
242
|
+
background: ${miscTheme.theme.mbColors.tonePink};
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.switch-label {
|
|
246
|
+
display: flex;
|
|
247
|
+
gap: 4px;
|
|
248
|
+
align-items: flex-start;
|
|
249
|
+
|
|
250
|
+
svg {
|
|
251
|
+
margin-top: 2px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.wrapper-text {
|
|
255
|
+
.label-txt {
|
|
256
|
+
color: ${miscTheme.theme.colors.gray800};
|
|
257
|
+
font-size: 14px;
|
|
258
|
+
font-weight: 600;
|
|
259
|
+
line-height: 22px;
|
|
260
|
+
}
|
|
261
|
+
.description-txt {
|
|
262
|
+
color: ${miscTheme.theme.colors.gray700};
|
|
263
|
+
font-size: 12px;
|
|
264
|
+
font-weight: 400;
|
|
265
|
+
line-height: 18px;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
button {
|
|
271
|
+
height: 40px;
|
|
272
|
+
&:hover,
|
|
273
|
+
&.primary {
|
|
274
|
+
border-radius: 4px;
|
|
275
|
+
border: 1px solid ${miscTheme.theme.colors.blue100};
|
|
276
|
+
background: ${miscTheme.theme.colors.blue50};
|
|
277
|
+
color: ${miscTheme.theme.colors.primaryBase};
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
`;
|
|
281
|
+
const StyledError = styled__default["default"].div `
|
|
282
|
+
margin-bottom: 12px;
|
|
283
|
+
color: ${miscTheme.theme.colors.red700};
|
|
284
|
+
svg {
|
|
285
|
+
margin-right: 5px;
|
|
286
|
+
}
|
|
287
|
+
svg,
|
|
288
|
+
span {
|
|
289
|
+
vertical-align: middle;
|
|
290
|
+
}
|
|
291
|
+
`;
|
|
292
|
+
const StyledFormGroupInner = styled__default["default"].div `
|
|
293
|
+
.swich-input-group {
|
|
294
|
+
padding: 12px 16px;
|
|
295
|
+
border-radius: 8px;
|
|
296
|
+
background: ${miscTheme.theme.colors.neutral50};
|
|
297
|
+
|
|
298
|
+
&.askdoctor-switch {
|
|
299
|
+
background: ${miscTheme.theme.colors.blue50};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.switch-label {
|
|
303
|
+
display: flex;
|
|
304
|
+
align-items: center;
|
|
305
|
+
}
|
|
306
|
+
.mantine-Switch-labelWrapper {
|
|
307
|
+
flex-grow: 1;
|
|
308
|
+
}
|
|
309
|
+
.mantine-Checkbox-body {
|
|
310
|
+
display: flex;
|
|
311
|
+
width: 100%;
|
|
312
|
+
align-items: center;
|
|
313
|
+
justify-content: space-between;
|
|
314
|
+
}
|
|
315
|
+
.mantine-Switch-track {
|
|
316
|
+
margin-bottom: 0;
|
|
317
|
+
}
|
|
318
|
+
.label-txt {
|
|
319
|
+
font-weight: normal;
|
|
320
|
+
font-size: 14px;
|
|
321
|
+
color: ${miscTheme.theme.colors.gray800};
|
|
322
|
+
margin-left: 14px;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
`;
|
|
326
|
+
const StylePostAction = styled__default["default"].div `
|
|
327
|
+
display: flex;
|
|
328
|
+
gap: 12px;
|
|
329
|
+
.avatar {
|
|
330
|
+
width: 40px;
|
|
331
|
+
height: 40px;
|
|
332
|
+
border-radius: 100%;
|
|
333
|
+
|
|
334
|
+
img {
|
|
335
|
+
border-radius: 100%;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.author-avatar {
|
|
339
|
+
.col-left {
|
|
340
|
+
display: none;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.post-action-form {
|
|
346
|
+
display: flex;
|
|
347
|
+
flex-direction: column;
|
|
348
|
+
gap: 4px;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.post-action-by {
|
|
352
|
+
color: ${miscTheme.theme.colors.gray800};
|
|
353
|
+
font-size: 16px;
|
|
354
|
+
font-weight: 600;
|
|
355
|
+
line-height: 24px;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.post-action-result {
|
|
359
|
+
display: flex;
|
|
360
|
+
position: relative;
|
|
361
|
+
&:after {
|
|
362
|
+
content: '';
|
|
363
|
+
display: inline-block;
|
|
364
|
+
width: 5px;
|
|
365
|
+
height: 5px;
|
|
366
|
+
background-color: ${miscTheme.theme.colors.error};
|
|
367
|
+
border-radius: 100%;
|
|
368
|
+
position: absolute;
|
|
369
|
+
right: 7px;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.dropdown-post-action {
|
|
374
|
+
background: ${miscTheme.theme.colors.white} !important;
|
|
375
|
+
border-radius: 2px;
|
|
376
|
+
border: 1px solid ${miscTheme.theme.colors.neutral200} !important;
|
|
377
|
+
|
|
378
|
+
> div {
|
|
379
|
+
padding: 3px 8px;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
span {
|
|
383
|
+
flex: 1;
|
|
384
|
+
color: ${miscTheme.theme.colors.gray600};
|
|
385
|
+
font-size: 12px;
|
|
386
|
+
font-weight: 600;
|
|
387
|
+
line-height: 18px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
ul {
|
|
391
|
+
width: 130px;
|
|
392
|
+
li {
|
|
393
|
+
img {
|
|
394
|
+
flex: 0 0 16px;
|
|
395
|
+
width: 16px;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
`;
|
|
401
|
+
const StyleSessionRow = styled__default["default"].div `
|
|
402
|
+
display: inline-flex;
|
|
403
|
+
gap: 8px;
|
|
404
|
+
align-items: center;
|
|
405
|
+
cursor: pointer;
|
|
406
|
+
|
|
407
|
+
.session-title {
|
|
408
|
+
color: ${miscTheme.theme.colors.gray700};
|
|
409
|
+
font-size: 14px;
|
|
410
|
+
font-weight: 400;
|
|
411
|
+
line-height: 22px;
|
|
412
|
+
flex: 1;
|
|
413
|
+
}
|
|
414
|
+
`;
|
|
415
|
+
|
|
416
|
+
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";
|
|
417
|
+
var IconAnonymous = img$5;
|
|
418
|
+
|
|
419
|
+
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";
|
|
420
|
+
var IconPublic = img$4;
|
|
421
|
+
|
|
422
|
+
styled__default["default"].div `
|
|
423
|
+
background-color: white;
|
|
424
|
+
z-index: 1000;
|
|
425
|
+
top: 0;
|
|
426
|
+
left: 0;
|
|
427
|
+
height: 100%;
|
|
428
|
+
position: absolute;
|
|
429
|
+
width: 100%;
|
|
430
|
+
|
|
431
|
+
.drawer-header {
|
|
432
|
+
display: flex;
|
|
433
|
+
gap: 12px;
|
|
434
|
+
align-items: center;
|
|
435
|
+
padding: 12px 16px;
|
|
436
|
+
border-bottom: 1px solid ${miscTheme.theme.colors.gray200};
|
|
437
|
+
|
|
438
|
+
.input-group-label {
|
|
439
|
+
flex: 1;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
img {
|
|
443
|
+
cursor: pointer;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
p {
|
|
447
|
+
flex: 1;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.drawer-content {
|
|
452
|
+
padding: 16px;
|
|
453
|
+
display: flex;
|
|
454
|
+
flex-direction: column;
|
|
455
|
+
gap: 16px;
|
|
456
|
+
overflow-y: auto;
|
|
457
|
+
height: calc(100% - 49px);
|
|
458
|
+
|
|
459
|
+
.input-field-label {
|
|
460
|
+
margin-bottom: 8px;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
&.drawer-content-full-screen {
|
|
464
|
+
max-width: 680px;
|
|
465
|
+
margin: 0 auto;
|
|
466
|
+
padding: 16px 24px;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
`;
|
|
470
|
+
const StyleCommunityReivew = styled__default["default"].div `
|
|
471
|
+
display: flex;
|
|
472
|
+
flex-direction: column;
|
|
473
|
+
gap: 8px;
|
|
474
|
+
margin-top: 8px;
|
|
475
|
+
|
|
476
|
+
.topic-review {
|
|
477
|
+
display: flex;
|
|
478
|
+
gap: 4px;
|
|
479
|
+
flex-wrap: wrap;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.community-review {
|
|
483
|
+
.tag-item {
|
|
484
|
+
background-color: ${miscTheme.theme.colors.neutral50};
|
|
485
|
+
|
|
486
|
+
img {
|
|
487
|
+
border-radius: 50%;
|
|
488
|
+
margin-right: 8px;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
`;
|
|
493
|
+
|
|
494
|
+
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";
|
|
495
|
+
var IconCommunity = img$3;
|
|
496
|
+
|
|
497
|
+
const PostCommunityReview = ({ selectedTopics, currentCommunity }) => {
|
|
498
|
+
return (React__default["default"].createElement(StyleCommunityReivew, null,
|
|
499
|
+
React__default["default"].createElement("div", { className: "community-review" },
|
|
500
|
+
React__default["default"].createElement(index$1.Button, { skipHover: true, size: "md", radius: "xl", className: "tag-item", variant: "tertiary" },
|
|
501
|
+
React__default["default"].createElement(index$2.Text, { size: "p4", as: "span", color: "inherit" }, currentCommunity.name))),
|
|
502
|
+
React__default["default"].createElement("div", { className: "topic-review" }, selectedTopics.map((topic) => {
|
|
503
|
+
return (React__default["default"].createElement(index$1.Button, { skipHover: true, size: "sm", radius: "xl", className: "tag-item", key: topic.id, variant: "tertiary" },
|
|
504
|
+
React__default["default"].createElement(index$2.Text, { size: "p4", as: "span", color: "inherit" }, topic.name)));
|
|
505
|
+
}))));
|
|
506
|
+
};
|
|
507
|
+
const CreatePostCommunity = ({ communitiesList, currentCommunity, selectedTopics, forceTopics, communityValue,
|
|
508
|
+
// error,
|
|
509
|
+
isFullscreen, isInEditMode, setSelectedTopics, setCommunityValue, removeKeyError, }) => {
|
|
510
|
+
const { t } = index.useTranslations();
|
|
511
|
+
const props = {
|
|
512
|
+
communitiesList,
|
|
513
|
+
currentCommunity,
|
|
514
|
+
selectedTopics,
|
|
515
|
+
communityValue,
|
|
516
|
+
isFullscreen,
|
|
517
|
+
isInEditMode,
|
|
518
|
+
forceTopics,
|
|
519
|
+
setSelectedTopics,
|
|
520
|
+
setCommunityValue,
|
|
521
|
+
removeKeyError,
|
|
522
|
+
};
|
|
523
|
+
console.log(props);
|
|
524
|
+
return (React__default["default"].createElement("div", { className: "input-group" },
|
|
525
|
+
React__default["default"].createElement(StyleSessionRow, null,
|
|
526
|
+
React__default["default"].createElement("img", { alt: "anonymous-icon", src: IconCommunity, style: {
|
|
527
|
+
width: '18px',
|
|
528
|
+
height: '18px',
|
|
529
|
+
objectFit: 'contain',
|
|
530
|
+
marginLeft: 'auto',
|
|
531
|
+
} }),
|
|
532
|
+
React__default["default"].createElement("div", { className: "session-title" }, t('createPost.communityAndTopic'))),
|
|
533
|
+
React__default["default"].createElement(PostCommunityReview, { selectedTopics: selectedTopics, currentCommunity: currentCommunity })));
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
const CreatePostDescription = ({ className, style, bannedWords = [], value, onChange, onPreviewUrlChange, onInvalidUrlsChange,
|
|
537
|
+
// onImageFilesChange,
|
|
538
|
+
// imageFiles: imageFilesProp,
|
|
539
|
+
isReplying, footerEditor, }) => {
|
|
540
|
+
const { t } = index.useTranslations();
|
|
541
|
+
const [previewUrl, setPreviewUrl] = React.useState(null);
|
|
542
|
+
const imagePicker = React.useRef(null);
|
|
543
|
+
// const {
|
|
544
|
+
// onSelectImages,
|
|
545
|
+
// onRemoveImage,
|
|
546
|
+
// imageSrcs,
|
|
547
|
+
// // imageFiles,
|
|
548
|
+
// } = useImagePicker(imageFilesProp, onImageFilesChange)
|
|
549
|
+
React.useEffect(() => {
|
|
550
|
+
if (onPreviewUrlChange) {
|
|
551
|
+
if (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url)
|
|
552
|
+
onPreviewUrlChange({
|
|
553
|
+
title: previewUrl.title || '',
|
|
554
|
+
url: previewUrl.url || '',
|
|
555
|
+
image: previewUrl.image || '',
|
|
556
|
+
description: previewUrl.description || '',
|
|
557
|
+
});
|
|
558
|
+
else
|
|
559
|
+
onPreviewUrlChange(null);
|
|
560
|
+
}
|
|
561
|
+
}, [previewUrl]);
|
|
562
|
+
return (React__default["default"].createElement(togetherRichTextEditor.StyledCreatePostDescription, { className: className, style: style },
|
|
563
|
+
React__default["default"].createElement(index$2.Text, { size: "p4", className: "description-label" }, t('createPost.popup.description')),
|
|
564
|
+
React__default["default"].createElement("div", { className: `textarea-control` },
|
|
565
|
+
React__default["default"].createElement("div", { className: "textarea-wrapper" },
|
|
566
|
+
React__default["default"].createElement(togetherRichTextEditor.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 }))),
|
|
567
|
+
footerEditor,
|
|
568
|
+
React__default["default"].createElement(index$2.Text, { size: "p4", className: "count-string" },
|
|
569
|
+
t('character'),
|
|
570
|
+
": ",
|
|
571
|
+
innertext__default["default"](value || '').length)));
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
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";
|
|
575
|
+
var IconPhone = img$2;
|
|
576
|
+
|
|
577
|
+
const CreatePostPhotos = ({ imageFiles: imageFilesInit, setImageFiles, }) => {
|
|
578
|
+
const imageRef = React.useRef(null);
|
|
579
|
+
const { t } = index.useTranslations();
|
|
580
|
+
const { onSelectImages } = index$3.useImagePicker(imageFilesInit, setImageFiles);
|
|
581
|
+
const handleClick = () => {
|
|
582
|
+
var _a;
|
|
583
|
+
(_a = imageRef === null || imageRef === void 0 ? void 0 : imageRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
584
|
+
};
|
|
585
|
+
return (React__default["default"].createElement("div", { className: "input-group" },
|
|
586
|
+
React__default["default"].createElement(StyleSessionRow, { onClick: handleClick },
|
|
587
|
+
React__default["default"].createElement("img", { alt: "anonymous-icon", src: IconPhone, style: {
|
|
588
|
+
width: '18px',
|
|
589
|
+
height: '18px',
|
|
590
|
+
objectFit: 'contain',
|
|
591
|
+
marginLeft: 'auto',
|
|
592
|
+
} }),
|
|
593
|
+
React__default["default"].createElement("div", { className: "session-title" }, t('createPost.photos'))),
|
|
594
|
+
React__default["default"].createElement("input", { ref: imageRef, type: "file", accept: "image/png, image/gif, image/jpeg", multiple: true, style: { display: 'none' }, onChange: (e) => onSelectImages(e) })));
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
const StyledCreatePostTitle = styled__default["default"].div `
|
|
598
|
+
input:focus,
|
|
599
|
+
textarea:focus,
|
|
600
|
+
[contenteditable='true'] {
|
|
601
|
+
outline: none;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.title-input {
|
|
605
|
+
overflow: hidden;
|
|
606
|
+
width: 100%;
|
|
607
|
+
padding: 12px 16px;
|
|
608
|
+
border: solid 1px #d9d9d9;
|
|
609
|
+
border-radius: ${miscTheme.theme.borderRadius};
|
|
610
|
+
font-size: 16px;
|
|
611
|
+
line-height: 1.2;
|
|
612
|
+
white-space: nowrap;
|
|
613
|
+
:focus {
|
|
614
|
+
border-color: ${miscTheme.theme.colors.primaryBase};
|
|
615
|
+
box-shadow: 0px 0px 2px 2px ${miscTheme.theme.colors.primary200};
|
|
616
|
+
}
|
|
617
|
+
br {
|
|
618
|
+
display: none;
|
|
619
|
+
}
|
|
620
|
+
* {
|
|
621
|
+
display: inline;
|
|
622
|
+
white-space: nowrap;
|
|
623
|
+
}
|
|
624
|
+
mocka {
|
|
625
|
+
padding: 2px 6px;
|
|
626
|
+
border-radius: 1rem;
|
|
627
|
+
&[data-error='true'] {
|
|
628
|
+
background-color: #ffeeee;
|
|
629
|
+
color: red;
|
|
630
|
+
text-decoration: underline;
|
|
631
|
+
font-style: bold;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
ol,
|
|
635
|
+
ul {
|
|
636
|
+
padding-left: 1rem;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
label {
|
|
641
|
+
display: block;
|
|
642
|
+
margin-bottom: 5px;
|
|
643
|
+
color: ${miscTheme.theme.colors.gray600};
|
|
644
|
+
font-size: 13px;
|
|
645
|
+
font-weight: bold;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.count-string {
|
|
649
|
+
margin-top: 5px;
|
|
650
|
+
color: ${miscTheme.theme.colors.gray500};
|
|
651
|
+
font-size: 11px;
|
|
652
|
+
text-align: right;
|
|
653
|
+
}
|
|
654
|
+
`;
|
|
655
|
+
|
|
656
|
+
const TITLE_LIMIT = 120;
|
|
657
|
+
const inputModify$1 = (value, opts) => {
|
|
658
|
+
if (!opts)
|
|
659
|
+
return value;
|
|
660
|
+
const { limit, bannedWords = [] } = opts;
|
|
661
|
+
const shorten = typeof limit === 'number' && limit >= 0 ? value.substring(0, limit) : value;
|
|
662
|
+
const processedValue = post.highlightBadWords(shorten, bannedWords);
|
|
663
|
+
return processedValue;
|
|
664
|
+
};
|
|
665
|
+
const CreatePostTitle = ({ className, style, bannedWords = [], value, onChange, }) => {
|
|
666
|
+
var _a;
|
|
667
|
+
const { t } = index.useTranslations();
|
|
668
|
+
const [titleValue, setTitleValue] = React.useState('');
|
|
669
|
+
const titleRef = React.useRef(null);
|
|
670
|
+
React.useEffect(() => {
|
|
671
|
+
if (titleRef.current) {
|
|
672
|
+
const pasteHandler = (e) => {
|
|
673
|
+
var _a;
|
|
674
|
+
e.preventDefault();
|
|
675
|
+
const text = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/plain');
|
|
676
|
+
document.execCommand('insertHTML', false, text);
|
|
677
|
+
};
|
|
678
|
+
const contentDiv = titleRef.current;
|
|
679
|
+
contentDiv.addEventListener('paste', pasteHandler, {
|
|
680
|
+
passive: true,
|
|
681
|
+
});
|
|
682
|
+
return () => contentDiv.removeEventListener('paste', pasteHandler);
|
|
683
|
+
}
|
|
684
|
+
}, [titleRef]);
|
|
685
|
+
const bannedString = (bannedWords === null || bannedWords === void 0 ? void 0 : bannedWords.join(',')) || '';
|
|
686
|
+
React.useEffect(() => {
|
|
687
|
+
var _a;
|
|
688
|
+
if (bannedString) {
|
|
689
|
+
const titleText = (_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText;
|
|
690
|
+
if (titleText) {
|
|
691
|
+
const titleValueWithBanned = post.highlightBadWords(titleText, bannedWords);
|
|
692
|
+
if (titleValueWithBanned !== titleText) {
|
|
693
|
+
onChange && onChange(titleValueWithBanned);
|
|
694
|
+
setTitleValue(titleValueWithBanned);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}, [bannedString]);
|
|
699
|
+
const debounceInputModify = React.useCallback(debounce__default["default"](() => {
|
|
700
|
+
if (titleRef.current) {
|
|
701
|
+
const shortenString = inputModify$1(titleRef.current.innerText, {
|
|
702
|
+
limit: TITLE_LIMIT,
|
|
703
|
+
bannedWords,
|
|
704
|
+
});
|
|
705
|
+
onChange && onChange(shortenString);
|
|
706
|
+
setTitleValue(shortenString);
|
|
707
|
+
}
|
|
708
|
+
}, 300), []);
|
|
709
|
+
React.useEffect(() => {
|
|
710
|
+
setTimeout(() => {
|
|
711
|
+
var _a;
|
|
712
|
+
(_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
713
|
+
}, 500);
|
|
714
|
+
}, []);
|
|
715
|
+
return (React__default["default"].createElement(StyledCreatePostTitle, { className: className, style: style },
|
|
716
|
+
React__default["default"].createElement(index$4.Input, { name: "title", value: value || titleValue, size: "md", label: t('createPost.title'), CustomInput: React__default["default"].createElement(ContentEditable__default["default"], { innerRef: titleRef, html: value || titleValue, onChange: () => {
|
|
717
|
+
if (titleRef.current &&
|
|
718
|
+
titleRef.current.innerText !== (value || titleValue)) {
|
|
719
|
+
const initialValue = inputModify$1(titleRef.current.innerText, {
|
|
720
|
+
bannedWords,
|
|
721
|
+
});
|
|
722
|
+
onChange && onChange(initialValue);
|
|
723
|
+
setTitleValue(initialValue);
|
|
724
|
+
debounceInputModify();
|
|
725
|
+
}
|
|
726
|
+
}, className: "title-input" }) }),
|
|
727
|
+
React__default["default"].createElement(index$2.Text, { size: "p4", className: "count-string" }, t('createPost.popup.wordCount', {
|
|
728
|
+
count: ((_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText.length) || 0,
|
|
729
|
+
max: TITLE_LIMIT,
|
|
730
|
+
}))));
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
const StyledPopupFrame = styled__default["default"](index$3.PopupFrame) `
|
|
734
|
+
& > div[data-open]:first-child {
|
|
735
|
+
z-index: 1000;
|
|
736
|
+
height: auto;
|
|
737
|
+
max-width: 448px;
|
|
738
|
+
}
|
|
739
|
+
.custom-media-dialog {
|
|
740
|
+
padding: 1rem;
|
|
741
|
+
.image-gallery {
|
|
742
|
+
display: none;
|
|
743
|
+
.image-item {
|
|
744
|
+
&.no-image {
|
|
745
|
+
cursor: pointer;
|
|
746
|
+
}
|
|
747
|
+
.camera-btn {
|
|
748
|
+
position: absolute;
|
|
749
|
+
top: calc(100% - 32px);
|
|
750
|
+
right: 8px;
|
|
751
|
+
left: unset;
|
|
752
|
+
width: 24px;
|
|
753
|
+
height: 24px;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
.custom-media-add-btn {
|
|
758
|
+
margin-left: auto;
|
|
759
|
+
display: block;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
`;
|
|
763
|
+
const StyledInput = styled__default["default"](index$5.Input) `
|
|
764
|
+
margin-bottom: 10px;
|
|
765
|
+
`;
|
|
766
|
+
const StyleWrapperInfo = styled__default["default"].div `
|
|
767
|
+
display: flex;
|
|
768
|
+
gap: 4px;
|
|
769
|
+
align-items: flex-start;
|
|
770
|
+
margin-bottom: 14px;
|
|
771
|
+
|
|
772
|
+
img {
|
|
773
|
+
margin-top: 2px;
|
|
774
|
+
}
|
|
775
|
+
`;
|
|
776
|
+
|
|
777
|
+
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";
|
|
778
|
+
var IconInfo = img$1;
|
|
779
|
+
|
|
780
|
+
const SocialLinkPopup = ({ isOpen, onClose, onSocialLinkChanged, socialLinkData, }) => {
|
|
781
|
+
const { t } = index.useTranslations();
|
|
782
|
+
const imagePickerRef = React.useRef(null);
|
|
783
|
+
const [socialLink, setSocialLinkUrl] = React.useState('');
|
|
784
|
+
const { onSelectImages, onRemoveImage, imageSrcs, imageFiles } = index$3.useImagePicker();
|
|
785
|
+
React.useEffect(() => {
|
|
786
|
+
if (isOpen) {
|
|
787
|
+
setSocialLinkUrl((socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) || '');
|
|
788
|
+
}
|
|
789
|
+
}, [isOpen]);
|
|
790
|
+
const isAcceptedLink = socialLink.includes('youtu.be') ||
|
|
791
|
+
socialLink.includes('youtube.com') ||
|
|
792
|
+
socialLink.includes('facebook.com') ||
|
|
793
|
+
socialLink.includes('fb.watch') ||
|
|
794
|
+
socialLink.includes('tiktok.com');
|
|
795
|
+
const isValid = !!socialLink && isAcceptedLink;
|
|
796
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
797
|
+
React__default["default"].createElement("input", { ref: imagePickerRef, type: "file", accept: "image/png, image/gif, image/jpeg", style: { display: 'none' }, onChange: onSelectImages }),
|
|
798
|
+
React__default["default"].createElement(StyledPopupFrame, { isOpen: isOpen, onClose: onClose, heading: "Insert", style: {
|
|
799
|
+
zIndex: 3,
|
|
800
|
+
} },
|
|
801
|
+
React__default["default"].createElement("div", { className: "custom-media-dialog", onClick: (e) => e.stopPropagation() },
|
|
802
|
+
React__default["default"].createElement(StyledInput, { size: "md", name: "custom-media-url", placeholder: "URL", value: socialLink, onChange: (v) => setSocialLinkUrl(v), label: "" }),
|
|
803
|
+
React__default["default"].createElement(StyleWrapperInfo, null,
|
|
804
|
+
React__default["default"].createElement("img", { src: IconInfo, alt: "" }),
|
|
805
|
+
React__default["default"].createElement(index$2.Text, { size: "c2", color: "#737373" }, t('editor.addSocialLink.warningDomain'))),
|
|
806
|
+
!imageSrcs[0] ? (React__default["default"].createElement("div", { className: "image-gallery" },
|
|
807
|
+
React__default["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["default"].createElement("div", { className: "image-gallery" },
|
|
808
|
+
React__default["default"].createElement("div", { className: "image-item" },
|
|
809
|
+
React__default["default"].createElement("img", { src: imageSrcs[0], alt: "" }),
|
|
810
|
+
React__default["default"].createElement("img", { className: "close-btn", alt: "", onClick: () => onRemoveImage(0) })))),
|
|
811
|
+
React__default["default"].createElement(index$1.Button, { color: "primary", size: "md", variant: "primary", type: "button", className: "custom-media-add-btn", onClick: (e) => {
|
|
812
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
813
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
814
|
+
if (isValid) {
|
|
815
|
+
onSocialLinkChanged === null || onSocialLinkChanged === void 0 ? void 0 : onSocialLinkChanged({
|
|
816
|
+
url: !socialLink.includes('http')
|
|
817
|
+
? 'https://' + socialLink
|
|
818
|
+
: socialLink,
|
|
819
|
+
banner: imageFiles[0],
|
|
820
|
+
});
|
|
821
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
822
|
+
}
|
|
823
|
+
}, disabled: !isValid }, t('editor.addSocialLink.addLink'))))));
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
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";
|
|
827
|
+
var IconVideo = img;
|
|
828
|
+
|
|
829
|
+
const CreatePostVideo = ({ socialLinkData, setSocialLinkData, }) => {
|
|
830
|
+
const { t } = index.useTranslations();
|
|
831
|
+
const [activeModal, setActiveModal] = React.useState(false);
|
|
832
|
+
const handleClick = () => {
|
|
833
|
+
setActiveModal(true);
|
|
834
|
+
};
|
|
835
|
+
return (React__default["default"].createElement("div", { className: "input-group" },
|
|
836
|
+
React__default["default"].createElement(StyleSessionRow, { onClick: handleClick },
|
|
837
|
+
React__default["default"].createElement("img", { alt: "anonymous-icon", src: IconVideo, style: {
|
|
838
|
+
width: '18px',
|
|
839
|
+
height: '18px',
|
|
840
|
+
objectFit: 'contain',
|
|
841
|
+
marginLeft: 'auto',
|
|
842
|
+
} }),
|
|
843
|
+
React__default["default"].createElement("div", { className: "session-title" }, t('createPost.videoOrLink'))),
|
|
844
|
+
React__default["default"].createElement(SocialLinkPopup, { isOpen: activeModal, onClose: () => setActiveModal(false), onSocialLinkChanged: setSocialLinkData, socialLinkData: socialLinkData })));
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
const StyleReviewPhoto = styled__default["default"].div `
|
|
848
|
+
.mantine-Text-root {
|
|
849
|
+
margin-bottom: 4px;
|
|
850
|
+
}
|
|
851
|
+
.preview-images-container {
|
|
852
|
+
display: flex;
|
|
853
|
+
gap: 8px;
|
|
854
|
+
overflow-x: auto;
|
|
855
|
+
overflow-y: hidden;
|
|
856
|
+
.image-src-wrapper {
|
|
857
|
+
flex: 0 0 140px;
|
|
858
|
+
width: 140px;
|
|
859
|
+
height: 96px;
|
|
860
|
+
border-radius: 4px;
|
|
861
|
+
position: relative;
|
|
862
|
+
img {
|
|
863
|
+
border-radius: 4px;
|
|
864
|
+
}
|
|
865
|
+
.icon-close {
|
|
866
|
+
position: absolute;
|
|
867
|
+
top: 6px;
|
|
868
|
+
right: 6px;
|
|
869
|
+
cursor: pointer;
|
|
870
|
+
z-index: 10;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
`;
|
|
875
|
+
|
|
876
|
+
const PostPhotosReview = ({ error, imageFiles: imageFilesInit, setImageFiles, removeKeyError, }) => {
|
|
877
|
+
const { t } = index.useTranslations();
|
|
878
|
+
const { imageSrcs, onRemoveImage } = index$3.useImagePicker(imageFilesInit, setImageFiles);
|
|
879
|
+
return (React__default["default"].createElement(StyleReviewPhoto, { className: "input-group" },
|
|
880
|
+
React__default["default"].createElement(index$2.Text, { size: "p5", weight: "semiBold" }, t('createPost.photos')),
|
|
881
|
+
React__default["default"].createElement("div", { className: "preview-images-container" }, imageSrcs === null || imageSrcs === void 0 ? void 0 : imageSrcs.map((src, index) => {
|
|
882
|
+
return (React__default["default"].createElement("div", { className: "image-src-wrapper", key: index },
|
|
883
|
+
React__default["default"].createElement("img", { src: src, className: "preview-image", alt: "", style: {
|
|
884
|
+
width: '100%',
|
|
885
|
+
height: '100%',
|
|
886
|
+
objectFit: 'cover',
|
|
887
|
+
} }),
|
|
888
|
+
React__default["default"].createElement("img", { alt: "", className: "icon-close", src: index$3.IconCloseCircle, onClick: () => {
|
|
889
|
+
removeKeyError && removeKeyError('photos');
|
|
890
|
+
onRemoveImage(index);
|
|
891
|
+
} })));
|
|
892
|
+
})),
|
|
893
|
+
error && (error === null || error === void 0 ? void 0 : error.photos) && (React__default["default"].createElement(StyledError, null,
|
|
894
|
+
React__default["default"].createElement(index$2.Text, { size: "p5", color: miscTheme.theme.colors.red600 }, error.photos)))));
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
const inputModify = (value, opts) => {
|
|
898
|
+
var _a;
|
|
899
|
+
const { formatUrl, bannedWords = [] } = opts || {};
|
|
900
|
+
const removedFormat = post.fixMalformedMention(post.removeFontFormat(value));
|
|
901
|
+
if (!formatUrl)
|
|
902
|
+
return {
|
|
903
|
+
value: post.highlightBadWords(removedFormat, bannedWords),
|
|
904
|
+
};
|
|
905
|
+
let descriptionWithWrappedAnchor = post.removeEdittedBannedWord(post.wrapAnchorAroundUrls(removedFormat));
|
|
906
|
+
const urls = post.getUrlsFromEditorString(removedFormat);
|
|
907
|
+
if (urls) {
|
|
908
|
+
const invalidUrls = [];
|
|
909
|
+
let previewUrl = '';
|
|
910
|
+
urls.forEach((url) => {
|
|
911
|
+
if (!url)
|
|
912
|
+
return;
|
|
913
|
+
try {
|
|
914
|
+
const jsUrl = new URL(url);
|
|
915
|
+
// Check url has must into domain hellohealthgroup
|
|
916
|
+
if (!post.ALLOW_DOMAIN_URL.some((o) => jsUrl.origin.endsWith(o))) {
|
|
917
|
+
invalidUrls.push('notification.limitUrlDomain');
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
// Check url have special character
|
|
921
|
+
if (url.endsWith('&')) {
|
|
922
|
+
invalidUrls.push('notification.urlWrongFormat');
|
|
923
|
+
return;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
catch (_a) {
|
|
927
|
+
invalidUrls.push(url);
|
|
928
|
+
}
|
|
929
|
+
});
|
|
930
|
+
if (invalidUrls.length > 0) {
|
|
931
|
+
descriptionWithWrappedAnchor = descriptionWithWrappedAnchor
|
|
932
|
+
.replace(new RegExp(`data-url="true">(${invalidUrls.map(post.escapeRegExp).join('|')})<`, 'gi'), 'data-error="true" data-url="true">$1<')
|
|
933
|
+
.replace(new RegExp(`data-href="(${invalidUrls
|
|
934
|
+
.map(post.escapeRegExp)
|
|
935
|
+
.join('|')})" data-url="true">`, 'gi'), 'data-href="$1" data-error="true" data-url="true">');
|
|
936
|
+
}
|
|
937
|
+
previewUrl = (_a = urls.filter((u) => invalidUrls.indexOf(u) === -1)) === null || _a === void 0 ? void 0 : _a[0];
|
|
938
|
+
return {
|
|
939
|
+
invalidUrls,
|
|
940
|
+
previewUrl,
|
|
941
|
+
value: post.highlightBadWords(descriptionWithWrappedAnchor, bannedWords),
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
return {
|
|
945
|
+
value: post.highlightBadWords(descriptionWithWrappedAnchor, bannedWords),
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
const usePreviewUrl = (bannedWords, onChange) => {
|
|
949
|
+
const { data: { locale }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
950
|
+
const [previewUrl, setPreviewUrl] = React.useState(null);
|
|
951
|
+
const bannedWordsRef = React.useRef([]);
|
|
952
|
+
bannedWordsRef.current = bannedWords;
|
|
953
|
+
const fetchPreviewData = (url) => {
|
|
954
|
+
if (!previewUrl || previewUrl.url !== url) {
|
|
955
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl({
|
|
956
|
+
url,
|
|
957
|
+
isFetching: true,
|
|
958
|
+
});
|
|
959
|
+
togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.FETCH_PREVIEW, {
|
|
960
|
+
_locale: locale,
|
|
961
|
+
}), 'POST', {
|
|
962
|
+
data: {
|
|
963
|
+
link: url,
|
|
964
|
+
},
|
|
965
|
+
headers: {
|
|
966
|
+
'Content-Type': 'application/json',
|
|
967
|
+
},
|
|
968
|
+
})
|
|
969
|
+
.then((res) => {
|
|
970
|
+
var _a, _b, _c, _d;
|
|
971
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl({
|
|
972
|
+
title: (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.title,
|
|
973
|
+
description: (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.description,
|
|
974
|
+
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),
|
|
975
|
+
url,
|
|
976
|
+
});
|
|
977
|
+
})
|
|
978
|
+
.catch(() => {
|
|
979
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
};
|
|
983
|
+
const fetchPreviewDataRef = React.useRef(fetchPreviewData);
|
|
984
|
+
fetchPreviewDataRef.current = fetchPreviewData;
|
|
985
|
+
const [invalidUrls, setInvalidUrls] = React.useState([]);
|
|
986
|
+
const debounceInputModify = React.useCallback(debounce__default["default"]((v) => {
|
|
987
|
+
if (v) {
|
|
988
|
+
const processedInput = inputModify(v, {
|
|
989
|
+
bannedWords: bannedWordsRef.current,
|
|
990
|
+
formatUrl: true,
|
|
991
|
+
});
|
|
992
|
+
const { invalidUrls: _invalidUrls, previewUrl: _previewUrl, value, } = processedInput;
|
|
993
|
+
if (_invalidUrls && (_invalidUrls === null || _invalidUrls === void 0 ? void 0 : _invalidUrls.length)) {
|
|
994
|
+
setInvalidUrls(_invalidUrls);
|
|
995
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
|
|
996
|
+
}
|
|
997
|
+
else {
|
|
998
|
+
setInvalidUrls([]);
|
|
999
|
+
if (_previewUrl) {
|
|
1000
|
+
fetchPreviewDataRef.current(_previewUrl);
|
|
1001
|
+
}
|
|
1002
|
+
else
|
|
1003
|
+
setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
|
|
1004
|
+
if (value !== v) {
|
|
1005
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}, 500), []);
|
|
1010
|
+
return {
|
|
1011
|
+
previewUrl,
|
|
1012
|
+
setPreviewUrl,
|
|
1013
|
+
invalidUrls,
|
|
1014
|
+
debounceInputModify,
|
|
1015
|
+
fetchPreviewData,
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1019
|
+
const StyleReviewVideo = styled__default["default"].div `
|
|
1020
|
+
.link-preview-wrapper {
|
|
1021
|
+
position: relative;
|
|
1022
|
+
.icon-close {
|
|
1023
|
+
position: absolute;
|
|
1024
|
+
top: 6px;
|
|
1025
|
+
right: 6px;
|
|
1026
|
+
cursor: pointer;
|
|
1027
|
+
z-index: 10;
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
.mantine-Text-root {
|
|
1031
|
+
margin-bottom: 4px;
|
|
1032
|
+
}
|
|
1033
|
+
`;
|
|
1034
|
+
|
|
1035
|
+
const PostVideoReview = ({ socialLinkData, bannedWords, onChange, onInvalidUrlsChange, onSocialLinkChanged, }) => {
|
|
1036
|
+
const { t } = index.useTranslations();
|
|
1037
|
+
const { invalidUrls, previewUrl, fetchPreviewData, setPreviewUrl } = usePreviewUrl(bannedWords || [], onChange);
|
|
1038
|
+
React.useEffect(() => {
|
|
1039
|
+
if (socialLinkData && socialLinkData.url) {
|
|
1040
|
+
fetchPreviewData(socialLinkData.url);
|
|
1041
|
+
}
|
|
1042
|
+
}, [socialLinkData, fetchPreviewData]);
|
|
1043
|
+
React.useEffect(() => {
|
|
1044
|
+
if (invalidUrls) {
|
|
1045
|
+
onInvalidUrlsChange === null || onInvalidUrlsChange === void 0 ? void 0 : onInvalidUrlsChange(invalidUrls);
|
|
1046
|
+
}
|
|
1047
|
+
}, [invalidUrls]);
|
|
1048
|
+
return (React__default["default"].createElement(StyleReviewVideo, { className: "input-group" },
|
|
1049
|
+
React__default["default"].createElement(index$2.Text, { size: "p5", weight: "semiBold" }, t('createPost.video')),
|
|
1050
|
+
React__default["default"].createElement("div", { className: "link-preview-wrapper" }, (socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) && previewUrl && (React__default["default"].createElement("div", { className: "link-preview-wrapper" }, previewUrl.isFetching ? (React__default["default"].createElement(index$6.Loading, null)) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1051
|
+
React__default["default"].createElement(index$7.CardLink, { title: previewUrl.title, url: previewUrl.url || '#', image: previewUrl.image, noRefetch: true }),
|
|
1052
|
+
React__default["default"].createElement("img", { alt: "", src: index$3.IconCloseCircle, className: "icon-close", onClick: () => {
|
|
1053
|
+
setPreviewUrl(null);
|
|
1054
|
+
onSocialLinkChanged && onSocialLinkChanged(null);
|
|
1055
|
+
} }))))))));
|
|
1056
|
+
};
|
|
1057
|
+
|
|
1058
|
+
const MAX_SIZE_FILE_UPLOAD = 10 * 1024 * 1024;
|
|
1059
|
+
const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose, communities = [], forceSelectCommunity, forceSelectTopics, articleId, optionalTopic, editPostData, defaultCommunity, defaultTopics, selectAskDoctor, showAskDoctorOptions, userInfo, }) => {
|
|
1060
|
+
const isInEditMode = !!(editPostData === null || editPostData === void 0 ? void 0 : editPostData.id);
|
|
1061
|
+
const { data: { locale, router, env: { togetherBasePath }, }, action: { pushNotifications, sanitizeFunction }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
1062
|
+
const { asPath } = router || {};
|
|
1063
|
+
const { t } = index.useTranslations();
|
|
1064
|
+
// const [isAnonymous, setIsAnonymous] = useState<boolean>(false)
|
|
1065
|
+
const [isAskDoctor, setIsAskDoctor] = React.useState(selectAskDoctor);
|
|
1066
|
+
const [specialCharErr, setspecialCharErr] = React.useState(false);
|
|
1067
|
+
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
1068
|
+
const [titleValue, setTitleValue] = React.useState('');
|
|
1069
|
+
const [descriptionValue, setDescriptionValue] = React.useState('');
|
|
1070
|
+
const [communityValue, setCommunityValue] = React.useState(forceSelectCommunity
|
|
1071
|
+
? {
|
|
1072
|
+
label: forceSelectCommunity.name,
|
|
1073
|
+
value: `${forceSelectCommunity.id || ''}-${forceSelectCommunity.mappedCategoryId || ''}`,
|
|
1074
|
+
}
|
|
1075
|
+
: {
|
|
1076
|
+
label: t('community.choose'),
|
|
1077
|
+
value: '',
|
|
1078
|
+
});
|
|
1079
|
+
const [selectedTopics, setSelectedTopics] = React.useState([...forceSelectTopics] || []);
|
|
1080
|
+
const [socialLinkData, setSocialLinkData] = React.useState();
|
|
1081
|
+
const [error, setError] = React.useState({});
|
|
1082
|
+
const [imageFiles, setImageFiles] = React.useState([]);
|
|
1083
|
+
const [bannedWords, setBannedWords] = React.useState([]);
|
|
1084
|
+
const [postActionValue, setPostActionValue] = React.useState({
|
|
1085
|
+
label: t('cardPost.public'),
|
|
1086
|
+
value: 'public',
|
|
1087
|
+
});
|
|
1088
|
+
const { imageSrcs = [] } = index$3.useImagePicker(imageFiles);
|
|
1089
|
+
const currentCommunity = forceSelectCommunity ||
|
|
1090
|
+
communities.find((c) => `${c.id || ''}-${c.mappedCategoryId || ''}` === communityValue.value);
|
|
1091
|
+
const communitiesList = forceSelectCommunity
|
|
1092
|
+
? [forceSelectCommunity]
|
|
1093
|
+
: communities
|
|
1094
|
+
.filter((c) => c.isActive)
|
|
1095
|
+
.sort((a, b) => {
|
|
1096
|
+
if (a.name > b.name)
|
|
1097
|
+
return 1;
|
|
1098
|
+
if (a.name < b.name)
|
|
1099
|
+
return -1;
|
|
1100
|
+
return 0;
|
|
1101
|
+
});
|
|
1102
|
+
const [previewUrl, setPreviewUrl] = React.useState(null);
|
|
1103
|
+
const [invalidUrls, setInvalidUrls] = React.useState([]);
|
|
1104
|
+
const isReadyToSubmit = titleValue &&
|
|
1105
|
+
!specialCharErr &&
|
|
1106
|
+
innertext__default["default"](descriptionValue) &&
|
|
1107
|
+
(optionalTopic || (!optionalTopic && selectedTopics.length > 0)) &&
|
|
1108
|
+
currentCommunity &&
|
|
1109
|
+
(!imageFiles || imageFiles.length <= constants.MAX_IMAGE_UPLOADS) &&
|
|
1110
|
+
!(invalidUrls === null || invalidUrls === void 0 ? void 0 : invalidUrls.length) &&
|
|
1111
|
+
!isSubmitting;
|
|
1112
|
+
const postActionType = [
|
|
1113
|
+
{
|
|
1114
|
+
label: t('cardPost.public'),
|
|
1115
|
+
value: 'public',
|
|
1116
|
+
icon: (React__default["default"].createElement("img", { alt: "anonymous-icon", src: IconPublic, style: {
|
|
1117
|
+
width: '100%',
|
|
1118
|
+
height: '100%',
|
|
1119
|
+
objectFit: 'contain',
|
|
1120
|
+
marginLeft: 'auto',
|
|
1121
|
+
} })),
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
label: t('cardPost.anonymous'),
|
|
1125
|
+
value: 'anonymous',
|
|
1126
|
+
icon: (React__default["default"].createElement("img", { alt: "anonymous-icon", src: IconAnonymous, style: {
|
|
1127
|
+
width: '100%',
|
|
1128
|
+
height: '100%',
|
|
1129
|
+
objectFit: 'contain',
|
|
1130
|
+
marginLeft: 'auto',
|
|
1131
|
+
} })),
|
|
1132
|
+
},
|
|
1133
|
+
];
|
|
1134
|
+
// HANDLE etra action when OPEN AND CLOSE
|
|
1135
|
+
React.useEffect(() => {
|
|
1136
|
+
if (editPostData) {
|
|
1137
|
+
const post$1 = editPostData;
|
|
1138
|
+
setTitleValue(post$1.title || '');
|
|
1139
|
+
setDescriptionValue(post.decodeMention(post.decodePostUrl(post$1.description || '', 'edit'), post$1.mentions));
|
|
1140
|
+
setCommunityValue({
|
|
1141
|
+
label: post$1.community.name,
|
|
1142
|
+
value: `${post$1.community.id || ''}-${post$1.community.mappedCategoryId || ''}`,
|
|
1143
|
+
});
|
|
1144
|
+
setSelectedTopics(post$1.topics || []);
|
|
1145
|
+
setImageFiles(post$1.photos || []);
|
|
1146
|
+
// setIsAnonymous(!!post.isAnonymous || false)
|
|
1147
|
+
setIsAskDoctor(!!post$1.isAskDoctor || false);
|
|
1148
|
+
}
|
|
1149
|
+
else {
|
|
1150
|
+
if (defaultCommunity) {
|
|
1151
|
+
setCommunityValue({
|
|
1152
|
+
label: defaultCommunity.name,
|
|
1153
|
+
value: `${defaultCommunity.id || ''}-${defaultCommunity.mappedCategoryId || ''}`,
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
if (defaultTopics) {
|
|
1157
|
+
setSelectedTopics(defaultTopics);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}, []);
|
|
1161
|
+
React.useEffect(() => {
|
|
1162
|
+
setspecialCharErr(titleValue !== '' && !/[a-zA-Z]/.test(titleValue));
|
|
1163
|
+
setError({});
|
|
1164
|
+
}, [titleValue]);
|
|
1165
|
+
const onCreateEditSuccess = (res) => {
|
|
1166
|
+
if (onPostCreatedEdited) {
|
|
1167
|
+
onPostCreatedEdited(dataTransform.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__default["default"](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 = tslib_es6.__rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
|
1227
|
+
setError(rest);
|
|
1228
|
+
console.log(value);
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
const submitPost = () => tslib_es6.__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 index$3.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 index$3.editPost({
|
|
1257
|
+
id: editPostData.id,
|
|
1258
|
+
formData: bodyFormData,
|
|
1259
|
+
locale,
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
else {
|
|
1264
|
+
res = yield index$3.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["default"].createElement(StyledCreateNewPost, { className: `${className} create-post-popup-frame`, style: style },
|
|
1313
|
+
React__default["default"].createElement("div", { className: "input-group-container" },
|
|
1314
|
+
React__default["default"].createElement(StyledFormGroupInner, null,
|
|
1315
|
+
React__default["default"].createElement("div", { className: "input-group" },
|
|
1316
|
+
React__default["default"].createElement(StylePostAction, null,
|
|
1317
|
+
React__default["default"].createElement("div", { className: "avatar" }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) ? (React__default["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["default"].createElement(togetherMoleculesCardAuthor.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["default"].createElement("div", { className: "post-action-form" },
|
|
1324
|
+
React__default["default"].createElement("div", { className: "post-action-by" }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || ''),
|
|
1325
|
+
React__default["default"].createElement(index$8.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["default"].createElement("div", { className: "post-action-result" }, postActionValue.value === 'public' ? (React__default["default"].createElement("img", { alt: "public-icon", src: IconPublic, style: {
|
|
1331
|
+
width: '100%',
|
|
1332
|
+
height: '100%',
|
|
1333
|
+
objectFit: 'contain',
|
|
1334
|
+
marginLeft: 'auto',
|
|
1335
|
+
} })) : (React__default["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["default"].createElement(CreatePostTitle, { className: "input-group", bannedWords: bannedWords, value: titleValue, onChange: setTitleValue }),
|
|
1345
|
+
specialCharErr && (React__default["default"].createElement(StyledError, null,
|
|
1346
|
+
React__default["default"].createElement(other.Info, { isSolid: true, color: miscTheme.theme.colors.red700, size: 14 }),
|
|
1347
|
+
React__default["default"].createElement(index$2.Text, { size: "p3", as: "span", color: miscTheme.theme.colors.red700 }, t('createPost.popup.specialCharErr')))),
|
|
1348
|
+
React__default["default"].createElement("div", { className: "input-group" },
|
|
1349
|
+
React__default["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["default"].createElement(React__default["default"].Fragment, null,
|
|
1353
|
+
showAskDoctorOptions && (React__default["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["default"].createElement("div", { className: "switch-label" },
|
|
1355
|
+
React__default["default"].createElement(Ask, { size: 24 }),
|
|
1356
|
+
React__default["default"].createElement("div", { className: "wrapper-text" },
|
|
1357
|
+
React__default["default"].createElement("div", { className: "label-txt" }, t('createPost.askDoctor')),
|
|
1358
|
+
React__default["default"].createElement("div", { className: "description-txt" }, t('createPost.askDoctor.description')))),
|
|
1359
|
+
React__default["default"].createElement(index$9.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: togetherComponentGlobalContext.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["default"].createElement(StyledError, { style: { margin: '4px 0 0' } },
|
|
1378
|
+
React__default["default"].createElement(index$2.Text, { size: "p5", as: "span", color: miscTheme.theme.colors.red600 }, error.askDoctor))),
|
|
1379
|
+
error && (error === null || error === void 0 ? void 0 : error.description) && (React__default["default"].createElement(StyledError, { style: { margin: '4px 0 0' } },
|
|
1380
|
+
React__default["default"].createElement(index$2.Text, { size: "p5", as: "span", color: miscTheme.theme.colors.red600 }, error.description)))) })),
|
|
1381
|
+
imageSrcs.length > 0 && (React__default["default"].createElement(PostPhotosReview, { imageFiles: imageFiles, error: error, setImageFiles: setImageFiles, removeKeyError: removeKeyError })),
|
|
1382
|
+
socialLinkData && (React__default["default"].createElement(PostVideoReview, { bannedWords: bannedWords, socialLinkData: socialLinkData, onSocialLinkChanged: setSocialLinkData, onInvalidUrlsChange: setInvalidUrls, onChange: (v) => {
|
|
1383
|
+
setDescriptionValue(v);
|
|
1384
|
+
} })),
|
|
1385
|
+
React__default["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["default"].createElement(CreatePostPhotos, { imageFiles: imageFiles, setImageFiles: (data) => {
|
|
1387
|
+
setImageFiles(data);
|
|
1388
|
+
validationUploadPhoto(data);
|
|
1389
|
+
} }),
|
|
1390
|
+
React__default["default"].createElement(CreatePostVideo, { socialLinkData: socialLinkData, setSocialLinkData: setSocialLinkData }))),
|
|
1391
|
+
React__default["default"].createElement("div", { className: "form-action" },
|
|
1392
|
+
React__default["default"].createElement("div", { className: "input-group" },
|
|
1393
|
+
React__default["default"].createElement(index$1.Button, { className: "submit-btn pointer-event-child-none", size: "lg", "data-event-category": "Ask Doctor", "data-event-action": "Submit Question", "data-event-label": window.location.href, onClick: () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
1394
|
+
if (isReadyToSubmit && !isSubmitting) {
|
|
1395
|
+
setIsSubmitting(true);
|
|
1396
|
+
try {
|
|
1397
|
+
yield submitPost();
|
|
1398
|
+
}
|
|
1399
|
+
catch (e) {
|
|
1400
|
+
console.error(e);
|
|
1401
|
+
pushNotifications(index$3.getDefaultFailNoti(t));
|
|
1402
|
+
}
|
|
1403
|
+
setIsSubmitting(false);
|
|
1404
|
+
}
|
|
1405
|
+
}), disabled: !isReadyToSubmit, loading: isSubmitting }, t('createPost.popup.submit'))))));
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
const StyledTopicSelectList = styled__default["default"].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 ${miscTheme.theme.colors.neutral100};
|
|
1418
|
+
margin-right: 1rem;
|
|
1419
|
+
margin-bottom: 8px;
|
|
1420
|
+
border-radius: 1rem;
|
|
1421
|
+
color: ${miscTheme.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: ${miscTheme.theme.colors.primary50};
|
|
1429
|
+
background: ${miscTheme.theme.colors.primary50};
|
|
1430
|
+
color: ${miscTheme.theme.colors.primaryBase};
|
|
1431
|
+
}
|
|
1432
|
+
&[data-disabled='true'] {
|
|
1433
|
+
background: ${miscTheme.theme.colors.gray100};
|
|
1434
|
+
color: ${miscTheme.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 }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
1461
|
+
const [topics, setTopics] = React.useState(topicsProp ? [...topicsProp] : []);
|
|
1462
|
+
const [selectedTopics, setSelectedTopics] = React.useState(selectedTopicsProp ? [...selectedTopicsProp] : []);
|
|
1463
|
+
const [isLoadingTopics, setIsLoadingTopics] = React.useState(false);
|
|
1464
|
+
const topicsPropRef = React.useRef(topicsProp);
|
|
1465
|
+
topicsPropRef.current = topicsProp;
|
|
1466
|
+
React.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
|
+
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
1472
|
+
var _b;
|
|
1473
|
+
try {
|
|
1474
|
+
const res = yield togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getApiPath(togetherApiPaths.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(dataTransform.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
|
+
React.useEffect(() => {
|
|
1495
|
+
if (topicsProp &&
|
|
1496
|
+
typeof topicsPropString !== 'undefined' &&
|
|
1497
|
+
topicsPropString !== topicsStateString) {
|
|
1498
|
+
setTopics(topicsProp);
|
|
1499
|
+
}
|
|
1500
|
+
}, [topicsProp, topicsPropString, topicsStateString]);
|
|
1501
|
+
const topicsWithoutForced = React.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["default"].createElement(StyledTopicSelectList, { "data-is-marrybaby": isMarryBaby, className: className, style: style },
|
|
1505
|
+
forceTopics.map((topic) => (React__default["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["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["default"].createElement(togetherMoleculesCardAuthor.Loading, { className: "topic-spinner" })));
|
|
1528
|
+
};
|
|
1529
|
+
const TopicItem = (_a) => {
|
|
1530
|
+
var { topic, disabled, selected, onClick } = _a, rest = tslib_es6.__rest(_a, ["topic", "disabled", "selected", "onClick"]);
|
|
1531
|
+
return (React__default["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 = tslib_es6.__rest(_a, ["post", "onSkip", "btnText", "currentPageUrl"]);
|
|
1538
|
+
const { t } = index.useTranslations();
|
|
1539
|
+
const { data: { locale }, action: { pushNotifications }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
1540
|
+
const [showAlert, setShowAlert] = React.useState(false);
|
|
1541
|
+
const [loading, setLoading] = React.useState(false);
|
|
1542
|
+
const _theme = core.useMantineTheme();
|
|
1543
|
+
const handleSkip = React.useCallback(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
1544
|
+
var _b;
|
|
1545
|
+
setLoading(true);
|
|
1546
|
+
const res = yield togetherComponentGlobalContext.callApiWithAuth(togetherComponentGlobalContext.getApiPath(togetherApiPaths.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["default"].createElement(core.Popover, { width: 327, withArrow: true, shadow: "md", opened: showAlert },
|
|
1569
|
+
React__default["default"].createElement(core.Popover.Target, null,
|
|
1570
|
+
React__default["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["default"].createElement(core.Popover.Dropdown, null,
|
|
1572
|
+
React__default["default"].createElement("div", null,
|
|
1573
|
+
React__default["default"].createElement("div", { className: styles.alertHeading }, t('profilePanel.skipQuestion.heading')),
|
|
1574
|
+
React__default["default"].createElement("div", { className: styles.alertDesc }, t('profilePanel.skipQuestion.content')),
|
|
1575
|
+
React__default["default"].createElement("div", { className: styles.alertAction },
|
|
1576
|
+
React__default["default"].createElement(index$1.Button, { size: "md", variant: "secondary", leftIcon: React__default["default"].createElement(core$1.Close, { color: _theme.fn.primaryColor(), size: 24 }), onClick: () => setShowAlert(false), styles: () => ({
|
|
1577
|
+
leftIcon: {
|
|
1578
|
+
marginRight: 0,
|
|
1579
|
+
},
|
|
1580
|
+
}) }),
|
|
1581
|
+
React__default["default"].createElement(index$1.Button, { variant: "primary", size: "md", leftIcon: React__default["default"].createElement(core$1.Check, { color: 'white', size: 24 }), onClick: handleSkip, loading: loading, "data-event-category": "Together", "data-event-action": "Unclear Question Click", "data-event-label": currentPageUrl, styles: () => ({
|
|
1582
|
+
leftIcon: {
|
|
1583
|
+
marginRight: 0,
|
|
1584
|
+
},
|
|
1585
|
+
}) }))))));
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1588
|
+
exports.CreateNewPostContent = CreateNewPostContent;
|
|
1589
|
+
exports.CreatePostDescription = CreatePostDescription;
|
|
1590
|
+
exports.CreatePostTitle = CreatePostTitle;
|
|
1591
|
+
exports.SkipQuestionOfExpertBtn = SkipQuestionOfExpertBtn;
|
|
1592
|
+
exports.TopicSelectList = TopicSelectList;
|