@manuscripts/article-editor 3.9.0 → 3.9.1-LEAN-2023.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{es/lib/tracking.js → cjs/__mocks__/fileMock.js} +4 -35
- package/dist/cjs/__mocks__/fileMock.js.map +1 -0
- package/dist/cjs/__mocks__/styleMock.js +15 -0
- package/dist/cjs/__mocks__/styleMock.js.map +1 -0
- package/dist/cjs/lib/{tracking.js → __tests__/layout.test.js} +25 -38
- package/dist/cjs/lib/__tests__/layout.test.js.map +1 -0
- package/dist/cjs/lib/__tests__/preferences.test.js +50 -0
- package/dist/cjs/lib/__tests__/preferences.test.js.map +1 -0
- package/dist/cjs/lib/__tests__/roles.test.js +32 -0
- package/dist/cjs/lib/__tests__/roles.test.js.map +1 -0
- package/dist/cjs/lib/change-handlers.js +28 -5
- package/dist/cjs/lib/change-handlers.js.map +1 -1
- package/dist/es/__mocks__/fileMock.js +13 -0
- package/dist/es/__mocks__/fileMock.js.map +1 -0
- package/dist/es/__mocks__/styleMock.js +13 -0
- package/dist/es/__mocks__/styleMock.js.map +1 -0
- package/dist/es/lib/__tests__/layout.test.js +33 -0
- package/dist/es/lib/__tests__/layout.test.js.map +1 -0
- package/dist/es/lib/__tests__/preferences.test.js +25 -0
- package/dist/es/lib/__tests__/preferences.test.js.map +1 -0
- package/dist/es/lib/__tests__/roles.test.js +30 -0
- package/dist/es/lib/__tests__/roles.test.js.map +1 -0
- package/dist/es/lib/change-handlers.js +23 -1
- package/dist/es/lib/change-handlers.js.map +1 -1
- package/dist/types/__mocks__/fileMock.d.ts +13 -0
- package/dist/types/__mocks__/styleMock.d.ts +13 -0
- package/dist/types/components/projects/inputs.d.ts +1 -1
- package/dist/types/lib/{tracking.d.ts → __tests__/layout.test.d.ts} +0 -17
- package/dist/types/lib/__tests__/preferences.test.d.ts +12 -0
- package/dist/types/lib/__tests__/roles.test.d.ts +12 -0
- package/dist/types/lib/change-handlers.d.ts +1 -0
- package/package.json +77 -82
- package/dist/cjs/lib/tracking.js.map +0 -1
- package/dist/es/lib/tracking.js.map +0 -1
@@ -1,3 +1,4 @@
|
|
1
|
+
"use strict";
|
1
2
|
/*!
|
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.
|
3
4
|
*
|
@@ -9,38 +10,6 @@
|
|
9
10
|
*
|
10
11
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
11
12
|
*/
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
hitType: 'event',
|
16
|
-
eventCategory: category,
|
17
|
-
eventAction: action,
|
18
|
-
eventLabel: label,
|
19
|
-
eventValue: value,
|
20
|
-
});
|
21
|
-
}
|
22
|
-
};
|
23
|
-
export const changeOperationAlias = (operation) => {
|
24
|
-
switch (operation) {
|
25
|
-
case 'delete': {
|
26
|
-
return 'Deleted';
|
27
|
-
}
|
28
|
-
case 'insert':
|
29
|
-
case 'wrap_with_node': {
|
30
|
-
return 'Inserted';
|
31
|
-
}
|
32
|
-
case 'set_attrs': {
|
33
|
-
return 'Updated';
|
34
|
-
}
|
35
|
-
case 'node_split': {
|
36
|
-
return 'Split';
|
37
|
-
}
|
38
|
-
case 'move': {
|
39
|
-
return 'Move';
|
40
|
-
}
|
41
|
-
default: {
|
42
|
-
return 'null';
|
43
|
-
}
|
44
|
-
}
|
45
|
-
};
|
46
|
-
//# sourceMappingURL=tracking.js.map
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
+
exports.default = 'test-file-stub';
|
15
|
+
//# sourceMappingURL=fileMock.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fileMock.js","sourceRoot":"","sources":["../../../src/__mocks__/fileMock.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAEH,kBAAe,gBAAgB,CAAA"}
|
@@ -0,0 +1,15 @@
|
|
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.default = {};
|
15
|
+
//# sourceMappingURL=styleMock.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"styleMock.js","sourceRoot":"","sources":["../../../src/__mocks__/styleMock.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAEH,kBAAe,EAAE,CAAA"}
|
@@ -10,42 +10,29 @@
|
|
10
10
|
*
|
11
11
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
12
12
|
*/
|
13
|
-
|
14
|
-
|
15
|
-
const trackEvent = ({ category, action, label, value }) => {
|
16
|
-
if (window.ga) {
|
17
|
-
window.ga('send', {
|
18
|
-
hitType: 'event',
|
19
|
-
eventCategory: category,
|
20
|
-
eventAction: action,
|
21
|
-
eventLabel: label,
|
22
|
-
eventValue: value,
|
23
|
-
});
|
24
|
-
}
|
25
|
-
};
|
26
|
-
exports.trackEvent = trackEvent;
|
27
|
-
const changeOperationAlias = (operation) => {
|
28
|
-
switch (operation) {
|
29
|
-
case 'delete': {
|
30
|
-
return 'Deleted';
|
31
|
-
}
|
32
|
-
case 'insert':
|
33
|
-
case 'wrap_with_node': {
|
34
|
-
return 'Inserted';
|
35
|
-
}
|
36
|
-
case 'set_attrs': {
|
37
|
-
return 'Updated';
|
38
|
-
}
|
39
|
-
case 'node_split': {
|
40
|
-
return 'Split';
|
41
|
-
}
|
42
|
-
case 'move': {
|
43
|
-
return 'Move';
|
44
|
-
}
|
45
|
-
default: {
|
46
|
-
return 'null';
|
47
|
-
}
|
48
|
-
}
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
49
15
|
};
|
50
|
-
exports
|
51
|
-
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
const layout_1 = __importDefault(require("../layout"));
|
18
|
+
describe('layout state persistence', () => {
|
19
|
+
it('get', () => {
|
20
|
+
const loadResult = layout_1.default.get('foo');
|
21
|
+
expect(loadResult).toEqual({ size: 200, collapsed: false });
|
22
|
+
});
|
23
|
+
it('set', () => {
|
24
|
+
const bar = {
|
25
|
+
size: 10,
|
26
|
+
collapsed: true,
|
27
|
+
};
|
28
|
+
const setResult = layout_1.default.set('foo', bar);
|
29
|
+
expect(setResult).toEqual(bar);
|
30
|
+
// expect(Layout.get('foo')).toEqual(bar) // FIXME: I think this not being met is indicating a bug?
|
31
|
+
});
|
32
|
+
it('remove', () => {
|
33
|
+
layout_1.default.remove();
|
34
|
+
const storage = window.localStorage;
|
35
|
+
expect(storage.getItem('layout')).toBeFalsy();
|
36
|
+
});
|
37
|
+
});
|
38
|
+
//# sourceMappingURL=layout.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"layout.test.js","sourceRoot":"","sources":["../../../../src/lib/__tests__/layout.test.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAEH,uDAAqC;AAErC,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,gBAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC3C,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAA;IAC7D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;QACb,MAAM,GAAG,GAAG;YACV,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,IAAI;SAChB,CAAA;QACD,MAAM,SAAS,GAAG,gBAAa,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;QAC/C,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAC9B,mGAAmG;IACrG,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAChB,gBAAa,CAAC,MAAM,EAAE,CAAA;QACtB,MAAM,OAAO,GAAG,MAAM,CAAC,YAAY,CAAA;QACnC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAA;IAC/C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,50 @@
|
|
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
|
+
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
|
+
const preferences_1 = __importStar(require("../preferences"));
|
38
|
+
describe('preferences', () => {
|
39
|
+
it('have defaults', () => {
|
40
|
+
expect(preferences_1.default.get()).toEqual(preferences_1.defaults);
|
41
|
+
});
|
42
|
+
it('can be set and removed', () => {
|
43
|
+
const prefs = { locale: 'ar' };
|
44
|
+
expect(preferences_1.default.set(prefs)).toEqual(prefs);
|
45
|
+
expect(preferences_1.default.get()).toEqual(prefs);
|
46
|
+
preferences_1.default.remove();
|
47
|
+
expect(preferences_1.default.get()).toEqual(preferences_1.defaults); // check that we're back to defaults
|
48
|
+
});
|
49
|
+
});
|
50
|
+
//# sourceMappingURL=preferences.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"preferences.test.js","sourceRoot":"","sources":["../../../../src/lib/__tests__/preferences.test.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8DAA6D;AAE7D,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;QACvB,MAAM,CAAC,qBAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAQ,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAChC,MAAM,KAAK,GAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;QAC3C,MAAM,CAAC,qBAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACvC,MAAM,CAAC,qBAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAElC,qBAAK,CAAC,MAAM,EAAE,CAAA;QACd,MAAM,CAAC,qBAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAQ,CAAC,CAAA,CAAC,oCAAoC;IAC5E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,32 @@
|
|
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
|
+
const roles_1 = require("../roles");
|
15
|
+
describe('roles', () => {
|
16
|
+
const project = {
|
17
|
+
owners: ['User_A'],
|
18
|
+
viewers: ['User_B'],
|
19
|
+
writers: ['User_C'],
|
20
|
+
};
|
21
|
+
it('isOwner must return true if the user is an owner', () => expect((0, roles_1.isOwner)(project, 'User_A')).toBeTruthy());
|
22
|
+
it('isOwner must return false if the user is not an owner', () => expect((0, roles_1.isOwner)(project, 'User_D')).toBeFalsy());
|
23
|
+
it('isWriter must return true if the user is a writer', () => expect((0, roles_1.isWriter)(project, 'User_C')).toBeTruthy());
|
24
|
+
it('isWriter must return false if the user is not a writer', () => expect((0, roles_1.isWriter)(project, 'User_D')).toBeFalsy());
|
25
|
+
it('isViewer must return true if the user is a viewer', () => expect((0, roles_1.isViewer)(project, 'User_B')).toBeTruthy());
|
26
|
+
it('isViewer must return false if the user is not a viewer', () => expect((0, roles_1.isViewer)(project, 'User_D')).toBeFalsy());
|
27
|
+
it('getRole must return owner if the user is an owner', () => expect((0, roles_1.getUserRole)(project, 'User_A')).toBe(roles_1.ProjectRole.owner));
|
28
|
+
it('getRole must return writer if the user is a writer', () => expect((0, roles_1.getUserRole)(project, 'User_C')).toBe(roles_1.ProjectRole.writer));
|
29
|
+
it('getRole must return viewer if the user is a viewer', () => expect((0, roles_1.getUserRole)(project, 'User_B')).toBe(roles_1.ProjectRole.viewer));
|
30
|
+
it('getRole must return null if the user not in the project', () => expect((0, roles_1.getUserRole)(project, 'User_D')).toBeNull());
|
31
|
+
});
|
32
|
+
//# sourceMappingURL=roles.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"roles.test.js","sourceRoot":"","sources":["../../../../src/lib/__tests__/roles.test.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAIH,oCAAgF;AAEhF,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,MAAM,OAAO,GAAY;QACvB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,CAAC,QAAQ,CAAC;QACnB,OAAO,EAAE,CAAC,QAAQ,CAAC;KACT,CAAA;IAEZ,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE,CAC1D,MAAM,CAAC,IAAA,eAAO,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAA;IAElD,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE,CAC/D,MAAM,CAAC,IAAA,eAAO,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAA;IAEjD,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE,CAC3D,MAAM,CAAC,IAAA,gBAAQ,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAA;IAEnD,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE,CAChE,MAAM,CAAC,IAAA,gBAAQ,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAA;IAElD,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE,CAC3D,MAAM,CAAC,IAAA,gBAAQ,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAA;IAEnD,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE,CAChE,MAAM,CAAC,IAAA,gBAAQ,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAA;IAElD,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE,CAC3D,MAAM,CAAC,IAAA,mBAAW,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAW,CAAC,KAAK,CAAC,CAAC,CAAA;IAEjE,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE,CAC5D,MAAM,CAAC,IAAA,mBAAW,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAW,CAAC,MAAM,CAAC,CAAC,CAAA;IAElE,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE,CAC5D,MAAM,CAAC,IAAA,mBAAW,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAW,CAAC,MAAM,CAAC,CAAC,CAAA;IAElE,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE,CACjE,MAAM,CAAC,IAAA,mBAAW,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;AACtD,CAAC,CAAC,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleUnknownChange = exports.handleGroupChanges = exports.handleNodeChange = exports.handleTextChange = void 0;
|
3
|
+
exports.changeOperationAlias = exports.handleUnknownChange = exports.handleGroupChanges = exports.handleNodeChange = exports.handleTextChange = void 0;
|
4
4
|
/*!
|
5
5
|
* 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.
|
6
6
|
*
|
@@ -16,7 +16,6 @@ const body_editor_1 = require("@manuscripts/body-editor");
|
|
16
16
|
const track_changes_plugin_1 = require("@manuscripts/track-changes-plugin");
|
17
17
|
const transform_1 = require("@manuscripts/transform");
|
18
18
|
const node_content_retriever_1 = require("./node-content-retriever");
|
19
|
-
const tracking_1 = require("./tracking");
|
20
19
|
const utils_1 = require("./utils");
|
21
20
|
const isAltTitleNode = (node) => node.type === transform_1.schema.nodes.alt_title;
|
22
21
|
const getTitleDisplayName = (node) => {
|
@@ -46,7 +45,7 @@ const handleTextChange = (suggestion, state) => {
|
|
46
45
|
}
|
47
46
|
}
|
48
47
|
return {
|
49
|
-
operation: (0,
|
48
|
+
operation: (0, exports.changeOperationAlias)(dataTracked.operation),
|
50
49
|
nodeName: nodeName || suggestion.nodeType.name,
|
51
50
|
content: suggestion.text,
|
52
51
|
};
|
@@ -55,7 +54,7 @@ exports.handleTextChange = handleTextChange;
|
|
55
54
|
const handleNodeChange = (suggestion, state) => {
|
56
55
|
const nodeContentRetriever = new node_content_retriever_1.NodeTextContentRetriever(state);
|
57
56
|
const { node, dataTracked } = suggestion;
|
58
|
-
const operation = (0,
|
57
|
+
const operation = (0, exports.changeOperationAlias)(dataTracked.operation);
|
59
58
|
const nodeName = transform_1.nodeNames.get(node.type) || node.type.name;
|
60
59
|
switch (node.type) {
|
61
60
|
case transform_1.schema.nodes.inline_footnote: {
|
@@ -192,7 +191,7 @@ const handleGroupChanges = (suggestions, view, doc, dataTracked) => {
|
|
192
191
|
: result?.content || '')
|
193
192
|
.join('');
|
194
193
|
return {
|
195
|
-
operation: (0,
|
194
|
+
operation: (0, exports.changeOperationAlias)(dataTracked.operation),
|
196
195
|
nodeName: titleNodeName || 'Text',
|
197
196
|
content,
|
198
197
|
};
|
@@ -206,4 +205,28 @@ const handleUnknownChange = () => {
|
|
206
205
|
};
|
207
206
|
};
|
208
207
|
exports.handleUnknownChange = handleUnknownChange;
|
208
|
+
const changeOperationAlias = (operation) => {
|
209
|
+
switch (operation) {
|
210
|
+
case 'delete': {
|
211
|
+
return 'Deleted';
|
212
|
+
}
|
213
|
+
case 'insert':
|
214
|
+
case 'wrap_with_node': {
|
215
|
+
return 'Inserted';
|
216
|
+
}
|
217
|
+
case 'set_attrs': {
|
218
|
+
return 'Updated';
|
219
|
+
}
|
220
|
+
case 'node_split': {
|
221
|
+
return 'Split';
|
222
|
+
}
|
223
|
+
case 'move': {
|
224
|
+
return 'Move';
|
225
|
+
}
|
226
|
+
default: {
|
227
|
+
return 'null';
|
228
|
+
}
|
229
|
+
}
|
230
|
+
};
|
231
|
+
exports.changeOperationAlias = changeOperationAlias;
|
209
232
|
//# sourceMappingURL=change-handlers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"change-handlers.js","sourceRoot":"","sources":["../../../src/lib/change-handlers.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,0DAKiC;AACjC,4EAM0C;AAC1C,sDAK+B;AAE/B,qEAAmE;AACnE,
|
1
|
+
{"version":3,"file":"change-handlers.js","sourceRoot":"","sources":["../../../src/lib/change-handlers.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,0DAKiC;AACjC,4EAM0C;AAC1C,sDAK+B;AAE/B,qEAAmE;AACnE,mCAAuC;AAQvC,MAAM,cAAc,GAAG,CAAC,IAAoB,EAAW,EAAE,CACvD,IAAI,CAAC,IAAI,KAAK,kBAAM,CAAC,KAAK,CAAC,SAAS,CAAA;AAEtC,MAAM,mBAAmB,GAAG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,OAAO;QACL,SAAS,EAAE,IAAA,4BAAoB,EAAC,WAAW,CAAC,SAAS,CAAC;QACtD,QAAQ,EAAE,aAAa,IAAI,MAAM;QACjC,OAAO;KACR,CAAA;AACH,CAAC,CAAA;AAvCY,QAAA,kBAAkB,sBAuC9B;AAEM,MAAM,mBAAmB,GAAG,GAAgB,EAAE;IACnD,OAAO;QACL,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,iBAAiB;KAC3B,CAAA;AACH,CAAC,CAAA;AANY,QAAA,mBAAmB,uBAM/B;AAEM,MAAM,oBAAoB,GAAG,CAAC,SAAiB,EAAU,EAAE;IAChE,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ,CAAC,CAAC;YACb,OAAO,SAAS,CAAA;SACjB;QACD,KAAK,QAAQ,CAAC;QACd,KAAK,gBAAgB,CAAC,CAAC;YACrB,OAAO,UAAU,CAAA;SAClB;QACD,KAAK,WAAW,CAAC,CAAC;YAChB,OAAO,SAAS,CAAA;SACjB;QACD,KAAK,YAAY,CAAC,CAAC;YACjB,OAAO,OAAO,CAAA;SACf;QACD,KAAK,MAAM,CAAC,CAAC;YACX,OAAO,MAAM,CAAA;SACd;QACD,OAAO,CAAC,CAAC;YACP,OAAO,MAAM,CAAA;SACd;KACF;AACH,CAAC,CAAA;AAtBY,QAAA,oBAAoB,wBAsBhC"}
|
@@ -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) 2019 Atypon Systems LLC. All Rights Reserved.
|
11
|
+
*/
|
12
|
+
export default 'test-file-stub';
|
13
|
+
//# sourceMappingURL=fileMock.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fileMock.js","sourceRoot":"","sources":["../../../src/__mocks__/fileMock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAe,gBAAgB,CAAA"}
|
@@ -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) 2019 Atypon Systems LLC. All Rights Reserved.
|
11
|
+
*/
|
12
|
+
export default {};
|
13
|
+
//# sourceMappingURL=styleMock.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"styleMock.js","sourceRoot":"","sources":["../../../src/__mocks__/styleMock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAe,EAAE,CAAA"}
|
@@ -0,0 +1,33 @@
|
|
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
|
+
import LayoutStorage from '../layout';
|
13
|
+
describe('layout state persistence', () => {
|
14
|
+
it('get', () => {
|
15
|
+
const loadResult = LayoutStorage.get('foo');
|
16
|
+
expect(loadResult).toEqual({ size: 200, collapsed: false });
|
17
|
+
});
|
18
|
+
it('set', () => {
|
19
|
+
const bar = {
|
20
|
+
size: 10,
|
21
|
+
collapsed: true,
|
22
|
+
};
|
23
|
+
const setResult = LayoutStorage.set('foo', bar);
|
24
|
+
expect(setResult).toEqual(bar);
|
25
|
+
// expect(Layout.get('foo')).toEqual(bar) // FIXME: I think this not being met is indicating a bug?
|
26
|
+
});
|
27
|
+
it('remove', () => {
|
28
|
+
LayoutStorage.remove();
|
29
|
+
const storage = window.localStorage;
|
30
|
+
expect(storage.getItem('layout')).toBeFalsy();
|
31
|
+
});
|
32
|
+
});
|
33
|
+
//# sourceMappingURL=layout.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"layout.test.js","sourceRoot":"","sources":["../../../../src/lib/__tests__/layout.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,aAAa,MAAM,WAAW,CAAA;AAErC,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC3C,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAA;IAC7D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;QACb,MAAM,GAAG,GAAG;YACV,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,IAAI;SAChB,CAAA;QACD,MAAM,SAAS,GAAG,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;QAC/C,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAC9B,mGAAmG;IACrG,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAChB,aAAa,CAAC,MAAM,EAAE,CAAA;QACtB,MAAM,OAAO,GAAG,MAAM,CAAC,YAAY,CAAA;QACnC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAA;IAC/C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,25 @@
|
|
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
|
+
import Prefs, { defaults } from '../preferences';
|
13
|
+
describe('preferences', () => {
|
14
|
+
it('have defaults', () => {
|
15
|
+
expect(Prefs.get()).toEqual(defaults);
|
16
|
+
});
|
17
|
+
it('can be set and removed', () => {
|
18
|
+
const prefs = { locale: 'ar' };
|
19
|
+
expect(Prefs.set(prefs)).toEqual(prefs);
|
20
|
+
expect(Prefs.get()).toEqual(prefs);
|
21
|
+
Prefs.remove();
|
22
|
+
expect(Prefs.get()).toEqual(defaults); // check that we're back to defaults
|
23
|
+
});
|
24
|
+
});
|
25
|
+
//# sourceMappingURL=preferences.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"preferences.test.js","sourceRoot":"","sources":["../../../../src/lib/__tests__/preferences.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAe,MAAM,gBAAgB,CAAA;AAE7D,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;QACvB,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAChC,MAAM,KAAK,GAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;QAC3C,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACvC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAElC,KAAK,CAAC,MAAM,EAAE,CAAA;QACd,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA,CAAC,oCAAoC;IAC5E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,30 @@
|
|
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
|
+
import { getUserRole, isOwner, isViewer, isWriter, ProjectRole } from '../roles';
|
13
|
+
describe('roles', () => {
|
14
|
+
const project = {
|
15
|
+
owners: ['User_A'],
|
16
|
+
viewers: ['User_B'],
|
17
|
+
writers: ['User_C'],
|
18
|
+
};
|
19
|
+
it('isOwner must return true if the user is an owner', () => expect(isOwner(project, 'User_A')).toBeTruthy());
|
20
|
+
it('isOwner must return false if the user is not an owner', () => expect(isOwner(project, 'User_D')).toBeFalsy());
|
21
|
+
it('isWriter must return true if the user is a writer', () => expect(isWriter(project, 'User_C')).toBeTruthy());
|
22
|
+
it('isWriter must return false if the user is not a writer', () => expect(isWriter(project, 'User_D')).toBeFalsy());
|
23
|
+
it('isViewer must return true if the user is a viewer', () => expect(isViewer(project, 'User_B')).toBeTruthy());
|
24
|
+
it('isViewer must return false if the user is not a viewer', () => expect(isViewer(project, 'User_D')).toBeFalsy());
|
25
|
+
it('getRole must return owner if the user is an owner', () => expect(getUserRole(project, 'User_A')).toBe(ProjectRole.owner));
|
26
|
+
it('getRole must return writer if the user is a writer', () => expect(getUserRole(project, 'User_C')).toBe(ProjectRole.writer));
|
27
|
+
it('getRole must return viewer if the user is a viewer', () => expect(getUserRole(project, 'User_B')).toBe(ProjectRole.viewer));
|
28
|
+
it('getRole must return null if the user not in the project', () => expect(getUserRole(project, 'User_D')).toBeNull());
|
29
|
+
});
|
30
|
+
//# sourceMappingURL=roles.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"roles.test.js","sourceRoot":"","sources":["../../../../src/lib/__tests__/roles.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEhF,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,MAAM,OAAO,GAAY;QACvB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,CAAC,QAAQ,CAAC;QACnB,OAAO,EAAE,CAAC,QAAQ,CAAC;KACT,CAAA;IAEZ,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE,CAC1D,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAA;IAElD,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE,CAC/D,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,S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-13,7 +13,6 @@ import { affiliationLabel, authorLabel, } from '@manuscripts/body-editor';
|
|
13
13
|
import { ChangeSet, } from '@manuscripts/track-changes-plugin';
|
14
14
|
import { nodeNames, schema, } from '@manuscripts/transform';
|
15
15
|
import { NodeTextContentRetriever } from './node-content-retriever';
|
16
|
-
import { changeOperationAlias } from './tracking';
|
17
16
|
import { getParentNode } from './utils';
|
18
17
|
const isAltTitleNode = (node) => node.type === schema.nodes.alt_title;
|
19
18
|
const getTitleDisplayName = (node) => {
|
@@ -199,4 +198,27 @@ export const handleUnknownChange = () => {
|
|
199
198
|
content: 'Unknown change!',
|
200
199
|
};
|
201
200
|
};
|
201
|
+
export const changeOperationAlias = (operation) => {
|
202
|
+
switch (operation) {
|
203
|
+
case 'delete': {
|
204
|
+
return 'Deleted';
|
205
|
+
}
|
206
|
+
case 'insert':
|
207
|
+
case 'wrap_with_node': {
|
208
|
+
return 'Inserted';
|
209
|
+
}
|
210
|
+
case 'set_attrs': {
|
211
|
+
return 'Updated';
|
212
|
+
}
|
213
|
+
case 'node_split': {
|
214
|
+
return 'Split';
|
215
|
+
}
|
216
|
+
case 'move': {
|
217
|
+
return 'Move';
|
218
|
+
}
|
219
|
+
default: {
|
220
|
+
return 'null';
|
221
|
+
}
|
222
|
+
}
|
223
|
+
};
|
202
224
|
//# sourceMappingURL=change-handlers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"change-handlers.js","sourceRoot":"","sources":["../../../src/lib/change-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAEL,gBAAgB,EAChB,WAAW,GAEZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,SAAS,GAKV,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAGL,SAAS,EACT,MAAM,GACP,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,
|
1
|
+
{"version":3,"file":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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
|
+
declare const _default: "test-file-stub";
|
13
|
+
export default _default;
|
@@ -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) 2019 Atypon Systems LLC. All Rights Reserved.
|
11
|
+
*/
|
12
|
+
declare const _default: {};
|
13
|
+
export default _default;
|
@@ -9,4 +9,4 @@
|
|
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
|
-
export declare const MediumTextField: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, import("@manuscripts/style-guide").ErrorProps, never>;
|
12
|
+
export declare const MediumTextField: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, import("@manuscripts/style-guide/dist/types").ErrorProps, never>;
|
@@ -9,21 +9,4 @@
|
|
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
|
-
interface Tracking {
|
13
|
-
category: string;
|
14
|
-
action: string;
|
15
|
-
label?: string;
|
16
|
-
value?: string;
|
17
|
-
}
|
18
|
-
interface InvitationsTracking extends Tracking {
|
19
|
-
category: 'Invitations';
|
20
|
-
action: 'Share' | 'Send' | 'Accept';
|
21
|
-
}
|
22
|
-
interface ManuscriptsTracking extends Tracking {
|
23
|
-
category: 'Manuscripts';
|
24
|
-
action: 'Create' | 'Import' | 'Export';
|
25
|
-
}
|
26
|
-
type TrackEvent = (f: InvitationsTracking | ManuscriptsTracking) => void;
|
27
|
-
export declare const trackEvent: TrackEvent;
|
28
|
-
export declare const changeOperationAlias: (operation: string) => string;
|
29
12
|
export {};
|
@@ -0,0 +1,12 @@
|
|
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
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
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
|
+
export {};
|
@@ -9,4 +9,5 @@ export declare const handleTextChange: (suggestion: TextChange, state: Manuscrip
|
|
9
9
|
export declare const handleNodeChange: (suggestion: NodeChange | NodeAttrChange, state: ManuscriptEditorState) => SnippetData | null;
|
10
10
|
export declare const handleGroupChanges: (suggestions: RootChange, view: any, doc: any, dataTracked: any) => SnippetData | null;
|
11
11
|
export declare const handleUnknownChange: () => SnippetData;
|
12
|
+
export declare const changeOperationAlias: (operation: string) => string;
|
12
13
|
export {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@manuscripts/article-editor",
|
3
|
-
"version": "3.9.0",
|
3
|
+
"version": "3.9.1-LEAN-2023.0",
|
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",
|
@@ -13,96 +13,91 @@
|
|
13
13
|
"module": "dist/es",
|
14
14
|
"types": "dist/types",
|
15
15
|
"scripts": {
|
16
|
-
"dev": "
|
17
|
-
"build": "
|
18
|
-
"build:cjs": "tsc --outDir dist/cjs --module commonjs
|
19
|
-
"build:es": "tsc --outDir dist/es --declarationDir dist/types --declaration
|
16
|
+
"dev": "npm-run-all --parallel 'build:* --watch'",
|
17
|
+
"build": "npm-run-all --parallel build:*",
|
18
|
+
"build:cjs": "tsc --outDir dist/cjs --module commonjs",
|
19
|
+
"build:es": "tsc --outDir dist/es --declarationDir dist/types --declaration",
|
20
20
|
"test": "TZ=UTC jest --runInBand --detectOpenHandles --forceExit",
|
21
|
-
"test:integration": "TZ=UTC jest --config=jest.integration.config.js --runInBand --detectOpenHandles --forceExit",
|
22
|
-
"test:unit": "TZ=UTC jest --runInBand --detectOpenHandles --forceExit --testPathIgnorePatterns=Storyshots",
|
23
|
-
"test:storyshots": "TZ=UTC jest --runInBand --detectOpenHandles --forceExit --testPathPattern=Storyshots",
|
24
|
-
"test:watch": "jest --runInBand --testPathIgnorePatterns=Storyshots.test.ts --watch",
|
25
21
|
"lint": "eslint src types --ext .ts,.tsx --max-warnings 0",
|
26
|
-
"lint:fix": "eslint src types --fix --ext .ts,.tsx --max-warnings 0",
|
27
22
|
"typecheck": "tsc --noEmit",
|
28
23
|
"prettier": "prettier --write \"{src,stories,tests}/**/*.{js,ts,tsx,css}\"",
|
29
|
-
"
|
30
|
-
"preversion": "concurrently typecheck lint",
|
24
|
+
"preversion": "npm-run-all --parallel typecheck lint",
|
31
25
|
"prepare": "husky install",
|
32
|
-
"version": "
|
26
|
+
"version": "pnpm build"
|
33
27
|
},
|
34
28
|
"dependencies": {
|
35
|
-
"@fontsource/lato": "
|
36
|
-
"@fontsource/pt-sans": "
|
37
|
-
"@fontsource/pt-serif": "
|
38
|
-
"@
|
39
|
-
"@manuscripts/
|
40
|
-
"@manuscripts/
|
41
|
-
"@manuscripts/style-guide": "2.1.
|
42
|
-
"@manuscripts/track-changes-plugin": "1.10.
|
43
|
-
"@manuscripts/transform": "3.1.0",
|
44
|
-
"@popperjs/core": "
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
50
|
-
"
|
51
|
-
"prosemirror-utils": "
|
52
|
-
"
|
53
|
-
"react-
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"react
|
57
|
-
"react-
|
58
|
-
"react-
|
59
|
-
"react-
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
29
|
+
"@fontsource/lato": "5.2.5",
|
30
|
+
"@fontsource/pt-sans": "5.2.5",
|
31
|
+
"@fontsource/pt-serif": "5.2.5",
|
32
|
+
"@headlessui/react": "2.2.3",
|
33
|
+
"@manuscripts/body-editor": "2.9.1-LEAN-2023.1",
|
34
|
+
"@manuscripts/json-schema": "2.2.12",
|
35
|
+
"@manuscripts/style-guide": "2.1.14-LEAN-2023.0",
|
36
|
+
"@manuscripts/track-changes-plugin": "1.10.9-LEAN-2023.0",
|
37
|
+
"@manuscripts/transform": "3.1.1-LEAN-2023.0",
|
38
|
+
"@popperjs/core": "2.11.8",
|
39
|
+
"date-fns": "4.1.0",
|
40
|
+
"dompurify": "3.2.5",
|
41
|
+
"prosemirror-state": "1.4.3",
|
42
|
+
"prosemirror-model": "1.25.0",
|
43
|
+
"prosemirror-transform": "1.10.4",
|
44
|
+
"prosemirror-view": "1.40.0",
|
45
|
+
"prosemirror-utils": "1.2.2",
|
46
|
+
"axios": "1.9.0",
|
47
|
+
"html-react-parser": "5.2.5",
|
48
|
+
"jwt-decode": "4.0.0",
|
49
|
+
"lodash": "4.17.21",
|
50
|
+
"react": "18.3.1",
|
51
|
+
"react-dnd": "16.0.1",
|
52
|
+
"react-dnd-html5-backend": "16.0.1",
|
53
|
+
"react-dom": "18.3.1",
|
54
|
+
"react-is": "18.3.1",
|
55
|
+
"react-popper": "2.3.0",
|
56
|
+
"react-router-dom": "6.30.0",
|
57
|
+
"react-select": "5.10.1",
|
58
|
+
"styled-components": "5.3.11",
|
59
|
+
"use-sync-external-store": "1.5.0",
|
60
|
+
"uuid": "9.0.1"
|
64
61
|
},
|
65
62
|
"devDependencies": {
|
66
|
-
"@babel/core": "
|
67
|
-
"@babel/preset-env": "
|
68
|
-
"@babel/preset-react": "
|
69
|
-
"@babel/preset-typescript": "
|
70
|
-
"@manuscripts/eslint-config": "
|
71
|
-
"@types/
|
72
|
-
"@types/
|
73
|
-
"@types/
|
74
|
-
"@types/
|
75
|
-
"@types/react": "
|
76
|
-
"@types/
|
77
|
-
"@types/
|
78
|
-
"@types/
|
79
|
-
"@
|
80
|
-
"@typescript-eslint/
|
81
|
-
"
|
82
|
-
"
|
83
|
-
"
|
84
|
-
"eslint": "
|
85
|
-
"eslint-
|
86
|
-
"eslint-plugin-
|
87
|
-
"eslint-plugin-
|
88
|
-
"eslint-plugin-
|
89
|
-
"eslint-plugin-
|
90
|
-
"eslint-plugin-
|
91
|
-
"eslint-plugin-
|
92
|
-
"eslint-plugin-
|
93
|
-
"eslint-plugin-react": "
|
94
|
-
"eslint-plugin-
|
95
|
-
"
|
96
|
-
"
|
97
|
-
"jest": "
|
98
|
-
"
|
99
|
-
"
|
100
|
-
"
|
101
|
-
"
|
102
|
-
"react-dnd-test-backend": "^16.0.1",
|
103
|
-
"typescript": "^4.0.5"
|
63
|
+
"@babel/core": "7.23.7",
|
64
|
+
"@babel/preset-env": "7.23.8",
|
65
|
+
"@babel/preset-react": "7.27.1",
|
66
|
+
"@babel/preset-typescript": "7.23.3",
|
67
|
+
"@manuscripts/eslint-config": "0.5.1",
|
68
|
+
"@types/jest": "29.5.14",
|
69
|
+
"@types/lodash": "4.17.16",
|
70
|
+
"@types/node": "20.17.46",
|
71
|
+
"@types/react": "18.3.21",
|
72
|
+
"@types/react-dom": "18.3.7",
|
73
|
+
"@types/styled-components": "5.1.34",
|
74
|
+
"@types/use-sync-external-store": "1.5.0",
|
75
|
+
"@types/uuid": "9.0.8",
|
76
|
+
"@typescript-eslint/eslint-plugin": "5.62.0",
|
77
|
+
"@typescript-eslint/parser": "5.62.0",
|
78
|
+
"babel-jest": "29.7.0",
|
79
|
+
"eslint": "8.57.1",
|
80
|
+
"eslint-config-prettier": "8.10.0",
|
81
|
+
"eslint-plugin-header": "3.1.1",
|
82
|
+
"eslint-plugin-import": "2.31.0",
|
83
|
+
"eslint-plugin-jest": "27.9.0",
|
84
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
85
|
+
"eslint-plugin-mdx": "2.3.4",
|
86
|
+
"eslint-plugin-node": "11.1.0",
|
87
|
+
"eslint-plugin-prettier": "4.2.1",
|
88
|
+
"eslint-plugin-promise": "6.6.0",
|
89
|
+
"eslint-plugin-react": "7.37.5",
|
90
|
+
"eslint-plugin-react-hooks": "4.6.2",
|
91
|
+
"eslint-plugin-simple-import-sort": "8.0.0",
|
92
|
+
"husky": "8.0.3",
|
93
|
+
"jest": "29.7.0",
|
94
|
+
"jest-environment-jsdom": "29.7.0",
|
95
|
+
"npm-run-all": "4.1.5",
|
96
|
+
"prettier": "2.8.8",
|
97
|
+
"react-dnd-test-backend": "16.0.1",
|
98
|
+
"typescript": "4.9.5"
|
104
99
|
},
|
105
|
-
"
|
106
|
-
"
|
100
|
+
"engines": {
|
101
|
+
"node": ">=20.16.0"
|
107
102
|
}
|
108
103
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"tracking.js","sourceRoot":"","sources":["../../../src/lib/tracking.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAqBI,MAAM,UAAU,GAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3E,IAAI,MAAM,CAA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