@instructure/canvas-rce 5.14.2 → 5.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/DEVELOPMENT.md +1 -1
  3. package/es/bridge/Bridge.js +10 -17
  4. package/es/canvasFileBrowser/FileBrowser.js +10 -19
  5. package/es/common/FlashAlert.js +8 -11
  6. package/es/common/fileUrl.js +6 -10
  7. package/es/common/incremental-loading/LoadMoreButton.js +3 -4
  8. package/es/common/incremental-loading/LoadingStatus.js +4 -11
  9. package/es/common/indicate.js +1 -2
  10. package/es/defaultTinymceConfig.js +1 -1
  11. package/es/enhance-user-content/doc_previews.js +10 -10
  12. package/es/enhance-user-content/enhance_user_content.js +4 -7
  13. package/es/enhance-user-content/external_links.js +1 -1
  14. package/es/enhance-user-content/instructure_helper.js +11 -17
  15. package/es/enhance-user-content/mathml.js +15 -27
  16. package/es/enhance-user-content/media_comment_thumbnail.js +3 -10
  17. package/es/format-message.js +2 -2
  18. package/es/index.js +3 -5
  19. package/es/rce/AlertMessageArea.js +15 -16
  20. package/es/rce/KeyboardShortcutModal.js +2 -2
  21. package/es/rce/RCE.js +6 -8
  22. package/es/rce/RCEVariants.js +2 -4
  23. package/es/rce/RCEWrapper.js +397 -289
  24. package/es/rce/RCEWrapper.utils.js +131 -0
  25. package/es/rce/RCEWrapperProps.js +2 -3
  26. package/es/rce/RceHtmlEditor.js +12 -11
  27. package/es/rce/ResizeHandle.js +1 -2
  28. package/es/rce/ShowOnFocusButton/index.js +2 -2
  29. package/es/rce/StatusBar.js +5 -10
  30. package/es/rce/contentInsertion.js +1 -2
  31. package/es/rce/contentRendering.js +6 -5
  32. package/es/rce/editorLanguage.js +1 -1
  33. package/es/rce/indicatorRegion.js +1 -2
  34. package/es/rce/normalizeProps.js +4 -4
  35. package/es/rce/plugins/instructure_color/clickCallback.js +2 -4
  36. package/es/rce/plugins/instructure_color/components/ColorPicker.js +17 -22
  37. package/es/rce/plugins/instructure_color/components/ColorPopup.js +7 -8
  38. package/es/rce/plugins/instructure_condensed_buttons/ui/list-button.js +4 -10
  39. package/es/rce/plugins/instructure_condensed_buttons/ui/subscript-superscript-button.js +1 -1
  40. package/es/rce/plugins/instructure_documents/components/Link.js +1 -2
  41. package/es/rce/plugins/instructure_equation/EquationEditorModal/index.js +5 -8
  42. package/es/rce/plugins/instructure_equation/EquationEditorModal/latexTextareaUtil.js +3 -3
  43. package/es/rce/plugins/instructure_equation/EquationEditorModal/parseLatex.js +3 -3
  44. package/es/rce/plugins/instructure_equation/EquationEditorToolbar/buttons.js +2 -2
  45. package/es/rce/plugins/instructure_equation/EquationEditorToolbar/index.js +9 -11
  46. package/es/rce/plugins/instructure_equation/MathIcon/index.js +3 -4
  47. package/es/rce/plugins/instructure_equation/mathlive/index.js +167 -16
  48. package/es/rce/plugins/instructure_fullscreen/plugin.js +0 -2
  49. package/es/rce/plugins/instructure_icon_maker/clickCallback.js +3 -4
  50. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ColorSection.js +46 -49
  51. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/CreateIconMakerForm.js +9 -10
  52. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Footer.js +10 -11
  53. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Group.js +5 -6
  54. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Header.js +7 -8
  55. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.js +7 -9
  56. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageOptions.js +19 -26
  57. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageSection.js +8 -12
  58. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ModeSelect.js +6 -7
  59. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/MultiColor/index.js +5 -6
  60. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGList.js +6 -7
  61. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGThumbnail.js +8 -10
  62. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/index.js +5 -6
  63. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/svg.js +32 -80
  64. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Upload.js +7 -8
  65. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/utils.js +4 -5
  66. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Preview.js +3 -4
  67. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ShapeSection.js +4 -5
  68. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/TextSection.js +4 -5
  69. package/es/rce/plugins/instructure_icon_maker/components/IconMakerTray.js +22 -29
  70. package/es/rce/plugins/instructure_icon_maker/registerEditToolbar.js +1 -1
  71. package/es/rce/plugins/instructure_icon_maker/svg/image.js +5 -7
  72. package/es/rce/plugins/instructure_icon_maker/svg/index.js +6 -9
  73. package/es/rce/plugins/instructure_icon_maker/svg/settings.js +17 -20
  74. package/es/rce/plugins/instructure_icon_maker/svg/shape.js +4 -5
  75. package/es/rce/plugins/instructure_icon_maker/svg/text.js +28 -32
  76. package/es/rce/plugins/instructure_icon_maker/svg/utils.js +2 -4
  77. package/es/rce/plugins/instructure_icon_maker/utils/IconMakerClose.js +2 -3
  78. package/es/rce/plugins/instructure_icon_maker/utils/iconValidation.js +1 -2
  79. package/es/rce/plugins/instructure_image/ImageEmbedOptions.js +3 -7
  80. package/es/rce/plugins/instructure_image/ImageList/Image.js +7 -8
  81. package/es/rce/plugins/instructure_image/ImageList/index.js +7 -8
  82. package/es/rce/plugins/instructure_image/ImageOptionsTray/TrayController.js +2 -4
  83. package/es/rce/plugins/instructure_image/ImageOptionsTray/index.js +3 -3
  84. package/es/rce/plugins/instructure_image/plugin.js +1 -2
  85. package/es/rce/plugins/instructure_links/components/AccordionSection.js +7 -8
  86. package/es/rce/plugins/instructure_links/components/Link.js +61 -65
  87. package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/LinkOptionsDialogController.js +1 -2
  88. package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/index.js +2 -2
  89. package/es/rce/plugins/instructure_links/components/LinkOptionsTray/index.js +2 -2
  90. package/es/rce/plugins/instructure_links/components/LinkSet.js +28 -37
  91. package/es/rce/plugins/instructure_links/components/LinksPanel.js +21 -8
  92. package/es/rce/plugins/instructure_links/components/NoResults.js +6 -7
  93. package/es/rce/plugins/instructure_links/plugin.js +6 -9
  94. package/es/rce/plugins/instructure_media_embed/clickCallback.js +3 -4
  95. package/es/rce/plugins/instructure_media_embed/components/Embed.js +6 -7
  96. package/es/rce/plugins/instructure_paste/plugin.js +5 -7
  97. package/es/rce/plugins/instructure_rce_external_tools/ExternalToolsEnv.js +24 -33
  98. package/es/rce/plugins/instructure_rce_external_tools/RceToolWrapper.js +7 -38
  99. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.js +30 -29
  100. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.js +3 -4
  101. package/es/rce/plugins/instructure_rce_external_tools/dialog-helper.js +1 -2
  102. package/es/rce/plugins/instructure_rce_external_tools/jquery/jquery.dropdownList.js +3 -4
  103. package/es/rce/plugins/instructure_rce_external_tools/lti11-content-items/RceLti11ContentItem.js +17 -24
  104. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/RceLti13ContentItem.js +2 -2
  105. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/BaseLinkContentItem.js +4 -5
  106. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/processEditorContentItems.js +8 -9
  107. package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/rceLti13ContentItemFromJson.js +0 -1
  108. package/es/rce/plugins/instructure_rce_external_tools/plugin.js +4 -4
  109. package/es/rce/plugins/instructure_rce_external_tools/util/externalToolsForToolbar.js +42 -0
  110. package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.js +5 -10
  111. package/es/rce/plugins/instructure_record/AudioOptionsTray/index.js +12 -13
  112. package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.js +8 -15
  113. package/es/rce/plugins/instructure_record/VideoOptionsTray/index.js +19 -20
  114. package/es/rce/plugins/instructure_record/clickCallback.js +26 -30
  115. package/es/rce/plugins/instructure_search_and_replace/clickCallback.js +2 -3
  116. package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTray.js +14 -16
  117. package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTrayController.js +9 -12
  118. package/es/rce/plugins/instructure_search_and_replace/plugin.js +1 -2
  119. package/es/rce/plugins/instructure_wordcount/clickCallback.js +3 -4
  120. package/es/rce/plugins/instructure_wordcount/components/WordCountModal.js +26 -33
  121. package/es/rce/plugins/instructure_wordcount/utils/countContent.js +3 -3
  122. package/es/rce/plugins/instructure_wordcount/utils/tableContent.js +5 -8
  123. package/es/rce/plugins/shared/CanvasContentTray.js +9 -16
  124. package/es/rce/plugins/shared/ColorInput.js +22 -25
  125. package/es/rce/plugins/shared/ConditionalTooltip.js +5 -6
  126. package/es/rce/plugins/shared/ContentSelection.js +12 -20
  127. package/es/rce/plugins/shared/DimensionUtils.js +2 -4
  128. package/es/rce/plugins/shared/EventUtils.js +1 -1
  129. package/es/rce/plugins/shared/FixedContentTray.js +13 -14
  130. package/es/rce/plugins/shared/ImageCropper/DirectionRegion.js +3 -4
  131. package/es/rce/plugins/shared/ImageCropper/Modal.js +12 -13
  132. package/es/rce/plugins/shared/ImageCropper/Preview.js +11 -13
  133. package/es/rce/plugins/shared/ImageCropper/controls/CustomNumberInput.js +8 -9
  134. package/es/rce/plugins/shared/ImageCropper/controls/ResetControls.js +3 -4
  135. package/es/rce/plugins/shared/ImageCropper/controls/RotationControls.js +4 -5
  136. package/es/rce/plugins/shared/ImageCropper/controls/ShapeControls.js +7 -11
  137. package/es/rce/plugins/shared/ImageCropper/controls/ZoomControls.js +4 -5
  138. package/es/rce/plugins/shared/ImageCropper/controls/index.js +4 -5
  139. package/es/rce/plugins/shared/ImageCropper/controls/useDebouncedNumericValue.js +13 -15
  140. package/es/rce/plugins/shared/ImageCropper/imageCropUtils.js +18 -21
  141. package/es/rce/plugins/shared/ImageCropper/svg/shape.js +4 -5
  142. package/es/rce/plugins/shared/ImageCropper/svg/utils.js +2 -4
  143. package/es/rce/plugins/shared/ImageCropper/useKeyMouseEvents.js +1 -4
  144. package/es/rce/plugins/shared/ImageOptionsForm.js +17 -18
  145. package/es/rce/plugins/shared/LinkDisplay.js +8 -9
  146. package/es/rce/plugins/shared/PreviewIcon.js +8 -9
  147. package/es/rce/plugins/shared/RceFileBrowser.js +2 -3
  148. package/es/rce/plugins/shared/StoreContext.js +8 -10
  149. package/es/rce/plugins/shared/StudioLtiSupportUtils.js +5 -6
  150. package/es/rce/plugins/shared/Upload/CanvasContentPanel.js +6 -7
  151. package/es/rce/plugins/shared/Upload/CategoryProcessor.js +1 -2
  152. package/es/rce/plugins/shared/Upload/ComputerPanel.js +11 -14
  153. package/es/rce/plugins/shared/Upload/PanelFilter.js +7 -8
  154. package/es/rce/plugins/shared/Upload/UploadFile.js +19 -22
  155. package/es/rce/plugins/shared/Upload/UploadFileModal.js +28 -34
  156. package/es/rce/plugins/shared/Upload/UrlPanel.js +4 -5
  157. package/es/rce/plugins/shared/Upload/UsageRightsSelectBox.js +18 -24
  158. package/es/rce/plugins/shared/Upload/doFileUpload.js +6 -7
  159. package/es/rce/plugins/shared/ai_tools/AIResponseModal.js +7 -8
  160. package/es/rce/plugins/shared/ai_tools/AIToolsTray.js +14 -17
  161. package/es/rce/plugins/shared/ai_tools/aiicons.js +2 -2
  162. package/es/rce/plugins/shared/canvasContentUtils.js +1 -2
  163. package/es/rce/plugins/shared/compressionUtils.js +17 -20
  164. package/es/rce/plugins/shared/do-fetch-api-effect/doFetchApi.js +12 -15
  165. package/es/rce/plugins/shared/do-fetch-api-effect/get-cookie.js +1 -1
  166. package/es/rce/plugins/shared/fileTypeUtils.js +3 -6
  167. package/es/rce/plugins/shared/round.js +1 -2
  168. package/es/rce/plugins/shared/trayUtils.js +3 -0
  169. package/es/rce/plugins/shared/useDataUrl.js +4 -5
  170. package/es/rce/plugins/tinymce-a11y-checker/components/ColorField.js +2 -2
  171. package/es/rce/plugins/tinymce-a11y-checker/components/checker.js +8 -10
  172. package/es/rce/plugins/tinymce-a11y-checker/node-checker.js +1 -3
  173. package/es/rce/plugins/tinymce-a11y-checker/plugin.js +14 -17
  174. package/es/rce/plugins/tinymce-a11y-checker/rules/headings-start-at-h2.js +1 -2
  175. package/es/rce/plugins/tinymce-a11y-checker/rules/large-text-contrast.js +1 -2
  176. package/es/rce/plugins/tinymce-a11y-checker/rules/small-text-contrast.js +1 -2
  177. package/es/rce/plugins/tinymce-a11y-checker/utils/dom.js +2 -4
  178. package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.js +2 -3
  179. package/es/rce/plugins/tinymce-a11y-checker/utils/rgb-hex.js +1 -4
  180. package/es/rce/root.js +9 -9
  181. package/es/rce/tinyRCE.js +1 -0
  182. package/es/rce/transformContent.js +1 -1
  183. package/es/rcs/api.js +39 -55
  184. package/es/rcs/buildError.js +3 -3
  185. package/es/rcs/fake.js +5 -7
  186. package/es/sidebar/actions/documents.js +10 -12
  187. package/es/sidebar/actions/files.js +18 -22
  188. package/es/sidebar/actions/filter.js +4 -5
  189. package/es/sidebar/actions/images.js +20 -26
  190. package/es/sidebar/actions/media.js +15 -18
  191. package/es/sidebar/actions/session.js +1 -2
  192. package/es/sidebar/actions/upload.js +26 -37
  193. package/es/sidebar/containers/sidebarHandlers.js +6 -12
  194. package/es/sidebar/dragHtml.js +6 -2
  195. package/es/sidebar/reducers/all_files.js +1 -3
  196. package/es/sidebar/reducers/collection.js +1 -3
  197. package/es/sidebar/reducers/collections.js +1 -3
  198. package/es/sidebar/reducers/documents.js +1 -3
  199. package/es/sidebar/reducers/files.js +1 -3
  200. package/es/sidebar/reducers/filter.js +7 -15
  201. package/es/sidebar/reducers/flickr.js +1 -3
  202. package/es/sidebar/reducers/folder.js +1 -3
  203. package/es/sidebar/reducers/folders.js +1 -3
  204. package/es/sidebar/reducers/images.js +1 -3
  205. package/es/sidebar/reducers/media.js +1 -3
  206. package/es/sidebar/reducers/newPageLinkExpanded.js +1 -3
  207. package/es/sidebar/reducers/noop.js +1 -2
  208. package/es/sidebar/reducers/rootFolderId.js +1 -3
  209. package/es/sidebar/reducers/session.js +1 -3
  210. package/es/sidebar/reducers/ui.js +3 -9
  211. package/es/sidebar/reducers/upload.js +8 -24
  212. package/es/sidebar/store/initialState.js +1 -2
  213. package/es/translations/locales/ar.js +6 -0
  214. package/es/translations/locales/ca.js +6 -0
  215. package/es/translations/locales/cy.js +6 -0
  216. package/es/translations/locales/da-x-k12.js +6 -0
  217. package/es/translations/locales/da.js +6 -0
  218. package/es/translations/locales/de.js +6 -0
  219. package/es/translations/locales/en-AU-x-unimelb.js +6 -0
  220. package/es/translations/locales/en-GB-x-ukhe.js +6 -0
  221. package/es/translations/locales/en_AU.js +6 -0
  222. package/es/translations/locales/en_CA.js +6 -0
  223. package/es/translations/locales/en_CY.js +6 -0
  224. package/es/translations/locales/en_GB.js +6 -0
  225. package/es/translations/locales/es.js +6 -0
  226. package/es/translations/locales/es_ES.js +6 -0
  227. package/es/translations/locales/fi.js +6 -0
  228. package/es/translations/locales/fr.js +6 -0
  229. package/es/translations/locales/fr_CA.js +6 -0
  230. package/es/translations/locales/hi.js +6 -0
  231. package/es/translations/locales/ht.js +6 -0
  232. package/es/translations/locales/id.js +6 -0
  233. package/es/translations/locales/is.js +6 -0
  234. package/es/translations/locales/it.js +6 -0
  235. package/es/translations/locales/ja.js +6 -0
  236. package/es/translations/locales/mi.js +6 -0
  237. package/es/translations/locales/ms.js +6 -0
  238. package/es/translations/locales/nb-x-k12.js +6 -0
  239. package/es/translations/locales/nb.js +6 -0
  240. package/es/translations/locales/nl.js +6 -0
  241. package/es/translations/locales/pl.js +6 -0
  242. package/es/translations/locales/pt.js +6 -0
  243. package/es/translations/locales/pt_BR.js +6 -0
  244. package/es/translations/locales/ru.js +6 -0
  245. package/es/translations/locales/sl.js +6 -0
  246. package/es/translations/locales/sv-x-k12.js +6 -0
  247. package/es/translations/locales/sv.js +6 -0
  248. package/es/translations/locales/th.js +6 -0
  249. package/es/translations/locales/vi.js +6 -0
  250. package/es/translations/locales/zh-Hans.js +6 -0
  251. package/es/translations/locales/zh-Hant.js +6 -0
  252. package/es/translations/locales/zh.js +6 -0
  253. package/es/translations/locales/zh_HK.js +6 -0
  254. package/es/util/elem-util.js +1 -1
  255. package/es/util/file-url-util.js +1 -1
  256. package/es/util/fullscreenHelpers.js +6 -9
  257. package/es/util/loadingPlaceholder.js +2 -3
  258. package/es/util/simpleCache.js +1 -2
  259. package/es/util/url-util.js +5 -5
  260. package/eslint.config.js +15 -4
  261. package/locales/en.json +190 -10
  262. package/package.json +56 -55
  263. package/scripts/installTranslations.js +7 -8
  264. package/tsconfig.json +1 -1
  265. package/types/format-message-generate-id.d.ts +22 -0
  266. package/types/js-beautify.d.ts +21 -0
