@instructure/canvas-rce 5.15.4 → 5.15.5

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 (487) hide show
  1. package/es/bridge/Bridge.d.ts +179 -0
  2. package/es/bridge/index.d.ts +3 -0
  3. package/es/canvasFileBrowser/FileBrowser.d.ts +80 -0
  4. package/es/canvasFileBrowser/en-US.d.ts +0 -0
  5. package/es/common/FlashAlert.d.ts +41 -0
  6. package/es/common/browser.d.ts +5 -0
  7. package/es/common/fileUrl.d.ts +13 -0
  8. package/es/common/getCookie.d.ts +7 -0
  9. package/es/common/incremental-loading/LoadMoreButton.d.ts +12 -0
  10. package/es/common/incremental-loading/LoadingIndicator.d.ts +2 -0
  11. package/es/common/incremental-loading/LoadingStatus.d.ts +6 -0
  12. package/es/common/incremental-loading/index.d.ts +4 -0
  13. package/es/common/incremental-loading/useIncrementalLoading.d.ts +10 -0
  14. package/es/common/indicate.d.ts +1 -0
  15. package/es/common/mimeClass.d.ts +5 -0
  16. package/es/common/natcompare.d.ts +8 -0
  17. package/es/defaultTinymceConfig.d.ts +44 -0
  18. package/es/elementDenylist.d.ts +2 -0
  19. package/es/enhance-user-content/doc_previews.d.ts +10 -0
  20. package/es/enhance-user-content/enhance_user_content.d.ts +1 -0
  21. package/es/enhance-user-content/external_links.d.ts +2 -0
  22. package/es/enhance-user-content/index.d.ts +4 -0
  23. package/es/enhance-user-content/instructure_helper.d.ts +6 -0
  24. package/es/enhance-user-content/jqueryish_funcs.d.ts +9 -0
  25. package/es/enhance-user-content/mathml.d.ts +28 -0
  26. package/es/enhance-user-content/media_comment_thumbnail.d.ts +1 -0
  27. package/es/format-message.d.ts +3 -0
  28. package/es/getThemeVars.d.ts +5 -0
  29. package/es/getTranslations.d.ts +2 -0
  30. package/es/index.d.ts +59 -0
  31. package/es/rce/AlertMessageArea.d.ts +16 -0
  32. package/es/rce/DraggingBlocker.d.ts +8 -0
  33. package/es/rce/KeyboardShortcutModal.d.ts +12 -0
  34. package/es/rce/RCE.d.ts +130 -0
  35. package/es/rce/RCEGlobals.d.ts +21 -0
  36. package/es/rce/RCEVariants.d.ts +17 -0
  37. package/es/rce/RCEWrapper.d.ts +428 -0
  38. package/es/rce/RCEWrapper.utils.d.ts +24 -0
  39. package/es/rce/RCEWrapperProps.d.ts +175 -0
  40. package/es/rce/RceHtmlEditor.d.ts +8 -0
  41. package/es/rce/ResizeHandle.d.ts +15 -0
  42. package/es/rce/RestoreAutoSaveModal.d.ts +15 -0
  43. package/es/rce/ShowOnFocusButton/index.d.ts +22 -0
  44. package/es/rce/StatusBar.d.ts +38 -0
  45. package/es/rce/alertHandler.d.ts +19 -0
  46. package/es/rce/contentInsertion.d.ts +8 -0
  47. package/es/rce/contentInsertionUtils.d.ts +20 -0
  48. package/es/rce/contentRendering.d.ts +9 -0
  49. package/es/rce/customEvents.d.ts +1 -0
  50. package/es/rce/editorLanguage.d.ts +10 -0
  51. package/es/rce/indicatorRegion.d.ts +6 -0
  52. package/es/rce/normalizeLocale.d.ts +1 -0
  53. package/es/rce/normalizeProps.d.ts +3 -0
  54. package/es/rce/plugins/instructure-ui-icons/plugin.d.ts +1 -0
  55. package/es/rce/plugins/instructure_color/clickCallback.d.ts +7 -0
  56. package/es/rce/plugins/instructure_color/components/ColorPicker.d.ts +30 -0
  57. package/es/rce/plugins/instructure_color/components/ColorPopup.d.ts +12 -0
  58. package/es/rce/plugins/instructure_color/components/colorUtils.d.ts +4 -0
  59. package/es/rce/plugins/instructure_color/plugin.d.ts +1 -0
  60. package/es/rce/plugins/instructure_condensed_buttons/core/ListUtils.d.ts +16 -0
  61. package/es/rce/plugins/instructure_condensed_buttons/plugin.d.ts +1 -0
  62. package/es/rce/plugins/instructure_condensed_buttons/ui/alignment-button.d.ts +2 -0
  63. package/es/rce/plugins/instructure_condensed_buttons/ui/directionality-button.d.ts +1 -0
  64. package/es/rce/plugins/instructure_condensed_buttons/ui/indent-outdent-button.d.ts +2 -0
  65. package/es/rce/plugins/instructure_condensed_buttons/ui/list-button.d.ts +8 -0
  66. package/es/rce/plugins/instructure_condensed_buttons/ui/subscript-superscript-button.d.ts +2 -0
  67. package/es/rce/plugins/instructure_documents/clickCallback.d.ts +1 -0
  68. package/es/rce/plugins/instructure_documents/components/DocumentsPanel.d.ts +18 -0
  69. package/es/rce/plugins/instructure_documents/components/Link.d.ts +28 -0
  70. package/es/rce/plugins/instructure_documents/plugin.d.ts +1 -0
  71. package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.d.ts +2 -0
  72. package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedPreference.d.ts +4 -0
  73. package/es/rce/plugins/instructure_equation/EquationEditorModal/index.d.ts +51 -0
  74. package/es/rce/plugins/instructure_equation/EquationEditorModal/latexTextareaUtil.d.ts +16 -0
  75. package/es/rce/plugins/instructure_equation/EquationEditorModal/parseLatex.d.ts +12 -0
  76. package/es/rce/plugins/instructure_equation/EquationEditorModal/styles.d.ts +6 -0
  77. package/es/rce/plugins/instructure_equation/EquationEditorToolbar/buttons.d.ts +17 -0
  78. package/es/rce/plugins/instructure_equation/EquationEditorToolbar/index.d.ts +10 -0
  79. package/es/rce/plugins/instructure_equation/MathIcon/index.d.ts +10 -0
  80. package/es/rce/plugins/instructure_equation/MathIcon/svgs.d.ts +216 -0
  81. package/es/rce/plugins/instructure_equation/clickCallback.d.ts +1 -0
  82. package/es/rce/plugins/instructure_equation/mathlive/index.d.ts +1 -0
  83. package/es/rce/plugins/instructure_equation/plugin.d.ts +1 -0
  84. package/es/rce/plugins/instructure_fullscreen/plugin.d.ts +1 -0
  85. package/es/rce/plugins/instructure_html_view/clickCallback.d.ts +1 -0
  86. package/es/rce/plugins/instructure_html_view/plugin.d.ts +1 -0
  87. package/es/rce/plugins/instructure_icon_maker/clickCallback.d.ts +5 -0
  88. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ColorSection.d.ts +6 -0
  89. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/CreateIconMakerForm.d.ts +10 -0
  90. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Footer.d.ts +11 -0
  91. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Group.d.ts +6 -0
  92. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Header.d.ts +8 -0
  93. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.d.ts +29 -0
  94. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageOptions.d.ts +56 -0
  95. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageSection.d.ts +20 -0
  96. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ModeSelect.d.ts +3 -0
  97. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/MultiColor/index.d.ts +23 -0
  98. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/MultiColor/svg.d.ts +91 -0
  99. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGList.d.ts +154 -0
  100. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGThumbnail.d.ts +28 -0
  101. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/index.d.ts +29 -0
  102. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/svg.d.ts +97 -0
  103. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Upload.d.ts +26 -0
  104. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/index.d.ts +1 -0
  105. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/propTypes.d.ts +21 -0
  106. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/utils.d.ts +5 -0
  107. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Preview.d.ts +4 -0
  108. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ShapeSection.d.ts +5 -0
  109. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/TextSection.d.ts +5 -0
  110. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/index.d.ts +1 -0
  111. package/es/rce/plugins/instructure_icon_maker/components/IconMakerTray.d.ts +22 -0
  112. package/es/rce/plugins/instructure_icon_maker/components/SavedIconMakerList.d.ts +30 -0
  113. package/es/rce/plugins/instructure_icon_maker/plugin.d.ts +1 -0
  114. package/es/rce/plugins/instructure_icon_maker/reducers/imageSection.d.ts +97 -0
  115. package/es/rce/plugins/instructure_icon_maker/reducers/svgSettings.d.ts +40 -0
  116. package/es/rce/plugins/instructure_icon_maker/registerEditToolbar.d.ts +3 -0
  117. package/es/rce/plugins/instructure_icon_maker/svg/clipPath.d.ts +2 -0
  118. package/es/rce/plugins/instructure_icon_maker/svg/constants.d.ts +66 -0
  119. package/es/rce/plugins/instructure_icon_maker/svg/font.d.ts +2 -0
  120. package/es/rce/plugins/instructure_icon_maker/svg/image.d.ts +44 -0
  121. package/es/rce/plugins/instructure_icon_maker/svg/index.d.ts +9 -0
  122. package/es/rce/plugins/instructure_icon_maker/svg/metadata.d.ts +2 -0
  123. package/es/rce/plugins/instructure_icon_maker/svg/settings.d.ts +6 -0
  124. package/es/rce/plugins/instructure_icon_maker/svg/shape.d.ts +14 -0
  125. package/es/rce/plugins/instructure_icon_maker/svg/text.d.ts +28 -0
  126. package/es/rce/plugins/instructure_icon_maker/svg/utils.d.ts +3 -0
  127. package/es/rce/plugins/instructure_icon_maker/utils/IconMakerClose.d.ts +2 -0
  128. package/es/rce/plugins/instructure_icon_maker/utils/IconMakerFormHasChanges.d.ts +35 -0
  129. package/es/rce/plugins/instructure_icon_maker/utils/addIconMakerAttributes.d.ts +4 -0
  130. package/es/rce/plugins/instructure_icon_maker/utils/iconValidation.d.ts +6 -0
  131. package/es/rce/plugins/instructure_icon_maker/utils/iconsLabels.d.ts +356 -0
  132. package/es/rce/plugins/instructure_icon_maker/utils/useDebouncedValue.d.ts +1 -0
  133. package/es/rce/plugins/instructure_image/ImageEmbedOptions.d.ts +49 -0
  134. package/es/rce/plugins/instructure_image/ImageList/Image.d.ts +33 -0
  135. package/es/rce/plugins/instructure_image/ImageList/index.d.ts +33 -0
  136. package/es/rce/plugins/instructure_image/ImageOptionsTray/TrayController.d.ts +17 -0
  137. package/es/rce/plugins/instructure_image/ImageOptionsTray/index.d.ts +29 -0
  138. package/es/rce/plugins/instructure_image/Images/index.d.ts +24 -0
  139. package/es/rce/plugins/instructure_image/clickCallback.d.ts +1 -0
  140. package/es/rce/plugins/instructure_image/plugin.d.ts +1 -0
  141. package/es/rce/plugins/instructure_links/clickCallback.d.ts +1 -0
  142. package/es/rce/plugins/instructure_links/components/AccordionSection.d.ts +18 -0
  143. package/es/rce/plugins/instructure_links/components/CollectionPanel.d.ts +113 -0
  144. package/es/rce/plugins/instructure_links/components/Link.d.ts +24 -0
  145. package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/LinkOptionsDialogController.d.ts +18 -0
  146. package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/index.d.ts +24 -0
  147. package/es/rce/plugins/instructure_links/components/LinkOptionsTray/LinkOptionsTrayController.d.ts +14 -0
  148. package/es/rce/plugins/instructure_links/components/LinkOptionsTray/index.d.ts +18 -0
  149. package/es/rce/plugins/instructure_links/components/LinkSet.d.ts +46 -0
  150. package/es/rce/plugins/instructure_links/components/LinksPanel.d.ts +107 -0
  151. package/es/rce/plugins/instructure_links/components/NavigationPanel.d.ts +17 -0
  152. package/es/rce/plugins/instructure_links/components/NoResults.d.ts +13 -0
  153. package/es/rce/plugins/instructure_links/components/propTypes.d.ts +102 -0
  154. package/es/rce/plugins/instructure_links/plugin.d.ts +1 -0
  155. package/es/rce/plugins/instructure_links/validateURL.d.ts +6 -0
  156. package/es/rce/plugins/instructure_media_embed/clickCallback.d.ts +1 -0
  157. package/es/rce/plugins/instructure_media_embed/components/Embed.d.ts +11 -0
  158. package/es/rce/plugins/instructure_media_embed/plugin.d.ts +1 -0
  159. package/es/rce/plugins/instructure_paste/pasteMenuCommand.d.ts +1 -0
  160. package/es/rce/plugins/instructure_paste/plugin.d.ts +1 -0
  161. package/es/rce/plugins/instructure_rce_external_tools/ExternalToolsEnv.d.ts +30 -0
  162. package/es/rce/plugins/instructure_rce_external_tools/RceToolWrapper.d.ts +77 -0
  163. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.d.ts +45 -0
  164. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.d.ts +8 -0
  165. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogTray.d.ts +14 -0
  166. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.d.ts +18 -0
  167. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionItem.d.ts +12 -0
  168. package/es/rce/plugins/instructure_rce_external_tools/components/util/ExpandoText.d.ts +7 -0
  169. package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.d.ts +10 -0
  170. package/es/rce/plugins/instructure_rce_external_tools/constants.d.ts +9 -0
  171. package/es/rce/plugins/instructure_rce_external_tools/dialog-helper.d.ts +3 -0
  172. package/es/rce/plugins/instructure_rce_external_tools/helpers/tags.d.ts +18 -0
  173. package/es/rce/plugins/instructure_rce_external_tools/jquery/jquery.dropdownList.d.ts +27 -0
  174. package/es/rce/plugins/instructure_rce_external_tools/lti11-content-items/RceLti11ContentItem.d.ts +72 -0
  175. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/Lti13ContentItemJson.d.ts +55 -0
  176. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/RceLti13ContentItem.d.ts +31 -0
  177. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/BaseLinkContentItem.d.ts +19 -0
  178. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/HtmlFragmentContentItem.d.ts +11 -0
  179. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/ImageContentItem.d.ts +17 -0
  180. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/LinkContentItem.d.ts +7 -0
  181. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/ResourceLinkContentItem.d.ts +9 -0
  182. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/processEditorContentItems.d.ts +13 -0
  183. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/rceLti13ContentItemFromJson.d.ts +12 -0
  184. package/es/rce/plugins/instructure_rce_external_tools/plugin.d.ts +9 -0
  185. package/es/rce/plugins/instructure_rce_external_tools/util/addParentFrameContextToUrl.d.ts +1 -0
  186. package/es/rce/plugins/instructure_rce_external_tools/util/externalToolsForToolbar.d.ts +2 -0
  187. package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.d.ts +17 -0
  188. package/es/rce/plugins/instructure_record/AudioOptionsTray/index.d.ts +41 -0
  189. package/es/rce/plugins/instructure_record/MediaPanel/index.d.ts +18 -0
  190. package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.d.ts +27 -0
  191. package/es/rce/plugins/instructure_record/VideoOptionsTray/index.d.ts +45 -0
  192. package/es/rce/plugins/instructure_record/clickCallback.d.ts +2 -0
  193. package/es/rce/plugins/instructure_record/mediaTranslations.d.ts +69 -0
  194. package/es/rce/plugins/instructure_record/plugin.d.ts +1 -0
  195. package/es/rce/plugins/instructure_search_and_replace/clickCallback.d.ts +2 -0
  196. package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTray.d.ts +14 -0
  197. package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTrayController.d.ts +12 -0
  198. package/es/rce/plugins/instructure_search_and_replace/getSelectionContext.d.ts +1 -0
  199. package/es/rce/plugins/instructure_search_and_replace/plugin.d.ts +1 -0
  200. package/es/rce/plugins/instructure_studio_media_options/plugin.d.ts +1 -0
  201. package/es/rce/plugins/instructure_wordcount/clickCallback.d.ts +6 -0
  202. package/es/rce/plugins/instructure_wordcount/components/WordCountModal.d.ts +8 -0
  203. package/es/rce/plugins/instructure_wordcount/plugin.d.ts +1 -0
  204. package/es/rce/plugins/instructure_wordcount/utils/countContent.d.ts +11 -0
  205. package/es/rce/plugins/instructure_wordcount/utils/tableContent.d.ts +12 -0
  206. package/es/rce/plugins/shared/CanvasContentTray.d.ts +66 -0
  207. package/es/rce/plugins/shared/CheckerboardStyling.d.ts +5 -0
  208. package/es/rce/plugins/shared/ColorInput.d.ts +11 -0
  209. package/es/rce/plugins/shared/ConditionalTooltip.d.ts +12 -0
  210. package/es/rce/plugins/shared/ContentSelection.d.ts +75 -0
  211. package/es/rce/plugins/shared/DimensionUtils.d.ts +14 -0
  212. package/es/rce/plugins/shared/DimensionsInput/DimensionInput.d.ts +13 -0
  213. package/es/rce/plugins/shared/DimensionsInput/index.d.ts +36 -0
  214. package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.d.ts +25 -0
  215. package/es/rce/plugins/shared/ErrorBoundary.d.ts +16 -0
  216. package/es/rce/plugins/shared/EventUtils.d.ts +8 -0
  217. package/es/rce/plugins/shared/Filter.d.ts +18 -0
  218. package/es/rce/plugins/shared/FixedContentTray.d.ts +46 -0
  219. package/es/rce/plugins/shared/ImageCropper/DirectionRegion.d.ts +13 -0
  220. package/es/rce/plugins/shared/ImageCropper/Modal.d.ts +40 -0
  221. package/es/rce/plugins/shared/ImageCropper/Preview.d.ts +21 -0
  222. package/es/rce/plugins/shared/ImageCropper/constants.d.ts +22 -0
  223. package/es/rce/plugins/shared/ImageCropper/controls/CustomNumberInput.d.ts +30 -0
  224. package/es/rce/plugins/shared/ImageCropper/controls/ResetControls.d.ts +14 -0
  225. package/es/rce/plugins/shared/ImageCropper/controls/RotationControls.d.ts +18 -0
  226. package/es/rce/plugins/shared/ImageCropper/controls/ShapeControls.d.ts +12 -0
  227. package/es/rce/plugins/shared/ImageCropper/controls/ZoomControls.d.ts +18 -0
  228. package/es/rce/plugins/shared/ImageCropper/controls/index.d.ts +5 -0
  229. package/es/rce/plugins/shared/ImageCropper/controls/useDebouncedNumericValue.d.ts +7 -0
  230. package/es/rce/plugins/shared/ImageCropper/controls/utils.d.ts +4 -0
  231. package/es/rce/plugins/shared/ImageCropper/imageCropUtils.d.ts +8 -0
  232. package/es/rce/plugins/shared/ImageCropper/index.d.ts +1 -0
  233. package/es/rce/plugins/shared/ImageCropper/propTypes.d.ts +9 -0
  234. package/es/rce/plugins/shared/ImageCropper/reducers/imageCropper.d.ts +18 -0
  235. package/es/rce/plugins/shared/ImageCropper/shape.d.ts +10 -0
  236. package/es/rce/plugins/shared/ImageCropper/svg/index.d.ts +1 -0
  237. package/es/rce/plugins/shared/ImageCropper/svg/shape.d.ts +4 -0
  238. package/es/rce/plugins/shared/ImageCropper/svg/utils.d.ts +1 -0
  239. package/es/rce/plugins/shared/ImageCropper/useKeyMouseEvents.d.ts +1 -0
  240. package/es/rce/plugins/shared/ImageCropper/useMouseWheel.d.ts +1 -0
  241. package/es/rce/plugins/shared/ImageOptionsForm.d.ts +19 -0
  242. package/es/rce/plugins/shared/LinkDisplay.d.ts +9 -0
  243. package/es/rce/plugins/shared/PreviewIcon.d.ts +50 -0
  244. package/es/rce/plugins/shared/Previewable.d.ts +2 -0
  245. package/es/rce/plugins/shared/RceFileBrowser.d.ts +19 -0
  246. package/es/rce/plugins/shared/StoreContext.d.ts +15 -0
  247. package/es/rce/plugins/shared/StudioLtiSupportUtils.d.ts +37 -0
  248. package/es/rce/plugins/shared/UnknownFileTypePanel.d.ts +2 -0
  249. package/es/rce/plugins/shared/Upload/CanvasContentPanel.d.ts +29 -0
  250. package/es/rce/plugins/shared/Upload/CategoryProcessor.d.ts +3 -0
  251. package/es/rce/plugins/shared/Upload/ComputerPanel.d.ts +32 -0
  252. package/es/rce/plugins/shared/Upload/PanelFilter.d.ts +10 -0
  253. package/es/rce/plugins/shared/Upload/SvgCategoryProcessor.d.ts +4 -0
  254. package/es/rce/plugins/shared/Upload/UploadFile.d.ts +24 -0
  255. package/es/rce/plugins/shared/Upload/UploadFileModal.d.ts +3 -0
  256. package/es/rce/plugins/shared/Upload/UrlPanel.d.ts +12 -0
  257. package/es/rce/plugins/shared/Upload/UsageRightsSelectBox.d.ts +23 -0
  258. package/es/rce/plugins/shared/Upload/doFileUpload.d.ts +17 -0
  259. package/es/rce/plugins/shared/Upload/index.d.ts +2 -0
  260. package/es/rce/plugins/shared/ai_tools/AIResponseModal.d.ts +10 -0
  261. package/es/rce/plugins/shared/ai_tools/AIToolsTray.d.ts +18 -0
  262. package/es/rce/plugins/shared/ai_tools/aiicons.d.ts +7 -0
  263. package/es/rce/plugins/shared/ai_tools/index.d.ts +3 -0
  264. package/es/rce/plugins/shared/buildDownloadUrl.d.ts +1 -0
  265. package/es/rce/plugins/shared/canvasContentUtils.d.ts +138 -0
  266. package/es/rce/plugins/shared/compressionUtils.d.ts +11 -0
  267. package/es/rce/plugins/shared/dateUtils.d.ts +1 -0
  268. package/es/rce/plugins/shared/do-fetch-api-effect/defaultFetchOptions.d.ts +4 -0
  269. package/es/rce/plugins/shared/do-fetch-api-effect/doFetchApi.d.ts +22 -0
  270. package/es/rce/plugins/shared/do-fetch-api-effect/get-cookie.d.ts +7 -0
  271. package/es/rce/plugins/shared/do-fetch-api-effect/index.d.ts +7 -0
  272. package/es/rce/plugins/shared/do-fetch-api-effect/parse-link-header.d.ts +12 -0
  273. package/es/rce/plugins/shared/do-fetch-api-effect/query-string-encoding.d.ts +6 -0
  274. package/es/rce/plugins/shared/fileShape.d.ts +116 -0
  275. package/es/rce/plugins/shared/fileTypeUtils.d.ts +28 -0
  276. package/es/rce/plugins/shared/fileUtils.d.ts +1 -0
  277. package/es/rce/plugins/shared/linkUtils.d.ts +5 -0
  278. package/es/rce/plugins/shared/round.d.ts +1 -0
  279. package/es/rce/plugins/shared/trayUtils.d.ts +3 -0
  280. package/es/rce/plugins/shared/useDataUrl.d.ts +8 -0
  281. package/es/rce/plugins/shared/useFilterSettings.d.ts +10 -0
  282. package/es/rce/plugins/tinymce-a11y-checker/components/ColorField.d.ts +33 -0
  283. package/es/rce/plugins/tinymce-a11y-checker/components/checker.d.ts +53 -0
  284. package/es/rce/plugins/tinymce-a11y-checker/components/color-picker.d.ts +2 -0
  285. package/es/rce/plugins/tinymce-a11y-checker/components/placeholder-svg.d.ts +2 -0
  286. package/es/rce/plugins/tinymce-a11y-checker/components/pointer.d.ts +2 -0
  287. package/es/rce/plugins/tinymce-a11y-checker/node-checker.d.ts +1 -0
  288. package/es/rce/plugins/tinymce-a11y-checker/plugin.d.ts +2 -0
  289. package/es/rce/plugins/tinymce-a11y-checker/rules/adjacent-links.d.ts +19 -0
  290. package/es/rce/plugins/tinymce-a11y-checker/rules/headings-sequence.d.ts +18 -0
  291. package/es/rce/plugins/tinymce-a11y-checker/rules/headings-start-at-h2.d.ts +28 -0
  292. package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt-filename.d.ts +25 -0
  293. package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt-length.d.ts +18 -0
  294. package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt.d.ts +25 -0
  295. package/es/rce/plugins/tinymce-a11y-checker/rules/index.d.ts +198 -0
  296. package/es/rce/plugins/tinymce-a11y-checker/rules/large-text-contrast.d.ts +19 -0
  297. package/es/rce/plugins/tinymce-a11y-checker/rules/list-structure.d.ts +20 -0
  298. package/es/rce/plugins/tinymce-a11y-checker/rules/paragraphs-for-headings.d.ts +18 -0
  299. package/es/rce/plugins/tinymce-a11y-checker/rules/small-text-contrast.d.ts +19 -0
  300. package/es/rce/plugins/tinymce-a11y-checker/rules/table-caption.d.ts +17 -0
  301. package/es/rce/plugins/tinymce-a11y-checker/rules/table-header-scope.d.ts +18 -0
  302. package/es/rce/plugins/tinymce-a11y-checker/rules/table-header.d.ts +18 -0
  303. package/es/rce/plugins/tinymce-a11y-checker/utils/colors.d.ts +10 -0
  304. package/es/rce/plugins/tinymce-a11y-checker/utils/describe.d.ts +1 -0
  305. package/es/rce/plugins/tinymce-a11y-checker/utils/dom.d.ts +11 -0
  306. package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.d.ts +7 -0
  307. package/es/rce/plugins/tinymce-a11y-checker/utils/rgb-hex.d.ts +2 -0
  308. package/es/rce/plugins/tinymce-a11y-checker/utils/strings.d.ts +2 -0
  309. package/es/rce/root.d.ts +3 -0
  310. package/es/rce/sanitizePlugins.d.ts +1 -0
  311. package/es/rce/style.d.ts +64 -0
  312. package/es/rce/tinyRCE.d.ts +2 -0
  313. package/es/rce/tinymce.oxide.content.min.css.d.ts +2 -0
  314. package/es/rce/tinymce.oxide.skin.min.css.d.ts +2 -0
  315. package/es/rce/transformContent.d.ts +13 -0
  316. package/es/rce/types.d.ts +96 -0
  317. package/es/rce/userOS.d.ts +4 -0
  318. package/es/rce/wrapInitCb.d.ts +2 -0
  319. package/es/rcs/api.d.ts +117 -0
  320. package/es/rcs/buildError.d.ts +4 -0
  321. package/es/rcs/fake.d.ts +111 -0
  322. package/es/sidebar/actions/all_files.d.ts +5 -0
  323. package/es/sidebar/actions/data.d.ts +29 -0
  324. package/es/sidebar/actions/documents.d.ts +42 -0
  325. package/es/sidebar/actions/files.d.ts +66 -0
  326. package/es/sidebar/actions/filter.d.ts +25 -0
  327. package/es/sidebar/actions/flickr.d.ts +20 -0
  328. package/es/sidebar/actions/images.d.ts +63 -0
  329. package/es/sidebar/actions/links.d.ts +4 -0
  330. package/es/sidebar/actions/media.d.ts +46 -0
  331. package/es/sidebar/actions/session.d.ts +2 -0
  332. package/es/sidebar/actions/ui.d.ts +22 -0
  333. package/es/sidebar/actions/upload.d.ts +114 -0
  334. package/es/sidebar/containers/Sidebar.d.ts +1 -0
  335. package/es/sidebar/containers/sidebarHandlers.d.ts +33 -0
  336. package/es/sidebar/dragHtml.d.ts +1 -0
  337. package/es/sidebar/reducers/all_files.d.ts +1 -0
  338. package/es/sidebar/reducers/collection.d.ts +1 -0
  339. package/es/sidebar/reducers/collections.d.ts +9 -0
  340. package/es/sidebar/reducers/documents.d.ts +1 -0
  341. package/es/sidebar/reducers/files.d.ts +1 -0
  342. package/es/sidebar/reducers/filter.d.ts +7 -0
  343. package/es/sidebar/reducers/flickr.d.ts +1 -0
  344. package/es/sidebar/reducers/folder.d.ts +25 -0
  345. package/es/sidebar/reducers/folders.d.ts +1 -0
  346. package/es/sidebar/reducers/images.d.ts +1 -0
  347. package/es/sidebar/reducers/index.d.ts +44 -0
  348. package/es/sidebar/reducers/media.d.ts +1 -0
  349. package/es/sidebar/reducers/newPageLinkExpanded.d.ts +1 -0
  350. package/es/sidebar/reducers/noop.d.ts +1 -0
  351. package/es/sidebar/reducers/rootFolderId.d.ts +1 -0
  352. package/es/sidebar/reducers/session.d.ts +1 -0
  353. package/es/sidebar/reducers/ui.d.ts +6 -0
  354. package/es/sidebar/reducers/upload.d.ts +11 -0
  355. package/es/sidebar/store/configureStore.d.ts +3 -0
  356. package/es/sidebar/store/initialState.d.ts +22 -0
  357. package/es/translations/locales/ab.d.ts +1 -0
  358. package/es/translations/locales/ar.d.ts +1 -0
  359. package/es/translations/locales/ca.d.ts +1 -0
  360. package/es/translations/locales/cs.d.ts +1 -0
  361. package/es/translations/locales/cs_CZ.d.ts +1 -0
  362. package/es/translations/locales/cy.d.ts +1 -0
  363. package/es/translations/locales/da-x-k12.d.ts +1 -0
  364. package/es/translations/locales/da.d.ts +1 -0
  365. package/es/translations/locales/da_DK.d.ts +1 -0
  366. package/es/translations/locales/de.d.ts +1 -0
  367. package/es/translations/locales/el.d.ts +1 -0
  368. package/es/translations/locales/en-AU-x-unimelb.d.ts +1 -0
  369. package/es/translations/locales/en-GB-x-ukhe.d.ts +1 -0
  370. package/es/translations/locales/en.d.ts +1 -0
  371. package/es/translations/locales/en_AU.d.ts +1 -0
  372. package/es/translations/locales/en_CA.d.ts +1 -0
  373. package/es/translations/locales/en_CY.d.ts +1 -0
  374. package/es/translations/locales/en_GB.d.ts +1 -0
  375. package/es/translations/locales/en_NZ.d.ts +1 -0
  376. package/es/translations/locales/en_SE.d.ts +1 -0
  377. package/es/translations/locales/en_US.d.ts +1 -0
  378. package/es/translations/locales/es.d.ts +1 -0
  379. package/es/translations/locales/es_ES.d.ts +1 -0
  380. package/es/translations/locales/es_GT.d.ts +1 -0
  381. package/es/translations/locales/fa_IR.d.ts +1 -0
  382. package/es/translations/locales/fi.d.ts +1 -0
  383. package/es/translations/locales/fr.d.ts +1 -0
  384. package/es/translations/locales/fr_CA.d.ts +1 -0
  385. package/es/translations/locales/ga.d.ts +1 -0
  386. package/es/translations/locales/he.d.ts +1 -0
  387. package/es/translations/locales/hi.d.ts +1 -0
  388. package/es/translations/locales/ht.d.ts +1 -0
  389. package/es/translations/locales/hu.d.ts +1 -0
  390. package/es/translations/locales/hu_HU.d.ts +1 -0
  391. package/es/translations/locales/hy.d.ts +1 -0
  392. package/es/translations/locales/id.d.ts +1 -0
  393. package/es/translations/locales/id_ID.d.ts +1 -0
  394. package/es/translations/locales/is.d.ts +1 -0
  395. package/es/translations/locales/it.d.ts +1 -0
  396. package/es/translations/locales/ja.d.ts +1 -0
  397. package/es/translations/locales/ko.d.ts +1 -0
  398. package/es/translations/locales/ko_KR.d.ts +1 -0
  399. package/es/translations/locales/lt.d.ts +1 -0
  400. package/es/translations/locales/lt_LT.d.ts +1 -0
  401. package/es/translations/locales/mi.d.ts +1 -0
  402. package/es/translations/locales/mn_MN.d.ts +1 -0
  403. package/es/translations/locales/ms.d.ts +1 -0
  404. package/es/translations/locales/nb-x-k12.d.ts +1 -0
  405. package/es/translations/locales/nb.d.ts +1 -0
  406. package/es/translations/locales/nl.d.ts +1 -0
  407. package/es/translations/locales/nl_NL.d.ts +1 -0
  408. package/es/translations/locales/nn.d.ts +1 -0
  409. package/es/translations/locales/pl.d.ts +1 -0
  410. package/es/translations/locales/pt.d.ts +1 -0
  411. package/es/translations/locales/pt_BR.d.ts +1 -0
  412. package/es/translations/locales/ro.d.ts +1 -0
  413. package/es/translations/locales/ru.d.ts +1 -0
  414. package/es/translations/locales/se.d.ts +1 -0
  415. package/es/translations/locales/sl.d.ts +1 -0
  416. package/es/translations/locales/sv-x-k12.d.ts +1 -0
  417. package/es/translations/locales/sv.d.ts +1 -0
  418. package/es/translations/locales/sv_SE.d.ts +1 -0
  419. package/es/translations/locales/tg.d.ts +1 -0
  420. package/es/translations/locales/th.d.ts +1 -0
  421. package/es/translations/locales/th_TH.d.ts +1 -0
  422. package/es/translations/locales/tl_PH.d.ts +1 -0
  423. package/es/translations/locales/tr.d.ts +1 -0
  424. package/es/translations/locales/uk_UA.d.ts +1 -0
  425. package/es/translations/locales/vi.d.ts +1 -0
  426. package/es/translations/locales/vi_VN.d.ts +1 -0
  427. package/es/translations/locales/zh-Hans.d.ts +1 -0
  428. package/es/translations/locales/zh-Hant.d.ts +1 -0
  429. package/es/translations/locales/zh.d.ts +1 -0
  430. package/es/translations/locales/zh_HK.d.ts +1 -0
  431. package/es/translations/locales/zh_TW.Big5.d.ts +1 -0
  432. package/es/translations/locales/zh_TW.d.ts +1 -0
  433. package/es/translations/tinymce/ar_SA.d.ts +0 -0
  434. package/es/translations/tinymce/bg_BG.d.ts +0 -0
  435. package/es/translations/tinymce/ca.d.ts +0 -0
  436. package/es/translations/tinymce/cs.d.ts +0 -0
  437. package/es/translations/tinymce/cy.d.ts +0 -0
  438. package/es/translations/tinymce/da.d.ts +0 -0
  439. package/es/translations/tinymce/de.d.ts +0 -0
  440. package/es/translations/tinymce/el.d.ts +0 -0
  441. package/es/translations/tinymce/en_GB.d.ts +0 -0
  442. package/es/translations/tinymce/es.d.ts +0 -0
  443. package/es/translations/tinymce/fa_IR.d.ts +0 -0
  444. package/es/translations/tinymce/fi.d.ts +0 -0
  445. package/es/translations/tinymce/fr_FR.d.ts +0 -0
  446. package/es/translations/tinymce/ga.d.ts +0 -0
  447. package/es/translations/tinymce/he_IL.d.ts +0 -0
  448. package/es/translations/tinymce/hu_HU.d.ts +0 -0
  449. package/es/translations/tinymce/hy.d.ts +0 -0
  450. package/es/translations/tinymce/id.d.ts +0 -0
  451. package/es/translations/tinymce/it.d.ts +0 -0
  452. package/es/translations/tinymce/ja.d.ts +0 -0
  453. package/es/translations/tinymce/ko_KR.d.ts +0 -0
  454. package/es/translations/tinymce/nb_NO.d.ts +0 -0
  455. package/es/translations/tinymce/nl.d.ts +0 -0
  456. package/es/translations/tinymce/pl.d.ts +0 -0
  457. package/es/translations/tinymce/pt_BR.d.ts +0 -0
  458. package/es/translations/tinymce/pt_PT.d.ts +0 -0
  459. package/es/translations/tinymce/ro.d.ts +0 -0
  460. package/es/translations/tinymce/ru.d.ts +0 -0
  461. package/es/translations/tinymce/ru_RU.d.ts +0 -0
  462. package/es/translations/tinymce/sl.d.ts +0 -0
  463. package/es/translations/tinymce/sr.d.ts +0 -0
  464. package/es/translations/tinymce/sv_SE.d.ts +0 -0
  465. package/es/translations/tinymce/th.d.ts +0 -0
  466. package/es/translations/tinymce/tr_TR.d.ts +0 -0
  467. package/es/translations/tinymce/uk_UA.d.ts +0 -0
  468. package/es/translations/tinymce/vi_VN.d.ts +0 -0
  469. package/es/translations/tinymce/zh_CN.d.ts +0 -0
  470. package/es/translations/tinymce/zh_TW.d.ts +0 -0
  471. package/es/util/DeepPartialNullable.d.ts +15 -0
  472. package/es/util/ExtractRequired.d.ts +42 -0
  473. package/es/util/TypedDict.d.ts +99 -0
  474. package/es/util/assertNever.d.ts +24 -0
  475. package/es/util/elem-util.d.ts +6 -0
  476. package/es/util/encrypted-storage.d.ts +9 -0
  477. package/es/util/file-url-util.d.ts +1 -0
  478. package/es/util/fullscreenHelpers.d.ts +6 -0
  479. package/es/util/instui-icon-helper.d.ts +19 -0
  480. package/es/util/loadingPlaceholder.d.ts +39 -0
  481. package/es/util/simpleCache.d.ts +11 -0
  482. package/es/util/string-util.d.ts +20 -0
  483. package/es/util/textarea-editing-util.d.ts +35 -0
  484. package/es/util/tinymce-plugin-util.d.ts +16 -0
  485. package/es/util/url-util.d.ts +32 -0
  486. package/package.json +2 -3
  487. package/scripts/build.js +0 -40
