microboard-ui-temp 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (828) hide show
  1. package/.github/workflows/npm-publish.yml +66 -0
  2. package/Dockerfile +15 -0
  3. package/LICENSE.txt +17 -0
  4. package/MicroboardLicense.txt +84 -0
  5. package/README.md +23 -0
  6. package/bun.lock +1079 -0
  7. package/bunPlugins/copyPlugin.ts +81 -0
  8. package/bunfig.toml +1 -0
  9. package/docker-compose.yml +7 -0
  10. package/package.json +49 -0
  11. package/scripts/buildPkg.ts +29 -0
  12. package/scripts/buildSpa.ts +29 -0
  13. package/server.ts +18 -0
  14. package/src/App/App.ts +502 -0
  15. package/src/App/BoardsList.ts +752 -0
  16. package/src/App/Clipboard.ts +22 -0
  17. package/src/App/Connection.ts +758 -0
  18. package/src/App/Location.ts +23 -0
  19. package/src/App/MediaHelpers.ts +221 -0
  20. package/src/App/Paste/index.ts +5 -0
  21. package/src/App/Paste/pasteTextToTheBoard.ts +19 -0
  22. package/src/App/Paste/tryToGetMarkdownFromDataTransfer.ts +60 -0
  23. package/src/App/Paste/tryToPasteAsItemOrReturnText.ts +72 -0
  24. package/src/App/Paste/tryToPasteAudioByLink.ts +35 -0
  25. package/src/App/Paste/tryToPasteFromMicroboard.ts +15 -0
  26. package/src/App/Paste/tryToPasteFromMiro.ts +75 -0
  27. package/src/App/Paste/tryToPasteImages.ts +44 -0
  28. package/src/App/Paste/tryToPasteVideoByLink.ts +68 -0
  29. package/src/App/Permissions.ts +43 -0
  30. package/src/App/README.md +58 -0
  31. package/src/App/SessionStorage.ts +248 -0
  32. package/src/App/Storage.ts +122 -0
  33. package/src/App/Wheel/Wheel.spec.ts +40 -0
  34. package/src/App/Wheel/Wheel.ts +229 -0
  35. package/src/App/Wheel/WheelEventLogger.ts +70 -0
  36. package/src/App/Wheel/WheelEvents.spec.ts +418 -0
  37. package/src/App/Wheel/index.ts +1 -0
  38. package/src/App/Wheel/mockedWheelData.ts +77658 -0
  39. package/src/App/getController.ts +878 -0
  40. package/src/App/getSubscriptions.ts +155 -0
  41. package/src/App/index.ts +1 -0
  42. package/src/App/isFirefox.ts +3 -0
  43. package/src/App/isMacos.ts +2 -0
  44. package/src/App/isSafari.ts +17 -0
  45. package/src/App/router.tsx +149 -0
  46. package/src/App/testRecorder.ts +393 -0
  47. package/src/App/throttlePointerEvent.ts +27 -0
  48. package/src/App/useAccount.ts +19 -0
  49. package/src/App/useBoardSubscription.ts +14 -0
  50. package/src/App/useBoardsList.ts +18 -0
  51. package/src/App/useDomMbr.ts +65 -0
  52. package/src/Config.ts +41 -0
  53. package/src/Globals.d.ts +6 -0
  54. package/src/WhiteBoardModule/Readme.md +21 -0
  55. package/src/WhiteBoardModule/WhiteBoardModuleNative.tsx +60 -0
  56. package/src/WhiteBoardModule/WhiteboardModuleReact.tsx +61 -0
  57. package/src/development.entrypoint.ts +38 -0
  58. package/src/entities/AIInput/AIContext.tsx +377 -0
  59. package/src/entities/AIInput/AIDropdown.tsx +296 -0
  60. package/src/entities/AIInput/AIGenerationButton.tsx +54 -0
  61. package/src/entities/AIInput/AIInput.module.css +488 -0
  62. package/src/entities/AIInput/AIInput.tsx +427 -0
  63. package/src/entities/AIInput/StarIcon.tsx +201 -0
  64. package/src/entities/AIInput/index.ts +12 -0
  65. package/src/entities/AIInput/utils.ts +384 -0
  66. package/src/entities/BoardMenu/BoardMenu.module.css +38 -0
  67. package/src/entities/BoardMenu/BoardMenu.tsx +86 -0
  68. package/src/entities/BoardMenu/MouseOrTracpadModal/MouseOrTrackpadModal.tsx +138 -0
  69. package/src/entities/BoardMenu/MouseOrTracpadModal/MouseOrTracpadModal.module.css +93 -0
  70. package/src/entities/BoardMenu/index.ts +1 -0
  71. package/src/entities/BoardMenu/sections/Comments.tsx +65 -0
  72. package/src/entities/BoardMenu/sections/Items.tsx +85 -0
  73. package/src/entities/BoardMenu/sections/MouseOrTrackpad.tsx +108 -0
  74. package/src/entities/BoardName/BoardName.module.css +61 -0
  75. package/src/entities/BoardName/BoardName.tsx +66 -0
  76. package/src/entities/BoardName/BoardRename.module.css +15 -0
  77. package/src/entities/BoardName/BoardRename.tsx +93 -0
  78. package/src/entities/BoardName/index.ts +3 -0
  79. package/src/entities/Canvas/Canvas.tsx +250 -0
  80. package/src/entities/Canvas/CanvasNoRouter.tsx +216 -0
  81. package/src/entities/Canvas/index.ts +2 -0
  82. package/src/entities/Folder/DragOverlay.tsx +52 -0
  83. package/src/entities/Folder/DragPlaceholder.module.css +5 -0
  84. package/src/entities/Folder/DragPlaceholder.tsx +6 -0
  85. package/src/entities/Folder/DraggingItem.module.css +8 -0
  86. package/src/entities/Folder/DraggingWrapper.tsx +18 -0
  87. package/src/entities/Folder/Folder.module.css +113 -0
  88. package/src/entities/Folder/Folder.tsx +356 -0
  89. package/src/entities/Folder/FolderItem.module.css +89 -0
  90. package/src/entities/Folder/FolderItem.tsx +165 -0
  91. package/src/entities/Folder/FoldersDndContext.tsx +129 -0
  92. package/src/entities/Folder/OpenedFoldersContext.tsx +33 -0
  93. package/src/entities/Folder/index.ts +8 -0
  94. package/src/entities/account/Account.ts +542 -0
  95. package/src/entities/account/AuthForm.module.css +150 -0
  96. package/src/entities/account/AuthForm.tsx +48 -0
  97. package/src/entities/account/AuthGuard.tsx +17 -0
  98. package/src/entities/account/AuthInterceptor.ts +21 -0
  99. package/src/entities/account/UnauthGuard.tsx +17 -0
  100. package/src/entities/account/index.ts +5 -0
  101. package/src/entities/comments/Cluster/Cluster.module.css +43 -0
  102. package/src/entities/comments/Cluster/Cluster.tsx +100 -0
  103. package/src/entities/comments/CommentContainer/CommentContainer.module.css +51 -0
  104. package/src/entities/comments/CommentContainer/CommentContainer.tsx +232 -0
  105. package/src/entities/comments/CommentContainer/CommentPreview/CommentPreview.module.css +89 -0
  106. package/src/entities/comments/CommentContainer/CommentPreview/CommentPreview.tsx +92 -0
  107. package/src/entities/comments/CommentInput/CommentInput.module.css +69 -0
  108. package/src/entities/comments/CommentInput/CommentInput.tsx +122 -0
  109. package/src/entities/comments/CommentsContext.tsx +65 -0
  110. package/src/entities/comments/CommentsPanel/CommentCard/CommentCard.module.css +36 -0
  111. package/src/entities/comments/CommentsPanel/CommentCard/CommentCard.tsx +132 -0
  112. package/src/entities/comments/CommentsPanel/CommentCard/Message/Message.module.css +73 -0
  113. package/src/entities/comments/CommentsPanel/CommentCard/Message/Message.tsx +72 -0
  114. package/src/entities/comments/CommentsPanel/CommentsPanel.module.css +143 -0
  115. package/src/entities/comments/CommentsPanel/CommentsPanel.tsx +278 -0
  116. package/src/entities/comments/CommentsPanel/CommentsPanelContext.tsx +37 -0
  117. package/src/entities/comments/CommentsProvider.module.css +4 -0
  118. package/src/entities/comments/CommentsProvider.tsx +73 -0
  119. package/src/entities/comments/CreateComment/CreateComment.module.css +8 -0
  120. package/src/entities/comments/CreateComment/CreateComment.tsx +66 -0
  121. package/src/entities/comments/Thread/ExtraOptions/ExtraOptions.module.css +44 -0
  122. package/src/entities/comments/Thread/ExtraOptions/ExtraOptions.tsx +127 -0
  123. package/src/entities/comments/Thread/OptionsPanel/OptionsPanel.module.css +32 -0
  124. package/src/entities/comments/Thread/OptionsPanel/OptionsPanel.tsx +38 -0
  125. package/src/entities/comments/Thread/ThreadPanel.module.css +82 -0
  126. package/src/entities/comments/Thread/ThreadPanel.tsx +298 -0
  127. package/src/entities/comments/Thread/message/Message.module.css +71 -0
  128. package/src/entities/comments/Thread/message/Message.tsx +137 -0
  129. package/src/entities/comments/index.ts +7 -0
  130. package/src/entities/comments/lib.ts +22 -0
  131. package/src/entities/comments/useCommentsMerge.ts +88 -0
  132. package/src/entities/comments/useIntersectionObserver.ts +58 -0
  133. package/src/entities/comments/useScrollToUnreadMessage.ts +24 -0
  134. package/src/env.d.ts +12 -0
  135. package/src/features/AccessDeniedModal/AccessDeniedModal.module.css +56 -0
  136. package/src/features/AccessDeniedModal/AccessDeniedModal.tsx +94 -0
  137. package/src/features/AccessDeniedModal/index.ts +1 -0
  138. package/src/features/AiUnavailableModal/AiUnavailableModal.module.css +52 -0
  139. package/src/features/AiUnavailableModal/AiUnavailableModal.tsx +59 -0
  140. package/src/features/AiUnavailableModal/index.ts +1 -0
  141. package/src/features/AppContext.tsx +17 -0
  142. package/src/features/AppView/AppView.module.css +18 -0
  143. package/src/features/AppView/AppView.tsx +302 -0
  144. package/src/features/AppView/InactiveBoardHidder.tsx +14 -0
  145. package/src/features/AppView/LocalAppView.tsx +177 -0
  146. package/src/features/AppView/NoBoardIsOpen.module.css +29 -0
  147. package/src/features/AppView/NoBoardIsOpen.tsx +69 -0
  148. package/src/features/AppView/QuickAddPanel/QuickAddPanel.module.css +12 -0
  149. package/src/features/AppView/QuickAddPanel/QuickAddPanel.tsx +171 -0
  150. package/src/features/AppView/QuickAddPanel/index.ts +1 -0
  151. package/src/features/AppView/index.ts +2 -0
  152. package/src/features/AppView/listeners.ts +0 -0
  153. package/src/features/AudioPlayer/AudioPlayer.module.css +213 -0
  154. package/src/features/AudioPlayer/AudioPlayer.tsx +517 -0
  155. package/src/features/AudioPlayer/index.ts +1 -0
  156. package/src/features/ChangePasswordModal/ChangePassword.module.css +129 -0
  157. package/src/features/ChangePasswordModal/ChangePasswordModal.tsx +247 -0
  158. package/src/features/ChangePasswordModal/index.ts +4 -0
  159. package/src/features/ContextMenu/ContextMenu.module.css +38 -0
  160. package/src/features/ContextMenu/ContextMenu.tsx +507 -0
  161. package/src/features/ContextMenu/ContextMenuContext.tsx +77 -0
  162. package/src/features/ContextMenu/index.ts +5 -0
  163. package/src/features/ContextPanel/Buttons/AIGeneration.tsx +72 -0
  164. package/src/features/ContextPanel/Buttons/AIModel/AIModel.module.css +5 -0
  165. package/src/features/ContextPanel/Buttons/AIModel/AIModel.tsx +97 -0
  166. package/src/features/ContextPanel/Buttons/AIModel/index.ts +1 -0
  167. package/src/features/ContextPanel/Buttons/AIModel.tsx +95 -0
  168. package/src/features/ContextPanel/Buttons/AddList/AddList.tsx +83 -0
  169. package/src/features/ContextPanel/Buttons/AddList/index.ts +1 -0
  170. package/src/features/ContextPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +107 -0
  171. package/src/features/ContextPanel/Buttons/ButtonWithMenu/UiButtonWithMenu.module.css +49 -0
  172. package/src/features/ContextPanel/Buttons/ButtonWithMenu/index.ts +1 -0
  173. package/src/features/ContextPanel/Buttons/CardGame/Card/CreateDeck.tsx +65 -0
  174. package/src/features/ContextPanel/Buttons/CardGame/Card/FlipCard.tsx +41 -0
  175. package/src/features/ContextPanel/Buttons/CardGame/Deck/GetCard.tsx +61 -0
  176. package/src/features/ContextPanel/Buttons/CardGame/Deck/ShuffleDeck.tsx +39 -0
  177. package/src/features/ContextPanel/Buttons/CardGame/Dice/ChangeRange/ChangeRange.module.css +53 -0
  178. package/src/features/ContextPanel/Buttons/CardGame/Dice/ChangeRange/ChangeRange.tsx +133 -0
  179. package/src/features/ContextPanel/Buttons/CardGame/Dice/ThrowDice.tsx +38 -0
  180. package/src/features/ContextPanel/Buttons/ConnectorAddText.tsx +55 -0
  181. package/src/features/ContextPanel/Buttons/ConnectorFontStyle.tsx +28 -0
  182. package/src/features/ContextPanel/Buttons/ConnectorLineColor.tsx +96 -0
  183. package/src/features/ContextPanel/Buttons/ConnectorTextColor.tsx +22 -0
  184. package/src/features/ContextPanel/Buttons/ConnectorTextHighlight.tsx +28 -0
  185. package/src/features/ContextPanel/Buttons/ConnectorType/ConnectorType.module.css +5 -0
  186. package/src/features/ContextPanel/Buttons/ConnectorType/ConnectorType.tsx +108 -0
  187. package/src/features/ContextPanel/Buttons/ConnectorType/index.ts +1 -0
  188. package/src/features/ContextPanel/Buttons/ContextPanelButton.module.css +19 -0
  189. package/src/features/ContextPanel/Buttons/Delete.tsx +32 -0
  190. package/src/features/ContextPanel/Buttons/DrawFillStyle.tsx +107 -0
  191. package/src/features/ContextPanel/Buttons/DrawStrokeWidth/DrawStrokeWidth.module.css +4 -0
  192. package/src/features/ContextPanel/Buttons/DrawStrokeWidth/DrawStrokeWidth.tsx +32 -0
  193. package/src/features/ContextPanel/Buttons/DrawStrokeWidth/index.ts +1 -0
  194. package/src/features/ContextPanel/Buttons/Duplicate.tsx +25 -0
  195. package/src/features/ContextPanel/Buttons/Edit.tsx +23 -0
  196. package/src/features/ContextPanel/Buttons/EndPointer/EndPointer.module.css +14 -0
  197. package/src/features/ContextPanel/Buttons/EndPointer/EndPointer.tsx +80 -0
  198. package/src/features/ContextPanel/Buttons/EndPointer/index.ts +1 -0
  199. package/src/features/ContextPanel/Buttons/FillStyle.tsx +91 -0
  200. package/src/features/ContextPanel/Buttons/FontSize/ConnectorFontSize.tsx +34 -0
  201. package/src/features/ContextPanel/Buttons/FontSize/FontSize.module.css +53 -0
  202. package/src/features/ContextPanel/Buttons/FontSize/FontSize.tsx +217 -0
  203. package/src/features/ContextPanel/Buttons/FontSize/index.ts +2 -0
  204. package/src/features/ContextPanel/Buttons/FontStyle.tsx +68 -0
  205. package/src/features/ContextPanel/Buttons/FrameFill.tsx +91 -0
  206. package/src/features/ContextPanel/Buttons/FrameNavNext.tsx +33 -0
  207. package/src/features/ContextPanel/Buttons/FrameNavPrev.tsx +37 -0
  208. package/src/features/ContextPanel/Buttons/FrameRatio/FrameRatio.module.css +14 -0
  209. package/src/features/ContextPanel/Buttons/FrameRatio/FrameRatio.tsx +113 -0
  210. package/src/features/ContextPanel/Buttons/FrameRatio/index.ts +1 -0
  211. package/src/features/ContextPanel/Buttons/HyperLinkBtn.tsx +53 -0
  212. package/src/features/ContextPanel/Buttons/ItemType/ItemType.module.css +15 -0
  213. package/src/features/ContextPanel/Buttons/ItemType/ItemType.tsx +115 -0
  214. package/src/features/ContextPanel/Buttons/ItemType/index.ts +1 -0
  215. package/src/features/ContextPanel/Buttons/Lock.tsx +98 -0
  216. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/BringToFront.tsx +28 -0
  217. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/CopyFrameLink.tsx +50 -0
  218. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/CopyItemLink.tsx +48 -0
  219. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/ExportFrame.tsx +32 -0
  220. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SaveImg.tsx +32 -0
  221. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SaveVideoOrAudio.tsx +45 -0
  222. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SendToBack.tsx +28 -0
  223. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SetLinkTo.tsx +35 -0
  224. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/getLinkToItem.tsx +3 -0
  225. package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/index.ts +5 -0
  226. package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenu.module.css +51 -0
  227. package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenu.tsx +96 -0
  228. package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenuItem.tsx +29 -0
  229. package/src/features/ContextPanel/Buttons/RestOptionsMenu/index.ts +1 -0
  230. package/src/features/ContextPanel/Buttons/StartPointer/StartPointer.module.css +18 -0
  231. package/src/features/ContextPanel/Buttons/StartPointer/StartPointer.tsx +87 -0
  232. package/src/features/ContextPanel/Buttons/StartPointer/index.ts +1 -0
  233. package/src/features/ContextPanel/Buttons/StickerFillStyle.tsx +74 -0
  234. package/src/features/ContextPanel/Buttons/StrokeStyle/StrokeStyle.module.css +19 -0
  235. package/src/features/ContextPanel/Buttons/StrokeStyle/StrokeStyle.tsx +144 -0
  236. package/src/features/ContextPanel/Buttons/StrokeStyle/index.ts +1 -0
  237. package/src/features/ContextPanel/Buttons/SwitchPointers.tsx +28 -0
  238. package/src/features/ContextPanel/Buttons/TextAlignment/TextAlignment.module.css +6 -0
  239. package/src/features/ContextPanel/Buttons/TextAlignment/TextAlignment.tsx +98 -0
  240. package/src/features/ContextPanel/Buttons/TextAlignment/index.ts +1 -0
  241. package/src/features/ContextPanel/Buttons/TextAlignmentSticker.tsx +87 -0
  242. package/src/features/ContextPanel/Buttons/TextColor.tsx +86 -0
  243. package/src/features/ContextPanel/Buttons/TextHighlight.tsx +85 -0
  244. package/src/features/ContextPanel/Buttons/ToggleFrameRatio.tsx +38 -0
  245. package/src/features/ContextPanel/Buttons/ToggleIsShining.tsx +36 -0
  246. package/src/features/ContextPanel/ContextPanel.module.css +9 -0
  247. package/src/features/ContextPanel/ContextPanel.tsx +531 -0
  248. package/src/features/ContextPanel/PanelContext.ts +17 -0
  249. package/src/features/ContextPanel/index.ts +1 -0
  250. package/src/features/ContextWrapper.tsx +47 -0
  251. package/src/features/Counter/Counter.module.css +20 -0
  252. package/src/features/Counter/Counter.tsx +49 -0
  253. package/src/features/CryptoWrapper/CryptoWrapper.tsx +79 -0
  254. package/src/features/CryptoWrapper/index.ts +1 -0
  255. package/src/features/Cursors/comment.svg +22 -0
  256. package/src/features/Cursors/customCursors.ts +31 -0
  257. package/src/features/Cursors/eraser.svg +3 -0
  258. package/src/features/Cursors/index.ts +1 -0
  259. package/src/features/Cursors/pencil.svg +3 -0
  260. package/src/features/Cursors/sticker/sticker-black.svg +27 -0
  261. package/src/features/Cursors/sticker/sticker-blue.svg +27 -0
  262. package/src/features/Cursors/sticker/sticker-gray.svg +27 -0
  263. package/src/features/Cursors/sticker/sticker-green.svg +27 -0
  264. package/src/features/Cursors/sticker/sticker-light-blue.svg +28 -0
  265. package/src/features/Cursors/sticker/sticker-light-gray.svg +27 -0
  266. package/src/features/Cursors/sticker/sticker-light-green.svg +27 -0
  267. package/src/features/Cursors/sticker/sticker-orange.svg +27 -0
  268. package/src/features/Cursors/sticker/sticker-pink.svg +27 -0
  269. package/src/features/Cursors/sticker/sticker-purple.svg +27 -0
  270. package/src/features/Cursors/sticker/sticker-sky-blue.svg +27 -0
  271. package/src/features/Cursors/sticker/sticker-yellow.svg +27 -0
  272. package/src/features/ErrorBoundary/ErrorBoundary.module.css +64 -0
  273. package/src/features/ErrorBoundary/ErrorBoundary.tsx +112 -0
  274. package/src/features/ErrorBoundary/index.ts +1 -0
  275. package/src/features/ExportPanel/ExportPanel.module.css +55 -0
  276. package/src/features/ExportPanel/ExportPanel.tsx +73 -0
  277. package/src/features/ExportPanel/ExportVisible.tsx +18 -0
  278. package/src/features/ExportPanel/index.ts +1 -0
  279. package/src/features/GameItems/CreateCardsModal.tsx +178 -0
  280. package/src/features/GameItems/CreateDiceModal.tsx +213 -0
  281. package/src/features/GameItems/Modal.module.css +148 -0
  282. package/src/features/GameItems/index.ts +1 -0
  283. package/src/features/GenerateChart/AIChat.module.css +162 -0
  284. package/src/features/GenerateChart/AIChat.tsx +198 -0
  285. package/src/features/GenerateChart/AIChatPanel.module.css +34 -0
  286. package/src/features/GenerateChart/AIChatPanel.tsx +72 -0
  287. package/src/features/GenerateChart/lib/engine/index.ts +616 -0
  288. package/src/features/GenerateChart/lib/transformOutput.ts +338 -0
  289. package/src/features/GoogleAuthBtn/GoogleAuthBtn.module.css +19 -0
  290. package/src/features/GoogleAuthBtn/GoogleAuthBtn.tsx +19 -0
  291. package/src/features/GoogleAuthBtn/icons.tsx +301 -0
  292. package/src/features/GoogleAuthBtn/index.ts +1 -0
  293. package/src/features/ImportMiro/AuthClipboardModal/AuthClipboardModal.module.css +26 -0
  294. package/src/features/ImportMiro/AuthClipboardModal/AuthClipboardModal.tsx +38 -0
  295. package/src/features/ImportMiro/ImgAuthClipboardModal/ImgAuthClipboardModal.module.css +36 -0
  296. package/src/features/ImportMiro/ImgAuthClipboardModal/ImgAuthClipboardModal.tsx +74 -0
  297. package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/MiroClipboardTransformer.ts +765 -0
  298. package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/index.ts +1 -0
  299. package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/useCopyBoardItems.tsx +1156 -0
  300. package/src/features/ImportMiro/ImportMiroBoards/ImportMiro.module.css +157 -0
  301. package/src/features/ImportMiro/ImportMiroBoards/ImportMiro.tsx +95 -0
  302. package/src/features/ImportMiro/ImportMiroBoards/MiroModels.ts +250 -0
  303. package/src/features/ImportMiro/ImportMiroBoards/Notifications/ErrorNotification.tsx +48 -0
  304. package/src/features/ImportMiro/ImportMiroBoards/Notifications/LoadingNotification.tsx +53 -0
  305. package/src/features/ImportMiro/ImportMiroBoards/Notifications/SuccessNotification.tsx +54 -0
  306. package/src/features/ImportMiro/ImportMiroBoards/Notifications/WarnClipboardNotification.tsx +57 -0
  307. package/src/features/ImportMiro/ImportMiroBoards/Notifications/WarnNotification.tsx +68 -0
  308. package/src/features/ImportMiro/ImportMiroBoards/Notifications/index.ts +5 -0
  309. package/src/features/ImportMiro/ImportMiroStartModal/ImportMiroStartModal.module.css +35 -0
  310. package/src/features/ImportMiro/ImportMiroStartModal/ImportMiroStartModal.tsx +47 -0
  311. package/src/features/ImportMiro/index.ts +5 -0
  312. package/src/features/ItemTooltip/ItemTooltip.tsx +77 -0
  313. package/src/features/ItemTooltip/index.ts +1 -0
  314. package/src/features/ItemsProvider/ItemsProvider.tsx +45 -0
  315. package/src/features/ItemsProvider/index.ts +1 -0
  316. package/src/features/LandingMenu/LandingMenu.module.css +54 -0
  317. package/src/features/LandingMenu/LandingMenu.tsx +88 -0
  318. package/src/features/LandingMenu/MobileLandingMenu.module.css +78 -0
  319. package/src/features/LandingMenu/MobileLandingMenu.tsx +133 -0
  320. package/src/features/LandingMenu/const.ts +2 -0
  321. package/src/features/LandingMenu/index.ts +2 -0
  322. package/src/features/LinksProvider/LinkToButton/LinkToButton.module.css +34 -0
  323. package/src/features/LinksProvider/LinkToButton/LinkToButton.tsx +175 -0
  324. package/src/features/LinksProvider/LinksProvider.tsx +84 -0
  325. package/src/features/LinksProvider/index.ts +1 -0
  326. package/src/features/LocalFileSavingProgress/LocalFileSaveProgress.module.css +6 -0
  327. package/src/features/LocalFileSavingProgress/LocalFileSaveProgress.tsx +30 -0
  328. package/src/features/LocalFileSavingProgress/index.ts +1 -0
  329. package/src/features/LoginWith/LoginWith.module.css +18 -0
  330. package/src/features/LoginWith/LoginWith.tsx +15 -0
  331. package/src/features/MediaUnavailableModal/MediaUnavailableModal.module.css +52 -0
  332. package/src/features/MediaUnavailableModal/MediaUnavailableModal.tsx +64 -0
  333. package/src/features/MediaUnavailableModal/index.ts +4 -0
  334. package/src/features/Modal/ConfirmModal.module.css +71 -0
  335. package/src/features/Modal/ConfirmModal.tsx +199 -0
  336. package/src/features/Modal/CookiesModal.module.css +32 -0
  337. package/src/features/Modal/CookiesModal.tsx +75 -0
  338. package/src/features/Modal/InfoModal.module.css +49 -0
  339. package/src/features/Modal/InfoModal.tsx +90 -0
  340. package/src/features/Modal/ModalsWrapper.tsx +13 -0
  341. package/src/features/Modal/SetLinkToModal.module.css +49 -0
  342. package/src/features/Modal/SetLinkToModal.tsx +112 -0
  343. package/src/features/Notifications/Notifications.module.css +14 -0
  344. package/src/features/Notifications/SigninErrorNotification.tsx +34 -0
  345. package/src/features/Notifications/SignupErrorNotification.tsx +33 -0
  346. package/src/features/Notifications/index.ts +8 -0
  347. package/src/features/Pickers/ColorPicker/ColorItem.module.css +44 -0
  348. package/src/features/Pickers/ColorPicker/ColorItem.tsx +33 -0
  349. package/src/features/Pickers/ColorPicker/ColorPicker.module.css +12 -0
  350. package/src/features/Pickers/ColorPicker/ColorPicker.tsx +43 -0
  351. package/src/features/Pickers/ColorPicker/SquareColorItem.module.css +41 -0
  352. package/src/features/Pickers/ColorPicker/SquareColorItem.tsx +27 -0
  353. package/src/features/Pickers/ColorPicker/index.ts +1 -0
  354. package/src/features/Pickers/ConnectorLineStylePicker.tsx +52 -0
  355. package/src/features/Pickers/ConnectorPointerPicker/ConnectorPointerPicker.module.css +4 -0
  356. package/src/features/Pickers/ConnectorPointerPicker/ConnectorPointerPicker.tsx +39 -0
  357. package/src/features/Pickers/ConnectorPointerPicker/index.ts +1 -0
  358. package/src/features/Pickers/DrawingToolPicker.tsx +31 -0
  359. package/src/features/Pickers/FontSizePicker/FontSizePicker.module.css +8 -0
  360. package/src/features/Pickers/FontSizePicker/FontSizePicker.tsx +61 -0
  361. package/src/features/Pickers/FontSizePicker/index.ts +1 -0
  362. package/src/features/Pickers/FontStylePicker.tsx +88 -0
  363. package/src/features/Pickers/FramePicker/FramePicker.module.css +11 -0
  364. package/src/features/Pickers/FramePicker/FramePicker.tsx +40 -0
  365. package/src/features/Pickers/FramePicker/index.ts +1 -0
  366. package/src/features/Pickers/HorizontalAlignmentPicker.tsx +49 -0
  367. package/src/features/Pickers/ShapeTypePicker.tsx +80 -0
  368. package/src/features/Pickers/SliderPicker/SliderPicker.module.css +13 -0
  369. package/src/features/Pickers/SliderPicker/SliderPicker.tsx +43 -0
  370. package/src/features/Pickers/SliderPicker/index.ts +1 -0
  371. package/src/features/Pickers/StrokeStylePicker/StrokeStylePicker.module.css +4 -0
  372. package/src/features/Pickers/StrokeStylePicker/StrokeStylePicker.tsx +59 -0
  373. package/src/features/Pickers/StrokeStylePicker/index.ts +1 -0
  374. package/src/features/Pickers/VerticalAlignmentPicker.tsx +48 -0
  375. package/src/features/Presence/BringToMe/BringToMe.module.css +134 -0
  376. package/src/features/Presence/BringToMe/BringToMe.tsx +363 -0
  377. package/src/features/Presence/PresenceUsers/Dropdown.tsx +70 -0
  378. package/src/features/Presence/PresenceUsers/EyeIcon.tsx +16 -0
  379. package/src/features/Presence/PresenceUsers/PresenceUserAvatar.tsx +93 -0
  380. package/src/features/Presence/PresenceUsers/PresenceUsers.module.css +366 -0
  381. package/src/features/Presence/PresenceUsers/PresenceUsers.tsx +239 -0
  382. package/src/features/Presence/PresenceUsers/UserAvatar.tsx +92 -0
  383. package/src/features/Presence/PresenceUsers/mock.ts +34 -0
  384. package/src/features/Presence/UserTracking/UserTracking.module.css +72 -0
  385. package/src/features/Presence/UserTracking/UserTracking.tsx +67 -0
  386. package/src/features/ProfileSettingsModal/ProfileSettingsModal.module.css +100 -0
  387. package/src/features/ProfileSettingsModal/ProfileSettingsModal.tsx +333 -0
  388. package/src/features/ProfileSettingsModal/index.ts +4 -0
  389. package/src/features/QuickAddButtons/QuickAddButtonsClear.tsx +12 -0
  390. package/src/features/README.md +36 -0
  391. package/src/features/Rename/RenameContext.tsx +54 -0
  392. package/src/features/Rename/RenameInput.module.css +15 -0
  393. package/src/features/Rename/RenameInput.tsx +78 -0
  394. package/src/features/Rename/index.ts +2 -0
  395. package/src/features/ShapesPanel/ShapesCategory/ShapesCategory.module.css +29 -0
  396. package/src/features/ShapesPanel/ShapesCategory/ShapesCategory.tsx +70 -0
  397. package/src/features/ShapesPanel/ShapesPanel.module.css +75 -0
  398. package/src/features/ShapesPanel/ShapesPanel.tsx +69 -0
  399. package/src/features/ShapesPanel/ShapesPanelContext.tsx +109 -0
  400. package/src/features/ShapesPanel/index.ts +5 -0
  401. package/src/features/ShareModal/SaveShareModal.module.css +31 -0
  402. package/src/features/ShareModal/SaveShareModal.tsx +63 -0
  403. package/src/features/ShareModal/SearchInput.module.css +188 -0
  404. package/src/features/ShareModal/SearchInput.tsx +441 -0
  405. package/src/features/ShareModal/ShareModal.module.css +297 -0
  406. package/src/features/ShareModal/ShareModal.tsx +627 -0
  407. package/src/features/ShareModal/SharePanel.module.css +74 -0
  408. package/src/features/ShareModal/SharePanel.tsx +258 -0
  409. package/src/features/ShareModal/index.ts +1 -0
  410. package/src/features/ShareSnapshotModal/ShareSnapshotModal.module.css +286 -0
  411. package/src/features/ShareSnapshotModal/ShareSnapshotModal.tsx +41 -0
  412. package/src/features/ShareSnapshotModal/SnapshotNameInput.module.css +92 -0
  413. package/src/features/ShareSnapshotModal/SnapshotNameInput.tsx +225 -0
  414. package/src/features/ShareSnapshotModal/index.ts +1 -0
  415. package/src/features/SidePanel/LocalSidePanelContext.tsx +66 -0
  416. package/src/features/SidePanel/ResizableEdge.module.css +9 -0
  417. package/src/features/SidePanel/ResizableEdge.tsx +77 -0
  418. package/src/features/SidePanel/SidePanel.module.css +140 -0
  419. package/src/features/SidePanel/SidePanel.tsx +179 -0
  420. package/src/features/SidePanel/SidePanelContext.tsx +108 -0
  421. package/src/features/SidePanel/index.ts +3 -0
  422. package/src/features/SidePanelsContainer/SidePanelsContainer.module.css +15 -0
  423. package/src/features/SidePanelsContainer/SidePanelsContainer.tsx +61 -0
  424. package/src/features/SidePanelsContainer/index.ts +1 -0
  425. package/src/features/Templates/CreateTemplateModal/CreateTemplateModal.module.css +34 -0
  426. package/src/features/Templates/CreateTemplateModal/CreateTemplateModal.tsx +463 -0
  427. package/src/features/Templates/SelectTemplateModal/CategoriesMenu/CategoriesMenu.module.css +48 -0
  428. package/src/features/Templates/SelectTemplateModal/CategoriesMenu/CategoriesMenu.tsx +62 -0
  429. package/src/features/Templates/SelectTemplateModal/LanguagesDropdown/LanguagesDropdown.module.css +61 -0
  430. package/src/features/Templates/SelectTemplateModal/LanguagesDropdown/LanguagesDropdown.tsx +72 -0
  431. package/src/features/Templates/SelectTemplateModal/SelectTemplateModal.module.css +152 -0
  432. package/src/features/Templates/SelectTemplateModal/SelectTemplateModal.tsx +206 -0
  433. package/src/features/Templates/SelectTemplateModal/TemplateItemPreview/TemplateItemPreview.module.css +151 -0
  434. package/src/features/Templates/SelectTemplateModal/TemplateItemPreview/TemplateItemPreview.tsx +77 -0
  435. package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItem/TemplateItem.tsx +119 -0
  436. package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItem/templateItem.module.css +88 -0
  437. package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItemsGrid.module.css +51 -0
  438. package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItemsGrid.tsx +39 -0
  439. package/src/features/Templates/TolgeeProvider.tsx +29 -0
  440. package/src/features/Templates/config.ts +6 -0
  441. package/src/features/Templates/index.ts +2 -0
  442. package/src/features/Templates/lib.ts +59 -0
  443. package/src/features/TextEditor/Element.tsx +204 -0
  444. package/src/features/TextEditor/Leaf.tsx +72 -0
  445. package/src/features/TextEditor/README.md +3 -0
  446. package/src/features/TextEditor/TextEditor.module.css +115 -0
  447. package/src/features/TextEditor/TextEditor.tsx +610 -0
  448. package/src/features/TextEditor/index.ts +1 -0
  449. package/src/features/TextEditor/verticalAlignmentToFlex.tsx +14 -0
  450. package/src/features/TitlePanel/TitlePanel.module.css +123 -0
  451. package/src/features/TitlePanel/TitlePanel.tsx +341 -0
  452. package/src/features/TitlePanel/index.ts +1 -0
  453. package/src/features/ToastProvider.tsx +33 -0
  454. package/src/features/ToolsPanel/Buttons/AddConnector.tsx +73 -0
  455. package/src/features/ToolsPanel/Buttons/AddCounter.tsx +29 -0
  456. package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawing.module.css +13 -0
  457. package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawing.tsx +115 -0
  458. package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawingContext.tsx +15 -0
  459. package/src/features/ToolsPanel/Buttons/AddDrawing/AddHighlighter/AddHighlighter.module.css +26 -0
  460. package/src/features/ToolsPanel/Buttons/AddDrawing/AddHighlighter/AddHighlighter.tsx +138 -0
  461. package/src/features/ToolsPanel/Buttons/AddDrawing/AddPen/AddPen.module.css +26 -0
  462. package/src/features/ToolsPanel/Buttons/AddDrawing/AddPen/AddPen.tsx +126 -0
  463. package/src/features/ToolsPanel/Buttons/AddDrawing/Eraser/Eraser.tsx +47 -0
  464. package/src/features/ToolsPanel/Buttons/AddDrawing/index.ts +1 -0
  465. package/src/features/ToolsPanel/Buttons/AddFrame.tsx +57 -0
  466. package/src/features/ToolsPanel/Buttons/AddGameItem/AddCard.tsx +31 -0
  467. package/src/features/ToolsPanel/Buttons/AddGameItem/AddDice.tsx +32 -0
  468. package/src/features/ToolsPanel/Buttons/AddGameItem/AddGameItem.module.css +3 -0
  469. package/src/features/ToolsPanel/Buttons/AddGameItem/AddGameItem.tsx +39 -0
  470. package/src/features/ToolsPanel/Buttons/AddMedia/AddMedia.module.css +3 -0
  471. package/src/features/ToolsPanel/Buttons/AddMedia/AddMedia.tsx +72 -0
  472. package/src/features/ToolsPanel/Buttons/AddMedia/AddMediaButton.tsx +146 -0
  473. package/src/features/ToolsPanel/Buttons/AddShape/AddShape.module.css +18 -0
  474. package/src/features/ToolsPanel/Buttons/AddShape/AddShape.tsx +97 -0
  475. package/src/features/ToolsPanel/Buttons/AddShape/index.ts +1 -0
  476. package/src/features/ToolsPanel/Buttons/AddSticker.tsx +73 -0
  477. package/src/features/ToolsPanel/Buttons/AddTemplate.tsx +28 -0
  478. package/src/features/ToolsPanel/Buttons/AddText.tsx +31 -0
  479. package/src/features/ToolsPanel/Buttons/ButtonWithMenu/ButtonWithMenu.module.css +9 -0
  480. package/src/features/ToolsPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +24 -0
  481. package/src/features/ToolsPanel/Buttons/ButtonWithMenu/index.ts +1 -0
  482. package/src/features/ToolsPanel/Buttons/EventList/EventList.module.css +5 -0
  483. package/src/features/ToolsPanel/Buttons/EventList/EventList.tsx +144 -0
  484. package/src/features/ToolsPanel/Buttons/EventList/History.tsx +140 -0
  485. package/src/features/ToolsPanel/Buttons/EventList/HistoryEvent.tsx +28 -0
  486. package/src/features/ToolsPanel/Buttons/EventList/PrettifiedEvent.tsx +212 -0
  487. package/src/features/ToolsPanel/Buttons/EventList/SyncJournal.tsx +89 -0
  488. package/src/features/ToolsPanel/Buttons/EventList/index.ts +1 -0
  489. package/src/features/ToolsPanel/Buttons/Grab.tsx +29 -0
  490. package/src/features/ToolsPanel/Buttons/Redo.tsx +40 -0
  491. package/src/features/ToolsPanel/Buttons/Select.tsx +37 -0
  492. package/src/features/ToolsPanel/Buttons/Star.tsx +31 -0
  493. package/src/features/ToolsPanel/Buttons/Undo.tsx +39 -0
  494. package/src/features/ToolsPanel/PanelContext.ts +13 -0
  495. package/src/features/ToolsPanel/ToolsPanel.module.css +33 -0
  496. package/src/features/ToolsPanel/ToolsPanel.tsx +84 -0
  497. package/src/features/ToolsPanel/ViewToolsPanel.tsx +30 -0
  498. package/src/features/ToolsPanel/index.ts +1 -0
  499. package/src/features/UserPanel/ActionButtons/ActionButtons.module.css +9 -0
  500. package/src/features/UserPanel/ActionButtons/ActionButtons.tsx +22 -0
  501. package/src/features/UserPanel/Avatar/Avatar.module.css +21 -0
  502. package/src/features/UserPanel/Avatar/Avatar.tsx +44 -0
  503. package/src/features/UserPanel/Buttons/AddComment/AddComment.module.css +14 -0
  504. package/src/features/UserPanel/Buttons/AddComment/AddComment.tsx +61 -0
  505. package/src/features/UserPanel/Buttons/AddComment/index.ts +1 -0
  506. package/src/features/UserPanel/Buttons/ButtonWithMenu/ButtonWithMenu.module.css +8 -0
  507. package/src/features/UserPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +24 -0
  508. package/src/features/UserPanel/Buttons/ButtonWithMenu/index.ts +1 -0
  509. package/src/features/UserPanel/Buttons/ShareBtn/ShareBtn.tsx +49 -0
  510. package/src/features/UserPanel/Buttons/TogglePresenceRender/TogglePresenceRender.module.css +48 -0
  511. package/src/features/UserPanel/Buttons/TogglePresenceRender/TogglePresenceRender.tsx +38 -0
  512. package/src/features/UserPanel/UserAvatar/UserAvatar.tsx +66 -0
  513. package/src/features/UserPanel/UserDropdown/UserDropdown.tsx +75 -0
  514. package/src/features/UserPanel/UserPanel.module.css +516 -0
  515. package/src/features/UserPanel/UserPanel.tsx +153 -0
  516. package/src/features/UserPanel/UserPic/UserPic.tsx +171 -0
  517. package/src/features/UserPanel/icons/ChangePassword.tsx +22 -0
  518. package/src/features/UserPanel/icons/Click.tsx +20 -0
  519. package/src/features/UserPanel/icons/Logout.tsx +22 -0
  520. package/src/features/UserPanel/icons/Ring.tsx +18 -0
  521. package/src/features/UserPanel/icons/Thumb.tsx +18 -0
  522. package/src/features/UserPanel/icons/Upgrade.tsx +20 -0
  523. package/src/features/UserPanel/icons/UserShare.tsx +18 -0
  524. package/src/features/UserPlan/HistoryModal.tsx +30 -0
  525. package/src/features/UserPlan/HistoryTable.tsx +114 -0
  526. package/src/features/UserPlan/LimitsModal.tsx +102 -0
  527. package/src/features/UserPlan/LimitsTable.module.css +131 -0
  528. package/src/features/UserPlan/LimitsTable.tsx +171 -0
  529. package/src/features/UserPlan/PlanCard.module.css +184 -0
  530. package/src/features/UserPlan/PlanCard.tsx +245 -0
  531. package/src/features/UserPlan/PlanCards.module.css +26 -0
  532. package/src/features/UserPlan/PlanCards.tsx +476 -0
  533. package/src/features/UserPlan/SelectPaymentModal.module.css +206 -0
  534. package/src/features/UserPlan/SelectPaymentModal.tsx +810 -0
  535. package/src/features/UserPlan/UserPlanModal.module.css +145 -0
  536. package/src/features/UserPlan/UserPlanModal.tsx +124 -0
  537. package/src/features/UserPlan/UserPlanUsage.module.css +101 -0
  538. package/src/features/UserPlan/UserPlanUsage.tsx +186 -0
  539. package/src/features/UserPlan/index.ts +1 -0
  540. package/src/features/VideoPlayer/VideoCanvasControls.tsx +59 -0
  541. package/src/features/VideoPlayer/VideoPlayer.module.css +3 -0
  542. package/src/features/VideoPlayer/VideoPlayer.tsx +158 -0
  543. package/src/features/VideoPlayer/index.ts +2 -0
  544. package/src/features/ViewModeGuard.tsx +62 -0
  545. package/src/features/WalletLoginButton/WalletLoginButton.module.css +7 -0
  546. package/src/features/WalletLoginButton/WalletLoginButton.tsx +77 -0
  547. package/src/features/WalletLoginButton/index.ts +1 -0
  548. package/src/features/Widgets/Navbar/Navbar.css +148 -0
  549. package/src/features/Widgets/Navbar/Navbar.tsx +75 -0
  550. package/src/features/Widgets/Navbar/lead-icon.tsx +25 -0
  551. package/src/features/Widgets/form-notifications/password-changed.module.css +39 -0
  552. package/src/features/Widgets/form-notifications/password-changed.tsx +28 -0
  553. package/src/features/ZoomPanel/ZoomPanel.module.css +32 -0
  554. package/src/features/ZoomPanel/ZoomPanel.tsx +105 -0
  555. package/src/features/ZoomPanel/index.ts +1 -0
  556. package/src/features/hotkeys.json +315 -0
  557. package/src/features/hyperLink/HyperLink.module.css +20 -0
  558. package/src/features/hyperLink/HyperLink.tsx +77 -0
  559. package/src/features/hyperLink/HyperLinkContext.tsx +57 -0
  560. package/src/features/hyperLink/HyperLinkInput/HyperLinkInput.module.css +47 -0
  561. package/src/features/hyperLink/HyperLinkInput/HyperLinkInput.tsx +196 -0
  562. package/src/features/hyperLink/index.ts +6 -0
  563. package/src/features/index.drawio +115 -0
  564. package/src/features/index.svg +1 -0
  565. package/src/features/modules.d.ts +22 -0
  566. package/src/index.css +65 -0
  567. package/src/index.html +74 -0
  568. package/src/index.ts +4 -0
  569. package/src/initI18N.ts +42 -0
  570. package/src/pages/AddEmailView/AddEmailPage.module.css +136 -0
  571. package/src/pages/AddEmailView/AddEmailPage.tsx +125 -0
  572. package/src/pages/AddEmailView/index.ts +1 -0
  573. package/src/pages/BindEmailPage/BindEmailPage.module.css +73 -0
  574. package/src/pages/BindEmailPage/BindEmailPage.tsx +263 -0
  575. package/src/pages/BindEmailPage/index.ts +1 -0
  576. package/src/pages/BoardPage.tsx +161 -0
  577. package/src/pages/ForgotPasswordPage/ForgotPasswordPage.module.css +82 -0
  578. package/src/pages/ForgotPasswordPage/ForgotPasswordPage.tsx +148 -0
  579. package/src/pages/ForgotPasswordPage/SuccessIcon.tsx +20 -0
  580. package/src/pages/ForgotPasswordPage/index.ts +1 -0
  581. package/src/pages/HTMLSnapshot/HTMLSnapshot.tsx +60 -0
  582. package/src/pages/HTMLSnapshot/index.ts +1 -0
  583. package/src/pages/RestorePasswordPage/RestorePasswordPage.module.css +46 -0
  584. package/src/pages/RestorePasswordPage/RestorePasswordPage.tsx +197 -0
  585. package/src/pages/RestorePasswordPage/index.ts +1 -0
  586. package/src/pages/SelectBoardPage/SelectBoardPage.module.css +247 -0
  587. package/src/pages/SelectBoardPage/SelectBoardPage.tsx +419 -0
  588. package/src/pages/SelectBoardPage/getEmbedUrl.ts +3 -0
  589. package/src/pages/SelectBoardPage/index.ts +1 -0
  590. package/src/pages/SigninPage/SigninPage.module.css +17 -0
  591. package/src/pages/SigninPage/SigninPage.tsx +201 -0
  592. package/src/pages/SigninPage/index.ts +1 -0
  593. package/src/pages/SignupPage/EmailIcon.tsx +24 -0
  594. package/src/pages/SignupPage/LockIcon.tsx +24 -0
  595. package/src/pages/SignupPage/PeopleIcon.tsx +23 -0
  596. package/src/pages/SignupPage/SignupPage.module.css +52 -0
  597. package/src/pages/SignupPage/SignupPage.tsx +282 -0
  598. package/src/pages/SignupPage/index.ts +1 -0
  599. package/src/pages/TestPage.tsx +52 -0
  600. package/src/pages/VerifyMailPage/VerifyMailPage.module.css +20 -0
  601. package/src/pages/VerifyMailPage/VerifyMailPage.tsx +287 -0
  602. package/src/pages/VerifyMailPage/index.ts +1 -0
  603. package/src/pages/WelcomePage/WelcomePage.tsx +76 -0
  604. package/src/pages/WelcomePage/index.ts +1 -0
  605. package/src/pages/WelcomePage/welcomeBoard.json +8727 -0
  606. package/src/pages/WelcomePage/welcomeBoardEn.json +9683 -0
  607. package/src/pages/WheelLogger/WheelLogger.module.css +32 -0
  608. package/src/pages/WheelLogger/WheelLogger.tsx +94 -0
  609. package/src/pages/layouts/AppLayout.tsx +86 -0
  610. package/src/pages/layouts/AuthLayout/AuthLayout.module.css +80 -0
  611. package/src/pages/layouts/AuthLayout/AuthLayout.tsx +74 -0
  612. package/src/pages/layouts/AuthLayout/Tail.tsx +23 -0
  613. package/src/pages/layouts/AuthLayout/index.ts +1 -0
  614. package/src/production.entrypoint.ts +39 -0
  615. package/src/public/customWebComponents.js +323 -0
  616. package/src/public/favicon.svg +20 -0
  617. package/src/public/favicons/apple-touch-icon.png +0 -0
  618. package/src/public/favicons/favicon-16x16.png +0 -0
  619. package/src/public/favicons/favicon-32x32.png +0 -0
  620. package/src/public/favicons/favicon.ico +0 -0
  621. package/src/public/favicons/favicon.svg +6 -0
  622. package/src/public/favicons/site.webmanifest +21 -0
  623. package/src/public/favicons/web-app-manifest-192x192.png +0 -0
  624. package/src/public/favicons/web-app-manifest-512x512.png +0 -0
  625. package/src/public/fonts/NotoColorEmoji-Regular.ttf +0 -0
  626. package/src/public/fonts/OpenSans-Bold.ttf +0 -0
  627. package/src/public/fonts/OpenSans-BoldItalic.ttf +0 -0
  628. package/src/public/fonts/OpenSans-Italic.ttf +0 -0
  629. package/src/public/fonts/OpenSans-Regular.ttf +0 -0
  630. package/src/public/fonts/RobotoMono-Regular.ttf +0 -0
  631. package/src/public/loadLinksImages.js +26 -0
  632. package/src/public/loader.svg +26 -0
  633. package/src/public/pdf/installiation_ru.pdf +0 -0
  634. package/src/public/pdf/lifecycle_ru.pdf +0 -0
  635. package/src/public/pdf/personal_data_policy_ru.pdf +0 -0
  636. package/src/public/pdf/privacy_policy_en.pdf +0 -0
  637. package/src/public/pdf/privacy_policy_ru.pdf +0 -0
  638. package/src/public/pdf/terms_conditions_en.pdf +0 -0
  639. package/src/public/pdf/terms_conditions_ru.pdf +0 -0
  640. package/src/public/pdf/user_agreement_ru.pdf +0 -0
  641. package/src/public/pdf/user_manual_ru.pdf +0 -0
  642. package/src/shared/Lang/en.json +1227 -0
  643. package/src/shared/Lang/i18n.d.ts +8 -0
  644. package/src/shared/Lang/index.ts +32 -0
  645. package/src/shared/Lang/ru.json +1226 -0
  646. package/src/shared/Logger.ts +72 -0
  647. package/src/shared/RawEvents.ts +7 -0
  648. package/src/shared/Subject.ts +29 -0
  649. package/src/shared/SubjectOperation.ts +31 -0
  650. package/src/shared/ViewSettings.tsx +9 -0
  651. package/src/shared/api/ai/api.ts +6 -0
  652. package/src/shared/api/ai/index.ts +3 -0
  653. package/src/shared/api/ai/requestMap.ts +22 -0
  654. package/src/shared/api/ai/types.ts +6 -0
  655. package/src/shared/api/auth/api.ts +78 -0
  656. package/src/shared/api/auth/index.ts +2 -0
  657. package/src/shared/api/auth/types.ts +51 -0
  658. package/src/shared/api/base/base.ts +244 -0
  659. package/src/shared/api/base/httpError.ts +10 -0
  660. package/src/shared/api/base/httpResponse.ts +7 -0
  661. package/src/shared/api/base/interceptors.ts +64 -0
  662. package/src/shared/api/base/types.ts +18 -0
  663. package/src/shared/api/billing/api.ts +79 -0
  664. package/src/shared/api/billing/index.ts +2 -0
  665. package/src/shared/api/billing/types.ts +155 -0
  666. package/src/shared/api/boards/api.ts +128 -0
  667. package/src/shared/api/boards/index.ts +2 -0
  668. package/src/shared/api/boards/types.ts +15 -0
  669. package/src/shared/api/index.ts +8 -0
  670. package/src/shared/api/media/index.ts +3 -0
  671. package/src/shared/api/media/uploadAudio.ts +53 -0
  672. package/src/shared/api/media/uploadImage.ts +180 -0
  673. package/src/shared/api/media/uploadVideo.ts +48 -0
  674. package/src/shared/api/types.ts +3 -0
  675. package/src/shared/api/users/api.ts +37 -0
  676. package/src/shared/api/users/index.ts +2 -0
  677. package/src/shared/api/users/types.ts +17 -0
  678. package/src/shared/apiV2/base.ts +9 -0
  679. package/src/shared/apiV2/boards/api.ts +143 -0
  680. package/src/shared/apiV2/boards/index.ts +2 -0
  681. package/src/shared/apiV2/boards/types.ts +66 -0
  682. package/src/shared/apiV2/folders/api.ts +81 -0
  683. package/src/shared/apiV2/folders/index.ts +2 -0
  684. package/src/shared/apiV2/folders/types.ts +35 -0
  685. package/src/shared/apiV2/index.ts +2 -0
  686. package/src/shared/assets/imgs/default-user-icon.svg +12 -0
  687. package/src/shared/assets/imgs/no-img-icon.svg +3 -0
  688. package/src/shared/lib/IframeModule.ts +223 -0
  689. package/src/shared/lib/convertColors.ts +51 -0
  690. package/src/shared/lib/debounce.ts +9 -0
  691. package/src/shared/lib/getCorrectEnding.ts +19 -0
  692. package/src/shared/lib/getEmailPrefix.ts +13 -0
  693. package/src/shared/lib/handleClickDetection.ts +25 -0
  694. package/src/shared/lib/isIframe.ts +3 -0
  695. package/src/shared/lib/isMicroboardIframe.ts +3 -0
  696. package/src/shared/lib/queryStringParser.ts +18 -0
  697. package/src/shared/lib/regex.ts +4 -0
  698. package/src/shared/lib/strictContext.ts +14 -0
  699. package/src/shared/lib/throttle.ts +59 -0
  700. package/src/shared/lib/useClickOutside.ts +50 -0
  701. package/src/shared/lib/useClientRect.ts +34 -0
  702. package/src/shared/lib/useDebounce.ts +22 -0
  703. package/src/shared/lib/useForceUpdate.ts +7 -0
  704. package/src/shared/lib/useHoverState.ts +14 -0
  705. package/src/shared/lib/useIsPhoneScreen.ts +21 -0
  706. package/src/shared/lib/useMediaQuery.tsx +19 -0
  707. package/src/shared/lib/withRouter.tsx +21 -0
  708. package/src/shared/sha256.ts +22 -0
  709. package/src/shared/ui-lib/Button/Button.module.css +179 -0
  710. package/src/shared/ui-lib/Button/Button.tsx +43 -0
  711. package/src/shared/ui-lib/Button/Loader.tsx +20 -0
  712. package/src/shared/ui-lib/Button/index.ts +1 -0
  713. package/src/shared/ui-lib/Checkbox/Checkbox.module.css +44 -0
  714. package/src/shared/ui-lib/Checkbox/Checkbox.tsx +42 -0
  715. package/src/shared/ui-lib/Checkbox/index.ts +1 -0
  716. package/src/shared/ui-lib/Dropdown/Chevron.tsx +24 -0
  717. package/src/shared/ui-lib/Dropdown/Dropdown.module.css +48 -0
  718. package/src/shared/ui-lib/Dropdown/Dropdown.tsx +42 -0
  719. package/src/shared/ui-lib/Icon/ConnectorIcon.tsx +33 -0
  720. package/src/shared/ui-lib/Icon/ConnectorPointerIcon.tsx +50 -0
  721. package/src/shared/ui-lib/Icon/EyeClosed.tsx +34 -0
  722. package/src/shared/ui-lib/Icon/EyeOpened.tsx +56 -0
  723. package/src/shared/ui-lib/Icon/FillColorIndicator/FillColorIndicator.module.css +11 -0
  724. package/src/shared/ui-lib/Icon/FillColorIndicator/FillColorIndicator.tsx +26 -0
  725. package/src/shared/ui-lib/Icon/FillColorIndicator/bg.png +0 -0
  726. package/src/shared/ui-lib/Icon/FillColorIndicator/index.ts +1 -0
  727. package/src/shared/ui-lib/Icon/FrameIcon.tsx +33 -0
  728. package/src/shared/ui-lib/Icon/Icon.module.css +11 -0
  729. package/src/shared/ui-lib/Icon/Icon.tsx +212 -0
  730. package/src/shared/ui-lib/Icon/Logo.tsx +23 -0
  731. package/src/shared/ui-lib/Icon/ShapeIcon.tsx +33 -0
  732. package/src/shared/ui-lib/Icon/StrokeColorIndicator.tsx +51 -0
  733. package/src/shared/ui-lib/Icon/TextColorIndicator/TextColorIndicator.module.css +14 -0
  734. package/src/shared/ui-lib/Icon/TextColorIndicator/TextColorIndicator.tsx +22 -0
  735. package/src/shared/ui-lib/Icon/TextColorIndicator/index.ts +1 -0
  736. package/src/shared/ui-lib/Icon/TextHighlightIndicator/TextHighlightIndicator.module.css +15 -0
  737. package/src/shared/ui-lib/Icon/TextHighlightIndicator/TextHighlightIndicator.tsx +22 -0
  738. package/src/shared/ui-lib/Icon/TextHighlightIndicator/index.ts +1 -0
  739. package/src/shared/ui-lib/Icon/index.ts +11 -0
  740. package/src/shared/ui-lib/Icon/sprite.svg +1707 -0
  741. package/src/shared/ui-lib/Input/EyeClose.tsx +22 -0
  742. package/src/shared/ui-lib/Input/EyeOpen.tsx +23 -0
  743. package/src/shared/ui-lib/Input/Input.css +130 -0
  744. package/src/shared/ui-lib/Input/Input.tsx +205 -0
  745. package/src/shared/ui-lib/Input/index.ts +1 -0
  746. package/src/shared/ui-lib/Link/Link.module.css +38 -0
  747. package/src/shared/ui-lib/Link/Link.tsx +19 -0
  748. package/src/shared/ui-lib/Link/index.ts +1 -0
  749. package/src/shared/ui-lib/Loader/Loader.module.css +9 -0
  750. package/src/shared/ui-lib/Loader/Loader.tsx +27 -0
  751. package/src/shared/ui-lib/Message/Message.module.css +26 -0
  752. package/src/shared/ui-lib/Message/Message.tsx +37 -0
  753. package/src/shared/ui-lib/Notification/Notification.module.css +58 -0
  754. package/src/shared/ui-lib/Notification/Notification.tsx +75 -0
  755. package/src/shared/ui-lib/Notification/index.ts +1 -0
  756. package/src/shared/ui-lib/OuterLink/OuterLink.module.css +38 -0
  757. package/src/shared/ui-lib/OuterLink/OuterLink.tsx +16 -0
  758. package/src/shared/ui-lib/OuterLink/index.ts +1 -0
  759. package/src/shared/ui-lib/Progress/Progress.module.css +16 -0
  760. package/src/shared/ui-lib/Progress/Progress.tsx +35 -0
  761. package/src/shared/ui-lib/Selector/Selector.module.css +91 -0
  762. package/src/shared/ui-lib/Selector/Selector.tsx +170 -0
  763. package/src/shared/ui-lib/Selector/index.ts +1 -0
  764. package/src/shared/ui-lib/Toast/Toast.module.css +142 -0
  765. package/src/shared/ui-lib/Toast/index.ts +2 -0
  766. package/src/shared/ui-lib/Toast/notify.tsx +119 -0
  767. package/src/shared/ui-lib/ToggleMark/ToggleMark.module.css +22 -0
  768. package/src/shared/ui-lib/ToggleMark/ToggleMark.tsx +15 -0
  769. package/src/shared/ui-lib/Tooltip/Tooltip.module.css +195 -0
  770. package/src/shared/ui-lib/Tooltip/Tooltip.tsx +99 -0
  771. package/src/shared/ui-lib/Tooltip/index.tsx +1 -0
  772. package/src/shared/ui-lib/Transitions/FadeTransition.module.css +22 -0
  773. package/src/shared/ui-lib/Transitions/FadeTransition.tsx +25 -0
  774. package/src/shared/ui-lib/Transitions/OpacityTransition.module.css +17 -0
  775. package/src/shared/ui-lib/Transitions/OpacityTransition.tsx +27 -0
  776. package/src/shared/ui-lib/Transitions/TopFade.module.css +25 -0
  777. package/src/shared/ui-lib/Transitions/TopFade.tsx +27 -0
  778. package/src/shared/ui-lib/Transitions/index.ts +2 -0
  779. package/src/shared/ui-lib/Transitions/types.ts +7 -0
  780. package/src/shared/ui-lib/UIMainLoader/UIMainLoader.module.css +8 -0
  781. package/src/shared/ui-lib/UIMainLoader/UIMainLoader.tsx +10 -0
  782. package/src/shared/ui-lib/UiAccordion/UiAccordion.module.css +4 -0
  783. package/src/shared/ui-lib/UiAccordion/UiAccordion.tsx +47 -0
  784. package/src/shared/ui-lib/UiAccordion/index.ts +1 -0
  785. package/src/shared/ui-lib/UiAdaptiveAccordion/UiAdaptiveAccordion.module.css +22 -0
  786. package/src/shared/ui-lib/UiAdaptiveAccordion/UiAdaptiveAccordion.tsx +90 -0
  787. package/src/shared/ui-lib/UiAdaptiveAccordion/index.ts +2 -0
  788. package/src/shared/ui-lib/UiButton/Loader.tsx +20 -0
  789. package/src/shared/ui-lib/UiButton/Tooltip.tsx +98 -0
  790. package/src/shared/ui-lib/UiButton/UiButton.module.css +306 -0
  791. package/src/shared/ui-lib/UiButton/UiButton.tsx +119 -0
  792. package/src/shared/ui-lib/UiButton/index.ts +1 -0
  793. package/src/shared/ui-lib/UiColorInput/UiColorInput.module.css +66 -0
  794. package/src/shared/ui-lib/UiColorInput/UiColorInput.tsx +66 -0
  795. package/src/shared/ui-lib/UiColorInput/index.ts +1 -0
  796. package/src/shared/ui-lib/UiColorInput/palette.png +0 -0
  797. package/src/shared/ui-lib/UiLink/UiLink.module.css +175 -0
  798. package/src/shared/ui-lib/UiLink/UiLink.tsx +72 -0
  799. package/src/shared/ui-lib/UiLink/index.ts +1 -0
  800. package/src/shared/ui-lib/UiLoader/UiLoader.module.css +19 -0
  801. package/src/shared/ui-lib/UiLoader/UiLoader.tsx +31 -0
  802. package/src/shared/ui-lib/UiLoader/index.ts +1 -0
  803. package/src/shared/ui-lib/UiModal/UiModal.module.css +188 -0
  804. package/src/shared/ui-lib/UiModal/UiModal.tsx +182 -0
  805. package/src/shared/ui-lib/UiModal/UiModalBackground.tsx +62 -0
  806. package/src/shared/ui-lib/UiModal/UiModalContext.tsx +90 -0
  807. package/src/shared/ui-lib/UiModal/index.ts +2 -0
  808. package/src/shared/ui-lib/UiPanel/UiPanel.module.css +52 -0
  809. package/src/shared/ui-lib/UiPanel/UiPanel.tsx +70 -0
  810. package/src/shared/ui-lib/UiPanel/index.ts +1 -0
  811. package/src/shared/ui-lib/UiSelector/UiSelector.module.css +143 -0
  812. package/src/shared/ui-lib/UiSelector/UiSelector.tsx +202 -0
  813. package/src/shared/ui-lib/UiSelector/index.ts +2 -0
  814. package/src/shared/ui-lib/UiSeparator/UiSeparator.module.css +18 -0
  815. package/src/shared/ui-lib/UiSeparator/UiSeparator.tsx +33 -0
  816. package/src/shared/ui-lib/UiSeparator/index.ts +1 -0
  817. package/src/shared/ui-lib/UiSkeleton/UiSkeleton.module.css +37 -0
  818. package/src/shared/ui-lib/UiSkeleton/UiSkeleton.tsx +10 -0
  819. package/src/shared/ui-lib/UiSkeleton/index.ts +1 -0
  820. package/src/shared/ui-lib/UiSlider/UiSlider.module.css +75 -0
  821. package/src/shared/ui-lib/UiSlider/UiSlider.tsx +50 -0
  822. package/src/shared/ui-lib/UiSlider/index.ts +1 -0
  823. package/src/shared/ui-lib/UiSwitch/UiSwitch.module.css +48 -0
  824. package/src/shared/ui-lib/UiSwitch/UiSwitch.tsx +103 -0
  825. package/src/shared/ui-lib/UiSwitch/index.ts +1 -0
  826. package/src/staticResources.ts +410 -0
  827. package/src/version.ts +1 -0
  828. package/tsconfig.json +42 -0
