@instructure/canvas-rce 5.14.1 → 5.14.2
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.
- package/CHANGELOG.md +5 -0
- package/DEVELOPMENT.md +1 -1
- package/README.md +0 -8
- package/__tests__/common/indicate.test.js +84 -0
- package/__tests__/common/mimeClass.test.js +85 -0
- package/__tests__/module/contentInsertionUtils.test.js +52 -0
- package/__tests__/module/indicatorRegion.test.js +75 -0
- package/__tests__/module/normalizeLocale.test.js +46 -0
- package/__tests__/module/normalizeProps.test.js +51 -0
- package/__tests__/module/sanitizePlugins.test.js +48 -0
- package/__tests__/module/wrapInitCb.test.js +56 -0
- package/__tests__/rcs/api.test.js +819 -0
- package/{mocha-reporter-config.js → __tests__/sidebar/actions/all_files.test.js} +10 -9
- package/__tests__/sidebar/actions/data.test.js +196 -0
- package/__tests__/sidebar/actions/utils.js +44 -0
- package/{es/rce/plugins/shared/__mocks__/screenfull.js → __tests__/sidebar/reducers/all_files.test.js} +10 -6
- package/babel.config.js +3 -1
- package/es/bridge/Bridge.js +8 -56
- package/es/bridge/index.js +1 -0
- package/es/canvasFileBrowser/FileBrowser.js +12 -59
- package/es/canvasFileBrowser/en-US.js +3 -6
- package/es/common/FlashAlert.js +7 -28
- package/es/common/browser.js +4 -2
- package/es/common/fileUrl.js +104 -59
- package/es/common/incremental-loading/LoadMoreButton.js +1 -0
- package/es/common/incremental-loading/LoadingIndicator.js +1 -2
- package/es/common/incremental-loading/LoadingStatus.js +1 -2
- package/es/common/incremental-loading/index.js +1 -0
- package/es/common/incremental-loading/useIncrementalLoading.js +1 -3
- package/es/common/indicate.js +15 -8
- package/es/common/mimeClass.js +3 -4
- package/es/common/natcompare.js +1 -4
- package/es/defaultTinymceConfig.js +5 -3
- package/es/elementDenylist.js +1 -0
- package/es/enhance-user-content/doc_previews.js +17 -28
- package/es/enhance-user-content/enhance_user_content.js +28 -60
- package/es/enhance-user-content/external_links.js +5 -8
- package/es/enhance-user-content/index.js +1 -0
- package/es/enhance-user-content/instructure_helper.js +12 -34
- package/es/enhance-user-content/jqueryish_funcs.js +8 -11
- package/es/enhance-user-content/mathml.js +35 -82
- package/es/enhance-user-content/media_comment_thumbnail.js +5 -17
- package/es/format-message.js +3 -4
- package/es/getThemeVars.js +8 -6
- package/es/getTranslations.js +1 -78
- package/es/index.js +3 -1
- package/es/rce/AlertMessageArea.js +1 -1
- package/es/rce/DraggingBlocker.js +4 -2
- package/es/rce/KeyboardShortcutModal.js +1 -0
- package/es/rce/RCE.js +12 -11
- package/es/rce/RCEGlobals.js +12 -10
- package/es/rce/RCEVariants.js +27 -10
- package/es/rce/RCEWrapper.js +167 -386
- package/es/rce/RCEWrapperProps.js +8 -3
- package/es/rce/RceHtmlEditor.js +5 -8
- package/es/rce/ResizeHandle.js +3 -8
- package/es/rce/RestoreAutoSaveModal.js +1 -2
- package/es/rce/ShowOnFocusButton/index.js +0 -6
- package/es/rce/StatusBar.js +8 -37
- package/es/rce/alertHandler.js +1 -4
- package/es/rce/contentInsertion.js +35 -57
- package/es/rce/contentInsertionUtils.js +6 -8
- package/es/rce/contentRendering.js +7 -12
- package/es/rce/customEvents.js +1 -0
- package/es/rce/editorLanguage.js +22 -10
- package/es/rce/indicatorRegion.js +6 -5
- package/es/rce/normalizeLocale.js +5 -3
- package/es/rce/normalizeProps.js +3 -1
- package/es/rce/plugins/instructure-ui-icons/plugin.js +21 -3
- package/es/rce/plugins/instructure_color/clickCallback.js +84 -0
- package/es/rce/plugins/instructure_color/components/ColorPicker.js +299 -0
- package/es/rce/plugins/instructure_color/components/ColorPopup.js +68 -0
- package/es/rce/plugins/instructure_color/components/colorUtils.js +60 -0
- package/es/rce/plugins/instructure_color/plugin.js +40 -0
- package/es/rce/plugins/instructure_condensed_buttons/core/ListUtils.js +10 -3
- package/es/rce/plugins/instructure_condensed_buttons/plugin.js +1 -0
- package/es/rce/plugins/instructure_condensed_buttons/ui/alignment-button.js +1 -2
- package/es/rce/plugins/instructure_condensed_buttons/ui/directionality-button.js +3 -2
- package/es/rce/plugins/instructure_condensed_buttons/ui/indent-outdent-button.js +1 -0
- package/es/rce/plugins/instructure_condensed_buttons/ui/list-button.js +22 -15
- package/es/rce/plugins/instructure_condensed_buttons/ui/subscript-superscript-button.js +1 -2
- package/es/rce/plugins/instructure_documents/clickCallback.js +1 -0
- package/es/rce/plugins/instructure_documents/components/DocumentsPanel.js +1 -9
- package/es/rce/plugins/instructure_documents/components/Link.js +3 -18
- package/es/rce/plugins/instructure_documents/plugin.js +7 -14
- package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.js +4 -2
- package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedPreference.js +1 -2
- package/es/rce/plugins/instructure_equation/EquationEditorModal/index.js +12 -29
- package/es/rce/plugins/instructure_equation/EquationEditorModal/latexTextareaUtil.js +11 -12
- package/es/rce/plugins/instructure_equation/EquationEditorModal/parseLatex.js +4 -3
- package/es/rce/plugins/instructure_equation/EquationEditorModal/styles.js +4 -2
- package/es/rce/plugins/instructure_equation/EquationEditorToolbar/buttons.js +13 -7
- package/es/rce/plugins/instructure_equation/EquationEditorToolbar/index.js +4 -7
- package/es/rce/plugins/instructure_equation/MathIcon/index.js +1 -1
- package/es/rce/plugins/instructure_equation/MathIcon/svgs.js +1 -1
- package/es/rce/plugins/instructure_equation/clickCallback.js +2 -5
- package/es/rce/plugins/instructure_equation/mathlive/index.js +1 -1
- package/es/rce/plugins/instructure_equation/plugin.js +7 -10
- package/es/rce/plugins/instructure_fullscreen/plugin.js +3 -6
- package/es/rce/plugins/instructure_html_view/clickCallback.js +1 -0
- package/es/rce/plugins/instructure_html_view/plugin.js +5 -4
- package/es/rce/plugins/instructure_icon_maker/clickCallback.js +2 -4
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ColorSection.js +1 -2
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/CreateIconMakerForm.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Footer.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Group.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Header.js +1 -2
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.js +25 -22
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageOptions.js +7 -11
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageSection.js +27 -23
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ModeSelect.js +5 -4
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/MultiColor/index.js +11 -9
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/MultiColor/svg.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGList.js +5 -4
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGThumbnail.js +1 -3
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/index.js +7 -7
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/svg.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Upload.js +27 -20
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/index.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/propTypes.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/utils.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Preview.js +4 -4
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ShapeSection.js +1 -2
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/TextSection.js +1 -5
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/index.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/IconMakerTray.js +18 -33
- package/es/rce/plugins/instructure_icon_maker/components/SavedIconMakerList.js +4 -4
- package/es/rce/plugins/instructure_icon_maker/plugin.js +10 -14
- package/es/rce/plugins/instructure_icon_maker/reducers/imageSection.js +37 -38
- package/es/rce/plugins/instructure_icon_maker/reducers/svgSettings.js +24 -24
- package/es/rce/plugins/instructure_icon_maker/registerEditToolbar.js +1 -3
- package/es/rce/plugins/instructure_icon_maker/svg/constants.js +4 -3
- package/es/rce/plugins/instructure_icon_maker/svg/font.js +3 -1
- package/es/rce/plugins/instructure_icon_maker/svg/image.js +69 -83
- package/es/rce/plugins/instructure_icon_maker/svg/index.js +11 -15
- package/es/rce/plugins/instructure_icon_maker/svg/metadata.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/svg/settings.js +32 -39
- package/es/rce/plugins/instructure_icon_maker/svg/shape.js +1 -49
- package/es/rce/plugins/instructure_icon_maker/svg/text.js +7 -92
- package/es/rce/plugins/instructure_icon_maker/svg/utils.js +1 -7
- package/es/rce/plugins/instructure_icon_maker/utils/IconMakerClose.js +2 -6
- package/es/rce/plugins/instructure_icon_maker/utils/IconMakerFormHasChanges.js +1 -15
- package/es/rce/plugins/instructure_icon_maker/utils/addIconMakerAttributes.js +3 -4
- package/es/rce/plugins/instructure_icon_maker/utils/iconValidation.js +1 -1
- package/es/rce/plugins/instructure_icon_maker/utils/iconsLabels.js +1 -0
- package/es/rce/plugins/instructure_icon_maker/utils/useDebouncedValue.js +12 -13
- package/es/rce/plugins/instructure_image/ImageEmbedOptions.js +6 -24
- package/es/rce/plugins/instructure_image/ImageList/Image.js +1 -6
- package/es/rce/plugins/instructure_image/ImageList/index.js +1 -2
- package/es/rce/plugins/instructure_image/ImageOptionsTray/TrayController.js +7 -27
- package/es/rce/plugins/instructure_image/ImageOptionsTray/index.js +3 -16
- package/es/rce/plugins/instructure_image/Images/index.js +1 -3
- package/es/rce/plugins/instructure_image/clickCallback.js +1 -0
- package/es/rce/plugins/instructure_image/plugin.js +13 -18
- package/es/rce/plugins/instructure_links/clickCallback.js +1 -0
- package/es/rce/plugins/instructure_links/components/AccordionSection.js +1 -0
- package/es/rce/plugins/instructure_links/components/CollectionPanel.js +1 -3
- package/es/rce/plugins/instructure_links/components/Link.js +7 -19
- package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/LinkOptionsDialogController.js +1 -21
- package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/index.js +1 -4
- package/es/rce/plugins/instructure_links/components/LinkOptionsTray/LinkOptionsTrayController.js +3 -20
- package/es/rce/plugins/instructure_links/components/LinkOptionsTray/index.js +1 -12
- package/es/rce/plugins/instructure_links/components/LinkSet.js +4 -20
- package/es/rce/plugins/instructure_links/components/LinksPanel.js +1 -2
- package/es/rce/plugins/instructure_links/components/NavigationPanel.js +7 -9
- package/es/rce/plugins/instructure_links/components/NoResults.js +1 -7
- package/es/rce/plugins/instructure_links/plugin.js +17 -40
- package/es/rce/plugins/instructure_links/validateURL.js +81 -36
- package/es/rce/plugins/instructure_media_embed/clickCallback.js +2 -5
- package/es/rce/plugins/instructure_media_embed/components/Embed.js +1 -0
- package/es/rce/plugins/instructure_media_embed/plugin.js +7 -3
- package/es/rce/plugins/instructure_paste/pasteMenuCommand.js +1 -5
- package/es/rce/plugins/instructure_paste/plugin.js +27 -29
- package/es/rce/plugins/instructure_rce_external_tools/ExternalToolsEnv.js +14 -53
- package/es/rce/plugins/instructure_rce_external_tools/RceToolWrapper.js +21 -49
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.js +11 -42
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.js +1 -2
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogTray.js +1 -1
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.js +2 -10
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionItem.js +1 -2
- package/es/rce/plugins/instructure_rce_external_tools/components/util/ExpandoText.js +1 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.js +2 -1
- package/es/rce/{__mocks__/_mockStudioPlayer.js → plugins/instructure_rce_external_tools/constants.js} +11 -3
- package/es/rce/plugins/instructure_rce_external_tools/dialog-helper.js +19 -4
- package/es/rce/plugins/instructure_rce_external_tools/helpers/tags.js +0 -2
- package/es/rce/plugins/instructure_rce_external_tools/jquery/jquery.dropdownList.js +130 -136
- package/es/rce/plugins/instructure_rce_external_tools/lti11-content-items/RceLti11ContentItem.js +100 -95
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/Lti13ContentItemJson.js +1 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/RceLti13ContentItem.js +2 -19
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/BaseLinkContentItem.js +1 -14
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/HtmlFragmentContentItem.js +1 -6
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/ImageContentItem.js +1 -9
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/LinkContentItem.js +1 -1
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/ResourceLinkContentItem.js +3 -5
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/processEditorContentItems.js +18 -10
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/rceLti13ContentItemFromJson.js +4 -4
- package/es/rce/plugins/instructure_rce_external_tools/plugin.js +7 -16
- package/es/rce/plugins/instructure_rce_external_tools/util/addParentFrameContextToUrl.js +1 -1
- package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.js +1 -25
- package/es/rce/plugins/instructure_record/AudioOptionsTray/index.js +1 -4
- package/es/rce/plugins/instructure_record/MediaPanel/index.js +1 -9
- package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.js +8 -51
- package/es/rce/plugins/instructure_record/VideoOptionsTray/index.js +4 -17
- package/es/rce/plugins/instructure_record/clickCallback.js +7 -15
- package/es/rce/plugins/instructure_record/mediaTranslations.js +1 -0
- package/es/rce/plugins/instructure_record/plugin.js +11 -18
- package/es/rce/plugins/instructure_search_and_replace/clickCallback.js +2 -5
- package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTray.js +20 -35
- package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTrayController.js +3 -18
- package/es/rce/plugins/instructure_search_and_replace/getSelectionContext.js +2 -9
- package/es/rce/plugins/instructure_search_and_replace/plugin.js +1 -3
- package/es/rce/plugins/instructure_studio_media_options/plugin.js +1 -1
- package/es/rce/plugins/instructure_wordcount/clickCallback.js +2 -5
- package/es/rce/plugins/instructure_wordcount/components/WordCountModal.js +1 -4
- package/es/rce/plugins/instructure_wordcount/plugin.js +1 -0
- package/es/rce/plugins/instructure_wordcount/utils/countContent.js +1 -8
- package/es/rce/plugins/instructure_wordcount/utils/tableContent.js +1 -0
- package/es/rce/plugins/shared/CanvasContentTray.js +22 -49
- package/es/rce/plugins/shared/CheckerboardStyling.js +1 -1
- package/es/rce/plugins/shared/ColorInput.js +5 -14
- package/es/rce/plugins/shared/ConditionalTooltip.js +1 -0
- package/es/rce/plugins/shared/ContentSelection.js +17 -58
- package/es/rce/plugins/shared/DimensionUtils.js +1 -8
- package/es/rce/plugins/shared/DimensionsInput/DimensionInput.js +6 -6
- package/es/rce/plugins/shared/DimensionsInput/index.js +37 -15
- package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.js +5 -29
- package/es/rce/plugins/shared/ErrorBoundary.js +2 -5
- package/es/rce/plugins/shared/EventUtils.js +1 -3
- package/es/rce/plugins/shared/Filter.js +8 -38
- package/es/rce/plugins/shared/FixedContentTray.js +3 -3
- package/es/rce/plugins/shared/ImageCropper/DirectionRegion.js +1 -8
- package/es/rce/plugins/shared/ImageCropper/Modal.js +4 -7
- package/es/rce/plugins/shared/ImageCropper/Preview.js +7 -11
- package/es/rce/plugins/shared/ImageCropper/constants.js +1 -0
- package/es/rce/plugins/shared/ImageCropper/controls/CustomNumberInput.js +2 -5
- package/es/rce/plugins/shared/ImageCropper/controls/ResetControls.js +1 -0
- package/es/rce/plugins/shared/ImageCropper/controls/RotationControls.js +1 -10
- package/es/rce/plugins/shared/ImageCropper/controls/ShapeControls.js +1 -0
- package/es/rce/plugins/shared/ImageCropper/controls/ZoomControls.js +1 -11
- package/es/rce/plugins/shared/ImageCropper/controls/index.js +1 -0
- package/es/rce/plugins/shared/ImageCropper/controls/useDebouncedNumericValue.js +3 -16
- package/es/rce/plugins/shared/ImageCropper/controls/utils.js +1 -2
- package/es/rce/plugins/shared/ImageCropper/imageCropUtils.js +1 -10
- package/es/rce/plugins/shared/ImageCropper/index.js +1 -0
- package/es/rce/plugins/shared/ImageCropper/propTypes.js +1 -0
- package/es/rce/plugins/shared/ImageCropper/reducers/imageCropper.js +15 -14
- package/es/rce/plugins/shared/ImageCropper/shape.js +1 -0
- package/es/rce/plugins/shared/ImageCropper/svg/index.js +1 -2
- package/es/rce/plugins/shared/ImageCropper/svg/shape.js +1 -17
- package/es/rce/plugins/shared/ImageCropper/svg/utils.js +1 -0
- package/es/rce/plugins/shared/ImageCropper/useKeyMouseEvents.js +19 -46
- package/es/rce/plugins/shared/ImageCropper/useMouseWheel.js +8 -10
- package/es/rce/plugins/shared/ImageOptionsForm.js +1 -2
- package/es/rce/plugins/shared/LinkDisplay.js +1 -2
- package/es/rce/plugins/shared/PreviewIcon.js +1 -6
- package/es/rce/plugins/shared/Previewable.js +1 -0
- package/es/rce/plugins/shared/RceFileBrowser.js +5 -7
- package/es/rce/plugins/shared/StoreContext.js +1 -2
- package/es/rce/plugins/shared/StudioLtiSupportUtils.js +10 -6
- package/es/rce/plugins/shared/UnknownFileTypePanel.js +1 -0
- package/es/rce/plugins/shared/Upload/CanvasContentPanel.js +13 -18
- package/es/rce/plugins/shared/Upload/CategoryProcessor.js +1 -1
- package/es/rce/plugins/shared/Upload/ComputerPanel.js +8 -26
- package/es/rce/plugins/shared/Upload/PanelFilter.js +3 -12
- package/es/rce/plugins/shared/Upload/SvgCategoryProcessor.js +4 -3
- package/es/rce/plugins/shared/Upload/UploadFile.js +15 -18
- package/es/rce/plugins/shared/Upload/UploadFileModal.js +9 -25
- package/es/rce/plugins/shared/Upload/UrlPanel.js +1 -0
- package/es/rce/plugins/shared/Upload/UsageRightsSelectBox.js +7 -12
- package/es/rce/plugins/shared/Upload/doFileUpload.js +4 -6
- package/es/rce/plugins/shared/Upload/index.js +1 -0
- package/es/rce/plugins/shared/ai_tools/AIResponseModal.js +1 -3
- package/es/rce/plugins/shared/ai_tools/AIToolsTray.js +6 -24
- package/es/rce/plugins/shared/ai_tools/aiicons.js +1 -0
- package/es/rce/plugins/shared/ai_tools/index.js +1 -0
- package/es/rce/plugins/shared/buildDownloadUrl.js +0 -2
- package/es/rce/plugins/shared/canvasContentUtils.js +6 -9
- package/es/rce/plugins/shared/compressionUtils.js +1 -8
- package/es/rce/plugins/shared/dateUtils.js +1 -1
- package/es/rce/plugins/shared/do-fetch-api-effect/defaultFetchOptions.js +4 -2
- package/es/rce/plugins/shared/do-fetch-api-effect/doFetchApi.js +7 -10
- package/es/rce/plugins/shared/do-fetch-api-effect/index.js +1 -0
- package/es/rce/plugins/shared/do-fetch-api-effect/parse-link-header.js +6 -20
- package/es/rce/plugins/shared/do-fetch-api-effect/query-string-encoding.js +5 -3
- package/es/rce/plugins/shared/fileShape.js +4 -9
- package/es/rce/plugins/shared/fileTypeUtils.js +32 -42
- package/es/rce/plugins/shared/fileUtils.js +1 -2
- package/es/rce/plugins/shared/linkUtils.js +1 -16
- package/es/rce/plugins/shared/round.js +1 -0
- package/es/rce/plugins/shared/trayUtils.js +4 -3
- package/es/rce/plugins/shared/useDataUrl.js +9 -9
- package/es/rce/plugins/shared/useFilterSettings.js +3 -3
- package/es/rce/plugins/tinymce-a11y-checker/components/ColorField.js +2 -6
- package/es/rce/plugins/tinymce-a11y-checker/components/checker.js +5 -63
- package/es/rce/plugins/tinymce-a11y-checker/components/color-picker.js +1 -2
- package/es/rce/plugins/tinymce-a11y-checker/components/placeholder-svg.js +1 -0
- package/es/rce/plugins/tinymce-a11y-checker/components/pointer.js +1 -0
- package/es/rce/plugins/tinymce-a11y-checker/node-checker.js +1 -6
- package/es/rce/plugins/tinymce-a11y-checker/plugin.js +4 -7
- package/es/rce/plugins/tinymce-a11y-checker/rules/adjacent-links.js +3 -26
- package/es/rce/plugins/tinymce-a11y-checker/rules/headings-sequence.js +9 -38
- package/es/rce/plugins/tinymce-a11y-checker/rules/headings-start-at-h2.js +1 -5
- package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt-filename.js +1 -2
- package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt-length.js +1 -1
- package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt.js +1 -2
- package/es/rce/plugins/tinymce-a11y-checker/rules/index.js +1 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/large-text-contrast.js +1 -4
- package/es/rce/plugins/tinymce-a11y-checker/rules/list-structure.js +5 -24
- package/es/rce/plugins/tinymce-a11y-checker/rules/paragraphs-for-headings.js +1 -3
- package/es/rce/plugins/tinymce-a11y-checker/rules/small-text-contrast.js +1 -6
- package/es/rce/plugins/tinymce-a11y-checker/rules/table-caption.js +1 -3
- package/es/rce/plugins/tinymce-a11y-checker/rules/table-header-scope.js +1 -2
- package/es/rce/plugins/tinymce-a11y-checker/rules/table-header.js +1 -9
- package/es/rce/plugins/tinymce-a11y-checker/utils/colors.js +1 -0
- package/es/rce/plugins/tinymce-a11y-checker/utils/describe.js +1 -7
- package/es/rce/plugins/tinymce-a11y-checker/utils/dom.js +1 -26
- package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.js +16 -15
- package/es/rce/plugins/tinymce-a11y-checker/utils/rgb-hex.js +7 -10
- package/es/rce/plugins/tinymce-a11y-checker/utils/strings.js +1 -4
- package/es/rce/root.js +9 -8
- package/es/rce/sanitizePlugins.js +1 -3
- package/es/rce/style.js +1 -4
- package/es/rce/tinyRCE.js +13 -9
- package/es/rce/tinymce.oxide.content.min.css.js +1 -0
- package/es/rce/tinymce.oxide.skin.min.css.js +1 -0
- package/es/rce/transformContent.js +8 -10
- package/es/rce/types.js +1 -0
- package/es/rce/userOS.js +1 -1
- package/es/rce/wrapInitCb.js +50 -43
- package/es/rcs/api.js +61 -116
- package/es/rcs/buildError.js +5 -17
- package/es/rcs/fake.js +4 -13
- package/es/sidebar/actions/all_files.js +2 -0
- package/es/sidebar/actions/data.js +4 -7
- package/es/sidebar/actions/documents.js +9 -6
- package/es/sidebar/actions/files.js +3 -6
- package/es/sidebar/actions/filter.js +1 -0
- package/es/sidebar/actions/flickr.js +1 -1
- package/es/sidebar/actions/images.js +12 -11
- package/es/sidebar/actions/links.js +1 -0
- package/es/sidebar/actions/media.js +12 -10
- package/es/sidebar/actions/session.js +1 -3
- package/es/sidebar/actions/ui.js +1 -0
- package/es/sidebar/actions/upload.js +14 -39
- package/es/sidebar/containers/Sidebar.js +1 -2
- package/es/sidebar/containers/sidebarHandlers.js +3 -1
- package/es/sidebar/dragHtml.js +5 -3
- package/es/sidebar/reducers/all_files.js +4 -3
- package/es/sidebar/reducers/collection.js +12 -13
- package/es/sidebar/reducers/collections.js +5 -5
- package/es/sidebar/reducers/documents.js +6 -13
- package/es/sidebar/reducers/files.js +3 -3
- package/es/sidebar/reducers/filter.js +1 -8
- package/es/sidebar/reducers/flickr.js +9 -9
- package/es/sidebar/reducers/folder.js +15 -15
- package/es/sidebar/reducers/folders.js +3 -3
- package/es/sidebar/reducers/images.js +3 -13
- package/es/sidebar/reducers/index.js +3 -1
- package/es/sidebar/reducers/media.js +6 -13
- package/es/sidebar/reducers/newPageLinkExpanded.js +1 -2
- package/es/sidebar/reducers/noop.js +1 -0
- package/es/sidebar/reducers/rootFolderId.js +1 -2
- package/es/sidebar/reducers/session.js +3 -3
- package/es/sidebar/reducers/ui.js +3 -16
- package/es/sidebar/reducers/upload.js +8 -40
- package/es/sidebar/store/configureStore.js +1 -0
- package/es/sidebar/store/initialState.js +13 -24
- package/es/translations/locales/ab.js +1 -0
- package/es/translations/locales/ar.js +67 -9
- package/es/translations/locales/ca.js +67 -9
- package/es/translations/locales/cs.js +1 -0
- package/es/translations/locales/cs_CZ.js +1 -0
- package/es/translations/locales/cy.js +67 -9
- package/es/translations/locales/da-x-k12.js +67 -9
- package/es/translations/locales/da.js +67 -9
- package/es/translations/locales/da_DK.js +1 -0
- package/es/translations/locales/de.js +67 -9
- package/es/translations/locales/el.js +4 -0
- package/es/translations/locales/en-AU-x-unimelb.js +67 -9
- package/es/translations/locales/en-GB-x-ukhe.js +67 -9
- package/es/translations/locales/en.js +72 -8
- package/es/translations/locales/en_AU.js +67 -9
- package/es/translations/locales/en_CA.js +67 -9
- package/es/translations/locales/en_CY.js +67 -9
- package/es/translations/locales/en_GB.js +67 -9
- package/es/translations/locales/en_NZ.js +1 -0
- package/es/translations/locales/en_SE.js +1 -0
- package/es/translations/locales/en_US.js +1 -0
- package/es/translations/locales/es.js +67 -9
- package/es/translations/locales/es_ES.js +67 -9
- package/es/translations/locales/es_GT.js +1 -0
- package/es/translations/locales/fa_IR.js +7 -0
- package/es/translations/locales/fi.js +67 -9
- package/es/translations/locales/fr.js +67 -9
- package/es/translations/locales/fr_CA.js +68 -10
- package/es/translations/locales/ga.js +5 -13
- package/es/translations/locales/he.js +7 -0
- package/es/translations/locales/hi.js +67 -9
- package/es/translations/locales/ht.js +67 -9
- package/es/translations/locales/hu.js +7 -6
- package/es/translations/locales/hu_HU.js +1 -0
- package/es/translations/locales/hy.js +1 -0
- package/es/translations/locales/id.js +67 -9
- package/es/translations/locales/id_ID.js +1 -0
- package/es/translations/locales/is.js +67 -9
- package/es/translations/locales/it.js +67 -9
- package/es/translations/locales/ja.js +67 -9
- package/es/translations/locales/ko.js +1 -0
- package/es/translations/locales/ko_KR.js +1 -0
- package/es/translations/locales/lt.js +1 -0
- package/es/translations/locales/lt_LT.js +1 -0
- package/es/translations/locales/mi.js +67 -9
- package/es/translations/locales/mn_MN.js +1 -0
- package/es/translations/locales/ms.js +67 -9
- package/es/translations/locales/nb-x-k12.js +67 -9
- package/es/translations/locales/nb.js +67 -9
- package/es/translations/locales/nl.js +67 -9
- package/es/translations/locales/nl_NL.js +1 -0
- package/es/translations/locales/nn.js +7 -6
- package/es/translations/locales/pl.js +67 -9
- package/es/translations/locales/pt.js +67 -9
- package/es/translations/locales/pt_BR.js +67 -9
- package/es/translations/locales/ro.js +1 -0
- package/es/translations/locales/ru.js +67 -9
- package/es/translations/locales/se.js +1 -0
- package/es/translations/locales/sl.js +67 -9
- package/es/translations/locales/sv-x-k12.js +67 -9
- package/es/translations/locales/sv.js +67 -9
- package/es/translations/locales/sv_SE.js +1 -0
- package/es/translations/locales/tg.js +1 -0
- package/es/translations/locales/th.js +67 -9
- package/es/translations/locales/th_TH.js +1 -0
- package/es/translations/locales/tl_PH.js +1 -0
- package/es/translations/locales/tr.js +7 -0
- package/es/translations/locales/uk_UA.js +7 -0
- package/es/translations/locales/vi.js +67 -9
- package/es/translations/locales/vi_VN.js +1 -0
- package/es/translations/locales/zh-Hans.js +67 -9
- package/es/translations/locales/zh-Hant.js +67 -9
- package/es/translations/locales/zh.js +67 -9
- package/es/translations/locales/zh_HK.js +67 -9
- package/es/translations/locales/zh_TW.Big5.js +1 -0
- package/es/translations/locales/zh_TW.js +1 -0
- package/es/translations/tinymce/ar_SA.js +1 -0
- package/es/translations/tinymce/fi.js +1 -0
- package/es/translations/tinymce/ga.js +1 -0
- package/es/translations/tinymce/id.js +1 -0
- package/es/translations/tinymce/ru.js +1 -0
- package/es/translations/tinymce/ru_RU.js +1 -0
- package/es/translations/tinymce/sl.js +1 -0
- package/es/translations/tinymce/sr.js +1 -0
- package/es/translations/tinymce/th.js +1 -0
- package/es/translations/tinymce/uk_UA.js +1 -0
- package/es/translations/tinymce/vi_VN.js +1 -0
- package/es/util/TypedDict.js +4 -2
- package/es/util/encrypted-storage.js +3 -13
- package/es/util/file-url-util.js +1 -6
- package/es/util/fullscreenHelpers.js +4 -1
- package/es/util/instui-icon-helper.js +4 -3
- package/es/util/loadingPlaceholder.js +38 -39
- package/es/util/simpleCache.js +0 -3
- package/es/util/string-util.js +1 -1
- package/es/util/textarea-editing-util.js +3 -7
- package/es/util/tinymce-plugin-util.js +0 -5
- package/es/util/url-util.js +16 -25
- package/eslint.config.js +239 -0
- package/jest.config.js +1 -1
- package/package.json +76 -81
- package/scripts/build-canvas +2 -1
- package/scripts/build.js +4 -4
- package/testcafe/RCEWrapper.test.js +0 -1
- package/testcafe/StatusBar.test.js +0 -1
- package/testcafe/axe.test.js +3 -4
- package/testcafe/enhanceUserContent.test.js +0 -1
- package/tsconfig.json +20 -15
- package/.eslintrc +0 -45
- package/.prettierignore +0 -6
- package/es/rce/__mocks__/_mockCryptoEs.js +0 -124
- package/es/rce/__mocks__/styleMock.js +0 -18
- package/es/rce/__mocks__/tinymceReact.js +0 -55
- package/es/rce/plugins/tinymce-a11y-checker/rules/__mocks__/index.js +0 -53
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
import formatMessage from '../../format-message';
|
|
19
20
|
import '../tinymce/zh_TW';
|
|
20
21
|
const locale = {
|
|
@@ -174,6 +175,9 @@ const locale = {
|
|
|
174
175
|
"available_folders_694d0436": {
|
|
175
176
|
"message": "可用資料夾"
|
|
176
177
|
},
|
|
178
|
+
"background_1bc88842": {
|
|
179
|
+
"message": "背景"
|
|
180
|
+
},
|
|
177
181
|
"backslash_b2d5442d": {
|
|
178
182
|
"message": "反斜线"
|
|
179
183
|
},
|
|
@@ -204,6 +208,9 @@ const locale = {
|
|
|
204
208
|
"blue_daf8fea9": {
|
|
205
209
|
"message": "藍色"
|
|
206
210
|
},
|
|
211
|
+
"border_5b08b06d": {
|
|
212
|
+
"message": "邊框"
|
|
213
|
+
},
|
|
207
214
|
"bottom_15a2a9be": {
|
|
208
215
|
"message": "底部"
|
|
209
216
|
},
|
|
@@ -327,12 +334,24 @@ const locale = {
|
|
|
327
334
|
"collapse_to_hide_types_1ab46d2e": {
|
|
328
335
|
"message": "收起以隱藏 { types }"
|
|
329
336
|
},
|
|
337
|
+
"color_a363e1b0": {
|
|
338
|
+
"message": "顏色"
|
|
339
|
+
},
|
|
340
|
+
"color_contrast_4c418add": {
|
|
341
|
+
"message": "顏色對比度"
|
|
342
|
+
},
|
|
343
|
+
"color_contrast_ratio_687782f0": {
|
|
344
|
+
"message": "顏色對比度比率"
|
|
345
|
+
},
|
|
330
346
|
"color_picker_6b359edf": {
|
|
331
347
|
"message": "顏色選擇器"
|
|
332
348
|
},
|
|
333
349
|
"color_picker_colorname_selected_ad4cf400": {
|
|
334
350
|
"message": "顏色選擇器(已選擇 { colorName } 色)"
|
|
335
351
|
},
|
|
352
|
+
"color_popup_af39810f": {
|
|
353
|
+
"message": "顏色彈出視窗"
|
|
354
|
+
},
|
|
336
355
|
"column_e1ae5c64": {
|
|
337
356
|
"message": "欄"
|
|
338
357
|
},
|
|
@@ -738,6 +757,9 @@ const locale = {
|
|
|
738
757
|
"f_function_fe422d65": {
|
|
739
758
|
"message": "F(函數)"
|
|
740
759
|
},
|
|
760
|
+
"fail_544e5dde": {
|
|
761
|
+
"message": "失敗"
|
|
762
|
+
},
|
|
741
763
|
"failed_getting_file_contents_e9ea19f4": {
|
|
742
764
|
"message": "無法取得檔案內容"
|
|
743
765
|
},
|
|
@@ -837,6 +859,9 @@ const locale = {
|
|
|
837
859
|
"grades_a61eba0a": {
|
|
838
860
|
"message": "成績"
|
|
839
861
|
},
|
|
862
|
+
"graphics_text_bc9568bc": {
|
|
863
|
+
"message": "圖形文字"
|
|
864
|
+
},
|
|
840
865
|
"greater_than_e98af662": {
|
|
841
866
|
"message": ">"
|
|
842
867
|
},
|
|
@@ -1044,6 +1069,18 @@ const locale = {
|
|
|
1044
1069
|
"infinity_7a10f206": {
|
|
1045
1070
|
"message": "無限"
|
|
1046
1071
|
},
|
|
1072
|
+
"input_field_for_alpha_678265fd": {
|
|
1073
|
+
"message": "α 系數的輸入欄位"
|
|
1074
|
+
},
|
|
1075
|
+
"input_field_for_blue_561e020a": {
|
|
1076
|
+
"message": "藍色的輸入欄位"
|
|
1077
|
+
},
|
|
1078
|
+
"input_field_for_green_67f8b2b6": {
|
|
1079
|
+
"message": "綠色的輸入欄位"
|
|
1080
|
+
},
|
|
1081
|
+
"input_field_for_red_86a84615": {
|
|
1082
|
+
"message": "紅色的輸入欄位"
|
|
1083
|
+
},
|
|
1047
1084
|
"insert_593145ef": {
|
|
1048
1085
|
"message": "插入"
|
|
1049
1086
|
},
|
|
@@ -1101,6 +1138,9 @@ const locale = {
|
|
|
1101
1138
|
"large_9c5e80e7": {
|
|
1102
1139
|
"message": "大"
|
|
1103
1140
|
},
|
|
1141
|
+
"large_text_e7ba08cd": {
|
|
1142
|
+
"message": "大文字"
|
|
1143
|
+
},
|
|
1104
1144
|
"learn_more_about_adjacent_links_2cb9762c": {
|
|
1105
1145
|
"message": "了解更多有關相鄰連結"
|
|
1106
1146
|
},
|
|
@@ -1335,12 +1375,6 @@ const locale = {
|
|
|
1335
1375
|
"music_icon_4db5c972": {
|
|
1336
1376
|
"message": "音樂圖示"
|
|
1337
1377
|
},
|
|
1338
|
-
"must_be_at_least_percentage_22e373b6": {
|
|
1339
|
-
"message": "必須至少 { percentage }%"
|
|
1340
|
-
},
|
|
1341
|
-
"must_be_at_least_width_x_height_px_41dc825e": {
|
|
1342
|
-
"message": "必須至少為 { width } x { height } px"
|
|
1343
|
-
},
|
|
1344
1378
|
"my_files_2f621040": {
|
|
1345
1379
|
"message": "我的檔案"
|
|
1346
1380
|
},
|
|
@@ -1455,6 +1489,9 @@ const locale = {
|
|
|
1455
1489
|
"none_selected_b93d56d2": {
|
|
1456
1490
|
"message": "未選擇任何項目"
|
|
1457
1491
|
},
|
|
1492
|
+
"normal_text_7b03da48": {
|
|
1493
|
+
"message": "一般文字"
|
|
1494
|
+
},
|
|
1458
1495
|
"not_equal_6e2980e6": {
|
|
1459
1496
|
"message": "不等於"
|
|
1460
1497
|
},
|
|
@@ -1524,9 +1561,6 @@ const locale = {
|
|
|
1524
1561
|
"outline_size_a6059a21": {
|
|
1525
1562
|
"message": "輪廓大小"
|
|
1526
1563
|
},
|
|
1527
|
-
"p_is_not_a_valid_protocol_which_must_be_ftp_http_h_adf13fc2": {
|
|
1528
|
-
"message": "{ p }並非有效協議,必須使用 ftp、http、https、mailto、skype、tel 或忽略此項"
|
|
1529
|
-
},
|
|
1530
1564
|
"page_50c4823d": {
|
|
1531
1565
|
"message": "頁面"
|
|
1532
1566
|
},
|
|
@@ -1545,6 +1579,9 @@ const locale = {
|
|
|
1545
1579
|
"partial_derivative_4a9159df": {
|
|
1546
1580
|
"message": "部份(導數)"
|
|
1547
1581
|
},
|
|
1582
|
+
"pass_1c19a2b3": {
|
|
1583
|
+
"message": "合格"
|
|
1584
|
+
},
|
|
1548
1585
|
"paste_5963d1c1": {
|
|
1549
1586
|
"message": "貼上"
|
|
1550
1587
|
},
|
|
@@ -1563,6 +1600,9 @@ const locale = {
|
|
|
1563
1600
|
"percentage_must_be_a_number_8033c341": {
|
|
1564
1601
|
"message": "百分比必須是數字"
|
|
1565
1602
|
},
|
|
1603
|
+
"percentage_must_be_at_least_percentage_a98ca8fc": {
|
|
1604
|
+
"message": "百分比必須至少為 { percentage }%"
|
|
1605
|
+
},
|
|
1566
1606
|
"performing_arts_icon_f3497486": {
|
|
1567
1607
|
"message": "表演藝術圖示"
|
|
1568
1608
|
},
|
|
@@ -1584,12 +1624,18 @@ const locale = {
|
|
|
1584
1624
|
"pi_variant_10f5f520": {
|
|
1585
1625
|
"message": "π(變量)"
|
|
1586
1626
|
},
|
|
1627
|
+
"pick_a_color_557abfb0": {
|
|
1628
|
+
"message": "選擇一種顏色"
|
|
1629
|
+
},
|
|
1587
1630
|
"pink_68ad45cb": {
|
|
1588
1631
|
"message": "粉紅色"
|
|
1589
1632
|
},
|
|
1590
1633
|
"pixels_52ece7d1": {
|
|
1591
1634
|
"message": "像素"
|
|
1592
1635
|
},
|
|
1636
|
+
"pixels_must_be_at_least_width_x_height_px_e965edd5": {
|
|
1637
|
+
"message": "像素必須至少為 { width } x { height }px"
|
|
1638
|
+
},
|
|
1593
1639
|
"play_1a47eaa7": {
|
|
1594
1640
|
"message": "播放"
|
|
1595
1641
|
},
|
|
@@ -1650,6 +1696,9 @@ const locale = {
|
|
|
1650
1696
|
"previous_findtext_8dfbfd30": {
|
|
1651
1697
|
"message": "上一個 { findText }"
|
|
1652
1698
|
},
|
|
1699
|
+
"previously_chosen_colors_f1338315": {
|
|
1700
|
+
"message": "之前選擇的顏色"
|
|
1701
|
+
},
|
|
1653
1702
|
"prime_917ea60e": {
|
|
1654
1703
|
"message": "質數"
|
|
1655
1704
|
},
|
|
@@ -2502,6 +2551,15 @@ const locale = {
|
|
|
2502
2551
|
"yes_dde87d5": {
|
|
2503
2552
|
"message": "是"
|
|
2504
2553
|
},
|
|
2554
|
+
"you_are_on_a_color_palette_to_navigate_on_the_pale_227fc3a6": {
|
|
2555
|
+
"message": "您正在調色盤上。若要在調色盤上向上、向左、向下或向右導覽,請分別使用 ''W’、''A’、''S’ 和 ''D’ 按鈕"
|
|
2556
|
+
},
|
|
2557
|
+
"you_are_on_a_color_slider_to_navigate_the_slider_l_e800f68a": {
|
|
2558
|
+
"message": "您正在顏色滑鈕上。若要使用滑鈕向左或向右導覽,請分別使用 ''A’ 和 ''D’ 按鈕"
|
|
2559
|
+
},
|
|
2560
|
+
"you_are_on_an_alpha_slider_to_navigate_the_slider__3a014dc5": {
|
|
2561
|
+
"message": "您正在 α 滑鈕上。若要使用滑鈕向左或向右導覽,請分別使用 ''A’ 和 ''D’ 按鈕"
|
|
2562
|
+
},
|
|
2505
2563
|
"you_have_unsaved_changes_in_the_icon_maker_tray_do_e8cf5f1b": {
|
|
2506
2564
|
"message": "您在圖示製作者收集箱中有未儲存的變更。是否要繼續,但不儲存這些變更?"
|
|
2507
2565
|
},
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
import formatMessage from '../../format-message';
|
|
19
20
|
import '../tinymce/zh_CN';
|
|
20
21
|
const locale = {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
import formatMessage from '../../format-message';
|
|
19
20
|
import '../tinymce/zh_CN';
|
|
20
21
|
const locale = {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
tinymce.addI18n('ar_SA', {
|
|
19
20
|
Cut: '\u0642\u0635',
|
|
20
21
|
'Heading 5': '\u0631\u0623\u0633 \u0642\u0644\u0645 5',
|
|
@@ -15,5 +15,6 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
// No official TinyMCE translations for Finnish yet.
|
|
19
20
|
// Check https://www.tiny.cloud/get-tiny/language-packages/ for updates
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
tinymce.addI18n('ru', {
|
|
19
20
|
"Redo": "\u0412\u0435\u0440\u043d\u0443\u0442\u044c",
|
|
20
21
|
"Undo": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
tinymce.addI18n('ru_RU', {
|
|
19
20
|
Cut: '\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c',
|
|
20
21
|
'Heading 5': '\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 5',
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
tinymce.addI18n('th', {
|
|
19
20
|
"Redo": "\u0e17\u0e33\u0e43\u0e2b\u0e21\u0e48\u0e2d\u0e35\u0e01",
|
|
20
21
|
"Undo": "\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e01\u0e25\u0e31\u0e1a\u0e04\u0e37\u0e19",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
tinymce.addI18n('uk_UA', {
|
|
19
20
|
Redo: '\u0412\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438',
|
|
20
21
|
Undo: '\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438',
|
package/es/util/TypedDict.js
CHANGED
|
@@ -109,12 +109,14 @@
|
|
|
109
109
|
export function typedKeyDict(dict, keyProp) {
|
|
110
110
|
// Manually handle the default value of 'key'. TypeScript default values can't be used due to trickiness with the
|
|
111
111
|
// type inference.
|
|
112
|
-
const keyPropStr = keyProp === undefined ? 'key' : keyProp;
|
|
112
|
+
const keyPropStr = keyProp === undefined ? 'key' : keyProp;
|
|
113
113
|
|
|
114
|
+
// Add the key to the values in the map
|
|
114
115
|
const entriesWithKey = Object.entries(dict).map(entry => {
|
|
115
116
|
const key = entry[0];
|
|
116
117
|
const value = entry[1];
|
|
117
|
-
return [key, {
|
|
118
|
+
return [key, {
|
|
119
|
+
...value,
|
|
118
120
|
[keyPropStr]: key
|
|
119
121
|
}];
|
|
120
122
|
});
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
import CryptoES from 'crypto-es';
|
|
19
20
|
export default class EncryptedStorage {
|
|
20
21
|
constructor(passphrase) {
|
|
21
22
|
this.passphrase = void 0;
|
|
22
|
-
|
|
23
23
|
this.errorHandlerWrapper = callback => {
|
|
24
24
|
try {
|
|
25
25
|
return callback();
|
|
@@ -28,22 +28,18 @@ export default class EncryptedStorage {
|
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
|
|
32
31
|
this.passphrase = CryptoES.enc.Utf8.parse(passphrase);
|
|
33
32
|
}
|
|
34
|
-
|
|
35
33
|
setItem(key, content) {
|
|
36
34
|
return this.errorHandlerWrapper(() => {
|
|
37
35
|
// If passphrase is present, encrypt string and JSON stringify
|
|
38
36
|
let encrypted;
|
|
39
|
-
|
|
40
37
|
if (this.passphrase) {
|
|
41
38
|
encrypted = CryptoES.RC4.encrypt(content, this.passphrase, {
|
|
42
39
|
mode: CryptoES.mode.CFB,
|
|
43
40
|
padding: CryptoES.pad.AnsiX923
|
|
44
41
|
}).toString();
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
const data = JSON.stringify({
|
|
48
44
|
autosaveTimestamp: new Date().getTime(),
|
|
49
45
|
content: encrypted
|
|
@@ -51,16 +47,13 @@ export default class EncryptedStorage {
|
|
|
51
47
|
return window.localStorage.setItem(key, data);
|
|
52
48
|
});
|
|
53
49
|
}
|
|
54
|
-
|
|
55
50
|
getItem(key) {
|
|
56
51
|
return this.errorHandlerWrapper(() => {
|
|
57
52
|
const data = window.localStorage.getItem(key);
|
|
58
|
-
|
|
59
53
|
if (!data) {
|
|
60
54
|
return data;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
}
|
|
56
|
+
// If passphrase is present, parse JSON and decrypt string
|
|
64
57
|
if (this.passphrase) {
|
|
65
58
|
const parsedData = JSON.parse(data);
|
|
66
59
|
parsedData.content = CryptoES.RC4.decrypt(parsedData.content, this.passphrase, {
|
|
@@ -72,13 +65,10 @@ export default class EncryptedStorage {
|
|
|
72
65
|
}
|
|
73
66
|
});
|
|
74
67
|
}
|
|
75
|
-
|
|
76
68
|
key(index) {
|
|
77
69
|
return this.errorHandlerWrapper(() => window.localStorage.key(index));
|
|
78
70
|
}
|
|
79
|
-
|
|
80
71
|
removeItem(key) {
|
|
81
72
|
return this.errorHandlerWrapper(() => window.localStorage.removeItem(key));
|
|
82
73
|
}
|
|
83
|
-
|
|
84
74
|
}
|
package/es/util/file-url-util.js
CHANGED
|
@@ -15,30 +15,25 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
import * as URI from 'uri-js';
|
|
19
20
|
import { parseUrlOrNull } from './url-util';
|
|
20
21
|
const fileIdPatterns = [/\/\w+s\/\d+\/files\/(\d+)/];
|
|
21
22
|
export function guessCanvasFileIdFromUrl(inputUrlStr, restrictToOrigin) {
|
|
22
23
|
const uri = URI.parse(inputUrlStr);
|
|
23
|
-
|
|
24
24
|
if (restrictToOrigin != null) {
|
|
25
25
|
const url = parseUrlOrNull(inputUrlStr);
|
|
26
26
|
const originUrl = parseUrlOrNull(restrictToOrigin);
|
|
27
|
-
|
|
28
27
|
if ((url === null || url === void 0 ? void 0 : url.origin) !== (originUrl === null || originUrl === void 0 ? void 0 : originUrl.origin)) {
|
|
29
28
|
return null;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
|
|
33
31
|
if (uri.path == null || uri.path.length === 0) return null;
|
|
34
|
-
|
|
35
32
|
for (const pattern of fileIdPatterns) {
|
|
36
33
|
const match = uri.path.match(pattern);
|
|
37
|
-
|
|
38
34
|
if (match) {
|
|
39
35
|
return match[1];
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
|
-
|
|
43
38
|
return null;
|
|
44
39
|
}
|
|
@@ -15,13 +15,16 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
// safari implements only the webkit prefixed version of the fullscreen api
|
|
19
20
|
const FS_ELEMENT = document.fullscreenElement === undefined ? 'webkitFullscreenElement' : 'fullscreenElement';
|
|
21
|
+
// @ts-expect-error
|
|
20
22
|
const FS_REQUEST = document.body.requestFullscreen ? 'requestFullscreen' : 'webkitRequestFullscreen';
|
|
23
|
+
// @ts-expect-error
|
|
21
24
|
const FS_EXIT = document.exitFullscreen ? 'exitFullscreen' : 'webkitExitFullscreen';
|
|
22
25
|
const FS_CHANGEEVENT = FS_ELEMENT === 'webkitFullscreenElement' ? 'webkitfullscreenchange' : 'fullscreenchange';
|
|
23
26
|
const FS_ENABLED = document.fullscreenEnabled ? 'fullscreenEnabled' : 'webkitFullscreenEnabled';
|
|
24
27
|
|
|
28
|
+
// @ts-expect-error
|
|
25
29
|
const instuiPopupMountNode = () => document[FS_ELEMENT];
|
|
26
|
-
|
|
27
30
|
export { FS_ELEMENT, FS_REQUEST, FS_EXIT, FS_CHANGEEVENT, FS_ENABLED, instuiPopupMountNode };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
1
|
/*
|
|
4
2
|
* Copyright (C) 2023 - present Instructure, Inc.
|
|
5
3
|
*
|
|
@@ -17,15 +15,18 @@
|
|
|
17
15
|
* You should have received a copy of the GNU Affero General Public License along
|
|
18
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
17
|
*/
|
|
18
|
+
|
|
19
|
+
// @ts-expect-error
|
|
20
20
|
import * as rawInstUiIcons from '@instructure/ui-icons/es/svg';
|
|
21
|
+
|
|
21
22
|
/**
|
|
22
23
|
* All inst-ui icons as an array.
|
|
23
24
|
*
|
|
24
25
|
* Note that this does require including these all in the built modules, but it appears that they were already
|
|
25
26
|
* present, as testing with and without this didn't yield much difference in module size.
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
28
|
export const instUiIconsArray = Object.values(rawInstUiIcons);
|
|
29
|
+
|
|
29
30
|
/**
|
|
30
31
|
* Type for inst ui icons
|
|
31
32
|
*/
|