@instructure/canvas-rce 5.14.2 → 5.15.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 +10 -0
- package/DEVELOPMENT.md +1 -1
- package/es/bridge/Bridge.js +10 -17
- package/es/canvasFileBrowser/FileBrowser.js +10 -19
- package/es/common/FlashAlert.js +8 -11
- package/es/common/fileUrl.js +6 -10
- package/es/common/incremental-loading/LoadMoreButton.js +3 -4
- package/es/common/incremental-loading/LoadingStatus.js +4 -11
- package/es/common/indicate.js +1 -2
- package/es/defaultTinymceConfig.js +1 -1
- package/es/enhance-user-content/doc_previews.js +10 -10
- package/es/enhance-user-content/enhance_user_content.js +4 -7
- package/es/enhance-user-content/external_links.js +1 -1
- package/es/enhance-user-content/instructure_helper.js +11 -17
- package/es/enhance-user-content/mathml.js +15 -27
- package/es/enhance-user-content/media_comment_thumbnail.js +3 -10
- package/es/format-message.js +2 -2
- package/es/index.d.ts +59 -0
- package/es/index.js +3 -5
- package/es/rce/AlertMessageArea.js +15 -16
- package/es/rce/KeyboardShortcutModal.js +2 -2
- package/es/rce/RCE.js +6 -8
- package/es/rce/RCEVariants.js +2 -4
- package/es/rce/RCEWrapper.js +397 -289
- package/es/rce/RCEWrapper.utils.js +131 -0
- package/es/rce/RCEWrapperProps.js +2 -3
- package/es/rce/RceHtmlEditor.js +12 -11
- package/es/rce/ResizeHandle.js +1 -2
- package/es/rce/ShowOnFocusButton/index.js +2 -2
- package/es/rce/StatusBar.js +5 -10
- package/es/rce/contentInsertion.js +1 -2
- package/es/rce/contentRendering.js +6 -5
- package/es/rce/editorLanguage.js +1 -1
- package/es/rce/indicatorRegion.js +1 -2
- package/es/rce/normalizeProps.js +4 -4
- package/es/rce/plugins/instructure_color/clickCallback.js +2 -4
- package/es/rce/plugins/instructure_color/components/ColorPicker.js +17 -22
- package/es/rce/plugins/instructure_color/components/ColorPopup.js +7 -8
- package/es/rce/plugins/instructure_condensed_buttons/ui/list-button.js +4 -10
- package/es/rce/plugins/instructure_condensed_buttons/ui/subscript-superscript-button.js +1 -1
- package/es/rce/plugins/instructure_documents/components/Link.js +1 -2
- package/es/rce/plugins/instructure_equation/EquationEditorModal/index.js +5 -8
- package/es/rce/plugins/instructure_equation/EquationEditorModal/latexTextareaUtil.js +3 -3
- package/es/rce/plugins/instructure_equation/EquationEditorModal/parseLatex.js +3 -3
- package/es/rce/plugins/instructure_equation/EquationEditorToolbar/buttons.js +2 -2
- package/es/rce/plugins/instructure_equation/EquationEditorToolbar/index.js +9 -11
- package/es/rce/plugins/instructure_equation/MathIcon/index.js +3 -4
- package/es/rce/plugins/instructure_equation/mathlive/index.js +167 -16
- package/es/rce/plugins/instructure_fullscreen/plugin.js +0 -2
- package/es/rce/plugins/instructure_icon_maker/clickCallback.js +3 -4
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ColorSection.js +46 -49
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/CreateIconMakerForm.js +9 -10
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Footer.js +10 -11
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Group.js +5 -6
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Header.js +7 -8
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.js +7 -9
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageOptions.js +19 -26
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageSection.js +8 -12
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ModeSelect.js +6 -7
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/MultiColor/index.js +5 -6
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGList.js +6 -7
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGThumbnail.js +8 -10
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/index.js +5 -6
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/svg.js +32 -80
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Upload.js +7 -8
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/utils.js +4 -5
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Preview.js +3 -4
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ShapeSection.js +4 -5
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/TextSection.js +4 -5
- package/es/rce/plugins/instructure_icon_maker/components/IconMakerTray.js +22 -29
- package/es/rce/plugins/instructure_icon_maker/registerEditToolbar.js +1 -1
- package/es/rce/plugins/instructure_icon_maker/svg/image.js +5 -7
- package/es/rce/plugins/instructure_icon_maker/svg/index.js +6 -9
- package/es/rce/plugins/instructure_icon_maker/svg/settings.js +17 -20
- package/es/rce/plugins/instructure_icon_maker/svg/shape.js +4 -5
- package/es/rce/plugins/instructure_icon_maker/svg/text.js +28 -32
- package/es/rce/plugins/instructure_icon_maker/svg/utils.js +2 -4
- package/es/rce/plugins/instructure_icon_maker/utils/IconMakerClose.js +2 -3
- package/es/rce/plugins/instructure_icon_maker/utils/iconValidation.js +1 -2
- package/es/rce/plugins/instructure_image/ImageEmbedOptions.js +3 -7
- package/es/rce/plugins/instructure_image/ImageList/Image.js +7 -8
- package/es/rce/plugins/instructure_image/ImageList/index.js +7 -8
- package/es/rce/plugins/instructure_image/ImageOptionsTray/TrayController.js +2 -4
- package/es/rce/plugins/instructure_image/ImageOptionsTray/index.js +3 -3
- package/es/rce/plugins/instructure_image/plugin.js +1 -2
- package/es/rce/plugins/instructure_links/components/AccordionSection.js +7 -8
- package/es/rce/plugins/instructure_links/components/Link.js +61 -65
- package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/LinkOptionsDialogController.js +1 -2
- package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/index.js +2 -2
- package/es/rce/plugins/instructure_links/components/LinkOptionsTray/index.js +2 -2
- package/es/rce/plugins/instructure_links/components/LinkSet.js +28 -37
- package/es/rce/plugins/instructure_links/components/LinksPanel.js +21 -8
- package/es/rce/plugins/instructure_links/components/NoResults.js +6 -7
- package/es/rce/plugins/instructure_links/plugin.js +6 -9
- package/es/rce/plugins/instructure_media_embed/clickCallback.js +3 -4
- package/es/rce/plugins/instructure_media_embed/components/Embed.js +6 -7
- package/es/rce/plugins/instructure_paste/plugin.js +5 -7
- package/es/rce/plugins/instructure_rce_external_tools/ExternalToolsEnv.js +24 -33
- package/es/rce/plugins/instructure_rce_external_tools/RceToolWrapper.js +7 -38
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.js +30 -29
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.js +3 -4
- package/es/rce/plugins/instructure_rce_external_tools/dialog-helper.js +1 -2
- package/es/rce/plugins/instructure_rce_external_tools/jquery/jquery.dropdownList.js +3 -4
- package/es/rce/plugins/instructure_rce_external_tools/lti11-content-items/RceLti11ContentItem.js +17 -24
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/RceLti13ContentItem.js +2 -2
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/BaseLinkContentItem.js +4 -5
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/processEditorContentItems.js +8 -9
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/rceLti13ContentItemFromJson.js +0 -1
- package/es/rce/plugins/instructure_rce_external_tools/plugin.js +4 -4
- package/es/rce/plugins/instructure_rce_external_tools/util/externalToolsForToolbar.js +42 -0
- package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.js +5 -10
- package/es/rce/plugins/instructure_record/AudioOptionsTray/index.js +12 -13
- package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.js +8 -15
- package/es/rce/plugins/instructure_record/VideoOptionsTray/index.js +19 -20
- package/es/rce/plugins/instructure_record/clickCallback.js +26 -30
- package/es/rce/plugins/instructure_search_and_replace/clickCallback.js +2 -3
- package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTray.js +14 -16
- package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTrayController.js +9 -12
- package/es/rce/plugins/instructure_search_and_replace/plugin.js +1 -2
- package/es/rce/plugins/instructure_wordcount/clickCallback.js +3 -4
- package/es/rce/plugins/instructure_wordcount/components/WordCountModal.js +26 -33
- package/es/rce/plugins/instructure_wordcount/utils/countContent.js +3 -3
- package/es/rce/plugins/instructure_wordcount/utils/tableContent.js +5 -8
- package/es/rce/plugins/shared/CanvasContentTray.js +9 -16
- package/es/rce/plugins/shared/ColorInput.js +22 -25
- package/es/rce/plugins/shared/ConditionalTooltip.js +5 -6
- package/es/rce/plugins/shared/ContentSelection.js +12 -20
- package/es/rce/plugins/shared/DimensionUtils.js +2 -4
- package/es/rce/plugins/shared/EventUtils.js +1 -1
- package/es/rce/plugins/shared/FixedContentTray.js +13 -14
- package/es/rce/plugins/shared/ImageCropper/DirectionRegion.js +3 -4
- package/es/rce/plugins/shared/ImageCropper/Modal.js +12 -13
- package/es/rce/plugins/shared/ImageCropper/Preview.js +11 -13
- package/es/rce/plugins/shared/ImageCropper/controls/CustomNumberInput.js +8 -9
- package/es/rce/plugins/shared/ImageCropper/controls/ResetControls.js +3 -4
- package/es/rce/plugins/shared/ImageCropper/controls/RotationControls.js +4 -5
- package/es/rce/plugins/shared/ImageCropper/controls/ShapeControls.js +7 -11
- package/es/rce/plugins/shared/ImageCropper/controls/ZoomControls.js +4 -5
- package/es/rce/plugins/shared/ImageCropper/controls/index.js +4 -5
- package/es/rce/plugins/shared/ImageCropper/controls/useDebouncedNumericValue.js +13 -15
- package/es/rce/plugins/shared/ImageCropper/imageCropUtils.js +18 -21
- package/es/rce/plugins/shared/ImageCropper/svg/shape.js +4 -5
- package/es/rce/plugins/shared/ImageCropper/svg/utils.js +2 -4
- package/es/rce/plugins/shared/ImageCropper/useKeyMouseEvents.js +1 -4
- package/es/rce/plugins/shared/ImageOptionsForm.js +17 -18
- package/es/rce/plugins/shared/LinkDisplay.js +8 -9
- package/es/rce/plugins/shared/PreviewIcon.js +8 -9
- package/es/rce/plugins/shared/RceFileBrowser.js +2 -3
- package/es/rce/plugins/shared/StoreContext.js +8 -10
- package/es/rce/plugins/shared/StudioLtiSupportUtils.js +5 -6
- package/es/rce/plugins/shared/Upload/CanvasContentPanel.js +6 -7
- package/es/rce/plugins/shared/Upload/CategoryProcessor.js +1 -2
- package/es/rce/plugins/shared/Upload/ComputerPanel.js +11 -14
- package/es/rce/plugins/shared/Upload/PanelFilter.js +7 -8
- package/es/rce/plugins/shared/Upload/UploadFile.js +19 -22
- package/es/rce/plugins/shared/Upload/UploadFileModal.js +28 -34
- package/es/rce/plugins/shared/Upload/UrlPanel.js +4 -5
- package/es/rce/plugins/shared/Upload/UsageRightsSelectBox.js +18 -24
- package/es/rce/plugins/shared/Upload/doFileUpload.js +6 -7
- package/es/rce/plugins/shared/ai_tools/AIResponseModal.js +7 -8
- package/es/rce/plugins/shared/ai_tools/AIToolsTray.js +14 -17
- package/es/rce/plugins/shared/ai_tools/aiicons.js +2 -2
- package/es/rce/plugins/shared/canvasContentUtils.js +1 -2
- package/es/rce/plugins/shared/compressionUtils.js +17 -20
- package/es/rce/plugins/shared/do-fetch-api-effect/doFetchApi.js +12 -15
- package/es/rce/plugins/shared/do-fetch-api-effect/get-cookie.js +1 -1
- package/es/rce/plugins/shared/fileTypeUtils.js +3 -6
- package/es/rce/plugins/shared/round.js +1 -2
- package/es/rce/plugins/shared/trayUtils.js +3 -0
- package/es/rce/plugins/shared/useDataUrl.js +4 -5
- package/es/rce/plugins/tinymce-a11y-checker/components/ColorField.js +2 -2
- package/es/rce/plugins/tinymce-a11y-checker/components/checker.js +8 -10
- package/es/rce/plugins/tinymce-a11y-checker/node-checker.js +1 -3
- package/es/rce/plugins/tinymce-a11y-checker/plugin.js +14 -17
- package/es/rce/plugins/tinymce-a11y-checker/rules/headings-start-at-h2.js +1 -2
- package/es/rce/plugins/tinymce-a11y-checker/rules/large-text-contrast.js +1 -2
- package/es/rce/plugins/tinymce-a11y-checker/rules/small-text-contrast.js +1 -2
- package/es/rce/plugins/tinymce-a11y-checker/utils/dom.js +2 -4
- package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.js +2 -3
- package/es/rce/plugins/tinymce-a11y-checker/utils/rgb-hex.js +1 -4
- package/es/rce/root.js +9 -9
- package/es/rce/tinyRCE.js +1 -0
- package/es/rce/transformContent.js +1 -1
- package/es/rcs/api.js +39 -55
- package/es/rcs/buildError.js +3 -3
- package/es/rcs/fake.js +5 -7
- package/es/sidebar/actions/documents.js +10 -12
- package/es/sidebar/actions/files.js +18 -22
- package/es/sidebar/actions/filter.js +4 -5
- package/es/sidebar/actions/images.js +20 -26
- package/es/sidebar/actions/media.js +15 -18
- package/es/sidebar/actions/session.js +1 -2
- package/es/sidebar/actions/upload.js +26 -37
- package/es/sidebar/containers/sidebarHandlers.js +6 -12
- package/es/sidebar/dragHtml.js +6 -2
- package/es/sidebar/reducers/all_files.js +1 -3
- package/es/sidebar/reducers/collection.js +1 -3
- package/es/sidebar/reducers/collections.js +1 -3
- package/es/sidebar/reducers/documents.js +1 -3
- package/es/sidebar/reducers/files.js +1 -3
- package/es/sidebar/reducers/filter.js +7 -15
- package/es/sidebar/reducers/flickr.js +1 -3
- package/es/sidebar/reducers/folder.js +1 -3
- package/es/sidebar/reducers/folders.js +1 -3
- package/es/sidebar/reducers/images.js +1 -3
- package/es/sidebar/reducers/media.js +1 -3
- package/es/sidebar/reducers/newPageLinkExpanded.js +1 -3
- package/es/sidebar/reducers/noop.js +1 -2
- package/es/sidebar/reducers/rootFolderId.js +1 -3
- package/es/sidebar/reducers/session.js +1 -3
- package/es/sidebar/reducers/ui.js +3 -9
- package/es/sidebar/reducers/upload.js +8 -24
- package/es/sidebar/store/initialState.js +1 -2
- package/es/translations/locales/ar.js +6 -0
- package/es/translations/locales/ca.js +6 -0
- package/es/translations/locales/cy.js +6 -0
- package/es/translations/locales/da-x-k12.js +6 -0
- package/es/translations/locales/da.js +6 -0
- package/es/translations/locales/de.js +6 -0
- package/es/translations/locales/en-AU-x-unimelb.js +6 -0
- package/es/translations/locales/en-GB-x-ukhe.js +6 -0
- package/es/translations/locales/en_AU.js +6 -0
- package/es/translations/locales/en_CA.js +6 -0
- package/es/translations/locales/en_CY.js +6 -0
- package/es/translations/locales/en_GB.js +6 -0
- package/es/translations/locales/es.js +6 -0
- package/es/translations/locales/es_ES.js +6 -0
- package/es/translations/locales/fi.js +6 -0
- package/es/translations/locales/fr.js +6 -0
- package/es/translations/locales/fr_CA.js +6 -0
- package/es/translations/locales/hi.js +6 -0
- package/es/translations/locales/ht.js +6 -0
- package/es/translations/locales/id.js +6 -0
- package/es/translations/locales/is.js +6 -0
- package/es/translations/locales/it.js +6 -0
- package/es/translations/locales/ja.js +6 -0
- package/es/translations/locales/mi.js +6 -0
- package/es/translations/locales/ms.js +6 -0
- package/es/translations/locales/nb-x-k12.js +6 -0
- package/es/translations/locales/nb.js +6 -0
- package/es/translations/locales/nl.js +6 -0
- package/es/translations/locales/pl.js +6 -0
- package/es/translations/locales/pt.js +6 -0
- package/es/translations/locales/pt_BR.js +6 -0
- package/es/translations/locales/ru.js +6 -0
- package/es/translations/locales/sl.js +6 -0
- package/es/translations/locales/sv-x-k12.js +6 -0
- package/es/translations/locales/sv.js +6 -0
- package/es/translations/locales/th.js +6 -0
- package/es/translations/locales/vi.js +6 -0
- package/es/translations/locales/zh-Hans.js +6 -0
- package/es/translations/locales/zh-Hant.js +6 -0
- package/es/translations/locales/zh.js +6 -0
- package/es/translations/locales/zh_HK.js +6 -0
- package/es/util/elem-util.js +1 -1
- package/es/util/file-url-util.js +1 -1
- package/es/util/fullscreenHelpers.js +6 -9
- package/es/util/loadingPlaceholder.js +2 -3
- package/es/util/simpleCache.js +1 -2
- package/es/util/url-util.js +5 -5
- package/eslint.config.js +15 -4
- package/locales/en.json +190 -10
- package/package.json +56 -55
- package/scripts/installTranslations.js +7 -8
- package/tsconfig.json +1 -1
- package/types/format-message-generate-id.d.ts +22 -0
- package/types/js-beautify.d.ts +21 -0
|
@@ -51,12 +51,11 @@ export function stopLoading() {
|
|
|
51
51
|
type: STOP_LOADING
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
export function receiveFolder(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} = _ref;
|
|
54
|
+
export function receiveFolder({
|
|
55
|
+
id,
|
|
56
|
+
name,
|
|
57
|
+
parentId
|
|
58
|
+
}) {
|
|
60
59
|
return {
|
|
61
60
|
type: RECEIVE_FOLDER,
|
|
62
61
|
id,
|
|
@@ -111,10 +110,9 @@ export function openOrCloseUploadForm() {
|
|
|
111
110
|
type: TOGGLE_UPLOAD_FORM
|
|
112
111
|
};
|
|
113
112
|
}
|
|
114
|
-
export function processedFolderBatch(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
} = _ref2;
|
|
113
|
+
export function processedFolderBatch({
|
|
114
|
+
folders
|
|
115
|
+
}) {
|
|
118
116
|
return {
|
|
119
117
|
type: PROCESSED_FOLDER_BATCH,
|
|
120
118
|
folders
|
|
@@ -163,9 +161,8 @@ export function allUploadCompleteActions(results, fileMetaProps, contextType) {
|
|
|
163
161
|
export function embedUploadResult(results, selectedTabType) {
|
|
164
162
|
const embedData = fileEmbed(results);
|
|
165
163
|
if (selectedTabType === 'images' && isImage(embedData.type) && results.displayAs !== 'link') {
|
|
166
|
-
var _bridge$activeEditor, _bridge$activeEditor$;
|
|
167
164
|
// embed the image after any current selection rather than link to it or replace it
|
|
168
|
-
|
|
165
|
+
bridge.activeEditor()?.mceInstance()?.selection.collapse();
|
|
169
166
|
const file_props = {
|
|
170
167
|
href: results.href || results.url,
|
|
171
168
|
title: results.title,
|
|
@@ -179,9 +176,8 @@ export function embedUploadResult(results, selectedTabType) {
|
|
|
179
176
|
};
|
|
180
177
|
return bridge.insertImage(file_props);
|
|
181
178
|
} else if (selectedTabType === 'media' && isAudioOrVideo(embedData.type)) {
|
|
182
|
-
var _bridge$activeEditor2, _bridge$activeEditor3;
|
|
183
179
|
// embed media after any current selection rather than link to it or replace it
|
|
184
|
-
|
|
180
|
+
bridge.activeEditor()?.mceInstance()?.selection.collapse();
|
|
185
181
|
|
|
186
182
|
// when we record audio, notorious thinks it's a video. use the content type we got
|
|
187
183
|
// from the recorded file, not the returned media object.
|
|
@@ -232,11 +228,10 @@ export function fetchFolders(bookmark) {
|
|
|
232
228
|
host,
|
|
233
229
|
contextId,
|
|
234
230
|
contextType
|
|
235
|
-
}, bookmark).then(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
} = _ref3;
|
|
231
|
+
}, bookmark).then(({
|
|
232
|
+
folders,
|
|
233
|
+
bookmark
|
|
234
|
+
}) => {
|
|
240
235
|
dispatch(folders.map(receiveFolder));
|
|
241
236
|
const {
|
|
242
237
|
upload
|
|
@@ -263,7 +258,7 @@ export function mediaUploadComplete(error, uploadData) {
|
|
|
263
258
|
return (dispatch, _getState) => {
|
|
264
259
|
if (error) {
|
|
265
260
|
dispatch(failMediaUpload(error));
|
|
266
|
-
dispatch(removePlaceholdersFor(uploadedFile
|
|
261
|
+
dispatch(removePlaceholdersFor(uploadedFile?.name));
|
|
267
262
|
} else {
|
|
268
263
|
const embedData = {
|
|
269
264
|
embedded_iframe_url: mediaObject.embedded_iframe_url,
|
|
@@ -292,8 +287,7 @@ export function createMediaServerSession() {
|
|
|
292
287
|
}
|
|
293
288
|
};
|
|
294
289
|
}
|
|
295
|
-
export function uploadToIconMakerFolder(svg) {
|
|
296
|
-
let uploadSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
290
|
+
export function uploadToIconMakerFolder(svg, uploadSettings = {}) {
|
|
297
291
|
return (_dispatch, getState) => {
|
|
298
292
|
const {
|
|
299
293
|
source,
|
|
@@ -320,10 +314,9 @@ export function uploadToIconMakerFolder(svg) {
|
|
|
320
314
|
host,
|
|
321
315
|
contextId,
|
|
322
316
|
contextType
|
|
323
|
-
}).then(
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
} = _ref4;
|
|
317
|
+
}).then(({
|
|
318
|
+
folders
|
|
319
|
+
}) => {
|
|
327
320
|
fileMetaProps.parentFolderId = folders[0].id;
|
|
328
321
|
return source.preflightUpload(fileMetaProps, {
|
|
329
322
|
host,
|
|
@@ -339,9 +332,8 @@ export function uploadToIconMakerFolder(svg) {
|
|
|
339
332
|
}
|
|
340
333
|
export function uploadToMediaFolder(tabContext, fileMetaProps) {
|
|
341
334
|
return (dispatch, getState) => {
|
|
342
|
-
var _editorComponent$edit;
|
|
343
335
|
const editorComponent = bridge.activeEditor();
|
|
344
|
-
const bookmark = editorComponent
|
|
336
|
+
const bookmark = editorComponent?.editor?.selection.getBookmark(undefined, true);
|
|
345
337
|
dispatch(activateMediaUpload(fileMetaProps));
|
|
346
338
|
const {
|
|
347
339
|
source,
|
|
@@ -365,10 +357,9 @@ export function uploadToMediaFolder(tabContext, fileMetaProps) {
|
|
|
365
357
|
host,
|
|
366
358
|
contextId,
|
|
367
359
|
contextType
|
|
368
|
-
}).then(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
} = _ref5;
|
|
360
|
+
}).then(({
|
|
361
|
+
folders
|
|
362
|
+
}) => {
|
|
372
363
|
fileMetaProps.parentFolderId = folders[0].id;
|
|
373
364
|
if (fileMetaProps.domObject) {
|
|
374
365
|
delete fileMetaProps.domObject.preview; // don't need this anymore
|
|
@@ -382,7 +373,6 @@ export function uploadToMediaFolder(tabContext, fileMetaProps) {
|
|
|
382
373
|
}).catch(e => {
|
|
383
374
|
// Get rid of any placeholder that might be there.
|
|
384
375
|
dispatch(removePlaceholdersFor(fileMetaProps.name));
|
|
385
|
-
// eslint-disable-next-line no-console
|
|
386
376
|
console.error('Fetching the media folder failed.', e);
|
|
387
377
|
});
|
|
388
378
|
};
|
|
@@ -405,8 +395,7 @@ export function getFileUrlIfMissing(source, results) {
|
|
|
405
395
|
return results;
|
|
406
396
|
});
|
|
407
397
|
}
|
|
408
|
-
function readUploadedFileAsDataURL(file) {
|
|
409
|
-
let reader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new FileReader();
|
|
398
|
+
function readUploadedFileAsDataURL(file, reader = new FileReader()) {
|
|
410
399
|
return new Promise((resolve, reject) => {
|
|
411
400
|
reader.onerror = () => {
|
|
412
401
|
reader.abort();
|
|
@@ -462,7 +451,7 @@ export function uploadPreflight(tabContext, fileMetaProps) {
|
|
|
462
451
|
} = fileMetaProps;
|
|
463
452
|
const getCategory = async fileProps => {
|
|
464
453
|
const categoryObject = await CategoryProcessor.process(fileProps.domObject);
|
|
465
|
-
return categoryObject
|
|
454
|
+
return categoryObject?.category;
|
|
466
455
|
};
|
|
467
456
|
dispatch(startUpload(fileMetaProps));
|
|
468
457
|
return getCategory(fileMetaProps).then(category => {
|
|
@@ -508,7 +497,7 @@ export function uploadPreflight(tabContext, fileMetaProps) {
|
|
|
508
497
|
if (fileMetaProps.bookmark) {
|
|
509
498
|
editorComponent.editor.selection.moveToBookmark(newBookmark);
|
|
510
499
|
}
|
|
511
|
-
if (embedResult
|
|
500
|
+
if (embedResult?.loadingPromise) {
|
|
512
501
|
// Wait until the image loads to remove the placeholder
|
|
513
502
|
await embedResult.loadingPromise.finally(() => dispatch(removePlaceholdersFor(fileMetaProps.name)));
|
|
514
503
|
} else {
|
|
@@ -40,18 +40,12 @@ export default function propsFromDispatch(dispatch) {
|
|
|
40
40
|
fetchNextPage: key => dispatch(fetchNextPage(key)),
|
|
41
41
|
toggleFolder: id => dispatch(toggleFolder(id)),
|
|
42
42
|
fetchFolders: () => dispatch(fetchFolders()),
|
|
43
|
-
fetchInitialImages:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
fetchNextImages: function () {
|
|
50
|
-
let opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
51
|
-
category: DEFAULT_FILE_CATEGORY
|
|
52
|
-
};
|
|
53
|
-
return dispatch(fetchNextImages(opts));
|
|
54
|
-
},
|
|
43
|
+
fetchInitialImages: (opts = {
|
|
44
|
+
category: DEFAULT_FILE_CATEGORY
|
|
45
|
+
}) => dispatch(fetchInitialImages(opts)),
|
|
46
|
+
fetchNextImages: (opts = {
|
|
47
|
+
category: DEFAULT_FILE_CATEGORY
|
|
48
|
+
}) => dispatch(fetchNextImages(opts)),
|
|
55
49
|
startUpload: (tabContext, fileMetaProps) => dispatch(uploadPreflight(tabContext, fileMetaProps)),
|
|
56
50
|
flickrSearch: term => dispatch(searchFlickr(term)),
|
|
57
51
|
toggleFlickrForm: () => dispatch(openOrCloseFlickrForm()),
|
package/es/sidebar/dragHtml.js
CHANGED
|
@@ -28,7 +28,9 @@ export default function (ev, html) {
|
|
|
28
28
|
// (e.g. when dragging an image) that confuses tinymce's onDrop handler
|
|
29
29
|
// into suppressing the drop event. fortunately, calling clear() on the
|
|
30
30
|
// items will also clear the ev.dataTransfer.files.
|
|
31
|
-
ev.dataTransfer
|
|
31
|
+
if (ev.dataTransfer) {
|
|
32
|
+
ev.dataTransfer.items.clear();
|
|
33
|
+
}
|
|
32
34
|
} else if (browser.ie()) {
|
|
33
35
|
// pre-Edge Internet Explorer doesn't like setData with a type other than
|
|
34
36
|
// 'Text' or 'URL'. fortunately tinymce already provides a workaround
|
|
@@ -47,5 +49,7 @@ export default function (ev, html) {
|
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
// place the data into the dataTransfer so it's available for the drop event
|
|
50
|
-
ev.dataTransfer
|
|
52
|
+
if (ev.dataTransfer) {
|
|
53
|
+
ev.dataTransfer.setData(format, data);
|
|
54
|
+
}
|
|
51
55
|
}
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
// so we can disable the search box in the Filter
|
|
24
24
|
|
|
25
25
|
import { ALL_FILES_LOADING } from '../actions/all_files';
|
|
26
|
-
export function allFilesLoading() {
|
|
27
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
28
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
26
|
+
export function allFilesLoading(state = {}, action) {
|
|
29
27
|
if (action.type === ALL_FILES_LOADING) {
|
|
30
28
|
return {
|
|
31
29
|
...state,
|
|
@@ -20,9 +20,7 @@ import { REQUEST_INITIAL_PAGE, REQUEST_PAGE, RECEIVE_PAGE, FAIL_PAGE } from '../
|
|
|
20
20
|
|
|
21
21
|
// manages the state for a specific collection. assumes the action is intended
|
|
22
22
|
// for this collection (see collections.js)
|
|
23
|
-
export default function () {
|
|
24
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
25
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
23
|
+
export default function (state = {}, action) {
|
|
26
24
|
switch (action.type) {
|
|
27
25
|
case REQUEST_INITIAL_PAGE:
|
|
28
26
|
return {
|
|
@@ -22,9 +22,7 @@ import { combineReducers } from 'redux';
|
|
|
22
22
|
|
|
23
23
|
// binds a collection reducer to listen only to actions directed at it
|
|
24
24
|
function boundCollectionReducer(key) {
|
|
25
|
-
return function () {
|
|
26
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
27
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
25
|
+
return function (state = {}, action) {
|
|
28
26
|
switch (action.type) {
|
|
29
27
|
case REQUEST_INITIAL_PAGE:
|
|
30
28
|
case REQUEST_PAGE:
|
|
@@ -21,9 +21,7 @@ import { CHANGE_CONTEXT, CHANGE_SEARCH_STRING } from '../actions/filter';
|
|
|
21
21
|
|
|
22
22
|
// manages the state for a specific collection. assumes the action is intended
|
|
23
23
|
// for this collection (see collections.js)
|
|
24
|
-
export default function documentsReducer() {
|
|
25
|
-
let prevState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
26
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
24
|
+
export default function documentsReducer(prevState = {}, action) {
|
|
27
25
|
const ctxt = action.payload && action.payload.contextType;
|
|
28
26
|
const state = {
|
|
29
27
|
...prevState
|
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { ADD_FILE } from '../actions/files';
|
|
20
|
-
export default function filesReducer() {
|
|
21
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
20
|
+
export default function filesReducer(state = {}, action) {
|
|
23
21
|
switch (action.type) {
|
|
24
22
|
case ADD_FILE:
|
|
25
23
|
return {
|
|
@@ -17,36 +17,28 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { CHANGE_CONTEXT_TYPE, CHANGE_CONTEXT_ID, CHANGE_SEARCH_STRING, CHANGE_SORT_BY } from '../actions/filter';
|
|
20
|
-
export function changeContextType() {
|
|
21
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
22
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
20
|
+
export function changeContextType(state = '', action) {
|
|
23
21
|
if (action.type === CHANGE_CONTEXT_TYPE) {
|
|
24
22
|
return action.payload;
|
|
25
23
|
}
|
|
26
24
|
return state;
|
|
27
25
|
}
|
|
28
|
-
export function changeContextId() {
|
|
29
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
30
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
26
|
+
export function changeContextId(state = '', action) {
|
|
31
27
|
if (action.type === CHANGE_CONTEXT_ID) {
|
|
32
28
|
return action.payload;
|
|
33
29
|
}
|
|
34
30
|
return state;
|
|
35
31
|
}
|
|
36
|
-
export function changeSearchString() {
|
|
37
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
38
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
32
|
+
export function changeSearchString(state = '', action) {
|
|
39
33
|
if (action.type === CHANGE_SEARCH_STRING) {
|
|
40
34
|
return action.payload;
|
|
41
35
|
}
|
|
42
36
|
return state;
|
|
43
37
|
}
|
|
44
|
-
export function changeSortBy(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
38
|
+
export function changeSortBy(state = {
|
|
39
|
+
order: 'desc',
|
|
40
|
+
sort: 'date_added'
|
|
41
|
+
}, action) {
|
|
50
42
|
if (action.type === CHANGE_SORT_BY) {
|
|
51
43
|
return action.payload;
|
|
52
44
|
}
|
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { START_FLICKR_SEARCH, RECEIVE_FLICKR_RESULTS, FAIL_FLICKR_SEARCH, TOGGLE_FLICKR_FORM } from '../actions/flickr';
|
|
20
|
-
export default function () {
|
|
21
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
20
|
+
export default function (state = {}, action) {
|
|
23
21
|
switch (action.type) {
|
|
24
22
|
case START_FLICKR_SEARCH:
|
|
25
23
|
return {
|
|
@@ -30,9 +30,7 @@ const defaultState = {
|
|
|
30
30
|
fileIds: [],
|
|
31
31
|
folderIds: []
|
|
32
32
|
};
|
|
33
|
-
export default function folderReducer() {
|
|
34
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
|
|
35
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
33
|
+
export default function folderReducer(state = defaultState, action) {
|
|
36
34
|
let loadingCount;
|
|
37
35
|
switch (action.type) {
|
|
38
36
|
case actions.ADD_FOLDER:
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import folder from './folder';
|
|
20
20
|
import * as actions from '../actions/files';
|
|
21
|
-
export default function foldersReducer() {
|
|
22
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
21
|
+
export default function foldersReducer(state = {}, action) {
|
|
24
22
|
switch (action.type) {
|
|
25
23
|
case actions.ADD_FOLDER:
|
|
26
24
|
case actions.RECEIVE_FILES:
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { ADD_IMAGE, REQUEST_INITIAL_IMAGES, REQUEST_IMAGES, RECEIVE_IMAGES, FAIL_IMAGES_LOAD } from '../actions/images';
|
|
20
20
|
import { CHANGE_CONTEXT, CHANGE_SEARCH_STRING } from '../actions/filter';
|
|
21
|
-
export default function imagesReducer() {
|
|
22
|
-
let prevState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
21
|
+
export default function imagesReducer(prevState = {}, action) {
|
|
24
22
|
const ctxt = action.payload && action.payload.contextType;
|
|
25
23
|
const state = {
|
|
26
24
|
...prevState
|
|
@@ -21,9 +21,7 @@ import { CHANGE_CONTEXT, CHANGE_SEARCH_STRING } from '../actions/filter';
|
|
|
21
21
|
|
|
22
22
|
// manages the state for a specific collection. assumes the action is intended
|
|
23
23
|
// for this collection (see collections.js)
|
|
24
|
-
export default function mediaReducer() {
|
|
25
|
-
let prevState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
26
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
24
|
+
export default function mediaReducer(prevState = {}, action) {
|
|
27
25
|
const ctxt = action.payload && action.payload.contextType;
|
|
28
26
|
const state = {
|
|
29
27
|
...prevState
|
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { TOGGLE_NEWPAGE_FORM } from '../actions/links';
|
|
20
|
-
export default function () {
|
|
21
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
22
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
20
|
+
export default function (state = false, action) {
|
|
23
21
|
switch (action.type) {
|
|
24
22
|
case TOGGLE_NEWPAGE_FORM:
|
|
25
23
|
return !state;
|
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { SET_ROOT } from '../actions/files';
|
|
20
|
-
export default function rootFolderIdReducer() {
|
|
21
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
22
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
20
|
+
export default function rootFolderIdReducer(state = null, action) {
|
|
23
21
|
switch (action.type) {
|
|
24
22
|
case SET_ROOT:
|
|
25
23
|
return action.id;
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { RECEIVE_SESSION } from '../actions/session';
|
|
20
20
|
const defaultState = {};
|
|
21
|
-
export default function sessionReducer() {
|
|
22
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
|
|
23
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
21
|
+
export default function sessionReducer(state = defaultState, action) {
|
|
24
22
|
switch (action.type) {
|
|
25
23
|
case RECEIVE_SESSION:
|
|
26
24
|
return {
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { CHANGE_TAB, CHANGE_ACCORDION, RESET_UI, HIDE_SIDEBAR, SHOW_SIDEBAR } from '../actions/ui';
|
|
20
20
|
import { combineReducers } from 'redux';
|
|
21
|
-
function hidden() {
|
|
22
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
23
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
21
|
+
function hidden(state = false, action) {
|
|
24
22
|
switch (action.type) {
|
|
25
23
|
case HIDE_SIDEBAR:
|
|
26
24
|
return true;
|
|
@@ -31,9 +29,7 @@ function hidden() {
|
|
|
31
29
|
return state;
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
|
-
function selectedTabIndex() {
|
|
35
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
36
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
32
|
+
function selectedTabIndex(state = 0, action) {
|
|
37
33
|
switch (action.type) {
|
|
38
34
|
case RESET_UI:
|
|
39
35
|
return 0;
|
|
@@ -43,9 +39,7 @@ function selectedTabIndex() {
|
|
|
43
39
|
return state;
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
|
-
function selectedAccordionIndex() {
|
|
47
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
48
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
42
|
+
function selectedAccordionIndex(state = '', action) {
|
|
49
43
|
switch (action.type) {
|
|
50
44
|
case RESET_UI:
|
|
51
45
|
return '';
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { START_FILE_UPLOAD, FAIL_FILE_UPLOAD, FAIL_MEDIA_UPLOAD, MEDIA_UPLOAD_SUCCESS, TOGGLE_UPLOAD_FORM, COMPLETE_FILE_UPLOAD, RECEIVE_FOLDER, FAIL_FOLDERS_LOAD, PROCESSED_FOLDER_BATCH, QUOTA_EXCEEDED_UPLOAD, START_LOADING, STOP_LOADING } from '../actions/upload';
|
|
20
20
|
import { combineReducers } from 'redux';
|
|
21
|
-
function uploading() {
|
|
22
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
23
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
21
|
+
function uploading(state = false, action) {
|
|
24
22
|
switch (action.type) {
|
|
25
23
|
case START_FILE_UPLOAD:
|
|
26
24
|
return true;
|
|
@@ -32,9 +30,7 @@ function uploading() {
|
|
|
32
30
|
return state;
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
|
-
function error() {
|
|
36
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
37
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
33
|
+
function error(state = {}, action) {
|
|
38
34
|
switch (action.type) {
|
|
39
35
|
case COMPLETE_FILE_UPLOAD:
|
|
40
36
|
return {};
|
|
@@ -47,9 +43,7 @@ function error() {
|
|
|
47
43
|
return state;
|
|
48
44
|
}
|
|
49
45
|
}
|
|
50
|
-
function formExpanded() {
|
|
51
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
52
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
46
|
+
function formExpanded(state = false, action) {
|
|
53
47
|
switch (action.type) {
|
|
54
48
|
case COMPLETE_FILE_UPLOAD:
|
|
55
49
|
return false;
|
|
@@ -59,9 +53,7 @@ function formExpanded() {
|
|
|
59
53
|
return state;
|
|
60
54
|
}
|
|
61
55
|
}
|
|
62
|
-
function folders() {
|
|
63
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
64
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
56
|
+
function folders(state = {}, action) {
|
|
65
57
|
switch (action.type) {
|
|
66
58
|
case RECEIVE_FOLDER:
|
|
67
59
|
return {
|
|
@@ -77,9 +69,7 @@ function folders() {
|
|
|
77
69
|
return state;
|
|
78
70
|
}
|
|
79
71
|
}
|
|
80
|
-
function rootFolderId() {
|
|
81
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
82
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
72
|
+
function rootFolderId(state = null, action) {
|
|
83
73
|
switch (action.type) {
|
|
84
74
|
case RECEIVE_FOLDER:
|
|
85
75
|
if (action.parentId === null) {
|
|
@@ -94,9 +84,7 @@ function rootFolderId() {
|
|
|
94
84
|
|
|
95
85
|
// Returns an mapping of folder id -> list of children ids,
|
|
96
86
|
// with the children sorted alphabetically by name.
|
|
97
|
-
function folderTree() {
|
|
98
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
99
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
87
|
+
function folderTree(state = {}, action) {
|
|
100
88
|
switch (action.type) {
|
|
101
89
|
case PROCESSED_FOLDER_BATCH:
|
|
102
90
|
{
|
|
@@ -120,9 +108,7 @@ function folderTree() {
|
|
|
120
108
|
return state;
|
|
121
109
|
}
|
|
122
110
|
}
|
|
123
|
-
function loadingFolders() {
|
|
124
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
125
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
111
|
+
function loadingFolders(state = false, action) {
|
|
126
112
|
switch (action.type) {
|
|
127
113
|
case START_LOADING:
|
|
128
114
|
return true;
|
|
@@ -136,9 +122,7 @@ function loadingFolders() {
|
|
|
136
122
|
return state;
|
|
137
123
|
}
|
|
138
124
|
}
|
|
139
|
-
function uploadingMediaStatus() {
|
|
140
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
141
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
125
|
+
function uploadingMediaStatus(state = false, action) {
|
|
142
126
|
switch (action.type) {
|
|
143
127
|
case START_LOADING:
|
|
144
128
|
return {
|
|
@@ -37,8 +37,7 @@ function normalizeContextType(contextType) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/* eslint-disable prefer-const */
|
|
40
|
-
export default function () {
|
|
41
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
40
|
+
export default function (props = {}) {
|
|
42
41
|
let {
|
|
43
42
|
source,
|
|
44
43
|
jwt,
|
|
@@ -490,6 +490,9 @@ const locale = {
|
|
|
490
490
|
"deep_purple_bb3e2907": {
|
|
491
491
|
"message": "أرجواني داكن"
|
|
492
492
|
},
|
|
493
|
+
"default_9db103d": {
|
|
494
|
+
"message": "افتراضي"
|
|
495
|
+
},
|
|
493
496
|
"default_bulleted_unordered_list_47079da8": {
|
|
494
497
|
"message": "قائمة افتراضية غير مرتبة بتعداد نقطي"
|
|
495
498
|
},
|
|
@@ -1561,6 +1564,9 @@ const locale = {
|
|
|
1561
1564
|
"outline_size_a6059a21": {
|
|
1562
1565
|
"message": "حجم المخطط التفصيلي"
|
|
1563
1566
|
},
|
|
1567
|
+
"p_is_not_a_valid_protocol_b1c4efaa": {
|
|
1568
|
+
"message": "{ p } ليس بروتوكولاً صالحًا."
|
|
1569
|
+
},
|
|
1564
1570
|
"page_50c4823d": {
|
|
1565
1571
|
"message": "صفحة"
|
|
1566
1572
|
},
|
|
@@ -490,6 +490,9 @@ const locale = {
|
|
|
490
490
|
"deep_purple_bb3e2907": {
|
|
491
491
|
"message": "Porpra fosc"
|
|
492
492
|
},
|
|
493
|
+
"default_9db103d": {
|
|
494
|
+
"message": "Valor per defecte"
|
|
495
|
+
},
|
|
493
496
|
"default_bulleted_unordered_list_47079da8": {
|
|
494
497
|
"message": "llista desordenada amb pics predeterminada"
|
|
495
498
|
},
|
|
@@ -1561,6 +1564,9 @@ const locale = {
|
|
|
1561
1564
|
"outline_size_a6059a21": {
|
|
1562
1565
|
"message": "Mida del contorn"
|
|
1563
1566
|
},
|
|
1567
|
+
"p_is_not_a_valid_protocol_b1c4efaa": {
|
|
1568
|
+
"message": "{ p } no és un protocol vàlid."
|
|
1569
|
+
},
|
|
1564
1570
|
"page_50c4823d": {
|
|
1565
1571
|
"message": "Pàgina"
|
|
1566
1572
|
},
|
|
@@ -490,6 +490,9 @@ const locale = {
|
|
|
490
490
|
"deep_purple_bb3e2907": {
|
|
491
491
|
"message": "Porffor Tywyll"
|
|
492
492
|
},
|
|
493
|
+
"default_9db103d": {
|
|
494
|
+
"message": "Diofyn"
|
|
495
|
+
},
|
|
493
496
|
"default_bulleted_unordered_list_47079da8": {
|
|
494
497
|
"message": "rhestr ddiofyn o bwyntiau bwled sydd ddim mewn trefn"
|
|
495
498
|
},
|
|
@@ -1561,6 +1564,9 @@ const locale = {
|
|
|
1561
1564
|
"outline_size_a6059a21": {
|
|
1562
1565
|
"message": "Maint Amlinell"
|
|
1563
1566
|
},
|
|
1567
|
+
"p_is_not_a_valid_protocol_b1c4efaa": {
|
|
1568
|
+
"message": "Dydy { p } ddim yn brotocol dilys."
|
|
1569
|
+
},
|
|
1564
1570
|
"page_50c4823d": {
|
|
1565
1571
|
"message": "Tudalen"
|
|
1566
1572
|
},
|
|
@@ -490,6 +490,9 @@ const locale = {
|
|
|
490
490
|
"deep_purple_bb3e2907": {
|
|
491
491
|
"message": "Dyb lilla"
|
|
492
492
|
},
|
|
493
|
+
"default_9db103d": {
|
|
494
|
+
"message": "Standard"
|
|
495
|
+
},
|
|
493
496
|
"default_bulleted_unordered_list_47079da8": {
|
|
494
497
|
"message": "standard punktliste usorteret liste"
|
|
495
498
|
},
|
|
@@ -1561,6 +1564,9 @@ const locale = {
|
|
|
1561
1564
|
"outline_size_a6059a21": {
|
|
1562
1565
|
"message": "Konturstørrelse"
|
|
1563
1566
|
},
|
|
1567
|
+
"p_is_not_a_valid_protocol_b1c4efaa": {
|
|
1568
|
+
"message": "{ p } er ikke en gyldig protokol."
|
|
1569
|
+
},
|
|
1564
1570
|
"page_50c4823d": {
|
|
1565
1571
|
"message": "Side"
|
|
1566
1572
|
},
|
|
@@ -490,6 +490,9 @@ const locale = {
|
|
|
490
490
|
"deep_purple_bb3e2907": {
|
|
491
491
|
"message": "Dyb lilla"
|
|
492
492
|
},
|
|
493
|
+
"default_9db103d": {
|
|
494
|
+
"message": "Standard"
|
|
495
|
+
},
|
|
493
496
|
"default_bulleted_unordered_list_47079da8": {
|
|
494
497
|
"message": "standard punktliste usorteret liste"
|
|
495
498
|
},
|
|
@@ -1561,6 +1564,9 @@ const locale = {
|
|
|
1561
1564
|
"outline_size_a6059a21": {
|
|
1562
1565
|
"message": "Konturstørrelse"
|
|
1563
1566
|
},
|
|
1567
|
+
"p_is_not_a_valid_protocol_b1c4efaa": {
|
|
1568
|
+
"message": "{ p } er ikke en gyldig protokol."
|
|
1569
|
+
},
|
|
1564
1570
|
"page_50c4823d": {
|
|
1565
1571
|
"message": "Side"
|
|
1566
1572
|
},
|