@manuscripts/article-editor 1.17.6 → 1.17.8-LEAN-3771.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/FileManager/FileActions.js +136 -0
- package/dist/cjs/components/FileManager/FileActions.js.map +1 -0
- package/dist/cjs/components/FileManager/FileContainer.js +51 -0
- package/dist/cjs/components/FileManager/FileContainer.js.map +1 -0
- package/dist/cjs/components/FileManager/FileCreatedDate.js +26 -0
- package/dist/cjs/components/FileManager/FileCreatedDate.js.map +1 -0
- package/dist/cjs/components/FileManager/FileManager.js +68 -0
- package/dist/cjs/components/FileManager/FileManager.js.map +1 -0
- package/dist/cjs/components/FileManager/FileManagerDragLayer.js +67 -0
- package/dist/cjs/components/FileManager/FileManagerDragLayer.js.map +1 -0
- package/dist/cjs/components/FileManager/FileName.js +28 -0
- package/dist/cjs/components/FileManager/FileName.js.map +1 -0
- package/dist/cjs/components/FileManager/FileSectionAlert.js +181 -0
- package/dist/cjs/components/FileManager/FileSectionAlert.js.map +1 -0
- package/dist/cjs/components/FileManager/FileTypeIcon.js +24 -0
- package/dist/cjs/components/FileManager/FileTypeIcon.js.map +1 -0
- package/dist/cjs/components/FileManager/FileUploader.js +100 -0
- package/dist/cjs/components/FileManager/FileUploader.js.map +1 -0
- package/dist/cjs/components/FileManager/InlineFilesSection.js +158 -0
- package/dist/cjs/components/FileManager/InlineFilesSection.js.map +1 -0
- package/dist/cjs/components/FileManager/OtherFilesSection.js +109 -0
- package/dist/cjs/components/FileManager/OtherFilesSection.js.map +1 -0
- package/dist/cjs/components/FileManager/SupplementsSection.js +132 -0
- package/dist/cjs/components/FileManager/SupplementsSection.js.map +1 -0
- package/dist/cjs/components/projects/EditorElement.js +9 -12
- package/dist/cjs/components/projects/EditorElement.js.map +1 -1
- package/dist/cjs/components/projects/Inspector.js +9 -9
- package/dist/cjs/components/projects/Inspector.js.map +1 -1
- package/dist/cjs/lib/attrs-change-filter.js.map +1 -1
- package/dist/cjs/postgres-data/PsSource.js +11 -0
- package/dist/cjs/postgres-data/PsSource.js.map +1 -1
- package/dist/cjs/store/Store.js.map +1 -1
- package/dist/es/components/FileManager/FileActions.js +106 -0
- package/dist/es/components/FileManager/FileActions.js.map +1 -0
- package/dist/es/components/FileManager/FileContainer.js +45 -0
- package/dist/es/components/FileManager/FileContainer.js.map +1 -0
- package/dist/es/components/FileManager/FileCreatedDate.js +19 -0
- package/dist/es/components/FileManager/FileCreatedDate.js.map +1 -0
- package/dist/es/components/FileManager/FileManager.js +61 -0
- package/dist/es/components/FileManager/FileManager.js.map +1 -0
- package/dist/es/components/FileManager/FileManagerDragLayer.js +60 -0
- package/dist/es/components/FileManager/FileManagerDragLayer.js.map +1 -0
- package/dist/es/components/FileManager/FileName.js +21 -0
- package/dist/es/components/FileManager/FileName.js.map +1 -0
- package/dist/es/components/FileManager/FileSectionAlert.js +174 -0
- package/dist/es/components/FileManager/FileSectionAlert.js.map +1 -0
- package/dist/es/components/FileManager/FileTypeIcon.js +17 -0
- package/dist/es/components/FileManager/FileTypeIcon.js.map +1 -0
- package/dist/es/components/FileManager/FileUploader.js +73 -0
- package/dist/es/components/FileManager/FileUploader.js.map +1 -0
- package/dist/es/components/FileManager/InlineFilesSection.js +128 -0
- package/dist/es/components/FileManager/InlineFilesSection.js.map +1 -0
- package/dist/es/components/FileManager/OtherFilesSection.js +82 -0
- package/dist/es/components/FileManager/OtherFilesSection.js.map +1 -0
- package/dist/es/components/FileManager/SupplementsSection.js +105 -0
- package/dist/es/components/FileManager/SupplementsSection.js.map +1 -0
- package/dist/es/components/projects/EditorElement.js +10 -13
- package/dist/es/components/projects/EditorElement.js.map +1 -1
- package/dist/es/components/projects/Inspector.js +10 -10
- package/dist/es/components/projects/Inspector.js.map +1 -1
- package/dist/es/lib/attrs-change-filter.js.map +1 -1
- package/dist/es/postgres-data/PsSource.js +11 -0
- package/dist/es/postgres-data/PsSource.js.map +1 -1
- package/dist/es/store/Store.js.map +1 -1
- package/dist/types/EditorApp.d.ts +1 -1
- package/dist/types/components/FileManager/FileActions.d.ts +21 -0
- package/dist/types/components/FileManager/FileContainer.d.ts +1 -0
- package/dist/types/components/FileManager/FileCreatedDate.d.ts +19 -0
- package/dist/types/components/FileManager/FileManager.d.ts +23 -0
- package/dist/types/components/FileManager/FileManagerDragLayer.d.ts +13 -0
- package/dist/types/components/FileManager/FileName.d.ts +17 -0
- package/dist/types/components/FileManager/FileSectionAlert.d.ts +13 -0
- package/dist/types/components/FileManager/FileTypeIcon.d.ts +20 -0
- package/dist/types/components/FileManager/FileUploader.d.ts +19 -0
- package/dist/types/components/FileManager/InlineFilesSection.d.ts +17 -0
- package/dist/types/components/FileManager/OtherFilesSection.d.ts +19 -0
- package/dist/types/components/FileManager/SupplementsSection.d.ts +20 -0
- package/dist/types/lib/attrs-change-filter.d.ts +1 -1
- package/dist/types/postgres-data/PsSource.d.ts +1 -1
- package/dist/types/store/DataSourceStrategy.d.ts +1 -1
- package/dist/types/store/Store.d.ts +1 -2
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2021 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import { findParentElement, getMatchingChild,
|
|
12
|
+
import { findParentElement, getMatchingChild, insertFigure, } from '@manuscripts/body-editor';
|
|
13
13
|
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
14
14
|
import { Category, Dialog } from '@manuscripts/style-guide';
|
|
15
15
|
import { CHANGE_STATUS, trackCommands, } from '@manuscripts/track-changes-plugin';
|
|
@@ -25,8 +25,7 @@ import { SpriteMap } from '../track-changes/suggestion-list/Icons';
|
|
|
25
25
|
const EditorElement = ({ editor }) => {
|
|
26
26
|
const { onRender, view, dispatch } = editor;
|
|
27
27
|
const [error, setError] = useState('');
|
|
28
|
-
const [{
|
|
29
|
-
deleteModel: store.deleteTrackModel,
|
|
28
|
+
const [{ trackState }] = useStore((store) => ({
|
|
30
29
|
trackState: store.trackState,
|
|
31
30
|
}));
|
|
32
31
|
const execCmd = useExecCmd();
|
|
@@ -38,10 +37,8 @@ const EditorElement = ({ editor }) => {
|
|
|
38
37
|
const docPos = view.posAtCoords({ left: offset.x, top: offset.y });
|
|
39
38
|
// @ts-expect-error: Ignoring default type from the React DnD plugin. Seems to be unreachable
|
|
40
39
|
const file = item.file;
|
|
41
|
-
// @ts-expect-error: Ignoring default type from the React DnD plugin. Seems to be unreachable
|
|
42
|
-
const model = item.model;
|
|
43
40
|
if (!file || !docPos || !docPos.pos) {
|
|
44
|
-
return;
|
|
41
|
+
return false;
|
|
45
42
|
}
|
|
46
43
|
const resolvedPos = view.state.doc.resolve(docPos.pos);
|
|
47
44
|
const attrs = {
|
|
@@ -70,17 +67,17 @@ const EditorElement = ({ editor }) => {
|
|
|
70
67
|
break;
|
|
71
68
|
}
|
|
72
69
|
default: {
|
|
73
|
-
const
|
|
70
|
+
const tr = view.state.tr;
|
|
71
|
+
tr.setSelection(NodeSelection.near(resolvedPos));
|
|
74
72
|
view.focus();
|
|
75
|
-
dispatch(
|
|
73
|
+
dispatch(tr);
|
|
76
74
|
// after dispatch is called - the view.state changes and becomes the new state of the editor so exactly the view.state has to be used to make changes on the actual state
|
|
77
|
-
|
|
75
|
+
insertFigure(file, view.state, dispatch);
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
|
-
|
|
81
|
-
await deleteModel(model._id);
|
|
82
|
-
}
|
|
78
|
+
return true;
|
|
83
79
|
}
|
|
80
|
+
return false;
|
|
84
81
|
},
|
|
85
82
|
});
|
|
86
83
|
const handleAcceptChange = useCallback((c) => {
|
|
@@ -176,7 +173,7 @@ const addFigureAtFigCaptionPosition = (editor, resolvePos, attrs, file) => {
|
|
|
176
173
|
const transaction = view.state.tr.setSelection(NodeSelection.near(resolvePos));
|
|
177
174
|
view.focus();
|
|
178
175
|
dispatch(transaction);
|
|
179
|
-
|
|
176
|
+
insertFigure(file, view.state, dispatch);
|
|
180
177
|
}
|
|
181
178
|
};
|
|
182
179
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorElement.js","sourceRoot":"","sources":["../../../../src/components/projects/EditorElement.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"EditorElement.js","sourceRoot":"","sources":["../../../../src/components/projects/EditorElement.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GAEb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EACL,aAAa,EAEb,aAAa,GAEd,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAEL,UAAU,EAGV,MAAM,GACP,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,aAAa,EAAe,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACvE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,UAAU,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAMlE,MAAM,aAAa,GAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IACpD,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAA;IAC3C,MAAM,CAAC,KA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*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2023 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { usePermissions } from '@manuscripts/style-guide';
|
|
13
13
|
import React, { useEffect, useState } from 'react';
|
|
14
14
|
import config from '../../config';
|
|
15
15
|
import { useStore } from '../../store';
|
|
16
16
|
import { CommentsPanel } from '../comments/CommentsPanel';
|
|
17
|
+
import { FileManager } from '../FileManager/FileManager';
|
|
17
18
|
import { InspectorContainer, InspectorTab, InspectorTabList, InspectorTabPanel, InspectorTabs, PaddedInspectorTabPanels, } from '../Inspector';
|
|
18
19
|
import Panel from '../Panel';
|
|
19
20
|
import { ResizingInspectorButton } from '../ResizerButtons';
|
|
@@ -29,25 +30,26 @@ const Inspector = ({ editor }) => {
|
|
|
29
30
|
selectedCommentKey: store.selectedCommentKey,
|
|
30
31
|
selectedSuggestionID: store.selectedSuggestionID,
|
|
31
32
|
}));
|
|
33
|
+
const can = usePermissions();
|
|
32
34
|
const { state, dispatch } = editor;
|
|
33
35
|
const comment = store.selectedCommentKey;
|
|
34
36
|
const suggestion = store.selectedSuggestionID;
|
|
35
37
|
const [tabIndex, setTabIndex] = useState(1);
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
38
|
+
let index = 0;
|
|
39
|
+
const CONTENT_TAB_INDEX = index++;
|
|
40
|
+
const COMMENTS_TAB_INDEX = index++;
|
|
41
|
+
const SUGGESTIONS_TAB_INDEX = !can.editWithoutTracking ? index++ : -1;
|
|
42
|
+
const FILES_TAB_INDEX = config.features.fileManagement ? index++ : -1;
|
|
40
43
|
useEffect(() => {
|
|
41
44
|
if (comment) {
|
|
42
45
|
setTabIndex(COMMENTS_TAB_INDEX);
|
|
43
46
|
}
|
|
44
|
-
}, [comment]);
|
|
47
|
+
}, [comment, COMMENTS_TAB_INDEX]);
|
|
45
48
|
useEffect(() => {
|
|
46
49
|
if (suggestion) {
|
|
47
50
|
setTabIndex(SUGGESTIONS_TAB_INDEX);
|
|
48
51
|
}
|
|
49
52
|
}, [suggestion, SUGGESTIONS_TAB_INDEX]);
|
|
50
|
-
const can = usePermissions();
|
|
51
53
|
return (React.createElement(Panel, { "data-cy": "inspector", name: 'inspector', minSize: 400, direction: 'row', side: 'start', hideWhen: 'max-width: 900px', resizerButton: ResizingInspectorButton },
|
|
52
54
|
React.createElement(InspectorContainer, null,
|
|
53
55
|
React.createElement(InspectorTabs, { index: tabIndex, onChange: setTabIndex },
|
|
@@ -60,9 +62,7 @@ const Inspector = ({ editor }) => {
|
|
|
60
62
|
React.createElement(InspectorTabPanel, { key: "Content", "data-cy": "content" }, tabIndex === CONTENT_TAB_INDEX && (React.createElement(ContentTab, { state: state, dispatch: dispatch, key: "content" }))),
|
|
61
63
|
React.createElement(InspectorTabPanel, { key: "Comments", "data-cy": "comments" }, tabIndex === COMMENTS_TAB_INDEX && (React.createElement(CommentsPanel, { key: "comments" }))),
|
|
62
64
|
!can.editWithoutTracking && (React.createElement(InspectorTabPanel, { key: "History", "data-cy": "history" }, tabIndex === SUGGESTIONS_TAB_INDEX && (React.createElement(TrackChangesPanel, { key: "track-changes" })))),
|
|
63
|
-
config.features.fileManagement && (React.createElement(InspectorTabPanel, { key: "Files", "data-cy": "files" }, tabIndex === FILES_TAB_INDEX &&
|
|
64
|
-
// @ts-ignore
|
|
65
|
-
saveModel: store.saveTrackModel, deleteModel: store.deleteTrackModel, fileManagement: store.fileManagement })))))))));
|
|
65
|
+
config.features.fileManagement && (React.createElement(InspectorTabPanel, { key: "Files", "data-cy": "files" }, tabIndex === FILES_TAB_INDEX && React.createElement(FileManager, { key: "files" }))))))));
|
|
66
66
|
};
|
|
67
67
|
export default Inspector;
|
|
68
68
|
//# sourceMappingURL=Inspector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inspector.js","sourceRoot":"","sources":["../../../../src/components/projects/Inspector.tsx"],"names":[],"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/lib/attrs-change-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"attrs-change-filter.js","sourceRoot":"","sources":["../../../src/lib/attrs-change-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EACL,cAAc,EACd,oBAAoB,GAErB,MAAM,wBAAwB,CAAA;AAE/B;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,aAA6B,EAC7B,WAA2B,EAC3B,KAAuB,EACvB,YAA2B,EAC3B,UAA8B,EAC9B,SAAqB,EACrB,EAAE;IACF,qEAAqE;IACrE,OAAO;QACL,QAAQ,EAAE,kBAAkB,CAC1B,aAAa,EACb,WAAW,CAAC,QAAQ,EACpB,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,CACV;QACD,QAAQ,EAAE,kBAAkB,CAC1B,aAAa,EACb,WAAW,CAAC,QAAQ,EACpB,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,CACV;KACF,CAAA;AACH,CAAC,CAAA;AAED,SAAS,wBAAwB,CAAC,KAAc;IAC9C,MAAM,IAAI,GAAG,KAA0B,CAAA;IACvC,OAAO,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AAChF,CAAC;AAED,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE,CAC/B,GAAG,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE;IAC1C,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE;QACrB,OAAO,KAAK,CAAC,WAAW,EAAE,CAAA;KAC3B;SAAM;QACL,MAAM,GAAG,GAAG,KAAK,CAAC,KAA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B;gBACnB,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG;oBAC3B,KAAK,EAAE,iBAAiB;oBACxB,KAAK,EAAE,KAAe;iBACvB,CAAC,CAAA;YACJ,KAAK,iBAAiB;gBACpB,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG;oBAC3B,KAAK,EAAE,sBAAsB;oBAC7B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;iBAC5B,CAAC,CAAA;YACJ,KAAK,cAAc;gBACjB,aAAa,CAAC,GAAG,CAAC,GAAG;oBACnB,KAAK,EAAE,gBAAgB;oBACvB,KAAK,EAAE,KAAe;iBACvB,CAAA;gBACD,OAAM;YACR,KAAK,aAAa;gBAChB,aAAa,CAAC,GAAG,CAAC,GAAG;oBACnB,KAAK,EAAE,kBAAkB;oBACzB,KAAK,EAAE,KAAe;iBACvB,CAAA;gBACD,OAAM;YAER;gBACE,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG;oBAC3B,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;oBACpB,KAAK,EAAE,KAAe;iBACvB,CAAC,CAAA;SACL;IACH,CAAC,CAAC,CAAA;IAEJ,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA"}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
1
12
|
import Api from './Api';
|
|
2
13
|
import { buildData } from './buildData';
|
|
3
14
|
import { buildUtilities } from './buildUtilities';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PsSource.js","sourceRoot":"","sources":["../../../src/postgres-data/PsSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PsSource.js","sourceRoot":"","sources":["../../../src/postgres-data/PsSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,GAAG,MAAM,OAAO,CAAA;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,MAAM,CAAC,OAAO,OAAO,QAAQ;IAM3B,YAAY,KAAuB;QASnC,gBAAW,GAAG,CAAC,KAAqB,EAAE,EAAE;YACtC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,KAAK,CAAC,CAAA;QACzD,CAAC,CAAA;QAED,UAAK,GAAc,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;YACjD,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,SAAS,EAAE;gBACnC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;aACnC;YACD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;YACjC,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,CAAA;YACvC,IAAI,YAAY,IAAI,SAAS,EAAE;gBAC7B,IAAI,CAAC,IAAI,GAAG,MAAM,SAAS,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;gBAC9D,IAAI,CAAC,SAAS,GAAG,cAAc,CAC7B,SAAS,EACT,YAAY,EACZ,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EACf,QAAQ,EACR,IAAI,CAAC,GAAG,CACT,CAAA;aACF;YACD,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAA;QACrD,CAAC,CAAA;QACD,gBAAW,GAAG,CAAC,KAAY,EAAE,EAAE;YAC7B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAA,CAAC,uCAAuC;QAC3D,CAAC,CAAA;QACD,gBAAW,GAAG,CAAC,QAAqB,EAAE,EAAE;YACtC,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAA;QAC7B,CAAC,CAAA;QAnCC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,EAAE,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,aAAa;QACb,4BAA4B;QAC5B,oGAAoG;QACpG,yBAAyB;IAC3B,CAAC;CA8BF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../../src/store/Store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../../src/store/Store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAuBH,OAAO,EAAE,qBAAqB,EAA2B,MAAM,GAAG,CAAA;AA0ElE,MAAM,cAAc,GAAG,GAAG,CAAA,CAAC,0BAA0B;AAErD,MAAM,cAAc,GAAG,CAAC,OAAY,EAAE,KAAY,EAAE,MAAe,EAAE,EAAE;IACrE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO,EAAE,CAAA;AACjC,CAAC,CAAA;AAqBD,MAAM,OAAO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Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import { FileAttachment, FileManagement } from '@manuscripts/
|
|
12
|
+
import { FileAttachment, FileManagement } from '@manuscripts/body-editor';
|
|
13
13
|
import React, { MutableRefObject } from 'react';
|
|
14
14
|
import { state } from './store';
|
|
15
15
|
export type AppState = {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FileSectionType, Move, Replace } from './FileManager';
|
|
3
|
+
/**
|
|
4
|
+
* This component represents the drop-down list action for each file item.
|
|
5
|
+
*/
|
|
6
|
+
export declare const FileActions: React.FC<{
|
|
7
|
+
sectionType: FileSectionType;
|
|
8
|
+
onDownload?: () => void;
|
|
9
|
+
onReplace?: Replace;
|
|
10
|
+
onDetach?: () => void;
|
|
11
|
+
move?: Move;
|
|
12
|
+
className?: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const ActionsIcon: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
export declare const FileActionDropdownList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
16
|
+
direction?: "right" | "left" | undefined;
|
|
17
|
+
width?: number | undefined;
|
|
18
|
+
height?: number | undefined;
|
|
19
|
+
top?: number | undefined;
|
|
20
|
+
}, never>;
|
|
21
|
+
export declare const FileAction: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FileContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { FileAttachment } from '@manuscripts/body-editor';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
export declare const FileCreatedDate: React.FC<{
|
|
15
|
+
file: FileAttachment;
|
|
16
|
+
className?: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const FileDateContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
+
export declare const FileDate: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum FileSectionType {
|
|
3
|
+
Inline = "Inline files",
|
|
4
|
+
Supplements = "Supplements",
|
|
5
|
+
OtherFile = "Other files"
|
|
6
|
+
}
|
|
7
|
+
export type Replace = (file: File) => Promise<void>;
|
|
8
|
+
export type Move = {
|
|
9
|
+
sectionType: FileSectionType;
|
|
10
|
+
handler: () => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* This is the main component of the file handling
|
|
14
|
+
* that should be called in the inspector,
|
|
15
|
+
* and it expects to receive an array of submission attachments
|
|
16
|
+
* and use Drag-and-Drop technique for manuscript-frontend inspector.
|
|
17
|
+
*
|
|
18
|
+
* File section component consist of three types of files which is:
|
|
19
|
+
* 1- Inline files.
|
|
20
|
+
* 2- Supplemental files.
|
|
21
|
+
* 3- Other files.
|
|
22
|
+
*/
|
|
23
|
+
export declare const FileManager: React.FC;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
export declare const FileManagerDragLayer: React.FC;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { FileAttachment } from '@manuscripts/body-editor';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
export declare const FileName: React.FC<{
|
|
15
|
+
file: FileAttachment;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const FileNameText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum FileSectionAlertType {
|
|
3
|
+
NONE = 0,
|
|
4
|
+
UPLOAD_IN_PROGRESS = 1,
|
|
5
|
+
UPLOAD_SUCCESSFUL = 2,
|
|
6
|
+
MOVE_SUCCESSFUL = 3
|
|
7
|
+
}
|
|
8
|
+
export declare const FileSectionAlert: React.FC<{
|
|
9
|
+
alert: {
|
|
10
|
+
type: FileSectionAlertType;
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { FileAttachment } from '@manuscripts/body-editor';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* Each file item has an icon to represent besides the file info based on the file extension,
|
|
16
|
+
* in case the file type is an image or video then the icon should be the preview image or video thumbnail.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FileTypeIcon: React.FC<{
|
|
19
|
+
file: FileAttachment;
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
export interface FileUploaderProps {
|
|
14
|
+
onUpload: (file: File) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* This component will show the drag or upload file area
|
|
18
|
+
*/
|
|
19
|
+
export declare const FileUploader: React.FC<FileUploaderProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { ElementFiles } from '@manuscripts/body-editor';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
export type InlineFilesSectionProps = {
|
|
15
|
+
elements: ElementFiles[];
|
|
16
|
+
};
|
|
17
|
+
export declare const InlineFilesSection: React.FC<InlineFilesSectionProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { FileAttachment } from '@manuscripts/body-editor';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* This component represents the other files in the file section.
|
|
16
|
+
*/
|
|
17
|
+
export declare const OtherFilesSection: React.FC<{
|
|
18
|
+
files: FileAttachment[];
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { NodeFile } from '@manuscripts/body-editor';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
export type SupplementsSectionProps = {
|
|
15
|
+
supplements: NodeFile[];
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* This component represents the other files in the file section.
|
|
19
|
+
*/
|
|
20
|
+
export declare const SupplementsSection: React.FC<SupplementsSectionProps>;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2023 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
+
import { FileAttachment } from '@manuscripts/body-editor';
|
|
12
13
|
import { Affiliation, BibliographyItem, Footnote } from '@manuscripts/json-schema';
|
|
13
|
-
import { FileAttachment } from '@manuscripts/style-guide';
|
|
14
14
|
import { NodeAttrChange } from '@manuscripts/track-changes-plugin';
|
|
15
15
|
import { ManuscriptNode } from '@manuscripts/transform';
|
|
16
16
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import { FileAttachment } from '@manuscripts/
|
|
12
|
+
import { FileAttachment } from '@manuscripts/body-editor';
|
|
13
13
|
import { builderFn, state, stateSetter } from '../store';
|
|
14
14
|
import { StoreDataSourceStrategy } from '../store/DataSourceStrategy';
|
|
15
15
|
import Api from './Api';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import { FileAttachment, FileManagement } from '@manuscripts/
|
|
12
|
+
import { FileAttachment, FileManagement } from '@manuscripts/body-editor';
|
|
13
13
|
import { builderFn, GenericStore, state } from '.';
|
|
14
14
|
export type stateSetter = (setState: (currentState: state) => state) => void;
|
|
15
15
|
export interface StoreDataSourceStrategy {
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import { CommentKey } from '@manuscripts/body-editor';
|
|
12
|
+
import { CommentKey, FileAttachment, FileManagement } from '@manuscripts/body-editor';
|
|
13
13
|
import { Manuscript, Model, Project, SectionCategory, UserProfile } from '@manuscripts/json-schema';
|
|
14
|
-
import { FileAttachment, FileManagement } from '@manuscripts/style-guide';
|
|
15
14
|
import { TrackChangesState } from '@manuscripts/track-changes-plugin';
|
|
16
15
|
import { Build, ManuscriptEditorView, ManuscriptNode } from '@manuscripts/transform';
|
|
17
16
|
import { useCreateEditor } from '../hooks/use-create-editor';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/article-editor",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.8-LEAN-3771.1",
|
|
4
4
|
"license": "CPAL-1.0",
|
|
5
5
|
"description": "React components for editing and viewing manuscripts",
|
|
6
6
|
"repository": "github:Atypon-OpenSource/manuscripts-article-editor",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@fontsource/lato": "^4.5.10",
|
|
36
36
|
"@fontsource/pt-sans": "^4.5.11",
|
|
37
37
|
"@fontsource/pt-serif": "^4.5.11",
|
|
38
|
-
"@manuscripts/body-editor": "1.13.
|
|
38
|
+
"@manuscripts/body-editor": "1.13.20-LEAN-3771.1",
|
|
39
39
|
"@manuscripts/json-schema": "2.2.10",
|
|
40
40
|
"@manuscripts/library": "1.3.10",
|
|
41
|
-
"@manuscripts/style-guide": "1.13.
|
|
41
|
+
"@manuscripts/style-guide": "1.13.13-LEAN-3771.0",
|
|
42
42
|
"@manuscripts/track-changes-plugin": "1.7.14",
|
|
43
43
|
"@manuscripts/transform": "2.3.19",
|
|
44
44
|
"@microsoft/fetch-event-source": "^2.0.1",
|