@@ -84,21 +84,19 @@ const NAMED_COLORS = [{
84
84
  color: '#FFFFFF',
85
85
  name: formatMessage('White')
86
86
  }, null];
87
- export const ColorInput = _ref => {
88
- var _NAMED_COLORS$find;
89
- let {
90
- color,
91
- label,
92
- name,
93
- onChange,
94
- popoverMountNode,
95
- width = '11rem',
96
- readonly = false,
97
- requireColor = false
98
- } = _ref;
87
+ export const ColorInput = ({
88
+ color,
89
+ label,
90
+ name,
91
+ onChange,
92
+ popoverMountNode,
93
+ width = '11rem',
94
+ readonly = false,
95
+ requireColor = false
96
+ }) => {
99
97
  const [isOpen, setIsOpen] = useState(false);
100
98
  const [inputValue, setInputValue] = useState(color);
101
- const colorName = (_NAMED_COLORS$find = NAMED_COLORS.find(c => (c === null || c === void 0 ? void 0 : c.color) === color)) === null || _NAMED_COLORS$find === void 0 ? void 0 : _NAMED_COLORS$find.name;
99
+ const colorName = NAMED_COLORS.find(c => c?.color === color)?.name;
102
100
  useEffect(() => {
103
101
  setInputValue(color);
104
102
  }, [color]);
@@ -121,12 +119,12 @@ export const ColorInput = _ref => {
121
119
  }
122
120
  };
123
121
  const colorPreviews = NAMED_COLORS.map(c => /*#__PURE__*/React.createElement(ColorPreview, {
124
- key: `${name}-${c === null || c === void 0 ? void 0 : c.color}`,
125
- color: c === null || c === void 0 ? void 0 : c.color,
126
- name: c === null || c === void 0 ? void 0 : c.name,
122
+ key: `${name}-${c?.color}`,
123
+ color: c?.color,
124
+ name: c?.name,
127
125
  disabled: !isOpen,
128
126
  onSelect: () => {
129
- handleColorChange(c === null || c === void 0 ? void 0 : c.color);
127
+ handleColorChange(c?.color);
130
128
  setIsOpen(false);
131
129
  }
132
130
  }));
@@ -186,14 +184,13 @@ export const ColorInput = _ref => {
186
184
  interaction: readonly ? 'readonly' : undefined
187
185
  }));