@@ -0,0 +1,130 @@
1
+ import React from 'react';
2
+ import RCEWrapper from './RCEWrapper';
3
+ import type { ExternalToolsConfig, LtiToolsPropType } from './RCEWrapperProps';
4
+ import { RCEVariant } from './RCEVariants';
5
+ import '@instructure/canvas-theme';
6
+ import type { Editor } from 'tinymce';
7
+ import type { EditorOptions, RCETrayProps } from './types';
8
+ declare const RCE: React.ForwardRefExoticComponent<RCEPropTypes & React.RefAttributes<RCEWrapper>>;
9
+ export interface RCEPropTypes {
10
+ /**
11
+ * do you want the rce to autosave content to localStorage, and
12
+ * how long should it be until it's deleted.
13
+ * If autosave is enabled, call yourRef.RCEClosed() if the user
14
+ * exits the page normally (e.g. via Cancel or Save)
15
+ */
16
+ autosave?: {
17
+ enabled?: boolean;
18
+ maxAge?: number;
19
+ interval?: number;
20
+ };
21
+ /**
22
+ * the protocol://domain:port for this RCE's canvas
23
+ */
24
+ canvasOrigin?: string;
25
+ /**
26
+ * the initial content
27
+ */
28
+ defaultContent?: string;
29
+ /**
30
+ * tinymce configuration. See defaultTinymceConfig for all the defaults
31
+ * and RCEWrapper.EditorOptions for stuff you may want to include
32
+ */
33
+ editorOptions?: EditorOptions;
34
+ /**
35
+ * there's an open bug when RCE is rendered in a Modal form
36
+ * and the user navigates to the KB Shortcut Helper Button using
37
+ * Apple VoiceOver navigation keys (VO+arrows)
38
+ * as a workaround, the KB Shortcut Helper Button may be supressed
39
+ * setting renderKBShortcutModal to false
40
+ */
41
+ renderKBShortcutModal?: boolean;
42
+ /**
43
+ * height of the RCE. if a number, in px
44
+ */
45
+ height?: number | string;
46
+ /**
47
+ * array of URLs to high-contrast css
48
+ */
49
+ highContrastCSS?: string[];
50
+ /**
51
+ * if true, do not load the plugin that provides the media toolbar and menu items
52
+ */
53
+ instRecordDisabled?: boolean;
54
+ /**
55
+ * locale of the user's language
56
+ */
57
+ language?: string;
58
+ /**
59
+ * function that returns the element where screenreader alerts go
60
+ */
61
+ liveRegion?: () => HTMLElement | null | undefined;
62
+ /**
63
+ * array of lti tools available to the user
64
+ * {id, favorite} are all that's required, ther fields are ignored
65
+ */
66
+ ltiTools?: LtiToolsPropType;
67
+ /**
68
+ * The maximum number of RCEs that will render on page load.
69
+ * Any more than this will be deferred until it is nearly
70
+ * scrolled into view.
71
+ * if isNaN or <=0, render them all
72
+ */
73
+ maxInitRenderedRCEs?: number;
74
+ /**
75
+ * name:value pairs of attributes to add to the textarea
76
+ * tinymce creates as the backing store of the RCE
77
+ */
78
+ mirroredAttrs?: {
79
+ [key: string]: string;
80
+ };
81
+ /**
82
+ * is this RCE readonly?
83
+ */
84
+ readOnly?: boolean;
85
+ /**
86
+ * id put on the generated textarea
87
+ */
88
+ textareaId: string;
89
+ /**
90
+ * class name added to the generated textarea
91
+ */
92
+ textareaClassName?: string;
93
+ /**
94
+ * properties necessary for the RCE to us the RCS
95
+ * if missing, RCE features that require the RCS are omitted
96
+ */
97
+ rcsProps?: RCETrayProps;
98
+ /**
99
+ * enable the custom icon maker feature (temporary until the feature is forced on)
100
+ */
101
+ use_rce_icon_maker?: boolean;
102
+ /**
103
+ * record of feature statuses from containing page
104
+ */
105
+ features?: {
106
+ [key: string]: boolean;
107
+ };
108
+ /**
109
+ * configurable default timeout value for flash alerts
110
+ */
111
+ flashAlertTimeout?: number;
112
+ /**
113
+ * user's timezone
114
+ */
115
+ timezone?: string;
116
+ /**
117
+ * RCE variant. See RCEVariants.ts for details
118
+ */
119
+ variant?: RCEVariant;
120
+ /**
121
+ * user's cache key to be used to encrypt and decrypt autosaved content
122
+ */
123
+ userCacheKey?: string;
124
+ onFocus?: (rce: RCEWrapper) => void;
125
+ onBlur?: (event: React.FocusEvent<HTMLElement>) => void;
126
+ onInit?: (editor: Editor) => void;
127
+ onContentChange?: (content: string) => void;
128
+ externalToolsConfig?: ExternalToolsConfig;
129
+ }
130
+ export default RCE;
@@ -0,0 +1,21 @@
1
+ export default instance;
2
+ export type Features = {
3
+ media_links_use_attachment_id: boolean;
4
+ file_verifiers_for_quiz_links: boolean;
5
+ };
6
+ declare const instance: RCEGlobals;
7
+ /**
8
+ * @typedef {Object} Features
9
+ * @property {boolean} media_links_use_attachment_id
10
+ * @property {boolean} file_verifiers_for_quiz_links
11
+ */
12
+ declare class RCEGlobals {
13
+ _data: {
14
+ features: {};
15
+ config: {};
16
+ } | undefined;
17
+ getFeatures(): Features;
18
+ setFeatures(features: any): void;
19
+ getConfig(): {};
20
+ setConfig(config: any): void;
21
+ }
@@ -0,0 +1,17 @@
1
+ type MenuBarSpec = string;
2
+ type MenusSpec = Record<string, {
3
+ title: string;
4
+ items: string;
5
+ }>;
6
+ interface ToolbarGroupSetting {
7
+ name: string;
8
+ items: string[];
9
+ }
10
+ type StatusBarFeature = 'ai_tools' | 'keyboard_shortcuts' | 'a11y_checker' | 'word_count' | 'html_view' | 'fullscreen' | 'resize_handle';
11
+ export declare const RCEVariantValues: readonly ["full", "lite", "text-only", "text-block"];
12
+ export type RCEVariant = (typeof RCEVariantValues)[number];
13
+ export declare function getMenubarForVariant(variant: RCEVariant): MenuBarSpec;
14
+ export declare function getMenuForVariant(variant: RCEVariant): MenusSpec;
15
+ export declare function getToolbarForVariant(variant: RCEVariant, ltiToolFavorites?: string[]): ToolbarGroupSetting[];
16
+ export declare function getStatusBarFeaturesForVariant(variant: RCEVariant, ai_text_tools?: boolean): StatusBarFeature[];
17
+ export {};
@@ -0,0 +1,428 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { Editor } from '@tinymce/tinymce-react';
3
+ import tinymce from 'tinymce';
4
+ import type { Editor as TinyMCEEditor } from 'tinymce';
5
+ import { PlaceHoldableThingInfo } from '../util/loadingPlaceholder';
6
+ import EncryptedStorage from '../util/encrypted-storage';
7
+ import { RCEVariant } from './RCEVariants';
8
+ import { mergeMenu, mergeMenuItems, mergePlugins, mergeToolbar, parsePluginsToExclude } from './RCEWrapper.utils';
9
+ import { AlertMessage, EditorOptions, RCETrayProps } from './types';
10
+ export declare function storageAvailable(): boolean | undefined;
11
+ interface RCEWrapperProps {
12
+ ai_text_tools?: boolean;
13
+ autosave?: {
14
+ enabled?: boolean;
15
+ maxAge?: number;
16
+ interval?: number;
17
+ };
18
+ canvasOrigin: string;
19
+ defaultContent?: string;
20
+ editorOptions: EditorOptions;
21
+ editorView?: string;
22
+ features: Record<string, unknown>;
23
+ handleUnmount?: () => void;
24
+ instRecordDisabled?: boolean;
25
+ language?: string;
26
+ liveRegion?: HTMLElement | null | (() => HTMLElement | null | undefined);
27
+ ltiToolFavorites?: string[];
28
+ maxInitRenderedRCEs: number;
29
+ name?: string;
30
+ onBlur?: (event: React.FocusEvent<HTMLElement>) => void;
31
+ onContentChange?: (content: string) => void;
32
+ onFocus?: (rce: RCEWrapper) => void;
33
+ onInitted?: (editor: TinyMCEEditor) => void;
34
+ onRemove?: (arg1: RCEWrapper) => void;
35
+ readOnly?: boolean;
36
+ renderKBShortcutModal?: boolean;
37
+ textareaClassName?: string;
38
+ textareaId?: string;
39
+ tinymce: typeof tinymce;
40
+ trayProps: RCETrayProps;
41
+ use_rce_icon_maker?: boolean;
42
+ userCacheKey?: string;
43
+ }
44
+ interface RCEWrapperState {
45
+ a11yErrorsCount: number;
46
+ AIToolsOpen: boolean;
47
+ AITToolsFocusReturn: unknown;
48
+ alertId?: number;
49
+ announcement: string | null;
50
+ autoSavedContent: string;
51
+ confirmAutoSave: boolean;
52
+ editor: Editor;
53
+ editorView: string;
54
+ fullscreenState: {
55
+ prevHeight: number;
56
+ isTinyFullscreen?: boolean;
57
+ };
58
+ height: string;
59
+ id: string;
60
+ KBShortcutFocusReturn?: HTMLElement;
61
+ KBShortcutModalOpen: boolean;
62
+ messages: AlertMessage[];
63
+ path: string[];
64
+ shouldShowEditor: boolean;
65
+ shouldShowOnFocusButton: boolean;
66
+ wordCount: number;
67
+ }
68
+ declare class RCEWrapper extends React.Component<RCEWrapperProps, RCEWrapperState> {
69
+ _destroyCalled: boolean;
70
+ _editorPlaceholderRef: React.RefObject<HTMLElement>;
71
+ _elementRef: React.RefObject<HTMLElement>;
72
+ _focusRegio?: Element;
73
+ _focusRegion?: Element;
74
+ _mceSerializedInitialHtmlCached?: string | null;
75
+ _showOnFocusButton?: HTMLElement;
76
+ _statusBarId: string;
77
+ _textareaEl?: HTMLTextAreaElement;
78
+ AIToolsTray?: ReactNode;
79
+ editor: TinyMCEEditor | null;
80
+ initialContent?: string;
81
+ intersectionObserver?: IntersectionObserver;
82
+ language: string;
83
+ ltiToolFavorites: unknown[];
84
+ mutationObserver?: MutationObserver;
85
+ pendingEventHandlers: Array<() => void>;
86
+ pluginsToExclude: string[];
87
+ resizeObserver: ResizeObserver;
88
+ storage?: EncryptedStorage;
89
+ variant: RCEVariant;
90
+ style: {
91
+ css: string;
92
+ };
93
+ insert_code: typeof this.insertCode;
94
+ get_code: typeof this.getCode;
95
+ set_code: typeof this.setCode;
96
+ static getByEditor(editor: TinyMCEEditor): any;
97
+ static propTypes: {
98
+ autosave: import("prop-types").Requireable<import("prop-types").InferProps<{
99
+ enabled: import("prop-types").Requireable<boolean>;
100
+ maxAge: import("prop-types").Requireable<number>;
101
+ }>>;
102
+ canvasOrigin: import("prop-types").Requireable<string>;
103
+ defaultContent: import("prop-types").Requireable<string>;
104
+ editorOptions: import("prop-types").Requireable<import("prop-types").InferProps<{
105
+ height: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
106
+ toolbar: import("prop-types").Requireable<(import("prop-types").InferProps<{
107
+ name: import("prop-types").Validator<string>;
108
+ items: import("prop-types").Validator<(string | null | undefined)[]>;
109
+ }> | null | undefined)[]>;
110
+ menu: import("prop-types").Requireable<{
111
+ [x: string]: import("prop-types").InferProps<{
112
+ title: import("prop-types").Requireable<string>;
113
+ items: import("prop-types").Validator<string>;
114
+ }> | null | undefined;
115
+ }>;
116
+ plugins: import("prop-types").Requireable<(string | null | undefined)[]>;
117
+ readonly: import("prop-types").Requireable<boolean>;
118
+ selector: import("prop-types").Requireable<string>;
119
+ init_instance_callback: import("prop-types").Requireable<(...args: any[]) => any>;
120
+ }>>;
121
+ handleUnmount: import("prop-types").Requireable<(...args: any[]) => any>;
122
+ editorView: import("prop-types").Requireable<string>;
123
+ renderKBShortcutModal: import("prop-types").Requireable<boolean>;
124
+ id: import("prop-types").Requireable<string>;
125
+ language: import("prop-types").Requireable<string>;
126
+ liveRegion: import("prop-types").Validator<(...args: any[]) => any>;
127
+ ltiTools: import("prop-types").Requireable<(import("prop-types").InferProps<{
128
+ id: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
129
+ favorite: import("prop-types").Requireable<boolean>;
130
+ on_by_default: import("prop-types").Requireable<boolean>;
131
+ name: import("prop-types").Requireable<string>;
132
+ description: import("prop-types").Requireable<string>;
133
+ icon_url: import("prop-types").Requireable<string>;
134
+ height: import("prop-types").Requireable<number>;
135
+ width: import("prop-types").Requireable<number>;
136
+ use_tray: import("prop-types").Requireable<boolean>;
137
+ canvas_icon_class: import("prop-types").Requireable<any>;
138
+ }> | null | undefined)[]>;
139
+ onContentChange: import("prop-types").Requireable<(...args: any[]) => any>;
140
+ onFocus: import("prop-types").Requireable<(...args: any[]) => any>;
141
+ onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
142
+ onInitted: import("prop-types").Requireable<(...args: any[]) => any>;
143
+ onRemove: import("prop-types").Requireable<(...args: any[]) => any>;
144
+ textareaClassName: import("prop-types").Requireable<string>;
145
+ textareaId: import("prop-types").Validator<string>;
146
+ readOnly: import("prop-types").Requireable<boolean>;
147
+ tinymce: import("prop-types").Requireable<object>;
148
+ trayProps: import("prop-types").Requireable<import("prop-types").InferProps<{
149
+ canUploadFiles: import("prop-types").Validator<boolean>;
150
+ contextId: import("prop-types").Validator<string>;
151
+ contextType: import("prop-types").Validator<string>;
152
+ containingContext: import("prop-types").Requireable<import("prop-types").InferProps<{
153
+ contextType: import("prop-types").Validator<string>;
154
+ contextId: import("prop-types").Validator<string>;
155
+ userId: import("prop-types").Validator<string>;
156
+ }>>;
157
+ filesTabDisabled: import("prop-types").Requireable<boolean>;
158
+ host: import("prop-types").Requireable<string>;
159
+ jwt: import("prop-types").Requireable<string>;
160
+ refreshToken: import("prop-types").Requireable<(...args: any[]) => any>;
161
+ source: import("prop-types").Requireable<import("prop-types").InferProps<{
162
+ fetchImages: import("prop-types").Validator<(...args: any[]) => any>;
163
+ }>>;
164
+ themeUrl: import("prop-types").Requireable<string>;
165
+ }>>;
166
+ toolbar: import("prop-types").Requireable<(import("prop-types").InferProps<{
167
+ name: import("prop-types").Validator<string>;
168
+ items: import("prop-types").Validator<(string | null | undefined)[]>;
169
+ }> | null | undefined)[]>;
170
+ menu: import("prop-types").Requireable<{
171
+ [x: string]: import("prop-types").InferProps<{
172
+ title: import("prop-types").Requireable<string>;
173
+ items: import("prop-types").Validator<string>;
174
+ }> | null | undefined;
175
+ }>;
176
+ instRecordDisabled: import("prop-types").Requireable<boolean>;
177
+ highContrastCSS: import("prop-types").Requireable<(string | null | undefined)[]>;
178
+ maxInitRenderedRCEs: import("prop-types").Requireable<number>;
179
+ use_rce_icon_maker: import("prop-types").Requireable<boolean>;
180
+ features: import("prop-types").Requireable<{
181
+ [x: string]: boolean | null | undefined;
182
+ }>;
183
+ flashAlertTimeout: import("prop-types").Requireable<number>;
184
+ timezone: import("prop-types").Requireable<string>;
185
+ userCacheKey: import("prop-types").Requireable<string>;
186
+ externalToolsConfig: import("prop-types").Requireable<import("prop-types").InferProps<{
187
+ ltiIframeAllowances: import("prop-types").Requireable<(string | null | undefined)[]>;
188
+ containingCanvasLtiToolId: import("prop-types").Requireable<string>;
189
+ resourceSelectionUrlOverride: import("prop-types").Requireable<string>;
190
+ isA2StudentView: import("prop-types").Requireable<boolean>;
191
+ maxMruTools: import("prop-types").Requireable<number>;
192
+ }>>;
193
+ ai_text_tools: import("prop-types").Requireable<boolean>;
194
+ variant: import("prop-types").Requireable<"full" | "lite" | "text-only" | "text-block">;
195
+ };
196
+ static defaultProps: {
197
+ trayProps: null;
198
+ autosave: {
199
+ enabled: boolean;
200
+ };
201
+ highContrastCSS: never[];
202
+ ltiTools: never[];
203
+ maxInitRenderedRCEs: number;
204
+ features: {};
205
+ timezone: string;
206
+ canvasOrigin: string;
207
+ variant: string;
208
+ };
209
+ static skinCssInjected: boolean;
210
+ constructor(props: RCEWrapperProps);
211
+ _tagTinymceAuxDiv(): void;
212
+ _myTinymceAuxDiv(): HTMLElement | null;
213
+ getRequiredFeatureStatuses(): {
214
+ new_math_equation_handling: unknown;
215
+ explicit_latex_typesetting: unknown;
216
+ rce_transform_loaded_content: unknown;
217
+ media_links_use_attachment_id: unknown;
218
+ file_verifiers_for_quiz_links: unknown;
219
+ rce_find_replace: unknown;
220
+ consolidated_media_player: unknown;
221
+ };
222
+ getRequiredConfigValues(): {
223
+ locale: string;
224
+ flashAlertTimeout: any;
225
+ timezone: any;
226
+ };
227
+ getCanvasUrl(): string;
228
+ getResourceIdentifiers(): {
229
+ resourceType: any;
230
+ resourceId: any;
231
+ };
232
+ getCode(): string;
233
+ checkReadyToGetCode(promptFunc: any): boolean;
234
+ setCode(newContent: string): void;
235
+ RCEClosed(): void;
236
+ indicateEditor(element: Element): void;
237
+ contentInserted(element: Element): void;
238
+ sizeEditorForContent(elem: Element): void;
239
+ checkImageLoadError(element: Element): void;
240
+ insertCode(code: string): void;
241
+ replaceCode(code: string): void;
242
+ insertEmbedCode(code: string): void;
243
+ insertImage(image: unknown): {
244
+ imageElem: any;
245
+ loadingPromise: Promise<void>;
246
+ };
247
+ insertImagePlaceholder(fileMetaProps: PlaceHoldableThingInfo): Promise<HTMLElement>;
248
+ insertVideo(video: unknown): void;
249
+ insertAudio(audio: unknown): void;
250
+ insertMathEquation(tex: unknown): void;
251
+ removePlaceholders(name: string): void;
252
+ insertLink(link: unknown): void;
253
+ existingContentToLink(): any;
254
+ existingContentToLinkIsImg(): any;
255
+ tinymceOn(tinymceEventName: any, handler: any): void;
256
+ mceInstance(): TinyMCEEditor;
257
+ onTinyMCEInstance(command: string, ...args: any[]): void;
258
+ destroy(): void;
259
+ onRemove: () => void;
260
+ getTextarea(): HTMLTextAreaElement | null;
261
+ textareaValue(): string;
262
+ get id(): string;
263
+ getHtmlEditorStorage(): any;
264
+ toggleView: (newView: string) => void;
265
+ toggleFullscreen: () => void;
266
+ _isFullscreen(): boolean;
267
+ _enterFullscreen(): void;
268
+ _exitFullscreen(): void;
269
+ _onFullscreenChange: (event: any) => void;
270
+ _handleFullscreenResize: () => void;
271
+ _getStatusBarHeight(): number;
272
+ _setHeight(newHeight: number): void;
273
+ focus(): void;
274
+ focusCurrentView(): void;
275
+ is_dirty(): boolean;
276
+ /**
277
+ * Holds a copy of the initial content of the editor as serialized by tinyMCE to normalize it.
278
+ */
279
+ get _mceSerializedInitialHtml(): string;
280
+ isHtmlView(): boolean;
281
+ isHidden(): boolean;
282
+ get iframe(): HTMLIFrameElement;
283
+ get focused(): boolean;
284
+ handleFocus(): void;
285
+ contentTrayClosing: boolean;
286
+ handleContentTrayClosing(isClosing: boolean): void;
287
+ blurTimer: number;
288
+ handleBlur(event: React.FocusEvent<HTMLElement>): void;
289
+ handleFocusRCE: () => void;
290
+ handleBlurRCE: (event: any) => void;
291
+ handleFocusEditor: (_event: Event) => void;
292
+ handleBlurEditor: (event: React.FocusEvent<HTMLElement>) => void;
293
+ call(methodName: string, ...args: any[]): any;
294
+ handleKey: (event: KeyboardEvent) => void;
295
+ handleClickFullscreen: () => void;
296
+ handleInputChange: () => void;
297
+ onInit: (_event: Event, editor: TinyMCEEditor) => void;
298
+ /**
299
+ * Fix keyboard navigation in the expanded toolbar
300
+ *
301
+ * NOTE: This is a workaround for https://github.com/tinymce/tinymce/issues/8618
302
+ * and should be removed once that issue is resolved and the tinymce dependency is updated to include it.
303
+ */
304
+ fixToolbarKeyboardNavigation: () => void;
305
+ /**
306
+ * Sets up selection saving and restoration logic.
307
+ *
308
+ * There are certain actions a user can take when the RCE is not focused that clear the selection inside the
309
+ * editor, such as invoking the Find feature of the browser. If the user then tries to insert content without
310
+ * going back to the editor, the content would be inserted at the top of the RCE, instead of where their cursor
311
+ * was.
312
+ *
313
+ * This method adds logic that saves and restores the selection to work around the issue.
314
+ *
315
+ * @private
316
+ */
317
+ _setupSelectionSaving: (editor: any) => void;
318
+ announcing: number;
319
+ announceContextToolbars(editor: TinyMCEEditor): void;
320
+ initAutoSave: (editor: TinyMCEEditor) => void;
321
+ cleanupAutoSave: (deleteAll?: boolean) => void;
322
+ restoreAutoSave: (ans: any) => void;
323
+ getAutoSaved(key: string): any;
324
+ get isAutoSaving(): boolean | null | undefined;
325
+ get autoSaveKey(): string;
326
+ doAutoSave: (e: any, retry?: boolean) => void;
327
+ onWordCountUpdate: (e: {
328
+ wordCount: {
329
+ words: number;
330
+ };
331
+ }) => void;
332
+ onNodeChange: (e: any) => void;
333
+ onEditorChange: (content: string, _editor: unknown) => void;
334
+ onResize: (_e: unknown, coordinates: {
335
+ deltaY: number;
336
+ }) => void;
337
+ onA11yChecker: (triggerElementId: string) => void;
338
+ checkAccessibility: () => void;
339
+ openKBShortcutModal: () => void;
340
+ closeKBShortcutModal: () => void;
341
+ KBShortcutModalExited: () => void;
342
+ handleAIClick: () => void;
343
+ closeAITools: () => void;
344
+ AIToolsExited: () => void;
345
+ handleInsertAIContent: (content: string) => void;
346
+ handleReplaceAIContent: (content: string) => void;
347
+ getCurrentContentForAI: () => {
348
+ type: string;
349
+ content: string;
350
+ };
351
+ setFocusAbilityForHeader: (focusable: boolean) => void;
352
+ componentWillUnmount(): void;
353
+ wrapOptions(options?: {}): {
354
+ readonly: boolean | undefined;
355
+ theme: string;
356
+ height: any;
357
+ language: string | undefined;
358
+ document_base_url: string;
359
+ block_formats: any;
360
+ setup: (editor: TinyMCEEditor) => void;
361
+ content_css: any;
362
+ content_style: string;
363
+ menubar: string;
364
+ menu: Record<string, {
365
+ items: string;
366
+ }>;
367
+ toolbar: {
368
+ items: string[];
369
+ name: string;
370
+ }[];
371
+ contextmenu: string;
372
+ toolbar_mode: string;
373
+ toolbar_sticky: boolean;
374
+ plugins: string[];
375
+ textpattern_patterns: {
376
+ start: string;
377
+ cmd: string;
378
+ }[];
379
+ auto_focus: boolean;
380
+ body_class: string;
381
+ directionality: string;
382
+ branding: boolean;
383
+ browser_spellcheck: boolean;
384
+ convert_urls: boolean;
385
+ font_formats: string;
386
+ language_load: boolean;
387
+ language_url: string;
388
+ toolbar_ticky: boolean;
389
+ mobile: {
390
+ theme: string;
391
+ };
392
+ preview_styles: string;
393
+ remove_script_host: boolean;
394
+ resize: boolean;
395
+ skin: boolean;
396
+ statusbar: boolean;
397
+ valid_elements: string;
398
+ extended_valid_elements: string;
399
+ non_empty_elements: string;
400
+ target_list: boolean;
401
+ link_title: boolean;
402
+ default_link_target: string;
403
+ style_formats: {
404
+ title: string;
405
+ items: {
406
+ title: string;
407
+ format: string;
408
+ }[];
409
+ }[];
410
+ };
411
+ handleTextareaChange: () => void;
412
+ unhandleTextareaChange(): void;
413
+ registerTextareaChange(): void;
414
+ componentDidMount(): void;
415
+ componentDidUpdate(prevProps: RCEWrapperProps, prevState: RCEWrapperState): void;
416
+ editorReallyDidMount(): void;
417
+ setEditorView(view: any): void;
418
+ addAlert: (alert: AlertMessage) => void;
419
+ removeAlert: (messageId: number) => void;
420
+ /**
421
+ * Used for reseting the value during tests
422
+ */
423
+ resetAlertId: () => void;
424
+ renderHtmlEditor(): React.JSX.Element;
425
+ render(): React.JSX.Element;
426
+ }
427
+ export default RCEWrapper;
428
+ export { mergeMenuItems, mergeMenu, mergeToolbar, mergePlugins, parsePluginsToExclude };
@@ -0,0 +1,24 @@
1
+ export declare function mergeMenuItems(standard: string, custom?: string): string;
2
+ export declare function mergeMenu(standard: Record<string, {
3
+ items: string;
4
+ }>, custom: Record<string, {
5
+ items: string;
6
+ }>): Record<string, {
7
+ items: string;
8
+ }>;
9
+ export declare function mergeToolbar(standard: Array<{
10
+ items: string[];
11
+ name: string;
12
+ }>, custom: Array<{
13
+ items: string[];
14
+ name: string;
15
+ }>): {
16
+ items: string[];
17
+ name: string;
18
+ }[];
19
+ export declare function mergePlugins(standard: string[], custom?: string[], exclusions?: string[]): string[];
20
+ export declare function focusToolbar(el: HTMLElement): void;
21
+ export declare function focusFirstMenuButton(el: HTMLElement): void;
22
+ export declare function isElementWithinTable(node: Element | null): boolean;
23
+ export declare function parsePluginsToExclude(plugins: string[]): string[];
24
+ export declare function patchAutosavedContent(content: string, asText?: boolean): string | null;