@manuscripts/article-editor 1.4.17 → 1.4.18-LEAN-3014-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/cjs/src/components/inspector/SectionInspector.js +0 -52
- package/dist/cjs/src/components/inspector/SectionInspector.js.map +1 -1
- package/dist/cjs/src/components/projects/ContentTab.js +1 -4
- package/dist/cjs/src/components/projects/ContentTab.js.map +1 -1
- package/dist/cjs/src/components/projects/ManuscriptPageContainer.js +1 -1
- package/dist/cjs/src/components/projects/ManuscriptPageContainer.js.map +1 -1
- package/dist/es/src/components/inspector/SectionInspector.js +1 -53
- package/dist/es/src/components/inspector/SectionInspector.js.map +1 -1
- package/dist/es/src/components/projects/ContentTab.js +1 -4
- package/dist/es/src/components/projects/ContentTab.js.map +1 -1
- package/dist/es/src/components/projects/ManuscriptPageContainer.js +2 -2
- package/dist/es/src/components/projects/ManuscriptPageContainer.js.map +1 -1
- package/dist/types/src/components/inspector/SectionInspector.d.ts +11 -0
- package/package.json +6 -6
- package/dist/cjs/src/components/inspector/StatisticsInspector.js +0 -39
- package/dist/cjs/src/components/inspector/StatisticsInspector.js.map +0 -1
- package/dist/es/src/components/inspector/StatisticsInspector.js +0 -32
- package/dist/es/src/components/inspector/StatisticsInspector.js.map +0 -1
- package/dist/types/src/components/inspector/StatisticsInspector.d.ts +0 -17
|
@@ -27,20 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.SectionInspector = void 0;
|
|
30
|
-
/*!
|
|
31
|
-
* 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.
|
|
32
|
-
*
|
|
33
|
-
* 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.
|
|
34
|
-
*
|
|
35
|
-
* The Original Code is manuscripts-frontend.
|
|
36
|
-
*
|
|
37
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
38
|
-
*
|
|
39
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
40
|
-
*/
|
|
41
|
-
const body_editor_1 = require("@manuscripts/body-editor");
|
|
42
30
|
const title_editor_1 = require("@manuscripts/title-editor");
|
|
43
|
-
const transform_1 = require("@manuscripts/transform");
|
|
44
31
|
const prosemirror_utils_1 = require("prosemirror-utils");
|
|
45
32
|
const react_1 = __importStar(require("react"));
|
|
46
33
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
@@ -67,35 +54,6 @@ const SectionInspector = ({ dispatchNodeAttrs, section, sectionNode, state, disp
|
|
|
67
54
|
}
|
|
68
55
|
return exisitingCats;
|
|
69
56
|
}, [modelMap.size]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
70
|
-
const [titleSuppressed, setTitleSuppressed] = (0, react_1.useState)(!!section.titleSuppressed);
|
|
71
|
-
const updateTitleSuppressed = (0, react_1.useCallback)((e) => {
|
|
72
|
-
e.preventDefault();
|
|
73
|
-
const nextTitleSuppressed = !e.target.checked;
|
|
74
|
-
setTitleSuppressed(nextTitleSuppressed);
|
|
75
|
-
dispatchNodeAttrs(section._id, { titleSuppressed: nextTitleSuppressed });
|
|
76
|
-
}, [section, dispatchNodeAttrs]);
|
|
77
|
-
const updateGeneratedLabel = (0, react_1.useCallback)((e) => {
|
|
78
|
-
e.preventDefault();
|
|
79
|
-
const isGenerated = !e.target.checked;
|
|
80
|
-
// setGeneratedLabel(isGenerated)
|
|
81
|
-
const tr = dispatchNodeAttrs(section._id, {
|
|
82
|
-
generatedLabel: isGenerated,
|
|
83
|
-
}, !isGenerated);
|
|
84
|
-
if (!isGenerated) {
|
|
85
|
-
let existingLabel = null;
|
|
86
|
-
sectionNode?.descendants((node) => {
|
|
87
|
-
if ((0, transform_1.isSectionLabelNode)(node)) {
|
|
88
|
-
existingLabel = node;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
if (!existingLabel) {
|
|
92
|
-
(0, body_editor_1.insertSectionLabel)(state, dispatch, tr);
|
|
93
|
-
}
|
|
94
|
-
else if (tr) {
|
|
95
|
-
dispatch(tr);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}, [section, dispatchNodeAttrs, state, dispatch, sectionNode]);
|
|
99
57
|
const sortedSectionCategories = (0, react_1.useMemo)(() => {
|
|
100
58
|
const container = (0, prosemirror_utils_1.findParentNode)((node) => node.attrs.category)(state.selection)?.node;
|
|
101
59
|
if (!container) {
|
|
@@ -111,16 +69,6 @@ const SectionInspector = ({ dispatchNodeAttrs, section, sectionNode, state, disp
|
|
|
111
69
|
const currentSectionCategory = (0, section_categories_1.chooseSectionCategory)(section);
|
|
112
70
|
return (react_1.default.createElement(InspectorSection_1.InspectorSection, { title: 'Section' },
|
|
113
71
|
section.title && react_1.default.createElement(StyledTitle, { value: section.title }),
|
|
114
|
-
sectionNode && 'titleSuppressed' in sectionNode.attrs && (react_1.default.createElement("div", null,
|
|
115
|
-
react_1.default.createElement("label", null,
|
|
116
|
-
react_1.default.createElement("input", { type: 'checkbox', checked: !titleSuppressed, onChange: updateTitleSuppressed }),
|
|
117
|
-
' ',
|
|
118
|
-
"Title is shown"))),
|
|
119
|
-
sectionNode && 'generatedLabel' in sectionNode.attrs && (react_1.default.createElement("div", null,
|
|
120
|
-
react_1.default.createElement("label", null,
|
|
121
|
-
react_1.default.createElement("input", { type: 'checkbox', checked: !sectionNode.attrs.generatedLabel, onChange: updateGeneratedLabel }),
|
|
122
|
-
' ',
|
|
123
|
-
"Use custom label"))),
|
|
124
72
|
(0, section_categories_1.isEditableSectionCategoryID)(currentSectionCategory) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
125
73
|
react_1.default.createElement(InspectorSection_1.Subheading, null, "Category"),
|
|
126
74
|
react_1.default.createElement(CategoryInput_1.CategoryInput, { value: currentSectionCategory, sectionCategories: sortedSectionCategories, existingCatsCounted: existingCatsCounted, handleChange: (category) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/SectionInspector.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SectionInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/SectionInspector.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,4DAAiD;AAGjD,yDAAkD;AAClD,+CAAsC;AACtC,0EAAsC;AAEtC,qEAIqC;AACrC,uCAAsC;AACtC,0DAAkE;AAClE,6DAAyD;AAElD,MAAM,gBAAgB,GAUxB,CAAC,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpE,MAAM,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC7D,QAAQ,EAAE,KAAK,CAAC,aAAa;QAC7B,iBAAiB,EAAE,IAAA,0CAAqB,EAAC,KAAK,CAAC,iBAAiB,CAAC;KAClE,CAAC,CAAC,CAAA;IAEH,MAAM,mBAAmB,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACvC,MAAM,aAAa,GAA8B,EAAE,CAAA;QACnD,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE;YAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAY,CAAA;YACnC,IACE,OAAO,CAAC,QAAQ;g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C,mCAAgB,IAAC,KAAK,EAAE,SAAS;QAC/B,OAAO,CAAC,KAAK,IAAI,8BAAC,WAAW,IAAC,KAAK,EAAE,OAAO,CAAC,KAAK,GAAI;QAEtD,IAAA,gDAA2B,EAAC,sBAAsB,CAAC,IAAI,CACtD;YACE,8BAAC,6BAAU,mBAAsB;YAEjC,8BAAC,6BAAa,IACZ,KAAK,EAAE,sBAAsB,EAC7B,iBAAiB,EAAE,uBAAuB,EAC1C,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,CAAC,QAAgB,EAAE,EAAE;oBACjC,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;gBAC9C,CAAC,GACD,CACD,CACJ,CACgB,CACpB,CAAA;AACH,CAAC,CAAA;AA9EY,QAAA,gBAAgB,oBA8E5B;AAED,MAAM,WAAW,GAAG,IAAA,2BAAM,EAAC,oBAAK,CAAC,CAAA;WACtB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;;CAEpD,CAAA"}
|
|
@@ -19,13 +19,11 @@ const body_editor_1 = require("@manuscripts/body-editor");
|
|
|
19
19
|
const react_1 = __importDefault(require("react"));
|
|
20
20
|
const store_1 = require("../../store");
|
|
21
21
|
const SectionInspector_1 = require("../inspector/SectionInspector");
|
|
22
|
-
const StatisticsInspector_1 = require("../inspector/StatisticsInspector");
|
|
23
22
|
const ManuscriptInspector_1 = require("./ManuscriptInspector");
|
|
24
23
|
const ContentTab = ({ dispatch, state }) => {
|
|
25
|
-
const [{ manuscript,
|
|
24
|
+
const [{ manuscript, modelMap }] = (0, store_1.useStore)((store) => {
|
|
26
25
|
return {
|
|
27
26
|
manuscript: store.manuscript,
|
|
28
|
-
doc: store.doc,
|
|
29
27
|
modelMap: store.trackModelMap,
|
|
30
28
|
};
|
|
31
29
|
});
|
|
@@ -57,7 +55,6 @@ const ContentTab = ({ dispatch, state }) => {
|
|
|
57
55
|
return transaction;
|
|
58
56
|
};
|
|
59
57
|
return (react_1.default.createElement("div", null,
|
|
60
|
-
react_1.default.createElement(StatisticsInspector_1.StatisticsInspector, { manuscript: doc, section: sectionNode }),
|
|
61
58
|
react_1.default.createElement(ManuscriptInspector_1.ManuscriptInspector, { key: manuscript._id, state: state, dispatch: dispatch }),
|
|
62
59
|
section && (react_1.default.createElement(SectionInspector_1.SectionInspector, { key: section._id, section: section, sectionNode: sectionNode, state: state, dispatch: dispatch, dispatchNodeAttrs: dispatchNodeAttrs }))));
|
|
63
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTab.js","sourceRoot":"","sources":["../../../../../src/components/projects/ContentTab.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;GAUG;AACH,0DAA4D;AAI5D,kDAAyB;AAEzB,uCAAsC;AACtC,oEAAgE;AAChE
|
|
1
|
+
{"version":3,"file":"ContentTab.js","sourceRoot":"","sources":["../../../../../src/components/projects/ContentTab.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;GAUG;AACH,0DAA4D;AAI5D,kDAAyB;AAEzB,uCAAsC;AACtC,oEAAgE;AAChE,+DAA2D;AAEpD,MAAM,UAAU,GAGlB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3B,MAAM,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE;QACpD,OAAO;YACL,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,QAAQ,EAAE,KAAK,CAAC,aAAa;SAC9B,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,IAAI,WAAW,CAAA;IACf,IAAI,OAAO,CAAA;IACX,IAAI,KAAK,CAAC,SAAS,EAAE;QACnB,WAAW,GAAG,IAAA,+BAAiB,EAAC,KAAK,CAAC,SAAS,CAAC,EAAE,IAAmB,CAAA;QACrE,IAAI,WAAW,EAAE;YACf,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAY,CAAA;SACxD;KACF;IAED,MAAM,iBAAiB,GAAG,CACxB,EAAU,EACV,KAA8B,EAC9B,UAAU,GAAG,KAAK,EAClB,EAAE;QACF,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,KAAK,CAAA;QACzB,IAAI,WAAW,CAAA;QAEf,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YAC5B,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;gBACxB,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE;oBAC/B,GAAG,IAAI,CAAC,KAAK;oBACb,GAAG,KAAK;iBACT,CAAC,CAAA;gBACF,IAAI,UAAU,EAAE;oBACd,WAAW,GAAG,EAAE,CAAA;iBACjB;qBAAM;oBACL,QAAQ,CAAC,EAAE,CAAC,CAAA;iBACb;aACF;QACH,CAAC,CAAC,CAAA;QACF,OAAO,WAAW,CAAA;IACpB,CAAC,CAAA;IAED,OAAO,CACL;QACE,8BAAC,yCAAmB,IAClB,GAAG,EAAE,UAAU,CAAC,GAAG,EACnB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,GAClB;QAED,OAAO,IAAI,CACV,8BAAC,mCAAgB,IACf,GAAG,EAAE,OAAO,CAAC,GAAG,EAChB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,GACpC,CACH,CACG,CACP,CAAA;AACH,CAAC,CAAA;AAhEY,QAAA,UAAU,cAgEtB"}
|
|
@@ -155,7 +155,7 @@ const ManuscriptPageView = () => {
|
|
|
155
155
|
// TODO:: handle dropdown list for figure and file inspector
|
|
156
156
|
trackAttrsPopper(e);
|
|
157
157
|
}, [trackAttrsPopper]);
|
|
158
|
-
return (react_1.default.createElement(
|
|
158
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
159
159
|
react_1.default.createElement(ManuscriptSidebar_1.default, { project: project, manuscript: manuscript, view: view, state: state, user: user }),
|
|
160
160
|
react_1.default.createElement(PageWrapper, { onClick: onAppClick },
|
|
161
161
|
react_1.default.createElement(Page_1.Main, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManuscriptPageContainer.js","sourceRoot":"","sources":["../../../../../src/components/projects/ManuscriptPageContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,sDAAmD;AACnD,8DAA2D;AAC3D,sDAAmD;AACnD,kCAA+B;AAE/B,
|
|
1
|
+
{"version":3,"file":"ManuscriptPageContainer.js","sourceRoot":"","sources":["../../../../../src/components/projects/ManuscriptPageContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,sDAAmD;AACnD,8DAA2D;AAC3D,sDAAmD;AACnD,kCAA+B;AAE/B,0DAA4D;AAC5D,0DAIiC;AACjC,4EAAsE;AAEtE,+CAA+E;AAC/E,0EAAsC;AAEtC,0DAAiC;AACjC,qEAA+D;AAC/D,yEAAmE;AACnE,gGAAoE;AACpE,4GAAgF;AAChF,mFAA4E;AAC5E,yEAAuE;AACvE,uEAAmE;AACnE,+DAA2D;AAC3D,uCAAsC;AACtC,sFAA6D;AAC7D,kCAA8B;AAC9B,oEAAgE;AAChE,yDAA+E;AAC/E,uDAK0B;AAC1B,oEAA2C;AAC3C,4DAAmC;AACnC,4EAAmD;AACnD,6DAAyD;AAEzD,MAAM,uBAAuB,GAAa,GAAG,EAAE;IAC7C,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,GAAG,IAAA,gBAAQ,EAAC,CA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KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK;oBACrD,CAAC,KAAK,EAAE,EAAE,CACtB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK;sBACtC,CAAC,KAAK,EAAE,EAAE,CACxB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK;;;CAGvD,CAAA;AAED,kBAAe,uBAAuB,CAAA"}
|
|
@@ -1,19 +1,6 @@
|
|
|
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 { insertSectionLabel } from '@manuscripts/body-editor';
|
|
13
1
|
import { Title } from '@manuscripts/title-editor';
|
|
14
|
-
import { isSectionLabelNode } from '@manuscripts/transform';
|
|
15
2
|
import { findParentNode } from 'prosemirror-utils';
|
|
16
|
-
import React, {
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
17
4
|
import styled from 'styled-components';
|
|
18
5
|
import { chooseSectionCategory, isEditableSectionCategoryID, sortSectionCategories, } from '../../lib/section-categories';
|
|
19
6
|
import { useStore } from '../../store';
|
|
@@ -38,35 +25,6 @@ export const SectionInspector = ({ dispatchNodeAttrs, section, sectionNode, stat
|
|
|
38
25
|
}
|
|
39
26
|
return exisitingCats;
|
|
40
27
|
}, [modelMap.size]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
41
|
-
const [titleSuppressed, setTitleSuppressed] = useState(!!section.titleSuppressed);
|
|
42
|
-
const updateTitleSuppressed = useCallback((e) => {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
const nextTitleSuppressed = !e.target.checked;
|
|
45
|
-
setTitleSuppressed(nextTitleSuppressed);
|
|
46
|
-
dispatchNodeAttrs(section._id, { titleSuppressed: nextTitleSuppressed });
|
|
47
|
-
}, [section, dispatchNodeAttrs]);
|
|
48
|
-
const updateGeneratedLabel = useCallback((e) => {
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
const isGenerated = !e.target.checked;
|
|
51
|
-
// setGeneratedLabel(isGenerated)
|
|
52
|
-
const tr = dispatchNodeAttrs(section._id, {
|
|
53
|
-
generatedLabel: isGenerated,
|
|
54
|
-
}, !isGenerated);
|
|
55
|
-
if (!isGenerated) {
|
|
56
|
-
let existingLabel = null;
|
|
57
|
-
sectionNode?.descendants((node) => {
|
|
58
|
-
if (isSectionLabelNode(node)) {
|
|
59
|
-
existingLabel = node;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
if (!existingLabel) {
|
|
63
|
-
insertSectionLabel(state, dispatch, tr);
|
|
64
|
-
}
|
|
65
|
-
else if (tr) {
|
|
66
|
-
dispatch(tr);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}, [section, dispatchNodeAttrs, state, dispatch, sectionNode]);
|
|
70
28
|
const sortedSectionCategories = useMemo(() => {
|
|
71
29
|
const container = findParentNode((node) => node.attrs.category)(state.selection)?.node;
|
|
72
30
|
if (!container) {
|
|
@@ -82,16 +40,6 @@ export const SectionInspector = ({ dispatchNodeAttrs, section, sectionNode, stat
|
|
|
82
40
|
const currentSectionCategory = chooseSectionCategory(section);
|
|
83
41
|
return (React.createElement(InspectorSection, { title: 'Section' },
|
|
84
42
|
section.title && React.createElement(StyledTitle, { value: section.title }),
|
|
85
|
-
sectionNode && 'titleSuppressed' in sectionNode.attrs && (React.createElement("div", null,
|
|
86
|
-
React.createElement("label", null,
|
|
87
|
-
React.createElement("input", { type: 'checkbox', checked: !titleSuppressed, onChange: updateTitleSuppressed }),
|
|
88
|
-
' ',
|
|
89
|
-
"Title is shown"))),
|
|
90
|
-
sectionNode && 'generatedLabel' in sectionNode.attrs && (React.createElement("div", null,
|
|
91
|
-
React.createElement("label", null,
|
|
92
|
-
React.createElement("input", { type: 'checkbox', checked: !sectionNode.attrs.generatedLabel, onChange: updateGeneratedLabel }),
|
|
93
|
-
' ',
|
|
94
|
-
"Use custom label"))),
|
|
95
43
|
isEditableSectionCategoryID(currentSectionCategory) && (React.createElement(React.Fragment, null,
|
|
96
44
|
React.createElement(Subheading, null, "Category"),
|
|
97
45
|
React.createElement(CategoryInput, { value: currentSectionCategory, sectionCategories: sortedSectionCategories, existingCatsCounted: existingCatsCounted, handleChange: (category) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/SectionInspector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SectionInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/SectionInspector.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAGjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EACL,qBAAqB,EACrB,2BAA2B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,CACpB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;WACtB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;;CAEpD,CAAA"}
|
|
@@ -13,13 +13,11 @@ import { findParentSection } from '@manuscripts/body-editor';
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { useStore } from '../../store';
|
|
15
15
|
import { SectionInspector } from '../inspector/SectionInspector';
|
|
16
|
-
import { StatisticsInspector } from '../inspector/StatisticsInspector';
|
|
17
16
|
import { ManuscriptInspector } from './ManuscriptInspector';
|
|
18
17
|
export const ContentTab = ({ dispatch, state }) => {
|
|
19
|
-
const [{ manuscript,
|
|
18
|
+
const [{ manuscript, modelMap }] = useStore((store) => {
|
|
20
19
|
return {
|
|
21
20
|
manuscript: store.manuscript,
|
|
22
|
-
doc: store.doc,
|
|
23
21
|
modelMap: store.trackModelMap,
|
|
24
22
|
};
|
|
25
23
|
});
|
|
@@ -51,7 +49,6 @@ export const ContentTab = ({ dispatch, state }) => {
|
|
|
51
49
|
return transaction;
|
|
52
50
|
};
|
|
53
51
|
return (React.createElement("div", null,
|
|
54
|
-
React.createElement(StatisticsInspector, { manuscript: doc, section: sectionNode }),
|
|
55
52
|
React.createElement(ManuscriptInspector, { key: manuscript._id, state: state, dispatch: dispatch }),
|
|
56
53
|
section && (React.createElement(SectionInspector, { key: section._id, section: section, sectionNode: sectionNode, state: state, dispatch: dispatch, dispatchNodeAttrs: dispatchNodeAttrs }))));
|
|
57
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTab.js","sourceRoot":"","sources":["../../../../../src/components/projects/ContentTab.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAI5D,OAAO,KAAK,MAAM,OAAO,CAAA;AAE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zB,IAAI,WAAW,CAAA;QAEf,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YAC5B,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;gBACxB,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE;oBAC/B,GAAG,IAAI,CAAC,KAAK;oBACb,GAAG,KAAK;iBACT,CAAC,CAAA;gBACF,IAAI,UAAU,EAAE;oBACd,WAAW,GAAG,EAAE,CAAA;iBACjB;qBAAM;oBACL,QAAQ,CAAC,EAAE,CAAC,CAAA;iBACb;aACF;QACH,CAAC,CAAC,CAAA;QACF,OAAO,WAAW,CAAA;IACpB,CAAC,CAAA;IAED,OAAO,CACL;QACE,oBAAC,mBAAmB,IAClB,GAAG,EAAE,UAAU,CAAC,GAAG,EACnB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,GAClB;QAED,OAAO,IAAI,CACV,oBAAC,gBAAgB,IACf,GAAG,EAAE,OAAO,CAAC,GAAG,EAChB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,GACpC,CACH,CACG,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -13,7 +13,7 @@ import '@manuscripts/body-editor/styles/Editor.css';
|
|
|
13
13
|
import '@manuscripts/body-editor/styles/AdvancedEditor.css';
|
|
14
14
|
import '@manuscripts/body-editor/styles/popper.css';
|
|
15
15
|
import '@reach/tabs/styles.css';
|
|
16
|
-
import { ManuscriptToolbar
|
|
16
|
+
import { ManuscriptToolbar } from '@manuscripts/body-editor';
|
|
17
17
|
import { CapabilitiesProvider, useCalcPermission, usePermissions, } from '@manuscripts/style-guide';
|
|
18
18
|
import { TrackChangesStatus } from '@manuscripts/track-changes-plugin';
|
|
19
19
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo } from 'react';
|
|
@@ -127,7 +127,7 @@ const ManuscriptPageView = () => {
|
|
|
127
127
|
// TODO:: handle dropdown list for figure and file inspector
|
|
128
128
|
trackAttrsPopper(e);
|
|
129
129
|
}, [trackAttrsPopper]);
|
|
130
|
-
return (React.createElement(
|
|
130
|
+
return (React.createElement(React.Fragment, null,
|
|
131
131
|
React.createElement(ManuscriptSidebar, { project: project, manuscript: manuscript, view: view, state: state, user: user }),
|
|
132
132
|
React.createElement(PageWrapper, { onClick: onAppClick },
|
|
133
133
|
React.createElement(Main, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManuscriptPageContainer.js","sourceRoot":"","sources":["../../../../../src/components/projects/ManuscriptPageContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,4CAA4C,CAAA;AACnD,OAAO,oDAAoD,CAAA;AAC3D,OAAO,4CAA4C,CAAA;AACnD,OAAO,wBAAwB,CAAA;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"ManuscriptPageContainer.js","sourceRoot":"","sources":["../../../../../src/components/projects/ManuscriptPageContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,4CAA4C,CAAA;AACnD,OAAO,oDAAoD,CAAA;AAC3D,OAAO,4CAA4C,CAAA;AACnD,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,GACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAEtE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/E,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,eAAe,E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this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
1
12
|
import { Section } from '@manuscripts/json-schema';
|
|
2
13
|
import { SectionNode } from '@manuscripts/transform';
|
|
3
14
|
import { EditorState, Transaction } from 'prosemirror-state';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/article-editor",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.18-LEAN-3014-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",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@fontsource/pt-sans": "^4.5.11",
|
|
38
38
|
"@fontsource/pt-serif": "^4.5.11",
|
|
39
39
|
"@manuscripts/assets": "^0.6.4",
|
|
40
|
-
"@manuscripts/body-editor": "
|
|
40
|
+
"@manuscripts/body-editor": "1.4.24-LEAN-3014-1",
|
|
41
41
|
"@manuscripts/json-schema": "^2.2.0",
|
|
42
|
-
"@manuscripts/library": "
|
|
42
|
+
"@manuscripts/library": "1.1.12-LEAN-3014-0",
|
|
43
43
|
"@manuscripts/quarterback-types": "^1.0.0",
|
|
44
|
-
"@manuscripts/style-guide": "
|
|
44
|
+
"@manuscripts/style-guide": "1.3.7-LEAN-3014-0",
|
|
45
45
|
"@manuscripts/title-editor": "^1.1.0",
|
|
46
46
|
"@manuscripts/track-changes-plugin": "^1.7.2",
|
|
47
|
-
"@manuscripts/transform": "
|
|
47
|
+
"@manuscripts/transform": "1.4.6-LEAN-3014-0",
|
|
48
48
|
"@reach/tabs": "^0.11.2",
|
|
49
49
|
"autotrack": "^2.4.1",
|
|
50
50
|
"axios": "^1.2.2",
|
|
@@ -178,4 +178,4 @@
|
|
|
178
178
|
"resolutions": {
|
|
179
179
|
"@types/react": "^17.0.2"
|
|
180
180
|
}
|
|
181
|
-
}
|
|
181
|
+
}
|
|
@@ -1,39 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.StatisticsInspector = void 0;
|
|
18
|
-
const body_editor_1 = require("@manuscripts/body-editor");
|
|
19
|
-
const react_1 = __importDefault(require("react"));
|
|
20
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
21
|
-
const InspectorSection_1 = require("../InspectorSection");
|
|
22
|
-
const InspectorSubsection = styled_components_1.default.div `
|
|
23
|
-
margin-left: ${(props) => props.theme.grid.unit * 2}px;
|
|
24
|
-
|
|
25
|
-
:not(:first-child) {
|
|
26
|
-
margin-top: ${(props) => props.theme.grid.unit * 4}px;
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
const StatisticsInspector = ({ manuscript, section }) => {
|
|
30
|
-
return (react_1.default.createElement(InspectorSection_1.InspectorSection, { title: 'Statistics' },
|
|
31
|
-
react_1.default.createElement(InspectorSubsection, null,
|
|
32
|
-
react_1.default.createElement(InspectorSection_1.Subheading, null, "Manuscript"),
|
|
33
|
-
react_1.default.createElement(body_editor_1.Statistics, { node: manuscript })),
|
|
34
|
-
section && (react_1.default.createElement(InspectorSubsection, null,
|
|
35
|
-
react_1.default.createElement(InspectorSection_1.Subheading, null, "Section"),
|
|
36
|
-
react_1.default.createElement(body_editor_1.Statistics, { node: section })))));
|
|
37
|
-
};
|
|
38
|
-
exports.StatisticsInspector = StatisticsInspector;
|
|
39
|
-
//# sourceMappingURL=StatisticsInspector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatisticsInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/StatisticsInspector.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,0DAAqD;AAErD,kDAAyB;AACzB,0EAAsC;AAEtC,0DAAkE;AAElE,MAAM,mBAAmB,GAAG,2BAAM,CAAC,GAAG,CAAA;iBACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;kBAGnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;CAErD,CAAA;AAEM,MAAM,mBAAmB,GAG3B,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/B,OAAO,CACL,8BAAC,mCAAgB,IAAC,KAAK,EAAE,YAAY;QACnC,8BAAC,mBAAmB;YAClB,8BAAC,6BAAU,qBAAwB;YAEnC,8BAAC,wBAAU,IAAC,IAAI,EAAE,UAAU,GAAI,CACZ;QAErB,OAAO,IAAI,CACV,8BAAC,mBAAmB;YAClB,8BAAC,6BAAU,kBAAqB;YAEhC,8BAAC,wBAAU,IAAC,IAAI,EAAE,OAAO,GAAI,CACT,CACvB,CACgB,CACpB,CAAA;AACH,CAAC,CAAA;AArBY,QAAA,mBAAmB,uBAqB/B"}
|
|
@@ -1,32 +0,0 @@
|
|
|
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 { Statistics } from '@manuscripts/body-editor';
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import styled from 'styled-components';
|
|
15
|
-
import { InspectorSection, Subheading } from '../InspectorSection';
|
|
16
|
-
const InspectorSubsection = styled.div `
|
|
17
|
-
margin-left: ${(props) => props.theme.grid.unit * 2}px;
|
|
18
|
-
|
|
19
|
-
:not(:first-child) {
|
|
20
|
-
margin-top: ${(props) => props.theme.grid.unit * 4}px;
|
|
21
|
-
}
|
|
22
|
-
`;
|
|
23
|
-
export const StatisticsInspector = ({ manuscript, section }) => {
|
|
24
|
-
return (React.createElement(InspectorSection, { title: 'Statistics' },
|
|
25
|
-
React.createElement(InspectorSubsection, null,
|
|
26
|
-
React.createElement(Subheading, null, "Manuscript"),
|
|
27
|
-
React.createElement(Statistics, { node: manuscript })),
|
|
28
|
-
section && (React.createElement(InspectorSubsection, null,
|
|
29
|
-
React.createElement(Subheading, null, "Section"),
|
|
30
|
-
React.createElement(Statistics, { node: section })))));
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=StatisticsInspector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatisticsInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/StatisticsInspector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAElE,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;iBACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;kBAGnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;CAErD,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAG3B,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/B,OAAO,CACL,oBAAC,gBAAgB,IAAC,KAAK,EAAE,YAAY;QACnC,oBAAC,mBAAmB;YAClB,oBAAC,UAAU,qBAAwB;YAEnC,oBAAC,UAAU,IAAC,IAAI,EAAE,UAAU,GAAI,CACZ;QAErB,OAAO,IAAI,CACV,oBAAC,mBAAmB;YAClB,oBAAC,UAAU,kBAAqB;YAEhC,oBAAC,UAAU,IAAC,IAAI,EAAE,OAAO,GAAI,CACT,CACvB,CACgB,CACpB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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 { ManuscriptNode, SectionNode } from '@manuscripts/transform';
|
|
13
|
-
import React from 'react';
|
|
14
|
-
export declare const StatisticsInspector: React.FC<{
|
|
15
|
-
manuscript: ManuscriptNode;
|
|
16
|
-
section?: SectionNode;
|
|
17
|
-
}>;
|