@hhgtech/hhg-components 1.29.332-beta-9 → 1.29.332-beta-11

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.
Files changed (549) hide show
  1. package/build/{LastPeriod-7daf5d99.js → LastPeriod-f7675a4c.js} +1 -1
  2. package/build/{MobileBottomNavigationIcon-2b66613f.js → MobileBottomNavigationIcon-acf5432f.js} +3 -3
  3. package/build/{Spinner-cde7d18f.js → Spinner-6b2a4af0.js} +1 -1
  4. package/build/{WhatsApp-2daf65a7.js → WhatsApp-ccee36b9.js} +1 -1
  5. package/build/adapters.js +19 -19
  6. package/build/atoms.js +46 -46
  7. package/build/babyGrowth.js +83 -83
  8. package/build/cache.js +2 -2
  9. package/build/care.js +17 -17
  10. package/build/careBookingSearchBar.js +14 -14
  11. package/build/careBookingSearchBarV2.js +15 -15
  12. package/build/components.js +90 -90
  13. package/build/{constants-5b7ecf5c.js → constants-fb2bac42.js} +1 -1
  14. package/build/constants.js +3 -3
  15. package/build/constantsDomainLocales.js +1 -1
  16. package/build/constantsRiskScreener.js +2 -2
  17. package/build/constantsSite.js +2 -2
  18. package/build/{core-02686407.js → core-755482e3.js} +1 -1
  19. package/build/{dataTransform-d2b09e0f.js → dataTransform-0c2530cb.js} +1 -1
  20. package/build/ecom.js +4 -4
  21. package/build/{editor-071c917e.js → editor-1b7f4cb1.js} +12 -11
  22. package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
  23. package/build/embeddedHeathToolCards_babyPoop.js +19 -19
  24. package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
  25. package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
  26. package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
  27. package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  28. package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  29. package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
  30. package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
  31. package/build/esm/{LastPeriod-61e2acb7.js → LastPeriod-7967dc4c.js} +1 -1
  32. package/build/esm/{MobileBottomNavigationIcon-058bb723.js → MobileBottomNavigationIcon-9e696fda.js} +3 -3
  33. package/build/esm/{Spinner-5811672e.js → Spinner-41231aa0.js} +1 -1
  34. package/build/esm/{WhatsApp-a2f02ef4.js → WhatsApp-fb4b7d48.js} +1 -1
  35. package/build/esm/adapters.js +19 -19
  36. package/build/esm/atoms.js +46 -46
  37. package/build/esm/babyGrowth.js +83 -83
  38. package/build/esm/cache.js +2 -2
  39. package/build/esm/care.js +17 -17
  40. package/build/esm/careBookingSearchBar.js +14 -14
  41. package/build/esm/careBookingSearchBarV2.js +15 -15
  42. package/build/esm/components.js +90 -90
  43. package/build/esm/{constants-e99ae5ef.js → constants-5b231c69.js} +1 -1
  44. package/build/esm/constants.js +3 -3
  45. package/build/esm/constantsDomainLocales.js +1 -1
  46. package/build/esm/constantsRiskScreener.js +2 -2
  47. package/build/esm/constantsSite.js +2 -2
  48. package/build/esm/{core-4fcd11fb.js → core-531435b5.js} +1 -1
  49. package/build/esm/{dataTransform-ad84bf44.js → dataTransform-cbfccb61.js} +1 -1
  50. package/build/esm/ecom.js +4 -4
  51. package/build/esm/{editor-d1bb7972.js → editor-7e462cf0.js} +12 -12
  52. package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
  53. package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
  54. package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
  55. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
  56. package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
  57. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  58. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  59. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
  60. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
  61. package/build/esm/footer.js +21 -21
  62. package/build/esm/gAssets.js +2 -2
  63. package/build/esm/healthToolsCardWrapper.js +18 -18
  64. package/build/esm/healthToolsForm.js +33 -33
  65. package/build/esm/hooks.js +13 -13
  66. package/build/esm/i18n/translationKeys.d.ts +1 -1
  67. package/build/esm/i18n-values/en-PH.js +8 -1
  68. package/build/esm/i18n-values/hi-IN.js +8 -1
  69. package/build/esm/i18n-values/id-ID.js +8 -1
  70. package/build/esm/i18n-values/km-KH.js +8 -1
  71. package/build/esm/i18n-values/ms-MY.js +8 -1
  72. package/build/esm/i18n-values/my-MM.js +8 -1
  73. package/build/esm/i18n-values/th-TH.js +8 -1
  74. package/build/esm/i18n-values/tl-PH.js +7 -0
  75. package/build/esm/i18n-values/vi-VN.js +9 -2
  76. package/build/esm/i18n-values/vi-VN_MB.js +9 -2
  77. package/build/esm/i18n-values/zh-TW.js +8 -1
  78. package/build/esm/i18n.js +2 -2
  79. package/build/esm/i18nV2.js +2 -2
  80. package/build/esm/{index-a2fcd284.js → index-0380f2e6.js} +1 -1
  81. package/build/esm/{index-0514ce32.js → index-059cfa74.js} +7 -7
  82. package/build/esm/{index-0a085a1f.js → index-0a0bc1bf.js} +2 -2
  83. package/build/esm/{index-ef0887d7.js → index-0a3b65a9.js} +21 -21
  84. package/build/esm/{index-fa2305b2.js → index-11d4a6bb.js} +30 -30
  85. package/build/esm/{index-5b54b46d.js → index-14d0ccea.js} +3 -3
  86. package/build/esm/{index-5fd39bd1.js → index-1cbf08f6.js} +4 -4
  87. package/build/esm/{index-a7591e2a.js → index-1e7d5f26.js} +3 -3
  88. package/build/esm/{index-b72932e4.js → index-243bdfe8.js} +2 -2
  89. package/build/esm/{index-471bff40.js → index-2ecd3639.js} +3 -3
  90. package/build/esm/{index-4b981d7b.js → index-31dc15a7.js} +6 -6
  91. package/build/esm/{index-e1f94097.js → index-324d0f62.js} +17 -17
  92. package/build/esm/{index-e5dfe29b.js → index-35854868.js} +2 -2
  93. package/build/esm/{index-a09d15df.js → index-368d77b2.js} +11 -11
  94. package/build/esm/{index-a032ee3e.js → index-3a1ef34f.js} +7 -7
  95. package/build/esm/{index-d53edbc9.js → index-3f305782.js} +2 -2
  96. package/build/esm/{index-a4d7c5c2.js → index-40bc7df6.js} +13 -13
  97. package/build/esm/{index-cea59887.js → index-49849712.js} +13 -13
  98. package/build/esm/{index-6e4681ff.js → index-4a5bd664.js} +16 -16
  99. package/build/esm/{index-9faaab94.js → index-4b2d8815.js} +2 -2
  100. package/build/esm/{index-755497e5.js → index-5083fc00.js} +18 -24
  101. package/build/esm/{index-5b6b3f05.js → index-524c611d.js} +10 -10
  102. package/build/esm/{index-64947051.js → index-53450fbd.js} +16 -16
  103. package/build/esm/{index-7f8de431.js → index-5856deda.js} +2 -2
  104. package/build/esm/{index-5ad4119c.js → index-5f360bed.js} +16 -16
  105. package/build/esm/{index-48fbb74f.js → index-60df582b.js} +3 -3
  106. package/build/esm/{index-4b8cc126.js → index-62006413.js} +2 -2
  107. package/build/esm/{index-c5d6c055.js → index-63b7a592.js} +1 -1
  108. package/build/esm/{index-beab22ed.js → index-6cd5719c.js} +15 -15
  109. package/build/esm/{index-c2535d68.js → index-815b3fd3.js} +10 -10
  110. package/build/esm/{index-df766caf.js → index-8256947e.js} +3 -3
  111. package/build/esm/{index-33d49a31.js → index-8f8607ef.js} +6 -6
  112. package/build/esm/{index-c625f19a.js → index-8fdeab44.js} +15 -15
  113. package/build/esm/{index-c337faa6.js → index-956c505c.js} +32 -32
  114. package/build/esm/{index-e3d08f60.js → index-97c7c39b.js} +1 -1
  115. package/build/esm/{index-ca8d9128.js → index-9df98b57.js} +1 -1
  116. package/build/esm/{index-2007b9e0.js → index-a21b01f2.js} +5 -5
  117. package/build/esm/{index-b8d0d481.js → index-a4ccfa71.js} +2 -2
  118. package/build/esm/{index-ba3d1bcc.js → index-a8b61592.js} +3 -3
  119. package/build/esm/{index-0698f9a5.js → index-a92455de.js} +1 -1
  120. package/build/esm/{index-26fc8146.js → index-ace49d58.js} +16 -16
  121. package/build/esm/{index-09b7ca10.js → index-b06c1827.js} +3 -3
  122. package/build/esm/index-b0e58910.js +3961 -0
  123. package/build/esm/{index-7520e10e.js → index-b4b8ce4d.js} +13 -13
  124. package/build/esm/{index-58052a3a.js → index-bff99474.js} +1 -1
  125. package/build/esm/{index-aff433a3.js → index-c24614c8.js} +2 -2
  126. package/build/esm/{index-c43fd33b.js → index-c7baf68d.js} +18 -18
  127. package/build/esm/{index-47eb0b6f.js → index-c8406d9a.js} +1 -1
  128. package/build/esm/{index-6b03522a.js → index-d6e7471c.js} +24 -24
  129. package/build/esm/{index-6446d243.js → index-da9bc065.js} +6 -6
  130. package/build/esm/{index-a03c2d78.js → index-dcf0a7e3.js} +2 -2
  131. package/build/esm/{index-337323d3.js → index-dd7efe6a.js} +5 -5
  132. package/build/esm/{index-8c02ca88.js → index-df69e34d.js} +17 -17
  133. package/build/esm/{index-f09ff303.js → index-e30d30b5.js} +13 -13
  134. package/build/esm/{index-f455d515.js → index-e99637c5.js} +24 -24
  135. package/build/esm/{index-fdf4e371.js → index-ee38b2a0.js} +17 -17
  136. package/build/esm/{index-35a0cefb.js → index-f5027e94.js} +1 -1
  137. package/build/esm/{index-c297547c.js → index-f5454220.js} +20 -20
  138. package/build/esm/{index-de93555e.js → index-f6ef13f1.js} +1 -1
  139. package/build/esm/{index-533d87ce.js → index-f75fcf1b.js} +2 -2
  140. package/build/esm/{index-7d65d07c.js → index-fe697af0.js} +2 -2
  141. package/build/esm/index.js +112 -112
  142. package/build/esm/{labelSorting-f9aa4d77.js → labelSorting-a85fc423.js} +4 -4
  143. package/build/esm/lead.js +24 -24
  144. package/build/esm/{logoIcon-a1022cf6.js → logoIcon-4a5fffa7.js} +2 -2
  145. package/build/esm/mantine.js +25 -25
  146. package/build/esm/misc.js +16 -16
  147. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  148. package/build/esm/miscGetSocialList.js +8 -8
  149. package/build/esm/miscScreenSizeContext.js +1 -1
  150. package/build/esm/mobileBottomNavigation.js +5 -5
  151. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  152. package/build/esm/molecules.js +69 -69
  153. package/build/esm/moleculesArticleCard.js +6 -6
  154. package/build/esm/moleculesArticleCardV2.js +16 -16
  155. package/build/esm/navigation.js +40 -40
  156. package/build/esm/navigationLogoutPopup.js +9 -9
  157. package/build/esm/navigationProfileButton.js +23 -23
  158. package/build/esm/onboardingV2.js +29 -29
  159. package/build/esm/organisms.js +44 -44
  160. package/build/esm/{post-ff84e1cc.js → post-75785bfa.js} +3 -3
  161. package/build/esm/profileNavigation.js +19 -19
  162. package/build/esm/progressBar.js +1 -1
  163. package/build/esm/pwg.js +22 -22
  164. package/build/esm/ssoV2.js +27 -27
  165. package/build/esm/{store-54a49969.js → store-6ad704d4.js} +4 -4
  166. package/build/esm/subot.js +33 -33
  167. package/build/esm/surveyOrPremiumBanner.js +31 -31
  168. package/build/esm/surveyQuestionCard.js +10 -10
  169. package/build/esm/{surveyThankyouCard-ed11070a.js → surveyThankyouCard-0f826dbc.js} +5 -5
  170. package/build/esm/together/api/paths.d.ts +2 -0
  171. package/build/esm/together/api/utils.d.ts +3 -0
  172. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.d.ts +7 -0
  173. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.styled.d.ts +5 -0
  174. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.d.ts +15 -0
  175. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.styled.d.ts +13 -0
  176. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.d.ts +31 -0
  177. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styled.d.ts +9 -0
  178. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styles.d.ts +12 -0
  179. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.d.ts +11 -0
  180. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.styled.d.ts +17 -0
  181. package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/editor.d.ts +20 -0
  182. package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/index.d.ts +20 -0
  183. package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/index.styled.d.ts +9 -0
  184. package/build/esm/together/components/molecules/createNewPostContentV2/createPostPhotos/index.d.ts +7 -0
  185. package/build/esm/together/components/molecules/createNewPostContentV2/createPostTitle/index.d.ts +10 -0
  186. package/build/esm/together/components/molecules/createNewPostContentV2/createPostTitle/index.styled.d.ts +12 -0
  187. package/build/esm/together/components/molecules/createNewPostContentV2/index.d.ts +27 -0
  188. package/build/esm/together/components/molecules/createNewPostContentV2/index.styled.d.ts +33 -0
  189. package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.d.ts +10 -0
  190. package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styled.d.ts +5 -0
  191. package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styles.d.ts +12 -0
  192. package/build/esm/together/components/molecules/createNewPostContentV2/topicSelectList/index.d.ts +16 -0
  193. package/build/esm/together/components/molecules/createNewPostContentV2/topicSelectList/index.styled.d.ts +5 -0
  194. package/build/esm/together/components/molecules/createNewPostContentV2/type.d.ts +4 -0
  195. package/build/esm/together/components/molecules/createNewPostContentV2/types.d.ts +14 -0
  196. package/build/esm/together/components/molecules/index.d.ts +1 -0
  197. package/build/esm/together/togetherComponentGlobalContext.d.ts +1 -0
  198. package/build/esm/together.js +53 -53
  199. package/build/esm/togetherApiPaths.js +4 -2
  200. package/build/esm/togetherApiUtils.js +4 -4
  201. package/build/esm/togetherAtoms.js +30 -30
  202. package/build/esm/togetherComponentGlobalContext.js +4 -4
  203. package/build/esm/togetherMolecules.js +48 -48
  204. package/build/esm/togetherMoleculesCardAuthor.js +27 -27
  205. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  206. package/build/esm/togetherMoleculesProfileDetail.js +37 -37
  207. package/build/esm/togetherOrganisms.js +47 -47
  208. package/build/esm/togetherRichTextEditor.js +17 -17
  209. package/build/esm/togetherShareBox.js +11 -26
  210. package/build/esm/{treePopoverMenu-92c30887.js → treePopoverMenu-7287c1cc.js} +19 -19
  211. package/build/esm/{types-f1926833.js → types-3bbd115d.js} +2 -2
  212. package/build/esm/types.js +2 -2
  213. package/build/esm/{useCategory-066eea42.js → useCategory-6bde85b5.js} +5 -5
  214. package/build/esm/{useHealthToolCache-52af05fd.js → useHealthToolCache-f38448be.js} +1 -1
  215. package/build/esm/{useMantineLocale-70c5b5ba.js → useMantineLocale-23c2090e.js} +6 -6
  216. package/build/esm/{usePlacesAutocomplete-751ce32e.js → usePlacesAutocomplete-bb2fcccb.js} +1 -1
  217. package/build/esm/{useScreenSize-00a6d109.js → useScreenSize-0c7f9376.js} +2 -2
  218. package/build/esm/useTogetherAuthRequiredAction.js +9 -9
  219. package/build/esm/{utils-4bf5671b.js → utils-c3f2f203.js} +2 -2
  220. package/build/esm/{utils-5fcba9d5.js → utils-c671b808.js} +13 -4
  221. package/build/esm/{utils-f3da0e39.js → utils-f7f1390a.js} +2 -2
  222. package/build/esm/vaccination.js +21 -21
  223. package/build/footer.js +21 -21
  224. package/build/gAssets.js +2 -2
  225. package/build/healthToolsCardWrapper.js +18 -18
  226. package/build/healthToolsForm.js +33 -33
  227. package/build/hooks.js +13 -13
  228. package/build/i18n/translationKeys.d.ts +1 -1
  229. package/build/i18n-values/en-PH.js +8 -1
  230. package/build/i18n-values/hi-IN.js +8 -1
  231. package/build/i18n-values/id-ID.js +8 -1
  232. package/build/i18n-values/km-KH.js +8 -1
  233. package/build/i18n-values/ms-MY.js +8 -1
  234. package/build/i18n-values/my-MM.js +8 -1
  235. package/build/i18n-values/th-TH.js +8 -1
  236. package/build/i18n-values/tl-PH.js +7 -0
  237. package/build/i18n-values/vi-VN.js +9 -2
  238. package/build/i18n-values/vi-VN_MB.js +9 -2
  239. package/build/i18n-values/zh-TW.js +8 -1
  240. package/build/i18n.js +1 -1
  241. package/build/i18nV2.js +1 -1
  242. package/build/{index-7e998c37.js → index-05e389b0.js} +2 -2
  243. package/build/{index-a8fb9264.js → index-07683098.js} +6 -6
  244. package/build/{index-2c94b7f6.js → index-0fd0fe8f.js} +1 -1
  245. package/build/{index-0f02fdc3.js → index-14104315.js} +1 -1
  246. package/build/{index-098161ee.js → index-145d886b.js} +15 -15
  247. package/build/{index-6ebc2c9e.js → index-187a773b.js} +16 -16
  248. package/build/{index-b62a0a2f.js → index-1a3f129b.js} +2 -2
  249. package/build/{index-863c8f47.js → index-1e94c0a6.js} +24 -24
  250. package/build/{index-86876356.js → index-1f90039e.js} +2 -2
  251. package/build/{index-bab9ec2c.js → index-22d1e0e0.js} +4 -4
  252. package/build/{index-64d63b56.js → index-23243ca0.js} +30 -30
  253. package/build/{index-320f6abb.js → index-27b516f9.js} +2 -2
  254. package/build/{index-31fc6a7c.js → index-2922a83f.js} +2 -2
  255. package/build/{index-77d58636.js → index-2e7c6751.js} +18 -24
  256. package/build/{index-dbdcba37.js → index-343893ef.js} +24 -24
  257. package/build/{index-d0ea50e0.js → index-3529d7bb.js} +2 -2
  258. package/build/{index-b1129d60.js → index-3889a161.js} +5 -5
  259. package/build/{index-6d192a83.js → index-4f20dcd4.js} +5 -5
  260. package/build/{index-d7c01bde.js → index-51c72e5b.js} +32 -32
  261. package/build/{index-d0980314.js → index-526a6c5d.js} +17 -17
  262. package/build/{index-27510ba4.js → index-5ab2ddd7.js} +20 -20
  263. package/build/{index-3c3ee0d4.js → index-5fd97e2c.js} +21 -21
  264. package/build/{index-813c9ebd.js → index-6adf0279.js} +3 -3
  265. package/build/{index-ee723b93.js → index-6b85ce04.js} +1 -1
  266. package/build/{index-b68e243a.js → index-78eada3b.js} +16 -16
  267. package/build/{index-92801d44.js → index-7cb0ee24.js} +17 -17
  268. package/build/{index-6b1795a0.js → index-7da7afbe.js} +7 -7
  269. package/build/{index-fe9a9230.js → index-7f3d20b2.js} +3 -3
  270. package/build/{index-6ef78162.js → index-7fcf0436.js} +17 -17
  271. package/build/{index-75e5da2e.js → index-8025fa76.js} +1 -1
  272. package/build/{index-27ffb195.js → index-84d4d7c2.js} +2 -2
  273. package/build/{index-49277493.js → index-90cf004c.js} +1 -1
  274. package/build/{index-95fc2d5c.js → index-9116e66e.js} +3 -3
  275. package/build/{index-cc9390bc.js → index-917db768.js} +1 -1
  276. package/build/{index-785251f4.js → index-91b39121.js} +13 -13
  277. package/build/{index-665af378.js → index-937ed1b1.js} +18 -18
  278. package/build/{index-94d69766.js → index-96c3ff69.js} +6 -6
  279. package/build/{index-969ce075.js → index-970c4a9c.js} +13 -13
  280. package/build/{index-787af641.js → index-99d3e1a7.js} +3 -3
  281. package/build/index-9a27c5aa.js +3995 -0
  282. package/build/{index-762a13db.js → index-b2d37e1d.js} +13 -13
  283. package/build/{index-98a7537c.js → index-b81a4ebb.js} +13 -13
  284. package/build/{index-f7572c4a.js → index-c2716b70.js} +10 -10
  285. package/build/{index-d2a05382.js → index-c5174326.js} +2 -2
  286. package/build/{index-29be015d.js → index-c6ec06a1.js} +15 -15
  287. package/build/{index-9894733c.js → index-cc1f73b6.js} +3 -3
  288. package/build/{index-f6ac3713.js → index-ce6f9d02.js} +6 -6
  289. package/build/{index-61f76f2f.js → index-cf734351.js} +3 -3
  290. package/build/{index-4298a2e7.js → index-d032bf89.js} +10 -9
  291. package/build/{index-a48885c0.js → index-d8475e87.js} +2 -2
  292. package/build/{index-cc111a78.js → index-dfd4f4c9.js} +7 -7
  293. package/build/{index-684cd462.js → index-e1abdd1a.js} +3 -3
  294. package/build/{index-a03ed51a.js → index-e45dfb52.js} +2 -2
  295. package/build/{index-5dc8d608.js → index-e5a0f130.js} +11 -11
  296. package/build/{index-92022e27.js → index-e7617b7e.js} +1 -1
  297. package/build/{index-e398e367.js → index-e9f53b2d.js} +1 -1
  298. package/build/{index-69bfcd40.js → index-f06d7f6b.js} +1 -1
  299. package/build/{index-d95af9a6.js → index-f2e9c5ad.js} +16 -16
  300. package/build/{index-4a5afa2c.js → index-f302223f.js} +16 -16
  301. package/build/{index-ca4a0e8c.js → index-f766a23c.js} +2 -2
  302. package/build/{index-51d85310.js → index-fae4f302.js} +2 -2
  303. package/build/index.js +113 -112
  304. package/build/{labelSorting-ff74d73d.js → labelSorting-4d977e9a.js} +4 -4
  305. package/build/lead.js +24 -24
  306. package/build/{logoIcon-8e87ee06.js → logoIcon-c1012040.js} +2 -2
  307. package/build/mantine.js +22 -22
  308. package/build/misc.js +16 -16
  309. package/build/miscGetDynamicHealthTool.js +4 -4
  310. package/build/miscGetSocialList.js +8 -8
  311. package/build/miscScreenSizeContext.js +1 -1
  312. package/build/mobileBottomNavigation.js +5 -5
  313. package/build/mobileBottomNavigationIcon.js +5 -5
  314. package/build/molecules.js +69 -69
  315. package/build/moleculesArticleCard.js +6 -6
  316. package/build/moleculesArticleCardV2.js +16 -16
  317. package/build/navigation.js +40 -40
  318. package/build/navigationLogoutPopup.js +9 -9
  319. package/build/navigationProfileButton.js +23 -23
  320. package/build/onboardingV2.js +28 -28
  321. package/build/organisms.js +44 -44
  322. package/build/{post-04a7462b.js → post-be7956f8.js} +2 -2
  323. package/build/profileNavigation.js +19 -19
  324. package/build/progressBar.js +1 -1
  325. package/build/pwg.js +22 -22
  326. package/build/ssoV2.js +26 -26
  327. package/build/{store-2ae372f9.js → store-1a0d3c04.js} +4 -4
  328. package/build/subot.js +32 -32
  329. package/build/surveyOrPremiumBanner.js +31 -31
  330. package/build/surveyQuestionCard.js +10 -10
  331. package/build/{surveyThankyouCard-c7cefc26.js → surveyThankyouCard-1a1f28a0.js} +5 -5
  332. package/build/together/api/paths.d.ts +2 -0
  333. package/build/together/api/utils.d.ts +3 -0
  334. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.d.ts +7 -0
  335. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.styled.d.ts +5 -0
  336. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.d.ts +15 -0
  337. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.styled.d.ts +13 -0
  338. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.d.ts +31 -0
  339. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styled.d.ts +9 -0
  340. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styles.d.ts +12 -0
  341. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.d.ts +11 -0
  342. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.styled.d.ts +17 -0
  343. package/build/together/components/molecules/createNewPostContentV2/createPostDescription/editor.d.ts +20 -0
  344. package/build/together/components/molecules/createNewPostContentV2/createPostDescription/index.d.ts +20 -0
  345. package/build/together/components/molecules/createNewPostContentV2/createPostDescription/index.styled.d.ts +9 -0
  346. package/build/together/components/molecules/createNewPostContentV2/createPostPhotos/index.d.ts +7 -0
  347. package/build/together/components/molecules/createNewPostContentV2/createPostTitle/index.d.ts +10 -0
  348. package/build/together/components/molecules/createNewPostContentV2/createPostTitle/index.styled.d.ts +12 -0
  349. package/build/together/components/molecules/createNewPostContentV2/index.d.ts +27 -0
  350. package/build/together/components/molecules/createNewPostContentV2/index.styled.d.ts +33 -0
  351. package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.d.ts +10 -0
  352. package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styled.d.ts +5 -0
  353. package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styles.d.ts +12 -0
  354. package/build/together/components/molecules/createNewPostContentV2/topicSelectList/index.d.ts +16 -0
  355. package/build/together/components/molecules/createNewPostContentV2/topicSelectList/index.styled.d.ts +5 -0
  356. package/build/together/components/molecules/createNewPostContentV2/type.d.ts +4 -0
  357. package/build/together/components/molecules/createNewPostContentV2/types.d.ts +14 -0
  358. package/build/together/components/molecules/index.d.ts +1 -0
  359. package/build/together/togetherComponentGlobalContext.d.ts +1 -0
  360. package/build/together.js +54 -53
  361. package/build/togetherApiPaths.js +4 -2
  362. package/build/togetherApiUtils.js +5 -4
  363. package/build/togetherAtoms.js +30 -30
  364. package/build/togetherComponentGlobalContext.js +4 -4
  365. package/build/togetherMolecules.js +49 -48
  366. package/build/togetherMoleculesCardAuthor.js +27 -27
  367. package/build/togetherMoleculesPostImagePreview.js +11 -11
  368. package/build/togetherMoleculesProfileDetail.js +37 -37
  369. package/build/togetherOrganisms.js +47 -47
  370. package/build/togetherRichTextEditor.js +17 -17
  371. package/build/togetherShareBox.js +11 -26
  372. package/build/{treePopoverMenu-efb92a13.js → treePopoverMenu-6f076a9b.js} +19 -19
  373. package/build/{types-1cb25886.js → types-ad03664a.js} +2 -2
  374. package/build/types.js +2 -2
  375. package/build/{useCategory-e108e34d.js → useCategory-26ab9950.js} +5 -5
  376. package/build/{useHealthToolCache-0e9c7143.js → useHealthToolCache-d45757c6.js} +1 -1
  377. package/build/{useMantineLocale-6a6a3532.js → useMantineLocale-001e819a.js} +6 -6
  378. package/build/{usePlacesAutocomplete-04e34548.js → usePlacesAutocomplete-e26d99ad.js} +1 -1
  379. package/build/{useScreenSize-d69e7ea0.js → useScreenSize-170f507a.js} +2 -2
  380. package/build/useTogetherAuthRequiredAction.js +9 -9
  381. package/build/{utils-e4d7a80c.js → utils-865ff999.js} +13 -3
  382. package/build/{utils-98aee497.js → utils-dbe6a27e.js} +2 -2
  383. package/build/{utils-ebd370a3.js → utils-f42ab58d.js} +2 -2
  384. package/build/vaccination.js +21 -21
  385. package/package.json +1 -1
  386. package/build/esm/index-e82bd10b.js +0 -1533
  387. package/build/index-b8148397.js +0 -1547
  388. /package/build/{BMI_BOYS.percentile.monthly-42e42bbc.js → BMI_BOYS.percentile.monthly-e7fd800e.js} +0 -0
  389. /package/build/{BMI_BOYS.percentile.weekly-d3e79702.js → BMI_BOYS.percentile.weekly-6f1f1151.js} +0 -0
  390. /package/build/{BMI_BOYS.percentile.yearly-bcd8ac41.js → BMI_BOYS.percentile.yearly-72800c2e.js} +0 -0
  391. /package/build/{BMI_BOYS.zscore.monthly-3b72bc2b.js → BMI_BOYS.zscore.monthly-744336bd.js} +0 -0
  392. /package/build/{BMI_BOYS.zscore.weekly-6fb6d0fb.js → BMI_BOYS.zscore.weekly-27794c94.js} +0 -0
  393. /package/build/{BMI_BOYS.zscore.yearly-50da133b.js → BMI_BOYS.zscore.yearly-1b5eba3b.js} +0 -0
  394. /package/build/{BMI_GIRLS.percentile.monthly-4a813449.js → BMI_GIRLS.percentile.monthly-46697e50.js} +0 -0
  395. /package/build/{BMI_GIRLS.percentile.weekly-e170b644.js → BMI_GIRLS.percentile.weekly-6d4ff0a5.js} +0 -0
  396. /package/build/{BMI_GIRLS.percentile.yearly-9a1b6e01.js → BMI_GIRLS.percentile.yearly-f23406fa.js} +0 -0
  397. /package/build/{BMI_GIRLS.zscore.monthly-b9d387c8.js → BMI_GIRLS.zscore.monthly-8d1dbd47.js} +0 -0
  398. /package/build/{BMI_GIRLS.zscore.weekly-7908ccba.js → BMI_GIRLS.zscore.weekly-97ab3fdf.js} +0 -0
  399. /package/build/{BMI_GIRLS.zscore.yearly-afb0bcc6.js → BMI_GIRLS.zscore.yearly-809fdf2d.js} +0 -0
  400. /package/build/{ChevronDown-6986feb4.js → ChevronDown-2285ec37.js} +0 -0
  401. /package/build/{Close-25f9cea0.js → Close-ea576e53.js} +0 -0
  402. /package/build/{Google-cbbb72c8.js → Google-941649ed.js} +0 -0
  403. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-5b34e5b7.js → HEAD CIRCUM_BOYS.percentile.monthly-6cd2ec0e.js} +0 -0
  404. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-69ff80bc.js → HEAD CIRCUM_BOYS.percentile.weekly-6f2c4369.js} +0 -0
  405. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-398a9a44.js → HEAD CIRCUM_BOYS.percentile.yearly-54786a6d.js} +0 -0
  406. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-bf13c101.js → HEAD CIRCUM_BOYS.zscore.monthly-a2c49426.js} +0 -0
  407. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-6f2c3902.js → HEAD CIRCUM_BOYS.zscore.weekly-1d1da03e.js} +0 -0
  408. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-8c13e061.js → HEAD CIRCUM_BOYS.zscore.yearly-4d96d239.js} +0 -0
  409. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-7557ef19.js → HEAD CIRCUM_GIRLS.percentile.monthly-7b1d41be.js} +0 -0
  410. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-7843d397.js → HEAD CIRCUM_GIRLS.percentile.weekly-63229cac.js} +0 -0
  411. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-11b6dad4.js → HEAD CIRCUM_GIRLS.percentile.yearly-5c8d23f6.js} +0 -0
  412. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-7e0cb741.js → HEAD CIRCUM_GIRLS.zscore.monthly-815cff93.js} +0 -0
  413. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-e8b3045e.js → HEAD CIRCUM_GIRLS.zscore.weekly-f4a515d0.js} +0 -0
  414. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-93952f5d.js → HEAD CIRCUM_GIRLS.zscore.yearly-ca0b1a47.js} +0 -0
  415. /package/build/{HEIGHT_BOYS.percentile.monthly-88ec3b51.js → HEIGHT_BOYS.percentile.monthly-579650c3.js} +0 -0
  416. /package/build/{HEIGHT_BOYS.percentile.weekly-d17a9192.js → HEIGHT_BOYS.percentile.weekly-3ad72595.js} +0 -0
  417. /package/build/{HEIGHT_BOYS.percentile.yearly-3decbf66.js → HEIGHT_BOYS.percentile.yearly-3e3ccff7.js} +0 -0
  418. /package/build/{HEIGHT_BOYS.zscore.monthly-d4fddeb3.js → HEIGHT_BOYS.zscore.monthly-c35c2404.js} +0 -0
  419. /package/build/{HEIGHT_BOYS.zscore.weekly-70fdda3f.js → HEIGHT_BOYS.zscore.weekly-3a67bb21.js} +0 -0
  420. /package/build/{HEIGHT_BOYS.zscore.yearly-dc7f7351.js → HEIGHT_BOYS.zscore.yearly-7e2a1e2a.js} +0 -0
  421. /package/build/{HEIGHT_GIRLS.percentile.monthly-dd1291a5.js → HEIGHT_GIRLS.percentile.monthly-7e35f96c.js} +0 -0
  422. /package/build/{HEIGHT_GIRLS.percentile.weekly-75e17d0b.js → HEIGHT_GIRLS.percentile.weekly-15693e10.js} +0 -0
  423. /package/build/{HEIGHT_GIRLS.percentile.yearly-3a8b203a.js → HEIGHT_GIRLS.percentile.yearly-a6887fbd.js} +0 -0
  424. /package/build/{HEIGHT_GIRLS.zscore.monthly-a8d4bc5e.js → HEIGHT_GIRLS.zscore.monthly-a1c07cf6.js} +0 -0
  425. /package/build/{HEIGHT_GIRLS.zscore.weekly-62cd5c15.js → HEIGHT_GIRLS.zscore.weekly-5ba95fb0.js} +0 -0
  426. /package/build/{HEIGHT_GIRLS.zscore.yearly-998697cd.js → HEIGHT_GIRLS.zscore.yearly-c95b09f3.js} +0 -0
  427. /package/build/{Locale-59c8f2ff.js → Locale-19ffd740.js} +0 -0
  428. /package/build/{Visible-eb45a729.js → Visible-ff061e0e.js} +0 -0
  429. /package/build/{WEIGHT_BOYS.percentile.monthly-32137e61.js → WEIGHT_BOYS.percentile.monthly-14aa0af2.js} +0 -0
  430. /package/build/{WEIGHT_BOYS.percentile.weekly-021cc88a.js → WEIGHT_BOYS.percentile.weekly-aba7d078.js} +0 -0
  431. /package/build/{WEIGHT_BOYS.percentile.yearly-6f89ba05.js → WEIGHT_BOYS.percentile.yearly-b2bda30a.js} +0 -0
  432. /package/build/{WEIGHT_BOYS.zscore.monthly-b3ae6081.js → WEIGHT_BOYS.zscore.monthly-24967cdf.js} +0 -0
  433. /package/build/{WEIGHT_BOYS.zscore.weekly-c10d1b7b.js → WEIGHT_BOYS.zscore.weekly-fdd362e4.js} +0 -0
  434. /package/build/{WEIGHT_BOYS.zscore.yearly-14d96bd7.js → WEIGHT_BOYS.zscore.yearly-4c633ea8.js} +0 -0
  435. /package/build/{WEIGHT_GIRLS.percentile.monthly-d2293f07.js → WEIGHT_GIRLS.percentile.monthly-6326f461.js} +0 -0
  436. /package/build/{WEIGHT_GIRLS.percentile.weekly-ad845f1d.js → WEIGHT_GIRLS.percentile.weekly-c2311f94.js} +0 -0
  437. /package/build/{WEIGHT_GIRLS.percentile.yearly-86bf3f82.js → WEIGHT_GIRLS.percentile.yearly-7b1e0140.js} +0 -0
  438. /package/build/{WEIGHT_GIRLS.zscore.monthly-ffff40d7.js → WEIGHT_GIRLS.zscore.monthly-52960373.js} +0 -0
  439. /package/build/{WEIGHT_GIRLS.zscore.weekly-51a13361.js → WEIGHT_GIRLS.zscore.weekly-a5051ccb.js} +0 -0
  440. /package/build/{WEIGHT_GIRLS.zscore.yearly-e63510b9.js → WEIGHT_GIRLS.zscore.yearly-b1cd45d2.js} +0 -0
  441. /package/build/{animation-b76ef735.js → animation-61ab139b.js} +0 -0
  442. /package/build/{constants-6481b2f7.js → constants-0a05e562.js} +0 -0
  443. /package/build/{constants-a4f7741b.js → constants-55ce73df.js} +0 -0
  444. /package/build/{constants-4cc3f647.js → constants-ef5b314b.js} +0 -0
  445. /package/build/{dataTransform-8708d064.js → dataTransform-22198304.js} +0 -0
  446. /package/build/{doctor-69450f32.js → doctor-7823cea2.js} +0 -0
  447. /package/build/esm/{BMI_BOYS.percentile.monthly-d0e3a78e.js → BMI_BOYS.percentile.monthly-688a9341.js} +0 -0
  448. /package/build/esm/{BMI_BOYS.percentile.weekly-5fc2fbfe.js → BMI_BOYS.percentile.weekly-1179e875.js} +0 -0
  449. /package/build/esm/{BMI_BOYS.percentile.yearly-2217d2d9.js → BMI_BOYS.percentile.yearly-33c069c8.js} +0 -0
  450. /package/build/esm/{BMI_BOYS.zscore.monthly-32caef32.js → BMI_BOYS.zscore.monthly-ef0f3e6c.js} +0 -0
  451. /package/build/esm/{BMI_BOYS.zscore.weekly-a8982a1e.js → BMI_BOYS.zscore.weekly-e4a90df9.js} +0 -0
  452. /package/build/esm/{BMI_BOYS.zscore.yearly-489a541a.js → BMI_BOYS.zscore.yearly-522dd0d8.js} +0 -0
  453. /package/build/esm/{BMI_GIRLS.percentile.monthly-e44d76cf.js → BMI_GIRLS.percentile.monthly-38c3f895.js} +0 -0
  454. /package/build/esm/{BMI_GIRLS.percentile.weekly-ca6eeb38.js → BMI_GIRLS.percentile.weekly-9b5f59bc.js} +0 -0
  455. /package/build/esm/{BMI_GIRLS.percentile.yearly-a4c1aafb.js → BMI_GIRLS.percentile.yearly-b3e61478.js} +0 -0
  456. /package/build/esm/{BMI_GIRLS.zscore.monthly-7c200ede.js → BMI_GIRLS.zscore.monthly-93b37c1a.js} +0 -0
  457. /package/build/esm/{BMI_GIRLS.zscore.weekly-3f01dce4.js → BMI_GIRLS.zscore.weekly-2bdfbf3b.js} +0 -0
  458. /package/build/esm/{BMI_GIRLS.zscore.yearly-fe5ae0af.js → BMI_GIRLS.zscore.yearly-d1aab9be.js} +0 -0
  459. /package/build/esm/{ChevronDown-e97fab1f.js → ChevronDown-a9ef412b.js} +0 -0
  460. /package/build/esm/{Close-10089dcc.js → Close-4c722ae0.js} +0 -0
  461. /package/build/esm/{Google-e7935185.js → Google-55200333.js} +0 -0
  462. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-329ed94c.js → HEAD CIRCUM_BOYS.percentile.monthly-3f768fdb.js} +0 -0
  463. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-41003bad.js → HEAD CIRCUM_BOYS.percentile.weekly-ac79abd7.js} +0 -0
  464. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-e809db7c.js → HEAD CIRCUM_BOYS.percentile.yearly-36ab41b5.js} +0 -0
  465. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-a2e504e7.js → HEAD CIRCUM_BOYS.zscore.monthly-aa40d2d1.js} +0 -0
  466. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-443e7162.js → HEAD CIRCUM_BOYS.zscore.weekly-98cdc3c7.js} +0 -0
  467. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-1e61a1db.js → HEAD CIRCUM_BOYS.zscore.yearly-f2f8a8ab.js} +0 -0
  468. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-3dc736f0.js → HEAD CIRCUM_GIRLS.percentile.monthly-745af27a.js} +0 -0
  469. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-9b52cc1a.js → HEAD CIRCUM_GIRLS.percentile.weekly-44c1b50e.js} +0 -0
  470. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-39163dfd.js → HEAD CIRCUM_GIRLS.percentile.yearly-e4acf7ce.js} +0 -0
  471. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-c3eae855.js → HEAD CIRCUM_GIRLS.zscore.monthly-02086c3d.js} +0 -0
  472. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-4026073a.js → HEAD CIRCUM_GIRLS.zscore.weekly-7eb66d6d.js} +0 -0
  473. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-29aa729b.js → HEAD CIRCUM_GIRLS.zscore.yearly-6f697a79.js} +0 -0
  474. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-60c5b2dd.js → HEIGHT_BOYS.percentile.monthly-adf9fbfc.js} +0 -0
  475. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-72e40347.js → HEIGHT_BOYS.percentile.weekly-dc6f3335.js} +0 -0
  476. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-5ff0aae1.js → HEIGHT_BOYS.percentile.yearly-7ccfca32.js} +0 -0
  477. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-39dbf623.js → HEIGHT_BOYS.zscore.monthly-46474ded.js} +0 -0
  478. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-762e5eec.js → HEIGHT_BOYS.zscore.weekly-4f75ac69.js} +0 -0
  479. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-3f5b3674.js → HEIGHT_BOYS.zscore.yearly-01db754a.js} +0 -0
  480. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-15ad5ee3.js → HEIGHT_GIRLS.percentile.monthly-e7d64bc2.js} +0 -0
  481. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-eb87267f.js → HEIGHT_GIRLS.percentile.weekly-e7b25882.js} +0 -0
  482. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-453f16ba.js → HEIGHT_GIRLS.percentile.yearly-51db9825.js} +0 -0
  483. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-474c254c.js → HEIGHT_GIRLS.zscore.monthly-dd87f94d.js} +0 -0
  484. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-efd8a6bb.js → HEIGHT_GIRLS.zscore.weekly-5fe30dbc.js} +0 -0
  485. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-39108ce9.js → HEIGHT_GIRLS.zscore.yearly-043d28d4.js} +0 -0
  486. /package/build/esm/{Locale-4c6794d2.js → Locale-8d86a8a9.js} +0 -0
  487. /package/build/esm/{Visible-7d890c09.js → Visible-1f3e97e0.js} +0 -0
  488. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-5aaf843a.js → WEIGHT_BOYS.percentile.monthly-02d95828.js} +0 -0
  489. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-f3843b0f.js → WEIGHT_BOYS.percentile.weekly-59d54878.js} +0 -0
  490. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-f40f7ce9.js → WEIGHT_BOYS.percentile.yearly-d14fb4bd.js} +0 -0
  491. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-a4aa71d7.js → WEIGHT_BOYS.zscore.monthly-cba42995.js} +0 -0
  492. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-75f2e0e5.js → WEIGHT_BOYS.zscore.weekly-5e75187e.js} +0 -0
  493. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-6db893a5.js → WEIGHT_BOYS.zscore.yearly-13ba1ac3.js} +0 -0
  494. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-e12c4fd2.js → WEIGHT_GIRLS.percentile.monthly-d631c4e9.js} +0 -0
  495. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-6c2bd745.js → WEIGHT_GIRLS.percentile.weekly-2a8d843e.js} +0 -0
  496. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-4ed8d1ae.js → WEIGHT_GIRLS.percentile.yearly-3d0d4d59.js} +0 -0
  497. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-e7c60e50.js → WEIGHT_GIRLS.zscore.monthly-0ff9e192.js} +0 -0
  498. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-3b8385b1.js → WEIGHT_GIRLS.zscore.weekly-c9ebbe93.js} +0 -0
  499. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-257a37c9.js → WEIGHT_GIRLS.zscore.yearly-6de5f96e.js} +0 -0
  500. /package/build/esm/{animation-26d50fdf.js → animation-c916174b.js} +0 -0
  501. /package/build/esm/{constants-66738d0d.js → constants-197344e7.js} +0 -0
  502. /package/build/esm/{constants-afb0a5ae.js → constants-1b662ce0.js} +0 -0
  503. /package/build/esm/{constants-d8655e44.js → constants-e28c872e.js} +0 -0
  504. /package/build/esm/{dataTransform-f99083eb.js → dataTransform-32118b27.js} +0 -0
  505. /package/build/esm/{doctor-283ec7f3.js → doctor-c136eca9.js} +0 -0
  506. /package/build/esm/{index-f790fb24.js → index-02d825e1.js} +0 -0
  507. /package/build/esm/{index-c832a75e.js → index-399c3751.js} +0 -0
  508. /package/build/esm/{index-22f4126e.js → index-514db505.js} +0 -0
  509. /package/build/esm/{index-8f955050.js → index-894e3dcf.js} +0 -0
  510. /package/build/esm/{index-ce5d9fdb.js → index-c4fb7956.js} +0 -0
  511. /package/build/esm/{index-8b1c8c83.js → index-c70fb732.js} +0 -0
  512. /package/build/esm/{index-e2ee710f.js → index-eb3b75e0.js} +0 -0
  513. /package/build/esm/{index-e3185bed.js → index-fd35bc29.js} +0 -0
  514. /package/build/esm/{index-c61375af.js → index-ffc96988.js} +0 -0
  515. /package/build/esm/{index.styles-ca8dfcc5.js → index.styles-2c3af767.js} +0 -0
  516. /package/build/esm/{localizeNumberFormat-4887c818.js → localizeNumberFormat-e2e3afc1.js} +0 -0
  517. /package/build/esm/{normalizeLink-61de4b8f.js → normalizeLink-51459370.js} +0 -0
  518. /package/build/esm/{other-c8a532f4.js → other-b6b2398a.js} +0 -0
  519. /package/build/esm/{paths-25327ec6.js → paths-3c3bf13c.js} +0 -0
  520. /package/build/esm/{translationsContext-a6adc797.js → translationsContext-a2d67e07.js} +0 -0
  521. /package/build/esm/{tslib.es6-6faca69f.js → tslib.es6-9c7616a9.js} +0 -0
  522. /package/build/esm/{types-83b9a291.js → types-27c9eb85.js} +0 -0
  523. /package/build/esm/{useIsInit-f838d39e.js → useIsInit-17abe414.js} +0 -0
  524. /package/build/esm/{useOutsideClick-7acf3603.js → useOutsideClick-737e87c1.js} +0 -0
  525. /package/build/esm/{useScrollbarSize-b01af278.js → useScrollbarSize-ecbc318c.js} +0 -0
  526. /package/build/esm/{useUniqueId-1abc912b.js → useUniqueId-fdf641ed.js} +0 -0
  527. /package/build/esm/{utils-0eccc86b.js → utils-11ddb7c1.js} +0 -0
  528. /package/build/{index-a3ce059f.js → index-14de2d04.js} +0 -0
  529. /package/build/{index-8fdc7501.js → index-36b3f0ab.js} +0 -0
  530. /package/build/{index-50f1bd96.js → index-426fad14.js} +0 -0
  531. /package/build/{index-c41b5997.js → index-82d03256.js} +0 -0
  532. /package/build/{index-c6667e97.js → index-91bec39a.js} +0 -0
  533. /package/build/{index-77fa3574.js → index-a409f966.js} +0 -0
  534. /package/build/{index-3232dbd1.js → index-bf10023b.js} +0 -0
  535. /package/build/{index-26aa8e9a.js → index-d47e87fd.js} +0 -0
  536. /package/build/{index-c4c494a4.js → index-f9bd9eee.js} +0 -0
  537. /package/build/{index.styles-84618a52.js → index.styles-b050ad8b.js} +0 -0
  538. /package/build/{localizeNumberFormat-d9455b23.js → localizeNumberFormat-93548044.js} +0 -0
  539. /package/build/{normalizeLink-f8d0fbdf.js → normalizeLink-f7a36162.js} +0 -0
  540. /package/build/{other-b6278fe8.js → other-78cc653a.js} +0 -0
  541. /package/build/{paths-97742418.js → paths-6e9c0f6b.js} +0 -0
  542. /package/build/{translationsContext-e8e3064f.js → translationsContext-a7f83fd8.js} +0 -0
  543. /package/build/{tslib.es6-19595f43.js → tslib.es6-9bd4bb1f.js} +0 -0
  544. /package/build/{types-60aaa39d.js → types-e6b1c0aa.js} +0 -0
  545. /package/build/{useIsInit-da3a3533.js → useIsInit-2bf1b8f0.js} +0 -0
  546. /package/build/{useOutsideClick-bf35cbb8.js → useOutsideClick-63072953.js} +0 -0
  547. /package/build/{useScrollbarSize-80661c87.js → useScrollbarSize-25b3befd.js} +0 -0
  548. /package/build/{useUniqueId-366f946b.js → useUniqueId-1bb40954.js} +0 -0
  549. /package/build/{utils-99eb2b0f.js → utils-1463ac9f.js} +0 -0