@@ -0,0 +1,171 @@
1
+ import { useAccount } from "App/useAccount";
2
+ import { PresenceUser } from "microboard-temp";
3
+ import { useCommentsPanelContext } from "entities/comments/CommentsPanel/CommentsPanelContext";
4
+ import { useAppContext } from "features/AppContext";
5
+ import {
6
+ FollowingUsersCount,
7
+ User,
8
+ } from "features/Presence/PresenceUsers/PresenceUsers";
9
+ import { PROFILE_SETTINGS_MODAL_ID } from "features/ProfileSettingsModal";
10
+ import { USER_PLAN_MODAL_ID } from "features/UserPlan";
11
+ import React, { MouseEventHandler, RefObject, useRef } from "react";
12
+ import { useTranslation } from "react-i18next";
13
+ import { useNavigate } from "react-router-dom";
14
+ import { Icon } from "shared/ui-lib/Icon";
15
+ import { UiButton } from "shared/ui-lib/UiButton";
16
+ import { useUiModalContext } from "shared/ui-lib/UiModal";
17
+ import { Logout } from "../icons/Logout";
18
+ import { UserAvatar } from "../UserAvatar/UserAvatar";
19
+ import { UserDropDown } from "../UserDropdown/UserDropdown";
20
+ import styles from "../UserPanel.module.css";
21
+
22
+ interface UserDropDownProps extends React.HTMLAttributes<HTMLDivElement> {
23
+ email?: string;
24
+ isOpen: boolean;
25
+ setIsDropdownOpen: React.Dispatch<React.SetStateAction<boolean>>;
26
+ buttons: React.ReactNode[];
27
+ openerRef?: RefObject<HTMLDivElement>;
28
+ customTop?: number;
29
+ }
30
+
31
+ interface UserPicProps extends React.HTMLAttributes<HTMLDivElement> {
32
+ avatar?: string;
33
+ followers: PresenceUser[];
34
+ presenceUsers: User[];
35
+ isDropdownOpen: boolean;
36
+ setIsDropdownOpen: React.Dispatch<React.SetStateAction<boolean>>;
37
+ }
38
+
39
+ type TUserPicProps = UserPicProps &
40
+ Omit<
41
+ UserDropDownProps,
42
+ "isOpen" | "setIsDropdownOpen" | "buttons" | "openerRef" | "customTop"
43
+ >;
44
+
45
+ export const UserPic: React.FC<TUserPicProps> = ({ ...props }) => {
46
+ const { t } = useTranslation();
47
+ const { board } = useAppContext();
48
+ const { setIsPanelOpen } = useCommentsPanelContext();
49
+ const userPanelRef = useRef<HTMLDivElement>(null);
50
+ const account = useAccount();
51
+ const { openModal } = useUiModalContext();
52
+ const navigate = useNavigate();
53
+ const boardId = board.getBoardId();
54
+ const isOwner = account.permissions.checkPermissions(
55
+ "owns",
56
+ "boards",
57
+ boardId,
58
+ );
59
+
60
+ const handleOpenProfileSettings: MouseEventHandler = ev => {
61
+ ev.preventDefault();
62
+ ev.stopPropagation();
63
+ openModal(PROFILE_SETTINGS_MODAL_ID);
64
+ };
65
+
66
+ const handlePlanModalOpen: MouseEventHandler = ev => {
67
+ ev.preventDefault();
68
+ ev.stopPropagation();
69
+
70
+ openModal(USER_PLAN_MODAL_ID);
71
+ };
72
+
73
+ const handleLogout: MouseEventHandler = async ev => {
74
+ ev.stopPropagation();
75
+ await account.logout();
76
+ navigate("/");
77
+ };
78
+
79
+ const handleOpenSupport: MouseEventHandler = ev => {
80
+ ev.preventDefault();
81
+ ev.stopPropagation();
82
+ window.open("https://x.com/Microboard_io", "_blank");
83
+ };
84
+
85
+ return (
86
+ <>
87
+ <div
88
+ className={styles.userPicWrapper}
89
+ {...props}
90
+ ref={userPanelRef}
91
+ onClick={event => {
92
+ event.stopPropagation();
93
+ if (!props.isDropdownOpen) {
94
+ props.setIsDropdownOpen(true);
95
+ setIsPanelOpen(false);
96
+ } else {
97
+ props.setIsDropdownOpen(false);
98
+ setIsPanelOpen(false);
99
+ }
100
+ }}
101
+ >
102
+ <UserAvatar
103
+ src={account.info?.avatar}
104
+ isOwner={isOwner}
105
+ tooltip={!props.isDropdownOpen}
106
+ name={account.info?.name}
107
+ />
108
+ <FollowingUsersCount followers={props.followers} />
109
+ </div>
110
+
111
+ <UserDropDown
112
+ openerRef={userPanelRef}
113
+ isOpen={props.isDropdownOpen}
114
+ setIsDropdownOpen={props.setIsDropdownOpen}
115
+ email={props.email}
116
+ followers={props.followers}
117
+ presenceUsers={props.presenceUsers}
118
+ buttons={[
119
+ <UiButton
120
+ type="button"
121
+ key="userDropDown1"
122
+ onClick={handlePlanModalOpen}
123
+ variant="ghost"
124
+ size="lg"
125
+ >
126
+ <Icon iconName="ArrowUpCircle" width={20} height={20} />{" "}
127
+ <span className={styles.userDropDownButton}>
128
+ {t("userPlan.upgradePlan")}
129
+ </span>
130
+ </UiButton>,
131
+ <UiButton
132
+ type="button"
133
+ key="userDropDown2"
134
+ onClick={handleOpenProfileSettings}
135
+ variant="ghost"
136
+ size="lg"
137
+ >
138
+ <Icon width={20} height={20} iconName="human" />{" "}
139
+ <span className={styles.userDropDownButton}>
140
+ {t("profile.title")}
141
+ </span>
142
+ </UiButton>,
143
+ <UiButton
144
+ type="button"
145
+ key="userDropDown2"
146
+ onClick={handleOpenSupport}
147
+ variant="ghost"
148
+ size="lg"
149
+ >
150
+ <Icon width={20} height={20} iconName="support" />{" "}
151
+ <span className={styles.userDropDownButton}>
152
+ {t("profile.support")}
153
+ </span>
154
+ </UiButton>,
155
+ <UiButton
156
+ type="button"
157
+ key="userDropDown3"
158
+ onClick={handleLogout}
159
+ variant="ghost"
160
+ size="lg"
161
+ >
162
+ <Logout />
163
+ <span className={styles.userDropDownButton}>
164
+ {t("profile.logout")}
165
+ </span>
166
+ </UiButton>,
167
+ ]}
168
+ />
169
+ </>
170
+ );
171
+ };
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+
3
+ export const ChangePassword = () => {
4
+ return (
5
+ <svg
6
+ width="20"
7
+ height="20"
8
+ viewBox="0 0 20 20"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <path
13
+ d="M18.5563 9.3525C18.2415 9.03769 17.7415 9.03769 17.4452 9.3525L16.6674 10.1303V10.0007C16.6674 6.31547 13.6674 3.33398 10.0007 3.33398C8.24147 3.33398 6.5748 4.01917 5.31554 5.25991C5.00072 5.57472 5.00072 6.07473 5.31554 6.37102C5.63035 6.68584 6.13035 6.68584 6.42665 6.37102C7.38961 5.42658 8.64887 4.90806 10.0007 4.90806C12.797 4.90806 15.0933 7.18584 15.0933 10.0007V10.1303L14.3155 9.3525C14.0007 9.03769 13.5007 9.03769 13.2044 9.3525C12.9081 9.66732 12.8896 10.1673 13.2044 10.4636L15.3155 12.5932C15.4637 12.7414 15.6674 12.834 15.8711 12.834C16.0748 12.834 16.2785 12.7599 16.4267 12.5932L18.5563 10.4636C18.8711 10.1488 18.8711 9.6488 18.5563 9.3525Z"
14
+ fill="#696B76"
15
+ />
16
+ <path
17
+ d="M13.5747 13.6117C12.6118 14.5561 11.3525 15.0747 10.0007 15.0747C7.20436 15.0747 4.90806 12.7969 4.90806 9.98206V9.85243L5.68584 10.6302C5.83399 10.7784 6.03769 10.8709 6.24139 10.8709C6.4451 10.8709 6.6488 10.7969 6.79695 10.6302C7.11176 10.3154 7.11176 9.81539 6.79695 9.5191L4.68584 7.40799C4.37102 7.09317 3.87102 7.09317 3.57473 7.40799L1.4451 9.53762C1.13028 9.85243 1.13028 10.3524 1.4451 10.6487C1.75991 10.945 2.25991 10.9635 2.55621 10.6487L3.33398 9.87095V10.0006C3.33398 13.6858 6.33399 16.6672 10.0007 16.6672C11.7599 16.6672 13.4266 15.9821 14.6858 14.7413C15.0007 14.4265 15.0007 13.9265 14.6858 13.6302C14.3895 13.3154 13.8895 13.3154 13.5747 13.6117Z"
18
+ fill="#696B76"
19
+ />
20
+ </svg>
21
+ );
22
+ };
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+
3
+ export const Click = () => {
4
+ return (
5
+ <svg
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <path
13
+ fillRule="evenodd"
14
+ clipRule="evenodd"
15
+ d="M3.28421 4.30174C3.55182 4.02741 3.95268 3.93015 4.31625 4.05135L20.3163 9.38468C20.7064 9.51472 20.9771 9.8703 20.9987 10.2809C21.0202 10.6916 20.7882 11.0736 20.4138 11.2437L20.36 11.2682L20.2042 11.3396C20.069 11.4015 19.8742 11.4912 19.636 11.6017C19.1595 11.8227 18.5109 12.1262 17.8216 12.4571C16.4106 13.1344 14.9278 13.8797 14.3325 14.2765C14.3325 14.2765 14.3258 14.2809 14.308 14.2965C14.2906 14.3118 14.2673 14.3339 14.2382 14.3646C14.1791 14.4267 14.1072 14.5123 14.0231 14.6243C13.8542 14.8496 13.6622 15.1471 13.4541 15.5039C13.0384 16.2164 12.5946 17.1024 12.1833 17.98C11.7735 18.8541 11.4038 19.7031 11.136 20.3348C11.0023 20.6502 10.8944 20.9105 10.8201 21.0915C10.783 21.182 10.7543 21.2525 10.735 21.3002L10.7132 21.3542L10.7066 21.3707C10.5524 21.7561 10.1759 22.0069 9.76082 21.9999C9.34577 21.9928 8.97824 21.7301 8.83725 21.3397L3.05947 5.33967C2.92931 4.97922 3.0166 4.57607 3.28421 4.30174ZM9.85395 18.2666C10.0153 17.9043 10.1898 17.5206 10.3723 17.1312C10.7943 16.231 11.2672 15.2836 11.7265 14.4962C11.9559 14.103 12.191 13.7338 12.4231 13.4243C12.6416 13.133 12.9114 12.8202 13.2231 12.6124C13.9612 12.1204 15.5894 11.3101 16.9562 10.6541C17.0731 10.5979 17.1888 10.5426 17.3027 10.4883L5.64145 6.60126L9.85395 18.2666Z"
16
+ fill="#14151A"
17
+ />
18
+ </svg>
19
+ );
20
+ };
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+
3
+ export const Logout = () => {
4
+ return (
5
+ <svg
6
+ width="20"
7
+ height="20"
8
+ viewBox="0 0 20 20"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <path
13
+ d="M4.15951 18.3327C3.93849 18.3327 3.72653 18.2449 3.57025 18.0886C3.41397 17.9323 3.32617 17.7204 3.32617 17.4993V2.49935C3.32617 2.27834 3.41397 2.06637 3.57025 1.91009C3.72653 1.75381 3.93849 1.66602 4.15951 1.66602H15.8262C16.0472 1.66602 16.2591 1.75381 16.4154 1.91009C16.5717 2.06637 16.6595 2.27834 16.6595 2.49935V4.99935H14.9928V3.33268H4.99284V16.666H14.9928V14.9993H16.6595V17.4993C16.6595 17.7204 16.5717 17.9323 16.4154 18.0886C16.2591 18.2449 16.0472 18.3327 15.8262 18.3327H4.15951Z"
14
+ fill="#696B76"
15
+ />
16
+ <path
17
+ d="M18.9487 10.4904C19.0837 10.3602 19.1595 10.1835 19.1595 9.99936C19.1595 9.81519 19.0837 9.63856 18.9487 9.50832L16.4298 7.07776C16.1487 6.80655 15.693 6.80655 15.412 7.07776C15.1309 7.34894 15.1309 7.78866 15.412 8.05984L16.7023 9.30491H11.9436C11.5461 9.30491 11.2239 9.61582 11.2239 9.99936C11.2239 10.3829 11.5461 10.6938 11.9436 10.6938H16.7023L15.412 11.9389C15.1309 12.2101 15.1309 12.6498 15.412 12.921C15.693 13.1922 16.1487 13.1922 16.4298 12.921L18.9487 10.4904Z"
18
+ fill="#696B76"
19
+ />
20
+ </svg>
21
+ );
22
+ };
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+
3
+ export const Ring = () => {
4
+ return (
5
+ <svg
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <path
13
+ d="M18 10C18 8.4087 17.3679 6.88258 16.2426 5.75736C15.1174 4.63214 13.5913 4 12 4C10.4087 4 8.88258 4.63214 7.75736 5.75736C6.63214 6.88258 6 8.4087 6 10V18H18V10ZM20 18.667L20.4 19.2C20.4557 19.2743 20.4896 19.3626 20.498 19.4551C20.5063 19.5476 20.4887 19.6406 20.4472 19.7236C20.4057 19.8067 20.3419 19.8765 20.2629 19.9253C20.1839 19.9741 20.0929 20 20 20H4C3.90714 20 3.81612 19.9741 3.73713 19.9253C3.65815 19.8765 3.59431 19.8067 3.55279 19.7236C3.51126 19.6406 3.49368 19.5476 3.50202 19.4551C3.51036 19.3626 3.54429 19.2743 3.6 19.2L4 18.667V10C4 7.87827 4.84286 5.84344 6.34315 4.34315C7.84344 2.84285 9.87827 2 12 2C14.1217 2 16.1566 2.84285 17.6569 4.34315C19.1571 5.84344 20 7.87827 20 10V18.667ZM9.5 21H14.5C14.5 21.663 14.2366 22.2989 13.7678 22.7678C13.2989 23.2366 12.663 23.5 12 23.5C11.337 23.5 10.7011 23.2366 10.2322 22.7678C9.76339 22.2989 9.5 21.663 9.5 21Z"
14
+ fill="#14151A"
15
+ />
16
+ </svg>
17
+ );
18
+ };
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+
3
+ export const Thumb = () => {
4
+ return (
5
+ <svg
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <path
13
+ d="M14.6 8.00039H21C21.5304 8.00039 22.0391 8.21111 22.4142 8.58618C22.7893 8.96125 23 9.46996 23 10.0004V12.1044C23.0003 12.3658 22.9493 12.6246 22.85 12.8664L19.755 20.3814C19.6795 20.5646 19.5513 20.7213 19.3866 20.8315C19.2219 20.9417 19.0282 21.0005 18.83 21.0004H2C1.73478 21.0004 1.48043 20.895 1.29289 20.7075C1.10536 20.52 1 20.2656 1 20.0004V10.0004C1 9.73518 1.10536 9.48082 1.29289 9.29329C1.48043 9.10575 1.73478 9.00039 2 9.00039H5.482C5.6421 9.00043 5.79986 8.96203 5.94203 8.88843C6.0842 8.81482 6.20662 8.70815 6.299 8.57739L11.752 0.850392C11.8209 0.752705 11.9226 0.682953 12.0385 0.653782C12.1545 0.624612 12.277 0.637955 12.384 0.691392L14.198 1.59839C14.7085 1.85355 15.1163 2.27571 15.3537 2.79471C15.5911 3.31371 15.6438 3.89831 15.503 4.45139L14.6 8.00039ZM7 10.5884V19.0004H18.16L21 12.1044V10.0004H14.6C14.2954 10.0003 13.9948 9.93073 13.7212 9.79685C13.4476 9.66297 13.2082 9.46836 13.0213 9.22788C12.8343 8.98739 12.7048 8.70739 12.6425 8.40922C12.5803 8.11105 12.5869 7.80259 12.662 7.50739L13.565 3.95939C13.5933 3.84872 13.5828 3.73171 13.5353 3.62782C13.4878 3.52393 13.4062 3.43944 13.304 3.38839L12.643 3.05839L7.933 9.73039C7.683 10.0844 7.363 10.3744 7 10.5884ZM5 11.0004H3V19.0004H5V11.0004Z"
14
+ fill="#14151A"
15
+ />
16
+ </svg>
17
+ );
18
+ };
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+
3
+ export const Upgrade = () => {
4
+ return (
5
+ <svg
6
+ width="20"
7
+ height="20"
8
+ viewBox="0 0 20 20"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <path
13
+ fillRule="evenodd"
14
+ clipRule="evenodd"
15
+ d="M18.3327 9.99935C18.3327 5.39935 14.5993 1.66602 9.99935 1.66602C5.39935 1.66602 1.66602 5.39935 1.66602 9.99935C1.66602 14.5993 5.39935 18.3327 9.99935 18.3327C14.5993 18.3327 18.3327 14.5993 18.3327 9.99935ZM16.666 9.99935C16.666 13.6827 13.6827 16.666 9.99935 16.666C6.31602 16.666 3.33268 13.6827 3.33268 9.99935C3.33268 6.31602 6.31602 3.33268 9.99935 3.33268C13.6827 3.33268 16.666 6.31602 16.666 9.99935ZM9.99936 6.03166C10.1835 6.03166 10.3602 6.10748 10.4904 6.24246L12.921 8.7614C13.1922 9.04244 13.1922 9.49815 12.921 9.77919C12.6498 10.0603 12.2101 10.0603 11.9389 9.77919L10.6938 8.48885V13.2476C10.6938 13.6451 10.3829 13.9673 9.99936 13.9673C9.61582 13.9673 9.30491 13.6451 9.30491 13.2476V8.48885L8.05984 9.77919C7.78866 10.0603 7.34894 10.0603 7.07776 9.77919C6.80655 9.49815 6.80655 9.04244 7.07776 8.7614L9.50832 6.24246C9.63856 6.10748 9.81519 6.03166 9.99936 6.03166Z"
16
+ fill="#696B76"
17
+ />
18
+ </svg>
19
+ );
20
+ };
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+
3
+ export const UserShare = () => {
4
+ return (
5
+ <svg
6
+ width="16"
7
+ height="16"
8
+ viewBox="0 0 16 16"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <path
13
+ d="M2.00065 14.666C1.63246 14.666 1.32968 14.3664 1.37558 14.0011C1.52249 12.8318 2.05392 11.7369 2.89608 10.8948C3.89628 9.89459 5.25283 9.33268 6.66732 9.33268C8.08181 9.33268 9.43836 9.89459 10.4386 10.8948C11.2807 11.7369 11.8121 12.8318 11.9591 14.0011C12.005 14.3664 11.7022 14.666 11.334 14.666C10.9658 14.666 10.673 14.3655 10.6119 14.0024C10.4748 13.1877 10.0876 12.4295 9.49574 11.8376C8.7456 11.0874 7.72818 10.666 6.66732 10.666C5.60645 10.666 4.58904 11.0874 3.83889 11.8376C3.24702 12.4295 2.85979 13.1877 2.72273 14.0024C2.66165 14.3655 2.36884 14.666 2.00065 14.666ZM6.66732 8.66602C4.45732 8.66602 2.66732 6.87602 2.66732 4.66602C2.66732 2.45602 4.45732 0.666016 6.66732 0.666016C8.87732 0.666016 10.6673 2.45602 10.6673 4.66602C10.6673 6.87602 8.87732 8.66602 6.66732 8.66602ZM6.66732 7.33268C8.14065 7.33268 9.33398 6.13935 9.33398 4.66602C9.33398 3.19268 8.14065 1.99935 6.66732 1.99935C5.19398 1.99935 4.00065 3.19268 4.00065 4.66602C4.00065 6.13935 5.19398 7.33268 6.66732 7.33268ZM11.9163 10.4095C12.0674 10.0736 12.4651 9.92052 12.7794 10.1124C13.461 10.5287 14.0431 11.0943 14.4797 11.7698C14.9164 12.4455 15.193 13.2086 15.2925 14.0012C15.3383 14.3664 15.0356 14.666 14.6674 14.666C14.2992 14.666 14.0064 14.3654 13.9453 14.0023C13.8554 13.4671 13.6571 12.9534 13.36 12.4937C13.0629 12.034 12.676 11.6422 12.2249 11.3403C11.919 11.1356 11.7651 10.7452 11.9163 10.4095ZM11.5196 3.01573C11.6325 2.62069 12.0691 2.40846 12.4079 2.64084C12.79 2.90295 13.121 3.23649 13.3813 3.6255C13.7854 4.2293 14.0009 4.93951 14.0007 5.66602C14.0009 6.5809 13.6591 7.46283 13.0423 8.13857C12.5952 8.62842 12.0271 8.98425 11.4012 9.17457C11.0164 9.2916 10.6673 8.97117 10.6673 8.56895C10.6673 8.2287 10.9235 7.95004 11.2374 7.81867C11.5106 7.70429 11.7613 7.53821 11.9749 7.32765C12.3302 6.97728 12.5638 6.52223 12.6414 6.02931C12.7191 5.53638 12.6366 5.03155 12.4062 4.58892C12.2652 4.31799 12.0733 4.07911 11.8428 3.88428C11.5881 3.66895 11.428 3.33645 11.5196 3.01573Z"
14
+ fill="white"
15
+ />
16
+ </svg>
17
+ );
18
+ };
@@ -0,0 +1,30 @@
1
+ import { HistoryTable } from "features/UserPlan/HistoryTable";
2
+ import { LIMITS_MODAL_ID } from "features/UserPlan/LimitsModal";
3
+ import React from "react";
4
+ import { useTranslation } from "react-i18next";
5
+ import { Icon } from "shared/ui-lib/Icon";
6
+ import { useUiModalContext } from "shared/ui-lib/UiModal";
7
+ import { UiModal } from "shared/ui-lib/UiModal/UiModal";
8
+ import styles from "./UserPlanModal.module.css";
9
+ export const HISTORY_MODAL_ID = Symbol("historyModal");
10
+
11
+ export function HistoryModal() {
12
+ const { t } = useTranslation();
13
+ const { openModal } = useUiModalContext();
14
+ const handleBackButton = () => openModal(LIMITS_MODAL_ID);
15
+
16
+ return (
17
+ <UiModal modalId={HISTORY_MODAL_ID} closeByBgClick={false}>
18
+ <div className={styles.wrapper}>
19
+ <h1 className={styles.heading}>
20
+ {t("userPlan.paymentHistoryHeading")}
21
+ </h1>
22
+ <HistoryTable />
23
+ <button className={styles.plansBtn} onClick={handleBackButton}>
24
+ <Icon iconName="ArrowLeft1" />
25
+ {t("userPlan.backToCurrentPlan")}
26
+ </button>
27
+ </div>
28
+ </UiModal>
29
+ );
30
+ }
@@ -0,0 +1,114 @@
1
+ import { useAccount } from "App/useAccount";
2
+ import React from "react";
3
+ import styles from "./LimitsTable.module.css";
4
+ import { useTranslation } from "react-i18next";
5
+ import { conf } from "microboard-temp";
6
+ const { i18n } = conf;
7
+
8
+ const PAYMENT_TYPE_DISPLAYNAME = {
9
+ card: "Card",
10
+ crypto: "Crypto",
11
+ };
12
+
13
+ // Plan display name mapping
14
+ const PLAN_DISPLAYNAME = {
15
+ plus: "Plus Subscription",
16
+ "Token Purchase": "Token Purchase",
17
+ };
18
+
19
+ export function HistoryTable() {
20
+ const account = useAccount();
21
+ const historyRecords = account.billingHistory.filter(
22
+ entry => entry.planId !== "basic",
23
+ );
24
+ const { t } = useTranslation();
25
+
26
+ return (
27
+ <table className={styles.table}>
28
+ <thead>
29
+ <tr className={styles.header}>
30
+ <th className={styles.modelsHeading}>
31
+ {t("userPlan.historyTable.plan")}
32
+ </th>
33
+ <th>{t("userPlan.historyTable.paymentDate")}</th>
34
+ <th>{t("userPlan.historyTable.price")}</th>
35
+ <th>{t("userPlan.historyTable.paymentType")}</th>
36
+ </tr>
37
+ </thead>
38
+ {historyRecords?.map(
39
+ ({
40
+ id,
41
+ startDate,
42
+ endDate,
43
+ planName,
44
+ price,
45
+ symbol,
46
+ paymentType,
47
+ }) => (
48
+ <ModelRow
49
+ key={id}
50
+ name={planName}
51
+ startDate={startDate}
52
+ endDate={endDate}
53
+ price={price}
54
+ paymentType={paymentType}
55
+ symbol={symbol}
56
+ />
57
+ ),
58
+ )}
59
+ </table>
60
+ );
61
+ }
62
+
63
+ const centToUsd = (cents: number) => cents / 100;
64
+
65
+ const formatDate = (date: string) =>
66
+ new Intl.DateTimeFormat(i18n.language, {
67
+ year: "numeric",
68
+ month: "numeric",
69
+ day: "numeric",
70
+ }).format(new Date(date ?? Date.now()));
71
+
72
+ type ModelRowProps = {
73
+ name: string;
74
+ startDate: string;
75
+ endDate: string;
76
+ price: number;
77
+ paymentType: "card" | "crypto";
78
+ symbol?: string;
79
+ };
80
+
81
+ function ModelRow({
82
+ endDate,
83
+ name,
84
+ startDate,
85
+ price,
86
+ paymentType,
87
+ symbol,
88
+ }: ModelRowProps) {
89
+ const { t } = useTranslation();
90
+
91
+ const getPlanDisplayName = (planName: string) => {
92
+ return i18n.language === "ru"
93
+ ? t(`userPlan.historyTable.planDisplayName.${planName}`, planName)
94
+ : PLAN_DISPLAYNAME[planName] || planName;
95
+ };
96
+
97
+ return (
98
+ <tr>
99
+ <td className={styles.model}>
100
+ <p className={styles.modelName}>{getPlanDisplayName(name)}</p>
101
+ <p className={styles.modelDescription}>
102
+ {formatDate(startDate)} - {formatDate(endDate)}
103
+ </p>
104
+ </td>
105
+ <td>{formatDate(startDate)}</td>
106
+ <td>
107
+ {paymentType === "card"
108
+ ? `$${centToUsd(price)}`
109
+ : `${price} ${symbol}`}
110
+ </td>
111
+ <td>{PAYMENT_TYPE_DISPLAYNAME[paymentType]}</td>
112
+ </tr>
113
+ );
114
+ }
@@ -0,0 +1,102 @@
1
+ import { useAccount } from "App/useAccount";
2
+ import React from "react";
3
+ import { useTranslation } from "react-i18next";
4
+ import { Icon } from "shared/ui-lib/Icon";
5
+ import { useConfirmModalContext } from "features/Modal/ConfirmModal";
6
+ import { notify } from "shared/ui-lib/Toast";
7
+ import { LimitsTable } from "features/UserPlan/LimitsTable";
8
+ import { USER_PLAN_MODAL_ID } from "features/UserPlan/UserPlanModal";
9
+ import { UserPlanUsage } from "features/UserPlan/UserPlanUsage";
10
+ import styles from "./UserPlanModal.module.css";
11
+ import { UiModal } from "shared/ui-lib/UiModal/UiModal";
12
+ import { useUiModalContext } from "shared/ui-lib/UiModal";
13
+ import { conf } from "microboard-temp";
14
+
15
+ export const LIMITS_MODAL_ID = Symbol("limitsModal");
16
+
17
+ export function LimitsModal() {
18
+ const { t, i18n } = useTranslation();
19
+ const account = useAccount();
20
+ const { openModal } = useUiModalContext();
21
+ const handleBackButton = () => openModal(USER_PLAN_MODAL_ID);
22
+ const { openModalConfirm } = useConfirmModalContext();
23
+
24
+ const onDowngrade = () => {
25
+ openModalConfirm(
26
+ <h2 className={styles.downgradeHeading}>
27
+ {t("userPlan.downgradeModal.heading", {
28
+ planName:
29
+ conf.planNames[
30
+ account.billingInfo?.plan.name ?? "basic"
31
+ ],
32
+ })}
33
+ </h2>,
34
+ <p className={styles.downgradeDesc}>
35
+ {t("userPlan.downgradeModal.description", {
36
+ planName:
37
+ conf.planNames[
38
+ account.billingInfo?.plan.name ?? "basic"
39
+ ],
40
+ currentPeriodEnd: new Intl.DateTimeFormat(i18n.language, {
41
+ year: "numeric",
42
+ month: "numeric",
43
+ day: "numeric",
44
+ }).format(new Date(account.billingInfo?.plan.endDate ?? 0)),
45
+ })}
46
+ </p>,
47
+ async () => {
48
+ await account.unsubscribe();
49
+ notify({
50
+ header: "Тариф обновлен",
51
+ body: "Автоматическое продление отменено",
52
+ });
53
+ Promise.resolve();
54
+ },
55
+ async () => {},
56
+ t("userPlan.downgradeModal.confirm", {
57
+ planName:
58
+ conf.planNames[account.billingInfo?.plan.name ?? "basic"],
59
+ }),
60
+ t("userPlan.downgradeModal.cancel"),
61
+ styles.downgradeConfirmation,
62
+ );
63
+ };
64
+
65
+ return (
66
+ <UiModal modalId={LIMITS_MODAL_ID} closeByBgClick={false}>
67
+ <div className={styles.wrapper}>
68
+ <h1 className={styles.heading}>
69
+ {t("userPlan.currentPlanHeading")}
70
+ </h1>
71
+ <UserPlanUsage
72
+ cancellationDate={account.billingInfo?.plan.endDate}
73
+ planName={
74
+ conf.planNames[
75
+ account.billingInfo?.plan.name ?? "basic"
76
+ ]
77
+ }
78
+ isFree={account.billingInfo?.plan.name === "basic"}
79
+ history
80
+ hasHistory={
81
+ account.billingHistory.filter(
82
+ entry => entry.planId !== "basic",
83
+ ).length > 0
84
+ }
85
+ onCancel={
86
+ account.billingInfo?.plan.name !== "basic"
87
+ ? onDowngrade
88
+ : undefined
89
+ }
90
+ status={account.billingInfo?.plan.status ?? "active"}
91
+ />
92
+ <main className={styles.tables}>
93
+ <LimitsTable />
94
+ </main>
95
+ <button className={styles.plansBtn} onClick={handleBackButton}>
96
+ <Icon iconName="ArrowLeft1" />
97
+ {t("userPlan.backToPlans")}
98
+ </button>
99
+ </div>
100
+ </UiModal>
101
+ );
102
+ }