@edifice.io/react 2.0.0-develop-rc.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 (692) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +110 -0
  3. package/dist/audience.js +16 -0
  4. package/dist/components/ActionBar/ActionBar.d.ts +10 -0
  5. package/dist/components/ActionBar/ActionBar.js +8 -0
  6. package/dist/components/ActionBar/index.d.ts +2 -0
  7. package/dist/components/Alert/Alert.d.ts +60 -0
  8. package/dist/components/Alert/Alert.js +78 -0
  9. package/dist/components/Alert/index.d.ts +2 -0
  10. package/dist/components/AppHeader/AppHeader.d.ts +17 -0
  11. package/dist/components/AppHeader/AppHeader.js +22 -0
  12. package/dist/components/AppHeader/index.d.ts +2 -0
  13. package/dist/components/AppIcon/AppIcon.d.ts +45 -0
  14. package/dist/components/AppIcon/AppIcon.js +49 -0
  15. package/dist/components/AppIcon/index.d.ts +1 -0
  16. package/dist/components/Attachment/Attachment.d.ts +14 -0
  17. package/dist/components/Attachment/Attachment.js +15 -0
  18. package/dist/components/Attachment/index.d.ts +2 -0
  19. package/dist/components/Avatar/Avatar.d.ts +32 -0
  20. package/dist/components/Avatar/Avatar.js +33 -0
  21. package/dist/components/Avatar/index.d.ts +2 -0
  22. package/dist/components/Badge/Badge.d.ts +47 -0
  23. package/dist/components/Badge/Badge.js +31 -0
  24. package/dist/components/Badge/index.d.ts +2 -0
  25. package/dist/components/Breadcrumb/Breadcrumb.d.ts +12 -0
  26. package/dist/components/Breadcrumb/Breadcrumb.js +28 -0
  27. package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +13 -0
  28. package/dist/components/Breadcrumb/BreadcrumbItem.js +14 -0
  29. package/dist/components/Breadcrumb/BreadcrumbList.d.ts +13 -0
  30. package/dist/components/Breadcrumb/BreadcrumbList.js +13 -0
  31. package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +18 -0
  32. package/dist/components/Breadcrumb/BreadcrumbNav.js +22 -0
  33. package/dist/components/Breadcrumb/index.d.ts +1 -0
  34. package/dist/components/Button/Button.d.ts +63 -0
  35. package/dist/components/Button/Button.js +35 -0
  36. package/dist/components/Button/IconButton.d.ts +11 -0
  37. package/dist/components/Button/IconButton.js +18 -0
  38. package/dist/components/Button/SearchButton.d.ts +21 -0
  39. package/dist/components/Button/SearchButton.js +17 -0
  40. package/dist/components/Button/index.d.ts +6 -0
  41. package/dist/components/Card/Card.d.ts +83 -0
  42. package/dist/components/Card/Card.js +51 -0
  43. package/dist/components/Card/CardBody.d.ts +10 -0
  44. package/dist/components/Card/CardBody.js +18 -0
  45. package/dist/components/Card/CardContext.d.ts +12 -0
  46. package/dist/components/Card/CardContext.js +11 -0
  47. package/dist/components/Card/CardFooter.d.ts +8 -0
  48. package/dist/components/Card/CardFooter.js +7 -0
  49. package/dist/components/Card/CardHeader.d.ts +5 -0
  50. package/dist/components/Card/CardHeader.js +19 -0
  51. package/dist/components/Card/CardImage.d.ts +9 -0
  52. package/dist/components/Card/CardImage.js +21 -0
  53. package/dist/components/Card/CardText.d.ts +9 -0
  54. package/dist/components/Card/CardText.js +12 -0
  55. package/dist/components/Card/CardTitle.d.ts +9 -0
  56. package/dist/components/Card/CardTitle.js +12 -0
  57. package/dist/components/Card/CardUser.d.ts +8 -0
  58. package/dist/components/Card/CardUser.js +10 -0
  59. package/dist/components/Card/index.d.ts +2 -0
  60. package/dist/components/Checkbox/Checkbox.d.ts +21 -0
  61. package/dist/components/Checkbox/Checkbox.js +35 -0
  62. package/dist/components/Checkbox/index.d.ts +2 -0
  63. package/dist/components/ColorPicker/ColorPalette.d.ts +46 -0
  64. package/dist/components/ColorPicker/ColorPalette.js +171 -0
  65. package/dist/components/ColorPicker/ColorPicker.d.ts +18 -0
  66. package/dist/components/ColorPicker/ColorPicker.js +37 -0
  67. package/dist/components/ColorPicker/ColorPickerItem.d.ts +20 -0
  68. package/dist/components/ColorPicker/ColorPickerItem.js +13 -0
  69. package/dist/components/ColorPicker/index.d.ts +5 -0
  70. package/dist/components/Combobox/Combobox.d.ts +31 -0
  71. package/dist/components/Combobox/Combobox.js +41 -0
  72. package/dist/components/Combobox/ComboboxTrigger.d.ts +9 -0
  73. package/dist/components/Combobox/ComboboxTrigger.js +30 -0
  74. package/dist/components/Combobox/index.d.ts +2 -0
  75. package/dist/components/Dropdown/Dropdown.d.ts +79 -0
  76. package/dist/components/Dropdown/Dropdown.js +60 -0
  77. package/dist/components/Dropdown/DropdownCheckboxItem.d.ts +24 -0
  78. package/dist/components/Dropdown/DropdownCheckboxItem.js +34 -0
  79. package/dist/components/Dropdown/DropdownContext.d.ts +8 -0
  80. package/dist/components/Dropdown/DropdownContext.js +11 -0
  81. package/dist/components/Dropdown/DropdownItem.d.ts +29 -0
  82. package/dist/components/Dropdown/DropdownItem.js +33 -0
  83. package/dist/components/Dropdown/DropdownMenu.d.ts +35 -0
  84. package/dist/components/Dropdown/DropdownMenu.js +26 -0
  85. package/dist/components/Dropdown/DropdownMenuGroup.d.ts +13 -0
  86. package/dist/components/Dropdown/DropdownMenuGroup.js +12 -0
  87. package/dist/components/Dropdown/DropdownRadioItem.d.ts +24 -0
  88. package/dist/components/Dropdown/DropdownRadioItem.js +34 -0
  89. package/dist/components/Dropdown/DropdownSeparator.d.ts +5 -0
  90. package/dist/components/Dropdown/DropdownSeparator.js +5 -0
  91. package/dist/components/Dropdown/DropdownTrigger.d.ts +38 -0
  92. package/dist/components/Dropdown/DropdownTrigger.js +34 -0
  93. package/dist/components/Dropdown/index.d.ts +2 -0
  94. package/dist/components/Dropzone/Dropzone.d.ts +28 -0
  95. package/dist/components/Dropzone/Dropzone.js +56 -0
  96. package/dist/components/Dropzone/DropzoneContext.d.ts +10 -0
  97. package/dist/components/Dropzone/DropzoneContext.js +12 -0
  98. package/dist/components/Dropzone/DropzoneDrag.d.ts +5 -0
  99. package/dist/components/Dropzone/DropzoneDrag.js +11 -0
  100. package/dist/components/Dropzone/DropzoneFile.d.ts +8 -0
  101. package/dist/components/Dropzone/DropzoneFile.js +32 -0
  102. package/dist/components/Dropzone/DropzoneImport.d.ts +5 -0
  103. package/dist/components/Dropzone/DropzoneImport.js +28 -0
  104. package/dist/components/Dropzone/index.d.ts +2 -0
  105. package/dist/components/EmptyScreen/EmptyScreen.d.ts +27 -0
  106. package/dist/components/EmptyScreen/EmptyScreen.js +20 -0
  107. package/dist/components/EmptyScreen/index.d.ts +2 -0
  108. package/dist/components/FileCard/FileCard.d.ts +13 -0
  109. package/dist/components/FileCard/FileCard.js +91 -0
  110. package/dist/components/FileCard/FileIcon.d.ts +6 -0
  111. package/dist/components/FileCard/FileIcon.js +15 -0
  112. package/dist/components/FileCard/index.d.ts +2 -0
  113. package/dist/components/Form/FormContext.d.ts +6 -0
  114. package/dist/components/Form/FormContext.js +11 -0
  115. package/dist/components/Form/FormControl.d.ts +42 -0
  116. package/dist/components/Form/FormControl.js +32 -0
  117. package/dist/components/Form/FormText.d.ts +8 -0
  118. package/dist/components/Form/FormText.js +17 -0
  119. package/dist/components/Form/index.d.ts +3 -0
  120. package/dist/components/Grid/Grid.d.ts +56 -0
  121. package/dist/components/Grid/Grid.js +32 -0
  122. package/dist/components/Grid/index.d.ts +1 -0
  123. package/dist/components/Heading/Heading.d.ts +27 -0
  124. package/dist/components/Heading/Heading.js +16 -0
  125. package/dist/components/Heading/index.d.ts +2 -0
  126. package/dist/components/Icon/Icon.d.ts +17 -0
  127. package/dist/components/Icon/Icon.js +10 -0
  128. package/dist/components/Icon/index.d.ts +1 -0
  129. package/dist/components/Image/Image.d.ts +29 -0
  130. package/dist/components/Image/Image.js +41 -0
  131. package/dist/components/Image/index.d.ts +2 -0
  132. package/dist/components/ImagePicker/ImagePicker.d.ts +38 -0
  133. package/dist/components/ImagePicker/ImagePicker.js +58 -0
  134. package/dist/components/ImagePicker/index.d.ts +1 -0
  135. package/dist/components/Input/Input.d.ts +33 -0
  136. package/dist/components/Input/Input.js +31 -0
  137. package/dist/components/Input/index.d.ts +2 -0
  138. package/dist/components/Label/Label.d.ts +26 -0
  139. package/dist/components/Label/Label.js +37 -0
  140. package/dist/components/Label/index.d.ts +2 -0
  141. package/dist/components/Loading/Loading.d.ts +29 -0
  142. package/dist/components/Loading/Loading.js +27 -0
  143. package/dist/components/Loading/index.d.ts +2 -0
  144. package/dist/components/LoadingScreen/LoadingScreen.d.ts +7 -0
  145. package/dist/components/LoadingScreen/LoadingScreen.js +25 -0
  146. package/dist/components/LoadingScreen/index.d.ts +1 -0
  147. package/dist/components/Logo/Logo.d.ts +8 -0
  148. package/dist/components/Logo/Logo.js +14 -0
  149. package/dist/components/Logo/index.d.ts +2 -0
  150. package/dist/components/Menu/Menu.d.ts +14 -0
  151. package/dist/components/Menu/Menu.js +58 -0
  152. package/dist/components/Menu/MenuButton.d.ts +5 -0
  153. package/dist/components/Menu/MenuButton.js +21 -0
  154. package/dist/components/Menu/MenuContext.d.ts +10 -0
  155. package/dist/components/Menu/MenuContext.js +12 -0
  156. package/dist/components/Menu/MenuItem.d.ts +4 -0
  157. package/dist/components/Menu/MenuItem.js +19 -0
  158. package/dist/components/Menu/index.d.ts +2 -0
  159. package/dist/components/Modal/Modal.d.ts +56 -0
  160. package/dist/components/Modal/Modal.js +72 -0
  161. package/dist/components/Modal/ModalBody.d.ts +19 -0
  162. package/dist/components/Modal/ModalBody.js +15 -0
  163. package/dist/components/Modal/ModalContext.d.ts +8 -0
  164. package/dist/components/Modal/ModalContext.js +15 -0
  165. package/dist/components/Modal/ModalFooter.d.ts +12 -0
  166. package/dist/components/Modal/ModalFooter.js +5 -0
  167. package/dist/components/Modal/ModalHeader.d.ts +19 -0
  168. package/dist/components/Modal/ModalHeader.js +27 -0
  169. package/dist/components/Modal/ModalSubtitle.d.ts +12 -0
  170. package/dist/components/Modal/ModalSubtitle.js +5 -0
  171. package/dist/components/Modal/index.d.ts +2 -0
  172. package/dist/components/Popover/Popover.d.ts +33 -0
  173. package/dist/components/Popover/Popover.js +51 -0
  174. package/dist/components/Popover/index.d.ts +1 -0
  175. package/dist/components/Radio/Radio.d.ts +25 -0
  176. package/dist/components/Radio/Radio.js +31 -0
  177. package/dist/components/Radio/index.d.ts +2 -0
  178. package/dist/components/SearchBar/SearchBar.d.ts +51 -0
  179. package/dist/components/SearchBar/SearchBar.js +36 -0
  180. package/dist/components/SearchBar/index.d.ts +2 -0
  181. package/dist/components/Select/Select.d.ts +39 -0
  182. package/dist/components/Select/Select.js +37 -0
  183. package/dist/components/Select/SelectTrigger.d.ts +8 -0
  184. package/dist/components/Select/SelectTrigger.js +6 -0
  185. package/dist/components/Select/index.d.ts +2 -0
  186. package/dist/components/Table/TableExplorer.d.ts +14 -0
  187. package/dist/components/Table/TableExplorer.js +8 -0
  188. package/dist/components/Table/index.d.ts +2 -0
  189. package/dist/components/Tabs/Tabs.d.ts +42 -0
  190. package/dist/components/Tabs/Tabs.js +75 -0
  191. package/dist/components/Tabs/TabsContext.d.ts +12 -0
  192. package/dist/components/Tabs/TabsContext.js +12 -0
  193. package/dist/components/Tabs/TabsItem.d.ts +26 -0
  194. package/dist/components/Tabs/TabsItem.js +26 -0
  195. package/dist/components/Tabs/TabsList.d.ts +6 -0
  196. package/dist/components/Tabs/TabsList.js +24 -0
  197. package/dist/components/Tabs/TabsPanel.d.ts +17 -0
  198. package/dist/components/Tabs/TabsPanel.js +14 -0
  199. package/dist/components/Tabs/index.d.ts +3 -0
  200. package/dist/components/TextArea/TextArea.d.ts +33 -0
  201. package/dist/components/TextArea/TextArea.js +34 -0
  202. package/dist/components/TextArea/TextareaCounter.d.ts +4 -0
  203. package/dist/components/TextArea/TextareaCounter.js +8 -0
  204. package/dist/components/TextArea/index.d.ts +2 -0
  205. package/dist/components/Toolbar/Toolbar.d.ts +76 -0
  206. package/dist/components/Toolbar/Toolbar.js +77 -0
  207. package/dist/components/Toolbar/index.d.ts +2 -0
  208. package/dist/components/Tooltip/Tooltip.d.ts +22 -0
  209. package/dist/components/Tooltip/Tooltip.js +40 -0
  210. package/dist/components/Tooltip/index.d.ts +2 -0
  211. package/dist/components/TreeView/TreeItem.d.ts +52 -0
  212. package/dist/components/TreeView/TreeItem.js +54 -0
  213. package/dist/components/TreeView/TreeNode.d.ts +22 -0
  214. package/dist/components/TreeView/TreeView.d.ts +40 -0
  215. package/dist/components/TreeView/TreeView.js +39 -0
  216. package/dist/components/TreeView/hooks/useTreeItemEvents.d.ts +8 -0
  217. package/dist/components/TreeView/hooks/useTreeItemEvents.js +28 -0
  218. package/dist/components/TreeView/index.d.ts +3 -0
  219. package/dist/components/UploadCard/UploadCard.d.ts +42 -0
  220. package/dist/components/UploadCard/UploadCard.js +72 -0
  221. package/dist/components/UploadCard/index.d.ts +1 -0
  222. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +6 -0
  223. package/dist/components/VisuallyHidden/VisuallyHidden.js +8 -0
  224. package/dist/components/VisuallyHidden/index.d.ts +1 -0
  225. package/dist/components/index.d.ts +42 -0
  226. package/dist/core/OdeClientProvider/OdeClientProvider.d.ts +28 -0
  227. package/dist/core/OdeClientProvider/OdeClientProvider.js +62 -0
  228. package/dist/core/OdeClientProvider/index.d.ts +1 -0
  229. package/dist/core/ThemeProvider/ThemeProvider.d.ts +11 -0
  230. package/dist/core/ThemeProvider/ThemeProvider.js +52 -0
  231. package/dist/core/ThemeProvider/index.d.ts +1 -0
  232. package/dist/core/index.d.ts +24 -0
  233. package/dist/core/useAvatar/index.d.ts +1 -0
  234. package/dist/core/useAvatar/useAvatar.d.ts +6 -0
  235. package/dist/core/useAvatar/useAvatar.js +30 -0
  236. package/dist/core/useBookmark/index.d.ts +1 -0
  237. package/dist/core/useBookmark/useBookmark.d.ts +2 -0
  238. package/dist/core/useBookmark/useBookmark.js +14 -0
  239. package/dist/core/useConf/index.d.ts +1 -0
  240. package/dist/core/useConf/useConf.d.ts +4 -0
  241. package/dist/core/useConf/useConf.js +13 -0
  242. package/dist/core/useConversation/index.d.ts +1 -0
  243. package/dist/core/useConversation/useConversation.d.ts +6 -0
  244. package/dist/core/useConversation/useConversation.js +43 -0
  245. package/dist/core/useCookiesConsent/index.d.ts +1 -0
  246. package/dist/core/useCookiesConsent/useCookiesConsent.d.ts +5 -0
  247. package/dist/core/useCookiesConsent/useCookiesConsent.js +29 -0
  248. package/dist/core/useDate/index.d.ts +2 -0
  249. package/dist/core/useDate/useDate.d.ts +13 -0
  250. package/dist/core/useDate/useDate.js +65 -0
  251. package/dist/core/useHasWorkflow/index.d.ts +1 -0
  252. package/dist/core/useHasWorkflow/useHasWorkflow.d.ts +1 -0
  253. package/dist/core/useHasWorkflow/useHasWorkflow.js +22 -0
  254. package/dist/core/useHeader/index.d.ts +1 -0
  255. package/dist/core/useHeader/useHeader.d.ts +5 -0
  256. package/dist/core/useHeader/useHeader.js +46 -0
  257. package/dist/core/useHttpErrorToast/index.d.ts +1 -0
  258. package/dist/core/useHttpErrorToast/useHttpErrorToast.d.ts +2 -0
  259. package/dist/core/useHttpErrorToast/useHttpErrorToast.js +21 -0
  260. package/dist/core/useIsAdml/index.d.ts +1 -0
  261. package/dist/core/useIsAdml/useIsAdml.d.ts +3 -0
  262. package/dist/core/useIsAdml/useIsAdml.js +18 -0
  263. package/dist/core/useLibraryUrl/index.d.ts +1 -0
  264. package/dist/core/useLibraryUrl/useLibraryUrl.d.ts +7 -0
  265. package/dist/core/useLibraryUrl/useLibraryUrl.js +21 -0
  266. package/dist/core/useMediaLibrary/index.d.ts +1 -0
  267. package/dist/core/useMediaLibrary/useMediaLibrary.d.ts +12 -0
  268. package/dist/core/useMediaLibrary/useMediaLibrary.js +58 -0
  269. package/dist/core/useOdeIcons/index.d.ts +1 -0
  270. package/dist/core/useOdeIcons/useOdeIcons.d.ts +9 -0
  271. package/dist/core/useOdeIcons/useOdeIcons.js +92 -0
  272. package/dist/core/usePaths/index.d.ts +1 -0
  273. package/dist/core/usePaths/usePaths.d.ts +1 -0
  274. package/dist/core/usePaths/usePaths.js +6 -0
  275. package/dist/core/usePreferences/index.d.ts +1 -0
  276. package/dist/core/usePreferences/usePreferences.d.ts +4 -0
  277. package/dist/core/usePreferences/usePreferences.js +10 -0
  278. package/dist/core/useResource/index.d.ts +1 -0
  279. package/dist/core/useResource/useResource.d.ts +3 -0
  280. package/dist/core/useResource/useResource.js +25 -0
  281. package/dist/core/useResourceSearch/index.d.ts +1 -0
  282. package/dist/core/useResourceSearch/useResourceSearch.d.ts +18 -0
  283. package/dist/core/useResourceSearch/useResourceSearch.js +34 -0
  284. package/dist/core/useSession/index.d.ts +1 -0
  285. package/dist/core/useSession/useSession.d.ts +1 -0
  286. package/dist/core/useSession/useSession.js +11 -0
  287. package/dist/core/useTrashedResource/index.d.ts +1 -0
  288. package/dist/core/useTrashedResource/useTrashedResource.d.ts +6 -0
  289. package/dist/core/useTrashedResource/useTrashedResource.js +27 -0
  290. package/dist/core/useUpload/index.d.ts +1 -0
  291. package/dist/core/useUpload/useUpload.d.ts +18 -0
  292. package/dist/core/useUpload/useUpload.js +106 -0
  293. package/dist/core/useUploadFiles/index.d.ts +1 -0
  294. package/dist/core/useUploadFiles/useUploadFiles.d.ts +25 -0
  295. package/dist/core/useUploadFiles/useUploadFiles.js +101 -0
  296. package/dist/core/useUser/index.d.ts +1 -0
  297. package/dist/core/useUser/useUser.d.ts +7 -0
  298. package/dist/core/useUser/useUser.js +22 -0
  299. package/dist/core/useWorkspaceFile/index.d.ts +1 -0
  300. package/dist/core/useWorkspaceFile/useWorkspaceFile.d.ts +21 -0
  301. package/dist/core/useWorkspaceFile/useWorkspaceFile.js +49 -0
  302. package/dist/core/useWorkspaceSearch/index.d.ts +1 -0
  303. package/dist/core/useWorkspaceSearch/useWorkspaceSearch.d.ts +9 -0
  304. package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js +58 -0
  305. package/dist/core/useXitiTrackPageLoad/index.d.ts +1 -0
  306. package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.d.ts +4 -0
  307. package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js +28 -0
  308. package/dist/core/useZendeskGuide/index.d.ts +1 -0
  309. package/dist/core/useZendeskGuide/useZendeskGuide.d.ts +2 -0
  310. package/dist/core/useZendeskGuide/useZendeskGuide.js +101 -0
  311. package/dist/editor.js +58 -0
  312. package/dist/hooks/index.d.ts +14 -0
  313. package/dist/hooks/useBrowserInfo/index.d.ts +1 -0
  314. package/dist/hooks/useBrowserInfo/useBrowserInfo.d.ts +9 -0
  315. package/dist/hooks/useBrowserInfo/useBrowserInfo.js +16 -0
  316. package/dist/hooks/useClickOutside/index.d.ts +1 -0
  317. package/dist/hooks/useClickOutside/useClickOutside.d.ts +2 -0
  318. package/dist/hooks/useClickOutside/useClickOutside.js +26 -0
  319. package/dist/hooks/useDebounce/index.d.ts +1 -0
  320. package/dist/hooks/useDebounce/useDebounce.d.ts +2 -0
  321. package/dist/hooks/useDebounce/useDebounce.js +15 -0
  322. package/dist/hooks/useDropdown/index.d.ts +1 -0
  323. package/dist/hooks/useDropdown/useDropdown.d.ts +32 -0
  324. package/dist/hooks/useDropdown/useDropdown.js +158 -0
  325. package/dist/hooks/useDropzone/index.d.ts +1 -0
  326. package/dist/hooks/useDropzone/useDropzone.d.ts +34 -0
  327. package/dist/hooks/useDropzone/useDropzone.js +76 -0
  328. package/dist/hooks/useHover/index.d.ts +1 -0
  329. package/dist/hooks/useHover/useHover.d.ts +2 -0
  330. package/dist/hooks/useHover/useHover.js +22 -0
  331. package/dist/hooks/useImage/index.d.ts +1 -0
  332. package/dist/hooks/useImage/useImage.d.ts +9 -0
  333. package/dist/hooks/useImage/useImage.js +18 -0
  334. package/dist/hooks/useImageResizer/index.d.ts +1 -0
  335. package/dist/hooks/useImageResizer/useImageResizer.d.ts +8 -0
  336. package/dist/hooks/useImageResizer/useImageResizer.js +42 -0
  337. package/dist/hooks/useKeyPress/index.d.ts +1 -0
  338. package/dist/hooks/useKeyPress/useKeyPress.d.ts +1 -0
  339. package/dist/hooks/useKeyPress/useKeyPress.js +14 -0
  340. package/dist/hooks/useScrollToTop/index.d.ts +1 -0
  341. package/dist/hooks/useScrollToTop/useScrollToTop.d.ts +1 -0
  342. package/dist/hooks/useScrollToTop/useScrollToTop.js +9 -0
  343. package/dist/hooks/useThumbnail/index.d.ts +1 -0
  344. package/dist/hooks/useThumbnail/useThumbnail.d.ts +14 -0
  345. package/dist/hooks/useThumbnail/useThumbnail.js +29 -0
  346. package/dist/hooks/useTitle/index.d.ts +1 -0
  347. package/dist/hooks/useTitle/useTitle.d.ts +1 -0
  348. package/dist/hooks/useTitle/useTitle.js +10 -0
  349. package/dist/hooks/useToast/index.d.ts +1 -0
  350. package/dist/hooks/useToast/useToast.d.ts +17 -0
  351. package/dist/hooks/useToast/useToast.js +34 -0
  352. package/dist/hooks/useToggle/index.d.ts +1 -0
  353. package/dist/hooks/useToggle/useToggle.d.ts +1 -0
  354. package/dist/hooks/useToggle/useToggle.js +10 -0
  355. package/dist/hooks/useTrapFocus/index.d.ts +1 -0
  356. package/dist/hooks/useTrapFocus/useTrapFocus.d.ts +2 -0
  357. package/dist/hooks/useTrapFocus/useTrapFocus.js +16 -0
  358. package/dist/index.d.ts +6 -0
  359. package/dist/index.js +227 -0
  360. package/dist/modals.js +18 -0
  361. package/dist/modules/audience/ReactionChoice.d.ts +11 -0
  362. package/dist/modules/audience/ReactionChoice.js +33 -0
  363. package/dist/modules/audience/ReactionModal.Card.d.ts +4 -0
  364. package/dist/modules/audience/ReactionModal.Card.js +34 -0
  365. package/dist/modules/audience/ReactionModal.d.ts +20 -0
  366. package/dist/modules/audience/ReactionModal.js +73 -0
  367. package/dist/modules/audience/ReactionSummary.d.ts +10 -0
  368. package/dist/modules/audience/ReactionSummary.js +27 -0
  369. package/dist/modules/audience/ViewsByProfileCard.d.ts +9 -0
  370. package/dist/modules/audience/ViewsByProfileCard.js +35 -0
  371. package/dist/modules/audience/ViewsCounter.d.ts +11 -0
  372. package/dist/modules/audience/ViewsCounter.js +18 -0
  373. package/dist/modules/audience/ViewsModal.d.ts +11 -0
  374. package/dist/modules/audience/ViewsModal.js +40 -0
  375. package/dist/modules/audience/hooks/useReactionIcons.d.ts +5 -0
  376. package/dist/modules/audience/hooks/useReactionIcons.js +37 -0
  377. package/dist/modules/audience/hooks/useReactions.d.ts +15 -0
  378. package/dist/modules/audience/hooks/useReactions.js +35 -0
  379. package/dist/modules/audience/hooks/useViews.d.ts +11 -0
  380. package/dist/modules/audience/index.d.ts +12 -0
  381. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.d.ts +8 -0
  382. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +132 -0
  383. package/dist/modules/editor/components/BubbleMenuEditImage/index.d.ts +1 -0
  384. package/dist/modules/editor/components/Editor/Editor.d.ts +45 -0
  385. package/dist/modules/editor/components/Editor/Editor.js +83 -0
  386. package/dist/modules/editor/components/Editor/MathsModal.d.ts +8 -0
  387. package/dist/modules/editor/components/Editor/MathsModal.js +50 -0
  388. package/dist/modules/editor/components/Editor/index.d.ts +2 -0
  389. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.d.ts +22 -0
  390. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +17 -0
  391. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.d.ts +14 -0
  392. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +54 -0
  393. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.d.ts +14 -0
  394. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +47 -0
  395. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.d.ts +9 -0
  396. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +18 -0
  397. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.d.ts +14 -0
  398. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +50 -0
  399. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.d.ts +10 -0
  400. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +62 -0
  401. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.d.ts +10 -0
  402. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +52 -0
  403. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +10 -0
  404. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +319 -0
  405. package/dist/modules/editor/components/EditorToolbar/index.d.ts +1 -0
  406. package/dist/modules/editor/components/NodeView/AttachmentNodeView.d.ts +2 -0
  407. package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +10 -0
  408. package/dist/modules/editor/components/NodeView/AudioNodeView.d.ts +2 -0
  409. package/dist/modules/editor/components/NodeView/AudioNodeView.js +10 -0
  410. package/dist/modules/editor/components/NodeView/ImageNodeView.d.ts +2 -0
  411. package/dist/modules/editor/components/NodeView/ImageNodeView.js +10 -0
  412. package/dist/modules/editor/components/NodeView/LinkerNodeView.d.ts +2 -0
  413. package/dist/modules/editor/components/NodeView/LinkerNodeView.js +10 -0
  414. package/dist/modules/editor/components/NodeView/VideoNodeView.d.ts +2 -0
  415. package/dist/modules/editor/components/NodeView/VideoNodeView.js +10 -0
  416. package/dist/modules/editor/components/NodeView/index.d.ts +5 -0
  417. package/dist/modules/editor/components/Renderer/AttachmentRenderer.d.ts +7 -0
  418. package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +34 -0
  419. package/dist/modules/editor/components/Renderer/AudioRenderer.d.ts +7 -0
  420. package/dist/modules/editor/components/Renderer/AudioRenderer.js +11 -0
  421. package/dist/modules/editor/components/Renderer/LinkerRenderer.d.ts +9 -0
  422. package/dist/modules/editor/components/Renderer/LinkerRenderer.js +34 -0
  423. package/dist/modules/editor/components/Renderer/MediaRenderer.d.ts +2 -0
  424. package/dist/modules/editor/components/Renderer/MediaRenderer.js +69 -0
  425. package/dist/modules/editor/components/Renderer/index.d.ts +4 -0
  426. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +2 -0
  427. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +8 -0
  428. package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +15 -0
  429. package/dist/modules/editor/components/Toolbar/LinkToolbar.js +59 -0
  430. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.d.ts +9 -0
  431. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +28 -0
  432. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.d.ts +13 -0
  433. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +45 -0
  434. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.d.ts +9 -0
  435. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +27 -0
  436. package/dist/modules/editor/components/Toolbar/TableToolbar.d.ts +9 -0
  437. package/dist/modules/editor/components/Toolbar/TableToolbar.js +88 -0
  438. package/dist/modules/editor/components/Toolbar/index.d.ts +2 -0
  439. package/dist/modules/editor/components/index.d.ts +6 -0
  440. package/dist/modules/editor/hooks/index.d.ts +12 -0
  441. package/dist/modules/editor/hooks/useActionOptions.d.ts +5 -0
  442. package/dist/modules/editor/hooks/useActionOptions.js +75 -0
  443. package/dist/modules/editor/hooks/useCommentEditor.d.ts +13 -0
  444. package/dist/modules/editor/hooks/useCommentEditor.js +37 -0
  445. package/dist/modules/editor/hooks/useEditorContext.d.ts +37 -0
  446. package/dist/modules/editor/hooks/useEditorContext.js +12 -0
  447. package/dist/modules/editor/hooks/useImageModal.d.ts +31 -0
  448. package/dist/modules/editor/hooks/useImageModal.js +46 -0
  449. package/dist/modules/editor/hooks/useImageSelection.d.ts +21 -0
  450. package/dist/modules/editor/hooks/useImageSelection.js +46 -0
  451. package/dist/modules/editor/hooks/useLinkToolbar.d.ts +17 -0
  452. package/dist/modules/editor/hooks/useLinkToolbar.js +37 -0
  453. package/dist/modules/editor/hooks/useMathsModal.d.ts +17 -0
  454. package/dist/modules/editor/hooks/useMathsModal.js +17 -0
  455. package/dist/modules/editor/hooks/useMathsStyles.d.ts +1 -0
  456. package/dist/modules/editor/hooks/useMathsStyles.js +20 -0
  457. package/dist/modules/editor/hooks/useMediaLibraryEditor.d.ts +19 -0
  458. package/dist/modules/editor/hooks/useMediaLibraryEditor.js +152 -0
  459. package/dist/modules/editor/hooks/useResizeMedia.d.ts +10 -0
  460. package/dist/modules/editor/hooks/useResizeMedia.js +47 -0
  461. package/dist/modules/editor/hooks/useSpeechRecognition.d.ts +6 -0
  462. package/dist/modules/editor/hooks/useSpeechRecognition.js +21 -0
  463. package/dist/modules/editor/hooks/useSpeechSynthetisis.d.ts +12 -0
  464. package/dist/modules/editor/hooks/useSpeechSynthetisis.js +20 -0
  465. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +15 -0
  466. package/dist/modules/editor/hooks/useTipTapEditor.js +75 -0
  467. package/dist/modules/editor/index.d.ts +3 -0
  468. package/dist/modules/editor/utils/has-extension.d.ts +2 -0
  469. package/dist/modules/editor/utils/has-extension.js +4 -0
  470. package/dist/modules/editor/utils/has-mark.d.ts +2 -0
  471. package/dist/modules/editor/utils/has-mark.js +4 -0
  472. package/dist/modules/editor/utils/has-text-style.d.ts +2 -0
  473. package/dist/modules/editor/utils/has-text-style.js +5 -0
  474. package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +43 -0
  475. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +59 -0
  476. package/dist/modules/modals/OnboardingModal/index.d.ts +1 -0
  477. package/dist/modules/modals/OnboardingModal/useOnboardingModal.d.ts +7 -0
  478. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +30 -0
  479. package/dist/modules/modals/PublishModal/PublishModal.d.ts +9 -0
  480. package/dist/modules/modals/PublishModal/PublishModal.js +120 -0
  481. package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.d.ts +7 -0
  482. package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +29 -0
  483. package/dist/modules/modals/PublishModal/components/AgeSelect.d.ts +8 -0
  484. package/dist/modules/modals/PublishModal/components/AgeSelect.js +20 -0
  485. package/dist/modules/modals/PublishModal/components/LangSelect.d.ts +5 -0
  486. package/dist/modules/modals/PublishModal/components/LangSelect.js +19 -0
  487. package/dist/modules/modals/PublishModal/components/PublishModalFooter.d.ts +1 -0
  488. package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +23 -0
  489. package/dist/modules/modals/PublishModal/components/SubjectsDropdown.d.ts +7 -0
  490. package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +29 -0
  491. package/dist/modules/modals/PublishModal/components/ToastError.d.ts +5 -0
  492. package/dist/modules/modals/PublishModal/components/ToastError.js +24 -0
  493. package/dist/modules/modals/PublishModal/components/ToastSuccess.d.ts +4 -0
  494. package/dist/modules/modals/PublishModal/components/ToastSuccess.js +18 -0
  495. package/dist/modules/modals/PublishModal/constants/ageOptions.d.ts +1 -0
  496. package/dist/modules/modals/PublishModal/constants/ageOptions.js +4 -0
  497. package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.d.ts +4 -0
  498. package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js +34 -0
  499. package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.d.ts +4 -0
  500. package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +43 -0
  501. package/dist/modules/modals/PublishModal/hooks/usePublishModal.d.ts +38 -0
  502. package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +106 -0
  503. package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.d.ts +4 -0
  504. package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js +118 -0
  505. package/dist/modules/modals/PublishModal/index.d.ts +1 -0
  506. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +30 -0
  507. package/dist/modules/modals/ResourceModal/ResourceModal.js +156 -0
  508. package/dist/modules/modals/ResourceModal/apps/BlogPublic.d.ts +13 -0
  509. package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +62 -0
  510. package/dist/modules/modals/ResourceModal/hooks/useSlug.d.ts +17 -0
  511. package/dist/modules/modals/ResourceModal/hooks/useSlug.js +41 -0
  512. package/dist/modules/modals/ResourceModal/hooks/useThumb.d.ts +11 -0
  513. package/dist/modules/modals/ResourceModal/hooks/useThumb.js +17 -0
  514. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +7 -0
  515. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +12 -0
  516. package/dist/modules/modals/ResourceModal/index.d.ts +3 -0
  517. package/dist/modules/modals/ShareModal/ShareBookmark.d.ts +8 -0
  518. package/dist/modules/modals/ShareModal/ShareBookmark.js +22 -0
  519. package/dist/modules/modals/ShareModal/ShareBookmarkLine.d.ts +9 -0
  520. package/dist/modules/modals/ShareModal/ShareBookmarkLine.js +42 -0
  521. package/dist/modules/modals/ShareModal/ShareModal.d.ts +41 -0
  522. package/dist/modules/modals/ShareModal/ShareModal.js +128 -0
  523. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +8 -0
  524. package/dist/modules/modals/ShareModal/apps/ShareBlog.js +42 -0
  525. package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +24 -0
  526. package/dist/modules/modals/ShareModal/hooks/useSearch.js +178 -0
  527. package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +54 -0
  528. package/dist/modules/modals/ShareModal/hooks/useShare.js +192 -0
  529. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +23 -0
  530. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +67 -0
  531. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +13 -0
  532. package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +15 -0
  533. package/dist/modules/modals/ShareModal/index.d.ts +3 -0
  534. package/dist/modules/modals/ShareModal/utils/hasRight.d.ts +2 -0
  535. package/dist/modules/modals/ShareModal/utils/hasRight.js +4 -0
  536. package/dist/modules/modals/ShareModal/utils/showShareRightLine.d.ts +2 -0
  537. package/dist/modules/modals/ShareModal/utils/showShareRightLine.js +4 -0
  538. package/dist/modules/modals/index.d.ts +4 -0
  539. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.d.ts +12 -0
  540. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +49 -0
  541. package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.d.ts +10 -0
  542. package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +24 -0
  543. package/dist/modules/multimedia/AudioRecorder/index.d.ts +1 -0
  544. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +16 -0
  545. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +307 -0
  546. package/dist/modules/multimedia/Embed/Embed.d.ts +5 -0
  547. package/dist/modules/multimedia/Embed/Embed.js +32 -0
  548. package/dist/modules/multimedia/Embed/index.d.ts +2 -0
  549. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.d.ts +27 -0
  550. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +116 -0
  551. package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.d.ts +7 -0
  552. package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +69 -0
  553. package/dist/modules/multimedia/ImageEditor/effects/blur.d.ts +19 -0
  554. package/dist/modules/multimedia/ImageEditor/effects/blur.js +72 -0
  555. package/dist/modules/multimedia/ImageEditor/effects/crop.d.ts +28 -0
  556. package/dist/modules/multimedia/ImageEditor/effects/crop.js +155 -0
  557. package/dist/modules/multimedia/ImageEditor/effects/misc.d.ts +154 -0
  558. package/dist/modules/multimedia/ImageEditor/effects/misc.js +162 -0
  559. package/dist/modules/multimedia/ImageEditor/effects/resize.d.ts +25 -0
  560. package/dist/modules/multimedia/ImageEditor/effects/resize.js +157 -0
  561. package/dist/modules/multimedia/ImageEditor/effects/rotate.d.ts +8 -0
  562. package/dist/modules/multimedia/ImageEditor/effects/rotate.js +33 -0
  563. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.d.ts +32 -0
  564. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +66 -0
  565. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.d.ts +30 -0
  566. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +76 -0
  567. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.d.ts +23 -0
  568. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +52 -0
  569. package/dist/modules/multimedia/ImageEditor/index.d.ts +1 -0
  570. package/dist/modules/multimedia/ImageEditor/utils/aggregate.d.ts +9 -0
  571. package/dist/modules/multimedia/ImageEditor/utils/aggregate.js +13 -0
  572. package/dist/modules/multimedia/ImageEditor/utils/debounceAggregate.d.ts +10 -0
  573. package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.d.ts +46 -0
  574. package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +39 -0
  575. package/dist/modules/multimedia/ImagePickerWorkspace/index.d.ts +2 -0
  576. package/dist/modules/multimedia/Linker/ExternalLinker.d.ts +28 -0
  577. package/dist/modules/multimedia/Linker/ExternalLinker.js +45 -0
  578. package/dist/modules/multimedia/Linker/InternalLinker.d.ts +28 -0
  579. package/dist/modules/multimedia/Linker/InternalLinker.js +114 -0
  580. package/dist/modules/multimedia/Linker/index.d.ts +4 -0
  581. package/dist/modules/multimedia/LinkerCard/LinkerCard.d.ts +13 -0
  582. package/dist/modules/multimedia/LinkerCard/LinkerCard.js +38 -0
  583. package/dist/modules/multimedia/LinkerCard/index.d.ts +2 -0
  584. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +84 -0
  585. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +211 -0
  586. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.d.ts +60 -0
  587. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +12 -0
  588. package/dist/modules/multimedia/MediaLibrary/index.d.ts +3 -0
  589. package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.d.ts +1 -0
  590. package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +19 -0
  591. package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.d.ts +6 -0
  592. package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +17 -0
  593. package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.d.ts +1 -0
  594. package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +14 -0
  595. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.d.ts +11 -0
  596. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +35 -0
  597. package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.d.ts +1 -0
  598. package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +34 -0
  599. package/dist/modules/multimedia/MediaLibrary/innertabs/Video.d.ts +1 -0
  600. package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +22 -0
  601. package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.d.ts +1 -0
  602. package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +14 -0
  603. package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.d.ts +1 -0
  604. package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +31 -0
  605. package/dist/modules/multimedia/MediaLibrary/innertabs/index.d.ts +10 -0
  606. package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +21 -0
  607. package/dist/modules/multimedia/UploadFiles/UploadFiles.d.ts +9 -0
  608. package/dist/modules/multimedia/UploadFiles/UploadFiles.js +56 -0
  609. package/dist/modules/multimedia/UploadFiles/index.d.ts +2 -0
  610. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.d.ts +5 -0
  611. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +77 -0
  612. package/dist/modules/multimedia/VideoEmbed/index.d.ts +1 -0
  613. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.d.ts +14 -0
  614. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +259 -0
  615. package/dist/modules/multimedia/VideoRecorder/index.d.ts +1 -0
  616. package/dist/modules/multimedia/Workspace/Workspace.d.ts +33 -0
  617. package/dist/modules/multimedia/Workspace/Workspace.js +169 -0
  618. package/dist/modules/multimedia/Workspace/index.d.ts +2 -0
  619. package/dist/modules/multimedia/index.d.ts +8 -0
  620. package/dist/multimedia.js +20 -0
  621. package/dist/portal/Header/Badge.d.ts +5 -0
  622. package/dist/portal/Header/Badge.js +9 -0
  623. package/dist/portal/Header/Header.d.ts +9 -0
  624. package/dist/portal/Header/Header.js +170 -0
  625. package/dist/portal/Header/NavItem.d.ts +6 -0
  626. package/dist/portal/Header/NavItem.js +14 -0
  627. package/dist/portal/Header/NavLink.d.ts +24 -0
  628. package/dist/portal/Header/NavLink.js +19 -0
  629. package/dist/portal/Header/Navbar.d.ts +6 -0
  630. package/dist/portal/Header/Navbar.js +13 -0
  631. package/dist/portal/Header/NavbarNav.d.ts +6 -0
  632. package/dist/portal/Header/NavbarNav.js +13 -0
  633. package/dist/portal/Header/WidgetApps.d.ts +9 -0
  634. package/dist/portal/Header/WidgetApps.js +23 -0
  635. package/dist/portal/Header/index.d.ts +5 -0
  636. package/dist/portal/Help/Help.d.ts +9 -0
  637. package/dist/portal/Help/Help.js +25 -0
  638. package/dist/portal/Help/hooks/useHelp.d.ts +10 -0
  639. package/dist/portal/Help/hooks/useHelp.js +85 -0
  640. package/dist/portal/Help/index.d.ts +1 -0
  641. package/dist/portal/Layout/Layout.d.ts +12 -0
  642. package/dist/portal/Layout/Layout.js +42 -0
  643. package/dist/portal/Layout/index.d.ts +1 -0
  644. package/dist/portal/Main/Main.d.ts +16 -0
  645. package/dist/portal/Main/index.d.ts +2 -0
  646. package/dist/portal/SearchEngine/SearchEngine.d.ts +5 -0
  647. package/dist/portal/SearchEngine/SearchEngine.js +33 -0
  648. package/dist/portal/SearchEngine/index.d.ts +1 -0
  649. package/dist/portal/index.d.ts +1 -0
  650. package/dist/types/index.d.ts +2 -0
  651. package/dist/types/size.d.ts +1 -0
  652. package/dist/types/status.d.ts +1 -0
  653. package/dist/utils/MockedDataProvider/MockedDataProvider.d.ts +28 -0
  654. package/dist/utils/MockedDataProvider/MockedDataProvider.js +26 -0
  655. package/dist/utils/MockedDataProvider/index.d.ts +1 -0
  656. package/dist/utils/StringUtils.d.ts +5 -0
  657. package/dist/utils/StringUtils.js +14 -0
  658. package/dist/utils/addTimestampToUrl.d.ts +6 -0
  659. package/dist/utils/addTimestampToUrl.js +7 -0
  660. package/dist/utils/blob.d.ts +9 -0
  661. package/dist/utils/blob.js +15 -0
  662. package/dist/utils/checkUserRight.d.ts +11 -0
  663. package/dist/utils/checkUserRight.js +44 -0
  664. package/dist/utils/fileSize.d.ts +1 -0
  665. package/dist/utils/fileSize.js +8 -0
  666. package/dist/utils/findTreeNode.d.ts +9 -0
  667. package/dist/utils/findTreeNode.js +11 -0
  668. package/dist/utils/index.d.ts +14 -0
  669. package/dist/utils/isActionAvailable.d.ts +2 -0
  670. package/dist/utils/isActionAvailable.js +7 -0
  671. package/dist/utils/libraryMaps.d.ts +4 -0
  672. package/dist/utils/libraryMaps.js +12 -0
  673. package/dist/utils/noop.d.ts +4 -0
  674. package/dist/utils/noop.js +5 -0
  675. package/dist/utils/ref.d.ts +5 -0
  676. package/dist/utils/ref.js +14 -0
  677. package/dist/utils/thumbnail.d.ts +8 -0
  678. package/dist/utils/thumbnail.js +6 -0
  679. package/dist/utils/time.d.ts +2 -0
  680. package/dist/utils/time.js +11 -0
  681. package/dist/utils/treeview.d.ts +33 -0
  682. package/dist/utils/treeview.js +133 -0
  683. package/dist/utils/video.d.ts +1 -0
  684. package/dist/utils/video.js +4 -0
  685. package/dist/widgets/BookmarkedApps/BookmarkedApps.d.ts +8 -0
  686. package/dist/widgets/BookmarkedApps/BookmarkedApps.js +8 -0
  687. package/dist/widgets/BookmarkedApps/index.d.ts +2 -0
  688. package/dist/widgets/Widget/Widget.d.ts +17 -0
  689. package/dist/widgets/Widget/Widget.js +22 -0
  690. package/dist/widgets/Widget/index.d.ts +2 -0
  691. package/dist/widgets/index.d.ts +2 -0
  692. package/package.json +134 -0
