@hhgtech/hhg-components 1.29.333 → 1.29.334-beta-1

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 (591) hide show
  1. package/build/{LastPeriod-3501cce0.js → LastPeriod-b829cab9.js} +1 -1
  2. package/build/{MobileBottomNavigationIcon-1ab5dd0b.js → MobileBottomNavigationIcon-57554ccb.js} +3 -3
  3. package/build/{Spinner-0640b397.js → Spinner-4f558116.js} +1 -1
  4. package/build/{WhatsApp-66230707.js → WhatsApp-af0830fe.js} +1 -1
  5. package/build/adapters.js +19 -19
  6. package/build/atoms.js +49 -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/adapters/button/index.d.ts +3 -1
  13. package/build/components/atoms/drawerComponent/index.d.ts +8 -0
  14. package/build/components/atoms/drawerComponent/index.styled.d.ts +7 -0
  15. package/build/components/atoms/googleLocation/index.d.ts +7 -0
  16. package/build/components/atoms/index.d.ts +1 -0
  17. package/build/components.js +134 -131
  18. package/build/{constants-d3568772.js → constants-bbcf29ec.js} +1 -1
  19. package/build/constants.js +3 -3
  20. package/build/constantsDomainLocales.js +1 -1
  21. package/build/constantsRiskScreener.js +2 -2
  22. package/build/constantsSite.js +2 -2
  23. package/build/{core-c51aab6f.js → core-ceaaff44.js} +1 -1
  24. package/build/{dataTransform-b2def167.js → dataTransform-744c0776.js} +1 -1
  25. package/build/ecom.js +4 -4
  26. package/build/{editor-fc70e4aa.js → editor-64f2bf27.js} +12 -11
  27. package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
  28. package/build/embeddedHeathToolCards_babyPoop.js +19 -19
  29. package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
  30. package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
  31. package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
  32. package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  33. package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  34. package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
  35. package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
  36. package/build/esm/{LastPeriod-e91b4596.js → LastPeriod-fd5114dd.js} +1 -1
  37. package/build/esm/{MobileBottomNavigationIcon-b75ea988.js → MobileBottomNavigationIcon-4e0fbb01.js} +3 -3
  38. package/build/esm/{Spinner-8e3a42ec.js → Spinner-912c6f34.js} +1 -1
  39. package/build/esm/{WhatsApp-b556539f.js → WhatsApp-f2d8fb5b.js} +1 -1
  40. package/build/esm/adapters.js +19 -19
  41. package/build/esm/atoms.js +48 -46
  42. package/build/esm/babyGrowth.js +83 -83
  43. package/build/esm/cache.js +2 -2
  44. package/build/esm/care.js +17 -17
  45. package/build/esm/careBookingSearchBar.js +14 -14
  46. package/build/esm/careBookingSearchBarV2.js +15 -15
  47. package/build/esm/components/adapters/button/index.d.ts +3 -1
  48. package/build/esm/components/atoms/drawerComponent/index.d.ts +8 -0
  49. package/build/esm/components/atoms/drawerComponent/index.styled.d.ts +7 -0
  50. package/build/esm/components/atoms/googleLocation/index.d.ts +7 -0
  51. package/build/esm/components/atoms/index.d.ts +1 -0
  52. package/build/esm/components.js +92 -90
  53. package/build/esm/{constants-b9028dc0.js → constants-09521ace.js} +1 -1
  54. package/build/esm/constants.js +3 -3
  55. package/build/esm/constantsDomainLocales.js +1 -1
  56. package/build/esm/constantsRiskScreener.js +2 -2
  57. package/build/esm/constantsSite.js +2 -2
  58. package/build/esm/{core-d68e4ec1.js → core-56dc0f05.js} +1 -1
  59. package/build/esm/{dataTransform-218076f9.js → dataTransform-e01a7da8.js} +1 -1
  60. package/build/esm/ecom.js +4 -4
  61. package/build/esm/{editor-9e02f4c0.js → editor-30eaf984.js} +12 -12
  62. package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
  63. package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
  64. package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
  65. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
  66. package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
  67. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  68. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  69. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
  70. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
  71. package/build/esm/footer.js +21 -21
  72. package/build/esm/gAssets.js +2 -2
  73. package/build/esm/healthToolsCardWrapper.js +18 -18
  74. package/build/esm/healthToolsForm.js +33 -33
  75. package/build/esm/hooks/usePlacesAutocomplete.d.ts +2 -0
  76. package/build/esm/hooks.js +13 -13
  77. package/build/esm/i18n/translationKeys.d.ts +1 -1
  78. package/build/esm/i18n-values/en-PH.js +14 -1
  79. package/build/esm/i18n-values/hi-IN.js +14 -1
  80. package/build/esm/i18n-values/id-ID.js +14 -1
  81. package/build/esm/i18n-values/km-KH.js +18 -5
  82. package/build/esm/i18n-values/ms-MY.js +14 -1
  83. package/build/esm/i18n-values/my-MM.js +14 -1
  84. package/build/esm/i18n-values/th-TH.js +14 -1
  85. package/build/esm/i18n-values/tl-PH.js +13 -0
  86. package/build/esm/i18n-values/vi-VN.js +16 -3
  87. package/build/esm/i18n-values/vi-VN_MB.js +15 -2
  88. package/build/esm/i18n-values/zh-TW.js +14 -1
  89. package/build/esm/i18n.js +2 -2
  90. package/build/esm/i18nV2.js +2 -2
  91. package/build/esm/icons/ChatbotBg.d.ts +4 -0
  92. package/build/esm/icons/Search.d.ts +4 -0
  93. package/build/esm/icons/index.d.ts +5 -3
  94. package/build/esm/{index-a457bf87.js → index-01b0835c.js} +20 -20
  95. package/build/esm/{index-473c065f.js → index-02d06202.js} +1 -1
  96. package/build/esm/{index-b7e1ef3d.js → index-114de66f.js} +15 -15
  97. package/build/esm/{index-21c2869e.js → index-11d07def.js} +1 -1
  98. package/build/esm/{index-24b2de2a.js → index-1b3d0fb7.js} +13 -13
  99. package/build/esm/{index-62b03b97.js → index-262b1416.js} +2 -2
  100. package/build/esm/{index-2a304ce1.js → index-26e9ffe8.js} +6 -6
  101. package/build/esm/{index-6e442ed0.js → index-2a882430.js} +24 -24
  102. package/build/esm/{index-2c159ce6.js → index-2ae8c1c0.js} +14 -14
  103. package/build/esm/{index-2f3c6684.js → index-34400a59.js} +2 -2
  104. package/build/esm/{index-5804dd94.js → index-363f17cf.js} +21 -21
  105. package/build/esm/{index-c74179d8.js → index-36bec6bb.js} +3 -3
  106. package/build/esm/{index-c4eda3cc.js → index-37fb0987.js} +13 -13
  107. package/build/esm/{index-e8e50140.js → index-386e43b1.js} +13 -13
  108. package/build/esm/{index-51ad17cf.js → index-3992c8d4.js} +17 -17
  109. package/build/esm/{index-91ab3d9d.js → index-3a8b29b4.js} +3 -3
  110. package/build/esm/{index-c729ec0a.js → index-3b662cf8.js} +5 -5
  111. package/build/esm/{index-7cd7b480.js → index-3e4223fe.js} +10 -10
  112. package/build/esm/{index-99d4eb79.js → index-44932361.js} +17 -17
  113. package/build/esm/{index-439b4bfe.js → index-4d6b5301.js} +2 -2
  114. package/build/esm/{index-1c8d49f3.js → index-50127890.js} +2 -2
  115. package/build/esm/{index-6cbf9ed0.js → index-5acd728d.js} +6 -6
  116. package/build/esm/{index-a1251e13.js → index-60bcab63.js} +1 -1
  117. package/build/esm/{index-185f5efb.js → index-6245b66b.js} +2 -2
  118. package/build/esm/{index-096b782e.js → index-662db5b7.js} +24 -24
  119. package/build/esm/{index-5e5aa385.js → index-663f72f5.js} +3 -3
  120. package/build/esm/{index-e1c0db4e.js → index-6a7614d1.js} +7 -7
  121. package/build/esm/{index-b7abfb79.js → index-6c5a0c74.js} +2 -2
  122. package/build/esm/index-6cf33c17.js +4013 -0
  123. package/build/esm/{index-80f969e0.js → index-6fa5ac76.js} +3 -3
  124. package/build/esm/{index-253d88a3.js → index-7418a32c.js} +2 -2
  125. package/build/esm/index-77225364.js +96 -0
  126. package/build/esm/{index-9004583c.js → index-7908e4ff.js} +16 -16
  127. package/build/esm/{index-bdf6d930.js → index-7ed54614.js} +30 -30
  128. package/build/esm/{index-5f5dc772.js → index-7fee70e4.js} +3 -3
  129. package/build/esm/{index-7eb863ca.js → index-813b32e4.js} +17 -17
  130. package/build/esm/{index-a8fdbadd.js → index-81772684.js} +2 -2
  131. package/build/esm/{index-c7ed9040.js → index-89269f7e.js} +2 -2
  132. package/build/esm/{index-c9ef2aac.js → index-8dccb669.js} +18 -18
  133. package/build/esm/{index-bc16a3c1.js → index-915183b3.js} +1 -1
  134. package/build/esm/{index-ca47e561.js → index-98ef5263.js} +3 -3
  135. package/build/esm/{index-05699acf.js → index-993de4d6.js} +13 -13
  136. package/build/esm/{index-666bc3cf.js → index-99655cbc.js} +2 -2
  137. package/build/esm/{index-c179b136.js → index-9ab041aa.js} +1 -1
  138. package/build/esm/{index-cc0d74b1.js → index-a38d2351.js} +16 -16
  139. package/build/esm/{index-5a0b6f7b.js → index-bb193a95.js} +1 -1
  140. package/build/esm/{index-05521115.js → index-bd17eb4a.js} +18 -24
  141. package/build/esm/{index-30e002ed.js → index-c2325b70.js} +32 -32
  142. package/build/esm/{index-fc6b0d66.js → index-cb0a2c0d.js} +7 -7
  143. package/build/esm/{index-8706be0b.js → index-cff2c593.js} +5 -5
  144. package/build/esm/{index-dcc72453.js → index-d53bf495.js} +15 -15
  145. package/build/esm/{index-708e619d.js → index-d57214b0.js} +23 -13
  146. package/build/esm/{index-aa395a65.js → index-db606269.js} +1 -1
  147. package/build/esm/{index-0ac9b969.js → index-dcb2ecbc.js} +2 -2
  148. package/build/esm/{index-032bb6df.js → index-df46e084.js} +3 -3
  149. package/build/esm/{index-f32755fa.js → index-e1ef9807.js} +2 -2
  150. package/build/esm/{index-6bc456cf.js → index-e422ad02.js} +1 -1
  151. package/build/esm/{index-c3edc932.js → index-e47632c4.js} +4 -4
  152. package/build/esm/{index-2d72c00c.js → index-e9bc7d35.js} +16 -16
  153. package/build/esm/{index-961b8d17.js → index-eca43394.js} +16 -16
  154. package/build/esm/{index-cadb6027.js → index-ef1106eb.js} +6 -6
  155. package/build/esm/{index-65c811be.js → index-f8daa1b0.js} +1 -1
  156. package/build/esm/index.css +1 -1
  157. package/build/esm/index.js +146 -117
  158. package/build/esm/{labelSorting-faea0c12.js → labelSorting-7f70ac1e.js} +4 -4
  159. package/build/esm/lead/components/context.d.ts +2 -0
  160. package/build/esm/lead/components/index.d.ts +4 -2
  161. package/build/esm/lead/index.d.ts +1 -1
  162. package/build/esm/lead/layouts/ emptyIcon.d.ts +6 -0
  163. package/build/esm/lead/layouts/lightbox/fields/textField/index.d.ts +13 -0
  164. package/build/esm/lead/layouts/lightbox/fields/textField/index.styled.d.ts +11 -0
  165. package/build/esm/lead/layouts/lightbox/index.d.ts +4 -2
  166. package/build/esm/lead/newLeadPopup.d.ts +4 -2
  167. package/build/esm/lead.css +1 -1
  168. package/build/esm/lead.js +753 -350
  169. package/build/esm/{logoIcon-11f847db.js → logoIcon-b2e3b6df.js} +2 -2
  170. package/build/esm/mantine.js +25 -25
  171. package/build/esm/misc.js +16 -16
  172. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  173. package/build/esm/miscGetSocialList.js +8 -8
  174. package/build/esm/miscScreenSizeContext.js +1 -1
  175. package/build/esm/mobileBottomNavigation.js +5 -5
  176. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  177. package/build/esm/molecules.js +69 -69
  178. package/build/esm/moleculesArticleCard.js +6 -6
  179. package/build/esm/moleculesArticleCardV2.js +16 -16
  180. package/build/esm/navigation.js +40 -40
  181. package/build/esm/navigationLogoutPopup.js +9 -9
  182. package/build/esm/navigationProfileButton.js +23 -23
  183. package/build/esm/onboardingV2.js +29 -29
  184. package/build/esm/organisms.js +44 -44
  185. package/build/esm/{post-88860f5c.js → post-403e7563.js} +3 -3
  186. package/build/esm/profileNavigation.js +19 -19
  187. package/build/esm/progressBar.js +1 -1
  188. package/build/esm/pwg.js +22 -22
  189. package/build/esm/ssoV2.js +26 -26
  190. package/build/esm/{store-05269c76.js → store-d1eca1fa.js} +4 -4
  191. package/build/esm/subot.js +33 -33
  192. package/build/esm/surveyOrPremiumBanner.js +31 -31
  193. package/build/esm/surveyQuestionCard.js +10 -10
  194. package/build/esm/{surveyThankyouCard-89f5229b.js → surveyThankyouCard-1386cdb8.js} +5 -5
  195. package/build/esm/together/api/paths.d.ts +2 -0
  196. package/build/esm/together/api/utils.d.ts +3 -0
  197. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.d.ts +7 -0
  198. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.styled.d.ts +5 -0
  199. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.d.ts +15 -0
  200. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.styled.d.ts +13 -0
  201. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.d.ts +31 -0
  202. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styled.d.ts +9 -0
  203. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styles.d.ts +12 -0
  204. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.d.ts +11 -0
  205. package/build/esm/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.styled.d.ts +17 -0
  206. package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/editor.d.ts +21 -0
  207. package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/index.d.ts +21 -0
  208. package/build/esm/together/components/molecules/createNewPostContentV2/createPostDescription/index.styled.d.ts +9 -0
  209. package/build/esm/together/components/molecules/createNewPostContentV2/createPostPhotos/index.d.ts +7 -0
  210. package/build/esm/together/components/molecules/createNewPostContentV2/createPostTitle/index.d.ts +11 -0
  211. package/build/esm/together/components/molecules/createNewPostContentV2/createPostTitle/index.styled.d.ts +12 -0
  212. package/build/esm/together/components/molecules/createNewPostContentV2/index.d.ts +27 -0
  213. package/build/esm/together/components/molecules/createNewPostContentV2/index.styled.d.ts +33 -0
  214. package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.d.ts +10 -0
  215. package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styled.d.ts +5 -0
  216. package/build/esm/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styles.d.ts +12 -0
  217. package/build/esm/together/components/molecules/createNewPostContentV2/topicSelectList/index.d.ts +16 -0
  218. package/build/esm/together/components/molecules/createNewPostContentV2/topicSelectList/index.styled.d.ts +5 -0
  219. package/build/esm/together/components/molecules/createNewPostContentV2/type.d.ts +4 -0
  220. package/build/esm/together/components/molecules/createNewPostContentV2/types.d.ts +14 -0
  221. package/build/esm/together/components/molecules/index.d.ts +1 -0
  222. package/build/esm/together/components/molecules/postImagePreview/index.d.ts +2 -1
  223. package/build/esm/together/togetherComponentGlobalContext.d.ts +1 -0
  224. package/build/esm/together.js +53 -53
  225. package/build/esm/togetherApiPaths.js +4 -2
  226. package/build/esm/togetherApiUtils.js +4 -4
  227. package/build/esm/togetherAtoms.js +30 -30
  228. package/build/esm/togetherComponentGlobalContext.js +4 -4
  229. package/build/esm/togetherMolecules.js +48 -48
  230. package/build/esm/togetherMoleculesCardAuthor.js +27 -27
  231. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  232. package/build/esm/togetherMoleculesProfileDetail.js +37 -37
  233. package/build/esm/togetherOrganisms.js +47 -47
  234. package/build/esm/togetherRichTextEditor.js +17 -17
  235. package/build/esm/togetherShareBox.js +11 -26
  236. package/build/esm/{treePopoverMenu-8291d5e6.js → treePopoverMenu-f031a29b.js} +19 -19
  237. package/build/esm/{types-8e41d6fe.js → types-2fc793a8.js} +2 -2
  238. package/build/esm/types.js +2 -2
  239. package/build/esm/{useCategory-f2efbed3.js → useCategory-ad6a4d34.js} +5 -5
  240. package/build/esm/{useHealthToolCache-46979b69.js → useHealthToolCache-28a49075.js} +1 -1
  241. package/build/esm/{useMantineLocale-48a69368.js → useMantineLocale-1c095a66.js} +6 -6
  242. package/build/esm/{usePlacesAutocomplete-542afb70.js → usePlacesAutocomplete-1e1bf12f.js} +2 -1
  243. package/build/esm/{useScreenSize-90a0edd1.js → useScreenSize-3a80d6c1.js} +2 -2
  244. package/build/esm/useTogetherAuthRequiredAction.js +9 -9
  245. package/build/esm/{utils-d2f01bfc.js → utils-2c532973.js} +2 -2
  246. package/build/esm/{utils-c6254857.js → utils-d0d4f26f.js} +2 -2
  247. package/build/esm/{utils-827b08e1.js → utils-d3ab24c2.js} +13 -4
  248. package/build/esm/vaccination.js +21 -21
  249. package/build/footer.js +21 -21
  250. package/build/gAssets.js +2 -2
  251. package/build/healthToolsCardWrapper.js +18 -18
  252. package/build/healthToolsForm.js +33 -33
  253. package/build/hooks/usePlacesAutocomplete.d.ts +2 -0
  254. package/build/hooks.js +13 -13
  255. package/build/i18n/translationKeys.d.ts +1 -1
  256. package/build/i18n-values/en-PH.js +14 -1
  257. package/build/i18n-values/hi-IN.js +14 -1
  258. package/build/i18n-values/id-ID.js +14 -1
  259. package/build/i18n-values/km-KH.js +18 -5
  260. package/build/i18n-values/ms-MY.js +14 -1
  261. package/build/i18n-values/my-MM.js +14 -1
  262. package/build/i18n-values/th-TH.js +14 -1
  263. package/build/i18n-values/tl-PH.js +13 -0
  264. package/build/i18n-values/vi-VN.js +16 -3
  265. package/build/i18n-values/vi-VN_MB.js +15 -2
  266. package/build/i18n-values/zh-TW.js +14 -1
  267. package/build/i18n.js +1 -1
  268. package/build/i18nV2.js +1 -1
  269. package/build/icons/ChatbotBg.d.ts +4 -0
  270. package/build/icons/Search.d.ts +4 -0
  271. package/build/icons/index.d.ts +5 -3
  272. package/build/{index-4a74f31a.js → index-0130a454.js} +2 -2
  273. package/build/{index-1a6d6824.js → index-0b1c5835.js} +17 -17
  274. package/build/{index-26813dd7.js → index-14ae8248.js} +3 -3
  275. package/build/{index-57cd7add.js → index-15a499ed.js} +2 -2
  276. package/build/{index-cb05f2f0.js → index-162cf5ec.js} +13 -13
  277. package/build/{index-d67fe59d.js → index-168cb23c.js} +20 -20
  278. package/build/{index-0556244d.js → index-193192d9.js} +1 -1
  279. package/build/{index-58b50231.js → index-1a1895dc.js} +6 -6
  280. package/build/{index-726641fa.js → index-235ee6a4.js} +1 -1
  281. package/build/{index-6715b33c.js → index-24744e1d.js} +2 -2
  282. package/build/{index-032add36.js → index-24ad1f42.js} +13 -13
  283. package/build/{index-97a77eb1.js → index-24dc48d7.js} +3 -3
  284. package/build/{index-d27a5482.js → index-29a53d3c.js} +2 -2
  285. package/build/{index-61d67ff3.js → index-38aa9aae.js} +1 -1
  286. package/build/{index-be39d2c3.js → index-393e9124.js} +2 -2
  287. package/build/{index-b5290821.js → index-396aca20.js} +3 -3
  288. package/build/{index-21989191.js → index-3ec47f62.js} +1 -1
  289. package/build/{index-0a61a73c.js → index-40a47778.js} +10 -10
  290. package/build/{index-c9d742b0.js → index-48ead17e.js} +3 -3
  291. package/build/{index-59108b8d.js → index-4c063acd.js} +6 -6
  292. package/build/{index-b61347b1.js → index-50394ff2.js} +16 -16
  293. package/build/{index-bcbbb24e.js → index-591ad0ca.js} +1 -1
  294. package/build/{index-cf7878f4.js → index-5d8baaf6.js} +1 -1
  295. package/build/{index-d79a3288.js → index-5ddf7e2d.js} +1 -1
  296. package/build/{index-5a1dacb0.js → index-62fbd1d0.js} +2 -2
  297. package/build/{index-9274d436.js → index-6ea74eeb.js} +24 -24
  298. package/build/{index-479439ef.js → index-7017d901.js} +5 -5
  299. package/build/{index-2e71846c.js → index-7ca5e861.js} +3 -3
  300. package/build/{index-b3c7d08f.js → index-7d255c7b.js} +7 -7
  301. package/build/{index-4cc2303a.js → index-7d868903.js} +3 -3
  302. package/build/{index-0461af50.js → index-7dc1bc92.js} +2 -2
  303. package/build/{index-353675de.js → index-814045ef.js} +2 -2
  304. package/build/{index-d7c2b980.js → index-82632b4a.js} +17 -17
  305. package/build/{index-8c1fcb93.js → index-8976b33e.js} +18 -18
  306. package/build/{index-b852627f.js → index-8e25c967.js} +2 -2
  307. package/build/{index-964856de.js → index-94a58e2b.js} +17 -17
  308. package/build/{index-541d89aa.js → index-997d3769.js} +3 -3
  309. package/build/{index-4ab69e66.js → index-9a11ed37.js} +32 -32
  310. package/build/{index-b35e08f7.js → index-9e9a9169.js} +15 -15
  311. package/build/{index-041e09ed.js → index-9fb3018a.js} +18 -24
  312. package/build/{index-0e1acf88.js → index-a2924e1e.js} +6 -6
  313. package/build/{index-559bca0e.js → index-a9722b58.js} +4 -4
  314. package/build/{index-21040640.js → index-aa89a022.js} +13 -13
  315. package/build/{index-c9697def.js → index-b0c5d4ef.js} +16 -16
  316. package/build/{index-2688d464.js → index-b3e0585e.js} +23 -12
  317. package/build/{index-8e81e0b3.js → index-b3fb752f.js} +16 -16
  318. package/build/{index-ea8be7ab.js → index-b51c88e2.js} +14 -14
  319. package/build/{index-a963f65d.js → index-b5cd6a21.js} +5 -5
  320. package/build/{index-72648019.js → index-b6847418.js} +2 -2
  321. package/build/index-c10d9832.js +4047 -0
  322. package/build/{index-26a4359b.js → index-c5376e9c.js} +16 -16
  323. package/build/index-d699cb98.js +103 -0
  324. package/build/{index-1efca202.js → index-dc3ef09a.js} +2 -2
  325. package/build/{index-f4150ece.js → index-e294968d.js} +1 -1
  326. package/build/{index-79664f8b.js → index-e8ad0b71.js} +30 -30
  327. package/build/{index-377378db.js → index-e8b1a161.js} +15 -15
  328. package/build/{index-94007f43.js → index-ec184323.js} +21 -21
  329. package/build/{index-6dc8612d.js → index-ec9f092e.js} +24 -24
  330. package/build/{index-51f6138c.js → index-ef816e26.js} +7 -7
  331. package/build/{index-58ead3ad.js → index-f5666a40.js} +2 -2
  332. package/build/{index-3882b301.js → index-f888f598.js} +13 -13
  333. package/build/{index-97b813af.js → index-fd3183da.js} +1 -1
  334. package/build/index.css +1 -1
  335. package/build/index.js +211 -178
  336. package/build/{labelSorting-692aa5c2.js → labelSorting-469fb53d.js} +4 -4
  337. package/build/lead/components/context.d.ts +2 -0
  338. package/build/lead/components/index.d.ts +4 -2
  339. package/build/lead/index.d.ts +1 -1
  340. package/build/lead/layouts/ emptyIcon.d.ts +6 -0
  341. package/build/lead/layouts/lightbox/fields/textField/index.d.ts +13 -0
  342. package/build/lead/layouts/lightbox/fields/textField/index.styled.d.ts +11 -0
  343. package/build/lead/layouts/lightbox/index.d.ts +4 -2
  344. package/build/lead/newLeadPopup.d.ts +4 -2
  345. package/build/lead.css +1 -1
  346. package/build/lead.js +753 -349
  347. package/build/{logoIcon-1f780f9c.js → logoIcon-f8693e15.js} +2 -2
  348. package/build/mantine.js +22 -22
  349. package/build/misc.js +16 -16
  350. package/build/miscGetDynamicHealthTool.js +4 -4
  351. package/build/miscGetSocialList.js +8 -8
  352. package/build/miscScreenSizeContext.js +1 -1
  353. package/build/mobileBottomNavigation.js +5 -5
  354. package/build/mobileBottomNavigationIcon.js +5 -5
  355. package/build/molecules.js +69 -69
  356. package/build/moleculesArticleCard.js +6 -6
  357. package/build/moleculesArticleCardV2.js +16 -16
  358. package/build/navigation.js +40 -40
  359. package/build/navigationLogoutPopup.js +9 -9
  360. package/build/navigationProfileButton.js +23 -23
  361. package/build/onboardingV2.js +28 -28
  362. package/build/organisms.js +44 -44
  363. package/build/{post-7fc3bed7.js → post-cd6c6c29.js} +2 -2
  364. package/build/profileNavigation.js +19 -19
  365. package/build/progressBar.js +1 -1
  366. package/build/pwg.js +22 -22
  367. package/build/ssoV2.js +25 -25
  368. package/build/{store-97295378.js → store-a713b63a.js} +4 -4
  369. package/build/subot.js +32 -32
  370. package/build/surveyOrPremiumBanner.js +31 -31
  371. package/build/surveyQuestionCard.js +10 -10
  372. package/build/{surveyThankyouCard-170b7197.js → surveyThankyouCard-80794b25.js} +5 -5
  373. package/build/together/api/paths.d.ts +2 -0
  374. package/build/together/api/utils.d.ts +3 -0
  375. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.d.ts +7 -0
  376. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/cardPostCommunity/index.styled.d.ts +5 -0
  377. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.d.ts +15 -0
  378. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/commonCommunity/index.styled.d.ts +13 -0
  379. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.d.ts +31 -0
  380. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styled.d.ts +9 -0
  381. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/index.styles.d.ts +12 -0
  382. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.d.ts +11 -0
  383. package/build/together/components/molecules/createNewPostContentV2/createPostCommunity/suggestedCommunity/index.styled.d.ts +17 -0
  384. package/build/together/components/molecules/createNewPostContentV2/createPostDescription/editor.d.ts +21 -0
  385. package/build/together/components/molecules/createNewPostContentV2/createPostDescription/index.d.ts +21 -0
  386. package/build/together/components/molecules/createNewPostContentV2/createPostDescription/index.styled.d.ts +9 -0
  387. package/build/together/components/molecules/createNewPostContentV2/createPostPhotos/index.d.ts +7 -0
  388. package/build/together/components/molecules/createNewPostContentV2/createPostTitle/index.d.ts +11 -0
  389. package/build/together/components/molecules/createNewPostContentV2/createPostTitle/index.styled.d.ts +12 -0
  390. package/build/together/components/molecules/createNewPostContentV2/index.d.ts +27 -0
  391. package/build/together/components/molecules/createNewPostContentV2/index.styled.d.ts +33 -0
  392. package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.d.ts +10 -0
  393. package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styled.d.ts +5 -0
  394. package/build/together/components/molecules/createNewPostContentV2/postPhotosReview/index.styles.d.ts +12 -0
  395. package/build/together/components/molecules/createNewPostContentV2/topicSelectList/index.d.ts +16 -0
  396. package/build/together/components/molecules/createNewPostContentV2/topicSelectList/index.styled.d.ts +5 -0
  397. package/build/together/components/molecules/createNewPostContentV2/type.d.ts +4 -0
  398. package/build/together/components/molecules/createNewPostContentV2/types.d.ts +14 -0
  399. package/build/together/components/molecules/index.d.ts +1 -0
  400. package/build/together/components/molecules/postImagePreview/index.d.ts +2 -1
  401. package/build/together/togetherComponentGlobalContext.d.ts +1 -0
  402. package/build/together.js +54 -53
  403. package/build/togetherApiPaths.js +4 -2
  404. package/build/togetherApiUtils.js +5 -4
  405. package/build/togetherAtoms.js +30 -30
  406. package/build/togetherComponentGlobalContext.js +4 -4
  407. package/build/togetherMolecules.js +49 -48
  408. package/build/togetherMoleculesCardAuthor.js +27 -27
  409. package/build/togetherMoleculesPostImagePreview.js +11 -11
  410. package/build/togetherMoleculesProfileDetail.js +37 -37
  411. package/build/togetherOrganisms.js +47 -47
  412. package/build/togetherRichTextEditor.js +17 -17
  413. package/build/togetherShareBox.js +11 -26
  414. package/build/{treePopoverMenu-f0ed9062.js → treePopoverMenu-889d80ba.js} +19 -19
  415. package/build/{types-97e973be.js → types-0c05791e.js} +2 -2
  416. package/build/types.js +2 -2
  417. package/build/{useCategory-73acc871.js → useCategory-55a423cc.js} +5 -5
  418. package/build/{useHealthToolCache-87bc1bea.js → useHealthToolCache-84921b9b.js} +1 -1
  419. package/build/{useMantineLocale-93fda373.js → useMantineLocale-0cc2d977.js} +6 -6
  420. package/build/{usePlacesAutocomplete-15c7c0ee.js → usePlacesAutocomplete-07762c76.js} +2 -1
  421. package/build/{useScreenSize-9cb04125.js → useScreenSize-c85a7f01.js} +2 -2
  422. package/build/useTogetherAuthRequiredAction.js +9 -9
  423. package/build/{utils-a409c2aa.js → utils-44d3d6e7.js} +2 -2
  424. package/build/{utils-db4f0fd2.js → utils-872abd64.js} +2 -2
  425. package/build/{utils-0aa319ac.js → utils-c1ec3cc4.js} +13 -3
  426. package/build/vaccination.js +21 -21
  427. package/package.json +1 -1
  428. package/build/esm/index-100c4958.js +0 -1533
  429. package/build/index-9856ab75.js +0 -1547
  430. /package/build/{BMI_BOYS.percentile.monthly-7e5c49ee.js → BMI_BOYS.percentile.monthly-6337a2c7.js} +0 -0
  431. /package/build/{BMI_BOYS.percentile.weekly-85b19106.js → BMI_BOYS.percentile.weekly-fa39b2e6.js} +0 -0
  432. /package/build/{BMI_BOYS.percentile.yearly-dcbe4f8f.js → BMI_BOYS.percentile.yearly-1eaf306b.js} +0 -0
  433. /package/build/{BMI_BOYS.zscore.monthly-782302b8.js → BMI_BOYS.zscore.monthly-851088df.js} +0 -0
  434. /package/build/{BMI_BOYS.zscore.weekly-2a04af7d.js → BMI_BOYS.zscore.weekly-175cdc97.js} +0 -0
  435. /package/build/{BMI_BOYS.zscore.yearly-678f62c5.js → BMI_BOYS.zscore.yearly-5937ecfa.js} +0 -0
  436. /package/build/{BMI_GIRLS.percentile.monthly-21396ca2.js → BMI_GIRLS.percentile.monthly-8073e552.js} +0 -0
  437. /package/build/{BMI_GIRLS.percentile.weekly-841da15b.js → BMI_GIRLS.percentile.weekly-5c7a9b5f.js} +0 -0
  438. /package/build/{BMI_GIRLS.percentile.yearly-39d7d473.js → BMI_GIRLS.percentile.yearly-7462e3cf.js} +0 -0
  439. /package/build/{BMI_GIRLS.zscore.monthly-9e3c4015.js → BMI_GIRLS.zscore.monthly-2e1abf01.js} +0 -0
  440. /package/build/{BMI_GIRLS.zscore.weekly-bad8642d.js → BMI_GIRLS.zscore.weekly-a27d90ae.js} +0 -0
  441. /package/build/{BMI_GIRLS.zscore.yearly-f9c505c3.js → BMI_GIRLS.zscore.yearly-199d33bc.js} +0 -0
  442. /package/build/{ChevronDown-8213af2b.js → ChevronDown-6646fd47.js} +0 -0
  443. /package/build/{Close-4ba7da87.js → Close-acfa8c86.js} +0 -0
  444. /package/build/{Google-5fe809fe.js → Google-3e0ecf57.js} +0 -0
  445. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-a0693dbf.js → HEAD CIRCUM_BOYS.percentile.monthly-c39e84b8.js} +0 -0
  446. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-fee96405.js → HEAD CIRCUM_BOYS.percentile.weekly-17a9f67f.js} +0 -0
  447. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-7de8fe54.js → HEAD CIRCUM_BOYS.percentile.yearly-53db10b8.js} +0 -0
  448. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-f5d1000f.js → HEAD CIRCUM_BOYS.zscore.monthly-9024b5f9.js} +0 -0
  449. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-9c3dd71b.js → HEAD CIRCUM_BOYS.zscore.weekly-93e16617.js} +0 -0
  450. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-2c1cb670.js → HEAD CIRCUM_BOYS.zscore.yearly-32adcfa6.js} +0 -0
  451. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-a3b475ab.js → HEAD CIRCUM_GIRLS.percentile.monthly-4ee6667f.js} +0 -0
  452. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-2f3eaadc.js → HEAD CIRCUM_GIRLS.percentile.weekly-ddf49204.js} +0 -0
  453. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-84159188.js → HEAD CIRCUM_GIRLS.percentile.yearly-6d6a8456.js} +0 -0
  454. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-6b4c6430.js → HEAD CIRCUM_GIRLS.zscore.monthly-5de917f7.js} +0 -0
  455. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-bdb9f182.js → HEAD CIRCUM_GIRLS.zscore.weekly-716eac35.js} +0 -0
  456. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-29f35e36.js → HEAD CIRCUM_GIRLS.zscore.yearly-b6b319cb.js} +0 -0
  457. /package/build/{HEIGHT_BOYS.percentile.monthly-74cf6cd3.js → HEIGHT_BOYS.percentile.monthly-0b9355cf.js} +0 -0
  458. /package/build/{HEIGHT_BOYS.percentile.weekly-f9b63eeb.js → HEIGHT_BOYS.percentile.weekly-91f90514.js} +0 -0
  459. /package/build/{HEIGHT_BOYS.percentile.yearly-e3df0dbc.js → HEIGHT_BOYS.percentile.yearly-a6be39f1.js} +0 -0
  460. /package/build/{HEIGHT_BOYS.zscore.monthly-49f10948.js → HEIGHT_BOYS.zscore.monthly-5c280bcc.js} +0 -0
  461. /package/build/{HEIGHT_BOYS.zscore.weekly-2dd73ac3.js → HEIGHT_BOYS.zscore.weekly-8892a3e2.js} +0 -0
  462. /package/build/{HEIGHT_BOYS.zscore.yearly-b2a1d672.js → HEIGHT_BOYS.zscore.yearly-e22fdc89.js} +0 -0
  463. /package/build/{HEIGHT_GIRLS.percentile.monthly-fe7cfad9.js → HEIGHT_GIRLS.percentile.monthly-203d80e4.js} +0 -0
  464. /package/build/{HEIGHT_GIRLS.percentile.weekly-600d6856.js → HEIGHT_GIRLS.percentile.weekly-b70110c1.js} +0 -0
  465. /package/build/{HEIGHT_GIRLS.percentile.yearly-200abad0.js → HEIGHT_GIRLS.percentile.yearly-4673ac32.js} +0 -0
  466. /package/build/{HEIGHT_GIRLS.zscore.monthly-8cb1c377.js → HEIGHT_GIRLS.zscore.monthly-04a15496.js} +0 -0
  467. /package/build/{HEIGHT_GIRLS.zscore.weekly-b9f5d615.js → HEIGHT_GIRLS.zscore.weekly-f2a6e2f3.js} +0 -0
  468. /package/build/{HEIGHT_GIRLS.zscore.yearly-be1d4778.js → HEIGHT_GIRLS.zscore.yearly-146a83ba.js} +0 -0
  469. /package/build/{Locale-52f6ecdf.js → Locale-46500920.js} +0 -0
  470. /package/build/{Visible-486d64e4.js → Visible-b2ca2811.js} +0 -0
  471. /package/build/{WEIGHT_BOYS.percentile.monthly-9d00bc54.js → WEIGHT_BOYS.percentile.monthly-ce64c00f.js} +0 -0
  472. /package/build/{WEIGHT_BOYS.percentile.weekly-07febda7.js → WEIGHT_BOYS.percentile.weekly-d8b54060.js} +0 -0
  473. /package/build/{WEIGHT_BOYS.percentile.yearly-2b72dd44.js → WEIGHT_BOYS.percentile.yearly-b1a691e5.js} +0 -0
  474. /package/build/{WEIGHT_BOYS.zscore.monthly-0435b097.js → WEIGHT_BOYS.zscore.monthly-b8180ab3.js} +0 -0
  475. /package/build/{WEIGHT_BOYS.zscore.weekly-74d9539e.js → WEIGHT_BOYS.zscore.weekly-6efaa547.js} +0 -0
  476. /package/build/{WEIGHT_BOYS.zscore.yearly-a0150987.js → WEIGHT_BOYS.zscore.yearly-ff104f70.js} +0 -0
  477. /package/build/{WEIGHT_GIRLS.percentile.monthly-d05a4d37.js → WEIGHT_GIRLS.percentile.monthly-ffe5fb55.js} +0 -0
  478. /package/build/{WEIGHT_GIRLS.percentile.weekly-37b6a443.js → WEIGHT_GIRLS.percentile.weekly-7f9490d0.js} +0 -0
  479. /package/build/{WEIGHT_GIRLS.percentile.yearly-de51e3f2.js → WEIGHT_GIRLS.percentile.yearly-99f26592.js} +0 -0
  480. /package/build/{WEIGHT_GIRLS.zscore.monthly-a4ab8978.js → WEIGHT_GIRLS.zscore.monthly-7ef27570.js} +0 -0
  481. /package/build/{WEIGHT_GIRLS.zscore.weekly-03312f12.js → WEIGHT_GIRLS.zscore.weekly-4b489c3f.js} +0 -0
  482. /package/build/{WEIGHT_GIRLS.zscore.yearly-72ba64bc.js → WEIGHT_GIRLS.zscore.yearly-25f8790b.js} +0 -0
  483. /package/build/{animation-2c830dd8.js → animation-ed541692.js} +0 -0
  484. /package/build/{constants-1249d9f8.js → constants-3b2ad03d.js} +0 -0
  485. /package/build/{constants-e88cdeb5.js → constants-7fc2f0d3.js} +0 -0
  486. /package/build/{constants-87e43d9d.js → constants-eb2323ad.js} +0 -0
  487. /package/build/{dataTransform-18ec4cfd.js → dataTransform-ed9d25b3.js} +0 -0
  488. /package/build/{doctor-ab232ad2.js → doctor-45a98dfc.js} +0 -0
  489. /package/build/esm/{BMI_BOYS.percentile.monthly-ce482e00.js → BMI_BOYS.percentile.monthly-f2cf5eae.js} +0 -0
  490. /package/build/esm/{BMI_BOYS.percentile.weekly-a655c154.js → BMI_BOYS.percentile.weekly-0145a904.js} +0 -0
  491. /package/build/esm/{BMI_BOYS.percentile.yearly-62c8f5e9.js → BMI_BOYS.percentile.yearly-67c360ab.js} +0 -0
  492. /package/build/esm/{BMI_BOYS.zscore.monthly-ff9f9f99.js → BMI_BOYS.zscore.monthly-4016078d.js} +0 -0
  493. /package/build/esm/{BMI_BOYS.zscore.weekly-9bcc94f6.js → BMI_BOYS.zscore.weekly-f40a0cf4.js} +0 -0
  494. /package/build/esm/{BMI_BOYS.zscore.yearly-cd3efc43.js → BMI_BOYS.zscore.yearly-9784ed8c.js} +0 -0
  495. /package/build/esm/{BMI_GIRLS.percentile.monthly-313f4924.js → BMI_GIRLS.percentile.monthly-bd8a858b.js} +0 -0
  496. /package/build/esm/{BMI_GIRLS.percentile.weekly-d0646cbe.js → BMI_GIRLS.percentile.weekly-0629c8ac.js} +0 -0
  497. /package/build/esm/{BMI_GIRLS.percentile.yearly-d5f406a8.js → BMI_GIRLS.percentile.yearly-31ec01f4.js} +0 -0
  498. /package/build/esm/{BMI_GIRLS.zscore.monthly-b67ec5cd.js → BMI_GIRLS.zscore.monthly-3c941b8a.js} +0 -0
  499. /package/build/esm/{BMI_GIRLS.zscore.weekly-c50b6795.js → BMI_GIRLS.zscore.weekly-67d9e952.js} +0 -0
  500. /package/build/esm/{BMI_GIRLS.zscore.yearly-a8abe79a.js → BMI_GIRLS.zscore.yearly-39bb1163.js} +0 -0
  501. /package/build/esm/{ChevronDown-46a7669c.js → ChevronDown-0a237fe1.js} +0 -0
  502. /package/build/esm/{Close-7ec3e185.js → Close-8ec53854.js} +0 -0
  503. /package/build/esm/{Google-f660bb4f.js → Google-2abb6d1e.js} +0 -0
  504. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-99c7df64.js → HEAD CIRCUM_BOYS.percentile.monthly-5af4c0cf.js} +0 -0
  505. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-40ff2750.js → HEAD CIRCUM_BOYS.percentile.weekly-8b55aea6.js} +0 -0
  506. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-21010833.js → HEAD CIRCUM_BOYS.percentile.yearly-00c4cd86.js} +0 -0
  507. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-58484013.js → HEAD CIRCUM_BOYS.zscore.monthly-fa7f6d17.js} +0 -0
  508. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-82b1375f.js → HEAD CIRCUM_BOYS.zscore.weekly-412720ed.js} +0 -0
  509. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-08c039a6.js → HEAD CIRCUM_BOYS.zscore.yearly-933cf312.js} +0 -0
  510. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-e46cffa6.js → HEAD CIRCUM_GIRLS.percentile.monthly-7dbd4c64.js} +0 -0
  511. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-9a7081ec.js → HEAD CIRCUM_GIRLS.percentile.weekly-145fae5a.js} +0 -0
  512. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-73e856ac.js → HEAD CIRCUM_GIRLS.percentile.yearly-ed8721c1.js} +0 -0
  513. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-60aaec64.js → HEAD CIRCUM_GIRLS.zscore.monthly-6270e769.js} +0 -0
  514. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-0ea9c2d9.js → HEAD CIRCUM_GIRLS.zscore.weekly-68dfc85f.js} +0 -0
  515. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-0299c66b.js → HEAD CIRCUM_GIRLS.zscore.yearly-bad5818a.js} +0 -0
  516. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-aacb67ce.js → HEIGHT_BOYS.percentile.monthly-409700e6.js} +0 -0
  517. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-5c32d078.js → HEIGHT_BOYS.percentile.weekly-a3239541.js} +0 -0
  518. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-37047354.js → HEIGHT_BOYS.percentile.yearly-9b7c3292.js} +0 -0
  519. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-1fb7fa54.js → HEIGHT_BOYS.zscore.monthly-384eb890.js} +0 -0
  520. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-d6f74d02.js → HEIGHT_BOYS.zscore.weekly-f11a3f12.js} +0 -0
  521. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-d57fc279.js → HEIGHT_BOYS.zscore.yearly-cf037809.js} +0 -0
  522. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-d5ec0dfb.js → HEIGHT_GIRLS.percentile.monthly-e6a77a33.js} +0 -0
  523. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-6e5afba9.js → HEIGHT_GIRLS.percentile.weekly-dfd33b25.js} +0 -0
  524. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-77491ba8.js → HEIGHT_GIRLS.percentile.yearly-9c893db0.js} +0 -0
  525. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-1291145b.js → HEIGHT_GIRLS.zscore.monthly-db8fff55.js} +0 -0
  526. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-372aa877.js → HEIGHT_GIRLS.zscore.weekly-8698b559.js} +0 -0
  527. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-9b0cbe69.js → HEIGHT_GIRLS.zscore.yearly-a8818df0.js} +0 -0
  528. /package/build/esm/{Locale-b3720cb4.js → Locale-00bfd7ae.js} +0 -0
  529. /package/build/esm/{Visible-72a44c3c.js → Visible-ea326bdf.js} +0 -0
  530. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-52dfe3ff.js → WEIGHT_BOYS.percentile.monthly-ed97a016.js} +0 -0
  531. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-88832e15.js → WEIGHT_BOYS.percentile.weekly-52b2ba8f.js} +0 -0
  532. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-f883dcca.js → WEIGHT_BOYS.percentile.yearly-938fb5ab.js} +0 -0
  533. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-da34078f.js → WEIGHT_BOYS.zscore.monthly-9cedf9fe.js} +0 -0
  534. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-fa5132e1.js → WEIGHT_BOYS.zscore.weekly-5661c740.js} +0 -0
  535. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-fdee36b1.js → WEIGHT_BOYS.zscore.yearly-553b054d.js} +0 -0
  536. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-77014ffb.js → WEIGHT_GIRLS.percentile.monthly-db164c0b.js} +0 -0
  537. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-4b894a26.js → WEIGHT_GIRLS.percentile.weekly-f6bf7418.js} +0 -0
  538. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-49c4ff09.js → WEIGHT_GIRLS.percentile.yearly-014f7957.js} +0 -0
  539. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-ba5c7e3b.js → WEIGHT_GIRLS.zscore.monthly-fda7dd74.js} +0 -0
  540. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-5298cd4e.js → WEIGHT_GIRLS.zscore.weekly-136807df.js} +0 -0
  541. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-75830985.js → WEIGHT_GIRLS.zscore.yearly-2e586fff.js} +0 -0
  542. /package/build/esm/{animation-db8362e4.js → animation-07c05d28.js} +0 -0
  543. /package/build/esm/{constants-bb44c3f3.js → constants-7afbacd8.js} +0 -0
  544. /package/build/esm/{constants-d6cc2b62.js → constants-8fbe2670.js} +0 -0
  545. /package/build/esm/{constants-bda7ecff.js → constants-dc697937.js} +0 -0
  546. /package/build/esm/{dataTransform-8116077a.js → dataTransform-ecd54e69.js} +0 -0
  547. /package/build/esm/{doctor-06e9e030.js → doctor-17090568.js} +0 -0
  548. /package/build/esm/{index-1cbb3836.js → index-000e0e9e.js} +0 -0
  549. /package/build/esm/{index-b029082c.js → index-0942d379.js} +0 -0
  550. /package/build/esm/{index-0f920b1d.js → index-1befcee7.js} +0 -0
  551. /package/build/esm/{index-69f02fb7.js → index-2e55cfda.js} +0 -0
  552. /package/build/esm/{index-5ba7486e.js → index-5cec6573.js} +0 -0
  553. /package/build/esm/{index-429a065e.js → index-a0303055.js} +0 -0
  554. /package/build/esm/{index-630abb2f.js → index-a232379f.js} +0 -0
  555. /package/build/esm/{index-0c91948b.js → index-d0f53887.js} +0 -0
  556. /package/build/esm/{index-7f9882ee.js → index-fdc14c24.js} +0 -0
  557. /package/build/esm/{index.styles-5544d7fb.js → index.styles-d02c3a5a.js} +0 -0
  558. /package/build/esm/{localizeNumberFormat-98e0257c.js → localizeNumberFormat-6de5a75e.js} +0 -0
  559. /package/build/esm/{normalizeLink-c5c2617c.js → normalizeLink-43a86413.js} +0 -0
  560. /package/build/esm/{other-89315ca8.js → other-0db5dab2.js} +0 -0
  561. /package/build/esm/{paths-24308fe5.js → paths-035cff11.js} +0 -0
  562. /package/build/esm/{translationsContext-08abcbc7.js → translationsContext-10772791.js} +0 -0
  563. /package/build/esm/{tslib.es6-def230bb.js → tslib.es6-e23bfd26.js} +0 -0
  564. /package/build/esm/{types-f2a255fb.js → types-34201c73.js} +0 -0
  565. /package/build/esm/{useIsInit-ca4ea93b.js → useIsInit-6477f3a4.js} +0 -0
  566. /package/build/esm/{useOutsideClick-2ac6f7e9.js → useOutsideClick-6c9cf98a.js} +0 -0
  567. /package/build/esm/{useScrollbarSize-740ea9ef.js → useScrollbarSize-6473c2fd.js} +0 -0
  568. /package/build/esm/{useUniqueId-5d702210.js → useUniqueId-5817d5a2.js} +0 -0
  569. /package/build/esm/{utils-0b42a109.js → utils-cdbd3de5.js} +0 -0
  570. /package/build/{index-2880b048.js → index-098fed08.js} +0 -0
  571. /package/build/{index-fbcabe66.js → index-0d70f22c.js} +0 -0
  572. /package/build/{index-734aac0a.js → index-0dc126e4.js} +0 -0
  573. /package/build/{index-1d418737.js → index-3231a973.js} +0 -0
  574. /package/build/{index-38cc6bd6.js → index-3ae84344.js} +0 -0
  575. /package/build/{index-4458c7bc.js → index-71c3d68d.js} +0 -0
  576. /package/build/{index-6f8da018.js → index-741c96d4.js} +0 -0
  577. /package/build/{index-e61f20a3.js → index-7541c6b0.js} +0 -0
  578. /package/build/{index-ff3205aa.js → index-a19550a4.js} +0 -0
  579. /package/build/{index.styles-4312759c.js → index.styles-4b68abeb.js} +0 -0
  580. /package/build/{localizeNumberFormat-60a19b89.js → localizeNumberFormat-59035008.js} +0 -0
  581. /package/build/{normalizeLink-c4e7732a.js → normalizeLink-28829417.js} +0 -0
  582. /package/build/{other-5a4783cd.js → other-50a0b3de.js} +0 -0
  583. /package/build/{paths-3849028b.js → paths-4921d775.js} +0 -0
  584. /package/build/{translationsContext-4a73e102.js → translationsContext-eb09f732.js} +0 -0
  585. /package/build/{tslib.es6-76a109f8.js → tslib.es6-19c55cc8.js} +0 -0
  586. /package/build/{types-2062dc8b.js → types-3cfdfed1.js} +0 -0
  587. /package/build/{useIsInit-c798d013.js → useIsInit-bee13c08.js} +0 -0
  588. /package/build/{useOutsideClick-4e42b9ab.js → useOutsideClick-f77588fe.js} +0 -0
  589. /package/build/{useScrollbarSize-4b128824.js → useScrollbarSize-12f1eea9.js} +0 -0
  590. /package/build/{useUniqueId-aa6e8a1c.js → useUniqueId-98ff449d.js} +0 -0
  591. /package/build/{utils-775040a8.js → utils-ca036bb9.js} +0 -0
