@instructure/canvas-rce 7.3.0 → 8.0.0
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 +79 -0
- package/{es/rce/plugins/shared/ai_tools/index.js → __mocks__/@instructure/ui-media-player/_mockUiMediaPlayer.js} +4 -4
- package/__tests__/common/mimeClass.test.js +25 -1
- package/__tests__/rcs/api.test.js +280 -251
- package/es/canvasFileBrowser/FileBrowser.d.ts +2 -2
- package/es/canvasFileBrowser/FileBrowser.js +8 -7
- package/es/common/mimeClass.js +3 -1
- package/es/defaultTinymceConfig.js +47 -49
- package/es/enhance-user-content/doc_previews.js +5 -0
- package/es/enhance-user-content/enhance_user_content.js +6 -8
- package/es/enhance-user-content/index.d.ts +3 -1
- package/es/enhance-user-content/index.js +3 -1
- package/es/enhance-user-content/instructure_helper.js +1 -0
- package/es/enhance-user-content/youtube_overlay.js +18 -0
- package/es/getThemeVars.d.ts +1 -1
- package/es/getThemeVars.js +23 -26
- package/es/rce/AlertMessageArea.d.ts +2 -2
- package/es/rce/AlertMessageArea.js +3 -3
- package/es/rce/KeyboardShortcutModal.js +2 -2
- package/es/rce/RCE.d.ts +9 -0
- package/es/rce/RCE.js +4 -0
- package/es/rce/RCEGlobals.d.ts +2 -0
- package/es/rce/RCEGlobals.js +1 -0
- package/es/rce/RCEVariants.d.ts +1 -2
- package/es/rce/RCEVariants.js +1 -2
- package/es/rce/RCEWrapper.d.ts +16 -26
- package/es/rce/RCEWrapper.js +227 -271
- package/es/rce/RCEWrapper.utils.d.ts +1 -1
- package/es/rce/RCEWrapperProps.d.ts +2 -1
- package/es/rce/RCEWrapperProps.js +2 -1
- package/es/rce/StatusBar.d.ts +0 -1
- package/es/rce/StatusBar.js +3 -28
- package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.d.ts +2 -1
- package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.js +3 -1
- package/es/rce/plugins/instructure_equation/EquationEditorModal/index.d.ts +1 -0
- package/es/rce/plugins/instructure_equation/EquationEditorModal/index.js +12 -2
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageOptions.js +2 -2
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageSection.js +3 -3
- package/es/rce/plugins/instructure_icon_maker/svg/constants.d.ts +20 -5
- package/es/rce/plugins/instructure_icon_maker/svg/utils.d.ts +1 -1
- package/es/rce/plugins/instructure_icon_maker/utils/IconMakerFormHasChanges.js +2 -2
- package/es/rce/plugins/instructure_image/ImageEmbedOptions.d.ts +0 -2
- package/es/rce/plugins/instructure_image/ImageEmbedOptions.js +2 -9
- package/es/rce/plugins/instructure_paste/plugin.js +18 -12
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.d.ts +1 -1
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.d.ts +1 -1
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.js +25 -25
- package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.d.ts +4 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.js +4 -0
- package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.d.ts +11 -2
- package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.js +92 -10
- package/es/rce/plugins/instructure_record/AudioOptionsTray/index.d.ts +13 -1
- package/es/rce/plugins/instructure_record/AudioOptionsTray/index.js +216 -24
- package/es/rce/plugins/instructure_record/MediaPanel/index.js +16 -5
- package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.d.ts +14 -13
- package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.js +110 -39
- package/es/rce/plugins/instructure_record/VideoOptionsTray/index.d.ts +11 -1
- package/es/rce/plugins/instructure_record/VideoOptionsTray/index.js +242 -67
- package/es/rce/plugins/instructure_record/clickCallback.js +19 -4
- package/es/rce/plugins/instructure_record/mediaTranslations.js +1 -1
- package/es/rce/plugins/instructure_record/playerLayoutOptions.d.ts +25 -0
- package/es/rce/plugins/instructure_record/playerLayoutOptions.js +91 -0
- package/es/rce/plugins/instructure_record/plugin.js +2 -5
- package/es/rce/plugins/instructure_record/utils.d.ts +3 -0
- package/es/rce/plugins/instructure_record/utils.js +31 -0
- package/es/rce/plugins/instructure_studio_media_options/plugin.js +82 -24
- package/es/rce/plugins/instructure_wordcount/components/WordCountModal.js +1 -0
- package/es/rce/plugins/shared/ContentSelection.d.ts +6 -1
- package/es/rce/plugins/shared/ContentSelection.js +15 -6
- package/es/rce/plugins/shared/DimensionsInput/DimensionInput.js +1 -2
- package/es/rce/plugins/shared/DimensionsInput/index.js +11 -12
- package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.d.ts +1 -1
- package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.js +4 -3
- package/es/rce/plugins/shared/StudioLtiSupportUtils.d.ts +27 -5
- package/es/rce/plugins/shared/StudioLtiSupportUtils.js +94 -9
- package/es/rce/plugins/shared/Upload/UploadFile.js +1 -8
- package/es/rce/style.d.ts +2 -1
- package/es/rce/style.js +4 -2
- package/es/rcs/api.d.ts +5 -10
- package/es/rcs/api.js +15 -21
- package/es/rcs/fake.d.ts +1 -7
- package/es/rcs/fake.js +1 -47
- package/es/sidebar/actions/media.d.ts +19 -6
- package/es/sidebar/actions/media.js +17 -4
- package/es/sidebar/actions/upload.d.ts +3 -3
- package/es/sidebar/actions/upload.js +9 -9
- package/es/sidebar/containers/Sidebar.js +0 -2
- package/es/sidebar/containers/sidebarHandlers.d.ts +2 -4
- package/es/sidebar/containers/sidebarHandlers.js +2 -5
- package/es/sidebar/reducers/index.d.ts +0 -1
- package/es/sidebar/reducers/index.js +0 -2
- package/es/sidebar/store/initialState.d.ts +0 -1
- package/es/sidebar/store/initialState.js +0 -5
- package/es/translations/locales/ar.js +77 -77
- package/es/translations/locales/ca.js +77 -77
- package/es/translations/locales/cy.js +77 -77
- package/es/translations/locales/da-x-k12.js +77 -77
- package/es/translations/locales/da.js +77 -77
- package/es/translations/locales/de.js +77 -77
- package/es/translations/locales/el.js +0 -9
- package/es/translations/locales/en-AU-x-unimelb.js +77 -77
- package/es/translations/locales/en-GB-x-ukhe.js +77 -77
- package/es/translations/locales/en.js +67 -79
- package/es/translations/locales/en_AU.js +77 -77
- package/es/translations/locales/en_CA.js +77 -77
- package/es/translations/locales/en_CY.js +77 -77
- package/es/translations/locales/en_GB.js +77 -77
- package/es/translations/locales/es.js +77 -77
- package/es/translations/locales/es_ES.js +77 -77
- package/es/translations/locales/fa_IR.js +0 -9
- package/es/translations/locales/fi.js +77 -77
- package/es/translations/locales/fr.js +77 -77
- package/es/translations/locales/fr_CA.js +77 -77
- package/es/translations/locales/ga.js +77 -77
- package/es/translations/locales/he.js +0 -9
- package/es/translations/locales/hi.js +77 -77
- package/es/translations/locales/ht.js +77 -77
- package/es/translations/locales/hu.js +0 -36
- package/es/translations/locales/hy.js +0 -9
- package/es/translations/locales/id.js +77 -77
- package/es/translations/locales/is.js +77 -77
- package/es/translations/locales/it.js +77 -77
- package/es/translations/locales/ja.js +77 -77
- package/es/translations/locales/ko.js +2455 -133
- package/es/translations/locales/mi.js +77 -77
- package/es/translations/locales/ms.js +77 -77
- package/es/translations/locales/nb-x-k12.js +77 -77
- package/es/translations/locales/nb.js +77 -77
- package/es/translations/locales/nl.js +78 -78
- package/es/translations/locales/nn.js +0 -36
- package/es/translations/locales/pl.js +77 -77
- package/es/translations/locales/pt.js +77 -77
- package/es/translations/locales/pt_BR.js +77 -77
- package/es/translations/locales/ru.js +77 -77
- package/es/translations/locales/sl.js +77 -77
- package/es/translations/locales/sv-x-k12.js +77 -77
- package/es/translations/locales/sv.js +77 -77
- package/es/translations/locales/th.js +77 -77
- package/es/translations/locales/tr.js +1962 -18
- package/es/translations/locales/uk_UA.js +0 -9
- package/es/translations/locales/vi.js +77 -77
- package/es/translations/locales/zh-Hans.js +77 -77
- package/es/translations/locales/zh-Hant.js +77 -77
- package/es/translations/locales/zh.js +77 -77
- package/es/translations/locales/zh_HK.js +77 -77
- package/eslint.config.js +16 -147
- package/jest/jest-setup.js +1 -0
- package/jest.config.js +2 -0
- package/oxlint.json +84 -0
- package/package.json +86 -62
- package/tsconfig.json +3 -2
- package/es/rce/plugins/shared/ai_tools/AIResponseModal.d.ts +0 -10
- package/es/rce/plugins/shared/ai_tools/AIResponseModal.js +0 -67
- package/es/rce/plugins/shared/ai_tools/AIToolsTray.d.ts +0 -18
- package/es/rce/plugins/shared/ai_tools/AIToolsTray.js +0 -489
- package/es/rce/plugins/shared/ai_tools/aiicons.d.ts +0 -7
- package/es/rce/plugins/shared/ai_tools/aiicons.js +0 -60
- package/es/rce/plugins/shared/ai_tools/index.d.ts +0 -3
- package/es/sidebar/actions/flickr.d.ts +0 -20
- package/es/sidebar/actions/flickr.js +0 -60
- package/es/sidebar/reducers/flickr.d.ts +0 -1
- package/es/sidebar/reducers/flickr.js +0 -49
package/es/rce/RCEWrapper.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { Editor } from
|
|
3
|
-
import tinymce from
|
|
4
|
-
import type { Editor as TinyMCEEditor } from
|
|
5
|
-
import { PlaceHoldableThingInfo } from
|
|
6
|
-
import EncryptedStorage from
|
|
7
|
-
import { RCEVariant } from
|
|
8
|
-
import { mergeMenu, mergeMenuItems, mergePlugins, mergeToolbar, parsePluginsToExclude } from
|
|
9
|
-
import { AlertMessage, EditorOptions, RCETrayProps } from
|
|
1
|
+
import React 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
10
|
export declare function storageAvailable(): boolean | null;
|
|
11
11
|
interface RCEWrapperProps {
|
|
12
|
-
ai_text_tools?: boolean;
|
|
13
12
|
autosave?: {
|
|
14
13
|
enabled?: boolean;
|
|
15
14
|
maxAge?: number;
|
|
@@ -38,12 +37,12 @@ interface RCEWrapperProps {
|
|
|
38
37
|
tinymce: typeof tinymce;
|
|
39
38
|
trayProps: RCETrayProps;
|
|
40
39
|
use_rce_icon_maker?: boolean;
|
|
40
|
+
useHighContrast?: boolean;
|
|
41
|
+
fontFamily?: string;
|
|
41
42
|
userCacheKey?: string;
|
|
42
43
|
}
|
|
43
44
|
interface RCEWrapperState {
|
|
44
45
|
a11yErrorsCount: number;
|
|
45
|
-
AIToolsOpen: boolean;
|
|
46
|
-
AITToolsFocusReturn: unknown;
|
|
47
46
|
alertId?: number;
|
|
48
47
|
announcement: string | null;
|
|
49
48
|
autoSavedContent: string;
|
|
@@ -74,8 +73,7 @@ declare class RCEWrapper extends React.Component<RCEWrapperProps, RCEWrapperStat
|
|
|
74
73
|
_showOnFocusButton?: HTMLElement;
|
|
75
74
|
_statusBarId: string;
|
|
76
75
|
_textareaEl?: HTMLTextAreaElement;
|
|
77
|
-
_effectiveContainingContext: RCETrayProps[
|
|
78
|
-
AIToolsTray?: ReactNode;
|
|
76
|
+
_effectiveContainingContext: RCETrayProps['containingContext'];
|
|
79
77
|
editor: TinyMCEEditor | null;
|
|
80
78
|
initialContent?: string;
|
|
81
79
|
intersectionObserver?: IntersectionObserver;
|
|
@@ -175,6 +173,8 @@ declare class RCEWrapper extends React.Component<RCEWrapperProps, RCEWrapperStat
|
|
|
175
173
|
}>;
|
|
176
174
|
instRecordDisabled: import("prop-types").Requireable<boolean>;
|
|
177
175
|
highContrastCSS: import("prop-types").Requireable<(string | null | undefined)[]>;
|
|
176
|
+
useHighContrast: import("prop-types").Requireable<boolean>;
|
|
177
|
+
fontFamily: import("prop-types").Requireable<string>;
|
|
178
178
|
maxInitRenderedRCEs: import("prop-types").Requireable<number>;
|
|
179
179
|
use_rce_icon_maker: import("prop-types").Requireable<boolean>;
|
|
180
180
|
features: import("prop-types").Requireable<{
|
|
@@ -190,7 +190,6 @@ declare class RCEWrapper extends React.Component<RCEWrapperProps, RCEWrapperStat
|
|
|
190
190
|
isA2StudentView: import("prop-types").Requireable<boolean>;
|
|
191
191
|
maxMruTools: import("prop-types").Requireable<number>;
|
|
192
192
|
}>>;
|
|
193
|
-
ai_text_tools: import("prop-types").Requireable<boolean>;
|
|
194
193
|
variant: import("prop-types").Requireable<"full" | "lite" | "text-only" | "text-block" | "block-content-editor">;
|
|
195
194
|
};
|
|
196
195
|
static defaultProps: {
|
|
@@ -215,9 +214,9 @@ declare class RCEWrapper extends React.Component<RCEWrapperProps, RCEWrapperStat
|
|
|
215
214
|
explicit_latex_typesetting: unknown;
|
|
216
215
|
rce_transform_loaded_content: unknown;
|
|
217
216
|
rce_studio_embed_improvements: unknown;
|
|
217
|
+
rce_asr_captioning_improvements: unknown;
|
|
218
218
|
file_verifiers_for_quiz_links: unknown;
|
|
219
219
|
rce_find_replace: unknown;
|
|
220
|
-
consolidated_media_player: unknown;
|
|
221
220
|
};
|
|
222
221
|
getRequiredConfigValues(): {
|
|
223
222
|
locale: string;
|
|
@@ -340,15 +339,6 @@ declare class RCEWrapper extends React.Component<RCEWrapperProps, RCEWrapperStat
|
|
|
340
339
|
openKBShortcutModal: () => void;
|
|
341
340
|
closeKBShortcutModal: () => void;
|
|
342
341
|
KBShortcutModalExited: () => void;
|
|
343
|
-
handleAIClick: () => void;
|
|
344
|
-
closeAITools: () => void;
|
|
345
|
-
AIToolsExited: () => void;
|
|
346
|
-
handleInsertAIContent: (content: string) => void;
|
|
347
|
-
handleReplaceAIContent: (content: string) => void;
|
|
348
|
-
getCurrentContentForAI: () => {
|
|
349
|
-
type: string;
|
|
350
|
-
content: string;
|
|
351
|
-
};
|
|
352
342
|
componentWillUnmount(): void;
|
|
353
343
|
wrapOptions(options?: {}): {
|
|
354
344
|
readonly: boolean | undefined;
|
|
@@ -425,4 +415,4 @@ declare class RCEWrapper extends React.Component<RCEWrapperProps, RCEWrapperStat
|
|
|
425
415
|
render(): React.JSX.Element;
|
|
426
416
|
}
|
|
427
417
|
export default RCEWrapper;
|
|
428
|
-
export { mergeMenuItems, mergeMenu, mergeToolbar, mergePlugins, parsePluginsToExclude
|
|
418
|
+
export { mergeMenuItems, mergeMenu, mergeToolbar, mergePlugins, parsePluginsToExclude };
|