@@ -0,0 +1,72 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useTranslation } from "react-i18next";
3
+ import Button from "../Button/Button.js";
4
+ import Image from "../Image/Image.js";
5
+ import Tooltip from "../Tooltip/Tooltip.js";
6
+ import Loading from "../Loading/Loading.js";
7
+ import Card from "../Card/Card.js";
8
+ import IconButton from "../Button/IconButton.js";
9
+ import usePaths from "../../core/usePaths/usePaths.js";
10
+ import { Icon } from "../Icon/Icon.js";
11
+ const UploadCard = ({
12
+ item,
13
+ status = "idle",
14
+ isClickable = !1,
15
+ isSelectable = !1,
16
+ onDelete,
17
+ onEdit,
18
+ onRetry
19
+ }) => {
20
+ const [imagePath] = usePaths(), {
21
+ t
22
+ } = useTranslation(), {
23
+ src,
24
+ name,
25
+ info
26
+ } = item, isIdle = status === "idle", isLoading = status === "loading", isSuccess = status === "success", isTypeImage = info == null ? void 0 : info.type.startsWith("image"), imgPlaceholder = `${imagePath}/common/image-placeholder.png`, defaultMapping = {
27
+ text: "",
28
+ context: null,
29
+ image: /* @__PURE__ */ jsx("img", { src: imgPlaceholder, alt: "", width: "48", height: "48" })
30
+ }, mapping = {
31
+ error: {
32
+ text: /* @__PURE__ */ jsx("strong", { children: /* @__PURE__ */ jsx("small", { className: "text-danger caption", children: t("tiptap.upload.error") }) }),
33
+ context: /* @__PURE__ */ jsx(Button, { leftIcon: /* @__PURE__ */ jsx(Icon, { name: "reset" }), variant: "ghost", color: "tertiary", onClick: onRetry, children: t("tiptap.upload.retry") }),
34
+ image: /* @__PURE__ */ jsx(Image, { alt: "", src: `${imagePath}/common/image-status-error.svg`, objectFit: "cover" })
35
+ },
36
+ idle: defaultMapping,
37
+ loading: {
38
+ text: "",
39
+ context: /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.tooltip.upload.loading"), placement: "top", children: /* @__PURE__ */ jsx(Loading, { isLoading: !0, loadingPosition: "left", className: "text-secondary" }) }),
40
+ image: defaultMapping.image
41
+ },
42
+ warning: defaultMapping,
43
+ success: {
44
+ text: /* @__PURE__ */ jsxs("em", { children: [
45
+ info == null ? void 0 : info.type,
46
+ " ",
47
+ (info == null ? void 0 : info.weight) && `- ${info.weight}`
48
+ ] }),
49
+ context: /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.tooltip.upload.loaded"), placement: "top", children: /* @__PURE__ */ jsx(Icon, { name: "success-outline", className: "text-success" }) }),
50
+ image: /* @__PURE__ */ jsx(Image, { alt: "", src: src ?? "", width: "48", objectFit: "cover", className: "rounded", style: {
51
+ aspectRatio: 1 / 1
52
+ } })
53
+ },
54
+ unknown: defaultMapping
55
+ }, canEditItem = () => isTypeImage && /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.tooltip.upload.edit"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(Icon, { name: "wand" }), variant: "ghost", "aria-label": t("tiptap.tooltip.upload.loading"), disabled: isLoading || !isSuccess, onClick: onEdit, color: "secondary" }) });
56
+ return /* @__PURE__ */ jsx(Card, { isClickable, isSelectable, className: "card-upload", children: /* @__PURE__ */ jsxs(Card.Body, { children: [
57
+ /* @__PURE__ */ jsx("div", { className: "card-image", children: mapping[status].image }),
58
+ /* @__PURE__ */ jsxs("div", { className: "text-truncate", children: [
59
+ /* @__PURE__ */ jsx(Card.Text, { children: name }),
60
+ /* @__PURE__ */ jsx(Card.Text, { className: "caption", children: mapping[status].text })
61
+ ] }),
62
+ !isIdle && /* @__PURE__ */ jsx("div", { className: "ms-auto", children: /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center gap-12", children: [
63
+ mapping[status].context,
64
+ !isIdle && /* @__PURE__ */ jsx("div", { className: "vr" }),
65
+ canEditItem(),
66
+ /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.tooltip.upload.delete"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(Icon, { name: "close" }), variant: "ghost", "aria-label": t("tiptap.tooltip.upload.delete"), color: "tertiary", onClick: onDelete }) })
67
+ ] }) })
68
+ ] }) });
69
+ };
70
+ export {
71
+ UploadCard
72
+ };
@@ -0,0 +1 @@
1
+ export * from './UploadCard';
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export interface VisuallyHiddenProps {
3
+ children: ReactNode;
4
+ }
5
+ declare const VisuallyHidden: import('react').ForwardRefExoticComponent<VisuallyHiddenProps & import('react').RefAttributes<HTMLSpanElement>>;
6
+ export default VisuallyHidden;
@@ -0,0 +1,8 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ const VisuallyHidden = /* @__PURE__ */ forwardRef(({
4
+ children
5
+ }, ref) => /* @__PURE__ */ jsx("span", { className: "visually-hidden", ref, children })), VisuallyHidden$1 = VisuallyHidden;
6
+ export {
7
+ VisuallyHidden$1 as default
8
+ };
@@ -0,0 +1 @@
1
+ export { default as VisuallyHidden } from './VisuallyHidden';
@@ -0,0 +1,42 @@
1
+ export * from './ActionBar';
2
+ export * from './Alert';
3
+ export * from './AppHeader';
4
+ export * from './AppIcon';
5
+ export * from './Attachment';
6
+ export * from './Avatar';
7
+ export * from './Badge';
8
+ export * from './Breadcrumb';
9
+ export * from './Button';
10
+ export * from './Card';
11
+ export * from './Checkbox';
12
+ export * from './ColorPicker';
13
+ export * from './Combobox';
14
+ export * from './Dropdown';
15
+ export * from './Dropzone';
16
+ export * from './EmptyScreen';
17
+ export * from './FileCard';
18
+ export * from './Form';
19
+ export * from './Grid';
20
+ export * from './Heading';
21
+ export * from './Icon';
22
+ export * from './Image';
23
+ export * from './ImagePicker';
24
+ export * from './Input';
25
+ export * from './Label';
26
+ export * from './Loading';
27
+ export * from './LoadingScreen';
28
+ export * from './Logo';
29
+ export * from './Menu';
30
+ export * from './Modal';
31
+ export * from './Popover';
32
+ export * from './Radio';
33
+ export * from './SearchBar';
34
+ export * from './Select';
35
+ export * from './Table';
36
+ export * from './Tabs';
37
+ export * from './TextArea';
38
+ export * from './Toolbar';
39
+ export * from './Tooltip';
40
+ export * from './TreeView';
41
+ export * from './UploadCard';
42
+ export * from './VisuallyHidden';
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ import { UseQueryResult } from '../../../node_modules/@tanstack/react-query';
3
+ import { App, IGetConf, IGetSession, IUserDescription, IUserInfo, IWebApp, UserProfile } from 'edifice-ts-client';
4
+ export interface OdeProviderParams {
5
+ alternativeApp?: boolean;
6
+ app: App;
7
+ cdnDomain?: string | null;
8
+ version?: string | null;
9
+ }
10
+ export interface OdeClientProps {
11
+ children: ReactNode;
12
+ params: OdeProviderParams;
13
+ }
14
+ export interface OdeContextProps {
15
+ appCode: App;
16
+ applications: IWebApp[] | undefined;
17
+ confQuery: UseQueryResult<IGetConf>;
18
+ currentApp: IWebApp | undefined;
19
+ currentLanguage: string | undefined;
20
+ init: boolean;
21
+ sessionQuery: UseQueryResult<IGetSession>;
22
+ user: IUserInfo | undefined;
23
+ userDescription: Partial<IUserDescription> | undefined;
24
+ userProfile: UserProfile | undefined;
25
+ }
26
+ export declare const OdeClientContext: import('react').Context<OdeContextProps | null>;
27
+ export declare function OdeClientProvider({ children, params }: OdeClientProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function useOdeClient(): OdeContextProps;
@@ -0,0 +1,62 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createContext, useEffect, useMemo, useContext } from "react";
3
+ import { useTranslation } from "react-i18next";
4
+ import useSession from "../useSession/useSession.js";
5
+ import useConf from "../useConf/useConf.js";
6
+ const OdeClientContext = /* @__PURE__ */ createContext(null);
7
+ function OdeClientProvider({
8
+ children,
9
+ params
10
+ }) {
11
+ const appCode = params.app, {
12
+ t
13
+ } = useTranslation(), translatedAppCode = t(appCode), sessionQuery = useSession(), confQuery = useConf({
14
+ appCode
15
+ }), init = (confQuery == null ? void 0 : confQuery.isSuccess) && (sessionQuery == null ? void 0 : sessionQuery.isSuccess);
16
+ useEffect(() => {
17
+ var _a;
18
+ [
19
+ {
20
+ data: "html",
21
+ value: ((_a = sessionQuery == null ? void 0 : sessionQuery.data) == null ? void 0 : _a.currentLanguage) || "fr"
22
+ },
23
+ // #WB-3137 Disable the translation of the content of the page which provoced issues
24
+ {
25
+ data: "translate",
26
+ value: "no"
27
+ }
28
+ ].forEach((attribute) => {
29
+ var _a2;
30
+ return (_a2 = document.querySelector("html")) == null ? void 0 : _a2.setAttribute(attribute.data, attribute.value);
31
+ });
32
+ }, [sessionQuery == null ? void 0 : sessionQuery.data]), useEffect(() => {
33
+ document.title = `${translatedAppCode}`;
34
+ }, [appCode, sessionQuery.data, translatedAppCode]);
35
+ const values = useMemo(() => {
36
+ var _a, _b, _c, _d, _e, _f;
37
+ return {
38
+ appCode,
39
+ applications: (_a = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a.applications,
40
+ confQuery,
41
+ currentApp: (_b = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _b.currentApp,
42
+ currentLanguage: (_c = sessionQuery == null ? void 0 : sessionQuery.data) == null ? void 0 : _c.currentLanguage,
43
+ init,
44
+ sessionQuery,
45
+ user: (_d = sessionQuery == null ? void 0 : sessionQuery.data) == null ? void 0 : _d.user,
46
+ userDescription: (_e = sessionQuery == null ? void 0 : sessionQuery.data) == null ? void 0 : _e.userDescription,
47
+ userProfile: (_f = sessionQuery == null ? void 0 : sessionQuery.data) == null ? void 0 : _f.userProfile
48
+ };
49
+ }, [appCode, confQuery, init, sessionQuery]);
50
+ return /* @__PURE__ */ jsx(OdeClientContext.Provider, { value: values, children });
51
+ }
52
+ function useOdeClient() {
53
+ const context = useContext(OdeClientContext);
54
+ if (!context)
55
+ throw new Error("Cannot be used outside of OdeClientProvider");
56
+ return context;
57
+ }
58
+ export {
59
+ OdeClientContext,
60
+ OdeClientProvider,
61
+ useOdeClient
62
+ };
@@ -0,0 +1 @@
1
+ export * from './OdeClientProvider';
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { IOdeTheme } from 'edifice-ts-client';
3
+ export interface ThemeProps {
4
+ children: ReactNode;
5
+ }
6
+ export interface ThemeContextProps {
7
+ theme: IOdeTheme | undefined;
8
+ }
9
+ export declare const ThemeContext: import('react').Context<ThemeContextProps | null>;
10
+ export declare function ThemeProvider({ children }: ThemeProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function useOdeTheme(): ThemeContextProps;
@@ -0,0 +1,52 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createContext, useEffect, useMemo, useContext } from "react";
3
+ import { useOdeClient } from "../OdeClientProvider/OdeClientProvider.js";
4
+ import useConf from "../useConf/useConf.js";
5
+ const ThemeContext = /* @__PURE__ */ createContext(null);
6
+ function ThemeProvider({
7
+ children
8
+ }) {
9
+ var _a;
10
+ const {
11
+ appCode
12
+ } = useOdeClient(), confQuery = useConf({
13
+ appCode
14
+ });
15
+ useEffect(() => {
16
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
17
+ const favicon = document.getElementById("favicon");
18
+ favicon.href = `${(_b = (_a2 = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a2.theme) == null ? void 0 : _b.basePath}/img/illustrations/favicon.ico`;
19
+ const bootstrapVersion = (_e = (_d = (_c = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _c.theme) == null ? void 0 : _d.bootstrapVersion) == null ? void 0 : _e.split("-"), dataProduct = bootstrapVersion ? bootstrapVersion[bootstrapVersion.length - 1] : void 0;
20
+ [{
21
+ data: "data-skin",
22
+ value: (_g = (_f = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _f.theme) == null ? void 0 : _g.skinName
23
+ }, {
24
+ data: "data-theme",
25
+ value: (_i = (_h = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _h.theme) == null ? void 0 : _i.themeName
26
+ }, {
27
+ data: "data-product",
28
+ value: dataProduct
29
+ }].forEach((attribute) => {
30
+ var _a3;
31
+ return (_a3 = document.querySelector("html")) == null ? void 0 : _a3.setAttribute(attribute.data, attribute.value);
32
+ });
33
+ }, [confQuery == null ? void 0 : confQuery.data]);
34
+ const values = useMemo(() => {
35
+ var _a2;
36
+ return {
37
+ theme: (_a2 = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a2.theme
38
+ };
39
+ }, [(_a = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a.theme]);
40
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: values, children });
41
+ }
42
+ function useOdeTheme() {
43
+ const context = useContext(ThemeContext);
44
+ if (!context)
45
+ throw new Error("Cannot be used outside of OdeClientProvider");
46
+ return context;
47
+ }
48
+ export {
49
+ ThemeContext,
50
+ ThemeProvider,
51
+ useOdeTheme
52
+ };
@@ -0,0 +1 @@
1
+ export * from './ThemeProvider';
@@ -0,0 +1,24 @@
1
+ export * from './OdeClientProvider';
2
+ export * from './ThemeProvider';
3
+ export * from './useAvatar';
4
+ export * from './useBookmark';
5
+ export * from './useConf';
6
+ export * from './useConversation';
7
+ export * from './useDate';
8
+ export * from './useHasWorkflow';
9
+ export * from './useHeader';
10
+ export * from './useHttpErrorToast';
11
+ export * from './useIsAdml';
12
+ export * from './useLibraryUrl';
13
+ export * from './useMediaLibrary';
14
+ export * from './useOdeIcons';
15
+ export * from './usePaths';
16
+ export * from './useResourceSearch';
17
+ export * from './useSession';
18
+ export * from './useTrashedResource';
19
+ export * from './useUploadFiles';
20
+ export * from './useUser';
21
+ export * from './useWorkspaceFile';
22
+ export * from './useWorkspaceSearch';
23
+ export * from './useXitiTrackPageLoad';
24
+ export * from './useZendeskGuide';
@@ -0,0 +1 @@
1
+ export { default as useAvatar } from './useAvatar';
@@ -0,0 +1,6 @@
1
+ import { ID, UserProfile } from 'edifice-ts-client';
2
+ export default function useAvatar(userId: ID, userProfile?: UserProfile[number]): {
3
+ badge: JSX.Element | null;
4
+ avatarURL: string;
5
+ userbookURL: string;
6
+ };
@@ -0,0 +1,30 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { odeServices } from "edifice-ts-client";
3
+ import { useMemo } from "react";
4
+ import { useTranslation } from "react-i18next";
5
+ import Badge from "../../components/Badge/Badge.js";
6
+ function useAvatar(userId, userProfile) {
7
+ const {
8
+ t
9
+ } = useTranslation(), badge = useMemo(() => {
10
+ const profile = (userProfile == null ? void 0 : userProfile.toLowerCase()) ?? "guest";
11
+ return ["teacher", "student", "relative", "personnel"].includes(profile) ? /* @__PURE__ */ jsx(Badge, { variant: {
12
+ type: "profile",
13
+ profile
14
+ }, children: t(profile) }) : null;
15
+ }, [userProfile, t]);
16
+ function getAvatarURL(userId2) {
17
+ return odeServices.directory().getAvatarUrl(userId2, "user");
18
+ }
19
+ function getUserbookURL(userId2) {
20
+ return odeServices.directory().getDirectoryUrl(userId2, "user");
21
+ }
22
+ return {
23
+ badge,
24
+ avatarURL: getAvatarURL(userId),
25
+ userbookURL: getUserbookURL(userId)
26
+ };
27
+ }
28
+ export {
29
+ useAvatar as default
30
+ };
@@ -0,0 +1 @@
1
+ export { default as useBookmark } from './useBookmark';
@@ -0,0 +1,2 @@
1
+ import { IWebApp } from 'edifice-ts-client';
2
+ export default function useBookmark(): IWebApp[] | undefined;
@@ -0,0 +1,14 @@
1
+ import { useOdeClient } from "../OdeClientProvider/OdeClientProvider.js";
2
+ function useBookmark() {
3
+ var _a;
4
+ const {
5
+ sessionQuery
6
+ } = useOdeClient(), set = /* @__PURE__ */ new Set();
7
+ return (_a = sessionQuery == null ? void 0 : sessionQuery.data) == null ? void 0 : _a.bookmarkedApps.filter((el) => {
8
+ const duplicate = set.has(el.displayName);
9
+ return set.add(el.displayName), !duplicate;
10
+ });
11
+ }
12
+ export {
13
+ useBookmark as default
14
+ };
@@ -0,0 +1 @@
1
+ export { default as useConf } from './useConf';
@@ -0,0 +1,4 @@
1
+ import { App } from 'edifice-ts-client';
2
+ export default function useConf({ appCode }: {
3
+ appCode: App;
4
+ }): QueryObserverResult<TData, TError>;
@@ -0,0 +1,13 @@
1
+ import { useQuery } from "@tanstack/react-query";
2
+ import { odeServices } from "edifice-ts-client";
3
+ function useConf({
4
+ appCode
5
+ }) {
6
+ return useQuery({
7
+ queryKey: ["conf"],
8
+ queryFn: async () => await odeServices.conf().getConf(appCode)
9
+ });
10
+ }
11
+ export {
12
+ useConf as default
13
+ };
@@ -0,0 +1 @@
1
+ export { default as useConversation } from './useConversation';
@@ -0,0 +1,6 @@
1
+ declare const useConversation: () => {
2
+ readonly messages: number;
3
+ readonly msgLink: string;
4
+ readonly zimbraWorkflow: boolean | Record<string, boolean> | undefined;
5
+ };
6
+ export default useConversation;
@@ -0,0 +1,43 @@
1
+ import { useState, useEffect } from "react";
2
+ import { odeServices } from "edifice-ts-client";
3
+ import useHasWorkflow from "../useHasWorkflow/useHasWorkflow.js";
4
+ const useConversation = () => {
5
+ const zimbraWorkflow = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"), zimbraPreauth = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"), [messages, setMessages] = useState(0), [msgLink, setMsgLink] = useState(""), queryParams = {
6
+ unread: !0,
7
+ _: (/* @__PURE__ */ new Date()).getTime()
8
+ }, refreshMails = async () => {
9
+ const url = zimbraWorkflow ? "/zimbra/count/INBOX" : "/conversation/count/INBOX";
10
+ try {
11
+ const {
12
+ count
13
+ } = await odeServices.http().get(url, {
14
+ queryParams
15
+ });
16
+ setMessages(count ?? 0);
17
+ } catch (error) {
18
+ console.error(error), setMessages(0);
19
+ }
20
+ }, goToMessagerie = async () => {
21
+ const defaultLink = "/zimbra/zimbra";
22
+ try {
23
+ const {
24
+ preference
25
+ } = await odeServices.http().get("/userbook/preference/zimbra"), isExpertMode = preference ? JSON.parse(preference).modeExpert : !1;
26
+ setMsgLink(isExpertMode && zimbraPreauth ? "/zimbra/preauth" : window.location.origin + defaultLink);
27
+ } catch (error) {
28
+ console.error(error), setMsgLink(window.location.origin + defaultLink);
29
+ }
30
+ };
31
+ return useEffect(() => {
32
+ refreshMails();
33
+ }, []), useEffect(() => {
34
+ goToMessagerie();
35
+ }, []), {
36
+ messages,
37
+ msgLink,
38
+ zimbraWorkflow
39
+ };
40
+ }, useConversation$1 = useConversation;
41
+ export {
42
+ useConversation$1 as default
43
+ };
@@ -0,0 +1 @@
1
+ export { default as useCookiesConsent } from './useCookiesConsent';
@@ -0,0 +1,5 @@
1
+ export default function useCookiesConsent(): {
2
+ showCookiesConsent: boolean;
3
+ handleConsultCookies: () => void;
4
+ handleCloseCookiesConsent: () => void;
5
+ };
@@ -0,0 +1,29 @@
1
+ import { useState, useEffect } from "react";
2
+ import usePreferences from "../usePreferences/usePreferences.js";
3
+ function useCookiesConsent() {
4
+ const [showCookiesConsent, setShowCookiesConsent] = useState(!1), {
5
+ getPreference,
6
+ savePreference
7
+ } = usePreferences("rgpdCookies");
8
+ return useEffect(() => {
9
+ (async () => {
10
+ const res = await getPreference();
11
+ setShowCookiesConsent(res === null ? !0 : res.showInfoTip);
12
+ })();
13
+ }, []), {
14
+ showCookiesConsent,
15
+ handleConsultCookies: () => {
16
+ document.location.href = "/userbook/mon-compte", savePreference({
17
+ showInfoTip: !1
18
+ }), setShowCookiesConsent(!1);
19
+ },
20
+ handleCloseCookiesConsent: () => {
21
+ savePreference({
22
+ showInfoTip: !1
23
+ }), setShowCookiesConsent(!1);
24
+ }
25
+ };
26
+ }
27
+ export {
28
+ useCookiesConsent as default
29
+ };
@@ -0,0 +1,2 @@
1
+ export { default as useDate } from './useDate';
2
+ export * from './useDate';
@@ -0,0 +1,13 @@
1
+ export type MongoDate = {
2
+ $date: number | string;
3
+ };
4
+ export type IsoDate = string;
5
+ /** Date formats we are going to deal with. */
6
+ export type CoreDate = IsoDate | MongoDate;
7
+ /**
8
+ * Hook to compute user-friendly dates from various format.
9
+ */
10
+ export default function useDate(): {
11
+ fromNow: (date: CoreDate) => string;
12
+ formatDate: (date: CoreDate, format?: string) => string;
13
+ };
@@ -0,0 +1,65 @@
1
+ import { useCallback } from "react";
2
+ import dayjs from "dayjs";
3
+ import customParseFormat from "dayjs/plugin/customParseFormat.js";
4
+ import localizedFormat from "dayjs/plugin/localizedFormat.js";
5
+ import relativeTime from "dayjs/plugin/relativeTime.js";
6
+ import "dayjs/locale/de.js";
7
+ import "dayjs/locale/es.js";
8
+ import "dayjs/locale/fr.js";
9
+ import "dayjs/locale/it.js";
10
+ import "dayjs/locale/pt.js";
11
+ import { useOdeClient } from "../OdeClientProvider/OdeClientProvider.js";
12
+ dayjs.extend(relativeTime);
13
+ dayjs.extend(customParseFormat);
14
+ dayjs.extend(localizedFormat);
15
+ function useDate() {
16
+ const {
17
+ currentLanguage
18
+ } = useOdeClient(), parseDate = useCallback((date, lang) => {
19
+ if (date.length < 11) return dayjs(date, ["YYYY-MM-DD"], lang);
20
+ if (date.split("").findIndex((char) => "0" > char || char > "9") < 0)
21
+ return dayjs(Number.parseInt(date)).locale(currentLanguage);
22
+ {
23
+ let day = dayjs(date).locale(currentLanguage);
24
+ return day.isValid() || (day = dayjs(date, ["YYYY-MM-DD HH:mm:ss.SSS"]).locale(currentLanguage)), day;
25
+ }
26
+ }, [currentLanguage]), fromNow = useCallback((date) => {
27
+ let computedDate = dayjs();
28
+ try {
29
+ return typeof date > "u" ? "" : (typeof date == "string" ? computedDate = parseDate(date) : typeof date == "number" ? computedDate = dayjs(date).locale(currentLanguage) : typeof date.$date == "number" ? computedDate = dayjs(new Date(date.$date)).locale(currentLanguage) : typeof date.$date == "string" && (computedDate = parseDate(date.$date)), computedDate.isValid() ? computedDate.fromNow() : "");
30
+ } catch {
31
+ return "";
32
+ }
33
+ }, [currentLanguage, parseDate]), formatDate = useCallback((date, format = "short") => {
34
+ let computedDate = dayjs();
35
+ try {
36
+ if (typeof date > "u")
37
+ return "";
38
+ typeof date == "string" ? computedDate = parseDate(date) : typeof date.$date == "number" ? computedDate = dayjs(new Date(date.$date)).locale(currentLanguage) : typeof date.$date == "string" && (computedDate = parseDate(date.$date));
39
+ let dayjsFormat = "";
40
+ switch (format) {
41
+ case "short":
42
+ dayjsFormat = "L";
43
+ break;
44
+ case "long":
45
+ dayjsFormat = "LL";
46
+ break;
47
+ case "abbr":
48
+ dayjsFormat = "ll";
49
+ break;
50
+ default:
51
+ dayjsFormat = format;
52
+ }
53
+ return computedDate.isValid() ? computedDate.locale(currentLanguage).format(dayjsFormat) : "";
54
+ } catch {
55
+ return "";
56
+ }
57
+ }, [currentLanguage, parseDate]);
58
+ return {
59
+ fromNow,
60
+ formatDate
61
+ };
62
+ }
63
+ export {
64
+ useDate as default
65
+ };
@@ -0,0 +1 @@
1
+ export { default as useHasWorkflow } from './useHasWorkflow';
@@ -0,0 +1 @@
1
+ export default function useHasWorkflow(workflow: string | string[]): (boolean | undefined) | Record<string, boolean>;
@@ -0,0 +1,22 @@
1
+ import { useState, useEffect } from "react";
2
+ import { odeServices } from "edifice-ts-client";
3
+ import { useMockedData } from "../../utils/MockedDataProvider/MockedDataProvider.js";
4
+ function useHasWorkflow(workflow) {
5
+ const mock = useMockedData(), [state, setState] = useState();
6
+ return useEffect(() => {
7
+ (async () => {
8
+ let response;
9
+ if (mock != null && mock.hasWorkflow)
10
+ if (typeof workflow == "string")
11
+ response = await mock.hasWorkflow(workflow);
12
+ else
13
+ throw "not.implemented.yet)";
14
+ else
15
+ typeof workflow == "string" ? response = await odeServices.rights().sessionHasWorkflowRight(workflow) : response = await odeServices.rights().sessionHasWorkflowRights(workflow);
16
+ setState(response);
17
+ })();
18
+ }, [workflow, mock]), state;
19
+ }
20
+ export {
21
+ useHasWorkflow as default
22
+ };
@@ -0,0 +1 @@
1
+ export { default as useHeader } from './useHeader';
@@ -0,0 +1,5 @@
1
+ import { IUserInfo } from 'edifice-ts-client';
2
+ export default function useHeader({ user, avatar, }: {
3
+ user: IUserInfo | undefined;
4
+ avatar: string;
5
+ }): any;