@@ -1,1533 +0,0 @@
1
- import { a as __awaiter, _ as __rest } from './tslib.es6-6faca69f.js';
2
- import React__default, { useState, useRef, useEffect, useCallback, useContext, useMemo } from 'react';
3
- import { Info, Ask } from '@hhgtech/icons/other';
4
- import { D as Dropdown } from './index-8b1c8c83.js';
5
- import { u as useTranslations } from './index-a2fcd284.js';
6
- import innertext from 'innertext';
7
- import { theme } from './miscTheme.js';
8
- import { I as Input$1 } from './index-a09d15df.js';
9
- import { useMantineTheme, Popover } from '@mantine/core';
10
- import '@mantine/dates';
11
- import './index-aff433a3.js';
12
- import './index-0698f9a5.js';
13
- import './index-22f4126e.js';
14
- import './useMantineLocale-70c5b5ba.js';
15
- import { T as Text } from './index-a03c2d78.js';
16
- import { B as Button } from './index-47eb0b6f.js';
17
- import './index.styles-ca8dfcc5.js';
18
- import '@mantine/hooks';
19
- import { M as MediaQueries } from './utils-0eccc86b.js';
20
- import './other-c8a532f4.js';
21
- import './index-5b54b46d.js';
22
- import { u as useImagePicker, a as PopupFrame, d as IconCloseCircle, g as getDefaultFailNoti, e as getPostFormData, f as editPost, h as createPost } from './index-755497e5.js';
23
- import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath, p as getCurrentHref, b as callApiWithAuth } from './utils-5fcba9d5.js';
24
- import styled from '@emotion/styled';
25
- import { b as formatPost, c as formatTopic } from './dataTransform-ad84bf44.js';
26
- import { M as MAX_IMAGE_UPLOADS } from './constants-d8655e44.js';
27
- import { h as highlightBadWords, f as fixMalformedMention, r as removeFontFormat, a as removeEdittedBannedWord, w as wrapAnchorAroundUrls, g as getUrlsFromEditorString, A as ALLOW_DOMAIN_URL, e as escapeRegExp, d as decodeMention, b as decodePostUrl } from './post-ff84e1cc.js';
28
- import { C as CardAuthor, L as Loading$1 } from './index-c625f19a.js';
29
- import { S as StyledCreatePostDescription, R as RichTextEditor } from './editor-d1bb7972.js';
30
- import { I as Input } from './index-0a085a1f.js';
31
- import debounce from 'lodash/debounce';
32
- import ContentEditable from 'react-contenteditable';
33
- import { PATHS } from './togetherApiPaths.js';
34
- import { L as Loading } from './index-7f8de431.js';
35
- import { C as CardLink } from './index-2007b9e0.js';
36
- import { B as BtnChoice } from './index-58052a3a.js';
37
- import { L as LOCALE } from './Locale-4c6794d2.js';
38
- import { Close, Check } from '@hhgtech/icons/core';
39
-
40
- const StyledCreateNewPost = styled.div `
41
- position: relative;
42
- display: flex;
43
- height: 100%;
44
- flex-direction: column;
45
- padding: 16px 24px;
46
-
47
- ${MediaQueries.mbDown} {
48
- padding: 16px 16px;
49
- }
50
-
51
- .input-group-container {
52
- flex: 1;
53
- padding-right: 2px;
54
- padding-left: 2px;
55
- margin-bottom: 24px;
56
- -ms-overflow-style: none; /* IE and Edge */
57
- overflow-y: auto;
58
- scrollbar-width: none; /* Firefox */
59
- &::-webkit-scrollbar {
60
- display: none;
61
- }
62
- }
63
-
64
- .input-group {
65
- :not(:last-child) {
66
- margin-bottom: 0.6rem;
67
- }
68
-
69
- input:focus,
70
- textarea:focus,
71
- [contenteditable='true'] {
72
- outline: none;
73
- }
74
-
75
- label {
76
- margin-bottom: 5px;
77
- color: ${theme.colors.gray600};
78
- /* font-family: 'Open Sans', sans-serif; */
79
- font-size: 13px;
80
- font-weight: bold;
81
- }
82
-
83
- .input-group-label {
84
- margin-bottom: 5px;
85
- color: ${theme.colors.gray600};
86
- /* font-family: 'Open Sans', sans-serif; */
87
- font-size: 13px;
88
- font-weight: bold;
89
- }
90
-
91
- .input-notification {
92
- display: flex;
93
-
94
- & > img {
95
- width: 16px;
96
- height: 16px;
97
- margin-top: 1.5px;
98
- margin-right: 8px;
99
- }
100
- }
101
-
102
- .tag-list {
103
- }
104
- }
105
-
106
- .warning {
107
- margin-top: 16px;
108
- }
109
-
110
- .submit-btn {
111
- width: 100%;
112
- }
113
-
114
- .switch-label {
115
- display: flex;
116
- align-items: center;
117
- }
118
-
119
- .swich-input-group {
120
- padding: 12px 16px;
121
- border-radius: 8px;
122
- background: ${theme.colors.neutral50};
123
-
124
- &.askdoctor-switch {
125
- background: ${theme.colors.primary50};
126
- &.mb-color {
127
- background: ${theme.mbColors.tonePink};
128
- }
129
- }
130
-
131
- .mantine-Switch-labelWrapper {
132
- flex-grow: 1;
133
- }
134
- .mantine-Checkbox-body {
135
- display: flex;
136
- width: 100%;
137
- align-items: center;
138
- justify-content: space-between;
139
- }
140
- .mantine-Switch-track {
141
- margin-bottom: 0;
142
- }
143
- .label-txt {
144
- font-weight: normal;
145
- font-size: 14px;
146
- color: ${theme.colors.gray800};
147
- margin-left: 10px;
148
- }
149
- }
150
- `;
151
- const StyledIsQuestion = styled.div `
152
- display: flex;
153
- width: 100%;
154
- align-items: center;
155
- justify-content: space-between;
156
- padding: 8px 12px;
157
- border-radius: 0 0 8px 8px;
158
- background: ${theme.colors.neutral50};
159
- border: 1px solid ${theme.colors.gray200};
160
- gap: 12px;
161
-
162
- &.has-error {
163
- border: 1px solid ${theme.colors.red600};
164
- }
165
- &.error-description {
166
- border: 1px solid ${theme.colors.red600};
167
- border-top: none;
168
- }
169
-
170
- &[data-is-marry-baby='true'] {
171
- background: ${theme.mbColors.tonePink};
172
- }
173
-
174
- .switch-label {
175
- display: flex;
176
- gap: 4px;
177
- align-items: flex-start;
178
-
179
- svg {
180
- margin-top: 2px;
181
- }
182
-
183
- .wrapper-text {
184
- .label-txt {
185
- color: ${theme.colors.gray800};
186
- font-size: 14px;
187
- font-weight: 600;
188
- line-height: 22px;
189
- }
190
- .description-txt {
191
- color: ${theme.colors.gray700};
192
- font-size: 12px;
193
- font-weight: 400;
194
- line-height: 18px;
195
- }
196
- }
197
- }
198
-
199
- button {
200
- height: 40px;
201
- &:hover,
202
- &.primary {
203
- border-radius: 16px;
204
- border: 1px solid ${theme.colors.blue100};
205
- background: ${theme.colors.blue50};
206
- color: ${theme.colors.primaryBase};
207
- }
208
- }
209
- `;
210
- const StyledError = styled.div `
211
- margin-bottom: 12px;
212
- color: ${theme.colors.red700};
213
- svg {
214
- margin-right: 5px;
215
- }
216
- svg,
217
- span {
218
- vertical-align: middle;
219
- }
220
- `;
221
- const StyledFormGroupInner = styled.div `
222
- .swich-input-group {
223
- padding: 12px 16px;
224
- border-radius: 8px;
225
- background: ${theme.colors.neutral50};
226
-
227
- &.askdoctor-switch {
228
- background: ${theme.colors.blue50};
229
- }
230
-
231
- .switch-label {
232
- display: flex;
233
- align-items: center;
234
- }
235
- .mantine-Switch-labelWrapper {
236
- flex-grow: 1;
237
- }
238
- .mantine-Checkbox-body {
239
- display: flex;
240
- width: 100%;
241
- align-items: center;
242
- justify-content: space-between;
243
- }
244
- .mantine-Switch-track {
245
- margin-bottom: 0;
246
- }
247
- .label-txt {
248
- font-weight: normal;
249
- font-size: 14px;
250
- color: ${theme.colors.gray800};
251
- margin-left: 14px;
252
- }
253
- }
254
- `;
255
- const StylePostAction = styled.div `
256
- display: flex;
257
- gap: 12px;
258
- .avatar {
259
- width: 40px;
260
- height: 40px;
261
- border-radius: 100%;
262
-
263
- img {
264
- border-radius: 100%;
265
- }
266
-
267
- .author-avatar {
268
- .col-left {
269
- display: none;
270
- }
271
- }
272
- }
273
-
274
- .post-action-form {
275
- display: flex;
276
- flex-direction: column;
277
- gap: 4px;
278
- }
279
-
280
- .post-action-by {
281
- color: ${theme.colors.gray800};
282
- font-size: 16px;
283
- font-weight: 600;
284
- line-height: 24px;
285
- }
286
-
287
- .post-action-result {
288
- display: flex;
289
- position: relative;
290
- &:after {
291
- content: '';
292
- display: inline-block;
293
- width: 5px;
294
- height: 5px;
295
- background-color: ${theme.colors.error};
296
- border-radius: 100%;
297
- position: absolute;
298
- right: 7px;
299
- }
300
- }
301
-
302
- .dropdown-post-action {
303
- background: ${theme.colors.white} !important;
304
- border-radius: 2px;
305
- border: 1px solid ${theme.colors.neutral200} !important;
306
-
307
- > div {
308
- padding: 3px 8px;
309
- }
310
-
311
- span {
312
- flex: 1;
313
- color: ${theme.colors.gray600};
314
- font-size: 12px;
315
- font-weight: 600;
316
- line-height: 18px;
317
- }
318
-
319
- ul {
320
- width: 130px;
321
- li {
322
- img {
323
- flex: 0 0 16px;
324
- width: 16px;
325
- }
326
- }
327
- }
328
- }
329
- `;
330
- const StyleSessionRow = styled.div `
331
- display: inline-flex;
332
- gap: 8px;
333
- align-items: center;
334
- cursor: pointer;
335
-
336
- .session-title {
337
- color: ${theme.colors.gray700};
338
- font-size: 14px;
339
- font-weight: 400;
340
- line-height: 22px;
341
- flex: 1;
342
- }
343
- `;
344
-
345
- 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";
346
- var IconAnonymous = img$5;
347
-
348
- 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";
349
- var IconPublic = img$4;
350
-
351
- styled.div `
352
- background-color: white;
353
- z-index: 1000;
354
- top: 0;
355
- left: 0;
356
- height: 100%;
357
- position: absolute;
358
- width: 100%;
359
-
360
- .drawer-header {
361
- display: flex;
362
- gap: 12px;
363
- align-items: center;
364
- padding: 12px 16px;
365
- border-bottom: 1px solid ${theme.colors.gray200};
366
-
367
- .input-group-label {
368
- flex: 1;
369
- }
370
-
371
- img {
372
- cursor: pointer;
373
- }
374
-
375
- p {
376
- flex: 1;
377
- }
378
- }
379
-
380
- .drawer-content {
381
- padding: 16px;
382
- display: flex;
383
- flex-direction: column;
384
- gap: 16px;
385
- overflow-y: auto;
386
- height: calc(100% - 49px);
387
-
388
- .input-field-label {
389
- margin-bottom: 8px;
390
- }
391
-
392
- &.drawer-content-full-screen {
393
- max-width: 680px;
394
- margin: 0 auto;
395
- padding: 16px 24px;
396
- }
397
- }
398
- `;
399
- const StyleCommunityReivew = styled.div `
400
- display: flex;
401
- flex-direction: column;
402
- gap: 8px;
403
- margin-top: 8px;
404
-
405
- .topic-review {
406
- display: flex;
407
- gap: 4px;
408
- flex-wrap: wrap;
409
- }
410
-
411
- .community-review {
412
- .tag-item {
413
- background-color: ${theme.colors.neutral50};
414
-
415
- img {
416
- border-radius: 50%;
417
- margin-right: 8px;
418
- }
419
- }
420
- }
421
- `;
422
-
423
- 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";
424
- var IconCommunity = img$3;
425
-
426
- const PostCommunityReview = ({ selectedTopics, currentCommunity }) => {
427
- return (React__default.createElement(StyleCommunityReivew, null,
428
- React__default.createElement("div", { className: "community-review" },
429
- React__default.createElement(Button, { skipHover: true, size: "md", radius: "xl", className: "tag-item", variant: "tertiary" },
430
- React__default.createElement(Text, { size: "p4", as: "span", color: "inherit" }, currentCommunity.name))),
431
- React__default.createElement("div", { className: "topic-review", style: { display: 'none' } }, selectedTopics.map((topic) => {
432
- return (React__default.createElement(Button, { skipHover: true, size: "sm", radius: "xl", className: "tag-item", key: topic.id, variant: "tertiary" },
433
- React__default.createElement(Text, { size: "p4", as: "span", color: "inherit" }, topic.name)));
434
- }))));
435
- };
436
- const CreatePostCommunity = ({ communitiesList, currentCommunity, selectedTopics, forceTopics, communityValue,
437
- // error,
438
- isFullscreen, isInEditMode, setSelectedTopics, setCommunityValue, removeKeyError, }) => {
439
- const { t } = useTranslations();
440
- const props = {
441
- communitiesList,
442
- currentCommunity,
443
- selectedTopics,
444
- communityValue,
445
- isFullscreen,
446
- isInEditMode,
447
- forceTopics,
448
- setSelectedTopics,
449
- setCommunityValue,
450
- removeKeyError,
451
- };
452
- console.log(props);
453
- return (React__default.createElement("div", { className: "input-group" },
454
- React__default.createElement(StyleSessionRow, null,
455
- React__default.createElement("img", { alt: "anonymous-icon", src: IconCommunity, style: {
456
- width: '18px',
457
- height: '18px',
458
- objectFit: 'contain',
459
- marginLeft: 'auto',
460
- } }),
461
- React__default.createElement("div", { className: "session-title" }, t('createPost.communityAndTopic'))),
462
- React__default.createElement(PostCommunityReview, { selectedTopics: selectedTopics, currentCommunity: currentCommunity })));
463
- };
464
-
465
- const CreatePostDescription = ({ className, style, bannedWords = [], value, onChange, onPreviewUrlChange, onInvalidUrlsChange,
466
- // onImageFilesChange,
467
- // imageFiles: imageFilesProp,
468
- isReplying, footerEditor, }) => {
469
- const { t } = useTranslations();
470
- const [previewUrl, setPreviewUrl] = useState(null);
471
- const imagePicker = useRef(null);
472
- // const {
473
- // onSelectImages,
474
- // onRemoveImage,
475
- // imageSrcs,
476
- // // imageFiles,
477
- // } = useImagePicker(imageFilesProp, onImageFilesChange)
478
- useEffect(() => {
479
- if (onPreviewUrlChange) {
480
- if (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url)
481
- onPreviewUrlChange({
482
- title: previewUrl.title || '',
483
- url: previewUrl.url || '',
484
- image: previewUrl.image || '',
485
- description: previewUrl.description || '',
486
- });
487
- else
488
- onPreviewUrlChange(null);
489
- }
490
- }, [previewUrl]);
491
- return (React__default.createElement(StyledCreatePostDescription, { className: className, style: style },
492
- React__default.createElement(Text, { size: "p4", className: "description-label" }, t('createPost.popup.description')),
493
- React__default.createElement("div", { className: `textarea-control` },
494
- React__default.createElement("div", { className: "textarea-wrapper" },
495
- React__default.createElement(RichTextEditor, { html: value || '', onChange: onChange, bannedWords: bannedWords, onImagePickerClick: () => { var _a; return (_a = imagePicker.current) === null || _a === void 0 ? void 0 : _a.click(); }, onPreviewUrlChange: setPreviewUrl, onInvalidUrlsChange: onInvalidUrlsChange, isReplying: isReplying }))),
496
- footerEditor,
497
- React__default.createElement(Text, { size: "p4", className: "count-string" },
498
- t('character'),
499
- ": ",
500
- innertext(value || '').length)));
501
- };
502
-
503
- 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";
504
- var IconPhone = img$2;
505
-
506
- const CreatePostPhotos = ({ imageFiles: imageFilesInit, setImageFiles, }) => {
507
- const imageRef = useRef(null);
508
- const { t } = useTranslations();
509
- const { onSelectImages } = useImagePicker(imageFilesInit, setImageFiles);
510
- const handleClick = () => {
511
- var _a;
512
- (_a = imageRef === null || imageRef === void 0 ? void 0 : imageRef.current) === null || _a === void 0 ? void 0 : _a.click();
513
- };
514
- return (React__default.createElement("div", { className: "input-group" },
515
- React__default.createElement(StyleSessionRow, { onClick: handleClick },
516
- React__default.createElement("img", { alt: "anonymous-icon", src: IconPhone, style: {
517
- width: '18px',
518
- height: '18px',
519
- objectFit: 'contain',
520
- marginLeft: 'auto',
521
- } }),
522
- React__default.createElement("div", { className: "session-title" }, t('createPost.photos'))),
523
- React__default.createElement("input", { ref: imageRef, type: "file", accept: "image/png, image/gif, image/jpeg", multiple: true, style: { display: 'none' }, onChange: (e) => onSelectImages(e) })));
524
- };
525
-
526
- const StyledCreatePostTitle = styled.div `
527
- input:focus,
528
- textarea:focus,
529
- [contenteditable='true'] {
530
- outline: none;
531
- }
532
-
533
- .title-input {
534
- overflow: hidden;
535
- width: 100%;
536
- padding: 12px 16px;
537
- border: solid 1px #d9d9d9;
538
- border-radius: ${theme.borderRadius};
539
- font-size: 16px;
540
- line-height: 1.2;
541
- white-space: nowrap;
542
- :focus {
543
- border-color: ${(props) => props.color};
544
- box-shadow: 0px 0px 2px 2px ${(props) => props.colorShadow};
545
- }
546
- br {
547
- display: none;
548
- }
549
- * {
550
- display: inline;
551
- white-space: nowrap;
552
- }
553
- mocka {
554
- padding: 2px 6px;
555
- border-radius: 1rem;
556
- &[data-error='true'] {
557
- background-color: #ffeeee;
558
- color: red;
559
- text-decoration: underline;
560
- font-style: bold;
561
- }
562
- }
563
- ol,
564
- ul {
565
- padding-left: 1rem;
566
- }
567
- }
568
-
569
- label {
570
- display: block;
571
- margin-bottom: 5px;
572
- color: ${theme.colors.gray600};
573
- font-size: 13px;
574
- font-weight: bold;
575
- }
576
-
577
- .count-string {
578
- margin-top: 5px;
579
- color: ${theme.colors.gray500};
580
- font-size: 11px;
581
- text-align: right;
582
- }
583
- `;
584
-
585
- const TITLE_LIMIT = 120;
586
- const inputModify$1 = (value, opts) => {
587
- if (!opts)
588
- return value;
589
- const { limit, bannedWords = [] } = opts;
590
- const shorten = typeof limit === 'number' && limit >= 0 ? value.substring(0, limit) : value;
591
- const processedValue = highlightBadWords(shorten, bannedWords);
592
- return processedValue;
593
- };
594
- const CreatePostTitle = ({ className, style, bannedWords = [], value, onChange, }) => {
595
- var _a;
596
- const _theme = useMantineTheme();
597
- const { t } = useTranslations();
598
- const [titleValue, setTitleValue] = useState('');
599
- const titleRef = useRef(null);
600
- useEffect(() => {
601
- if (titleRef.current) {
602
- const pasteHandler = (e) => {
603
- var _a;
604
- e.preventDefault();
605
- const text = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/plain');
606
- document.execCommand('insertHTML', false, text);
607
- };
608
- const contentDiv = titleRef.current;
609
- contentDiv.addEventListener('paste', pasteHandler, {
610
- passive: true,
611
- });
612
- return () => contentDiv.removeEventListener('paste', pasteHandler);
613
- }
614
- }, [titleRef]);
615
- const bannedString = (bannedWords === null || bannedWords === void 0 ? void 0 : bannedWords.join(',')) || '';
616
- useEffect(() => {
617
- var _a;
618
- if (bannedString) {
619
- const titleText = (_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText;
620
- if (titleText) {
621
- const titleValueWithBanned = highlightBadWords(titleText, bannedWords);
622
- if (titleValueWithBanned !== titleText) {
623
- onChange && onChange(titleValueWithBanned);
624
- setTitleValue(titleValueWithBanned);
625
- }
626
- }
627
- }
628
- }, [bannedString]);
629
- const debounceInputModify = useCallback(debounce(() => {
630
- if (titleRef.current) {
631
- const shortenString = inputModify$1(titleRef.current.innerText, {
632
- limit: TITLE_LIMIT,
633
- bannedWords,
634
- });
635
- onChange && onChange(shortenString);
636
- setTitleValue(shortenString);
637
- }
638
- }, 300), []);
639
- useEffect(() => {
640
- setTimeout(() => {
641
- var _a;
642
- (_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.focus();
643
- }, 500);
644
- }, []);
645
- return (React__default.createElement(StyledCreatePostTitle, { className: className, style: style, color: _theme.colors[_theme.primaryColor][0], colorShadow: _theme.colors[_theme.primaryColor][2] },
646
- React__default.createElement(Input, { name: "title", value: value || titleValue, size: "md", label: t('createPost.title'), CustomInput: React__default.createElement(ContentEditable, { innerRef: titleRef, html: value || titleValue, onChange: () => {
647
- if (titleRef.current &&
648
- titleRef.current.innerText !== (value || titleValue)) {
649
- const initialValue = inputModify$1(titleRef.current.innerText, {
650
- bannedWords,
651
- });
652
- onChange && onChange(initialValue);
653
- setTitleValue(initialValue);
654
- debounceInputModify();
655
- }
656
- }, className: "title-input" }) }),
657
- React__default.createElement(Text, { size: "p4", className: "count-string" }, t('createPost.popup.wordCount', {
658
- count: ((_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText.length) || 0,
659
- max: TITLE_LIMIT,
660
- }))));
661
- };
662
-
663
- const StyledPopupFrame = styled(PopupFrame) `
664
- & > div[data-open]:first-child {
665
- z-index: 1000;
666
- height: auto;
667
- max-width: 448px;
668
- }
669
- .custom-media-dialog {
670
- padding: 1rem;
671
- .image-gallery {
672
- display: none;
673
- .image-item {
674
- &.no-image {
675
- cursor: pointer;
676
- }
677
- .camera-btn {
678
- position: absolute;
679
- top: calc(100% - 32px);
680
- right: 8px;
681
- left: unset;
682
- width: 24px;
683
- height: 24px;
684
- }
685
- }
686
- }
687
- .custom-media-add-btn {
688
- margin-left: auto;
689
- display: block;
690
- }
691
- }
692
- `;
693
- const StyledInput = styled(Input$1) `
694
- margin-bottom: 10px;
695
- `;
696
- const StyleWrapperInfo = styled.div `
697
- display: flex;
698
- gap: 4px;
699
- align-items: flex-start;
700
- margin-bottom: 14px;
701
-
702
- img {
703
- margin-top: 2px;
704
- max-width: 16px;
705
- }
706
- `;
707
-
708
- 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";
709
- var IconInfo = img$1;
710
-
711
- const SocialLinkPopup = ({ isOpen, onClose, onSocialLinkChanged, socialLinkData, }) => {
712
- const { t } = useTranslations();
713
- const imagePickerRef = useRef(null);
714
- const [socialLink, setSocialLinkUrl] = useState('');
715
- const { onSelectImages, onRemoveImage, imageSrcs, imageFiles } = useImagePicker();
716
- useEffect(() => {
717
- if (isOpen) {
718
- setSocialLinkUrl((socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) || '');
719
- }
720
- }, [isOpen]);
721
- const isAcceptedLink = socialLink.includes('youtu.be') ||
722
- socialLink.includes('youtube.com') ||
723
- socialLink.includes('facebook.com') ||
724
- socialLink.includes('fb.watch') ||
725
- socialLink.includes('tiktok.com');
726
- const isValid = !!socialLink && isAcceptedLink;
727
- return (React__default.createElement(React__default.Fragment, null,
728
- React__default.createElement("input", { ref: imagePickerRef, type: "file", accept: "image/png, image/gif, image/jpeg", style: { display: 'none' }, onChange: onSelectImages }),
729
- React__default.createElement(StyledPopupFrame, { isOpen: isOpen, onClose: onClose, heading: "Insert", style: {
730
- zIndex: 3,
731
- } },
732
- React__default.createElement("div", { className: "custom-media-dialog", onClick: (e) => e.stopPropagation() },
733
- React__default.createElement(StyledInput, { size: "md", name: "custom-media-url", placeholder: "URL", value: socialLink, onChange: (v) => setSocialLinkUrl(v), label: "" }),
734
- React__default.createElement(StyleWrapperInfo, null,
735
- React__default.createElement("img", { src: IconInfo, alt: "" }),
736
- React__default.createElement(Text, { size: "c2", color: "#737373" }, t('editor.addSocialLink.warningDomain'))),
737
- !imageSrcs[0] ? (React__default.createElement("div", { className: "image-gallery" },
738
- React__default.createElement("div", { className: "image-item no-image", onClick: () => { var _a; return (_a = imagePickerRef.current) === null || _a === void 0 ? void 0 : _a.click(); } }))) : (React__default.createElement("div", { className: "image-gallery" },
739
- React__default.createElement("div", { className: "image-item" },
740
- React__default.createElement("img", { src: imageSrcs[0], alt: "" }),
741
- React__default.createElement("img", { className: "close-btn", alt: "", onClick: () => onRemoveImage(0) })))),
742
- React__default.createElement(Button, { color: "primary", size: "md", variant: "primary", type: "button", className: "custom-media-add-btn", onClick: (e) => {
743
- e === null || e === void 0 ? void 0 : e.preventDefault();
744
- e === null || e === void 0 ? void 0 : e.stopPropagation();
745
- if (isValid) {
746
- onSocialLinkChanged === null || onSocialLinkChanged === void 0 ? void 0 : onSocialLinkChanged({
747
- url: !socialLink.includes('http')
748
- ? 'https://' + socialLink
749
- : socialLink,
750
- banner: imageFiles[0],
751
- });
752
- onClose === null || onClose === void 0 ? void 0 : onClose();
753
- }
754
- }, disabled: !isValid }, t('editor.addSocialLink.addLink'))))));
755
- };
756
-
757
- 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";
758
- var IconVideo = img;
759
-
760
- const CreatePostVideo = ({ socialLinkData, setSocialLinkData, }) => {
761
- const { t } = useTranslations();
762
- const [activeModal, setActiveModal] = useState(false);
763
- const handleClick = () => {
764
- setActiveModal(true);
765
- };
766
- return (React__default.createElement("div", { className: "input-group" },
767
- React__default.createElement(StyleSessionRow, { onClick: handleClick },
768
- React__default.createElement("img", { alt: "anonymous-icon", src: IconVideo, style: {
769
- width: '18px',
770
- height: '18px',
771
- objectFit: 'contain',
772
- marginLeft: 'auto',
773
- } }),
774
- React__default.createElement("div", { className: "session-title" }, t('createPost.videoOrLink'))),
775
- React__default.createElement(SocialLinkPopup, { isOpen: activeModal, onClose: () => setActiveModal(false), onSocialLinkChanged: setSocialLinkData, socialLinkData: socialLinkData })));
776
- };
777
-
778
- const StyleReviewPhoto = styled.div `
779
- .mantine-Text-root {
780
- margin-bottom: 4px;
781
- }
782
- .preview-images-container {
783
- display: flex;
784
- gap: 8px;
785
- overflow-x: auto;
786
- overflow-y: hidden;
787
- .image-src-wrapper {
788
- flex: 0 0 140px;
789
- width: 140px;
790
- height: 96px;
791
- border-radius: 4px;
792
- position: relative;
793
- img {
794
- border-radius: 4px;
795
- }
796
- .icon-close {
797
- position: absolute;
798
- top: 6px;
799
- right: 6px;
800
- cursor: pointer;
801
- z-index: 10;
802
- max-height: 24px;
803
- max-width: 24px;
804
- }
805
- }
806
- }
807
- `;
808
-
809
- const PostPhotosReview = ({ error, imageFiles: imageFilesInit, setImageFiles, removeKeyError, }) => {
810
- const { t } = useTranslations();
811
- const { imageSrcs, onRemoveImage } = useImagePicker(imageFilesInit, setImageFiles);
812
- return (React__default.createElement(StyleReviewPhoto, { className: "input-group" },
813
- React__default.createElement(Text, { size: "p5", weight: "semiBold" }, t('createPost.photos')),
814
- React__default.createElement("div", { className: "preview-images-container" }, imageSrcs === null || imageSrcs === void 0 ? void 0 : imageSrcs.map((src, index) => {
815
- return (React__default.createElement("div", { className: "image-src-wrapper", key: index },
816
- React__default.createElement("img", { src: src, className: "preview-image", alt: "", style: {
817
- width: '100%',
818
- height: '100%',
819
- objectFit: 'cover',
820
- } }),
821
- React__default.createElement("img", { alt: "", className: "icon-close", src: IconCloseCircle, onClick: () => {
822
- removeKeyError && removeKeyError('photos');
823
- onRemoveImage(index);
824
- } })));
825
- })),
826
- error && (error === null || error === void 0 ? void 0 : error.photos) && (React__default.createElement(StyledError, null,
827
- React__default.createElement(Text, { size: "p5", color: theme.colors.red600 }, error.photos)))));
828
- };
829
-
830
- const inputModify = (value, opts) => {
831
- var _a;
832
- const { formatUrl, bannedWords = [] } = opts || {};
833
- const removedFormat = fixMalformedMention(removeFontFormat(value));
834
- if (!formatUrl)
835
- return {
836
- value: highlightBadWords(removedFormat, bannedWords),
837
- };
838
- let descriptionWithWrappedAnchor = removeEdittedBannedWord(wrapAnchorAroundUrls(removedFormat));
839
- const urls = getUrlsFromEditorString(removedFormat);
840
- if (urls) {
841
- const invalidUrls = [];
842
- let previewUrl = '';
843
- urls.forEach((url) => {
844
- if (!url)
845
- return;
846
- try {
847
- const jsUrl = new URL(url);
848
- // Check url has must into domain hellohealthgroup
849
- if (!ALLOW_DOMAIN_URL.some((o) => jsUrl.origin.endsWith(o))) {
850
- invalidUrls.push('notification.limitUrlDomain');
851
- return;
852
- }
853
- // Check url have special character
854
- if (url.endsWith('&')) {
855
- invalidUrls.push('notification.urlWrongFormat');
856
- return;
857
- }
858
- }
859
- catch (_a) {
860
- invalidUrls.push(url);
861
- }
862
- });
863
- if (invalidUrls.length > 0) {
864
- descriptionWithWrappedAnchor = descriptionWithWrappedAnchor
865
- .replace(new RegExp(`data-url="true">(${invalidUrls.map(escapeRegExp).join('|')})<`, 'gi'), 'data-error="true" data-url="true">$1<')
866
- .replace(new RegExp(`data-href="(${invalidUrls
867
- .map(escapeRegExp)
868
- .join('|')})" data-url="true">`, 'gi'), 'data-href="$1" data-error="true" data-url="true">');
869
- }
870
- previewUrl = (_a = urls.filter((u) => invalidUrls.indexOf(u) === -1)) === null || _a === void 0 ? void 0 : _a[0];
871
- return {
872
- invalidUrls,
873
- previewUrl,
874
- value: highlightBadWords(descriptionWithWrappedAnchor, bannedWords),
875
- };
876
- }
877
- return {
878
- value: highlightBadWords(descriptionWithWrappedAnchor, bannedWords),
879
- };
880
- };
881
- const usePreviewUrl = (bannedWords, onChange) => {
882
- const { data: { locale }, } = useContext(TogetherComponentGlobalContext);
883
- const [previewUrl, setPreviewUrl] = useState(null);
884
- const bannedWordsRef = useRef([]);
885
- bannedWordsRef.current = bannedWords;
886
- const fetchPreviewData = (url) => {
887
- if (!previewUrl || previewUrl.url !== url) {
888
- setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl({
889
- url,
890
- isFetching: true,
891
- });
892
- callApi(getApiPath(PATHS.FETCH_PREVIEW, {
893
- _locale: locale,
894
- }), 'POST', {
895
- data: {
896
- link: url,
897
- },
898
- headers: {
899
- 'Content-Type': 'application/json',
900
- },
901
- })
902
- .then((res) => {
903
- var _a, _b, _c, _d;
904
- setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl({
905
- title: (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.title,
906
- description: (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.description,
907
- 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),
908
- url,
909
- });
910
- })
911
- .catch(() => {
912
- setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
913
- });
914
- }
915
- };
916
- const fetchPreviewDataRef = useRef(fetchPreviewData);
917
- fetchPreviewDataRef.current = fetchPreviewData;
918
- const [invalidUrls, setInvalidUrls] = useState([]);
919
- const debounceInputModify = useCallback(debounce((v) => {
920
- if (v) {
921
- const processedInput = inputModify(v, {
922
- bannedWords: bannedWordsRef.current,
923
- formatUrl: true,
924
- });
925
- const { invalidUrls: _invalidUrls, previewUrl: _previewUrl, value, } = processedInput;
926
- if (_invalidUrls && (_invalidUrls === null || _invalidUrls === void 0 ? void 0 : _invalidUrls.length)) {
927
- setInvalidUrls(_invalidUrls);
928
- setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
929
- }
930
- else {
931
- setInvalidUrls([]);
932
- if (_previewUrl) {
933
- fetchPreviewDataRef.current(_previewUrl);
934
- }
935
- else
936
- setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
937
- if (value !== v) {
938
- onChange === null || onChange === void 0 ? void 0 : onChange(value);
939
- }
940
- }
941
- }
942
- }, 500), []);
943
- return {
944
- previewUrl,
945
- setPreviewUrl,
946
- invalidUrls,
947
- debounceInputModify,
948
- fetchPreviewData,
949
- };
950
- };
951
-
952
- const StyleReviewVideo = styled.div `
953
- .link-preview-wrapper {
954
- position: relative;
955
- .icon-close {
956
- position: absolute;
957
- top: 6px;
958
- right: 6px;
959
- cursor: pointer;
960
- z-index: 10;
961
- max-width: 24px;
962
- max-height: 24px;
963
- }
964
- }
965
- .mantine-Text-root {
966
- margin-bottom: 4px;
967
- }
968
- `;
969
-
970
- const PostVideoReview = ({ socialLinkData, bannedWords, onChange, onInvalidUrlsChange, onSocialLinkChanged, }) => {
971
- const { t } = useTranslations();
972
- const { invalidUrls, previewUrl, fetchPreviewData, setPreviewUrl } = usePreviewUrl(bannedWords || [], onChange);
973
- useEffect(() => {
974
- if (socialLinkData && socialLinkData.url) {
975
- fetchPreviewData(socialLinkData.url);
976
- }
977
- }, [socialLinkData, fetchPreviewData]);
978
- useEffect(() => {
979
- if (invalidUrls) {
980
- onInvalidUrlsChange === null || onInvalidUrlsChange === void 0 ? void 0 : onInvalidUrlsChange(invalidUrls);
981
- }
982
- }, [invalidUrls]);
983
- return (React__default.createElement(StyleReviewVideo, { className: "input-group" },
984
- React__default.createElement(Text, { size: "p5", weight: "semiBold" }, t('createPost.video')),
985
- React__default.createElement("div", { className: "link-preview-wrapper" }, (socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) && previewUrl && (React__default.createElement("div", { className: "link-preview-wrapper" }, previewUrl.isFetching ? (React__default.createElement(Loading, null)) : (React__default.createElement(React__default.Fragment, null,
986
- React__default.createElement(CardLink, { title: previewUrl.title, url: previewUrl.url || '#', image: previewUrl.image, noRefetch: true }),
987
- React__default.createElement("img", { alt: "", src: IconCloseCircle, className: "icon-close", onClick: () => {
988
- setPreviewUrl(null);
989
- onSocialLinkChanged && onSocialLinkChanged(null);
990
- } }))))))));
991
- };
992
-
993
- const MAX_SIZE_FILE_UPLOAD = 10 * 1024 * 1024;
994
- const applySpecialCharSite = [
995
- LOCALE.PhilippinesEnglish,
996
- LOCALE.PhilippinesTagalog,
997
- LOCALE.Indonesia,
998
- LOCALE.Malaysia,
999
- LOCALE.Vietnam,
1000
- ];
1001
- const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose, communities = [], forceSelectCommunity, forceSelectTopics, articleId, optionalTopic, editPostData, defaultCommunity, defaultTopics, selectAskDoctor, showAskDoctorOptions, userInfo, isMarryBaby = false, }) => {
1002
- const isInEditMode = !!(editPostData === null || editPostData === void 0 ? void 0 : editPostData.id);
1003
- const { data: { locale, router, env: { togetherBasePath }, }, action: { pushNotifications, sanitizeFunction }, } = useContext(TogetherComponentGlobalContext);
1004
- const { asPath } = router || {};
1005
- const { t } = useTranslations();
1006
- // const [isAnonymous, setIsAnonymous] = useState<boolean>(false)
1007
- const [isAskDoctor, setIsAskDoctor] = useState(selectAskDoctor);
1008
- const [specialCharErr, setspecialCharErr] = useState(false);
1009
- const [isSubmitting, setIsSubmitting] = useState(false);
1010
- const [titleValue, setTitleValue] = useState('');
1011
- const [descriptionValue, setDescriptionValue] = useState('');
1012
- const [communityValue, setCommunityValue] = useState(forceSelectCommunity
1013
- ? {
1014
- label: forceSelectCommunity.name,
1015
- value: `${forceSelectCommunity.id || ''}-${forceSelectCommunity.mappedCategoryId || ''}`,
1016
- }
1017
- : {
1018
- label: t('community.choose'),
1019
- value: '',
1020
- });
1021
- const [selectedTopics, setSelectedTopics] = useState([...forceSelectTopics] || []);
1022
- const [socialLinkData, setSocialLinkData] = useState();
1023
- const [error, setError] = useState({});
1024
- const [imageFiles, setImageFiles] = useState([]);
1025
- const [bannedWords, setBannedWords] = useState([]);
1026
- const [postActionValue, setPostActionValue] = useState({
1027
- label: t('cardPost.public'),
1028
- value: 'public',
1029
- });
1030
- const { imageSrcs = [] } = useImagePicker(imageFiles);
1031
- const currentCommunity = forceSelectCommunity ||
1032
- communities.find((c) => `${c.id || ''}-${c.mappedCategoryId || ''}` === communityValue.value);
1033
- const communitiesList = forceSelectCommunity
1034
- ? [forceSelectCommunity]
1035
- : communities
1036
- .filter((c) => c.isActive)
1037
- .sort((a, b) => {
1038
- if (a.name > b.name)
1039
- return 1;
1040
- if (a.name < b.name)
1041
- return -1;
1042
- return 0;
1043
- });
1044
- const [previewUrl, setPreviewUrl] = useState(null);
1045
- const [invalidUrls, setInvalidUrls] = useState([]);
1046
- const isReadyToSubmit = titleValue &&
1047
- !specialCharErr &&
1048
- innertext(descriptionValue) &&
1049
- (optionalTopic || (!optionalTopic && selectedTopics.length > 0)) &&
1050
- currentCommunity &&
1051
- (!imageFiles || imageFiles.length <= MAX_IMAGE_UPLOADS) &&
1052
- !(invalidUrls === null || invalidUrls === void 0 ? void 0 : invalidUrls.length) &&
1053
- !isSubmitting;
1054
- const postActionType = [
1055
- {
1056
- label: t('cardPost.public'),
1057
- value: 'public',
1058
- icon: (React__default.createElement("img", { alt: "anonymous-icon", src: IconPublic, style: {
1059
- width: '100%',
1060
- height: '100%',
1061
- objectFit: 'contain',
1062
- marginLeft: 'auto',
1063
- } })),
1064
- },
1065
- {
1066
- label: t('cardPost.anonymous'),
1067
- value: 'anonymous',
1068
- icon: (React__default.createElement("img", { alt: "anonymous-icon", src: IconAnonymous, style: {
1069
- width: '100%',
1070
- height: '100%',
1071
- objectFit: 'contain',
1072
- marginLeft: 'auto',
1073
- } })),
1074
- },
1075
- ];
1076
- // HANDLE etra action when OPEN AND CLOSE
1077
- useEffect(() => {
1078
- if (editPostData) {
1079
- const post = editPostData;
1080
- setTitleValue(post.title || '');
1081
- setDescriptionValue(decodeMention(decodePostUrl(post.description || '', 'edit'), post.mentions));
1082
- setCommunityValue({
1083
- label: post.community.name,
1084
- value: `${post.community.id || ''}-${post.community.mappedCategoryId || ''}`,
1085
- });
1086
- setSelectedTopics(post.topics || []);
1087
- setImageFiles(post.photos || []);
1088
- // setIsAnonymous(!!post.isAnonymous || false)
1089
- setIsAskDoctor(!!post.isAskDoctor || false);
1090
- }
1091
- else {
1092
- if (defaultCommunity) {
1093
- setCommunityValue({
1094
- label: defaultCommunity.name,
1095
- value: `${defaultCommunity.id || ''}-${defaultCommunity.mappedCategoryId || ''}`,
1096
- });
1097
- }
1098
- if (defaultTopics) {
1099
- setSelectedTopics(defaultTopics);
1100
- }
1101
- }
1102
- }, []);
1103
- useEffect(() => {
1104
- setspecialCharErr(applySpecialCharSite.includes(locale) &&
1105
- titleValue !== '' &&
1106
- !/[a-zA-Z]/.test(titleValue));
1107
- setError({});
1108
- }, [titleValue]);
1109
- const onCreateEditSuccess = (res) => {
1110
- if (onPostCreatedEdited) {
1111
- onPostCreatedEdited(formatPost(res), isInEditMode);
1112
- }
1113
- onClose && onClose();
1114
- };
1115
- const validationUploadPhoto = (files) => {
1116
- const errorMessage = Object.assign({}, error);
1117
- if (files && files.length > 10) {
1118
- errorMessage.photos = t('createPost.message.photoMaxium');
1119
- }
1120
- if (files && files.length) {
1121
- const inValidSizeFile = files.some((file) => (file === null || file === void 0 ? void 0 : file.size) > MAX_SIZE_FILE_UPLOAD);
1122
- if (inValidSizeFile) {
1123
- errorMessage.photos = t('createPost.message.photoSize');
1124
- }
1125
- }
1126
- setError(errorMessage);
1127
- };
1128
- const validationPost = () => {
1129
- let hasError = false;
1130
- const errorMessage = {};
1131
- const description = innertext(descriptionValue);
1132
- if (!description) {
1133
- errorMessage.description = t('createPost.message.requiredDescription');
1134
- hasError = true;
1135
- }
1136
- if (isInEditMode && !titleValue) {
1137
- errorMessage.title = t('createPost.message.requiredTitle');
1138
- hasError = true;
1139
- }
1140
- if (description && description.split(' ').length < 10) {
1141
- errorMessage.description = t('createPost.message.lengthDescription');
1142
- hasError = true;
1143
- }
1144
- if (showAskDoctorOptions &&
1145
- !(errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.description) &&
1146
- typeof isAskDoctor === 'undefined') {
1147
- errorMessage.askDoctor = t('createPost.message.askDoctorRequireMess');
1148
- hasError = true;
1149
- }
1150
- if (imageFiles && imageFiles.length > 10) {
1151
- errorMessage.photos = t('createPost.message.photoMaxium');
1152
- hasError = true;
1153
- }
1154
- if (imageFiles && imageFiles.length) {
1155
- const inValidSizeFile = imageFiles.some((file) => (file === null || file === void 0 ? void 0 : file.size) > MAX_SIZE_FILE_UPLOAD);
1156
- if (inValidSizeFile) {
1157
- errorMessage.photos = t('createPost.message.photoSize');
1158
- hasError = true;
1159
- }
1160
- }
1161
- if (invalidUrls && invalidUrls.length) {
1162
- errorMessage.video = 'Invalid video url';
1163
- hasError = true;
1164
- }
1165
- setError(errorMessage);
1166
- return hasError;
1167
- };
1168
- const removeKeyError = (deleteKey) => {
1169
- if (error[deleteKey]) {
1170
- const _a = Object.assign({}, error), _b = `${deleteKey}`, value = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
1171
- setError(rest);
1172
- console.log(value);
1173
- }
1174
- };
1175
- const submitPost = () => __awaiter(void 0, void 0, void 0, function* () {
1176
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1177
- const isError = validationPost();
1178
- if (isError)
1179
- return;
1180
- const bodyFormData = yield getPostFormData({
1181
- title: titleValue,
1182
- description: descriptionValue,
1183
- communityId: String((currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.id) || ''),
1184
- imageFiles,
1185
- previewUrl,
1186
- topicIds: selectedTopics === null || selectedTopics === void 0 ? void 0 : selectedTopics.map((topic) => String(topic.id || '')).filter(Boolean),
1187
- locale,
1188
- sanitizeFunction,
1189
- categoryCommunityId: String((currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.mappedCategoryId) || ''),
1190
- categoryTopicIds: selectedTopics === null || selectedTopics === void 0 ? void 0 : selectedTopics.map((topic) => String((topic === null || topic === void 0 ? void 0 : topic.mappedCategoryId) || '')).filter(Boolean),
1191
- isAnonymous: (postActionValue === null || postActionValue === void 0 ? void 0 : postActionValue.value) === 'anonymous' ? 1 : 0,
1192
- isAskDoctor: isAskDoctor ? 1 : 0,
1193
- introUrl: (socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) || '',
1194
- });
1195
- if (articleId) {
1196
- bodyFormData.append('article_id', articleId);
1197
- }
1198
- let res;
1199
- if (isInEditMode) {
1200
- if (editPostData === null || editPostData === void 0 ? void 0 : editPostData.id) {
1201
- res = yield editPost({
1202
- id: editPostData.id,
1203
- formData: bodyFormData,
1204
- locale,
1205
- });
1206
- }
1207
- }
1208
- else {
1209
- res = yield createPost({
1210
- formData: bodyFormData,
1211
- locale,
1212
- isArticleComment: !(currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.id) && !!(currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.mappedCategoryId),
1213
- });
1214
- }
1215
- const resData = res === null || res === void 0 ? void 0 : res.data;
1216
- 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)) {
1217
- pushNotifications({
1218
- message: t('createPost.popup.success'),
1219
- type: 'success',
1220
- });
1221
- onCreateEditSuccess(resData);
1222
- }
1223
- else {
1224
- 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') {
1225
- pushNotifications({
1226
- title: t('notification.post.blocked.title'),
1227
- message: t('notification.post.blocked.message'),
1228
- type: 'danger',
1229
- });
1230
- if (res.messages.moderation.words) {
1231
- setBannedWords(res.messages.moderation.words);
1232
- }
1233
- }
1234
- 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') {
1235
- pushNotifications({
1236
- title: t('notification.post.suspect.title'),
1237
- message: t('notification.post.suspect.message'),
1238
- type: 'warning',
1239
- });
1240
- onClose && onClose();
1241
- }
1242
- 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')); })) {
1243
- pushNotifications({
1244
- message: t('notification.suspend.message'),
1245
- type: 'danger',
1246
- });
1247
- onClose && onClose();
1248
- }
1249
- else {
1250
- pushNotifications({
1251
- message: ((_j = res === null || res === void 0 ? void 0 : res.messages) === null || _j === void 0 ? void 0 : _j[0]) || t('notification.failure'),
1252
- type: 'danger',
1253
- });
1254
- }
1255
- }
1256
- });
1257
- return (React__default.createElement(StyledCreateNewPost, { className: `${className} create-post-popup-frame`, style: style },
1258
- React__default.createElement("div", { className: "input-group-container" },
1259
- React__default.createElement(StyledFormGroupInner, null,
1260
- React__default.createElement("div", { className: "input-group" },
1261
- React__default.createElement(StylePostAction, null,
1262
- React__default.createElement("div", { className: "avatar" }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) ? (React__default.createElement("img", { alt: "avatar-icon", src: userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar, style: {
1263
- width: '100%',
1264
- height: '100%',
1265
- objectFit: 'contain',
1266
- marginLeft: 'auto',
1267
- } })) : (React__default.createElement(CardAuthor, { showDetailPopup: false, avatar: "", avatarProps: { size: 40 }, name: userInfo === null || userInfo === void 0 ? void 0 : userInfo.name, userId: userInfo === null || userInfo === void 0 ? void 0 : userInfo.userId, className: "author-avatar" }))),
1268
- React__default.createElement("div", { className: "post-action-form" },
1269
- React__default.createElement("div", { className: "post-action-by" }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || ''),
1270
- React__default.createElement(Dropdown, { disabled: isInEditMode, options: postActionType, id: "post-action-type", size: "sm", className: "dropdown-post-action", placeholder: t('community.choose'), value: postActionValue, onChange: (option) => {
1271
- setPostActionValue({
1272
- label: option.label,
1273
- value: String(option.value),
1274
- });
1275
- }, placeholderIcon: React__default.createElement("div", { className: "post-action-result" }, postActionValue.value === 'public' ? (React__default.createElement("img", { alt: "public-icon", src: IconPublic, style: {
1276
- width: '100%',
1277
- height: '100%',
1278
- objectFit: 'contain',
1279
- marginLeft: 'auto',
1280
- } })) : (React__default.createElement("img", { alt: "anonymous-icon", src: IconAnonymous, style: {
1281
- width: '100%',
1282
- height: '100%',
1283
- objectFit: 'contain',
1284
- marginLeft: 'auto',
1285
- } }))), style: {
1286
- zIndex: 10,
1287
- width: 'calc(100% + 20px)',
1288
- } })))),
1289
- React__default.createElement(CreatePostTitle, { className: "input-group", bannedWords: bannedWords, value: titleValue, onChange: setTitleValue }),
1290
- specialCharErr && (React__default.createElement(StyledError, null,
1291
- React__default.createElement(Info, { isSolid: true, color: theme.colors.red700, size: 14 }),
1292
- React__default.createElement(Text, { size: "p3", as: "span", color: theme.colors.red700 }, t('createPost.popup.specialCharErr')))),
1293
- React__default.createElement("div", { className: "input-group" },
1294
- React__default.createElement(CreatePostDescription, { bannedWords: bannedWords, value: descriptionValue, onChange: (v) => {
1295
- setDescriptionValue(v);
1296
- removeKeyError('description');
1297
- }, onPreviewUrlChange: setPreviewUrl, onInvalidUrlsChange: setInvalidUrls, onImageFilesChange: setImageFiles, imageFiles: imageFiles, className: `${error && (error === null || error === void 0 ? void 0 : error.description) ? 'error-description' : ''} ${showAskDoctorOptions ? 'has-ask-doctor-option' : ''}`, footerEditor: React__default.createElement(React__default.Fragment, null,
1298
- showAskDoctorOptions && (React__default.createElement(StyledIsQuestion, { color: "", className: `${error && (error === null || error === void 0 ? void 0 : error.askDoctor) ? 'has-error' : ''} ${error && (error === null || error === void 0 ? void 0 : error.description) ? 'error-description' : ''}` },
1299
- React__default.createElement("div", { className: "switch-label" },
1300
- React__default.createElement(Ask, { size: isMarryBaby ? 32 : 24, isMarryBaby: isMarryBaby }),
1301
- React__default.createElement("div", { className: "wrapper-text" },
1302
- React__default.createElement("div", { className: "label-txt" }, t('createPost.askDoctor')),
1303
- React__default.createElement("div", { className: "description-txt" }, t('createPost.askDoctor.description')))),
1304
- React__default.createElement(BtnChoice, { value: isAskDoctor, choices: [
1305
- {
1306
- label: t('createPost.askDoctorChoice.yes'),
1307
- value: true,
1308
- dataEventCategory: 'Together',
1309
- dataEventAction: 'Write Post Click - Ask Doctor',
1310
- dataEventLabel: getCurrentHref(locale, togetherBasePath, asPath),
1311
- },
1312
- {
1313
- label: t('createPost.askDoctorChoice.no'),
1314
- value: false,
1315
- },
1316
- ], onChange: (v) => {
1317
- if (typeof v === 'boolean') {
1318
- setIsAskDoctor(v);
1319
- removeKeyError('askDoctor');
1320
- }
1321
- } }))),
1322
- error && (error === null || error === void 0 ? void 0 : error.askDoctor) && (React__default.createElement(StyledError, { style: { margin: '4px 0 0' } },
1323
- React__default.createElement(Text, { size: "p5", as: "span", color: theme.colors.red600 }, error.askDoctor))),
1324
- error && (error === null || error === void 0 ? void 0 : error.description) && (React__default.createElement(StyledError, { style: { margin: '4px 0 0' } },
1325
- React__default.createElement(Text, { size: "p5", as: "span", color: theme.colors.red600 }, error.description)))) })),
1326
- imageSrcs.length > 0 && (React__default.createElement(PostPhotosReview, { imageFiles: imageFiles, error: error, setImageFiles: setImageFiles, removeKeyError: removeKeyError })),
1327
- socialLinkData && (React__default.createElement(PostVideoReview, { bannedWords: bannedWords, socialLinkData: socialLinkData, onSocialLinkChanged: setSocialLinkData, onInvalidUrlsChange: setInvalidUrls, onChange: (v) => {
1328
- setDescriptionValue(v);
1329
- } })),
1330
- React__default.createElement(CreatePostCommunity, { communitiesList: communitiesList, currentCommunity: currentCommunity, selectedTopics: selectedTopics, forceTopics: forceSelectTopics, communityValue: communityValue, error: error, isFullscreen: false, isInEditMode: isInEditMode, setSelectedTopics: setSelectedTopics, setCommunityValue: setCommunityValue }),
1331
- React__default.createElement(CreatePostPhotos, { imageFiles: imageFiles, setImageFiles: (data) => {
1332
- setImageFiles(data);
1333
- validationUploadPhoto(data);
1334
- } }),
1335
- React__default.createElement(CreatePostVideo, { socialLinkData: socialLinkData, setSocialLinkData: setSocialLinkData }))),
1336
- React__default.createElement("div", { className: "form-action" },
1337
- React__default.createElement("div", { className: "input-group" },
1338
- React__default.createElement(Button, { className: "submit-btn pointer-event-child-none", size: "lg", "data-event-category": "Ask Doctor", "data-event-action": "Submit Question", "data-event-label": window.location.href, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
1339
- if (isReadyToSubmit && !isSubmitting) {
1340
- setIsSubmitting(true);
1341
- try {
1342
- yield submitPost();
1343
- }
1344
- catch (e) {
1345
- console.error(e);
1346
- pushNotifications(getDefaultFailNoti(t));
1347
- }
1348
- setIsSubmitting(false);
1349
- }
1350
- }), disabled: !isReadyToSubmit, loading: isSubmitting }, t('createPost.popup.submit'))))));
1351
- };
1352
-
1353
- const StyledTopicSelectList = styled.div `
1354
- display: flex;
1355
- width: 100%;
1356
- flex-wrap: wrap;
1357
- margin-top: 1rem;
1358
-
1359
- .tag-item {
1360
- min-height: 32px;
1361
- padding: 5px 12px;
1362
- border: 1px solid ${theme.colors.neutral100};
1363
- margin-right: 1rem;
1364
- margin-bottom: 8px;
1365
- border-radius: 1rem;
1366
- color: ${theme.colors.gray800};
1367
- cursor: pointer;
1368
- font-size: 13px;
1369
- line-height: 22px;
1370
- transition: all 0.2s;
1371
-
1372
- &.--active {
1373
- border-color: ${theme.colors.primary50};
1374
- background: ${theme.colors.primary50};
1375
- color: ${theme.colors.primaryBase};
1376
- }
1377
- &[data-disabled='true'] {
1378
- background: ${theme.colors.gray100};
1379
- color: ${theme.colors.gray800};
1380
- }
1381
- }
1382
- .topic-spinner {
1383
- margin-right: auto;
1384
- margin-left: auto;
1385
- & > button {
1386
- width: 24px;
1387
- height: 24px;
1388
- }
1389
- }
1390
- &[data-is-marrybaby='true'] {
1391
- .tag-item {
1392
- border-color: transparent;
1393
- background: #f3f3f3;
1394
- color: #3e3f58;
1395
- &.--active {
1396
- border-color: #b6cdff;
1397
- background: #e0e9fb;
1398
- color: #3e3f58;
1399
- }
1400
- }
1401
- }
1402
- `;
1403
-
1404
- const TopicSelectList = ({ className, style, topics: topicsProp, communityId, onChange, isLoading, disabled, forceTopics, selectedTopics: selectedTopicsProp, noFetch, dataEventCategory, dataEventAction, dataEventLabel, }) => {
1405
- const { data: { locale, env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
1406
- const [topics, setTopics] = useState(topicsProp ? [...topicsProp] : []);
1407
- const [selectedTopics, setSelectedTopics] = useState(selectedTopicsProp ? [...selectedTopicsProp] : []);
1408
- const [isLoadingTopics, setIsLoadingTopics] = useState(false);
1409
- const topicsPropRef = useRef(topicsProp);
1410
- topicsPropRef.current = topicsProp;
1411
- useEffect(() => {
1412
- var _a;
1413
- if (communityId && !noFetch && !((_a = topicsPropRef.current) === null || _a === void 0 ? void 0 : _a.length)) {
1414
- setTopics([]);
1415
- setIsLoadingTopics(true);
1416
- (() => __awaiter(void 0, void 0, void 0, function* () {
1417
- var _b;
1418
- try {
1419
- const res = yield callApi(getApiPath(PATHS.TOPIC.LIST, {
1420
- communityId: communityId,
1421
- _locale: locale,
1422
- }), 'GET');
1423
- const topicRes = (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.topics;
1424
- if (Array.isArray(topicRes)) {
1425
- setTopics(() => (topicRes === null || topicRes === void 0 ? void 0 : topicRes.map(formatTopic).sort((t1, t2) => (t1.order || 0) - (t2.order || 0))) || []);
1426
- }
1427
- }
1428
- catch (e) {
1429
- console.log(e);
1430
- setIsLoadingTopics(false);
1431
- }
1432
- setIsLoadingTopics(false);
1433
- }))();
1434
- }
1435
- }, [communityId, noFetch]);
1436
- const topicsPropString = topicsProp === null || topicsProp === void 0 ? void 0 : topicsProp.map((t) => t.id).join('-');
1437
- const topicsStateString = topics === null || topics === void 0 ? void 0 : topics.map((t) => t.id).join('-');
1438
- const forceTopicsPropString = forceTopics === null || forceTopics === void 0 ? void 0 : forceTopics.map((t) => t.id).join('-');
1439
- useEffect(() => {
1440
- if (topicsProp &&
1441
- typeof topicsPropString !== 'undefined' &&
1442
- topicsPropString !== topicsStateString) {
1443
- setTopics(topicsProp);
1444
- }
1445
- }, [topicsProp, topicsPropString, topicsStateString]);
1446
- const topicsWithoutForced = useMemo(() => topics.filter((t) => !(forceTopics === null || forceTopics === void 0 ? void 0 : forceTopics.some((ft) => (ft.id && ft.id === t.id) ||
1447
- (ft.mappedCategoryId &&
1448
- ft.mappedCategoryId === t.mappedCategoryId)))), [topicsStateString, forceTopicsPropString]);
1449
- return (React__default.createElement(StyledTopicSelectList, { "data-is-marrybaby": isMarryBaby, className: className, style: style },
1450
- forceTopics.map((topic) => (React__default.createElement(TopicItem, { key: `${topic.id}-${topic.mappedCategoryId}`, topic: topic, disabled: true, selected: true, dataEventAction: dataEventAction, dataEventCategory: dataEventCategory, dataEventLabel: dataEventLabel }))),
1451
- topicsWithoutForced.map((topic) => (React__default.createElement(TopicItem, { key: `${topic.id}-${topic.mappedCategoryId}`, topic: topic, disabled: disabled, selected: (selectedTopicsProp || selectedTopics).some((t) => (t.id && t.id === topic.id) ||
1452
- (t.mappedCategoryId &&
1453
- t.mappedCategoryId === topic.mappedCategoryId)), onClick: () => {
1454
- const _selected = selectedTopicsProp || selectedTopics;
1455
- const foundIndex = _selected.findIndex((_selected) => (_selected.id && _selected.id === topic.id) ||
1456
- (_selected.mappedCategoryId &&
1457
- _selected.mappedCategoryId === topic.mappedCategoryId));
1458
- if (foundIndex !== -1) {
1459
- _selected.splice(foundIndex, 1);
1460
- }
1461
- else {
1462
- _selected.push(topic);
1463
- }
1464
- if (onChange && selectedTopicsProp) {
1465
- onChange(_selected.slice());
1466
- }
1467
- else {
1468
- onChange && onChange(_selected.slice());
1469
- setSelectedTopics(_selected.slice());
1470
- }
1471
- }, dataEventAction: dataEventAction, dataEventCategory: dataEventCategory, dataEventLabel: dataEventLabel }))),
1472
- (isLoading || isLoadingTopics) && React__default.createElement(Loading$1, { className: "topic-spinner" })));
1473
- };
1474
- const TopicItem = (_a) => {
1475
- var { topic, disabled, selected, onClick } = _a, rest = __rest(_a, ["topic", "disabled", "selected", "onClick"]);
1476
- return (React__default.createElement("div", Object.assign({ className: 'tag-item' + (selected ? ' --active' : ''), "data-disabled": disabled, onClick: !disabled ? onClick : undefined }, rest), topic.name));
1477
- };
1478
-
1479
- var styles = {"skipBtn":"KsWg8i6","alertHeading":"_9tS0EUN","alertDesc":"kyyRKlb","alertAction":"-Uqqka-"};
1480
-
1481
- const SkipQuestionOfExpertBtn = (_a) => {
1482
- var { post, onSkip, btnText, currentPageUrl } = _a, rest = __rest(_a, ["post", "onSkip", "btnText", "currentPageUrl"]);
1483
- const { t } = useTranslations();
1484
- const { data: { locale }, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
1485
- const [showAlert, setShowAlert] = useState(false);
1486
- const [loading, setLoading] = useState(false);
1487
- const _theme = useMantineTheme();
1488
- const handleSkip = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
1489
- var _b;
1490
- setLoading(true);
1491
- const res = yield callApiWithAuth(getApiPath(PATHS.USER.SKIP_QUESTION, {
1492
- _locale: locale,
1493
- id: post === null || post === void 0 ? void 0 : post.id,
1494
- }), 'PUT');
1495
- if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
1496
- 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) || '' });
1497
- setShowAlert(false);
1498
- pushNotifications({
1499
- title: '',
1500
- message: 'Skip success',
1501
- type: 'success',
1502
- });
1503
- }
1504
- else {
1505
- pushNotifications({
1506
- title: '',
1507
- message: res === null || res === void 0 ? void 0 : res.messages,
1508
- type: 'danger',
1509
- });
1510
- }
1511
- setLoading(false);
1512
- }), []);
1513
- return (React__default.createElement(Popover, { width: 327, withArrow: true, shadow: "md", opened: showAlert },
1514
- React__default.createElement(Popover.Target, null,
1515
- React__default.createElement("div", Object.assign({ className: `${styles.skipBtn} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}`, onClick: () => setShowAlert(true) }, rest), btnText || t('profilePanel.questionNotClear'))),
1516
- React__default.createElement(Popover.Dropdown, null,
1517
- React__default.createElement("div", null,
1518
- React__default.createElement("div", { className: styles.alertHeading }, t('profilePanel.skipQuestion.heading')),
1519
- React__default.createElement("div", { className: styles.alertDesc }, t('profilePanel.skipQuestion.content')),
1520
- React__default.createElement("div", { className: styles.alertAction },
1521
- React__default.createElement(Button, { size: "md", variant: "secondary", leftIcon: React__default.createElement(Close, { color: _theme.fn.primaryColor(), size: 24 }), onClick: () => setShowAlert(false), styles: () => ({
1522
- leftIcon: {
1523
- marginRight: 0,
1524
- },
1525
- }) }),
1526
- React__default.createElement(Button, { variant: "primary", size: "md", leftIcon: React__default.createElement(Check, { color: 'white', size: 24 }), onClick: handleSkip, loading: loading, "data-event-category": "Together", "data-event-action": "Unclear Question Click", "data-event-label": currentPageUrl, styles: () => ({
1527
- leftIcon: {
1528
- marginRight: 0,
1529
- },
1530
- }) }))))));
1531
- };
1532
-
1533
- export { CreateNewPostContent as C, SkipQuestionOfExpertBtn as S, TopicSelectList as T, CreatePostDescription as a, CreatePostTitle as b };