@@ -1,1533 +0,0 @@
1
- import { a as __awaiter, _ as __rest } from './tslib.es6-def230bb.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-5ba7486e.js';
5
- import { u as useTranslations } from './index-6bc456cf.js';
6
- import innertext from 'innertext';
7
- import { theme } from './miscTheme.js';
8
- import { I as Input$1 } from './index-2c159ce6.js';
9
- import { useMantineTheme, Popover } from '@mantine/core';
10
- import '@mantine/dates';
11
- import './index-a8fdbadd.js';
12
- import './index-473c065f.js';
13
- import './index-1cbb3836.js';
14
- import './useMantineLocale-48a69368.js';
15
- import { T as Text } from './index-62b03b97.js';
16
- import { B as Button } from './index-21c2869e.js';
17
- import './index.styles-5544d7fb.js';
18
- import '@mantine/hooks';
19
- import { M as MediaQueries } from './utils-0b42a109.js';
20
- import './other-89315ca8.js';
21
- import './index-032bb6df.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-05521115.js';
23
- import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath, p as getCurrentHref, b as callApiWithAuth } from './utils-827b08e1.js';
24
- import styled from '@emotion/styled';
25
- import { b as formatPost, c as formatTopic } from './dataTransform-218076f9.js';
26
- import { M as MAX_IMAGE_UPLOADS } from './constants-bda7ecff.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-88860f5c.js';
28
- import { C as CardAuthor, L as Loading$1 } from './index-dcc72453.js';
29
- import { S as StyledCreatePostDescription, R as RichTextEditor } from './editor-9e02f4c0.js';
30
- import { I as Input } from './index-666bc3cf.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-253d88a3.js';
35
- import { C as CardLink } from './index-8706be0b.js';
36
- import { B as BtnChoice } from './index-bc16a3c1.js';
37
- import { L as LOCALE } from './Locale-b3720cb4.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 };