@manuscripts/article-editor 3.1.48-datasource-cleanup.0 → 3.1.48

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.
Files changed (120) hide show
  1. package/dist/cjs/EditorApp.js +7 -15
  2. package/dist/cjs/EditorApp.js.map +1 -1
  3. package/dist/cjs/components/inspector/SnapshotsDropdown.js +57 -33
  4. package/dist/cjs/components/inspector/SnapshotsDropdown.js.map +1 -1
  5. package/dist/cjs/components/projects/ManuscriptPageContainer.js +1 -0
  6. package/dist/cjs/components/projects/ManuscriptPageContainer.js.map +1 -1
  7. package/dist/cjs/hooks/use-connect-editor.js +1 -1
  8. package/dist/cjs/hooks/use-connect-editor.js.map +1 -1
  9. package/dist/cjs/hooks/use-create-editor.js +14 -3
  10. package/dist/cjs/hooks/use-create-editor.js.map +1 -1
  11. package/dist/cjs/hooks/use-handle-snapshot.js +2 -2
  12. package/dist/cjs/hooks/use-handle-snapshot.js.map +1 -1
  13. package/dist/cjs/lib/api/collaboration.js +25 -0
  14. package/dist/cjs/lib/api/collaboration.js.map +1 -0
  15. package/dist/cjs/lib/api/index.js +29 -0
  16. package/dist/cjs/lib/api/index.js.map +1 -0
  17. package/dist/cjs/postgres-data/Api.js +83 -0
  18. package/dist/cjs/postgres-data/Api.js.map +1 -0
  19. package/dist/cjs/{api/ApiSource.js → postgres-data/PsSource.js} +32 -17
  20. package/dist/cjs/postgres-data/PsSource.js.map +1 -0
  21. package/dist/cjs/{api → postgres-data}/buildData.js +7 -29
  22. package/dist/cjs/postgres-data/buildData.js.map +1 -0
  23. package/dist/cjs/{api → postgres-data}/buildUtilities.js +6 -5
  24. package/dist/cjs/postgres-data/buildUtilities.js.map +1 -0
  25. package/dist/cjs/postgres-data/savingUtilities.js.map +1 -0
  26. package/dist/cjs/quarterback/QuarterbackStepsExchanger.js +145 -0
  27. package/dist/cjs/quarterback/QuarterbackStepsExchanger.js.map +1 -0
  28. package/dist/cjs/quarterback/api/document.js +43 -0
  29. package/dist/cjs/quarterback/api/document.js.map +1 -0
  30. package/dist/cjs/quarterback/api/loadDoc.js +108 -0
  31. package/dist/cjs/quarterback/api/loadDoc.js.map +1 -0
  32. package/dist/cjs/quarterback/api/methods.js +147 -0
  33. package/dist/cjs/quarterback/api/methods.js.map +1 -0
  34. package/dist/cjs/{lib/doc.js → quarterback/getDocWithoutTrackContent.js} +8 -7
  35. package/dist/cjs/quarterback/getDocWithoutTrackContent.js.map +1 -0
  36. package/dist/cjs/quarterback/types.js +3 -0
  37. package/dist/cjs/quarterback/types.js.map +1 -0
  38. package/dist/cjs/store/DataSourceStrategy.js +11 -3
  39. package/dist/cjs/store/DataSourceStrategy.js.map +1 -1
  40. package/dist/cjs/store/Store.js.map +1 -1
  41. package/dist/es/EditorApp.js +7 -15
  42. package/dist/es/EditorApp.js.map +1 -1
  43. package/dist/es/components/inspector/SnapshotsDropdown.js +59 -35
  44. package/dist/es/components/inspector/SnapshotsDropdown.js.map +1 -1
  45. package/dist/es/components/projects/ManuscriptPageContainer.js +1 -0
  46. package/dist/es/components/projects/ManuscriptPageContainer.js.map +1 -1
  47. package/dist/es/hooks/use-connect-editor.js +1 -1
  48. package/dist/es/hooks/use-connect-editor.js.map +1 -1
  49. package/dist/es/hooks/use-create-editor.js +14 -3
  50. package/dist/es/hooks/use-create-editor.js.map +1 -1
  51. package/dist/es/hooks/use-handle-snapshot.js +1 -1
  52. package/dist/es/hooks/use-handle-snapshot.js.map +1 -1
  53. package/dist/es/lib/api/collaboration.js +18 -0
  54. package/dist/es/lib/api/collaboration.js.map +1 -0
  55. package/dist/{cjs/api/types.js → es/lib/api/index.js} +3 -4
  56. package/dist/es/lib/api/index.js.map +1 -0
  57. package/dist/es/postgres-data/Api.js +77 -0
  58. package/dist/es/postgres-data/Api.js.map +1 -0
  59. package/dist/es/{api/ApiSource.js → postgres-data/PsSource.js} +31 -15
  60. package/dist/es/postgres-data/PsSource.js.map +1 -0
  61. package/dist/es/{api → postgres-data}/buildData.js +7 -29
  62. package/dist/es/postgres-data/buildData.js.map +1 -0
  63. package/dist/es/{api → postgres-data}/buildUtilities.js +6 -5
  64. package/dist/es/postgres-data/buildUtilities.js.map +1 -0
  65. package/dist/es/postgres-data/savingUtilities.js.map +1 -0
  66. package/dist/es/quarterback/QuarterbackStepsExchanger.js +118 -0
  67. package/dist/es/quarterback/QuarterbackStepsExchanger.js.map +1 -0
  68. package/dist/es/quarterback/api/document.js +32 -0
  69. package/dist/es/quarterback/api/document.js.map +1 -0
  70. package/dist/es/quarterback/api/loadDoc.js +81 -0
  71. package/dist/es/quarterback/api/loadDoc.js.map +1 -0
  72. package/dist/es/quarterback/api/methods.js +137 -0
  73. package/dist/es/quarterback/api/methods.js.map +1 -0
  74. package/dist/es/{lib/doc.js → quarterback/getDocWithoutTrackContent.js} +6 -6
  75. package/dist/es/quarterback/getDocWithoutTrackContent.js.map +1 -0
  76. package/dist/es/quarterback/types.js +2 -0
  77. package/dist/es/quarterback/types.js.map +1 -0
  78. package/dist/es/store/DataSourceStrategy.js +11 -3
  79. package/dist/es/store/DataSourceStrategy.js.map +1 -1
  80. package/dist/es/store/Store.js.map +1 -1
  81. package/dist/types/lib/api/collaboration.d.ts +17 -0
  82. package/dist/{es/api/types.js → types/lib/api/index.d.ts} +2 -3
  83. package/dist/types/{api → postgres-data}/Api.d.ts +5 -13
  84. package/dist/types/{api/ApiSource.d.ts → postgres-data/PsSource.d.ts} +4 -3
  85. package/dist/types/postgres-data/buildData.d.ts +3 -0
  86. package/dist/types/{api → postgres-data}/buildUtilities.d.ts +1 -1
  87. package/dist/types/{api/StepsExchanger.d.ts → quarterback/QuarterbackStepsExchanger.d.ts} +21 -18
  88. package/dist/types/quarterback/api/document.d.ts +20 -0
  89. package/dist/types/quarterback/api/loadDoc.d.ts +18 -0
  90. package/dist/types/quarterback/api/methods.d.ts +38 -0
  91. package/dist/types/quarterback/getDocWithoutTrackContent.d.ts +3 -0
  92. package/dist/types/{api → quarterback}/types.d.ts +48 -9
  93. package/dist/types/store/DataSourceStrategy.d.ts +5 -2
  94. package/dist/types/store/Store.d.ts +5 -4
  95. package/package.json +4 -3
  96. package/dist/cjs/api/Api.js +0 -137
  97. package/dist/cjs/api/Api.js.map +0 -1
  98. package/dist/cjs/api/ApiSource.js.map +0 -1
  99. package/dist/cjs/api/StepsExchanger.js +0 -95
  100. package/dist/cjs/api/StepsExchanger.js.map +0 -1
  101. package/dist/cjs/api/buildData.js.map +0 -1
  102. package/dist/cjs/api/buildUtilities.js.map +0 -1
  103. package/dist/cjs/api/savingUtilities.js.map +0 -1
  104. package/dist/cjs/api/types.js.map +0 -1
  105. package/dist/cjs/lib/doc.js.map +0 -1
  106. package/dist/es/api/Api.js +0 -131
  107. package/dist/es/api/Api.js.map +0 -1
  108. package/dist/es/api/ApiSource.js.map +0 -1
  109. package/dist/es/api/StepsExchanger.js +0 -90
  110. package/dist/es/api/StepsExchanger.js.map +0 -1
  111. package/dist/es/api/buildData.js.map +0 -1
  112. package/dist/es/api/buildUtilities.js.map +0 -1
  113. package/dist/es/api/savingUtilities.js.map +0 -1
  114. package/dist/es/api/types.js.map +0 -1
  115. package/dist/es/lib/doc.js.map +0 -1
  116. package/dist/types/api/buildData.d.ts +0 -3
  117. package/dist/types/lib/doc.d.ts +0 -17
  118. /package/dist/cjs/{api → postgres-data}/savingUtilities.js +0 -0
  119. /package/dist/es/{api → postgres-data}/savingUtilities.js +0 -0
  120. /package/dist/types/{api → postgres-data}/savingUtilities.d.ts +0 -0