188
186
  };
189
- function ColorPreview(_ref2) {
190
- let {
191
- color,
192
- name,
193
- disabled,
194
- margin = 'xxx-small',
195
- onSelect
196
- } = _ref2;
187
+ function ColorPreview({
188
+ color,
189
+ name,
190
+ disabled,
191
+ margin = 'xxx-small',
192
+ onSelect
193
+ }) {
197
194
  return /*#__PURE__*/React.createElement(BaseButton, {
198
195
  interaction: disabled ? 'readonly' : undefined,
199
196
  isCondensed: true,
@@ -19,12 +19,11 @@
19
19
  import React from 'react';
20
20
  import { bool, element, oneOfType, arrayOf } from 'prop-types';
21
21
  import { Tooltip } from '@instructure/ui-tooltip';
22
- export const ConditionalTooltip = _ref => {
23
- let {
24
- condition,
25
- children,
26
- ...tooltipProps
27
- } = _ref;
22
+ export const ConditionalTooltip = ({
23
+ condition,
24
+ children,
25
+ ...tooltipProps
26
+ }) => {
28
27
  return condition ? /*#__PURE__*/React.createElement(Tooltip, tooltipProps, children) : /*#__PURE__*/React.createElement(React.Fragment, null, children);
29
28
  };
30
29
  ConditionalTooltip.propTypes = {
@@ -34,7 +34,7 @@ export const DISPLAY_AS_EMBED = 'embed';
34
34
  export const DISPLAY_AS_EMBED_DISABLED = 'embed-disabled';
35
35
  export const DISPLAY_AS_DOWNLOAD_LINK = 'download-link';
36
36
  export function asImageEmbed($element) {
37
- const nodeName = $element === null || $element === void 0 ? void 0 : $element.nodeName.toLowerCase();
37
+ const nodeName = $element?.nodeName.toLowerCase();
38
38
  if (nodeName !== 'img') {
39
39
  return null;
40
40
  }
@@ -45,9 +45,8 @@ export function asImageEmbed($element) {
45
45
  };
46
46
  }
47
47
  export function asLink($element, editor) {
48
- var _$link;
49
48
  let $link = $element;
50
- if (((_$link = $link) === null || _$link === void 0 ? void 0 : _$link.tagName) !== 'A') {
49
+ if ($link?.tagName !== 'A') {
51
50
  // the user may have selected some text that is w/in a link
52
51
  // but didn't include the <a>. Let's see if that's true
53
52
  $link = editor && editor.dom.getParent($link, 'a[href]');
@@ -93,7 +92,6 @@ export function asLink($element, editor) {
93
92
  // tinymce releases.
94
93
  // see https://github.com/tinymce/tinymce/issues/5181
95
94
  export function asVideoElement($element) {
96
- var _$videoElem$parentEle;
97
95
  const $videoElem = findMediaPlayerIframe($element);
98
96
  if (!isVideoElement($videoElem) && !isStudioEmbeddedMedia($videoElem)) {
99
97
  return null;
@@ -102,11 +100,10 @@ export function asVideoElement($element) {
102
100
  ...fromVideoEmbed($videoElem),
103
101
  $element,
104
102
  type: VIDEO_EMBED_TYPE,
105
- id: ((_$videoElem$parentEle = $videoElem.parentElement) === null || _$videoElem$parentEle === void 0 ? void 0 : _$videoElem$parentEle.getAttribute('data-mce-p-data-media-id')) || $videoElem.getAttribute('data-mce-p-data-media-id')
103
+ id: $videoElem.parentElement?.getAttribute('data-mce-p-data-media-id') || $videoElem.getAttribute('data-mce-p-data-media-id')
106
104
  };
107
105
  }
108
106
  export function asAudioElement($element) {
109
- var _$element$parentEleme;
110
107
  if (!$element) {
111
108
  return null;
112
109
  }
@@ -115,13 +112,12 @@ export function asAudioElement($element) {
115
112
  const title = ($audioIframe.getAttribute('title') || $tinymceIframeShim.getAttribute('data-mce-p-title') || '').replace(formatMessage('Video player for '), '');
116
113
  const audioOptions = {
117
114
  titleText: title,
118
- id: ((_$element$parentEleme = $element.parentElement) === null || _$element$parentEleme === void 0 ? void 0 : _$element$parentEleme.getAttribute('data-mce-p-data-media-id')) || $element.getAttribute('data-mce-p-data-media-id')
115
+ id: $element.parentElement?.getAttribute('data-mce-p-data-media-id') || $element.getAttribute('data-mce-p-data-media-id')
119
116
  };
120
117
  if ($audioIframe.tagName === 'IFRAME') {
121
118
  const audioDoc = $audioIframe.contentDocument;
122
119
  try {
123
- var _audioDoc$querySelect;
124
- const trackSJson = (_audioDoc$querySelect = audioDoc.querySelector('[data-tracks]')) === null || _audioDoc$querySelect === void 0 ? void 0 : _audioDoc$querySelect.getAttribute('data-tracks');
120
+ const trackSJson = audioDoc.querySelector('[data-tracks]')?.getAttribute('data-tracks');
125
121
  if (trackSJson) {
126
122
  audioOptions.tracks = JSON.parse(trackSJson);
127
123
  }
@@ -130,7 +126,7 @@ export function asAudioElement($element) {
130
126
  }
131
127
  if (RCEGlobals.getFeatures().media_links_use_attachment_id) {
132
128
  const source = $audioIframe.getAttribute('src');
133
- const matches = source === null || source === void 0 ? void 0 : source.match(/\/media_attachments_iframe\/(\d+)/);
129
+ const matches = source?.match(/\/media_attachments_iframe\/(\d+)/);
134
130
  if (matches) {
135
131
  audioOptions.attachmentId = matches[1];
136
132
  }
@@ -163,8 +159,7 @@ export function getContentFromElement($element, editor) {
163
159
  const content = asLink($element, editor) || asImageEmbed($element) || asVideoElement($element) || asText($element, editor) || asNone($element);
164
160
  return content;
165
161
  }
166
- export function getContentFromEditor(editor) {
167
- let expandSelection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
162
+ export function getContentFromEditor(editor, expandSelection = false) {
168
163
  let $element;
169
164
  if (editor && editor.selection) {
170
165
  // tinymce selects the element around the cursor, whether it's
@@ -194,18 +189,17 @@ export function isImageEmbed($element) {
194
189
  return !!asImageEmbed($element) && !$element.getAttribute('data-placeholder-for');
195
190
  }
196
191
  function isMediaElement($element, mediaType) {
197
- var _tinymceIframeShim$fi, _tinymceIframeShim$ge;
198
192
  // the video is hosted in an iframe, but tinymce
199
193
  // wraps it in a span with swizzled attribute names
200
- if (!($element !== null && $element !== void 0 && $element.getAttribute) || !$element) {
194
+ if (!$element?.getAttribute || !$element) {
201
195
  return false;
202
196
  }
203
197
  const tinymceIframeShim = $element.tagName === 'IFRAME' ? $element.parentElement : $element;
204
- if (((_tinymceIframeShim$fi = tinymceIframeShim.firstElementChild) === null || _tinymceIframeShim$fi === void 0 ? void 0 : _tinymceIframeShim$fi.tagName) !== 'IFRAME') {
198
+ if (tinymceIframeShim.firstElementChild?.tagName !== 'IFRAME') {
205
199
  return false;
206
200
  }
207
201
  const media_obj_id = tinymceIframeShim.getAttribute('data-mce-p-data-media-id');
208
- const is_media_attachment_iframe = (_tinymceIframeShim$ge = tinymceIframeShim.getAttribute('data-mce-p-src')) === null || _tinymceIframeShim$ge === void 0 ? void 0 : _tinymceIframeShim$ge.includes('media_attachments_iframe');
202
+ const is_media_attachment_iframe = tinymceIframeShim.getAttribute('data-mce-p-src')?.includes('media_attachments_iframe');
209
203
  if (!media_obj_id && !is_media_attachment_iframe) {
210
204
  return false;
211
205
  }
@@ -219,20 +213,18 @@ export function isAudioElement($element) {
219
213
  return isMediaElement($element, 'audio');
220
214
  }
221
215
  export function findMediaPlayerIframe(elem) {
222
- var _elem$firstElementChi;
223
216
  if (!elem) return null;
224
217
  if (elem.tagName === 'IFRAME') {
225
218
  // we have the iframe
226
219
  return elem;
227
220
  }
228
- if (((_elem$firstElementChi = elem.firstElementChild) === null || _elem$firstElementChi === void 0 ? void 0 : _elem$firstElementChi.tagName) === 'IFRAME') {
221
+ if (elem.firstElementChild?.tagName === 'IFRAME') {
229
222
  // we have the shim tinymce puts around the iframe
230
223
  return elem.firstElementChild;
231
224
  }
232
225
  if (elem.classList.contains('mce-shim')) {
233
- var _elem$previousSibling;
234
226
  // tinymce puts a <span class='mce-shin'> after the iframe (since v5, I think)
235
- if (((_elem$previousSibling = elem.previousSibling) === null || _elem$previousSibling === void 0 ? void 0 : _elem$previousSibling.tagName) === 'IFRAME') {
227
+ if (elem.previousSibling?.tagName === 'IFRAME') {
236
228
  return elem.previousSibling;
237
229
  }
238
230
  }
@@ -35,8 +35,7 @@ function scaleEvenly(width, height, scaleFactor, constraints) {
35
35
  width: Math.round(width * minimumScaleFactor)
36
36
  };
37
37
  }
38
- export function scaleForHeight(width, height, targetHeight) {
39
- let constraints = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
38
+ export function scaleForHeight(width, height, targetHeight, constraints = {}) {
40
39
  if (targetHeight == null) {
41
40
  return {
42
41
  height: null,
@@ -46,8 +45,7 @@ export function scaleForHeight(width, height, targetHeight) {
46
45
  const scaleFactor = targetHeight / height;
47
46
  return scaleEvenly(width, height, scaleFactor, constraints);
48
47
  }
49
- export function scaleForWidth(width, height, targetWidth) {
50
- let constraints = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
48
+ export function scaleForWidth(width, height, targetWidth, constraints = {}) {
51
49
  if (targetWidth == null) {
52
50
  return {
53
51
  height: null,
@@ -21,7 +21,7 @@
21
21
  // Assumes we've already confirmed that cbdata includes files
22
22
  export function isMicrosoftWordContentInEvent(event) {
23
23
  const cbdata = event.type === 'paste' ? event.clipboardData : event.dataTransfer;
24
- if ((cbdata === null || cbdata === void 0 ? void 0 : cbdata.files[0].type.indexOf('image/')) === 0 && cbdata.types.includes('text/html')) {
24
+ if (cbdata?.files[0].type.indexOf('image/') === 0 && cbdata.types.includes('text/html')) {
25
25
  const html = cbdata.getData('text/html');
26
26
  return isMicrosoftWordContent(html);
27
27
  }
@@ -48,20 +48,19 @@ function renderJoinedItem(bodyAs, renderBody, renderFooter) {
48
48
  borderWidth: "small none none none"
49
49
  }, renderFooter()))));
50
50
  }
51
- export const FixedContentTray = _ref => {
52
- let {
53
- title,
54
- isOpen,
55
- onDismiss,
56
- onUnmount,
57
- mountNode,
58
- renderHeader,
59
- renderBody,
60
- renderFooter,
61
- bodyAs,
62
- shouldJoinBodyAndFooter,
63
- shouldCloseOnDocumentClick
64
- } = _ref;
51
+ export const FixedContentTray = ({
52
+ title,
53
+ isOpen,
54
+ onDismiss,
55
+ onUnmount,
56
+ mountNode,
57
+ renderHeader,
58
+ renderBody,
59
+ renderFooter,
60
+ bodyAs,
61
+ shouldJoinBodyAndFooter,
62
+ shouldCloseOnDocumentClick
63
+ }) => {
65
64
  return /*#__PURE__*/React.createElement(Tray, {
66
65
  "data-mce-component": true,
67
66
  label: title,
@@ -42,10 +42,9 @@ const directionToWord = direction => {
42
42
  return null;
43
43
  }
44
44
  };
45
- export const DirectionRegion = _ref => {
46
- let {
47
- direction
48
- } = _ref;
45
+ export const DirectionRegion = ({
46
+ direction
47
+ }) => {
49
48
  const directionWord = directionToWord(direction);
50
49
  const directionMessage = directionWord ? formatMessage('Moving image to crop {directionWord}', {
51
50
  directionWord
@@ -29,7 +29,7 @@ import { Preview } from './Preview';
29
29
  import { Controls } from './controls';
30
30
  import { ImageCropperSettingsPropTypes } from './propTypes';
31
31
  import { DirectionRegion } from './DirectionRegion';
32
- import { instuiPopupMountNode } from '../../../../util/fullscreenHelpers';
32
+ import { instuiPopupMountNodeFn } from '../../../../util/fullscreenHelpers';
33
33
  const renderBody = (image, settings, dispatch, message, loading) => {
34
34
  if (loading) {
35
35
  return /*#__PURE__*/React.createElement(Flex, {
@@ -73,17 +73,16 @@ const renderFooter = (settings, onClose) => {
73
73
  type: "submit"
74
74
  }, formatMessage('Save')));
75
75
  };
76
- export const ImageCropperModal = _ref => {
77
- let {
78
- open,
79
- shape,
80
- onClose,
81
- onSubmit,
82
- image,
83
- message,
84
- cropSettings,
85
- loading
86
- } = _ref;
76
+ export const ImageCropperModal = ({
77
+ open,
78
+ shape,
79
+ onClose,
80
+ onSubmit,
81
+ image,
82
+ message,
83
+ cropSettings,
84
+ loading
85
+ }) => {
87
86
  const [settings, dispatch] = useReducer(cropperSettingsReducer, defaultState);
88
87
  useEffect(() => {
89
88
  shape !== settings.shape && dispatch({
@@ -102,7 +101,7 @@ export const ImageCropperModal = _ref => {
102
101
  "data-mce-component": true,
103
102
  as: "form",
104
103
  label: formatMessage('Crop Image'),
105
- mountNode: instuiPopupMountNode,
104
+ mountNode: instuiPopupMountNodeFn,
106
105
  size: "large",
107
106
  open: open,
108
107
  onDismiss: onClose,
@@ -37,13 +37,12 @@ function replaceSvg(svg, node) {
37
37
  }
38
38
  node.appendChild(svg);
39
39
  }
40
- function getTransformValue(_ref) {
41
- let {
42
- translateX,
43
- translateY,
44
- rotation,
45
- scaleRatio
46
- } = _ref;
40
+ function getTransformValue({
41
+ translateX,
42
+ translateY,
43
+ rotation,
44
+ scaleRatio
45
+ }) {
47
46
  const values = [];
48
47
  if (translateX !== 0) values.push(`translateX(${translateX}px)`);
49
48
  if (translateY !== 0) values.push(`translateY(${translateY}px)`);
@@ -51,12 +50,11 @@ function getTransformValue(_ref) {
51
50
  if (scaleRatio > 1) values.push(`scale(${scaleRatio})`);
52
51
  return values.join(' ');
53
52
  }
54
- export const Preview = _ref2 => {
55
- let {
56
- image,
57
- settings,
58
- dispatch
59
- } = _ref2;
53
+ export const Preview = ({
54
+ image,
55
+ settings,
56
+ dispatch
57
+ }) => {
60
58
  const previewRef = /*#__PURE__*/createRef();
61
59
  const shapeRef = /*#__PURE__*/createRef();
62
60
  const imgRef = /*#__PURE__*/createRef();
@@ -22,15 +22,14 @@ import { NumberInput } from '@instructure/ui-number-input';
22
22
  import { useDebouncedNumericValue } from './useDebouncedNumericValue';
23
23
  import formatMessage from '../../../../../format-message';
24
24
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
25
- export const CustomNumberInput = _ref => {
26
- let {
27
- value,
28
- parseValueCallback,
29
- processValueCallback,
30
- formatValueCallback,
31
- placeholder,
32
- onChange
33
- } = _ref;
25
+ export const CustomNumberInput = ({
26
+ value,
27
+ parseValueCallback,
28
+ processValueCallback,
29
+ formatValueCallback,
30
+ placeholder,
31
+ onChange
32
+ }) => {
34
33
  const [inputValue, digestCurrentValue, digestNewValue, hasError] = useDebouncedNumericValue({
35
34
  value,
36
35
  parseValueCallback,
@@ -22,10 +22,9 @@ import { Flex } from '@instructure/ui-flex';
22
22
  import { Button } from '@instructure/ui-buttons';
23
23
  import { IconResetLine } from '@instructure/ui-icons';
24
24
  import formatMessage from '../../../../../format-message';
25
- export const ResetControls = _ref => {
26
- let {
27
- onReset
28
- } = _ref;
25
+ export const ResetControls = ({
26
+ onReset
27
+ }) => {
29
28
  return /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(Button, {
30
29
  renderIcon: IconResetLine,
31
30
  onClick: onReset
@@ -39,11 +39,10 @@ const parseRotationText = value => {
39
39
  return result;
40
40
  };
41
41
  const formatRotationText = value => `${value}º`;
42
- export const RotationControls = _ref => {
43
- let {
44
- rotation,
45
- onChange
46
- } = _ref;
42
+ export const RotationControls = ({
43
+ rotation,
44
+ onChange
45
+ }) => {
47
46
  const rotateLeftCallback = () => onChange(calculateRotation(getNearestRectAngle(rotation, true) - BUTTON_ROTATION_DEGREES));
48
47
  const rotateRightCallback = () => onChange(calculateRotation(getNearestRectAngle(rotation, false) + BUTTON_ROTATION_DEGREES));
49
48
  return /*#__PURE__*/React.createElement(Flex.Item, {
@@ -49,22 +49,18 @@ const SHAPE_OPTIONS = [{
49
49
  id: Shape.Star,
50
50
  label: formatMessage('Star')
51
51
  }];
52
- export const ShapeControls = _ref => {
53
- let {
54
- shape,
55
- onChange
56
- } = _ref;
52
+ export const ShapeControls = ({
53
+ shape,
54
+ onChange
55
+ }) => {
57
56
  return /*#__PURE__*/React.createElement(Flex.Item, {
58
57
  margin: "0 medium 0 0"
59
58
  }, /*#__PURE__*/React.createElement(SimpleSelect, {
60
59
  isInline: true,
61
60
  value: shape,
62
- onChange: (event, _ref2) => {
63
- let {
64
- id
65
- } = _ref2;
66
- return onChange(id);
67
- },
61
+ onChange: (event, {
62
+ id
63
+ }) => onChange(id),
68
64
  renderLabel: /*#__PURE__*/React.createElement(ScreenReaderContent, null, formatMessage('Select crop shape')),
69
65
  "data-testid": "shape-select-dropdown"
70
66
  }, SHAPE_OPTIONS.map(option => /*#__PURE__*/React.createElement(SimpleSelect.Option, {
@@ -43,11 +43,10 @@ const parseZoomText = value => {
43
43
  };
44
44
  const formatZoomText = value => `${value}%`;
45
45
  const debouncedAlert = debounce(showFlashAlert, 1000);
46
- export const ZoomControls = _ref => {
47
- let {
48
- scaleRatio,
49
- onChange
50
- } = _ref;
46
+ export const ZoomControls = ({
47
+ scaleRatio,
48
+ onChange
49
+ }) => {
51
50
  const onZoomChange = value => {
52
51
  const message = {
53
52
  message: `${round(value * 100)}% Zoom`,
@@ -23,11 +23,10 @@ import { ZoomControls } from './ZoomControls';
23
23
  import { RotationControls } from './RotationControls';
24
24
  import { ShapeControls } from './ShapeControls';
25
25
  import { ResetControls } from './ResetControls';
26
- export const Controls = _ref => {
27
- let {
28
- settings,
29
- dispatch
30
- } = _ref;
26
+ export const Controls = ({
27
+ settings,
28
+ dispatch
29
+ }) => {
31
30
  return /*#__PURE__*/React.createElement(Flex, {
32
31
  id: "imageCropperControls",
33
32
  direction: "row",
@@ -19,13 +19,12 @@
19
19
  import { useEffect, useRef, useState } from 'react';
20
20
  import { debounce } from '@instructure/debounce';
21
21
  const CHANGE_EVENT_DELAY = 1000;
22
- const digestValue = _ref => {
23
- let {
24
- parseValueCallback,
25
- processValueCallback,
26
- formatValueCallback,
27
- value
28
- } = _ref;
22
+ const digestValue = ({
23
+ parseValueCallback,
24
+ processValueCallback,
25
+ formatValueCallback,
26
+ value
27
+ }) => {
29
28
  const parsedNewValue = parseValueCallback(value);
30
29
  if (parsedNewValue === null) {
31
30
  return [null, null];
@@ -34,14 +33,13 @@ const digestValue = _ref => {
34
33
  const formattedNewTempValue = formatValueCallback(processedNewValue);
35
34
  return [formattedNewTempValue, processedNewValue];
36
35
  };
37
- export function useDebouncedNumericValue(_ref2) {
38
- let {
39
- value,
40
- parseValueCallback,
41
- processValueCallback,
42
- formatValueCallback,
43
- onChange
44
- } = _ref2;
36
+ export function useDebouncedNumericValue({
37
+ value,
38
+ parseValueCallback,
39
+ processValueCallback,
40
+ formatValueCallback,
41
+ onChange
42
+ }) {
45
43
  const [inputValue, setInputValue] = useState(formatValueCallback(value));
46
44
  const [hasError, setHasError] = useState(false);
47
45
  const updateStateAfterDigest = newValue => {
@@ -62,11 +62,10 @@ const fetchImageMetadata = src => {
62
62
  img.src = src;
63
63
  });
64
64
  };
65
- const createDefsElement = _ref => {
66
- let {
67
- shape,
68
- squareDimension
69
- } = _ref;
65
+ const createDefsElement = ({
66
+ shape,
67
+ squareDimension
68
+ }) => {
70
69
  const defs = createSvgElement('defs');
71
70
  const shapeMask = buildShapeMask({
72
71
  shape,
@@ -82,14 +81,13 @@ const createDefsElement = _ref => {
82
81
  const convertTranslationUnits = (translationPixels, imageHeight) => {
83
82
  return imageHeight * translationPixels / PREVIEW_HEIGHT;
84
83
  };
85
- const createMainSvgGroup = _ref2 => {
86
- let {
87
- imageWidth,
88
- imageHeight,
89
- squareDimension,
90
- image,
91
- settings
92
- } = _ref2;
84
+ const createMainSvgGroup = ({
85
+ imageWidth,
86
+ imageHeight,
87
+ squareDimension,
88
+ image,
89
+ settings
90
+ }) => {
93
91
  const mainGroup = createSvgElement('g', {
94
92
  'clip-path': `url(#${CLIP_PATH_ID})`
95
93
  });
@@ -108,14 +106,13 @@ const createMainSvgGroup = _ref2 => {
108
106
  mainGroup.appendChild(imageElement);
109
107
  return mainGroup;
110
108
  };
111
- export const setTransformAttribute = _ref3 => {
112
- let {
113
- imageElement,
114
- imageWidth,
115
- imageHeight,
116
- squareDimension,
117
- settings
118
- } = _ref3;
109
+ export const setTransformAttribute = ({
110
+ imageElement,
111
+ imageWidth,
112
+ imageHeight,
113
+ squareDimension,
114
+ settings
115
+ }) => {
119
116
  const {
120
117
  rotation = 0,
121
118
  scaleRatio = 1.0,
@@ -20,11 +20,10 @@ import round from '../../round';
20
20
  import { SHAPE_CONTAINER_LENGTH } from '../constants';
21
21
  import { createSvgElement } from './utils';
22
22
  import { Shape } from '../shape';
23
- export function buildShapeMask(_ref) {
24
- let {
25
- shape,
26
- size
27
- } = _ref;
23
+ export function buildShapeMask({
24
+ shape,
25
+ size
26
+ }) {
28
27
  const dimensionSize = size || SHAPE_CONTAINER_LENGTH;
29
28
  switch (shape) {
30
29
  case Shape.Square:
@@ -16,11 +16,9 @@
16
16
  * with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
  */
18
18
 
19
- export function createSvgElement(tag) {
20
- let attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
19
+ export function createSvgElement(tag, attributes = {}) {
21
20
  const element = document.createElementNS('http://www.w3.org/2000/svg', tag);
22
- Object.entries(attributes).forEach(_ref => {
23
- let [attr, value] = _ref;
21
+ Object.entries(attributes).forEach(([attr, value]) => {
24
22
  element.setAttribute(attr, value);
25
23
  });
26
24
  return element;
@@ -73,10 +73,7 @@ function useKeysEvents(tempTranslateXRef, tempTranslateYRef, tempTranslateX, tem
73
73
  useEffect(() => {
74
74
  const onKeyDownWrapper = event => {
75
75
  // If the active element is in the modal header, footer or controls.
76
- if (EVENT_EXCEPTION_ELEMENT_IDS.some(id => {
77
- var _document$getElementB;
78
- return (_document$getElementB = document.getElementById(id)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.contains(document.activeElement);
79
- })) {
76
+ if (EVENT_EXCEPTION_ELEMENT_IDS.some(id => document.getElementById(id)?.contains(document.activeElement))) {
80
77
  return;
81
78
  }
82
79
  onKeyDown(event);