@manuscripts/article-editor 3.0.0 → 3.0.1-JSR-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/EditorApp.js +4 -7
- package/dist/cjs/EditorApp.js.map +1 -1
- package/dist/cjs/components/Page.js +1 -2
- package/dist/cjs/components/Page.js.map +1 -1
- package/dist/cjs/components/inspector/SectionInspector.js +43 -18
- package/dist/cjs/components/inspector/SectionInspector.js.map +1 -1
- package/dist/cjs/components/projects/ContentTab.js +35 -16
- package/dist/cjs/components/projects/ContentTab.js.map +1 -1
- package/dist/cjs/components/projects/EditorElement.js +5 -3
- package/dist/cjs/components/projects/EditorElement.js.map +1 -1
- package/dist/cjs/components/projects/Inspector.js +2 -8
- package/dist/cjs/components/projects/Inspector.js.map +1 -1
- package/dist/cjs/components/projects/ManuscriptMenus.js +9 -2
- package/dist/cjs/components/projects/ManuscriptMenus.js.map +1 -1
- package/dist/cjs/components/projects/ManuscriptPageContainer.js +22 -118
- package/dist/cjs/components/projects/ManuscriptPageContainer.js.map +1 -1
- package/dist/cjs/components/projects/ManuscriptSidebar.js +8 -2
- package/dist/cjs/components/projects/ManuscriptSidebar.js.map +1 -1
- package/dist/cjs/components/projects/ManuscriptToolbar.js +8 -1
- package/dist/cjs/components/projects/ManuscriptToolbar.js.map +1 -1
- package/dist/cjs/components/track-changes/TrackChangesPanel.js +27 -41
- package/dist/cjs/components/track-changes/TrackChangesPanel.js.map +1 -1
- package/dist/cjs/components/track-changes/TrackModal.js +20 -8
- package/dist/cjs/components/track-changes/TrackModal.js.map +1 -1
- package/dist/cjs/components/track-changes/suggestion-list/Suggestion.js +3 -1
- package/dist/cjs/components/track-changes/suggestion-list/Suggestion.js.map +1 -1
- package/dist/cjs/components/track-changes/suggestion-list/SuggestionList.js +1 -1
- package/dist/cjs/components/track-changes/suggestion-list/SuggestionList.js.map +1 -1
- package/dist/cjs/components/track-changes/utils.js +28 -5
- package/dist/cjs/components/track-changes/utils.js.map +1 -1
- package/dist/cjs/hooks/use-connect-editor.js +74 -0
- package/dist/cjs/hooks/use-connect-editor.js.map +1 -0
- package/dist/cjs/hooks/use-create-editor.js +7 -4
- package/dist/cjs/hooks/use-create-editor.js.map +1 -1
- package/dist/cjs/hooks/use-exec-cmd.js +6 -4
- package/dist/cjs/hooks/use-exec-cmd.js.map +1 -1
- package/dist/cjs/lib/attrs-change-filter.js +7 -7
- package/dist/cjs/lib/attrs-change-filter.js.map +1 -1
- package/dist/cjs/lib/deeper-equal.js +19 -17
- package/dist/cjs/lib/deeper-equal.js.map +1 -1
- package/dist/cjs/lib/section-categories.js +6 -6
- package/dist/cjs/lib/section-categories.js.map +1 -1
- package/dist/cjs/postgres-data/PsSource.js +19 -2
- package/dist/cjs/postgres-data/PsSource.js.map +1 -1
- package/dist/cjs/postgres-data/buildData.js +11 -27
- package/dist/cjs/postgres-data/buildData.js.map +1 -1
- package/dist/cjs/postgres-data/buildUtilities.js +0 -53
- package/dist/cjs/postgres-data/buildUtilities.js.map +1 -1
- package/dist/cjs/quarterback/api/loadDoc.js +104 -0
- package/dist/cjs/quarterback/api/loadDoc.js.map +1 -0
- package/dist/cjs/store/Store.js.map +1 -1
- package/dist/cjs/store/StoreContext.js +1 -1
- package/dist/cjs/store/StoreContext.js.map +1 -1
- package/dist/cjs/store/useStore.js +7 -1
- package/dist/cjs/store/useStore.js.map +1 -1
- package/dist/es/EditorApp.js +4 -7
- package/dist/es/EditorApp.js.map +1 -1
- package/dist/es/components/Page.js +1 -2
- package/dist/es/components/Page.js.map +1 -1
- package/dist/es/components/inspector/SectionInspector.js +43 -18
- package/dist/es/components/inspector/SectionInspector.js.map +1 -1
- package/dist/es/components/projects/ContentTab.js +13 -14
- package/dist/es/components/projects/ContentTab.js.map +1 -1
- package/dist/es/components/projects/EditorElement.js +5 -3
- package/dist/es/components/projects/EditorElement.js.map +1 -1
- package/dist/es/components/projects/Inspector.js +2 -8
- package/dist/es/components/projects/Inspector.js.map +1 -1
- package/dist/es/components/projects/ManuscriptMenus.js +9 -2
- package/dist/es/components/projects/ManuscriptMenus.js.map +1 -1
- package/dist/es/components/projects/ManuscriptPageContainer.js +22 -95
- package/dist/es/components/projects/ManuscriptPageContainer.js.map +1 -1
- package/dist/es/components/projects/ManuscriptSidebar.js +8 -2
- package/dist/es/components/projects/ManuscriptSidebar.js.map +1 -1
- package/dist/es/components/projects/ManuscriptToolbar.js +8 -1
- package/dist/es/components/projects/ManuscriptToolbar.js.map +1 -1
- package/dist/es/components/track-changes/TrackChangesPanel.js +28 -42
- package/dist/es/components/track-changes/TrackChangesPanel.js.map +1 -1
- package/dist/es/components/track-changes/TrackModal.js +21 -9
- package/dist/es/components/track-changes/TrackModal.js.map +1 -1
- package/dist/es/components/track-changes/suggestion-list/Suggestion.js +3 -1
- package/dist/es/components/track-changes/suggestion-list/Suggestion.js.map +1 -1
- package/dist/es/components/track-changes/suggestion-list/SuggestionList.js +1 -1
- package/dist/es/components/track-changes/suggestion-list/SuggestionList.js.map +1 -1
- package/dist/es/components/track-changes/utils.js +25 -3
- package/dist/es/components/track-changes/utils.js.map +1 -1
- package/dist/es/hooks/use-connect-editor.js +70 -0
- package/dist/es/hooks/use-connect-editor.js.map +1 -0
- package/dist/es/hooks/use-create-editor.js +7 -4
- package/dist/es/hooks/use-create-editor.js.map +1 -1
- package/dist/es/hooks/use-exec-cmd.js +7 -5
- package/dist/es/hooks/use-exec-cmd.js.map +1 -1
- package/dist/es/lib/attrs-change-filter.js +7 -7
- package/dist/es/lib/attrs-change-filter.js.map +1 -1
- package/dist/es/lib/deeper-equal.js +19 -17
- package/dist/es/lib/deeper-equal.js.map +1 -1
- package/dist/es/lib/section-categories.js +6 -6
- package/dist/es/lib/section-categories.js.map +1 -1
- package/dist/es/postgres-data/PsSource.js +19 -2
- package/dist/es/postgres-data/PsSource.js.map +1 -1
- package/dist/es/postgres-data/buildData.js +12 -28
- package/dist/es/postgres-data/buildData.js.map +1 -1
- package/dist/es/postgres-data/buildUtilities.js +1 -54
- package/dist/es/postgres-data/buildUtilities.js.map +1 -1
- package/dist/es/quarterback/api/loadDoc.js +77 -0
- package/dist/es/quarterback/api/loadDoc.js.map +1 -0
- package/dist/es/store/Store.js.map +1 -1
- package/dist/es/store/StoreContext.js +1 -1
- package/dist/es/store/StoreContext.js.map +1 -1
- package/dist/es/store/useStore.js +5 -0
- package/dist/es/store/useStore.js.map +1 -1
- package/dist/types/components/Page.d.ts +1 -3
- package/dist/types/components/inspector/SectionInspector.d.ts +1 -15
- package/dist/types/components/projects/ContentTab.d.ts +1 -5
- package/dist/types/components/projects/EditorElement.d.ts +1 -16
- package/dist/types/components/projects/Inspector.d.ts +1 -5
- package/dist/types/components/projects/ManuscriptMenus.d.ts +1 -6
- package/dist/types/components/projects/ManuscriptPageContainer.d.ts +1 -1
- package/dist/types/components/projects/ManuscriptSidebar.d.ts +1 -9
- package/dist/types/components/projects/ManuscriptToolbar.d.ts +1 -7
- package/dist/types/components/track-changes/suggestion-list/SuggestionList.d.ts +1 -1
- package/dist/types/components/track-changes/utils.d.ts +6 -2
- package/dist/types/hooks/use-connect-editor.d.ts +9 -0
- package/dist/types/lib/attrs-change-filter.d.ts +2 -3
- package/dist/types/lib/deeper-equal.d.ts +1 -1
- package/dist/types/lib/section-categories.d.ts +3 -2
- package/dist/types/postgres-data/buildData.d.ts +2 -1
- package/dist/types/quarterback/{useLoadDoc.d.ts → api/loadDoc.d.ts} +2 -2
- package/dist/types/store/Store.d.ts +4 -12
- package/dist/types/store/useStore.d.ts +1 -0
- package/package.json +5 -5
- package/dist/cjs/components/inspector/StyleFields.js +0 -18
- package/dist/cjs/components/inspector/StyleFields.js.map +0 -1
- package/dist/cjs/lib/sort.js +0 -17
- package/dist/cjs/lib/sort.js.map +0 -1
- package/dist/cjs/quarterback/QuarterBackDataSource.js +0 -29
- package/dist/cjs/quarterback/QuarterBackDataSource.js.map +0 -1
- package/dist/cjs/quarterback/useLoadDoc.js +0 -106
- package/dist/cjs/quarterback/useLoadDoc.js.map +0 -1
- package/dist/cjs/tracked-models/adapt-tracked-data.js +0 -100
- package/dist/cjs/tracked-models/adapt-tracked-data.js.map +0 -1
- package/dist/cjs/tracked-models/creators.js +0 -129
- package/dist/cjs/tracked-models/creators.js.map +0 -1
- package/dist/cjs/tracked-models/use-tracked-model-management.js +0 -129
- package/dist/cjs/tracked-models/use-tracked-model-management.js.map +0 -1
- package/dist/es/components/inspector/StyleFields.js +0 -14
- package/dist/es/components/inspector/StyleFields.js.map +0 -1
- package/dist/es/lib/sort.js +0 -13
- package/dist/es/lib/sort.js.map +0 -1
- package/dist/es/quarterback/QuarterBackDataSource.js +0 -26
- package/dist/es/quarterback/QuarterBackDataSource.js.map +0 -1
- package/dist/es/quarterback/useLoadDoc.js +0 -79
- package/dist/es/quarterback/useLoadDoc.js.map +0 -1
- package/dist/es/tracked-models/adapt-tracked-data.js +0 -95
- package/dist/es/tracked-models/adapt-tracked-data.js.map +0 -1
- package/dist/es/tracked-models/creators.js +0 -120
- package/dist/es/tracked-models/creators.js.map +0 -1
- package/dist/es/tracked-models/use-tracked-model-management.js +0 -127
- package/dist/es/tracked-models/use-tracked-model-management.js.map +0 -1
- package/dist/types/components/inspector/StyleFields.d.ts +0 -14
- package/dist/types/lib/sort.d.ts +0 -17
- package/dist/types/quarterback/QuarterBackDataSource.d.ts +0 -23
- package/dist/types/tracked-models/adapt-tracked-data.d.ts +0 -13
- package/dist/types/tracked-models/creators.d.ts +0 -21
- package/dist/types/tracked-models/use-tracked-model-management.d.ts +0 -21
|
@@ -9,14 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import { ManuscriptEditorState, ManuscriptEditorView } from '@manuscripts/transform';
|
|
13
|
-
import { Transaction } from 'prosemirror-state';
|
|
14
12
|
import React from 'react';
|
|
15
13
|
export declare const ToolbarItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
16
14
|
export declare const ToolbarContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
17
15
|
export declare const ToolbarGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
-
export declare const ManuscriptToolbar: React.FC
|
|
19
|
-
state: ManuscriptEditorState;
|
|
20
|
-
dispatch: (tr: Transaction) => void;
|
|
21
|
-
view?: ManuscriptEditorView;
|
|
22
|
-
}>;
|
|
16
|
+
export declare const ManuscriptToolbar: React.FC;
|
|
@@ -21,6 +21,6 @@ export interface SuggestionListProps {
|
|
|
21
21
|
onReject(change: TrackedChange): void;
|
|
22
22
|
onReset(change: TrackedChange): void;
|
|
23
23
|
onAcceptAll?(): void;
|
|
24
|
-
onSelect(change: TrackedChange): void;
|
|
24
|
+
onSelect?(change: TrackedChange): void;
|
|
25
25
|
}
|
|
26
26
|
export declare const SuggestionList: React.FC<SuggestionListProps>;
|
|
@@ -9,5 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2022 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
import { CHANGE_STATUS, TrackedChange } from '@manuscripts/track-changes-plugin';
|
|
13
|
+
import { Command } from 'prosemirror-state';
|
|
14
|
+
import { EditorView } from 'prosemirror-view';
|
|
15
|
+
import { state } from '../../store';
|
|
16
|
+
export declare const setSelectedSuggestion: (suggestion: TrackedChange, getState: () => state) => void;
|
|
17
|
+
export declare const setChangeStatus: (change: TrackedChange, status: CHANGE_STATUS, execCmd: (cmd: Command, hookView?: EditorView) => void) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const useConnectEditor: () => {
|
|
2
|
+
state: import("prosemirror-state").EditorState;
|
|
3
|
+
onRender: (el: HTMLDivElement | null) => void;
|
|
4
|
+
isCommandValid: (command: import("prosemirror-state").Command) => boolean;
|
|
5
|
+
doCommand: (command: import("prosemirror-state").Command) => boolean;
|
|
6
|
+
replaceState: (state: import("prosemirror-state").EditorState) => void;
|
|
7
|
+
view: import("prosemirror-view").EditorView | undefined;
|
|
8
|
+
dispatch: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").EditorState;
|
|
9
|
+
};
|
|
@@ -10,14 +10,13 @@
|
|
|
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
12
|
import { FileAttachment } from '@manuscripts/body-editor';
|
|
13
|
-
import { Affiliation, BibliographyItem, Footnote } from '@manuscripts/json-schema';
|
|
14
13
|
import { NodeAttrChange } from '@manuscripts/track-changes-plugin';
|
|
15
|
-
import { ManuscriptNode } from '@manuscripts/transform';
|
|
14
|
+
import { AffiliationNode, BibliographyItemNode, FootnoteNode, ManuscriptNode } from '@manuscripts/transform';
|
|
16
15
|
/**
|
|
17
16
|
* Filter PN node attributes to show for comparing them with old change
|
|
18
17
|
* @param attrsChange
|
|
19
18
|
*/
|
|
20
|
-
export declare const filterAttrsChange: (modelOfChange: ManuscriptNode, attrsChange: NodeAttrChange, files: FileAttachment[], affiliations:
|
|
19
|
+
export declare const filterAttrsChange: (modelOfChange: ManuscriptNode, attrsChange: NodeAttrChange, files: FileAttachment[], affiliations: AffiliationNode[], references: BibliographyItemNode[], footnotes: FootnoteNode[]) => {
|
|
21
20
|
newAttrs: Record<string, {
|
|
22
21
|
label: string;
|
|
23
22
|
value: string;
|
|
@@ -9,5 +9,5 @@
|
|
|
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
|
-
declare const deeperEqual: (
|
|
12
|
+
declare const deeperEqual: (next: any, prev: any) => boolean;
|
|
13
13
|
export default deeperEqual;
|
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2020 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { SectionCategory } from '@manuscripts/json-schema';
|
|
13
|
+
import { SectionNode } from '@manuscripts/transform';
|
|
13
14
|
export declare const uneditableSectionCategories: string[];
|
|
14
15
|
export declare const uniqueSectionCategories: string[];
|
|
15
16
|
export declare const isEditableSectionCategoryID: (id: string) => boolean;
|
|
16
17
|
export declare const isEditableSectionCategory: (sectionCategory: SectionCategory) => boolean;
|
|
17
18
|
export declare const sortSectionCategories: (sectionCategories: SectionCategory[]) => SectionCategory[];
|
|
18
|
-
export declare const chooseSectionCategory: (section:
|
|
19
|
+
export declare const chooseSectionCategory: (section: SectionNode, isSubSection?: boolean) => string;
|
|
19
20
|
export declare const isUnique: (categoryId: string) => boolean;
|
|
20
21
|
export declare const isUniqueCurrent: (categoryId: string, currentCategoryId: string) => boolean;
|
|
21
22
|
export declare const isUniquePresent: (cat: SectionCategory, existingCats: {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { ManuscriptNode } from '@manuscripts/transform';
|
|
1
2
|
import Api from './Api';
|
|
2
|
-
export declare const buildData: (projectID: string, manuscriptID: string, api: Api) => Promise<{}>;
|
|
3
|
+
export declare const buildData: (projectID: string, manuscriptID: string, doc: ManuscriptNode, api: Api) => Promise<{}>;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2022 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
12
|
import { ManuscriptNode } from '@manuscripts/transform';
|
|
13
|
-
import { SnapshotLabel } from '
|
|
14
|
-
export declare
|
|
13
|
+
import { SnapshotLabel } from '../types';
|
|
14
|
+
export declare function loadDoc(manuscriptID: string, projectID: string, authToken: string, existingDoc?: ManuscriptNode): Promise<{
|
|
15
15
|
doc: import("prosemirror-model").Node;
|
|
16
16
|
version: number;
|
|
17
17
|
snapshots: SnapshotLabel[];
|
|
@@ -10,9 +10,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
12
|
import { CommentKey, FileAttachment, FileManagement } from '@manuscripts/body-editor';
|
|
13
|
-
import {
|
|
13
|
+
import { Project, SectionCategory, UserProfile } from '@manuscripts/json-schema';
|
|
14
14
|
import { TrackChangesState } from '@manuscripts/track-changes-plugin';
|
|
15
|
-
import {
|
|
15
|
+
import { ManuscriptEditorView, ManuscriptNode } from '@manuscripts/transform';
|
|
16
16
|
import { useCreateEditor } from '../hooks/use-create-editor';
|
|
17
17
|
import { ManuscriptSnapshot, SnapshotLabel } from '../quarterback/types';
|
|
18
18
|
import { StoreDataSourceStrategy } from '.';
|
|
@@ -26,25 +26,17 @@ export interface ContainerIDs {
|
|
|
26
26
|
manuscriptID?: string;
|
|
27
27
|
templateID?: string;
|
|
28
28
|
}
|
|
29
|
+
export type PMEditor = ReturnType<typeof useCreateEditor>;
|
|
29
30
|
export type state = {
|
|
30
31
|
[key: string]: any;
|
|
31
32
|
manuscriptID: string;
|
|
32
33
|
projectID: string;
|
|
33
34
|
userID?: string;
|
|
34
35
|
project: Project;
|
|
35
|
-
manuscript: Manuscript;
|
|
36
36
|
user: UserProfile;
|
|
37
|
-
editor:
|
|
37
|
+
editor: PMEditor;
|
|
38
38
|
doc: ManuscriptNode;
|
|
39
39
|
initialDocVersion: number;
|
|
40
|
-
modelMap: Map<string, Model>;
|
|
41
|
-
saveModel: <T extends Model>(model: T | Build<T> | Partial<T>) => Promise<T>;
|
|
42
|
-
deleteModel: (id: string) => Promise<string>;
|
|
43
|
-
saveModels: (models: Model[]) => Promise<void>;
|
|
44
|
-
saveManuscript: (data: Partial<Manuscript>) => Promise<void>;
|
|
45
|
-
saveTrackModel: <T extends Model>(model: T | Build<T> | Partial<T>) => Promise<T>;
|
|
46
|
-
trackModelMap: Map<string, Model>;
|
|
47
|
-
deleteTrackModel: (id: string) => Promise<string>;
|
|
48
40
|
fileManagement: FileManagement;
|
|
49
41
|
files: FileAttachment[];
|
|
50
42
|
authToken: string;
|
|
@@ -12,4 +12,5 @@
|
|
|
12
12
|
import { dispatch, GenericStore, state } from './Store';
|
|
13
13
|
type Selector<T> = (r: state) => state | T;
|
|
14
14
|
export declare const useStore: <T>(selector?: Selector<T> | undefined) => [T, dispatch, () => state, (fn: (state: state, prev: state) => void) => () => void];
|
|
15
|
+
export declare const useGetState: () => () => state;
|
|
15
16
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/article-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-JSR-2",
|
|
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,12 +35,12 @@
|
|
|
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": "2.0.
|
|
38
|
+
"@manuscripts/body-editor": "2.0.2-JSR",
|
|
39
39
|
"@manuscripts/json-schema": "2.2.10",
|
|
40
40
|
"@manuscripts/library": "1.3.10",
|
|
41
41
|
"@manuscripts/style-guide": "2.0.0",
|
|
42
|
-
"@manuscripts/track-changes-plugin": "1.7.
|
|
43
|
-
"@manuscripts/transform": "2.3.21",
|
|
42
|
+
"@manuscripts/track-changes-plugin": "1.7.15",
|
|
43
|
+
"@manuscripts/transform": "2.3.21-JSR",
|
|
44
44
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
45
45
|
"@popperjs/core": "^2.11.8",
|
|
46
46
|
"@reach/tabs": "^0.18.0",
|
|
@@ -107,4 +107,4 @@
|
|
|
107
107
|
"resolutions": {
|
|
108
108
|
"@types/react": "^18.3.1"
|
|
109
109
|
}
|
|
110
|
-
}
|
|
110
|
+
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* 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.
|
|
4
|
-
*
|
|
5
|
-
* 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.
|
|
6
|
-
*
|
|
7
|
-
* The Original Code is manuscripts-frontend.
|
|
8
|
-
*
|
|
9
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
10
|
-
*
|
|
11
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.valueOrDefault = void 0;
|
|
15
|
-
// TODO: use nullish coalescing instead
|
|
16
|
-
const valueOrDefault = (value, defaultValue) => (value === undefined ? defaultValue : value);
|
|
17
|
-
exports.valueOrDefault = valueOrDefault;
|
|
18
|
-
//# sourceMappingURL=StyleFields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StyleFields.js","sourceRoot":"","sources":["../../../../src/components/inspector/StyleFields.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAMH,uCAAuC;AAChC,MAAM,cAAc,GAAG,CAC5B,KAAoB,EACpB,YAAe,EACZ,EAAE,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AAHvC,QAAA,cAAc,kBAGyB"}
|
package/dist/cjs/lib/sort.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* 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.
|
|
4
|
-
*
|
|
5
|
-
* 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.
|
|
6
|
-
*
|
|
7
|
-
* The Original Code is manuscripts-frontend.
|
|
8
|
-
*
|
|
9
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
10
|
-
*
|
|
11
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.ascendingPriority = void 0;
|
|
15
|
-
const ascendingPriority = (a, b) => Number(a.priority) - Number(b.priority);
|
|
16
|
-
exports.ascendingPriority = ascendingPriority;
|
|
17
|
-
//# sourceMappingURL=sort.js.map
|
package/dist/cjs/lib/sort.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sort.js","sourceRoot":"","sources":["../../../src/lib/sort.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAMI,MAAM,iBAAiB,GAAG,CAC/B,CAAoB,EACpB,CAAoB,EACZ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;AAHvC,QAAA,iBAAiB,qBAGsB"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class QuarterbackDataSource {
|
|
4
|
-
constructor(loadDoc) {
|
|
5
|
-
this.build = async (state, next) => {
|
|
6
|
-
if (state.projectID && state.manuscriptID) {
|
|
7
|
-
const res = await this.loadDoc(state.manuscriptID, state.projectID, state.doc);
|
|
8
|
-
if (res?.doc && res.version >= 0) {
|
|
9
|
-
next({
|
|
10
|
-
...state,
|
|
11
|
-
doc: res.doc,
|
|
12
|
-
initialDocVersion: res.version,
|
|
13
|
-
snapshots: res.snapshots,
|
|
14
|
-
snapshotsMap: new Map(),
|
|
15
|
-
});
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
next({
|
|
20
|
-
...state,
|
|
21
|
-
snapshots: [],
|
|
22
|
-
snapshotsMap: new Map(),
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
this.loadDoc = loadDoc;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.default = QuarterbackDataSource;
|
|
29
|
-
//# sourceMappingURL=QuarterBackDataSource.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QuarterBackDataSource.js","sourceRoot":"","sources":["../../../src/quarterback/QuarterBackDataSource.ts"],"names":[],"mappings":";;AAgBA,MAAqB,qBAAqB;IAaxC,YAAY,OAAyC;QAGrD,UAAK,GAAc,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACvC,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,YAAY,EAAE;gBACzC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAC5B,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,GAAG,CACV,CAAA;gBACD,IAAI,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,EAAE;oBAChC,IAAI,CAAC;wBACH,GAAG,KAAK;wBACR,GAAG,EAAE,GAAG,CAAC,GAAG;wBACZ,iBAAiB,EAAE,GAAG,CAAC,OAAO;wBAC9B,SAAS,EAAE,GAAG,CAAC,SAAS;wBACxB,YAAY,EAAE,IAAI,GAAG,EAA8B;qBACpD,CAAC,CAAA;oBACF,OAAM;iBACP;aACF;YACD,IAAI,CAAC;gBACH,GAAG,KAAK;gBACR,SAAS,EAAE,EAAE;gBACb,YAAY,EAAE,IAAI,GAAG,EAA8B;aACpD,CAAC,CAAA;QACJ,CAAC,CAAA;QAzBC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CAyBF;AAxCD,wCAwCC"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* 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.
|
|
4
|
-
*
|
|
5
|
-
* 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.
|
|
6
|
-
*
|
|
7
|
-
* The Original Code is manuscripts-frontend.
|
|
8
|
-
*
|
|
9
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
10
|
-
*
|
|
11
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2022 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
-
*/
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.useLoadDoc = void 0;
|
|
38
|
-
const transform_1 = require("@manuscripts/transform");
|
|
39
|
-
const document_1 = require("./api/document");
|
|
40
|
-
const docApi = __importStar(require("./api/document"));
|
|
41
|
-
const useLoadDoc = (authToken) => {
|
|
42
|
-
return async function loadDoc(manuscriptID, projectID, existingDoc) {
|
|
43
|
-
const found = await docApi.getDocument(projectID, manuscriptID, authToken);
|
|
44
|
-
let doc;
|
|
45
|
-
let version = 0;
|
|
46
|
-
let snapshots = [];
|
|
47
|
-
if ('data' in found) {
|
|
48
|
-
let empty = true;
|
|
49
|
-
for (const _ in found.data.doc) {
|
|
50
|
-
empty = false;
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
if (empty) {
|
|
54
|
-
if (!existingDoc) {
|
|
55
|
-
throw new Error('Unable to produce valid doc as neither model based verions nor history have a valid version');
|
|
56
|
-
}
|
|
57
|
-
await (0, document_1.updateDocument)(projectID, manuscriptID, authToken, {
|
|
58
|
-
doc: existingDoc.toJSON(),
|
|
59
|
-
schema_version: (0, transform_1.getVersion)(),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
snapshots = found.data.snapshots;
|
|
63
|
-
doc = found.data.doc;
|
|
64
|
-
version = found.data.version;
|
|
65
|
-
}
|
|
66
|
-
else if ('err' in found && found.code === 404) {
|
|
67
|
-
// Create an empty doc that will be replaced with whatever document is currently being edited
|
|
68
|
-
const res = await docApi.createDocument({
|
|
69
|
-
manuscript_model_id: manuscriptID,
|
|
70
|
-
project_model_id: projectID,
|
|
71
|
-
doc: {},
|
|
72
|
-
schema_version: (0, transform_1.getVersion)(),
|
|
73
|
-
}, authToken);
|
|
74
|
-
if ('data' in res) {
|
|
75
|
-
doc = res.data.doc;
|
|
76
|
-
version = res.data.version;
|
|
77
|
-
snapshots = res.data.snapshots;
|
|
78
|
-
}
|
|
79
|
-
if ('err' in res) {
|
|
80
|
-
console.error('Unable to create new document: ' + res.err);
|
|
81
|
-
}
|
|
82
|
-
const update = await (0, document_1.updateDocument)(projectID, manuscriptID, authToken, {
|
|
83
|
-
doc: existingDoc?.toJSON(),
|
|
84
|
-
schema_version: (0, transform_1.getVersion)(),
|
|
85
|
-
});
|
|
86
|
-
if ('err' in update) {
|
|
87
|
-
console.error('Unable to create new document: ' + update.err);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
const found = await docApi.getDocument(projectID, manuscriptID, authToken);
|
|
91
|
-
if ('data' in found && found.data.doc && found.data.version >= 0) {
|
|
92
|
-
doc = found.data.doc;
|
|
93
|
-
version = found.data.version;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (doc !== null &&
|
|
98
|
-
typeof doc === 'object' &&
|
|
99
|
-
Object.keys(doc).length !== 0) {
|
|
100
|
-
return { doc: transform_1.schema.nodeFromJSON(doc), version, snapshots };
|
|
101
|
-
}
|
|
102
|
-
return undefined;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
exports.useLoadDoc = useLoadDoc;
|
|
106
|
-
//# sourceMappingURL=useLoadDoc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadDoc.js","sourceRoot":"","sources":["../../../src/quarterback/useLoadDoc.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,sDAA2E;AAE3E,6CAA+C;AAC/C,uDAAwC;AAGjC,MAAM,UAAU,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC9C,OAAO,KAAK,UAAU,OAAO,CAC3B,YAAoB,EACpB,SAAiB,EACjB,WAA4B;QAE5B,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,CAAA;QAC1E,IAAI,GAAG,CAAA;QACP,IAAI,OAAO,GAAG,CAAC,CAAA;QACf,IAAI,SAAS,GAAoB,EAAE,CAAA;QACnC,IAAI,MAAM,IAAI,KAAK,EAAE;YACnB,IAAI,KAAK,GAAG,IAAI,CAAA;YAChB,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,GAAa,EAAE;gBACxC,KAAK,GAAG,KAAK,CAAA;gBACb,MAAK;aACN;YAED,IAAI,KAAK,EAAE;gBACT,IAAI,CAAC,WAAW,EAAE;oBAChB,MAAM,IAAI,KAAK,CACb,6FAA6F,CAC9F,CAAA;iBACF;gBACD,MAAM,IAAA,yBAAc,EAAC,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;oBACvD,GAAG,EAAE,WAAW,CAAC,MAAM,EAAE;oBACzB,cAAc,EAAE,IAAA,sBAAU,GAAE;iBAC7B,CAAC,CAAA;aACH;YAED,SAAS,GAAG,KAAK,CAAC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AI,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,EAAE;oBAChE,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAA;oBACpB,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAA;iBAC7B;aACF;SACF;QACD,IACE,GAAG,KAAK,IAAI;YACZ,OAAO,GAAG,KAAK,QAAQ;YACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,EAC7B;YACA,OAAO,EAAE,GAAG,EAAE,kBAAM,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;SAC7D;QACD,OAAO,SAAS,CAAA;IAClB,CAAC,CAAA;AACH,CAAC,CAAA;AA/EY,QAAA,UAAU,cA+EtB"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* 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.
|
|
4
|
-
*
|
|
5
|
-
* 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.
|
|
6
|
-
*
|
|
7
|
-
* The Original Code is manuscripts-frontend.
|
|
8
|
-
*
|
|
9
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
10
|
-
*
|
|
11
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.adaptTrackedData = exports.filterNodesWithTrackingData = void 0;
|
|
15
|
-
const track_changes_plugin_1 = require("@manuscripts/track-changes-plugin");
|
|
16
|
-
const hasTrackingData = (node) => {
|
|
17
|
-
return !!node?.attrs?.dataTracked;
|
|
18
|
-
};
|
|
19
|
-
const filterNodesWithTrackingData = (node) => {
|
|
20
|
-
const cleanDoc = Object.assign({}, node);
|
|
21
|
-
const cleanNode = (parent) => {
|
|
22
|
-
if (parent.content) {
|
|
23
|
-
parent.content = parent.content.filter((child) => !hasTrackingData(child));
|
|
24
|
-
parent.content.forEach((child) => cleanNode(child));
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
cleanNode(cleanDoc);
|
|
28
|
-
return cleanDoc;
|
|
29
|
-
};
|
|
30
|
-
exports.filterNodesWithTrackingData = filterNodesWithTrackingData;
|
|
31
|
-
const getLastChange = (changes) => {
|
|
32
|
-
return [...changes].sort((a, b) => b.updatedAt - a.updatedAt)[0];
|
|
33
|
-
};
|
|
34
|
-
const adaptTrackedData = (docJSONed) => {
|
|
35
|
-
const cleanDoc = Object.assign({}, docJSONed);
|
|
36
|
-
function deepCloneAttrs(object) {
|
|
37
|
-
if (typeof object !== 'object' || object === null) {
|
|
38
|
-
return object;
|
|
39
|
-
}
|
|
40
|
-
const copy = Array.isArray(object) ? [] : {};
|
|
41
|
-
for (const at in object) {
|
|
42
|
-
const deeperClone = deepCloneAttrs(object[at]);
|
|
43
|
-
if (Array.isArray(object)) {
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
copy.push(deeperClone);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
copy[at] = deeperClone;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return copy;
|
|
53
|
-
}
|
|
54
|
-
const cleanNode = (parent) => {
|
|
55
|
-
parent.attrs = deepCloneAttrs(parent.attrs);
|
|
56
|
-
// Prosemirror's Node.toJSON() references attributes so they have to be cloned to avoid disaster.
|
|
57
|
-
// It must be done before content check for the nodes like figures
|
|
58
|
-
if (parent.content) {
|
|
59
|
-
parent.content = parent.content.filter((child) => {
|
|
60
|
-
// the type is wrong. we get JSON and not the doc
|
|
61
|
-
// pass through all the nodes with no track changes at all
|
|
62
|
-
if (!child?.attrs?.dataTracked) {
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
// consider this for future implementation: text changes are in general not to be regarded => meaning always to pass through
|
|
66
|
-
const lastChange = getLastChange(child.attrs.dataTracked);
|
|
67
|
-
// for the cases when we change attributes we need to pick oldAttributes if the last change is reject.
|
|
68
|
-
// The oldAttributes are the last attributes before the rejected change
|
|
69
|
-
// so they represent current real values
|
|
70
|
-
if (lastChange.status == track_changes_plugin_1.CHANGE_STATUS.rejected &&
|
|
71
|
-
lastChange.operation == track_changes_plugin_1.CHANGE_OPERATION.set_node_attributes) {
|
|
72
|
-
// please notate that since we work on a copy of a document that is not active it is fine to assign readonly attributes
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
child.attrs = deepCloneAttrs(lastChange.oldAttrs);
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
// removing all the deleted nodes
|
|
78
|
-
if (lastChange.operation == track_changes_plugin_1.CHANGE_OPERATION.delete &&
|
|
79
|
-
lastChange.status !== track_changes_plugin_1.CHANGE_STATUS.rejected) {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
// removing supplement nodes in case insert rejected,
|
|
83
|
-
// not sure if we will need to do it for other nodes
|
|
84
|
-
if (child.type === 'supplement' &&
|
|
85
|
-
lastChange.operation == track_changes_plugin_1.CHANGE_OPERATION.insert &&
|
|
86
|
-
lastChange.status === track_changes_plugin_1.CHANGE_STATUS.rejected) {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
// @ts-ignore
|
|
90
|
-
child.attrs = deepCloneAttrs(child.attrs) || {}; // @TODO: needs refactoring, in case when there is a dataTracked attribute, we deep copy attributes 2 times.
|
|
91
|
-
return true;
|
|
92
|
-
});
|
|
93
|
-
parent.content.forEach((child) => cleanNode(child));
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
cleanNode(cleanDoc);
|
|
97
|
-
return cleanDoc;
|
|
98
|
-
};
|
|
99
|
-
exports.adaptTrackedData = adaptTrackedData;
|
|
100
|
-
//# sourceMappingURL=adapt-tracked-data.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapt-tracked-data.js","sourceRoot":"","sources":["../../../src/tracked-models/adapt-tracked-data.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,4EAI0C;AAG1C,MAAM,eAAe,GAAG,CAAC,IAAoB,EAAE,EAAE;IAC/C,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAA;AACnC,CAAC,CAAA;AAEM,MAAM,2BAA2B,GAAG,CAAC,IAAS,EAAE,EAAE;IACvD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IAExC,MAAM,SAAS,GAAG,CAAC,MAAW,EAAE,EAAE;QAChC,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CACpC,CAAC,KAAqB,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CACnD,CAAA;YACD,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAqB,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;SACpE;IACH,CAAC,CAAA;IAED,SAAS,CAAC,QAAQ,CAAC,CAAA;IAEnB,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAfY,QAAA,2BAA2B,+BAevC;AAED,MAAM,aAAa,GAAG,CAAC,OAAuB,EAAE,EAAE;IAChD,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,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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.
|
|
4
|
-
*
|
|
5
|
-
* 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.
|
|
6
|
-
*
|
|
7
|
-
* The Original Code is manuscripts-frontend.
|
|
8
|
-
*
|
|
9
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
10
|
-
*
|
|
11
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.deleteSupplementNode = exports.createSupplementNode = exports.deleteComment = exports.saveComment = exports.createAffiliationNode = exports.createContributorNode = void 0;
|
|
15
|
-
const body_editor_1 = require("@manuscripts/body-editor");
|
|
16
|
-
const track_changes_plugin_1 = require("@manuscripts/track-changes-plugin");
|
|
17
|
-
const transform_1 = require("@manuscripts/transform");
|
|
18
|
-
const createContributorNode = (model, view, doc, state) => {
|
|
19
|
-
const { tr } = state;
|
|
20
|
-
doc.descendants((node, pos) => {
|
|
21
|
-
if (node.type === transform_1.schema.nodes.contributors) {
|
|
22
|
-
tr.insert(pos + 1, transform_1.schema.nodes.contributor.create({
|
|
23
|
-
...model,
|
|
24
|
-
id: model._id,
|
|
25
|
-
}, transform_1.schema.text('_')
|
|
26
|
-
/*
|
|
27
|
-
quarterback as it is now works incorrectly with empty nodes and updating attributes on them is misinterpreted as deletion.
|
|
28
|
-
We either need to update quarterback to work correctly with empty nodes attributes or provide some content for these nodes or
|
|
29
|
-
implement a mechanism that would detect attributes updates on empty nodes and setMeta as we do for metaNodes
|
|
30
|
-
*/
|
|
31
|
-
));
|
|
32
|
-
view.dispatch(tr);
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
exports.createContributorNode = createContributorNode;
|
|
38
|
-
const createAffiliationNode = (model, view, doc, state) => {
|
|
39
|
-
const { tr } = state;
|
|
40
|
-
doc.descendants((node, pos) => {
|
|
41
|
-
if (node.type === transform_1.schema.nodes.affiliations) {
|
|
42
|
-
tr.insert(pos + node.nodeSize - 1, transform_1.schema.nodes.affiliation.create({
|
|
43
|
-
...model,
|
|
44
|
-
id: model._id,
|
|
45
|
-
}, transform_1.schema.text('_')));
|
|
46
|
-
view.dispatch(tr);
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
exports.createAffiliationNode = createAffiliationNode;
|
|
52
|
-
const saveComment = (comment, view, doc, state, modelMap) => {
|
|
53
|
-
const documentComment = {
|
|
54
|
-
id: comment._id,
|
|
55
|
-
contents: comment.contents,
|
|
56
|
-
target: comment.target,
|
|
57
|
-
selector: comment.selector,
|
|
58
|
-
contributions: comment.contributions,
|
|
59
|
-
resolved: comment.resolved,
|
|
60
|
-
originalText: comment.originalText,
|
|
61
|
-
};
|
|
62
|
-
const isNewComment = !modelMap.has(comment._id);
|
|
63
|
-
const { tr } = state;
|
|
64
|
-
doc.descendants((node, pos) => {
|
|
65
|
-
if (isNewComment) {
|
|
66
|
-
/** for new comments will add comment node to the comment list node
|
|
67
|
-
* */
|
|
68
|
-
if (node.type === transform_1.schema.nodes.comments) {
|
|
69
|
-
(0, track_changes_plugin_1.skipTracking)(tr.replaceWith(pos, pos + node.nodeSize, node.content.addToEnd(transform_1.schema.nodes.comment.create(documentComment))));
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
if (node.attrs.id === comment._id && node.type === transform_1.schema.nodes.comment) {
|
|
75
|
-
(0, track_changes_plugin_1.skipTracking)(tr.setNodeMarkup(pos, undefined, {
|
|
76
|
-
...documentComment,
|
|
77
|
-
}));
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
(0, body_editor_1.clearCommentSelection)(tr);
|
|
83
|
-
view.dispatch(tr);
|
|
84
|
-
return Promise.resolve(comment);
|
|
85
|
-
};
|
|
86
|
-
exports.saveComment = saveComment;
|
|
87
|
-
const deleteComment = (comment, view, doc, state) => {
|
|
88
|
-
const { tr } = state;
|
|
89
|
-
doc.descendants((node, pos) => {
|
|
90
|
-
if (node.attrs.id === comment._id && node.type === transform_1.schema.nodes.comment) {
|
|
91
|
-
tr.delete(pos, pos + node.nodeSize);
|
|
92
|
-
tr.setMeta('track-changes-skip-tracking', true);
|
|
93
|
-
(0, body_editor_1.clearCommentSelection)(tr);
|
|
94
|
-
view.dispatch(tr);
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
return Promise.resolve(comment._id);
|
|
99
|
-
};
|
|
100
|
-
exports.deleteComment = deleteComment;
|
|
101
|
-
const createSupplementNode = (view, supplement) => {
|
|
102
|
-
view.state.doc.descendants((node, pos) => {
|
|
103
|
-
if (node.type === transform_1.schema.nodes.supplements) {
|
|
104
|
-
view.dispatch(view.state.tr.insert(pos + node.nodeSize - 1, transform_1.schema.nodes.supplement.create({
|
|
105
|
-
id: supplement._id,
|
|
106
|
-
href: supplement.href,
|
|
107
|
-
mimeType: supplement.MIME?.split('/')[0],
|
|
108
|
-
mimeSubType: supplement.MIME?.split('/')[1],
|
|
109
|
-
title: supplement.title,
|
|
110
|
-
})));
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
return Promise.resolve(supplement);
|
|
115
|
-
};
|
|
116
|
-
exports.createSupplementNode = createSupplementNode;
|
|
117
|
-
const deleteSupplementNode = (view, supplement) => {
|
|
118
|
-
const tr = view.state.tr;
|
|
119
|
-
tr.doc.descendants((node, pos) => {
|
|
120
|
-
if (node.type === transform_1.schema.nodes.supplement &&
|
|
121
|
-
supplement._id === node.attrs.id) {
|
|
122
|
-
tr.delete(pos, pos + node.nodeSize);
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
view.dispatch(tr);
|
|
126
|
-
return Promise.resolve(supplement);
|
|
127
|
-
};
|
|
128
|
-
exports.deleteSupplementNode = deleteSupplementNode;
|
|
129
|
-
//# sourceMappingURL=creators.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"creators.js","sourceRoot":"","sources":["../../../src/tracked-models/creators.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,0DAAgE;AAQhE,4EAAgE;AAChE,sDAA+C;AAKxC,MAAM,qBAAqB,GAAG,CACnC,KAA2B,EAC3B,IAAgB,EAChB,GAAoB,EACpB,KAAkB,EAClB,EAAE;IACF,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAA;IACpB,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QAC5B,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAM,CAAC,KAAK,CAAC,YAAY,EAAE;YAC3C,EAAE,CAAC,MAAM,CACP,GAAG,GAAG,CAAC,EACP,kBAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAC7B;gBACE,GAAG,KAAK;gBACR,EAAE,EAAE,KAAK,CAAC,GAAG;aACd,EACD,kBAAM,CAAC,IAAI,CAAC,GAAG,CAAC;YAChB;;;;gBAII;aACL,CACF,CAAA;YACD,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACjB,OAAO,KAAK,CAAA;SACb;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AA5BY,QAAA,qBAAqB,yBA4BjC;AAEM,MAAM,qBAAqB,GAAG,CACnC,KAA2B,EAC3B,IAAgB,EACh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