@@ -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) 2019 Atypon Systems LLC. All Rights Reserved.
11
+ */
12
+ interface InvitedUser {
13
+ email: string;
14
+ name?: string;
15
+ }
16
+ export declare const projectInvite: (projectID: string, invitedUsers: InvitedUser[], role: string, message?: string) => Promise<import("axios").AxiosResponse<any, any>>;
17
+ export {};
@@ -7,7 +7,6 @@
7
7
  *
8
8
  * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
9
9
  *
10
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2022 Atypon Systems LLC. All Rights Reserved.
10
+ * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
11
11
  */
12
- export {};
13
- //# sourceMappingURL=types.js.map
12
+ export * from './collaboration';
@@ -11,19 +11,18 @@
11
11
  */
12
12
  import { Bundle, ManuscriptTemplate, Model, Project, SectionCategory, UserProfile } from '@manuscripts/json-schema';
13
13
  import { AxiosInstance } from 'axios';
14
- import { ManuscriptDoc, ManuscriptSnapshot } from '../lib/doc';
15
- import { CreateSnapshotResponse, SendStepsPayload, SendStepsResponse, StepsListener, StepsSinceResponse } from './types';
14
+ import { ISaveSnapshotResponse } from '../quarterback/types';
16
15
  export default class Api {
17
16
  instance: AxiosInstance;
18
- constructor(authToken: string);
17
+ constructor();
18
+ setToken: (token: string) => void;
19
19
  get: <T>(url: string) => Promise<T | undefined>;
20
20
  post: <T>(path: string, data: unknown) => Promise<T>;
21
21
  delete: <T>(url: string) => Promise<import("axios").AxiosResponse<T, any>>;
22
22
  options: <T>(url: string) => Promise<import("axios").AxiosResponse<T, any>>;
23
23
  put: <T>(path: string, data: unknown) => Promise<import("axios").AxiosResponse<T, any>>;
24
- getTransformVersion: () => Promise<string>;
25
24
  getUser: () => Promise<UserProfile | undefined>;
26
- getManuscript: (projectID: string, manuscriptID: string) => Promise<Model[] | undefined>;
25
+ getManuscript: (containerID: string, manuscriptID: string) => Promise<Model[] | undefined>;
27
26
  getSectionCategories: () => Promise<SectionCategory[] | undefined>;
28
27
  getCSLLocale: (lang: string) => Promise<string | undefined> | undefined;
29
28
  getTemplate: (id?: string) => Promise<ManuscriptTemplate | undefined> | undefined;
@@ -32,12 +31,5 @@ export default class Api {
32
31
  getUserProfiles: (containerID: string) => Promise<UserProfile[] | undefined>;
33
32
  saveProject: (projectId: string, models: Model[]) => Promise<import("axios").AxiosResponse<unknown, any>>;
34
33
  createProject: (projectId: string, title: string) => Promise<Project>;
35
- getSnapshot: (snapshotID: string) => Promise<ManuscriptSnapshot | undefined>;
36
- createSnapshot: (projectID: string, manuscriptID: string) => Promise<CreateSnapshotResponse>;
37
- getDocument: (projectID: string, manuscriptID: string) => Promise<ManuscriptDoc | undefined>;
38
- sendSteps: (projectID: string, manuscriptID: string, data: SendStepsPayload) => Promise<SendStepsResponse | {
39
- error: string;
40
- }>;
41
- getStepsSince: (projectID: string, manuscriptID: string, version: number) => Promise<StepsSinceResponse | undefined>;
42
- listenToSteps: (projectID: string, manuscriptID: string, listener: StepsListener) => void;
34
+ createSnapshot: (projectID: string, manuscriptID: string) => Promise<ISaveSnapshotResponse>;
43
35
  }
@@ -9,17 +9,18 @@
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/body-editor';
12
13
  import { builderFn, state, stateSetter } from '../store';
13
14
  import { StoreDataSourceStrategy } from '../store/DataSourceStrategy';
14
15
  import Api from './Api';
15
- export declare class ApiSource implements StoreDataSourceStrategy {
16
+ export default class PsSource implements StoreDataSourceStrategy {
16
17
  api: Api;
17
18
  data: Partial<state>;
18
19
  utilities: Partial<state>;
19
- constructor(authToken: string);
20
+ files: FileAttachment[];
21
+ constructor(files: FileAttachment[]);
20
22
  updateState: stateSetter;
21
23
  build: builderFn;
22
24
  afterAction: (state: state) => void;
23
25
  updateStore: (setState: stateSetter) => void;
24
- checkTransformVersion: () => Promise<void>;
25
26
  }
@@ -0,0 +1,3 @@
1
+ import { ManuscriptNode } from '@manuscripts/transform';
2
+ import Api from './Api';
3
+ export declare const buildData: (projectID: string, manuscriptID: string, doc: ManuscriptNode, api: Api) => Promise<{}>;
@@ -9,6 +9,6 @@
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 Api from '../postgres-data/Api';
12
13
  import { state } from '../store';
13
- import Api from './Api';
14
14
  export declare const buildUtilities: (projectID: string, manuscriptID: string, getState: () => Partial<state>, updateState: (state: Partial<state>) => void, api: Api) => Partial<state>;
@@ -11,27 +11,28 @@
11
11
  */
12
12
  import { CollabProvider } from '@manuscripts/body-editor';
13
13
  import { Step } from 'prosemirror-transform';
14
- import Api from './Api';
15
- import { saveWithDebounce } from './savingUtilities';
16
- export type Subscription = (value: boolean) => void;
17
- export declare class ObservableBoolean {
18
- value: boolean;
19
- private subs;
20
- setValue(value: boolean): void;
21
- onChange(sub: Subscription): void;
14
+ import { saveWithDebounce } from '../postgres-data/savingUtilities';
15
+ import { StepsSinceResponse } from './types';
16
+ export interface ThrottlingControl {
17
+ (currentlyThrottling: boolean, onUnload?: () => void): void;
22
18
  }
23
- export declare class StepsExchanger extends CollabProvider {
24
- projectID: string;
25
- manuscriptID: string;
26
- api: Api;
19
+ declare class QuarterbackStepsExchanger extends CollabProvider {
20
+ private static _instance;
21
+ private applySteps;
22
+ private docId;
23
+ private projectId;
24
+ private flushImmediate?;
25
+ getStepsSince: (projectId: string, docId: string, version: number) => Promise<StepsSinceResponse | undefined>;
26
+ throttlingControl: ThrottlingControl;
27
27
  debounce: ReturnType<typeof saveWithDebounce>;
28
- flushImmediately?: () => void;
29
- isThrottling: ObservableBoolean;
30
- attempt: number;
31
- constructor(projectID: string, manuscriptID: string, currentVersion: number, api: Api);
28
+ throttleState: boolean;
29
+ reconcileAttempts: number;
30
+ reconcileAttemptsMax: number;
31
+ constructor(docId: string, projectId: string, startingVersion: number, applySteps: QuarterbackStepsExchanger['applySteps'], getStepsSince: QuarterbackStepsExchanger['getStepsSince'], listenToSteps: (projectId: string, docId: string, listener: (version: number, steps: unknown[], clientIDs: number[]) => void) => void, authToken: string, throttlingControl: ThrottlingControl);
32
+ destroy(): void;
33
+ hydrateSteps(jsonSteps: unknown[]): Step[];
32
34
  sendSteps(version: number, steps: Step[], clientID: string, flush?: boolean): Promise<void>;
33
- receiveSteps(version: number, steps: unknown[], clientIDs: number[]): Promise<void>;
34
- flush(): void;
35
+ flushOnExit(): void;
35
36
  onNewSteps(listener: CollabProvider['newStepsListener']): void;
36
37
  stepsSince(version: number): Promise<{
37
38
  steps: Step[];
@@ -39,3 +40,5 @@ export declare class StepsExchanger extends CollabProvider {
39
40
  version: number;
40
41
  } | undefined>;
41
42
  }
43
+ export declare const stepsExchanger: (docId: string, projectId: string, lastVersion: number, authToken: string, throttlingControl: ThrottlingControl, isAuthed?: boolean) => QuarterbackStepsExchanger | undefined;
44
+ export default QuarterbackStepsExchanger;
@@ -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) 2022 Atypon Systems LLC. All Rights Reserved.
11
+ */
12
+ import { AppliedStepsResponse, ICreateDocRequest, IUpdateDocumentRequest, ManuscriptDocWithSnapshots, StepsPayload, StepsSinceResponse, TransformerVersion } from '../types';
13
+ export declare const getDocument: (projectID: string, manuscriptID: string, authToken: string) => Promise<import("./methods").Maybe<ManuscriptDocWithSnapshots>>;
14
+ export declare const createDocument: (payload: ICreateDocRequest, authToken: string) => Promise<import("./methods").Maybe<ManuscriptDocWithSnapshots>>;
15
+ export declare const getTransformVersion: (authToken: string) => Promise<import("./methods").Maybe<TransformerVersion>>;
16
+ export declare const updateDocument: (projectID: string, manuscriptID: string, authToken: string, payload: IUpdateDocumentRequest) => Promise<import("./methods").Maybe<boolean>>;
17
+ export declare const deleteDocument: (projectID: string, manuscriptID: string, authToken: string) => Promise<import("./methods").Maybe<boolean>>;
18
+ export declare const applySteps: (projectId: string, docId: string, authToken: string, payload: StepsPayload) => Promise<import("./methods").Maybe<AppliedStepsResponse>>;
19
+ export declare const stepsSince: (projectId: string, docId: string, version: number, authToken: string) => Promise<import("./methods").Maybe<StepsSinceResponse>>;
20
+ export declare const listenStepUpdates: (projectID: string, manuscriptID: string, dataListener: (version: number, steps: unknown[], clientIDs: number[]) => void) => void;
@@ -0,0 +1,18 @@
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) 2022 Atypon Systems LLC. All Rights Reserved.
11
+ */
12
+ import { ManuscriptNode } from '@manuscripts/transform';
13
+ import { SnapshotLabel } from '../types';
14
+ export declare function loadDoc(manuscriptID: string, projectID: string, authToken: string, existingDoc?: ManuscriptNode): Promise<{
15
+ doc: import("prosemirror-model").Node;
16
+ version: number;
17
+ snapshots: SnapshotLabel[];
18
+ } | undefined>;
@@ -0,0 +1,38 @@
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) 2022 Atypon Systems LLC. All Rights Reserved.
11
+ */
12
+ type Ok<T> = {
13
+ data: T;
14
+ };
15
+ type Error = {
16
+ err: string;
17
+ code: number;
18
+ };
19
+ export type Maybe<T> = Ok<T> | Error;
20
+ type FetchOptions = {
21
+ method: string;
22
+ headers: Record<string, string>;
23
+ body?: string;
24
+ };
25
+ export declare const DEFAULT_HEADERS: {
26
+ Accept: string;
27
+ 'Content-Type': string;
28
+ };
29
+ export declare function getAuthHeader(authToken: string): "" | {
30
+ Authorization: string;
31
+ };
32
+ export declare function wrappedFetch<T>(path: string, options: FetchOptions, defaultError?: string): Promise<Maybe<T>>;
33
+ export declare function get<T>(path: string, authToken: string, defaultError?: string, headers?: Record<string, string>): Promise<Maybe<T>>;
34
+ export declare function post<T>(path: string, authToken: string, payload: any, defaultError?: string, headers?: Record<string, string>): Promise<Maybe<T>>;
35
+ export declare function put<T>(path: string, authToken: string, payload: any, defaultError?: string, headers?: Record<string, string>): Promise<Maybe<T>>;
36
+ export declare function del<T>(path: string, authToken: string, defaultError?: string, headers?: Record<string, string>): Promise<Maybe<T>>;
37
+ export declare function listen<T>(path: string, listener: (event: MessageEvent) => void): Promise<void>;
38
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ManuscriptEditorState, ManuscriptNode } from '@manuscripts/transform';
2
+ export declare function filterUnchangedContent(node: ManuscriptNode): import("prosemirror-model").Node[];
3
+ export declare function getDocWithoutTrackContent(state: ManuscriptEditorState): import("prosemirror-model").Node;
@@ -9,27 +9,66 @@
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
- import { Step } from 'prosemirror-transform';
13
- import { ManuscriptSnapshot } from '../lib/doc';
14
- export type TransformVersionResponse = {
12
+ import { JsonValue } from 'type-fest';
13
+ export type ManuscriptSnapshot = {
14
+ id: string;
15
+ name: string;
16
+ snapshot: JsonValue;
17
+ createdAt: Date;
18
+ doc_id: string;
19
+ };
20
+ export type ManuscriptDoc = {
21
+ manuscript_model_id: string;
22
+ user_model_id: string;
23
+ project_model_id: string;
24
+ doc: JsonValue;
25
+ createdAt: Date;
26
+ updatedAt: Date;
27
+ version: number;
28
+ };
29
+ export type SnapshotLabel = Pick<ManuscriptSnapshot, 'id' | 'name' | 'createdAt'>;
30
+ export type ManuscriptDocWithSnapshots = ManuscriptDoc & {
31
+ snapshots: SnapshotLabel[];
32
+ };
33
+ export type TransformerVersion = {
15
34
  transformVersion: string;
16
35
  };
17
- export type SendStepsPayload = {
18
- steps: Step[];
36
+ export type UpdateDocumentRequest = {
37
+ doc: Record<string, any>;
38
+ };
39
+ export interface CreateDocRequest {
40
+ manuscript_model_id: string;
41
+ project_model_id: string;
42
+ doc: Record<string, any>;
43
+ }
44
+ export type StepsPayload = {
45
+ steps: unknown[];
19
46
  version: number;
20
47
  clientID: number | string;
21
48
  };
22
- export type SendStepsResponse = {
49
+ export type AppliedStepsResponse = {
23
50
  lastVersion?: number;
24
51
  steps?: number;
25
52
  error?: string;
26
53
  };
27
54
  export type StepsSinceResponse = {
28
- steps: Step[];
55
+ steps: unknown[];
29
56
  version: number;
30
57
  clientIDs: number[];
31
58
  };
32
- export interface CreateSnapshotResponse {
59
+ export type IGetSnapshotResponse = ManuscriptSnapshot;
60
+ export interface ISaveSnapshotResponse {
33
61
  snapshot: ManuscriptSnapshot;
34
62
  }
35
- export type StepsListener = (version: number, steps: unknown[], clientIDs: number[]) => void;
63
+ export interface ICreateDocRequest {
64
+ manuscript_model_id: string;
65
+ project_model_id: string;
66
+ doc: Record<string, any>;
67
+ schema_version: string;
68
+ }
69
+ export type ICreateDocResponse = ManuscriptDocWithSnapshots;
70
+ export type IUpdateDocumentRequest = {
71
+ doc: Record<string, any>;
72
+ version?: number;
73
+ schema_version: string;
74
+ };
@@ -9,6 +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/body-editor';
12
13
  import { builderFn, GenericStore, state } from '.';
13
14
  export type stateSetter = (set: Partial<state> | ((state: state) => state)) => void;
14
15
  export interface StoreDataSourceStrategy {
@@ -19,7 +20,9 @@ export interface StoreDataSourceStrategy {
19
20
  updateStore?: (setState: stateSetter) => void;
20
21
  }
21
22
  export declare class BasicSource implements StoreDataSourceStrategy {
22
- data: Partial<state>;
23
- constructor(data: Partial<state>);
23
+ data: {
24
+ [key: string]: any;
25
+ };
26
+ constructor(fileManagement: FileManagement, projectID: string, manuscriptID: string, files: FileAttachment[], permittedActions: string[], userID?: string | undefined, authToken?: string | undefined);
24
27
  build: builderFn;
25
28
  }
@@ -13,10 +13,9 @@ import { CommentKey, FileAttachment, FileManagement } from '@manuscripts/body-ed
13
13
  import { Manuscript, Project, SectionCategory, UserProfile } from '@manuscripts/json-schema';
14
14
  import { TrackChangesState } from '@manuscripts/track-changes-plugin';
15
15
  import { ManuscriptEditorView, ManuscriptNode } from '@manuscripts/transform';
16
- import { StepsExchanger } from '../api/StepsExchanger';
17
16
  import { useCreateEditor } from '../hooks/use-create-editor';
18
- import { ManuscriptSnapshot, SnapshotLabel } from '../lib/doc';
19
17
  import { ProjectRole } from '../lib/roles';
18
+ import { ManuscriptSnapshot, SnapshotLabel } from '../quarterback/types';
20
19
  import { StoreDataSourceStrategy } from '.';
21
20
  import { TokenData } from './TokenData';
22
21
  export type action = {
@@ -41,15 +40,17 @@ export type state = {
41
40
  doc: ManuscriptNode;
42
41
  trackState?: TrackChangesState;
43
42
  view: ManuscriptEditorView;
44
- stepsExchanger: StepsExchanger;
43
+ initialDocVersion: number;
45
44
  fileManagement: FileManagement;
46
45
  files: FileAttachment[];
46
+ authToken: string;
47
47
  tokenData: TokenData;
48
48
  collaborators: Map<string, UserProfile>;
49
49
  collaboratorsById: Map<string, UserProfile>;
50
50
  snapshots: SnapshotLabel[];
51
+ snapshotsMap: Map<string, ManuscriptSnapshot>;
51
52
  createSnapshot: () => Promise<void>;
52
- getSnapshot: (id: string) => Promise<ManuscriptSnapshot | undefined>;
53
+ inspectedSnapshotId: string;
53
54
  permittedActions: string[];
54
55
  selectedCommentKey?: CommentKey;
55
56
  newCommentID?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/article-editor",
3
- "version": "3.1.48-datasource-cleanup.0",
3
+ "version": "3.1.48",
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.57",
38
+ "@manuscripts/body-editor": "2.0.58",
39
39
  "@manuscripts/json-schema": "2.2.11",
40
40
  "@manuscripts/library": "1.3.11",
41
41
  "@manuscripts/style-guide": "2.0.19",
42
42
  "@manuscripts/track-changes-plugin": "1.7.22",
43
- "@manuscripts/transform": "2.3.37",
43
+ "@manuscripts/transform": "2.4.0",
44
44
  "@popperjs/core": "^2.11.8",
45
45
  "@reach/tabs": "^0.18.0",
46
46
  "@types/use-sync-external-store": "^0.0.6",
@@ -60,6 +60,7 @@
60
60
  "react-popper": "^2.0.0",
61
61
  "react-select": "^5.7.3",
62
62
  "styled-components": "^5.2.0",
63
+ "type-fest": "^4.6.0",
63
64
  "use-sync-external-store": "^1.2.2",
64
65
  "uuid": "^9.0.0",
65
66
  "yarn-run-all": "^3.1.1"
@@ -1,137 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const axios_1 = __importDefault(require("axios"));
7
- const config_1 = require("../config");
8
- class Api {
9
- constructor(authToken) {
10
- this.get = async (url) => {
11
- try {
12
- const result = await this.instance.get(url, {
13
- headers: {
14
- 'Content-Type': 'application/json;charset=UTF-8',
15
- },
16
- });
17
- return result.data;
18
- }
19
- catch (e) {
20
- console.log(e);
21
- return undefined;
22
- }
23
- };
24
- this.post = async (path, data) => {
25
- return this.instance
26
- .post(path, data)
27
- .then((result) => result.data)
28
- .catch((e) => {
29
- const status = e.response?.status;
30
- if (!status || status >= 500) {
31
- console.log(e);
32
- }
33
- throw e;
34
- });
35
- };
36
- this.delete = (url) => this.instance.delete(url);
37
- this.options = (url) => this.instance.options(url);
38
- this.put = (path, data) => this.instance.put(path, data);
39
- this.getTransformVersion = () => this.get('/doc/version').then((d) => d?.transformVersion || '');
40
- this.getUser = () => this.get('user');
41
- this.getManuscript = (projectID, manuscriptID) => this.get(`project/${projectID}/manuscript/${manuscriptID}`);
42
- this.getSectionCategories = () => this.get('/config?id=section-categories');
43
- this.getCSLLocale = (lang) => lang !== 'en-US' ? this.get(`/csl/locales?id=${lang}`) : undefined;
44
- this.getTemplate = (id) => id ? this.get(`/templates?id=${id}`) : undefined;
45
- this.getBundle = (template) => template?.bundle
46
- ? this.get(`/bundles?id=${template.bundle}`)
47
- : undefined;
48
- this.getCSLStyle = (bundle) => bundle?.csl?._id
49
- ? this.get(`/csl/styles?id=${bundle.csl._id}`)
50
- : undefined;
51
- this.getUserProfiles = (containerID) => this.get(`/project/${containerID}/userProfiles`);
52
- this.saveProject = (projectId, models) => {
53
- return this.put(`project/${projectId}`, { data: models });
54
- };
55
- this.createProject = (projectId, title) => this.post(`project/${projectId}`, { title });
56
- this.getSnapshot = (snapshotID) => this.get(`snapshot/${snapshotID}`);
57
- this.createSnapshot = (projectID, manuscriptID) => {
58
- return this.post(`snapshot/${projectID}/manuscript/${manuscriptID}`, {
59
- docID: manuscriptID,
60
- name: new Date().toLocaleString('sv'),
61
- });
62
- };
63
- this.getDocument = (projectID, manuscriptID) => this.get(`doc/${projectID}/manuscript/${manuscriptID}`);
64
- this.sendSteps = (projectID, manuscriptID, data) => this.post(`doc/${projectID}/manuscript/${manuscriptID}/steps`, {
65
- ...data,
66
- steps: data.steps.map((s) => s.toJSON()),
67
- }).catch((e) => {
68
- const error = e.response?.status === 409 ? 'conflict' : e.message;
69
- return {
70
- error: error,
71
- };
72
- });
73
- this.getStepsSince = (projectID, manuscriptID, version) => this.get(`doc/${projectID}/manuscript/${manuscriptID}/version/${version}`);
74
- this.listenToSteps = (projectID, manuscriptID, listener) => {
75
- const config = (0, config_1.getConfig)();
76
- const base = config.api.url.replace('http', 'ws');
77
- const url = `${base}/doc/${projectID}/manuscript/${manuscriptID}/listen`;
78
- let ws;
79
- const onOpen = () => {
80
- console.log('Established WebSocket connection');
81
- };
82
- const onMessage = (event) => {
83
- const data = JSON.parse(event.data);
84
- if (typeof data.version !== 'undefined' &&
85
- data.steps &&
86
- Array.isArray(data.steps) &&
87
- data.clientIDs) {
88
- listener(data.version, data.steps, data.clientIDs);
89
- }
90
- };
91
- const onClose = (event) => {
92
- console.warn('WebSocket connection closed, reconnecting:', event.code, event.reason);
93
- rejoin();
94
- };
95
- const onError = (event) => {
96
- console.error('WebSocket error, reconnecting:', event);
97
- rejoin();
98
- };
99
- const close = () => {
100
- if (!ws) {
101
- return;
102
- }
103
- ws.removeEventListener('open', onOpen);
104
- ws.removeEventListener('message', onMessage);
105
- ws.removeEventListener('close', onClose);
106
- ws.removeEventListener('error', onError);
107
- ws.close();
108
- };
109
- const rejoin = () => {
110
- close();
111
- setTimeout(join, 1500);
112
- };
113
- const join = () => {
114
- try {
115
- ws = new WebSocket(url);
116
- ws.addEventListener('open', onOpen);
117
- ws.addEventListener('message', onMessage);
118
- ws.addEventListener('close', onClose);
119
- ws.addEventListener('error', onError);
120
- }
121
- catch (e) {
122
- console.log(e);
123
- rejoin();
124
- }
125
- };
126
- window.addEventListener('beforeunload', close);
127
- join();
128
- };
129
- const config = (0, config_1.getConfig)();
130
- this.instance = axios_1.default.create({
131
- baseURL: config.api.url,
132
- headers: { ...config.api.headers, Authorization: 'Bearer ' + authToken },
133
- });
134
- }
135
- }
136
- exports.default = Api;
137
- //# sourceMappingURL=Api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Api.js","sourceRoot":"","sources":["../../../src/api/Api.ts"],"names":[],"mappings":";;;;;AAmBA,kDAAwD;AAExD,sCAAqC;AAWrC,MAAqB,GAAG;IAGtB,YAAY,SAAiB;QAQ7B,QAAG,GAAG,KAAK,EAAK,GAAW,EAAE,EAAE;YAC7B,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAI,GAAG,EAAE;oBAC7C,OAAO,EA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