@manuscripts/article-editor 1.5.9-LEAN-3019 → 1.5.9-LEAN-2995
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/InspectorSection.js +3 -20
- package/dist/cjs/src/components/InspectorSection.js.map +1 -1
- package/dist/cjs/src/components/metadata/AddAuthorsModalContainer.js +20 -3
- package/dist/cjs/src/components/metadata/AddAuthorsModalContainer.js.map +1 -1
- package/dist/cjs/src/components/metadata/AddAuthorsSidebar.js +2 -2
- package/dist/cjs/src/components/metadata/AddAuthorsSidebar.js.map +1 -1
- package/dist/cjs/src/components/metadata/AuthorFormContainer.js +22 -2
- package/dist/cjs/src/components/metadata/AuthorFormContainer.js.map +1 -1
- package/dist/cjs/src/components/metadata/AuthorsModalContainer.js +51 -26
- package/dist/cjs/src/components/metadata/AuthorsModalContainer.js.map +1 -1
- package/dist/cjs/src/components/metadata/AuthorsModals.js +16 -6
- package/dist/cjs/src/components/metadata/AuthorsModals.js.map +1 -1
- package/dist/cjs/src/components/metadata/AuthorsSidebar.js +11 -2
- package/dist/cjs/src/components/metadata/AuthorsSidebar.js.map +1 -1
- package/dist/cjs/src/components/metadata/{AuthorsInlineViewContainer.js → Metadata.js} +32 -23
- package/dist/cjs/src/components/metadata/Metadata.js.map +1 -0
- package/dist/cjs/src/components/metadata/{AuthorModalViews.js → MetadataContainer.js} +93 -49
- package/dist/cjs/src/components/metadata/MetadataContainer.js.map +1 -0
- package/dist/cjs/src/components/metadata/SearchAuthorsSidebar.js +38 -9
- package/dist/cjs/src/components/metadata/SearchAuthorsSidebar.js.map +1 -1
- package/dist/cjs/src/components/projects/ManuscriptPageContainer.js +0 -2
- package/dist/cjs/src/components/projects/ManuscriptPageContainer.js.map +1 -1
- package/dist/cjs/src/components/track-changes/utils.js +1 -5
- package/dist/cjs/src/components/track-changes/utils.js.map +1 -1
- package/dist/cjs/src/hooks/use-create-editor.js +2 -2
- package/dist/cjs/src/hooks/use-create-editor.js.map +1 -1
- package/dist/cjs/src/hooks/use-tracked-model-management.js +8 -58
- package/dist/cjs/src/hooks/use-tracked-model-management.js.map +1 -1
- package/dist/cjs/src/lib/authors.js +6 -40
- package/dist/cjs/src/lib/authors.js.map +1 -1
- package/dist/cjs/src/postgres-data/buildData.js +11 -3
- package/dist/cjs/src/postgres-data/buildData.js.map +1 -1
- package/dist/cjs/src/store/Store.js.map +1 -1
- package/dist/es/src/components/InspectorSection.js +2 -19
- package/dist/es/src/components/InspectorSection.js.map +1 -1
- package/dist/es/src/components/metadata/AddAuthorsModalContainer.js +20 -3
- package/dist/es/src/components/metadata/AddAuthorsModalContainer.js.map +1 -1
- package/dist/es/src/components/metadata/AddAuthorsSidebar.js +2 -2
- package/dist/es/src/components/metadata/AddAuthorsSidebar.js.map +1 -1
- package/dist/es/src/components/metadata/AuthorFormContainer.js +23 -3
- package/dist/es/src/components/metadata/AuthorFormContainer.js.map +1 -1
- package/dist/es/src/components/metadata/AuthorsModalContainer.js +51 -26
- package/dist/es/src/components/metadata/AuthorsModalContainer.js.map +1 -1
- package/dist/es/src/components/metadata/AuthorsModals.js +15 -6
- package/dist/es/src/components/metadata/AuthorsModals.js.map +1 -1
- package/dist/es/src/components/metadata/AuthorsSidebar.js +12 -3
- package/dist/es/src/components/metadata/AuthorsSidebar.js.map +1 -1
- package/dist/es/src/components/metadata/Metadata.js +73 -0
- package/dist/es/src/components/metadata/Metadata.js.map +1 -0
- package/dist/es/src/components/metadata/MetadataContainer.js +178 -0
- package/dist/es/src/components/metadata/MetadataContainer.js.map +1 -0
- package/dist/es/src/components/metadata/SearchAuthorsSidebar.js +39 -10
- package/dist/es/src/components/metadata/SearchAuthorsSidebar.js.map +1 -1
- package/dist/es/src/components/projects/ManuscriptPageContainer.js +0 -2
- package/dist/es/src/components/projects/ManuscriptPageContainer.js.map +1 -1
- package/dist/es/src/components/track-changes/utils.js +0 -3
- package/dist/es/src/components/track-changes/utils.js.map +1 -1
- package/dist/es/src/hooks/use-create-editor.js +2 -2
- package/dist/es/src/hooks/use-create-editor.js.map +1 -1
- package/dist/es/src/hooks/use-tracked-model-management.js +10 -60
- package/dist/es/src/hooks/use-tracked-model-management.js.map +1 -1
- package/dist/es/src/lib/authors.js +6 -39
- package/dist/es/src/lib/authors.js.map +1 -1
- package/dist/es/src/postgres-data/buildData.js +12 -4
- package/dist/es/src/postgres-data/buildData.js.map +1 -1
- package/dist/es/src/store/Store.js.map +1 -1
- package/dist/types/src/components/InspectorSection.d.ts +0 -14
- package/dist/types/src/components/metadata/AddAuthorsModalContainer.d.ts +5 -0
- package/dist/types/src/components/metadata/AddAuthorsSidebar.d.ts +4 -0
- package/dist/types/src/components/metadata/AuthorFormContainer.d.ts +8 -1
- package/dist/types/src/components/metadata/AuthorsModalContainer.d.ts +17 -2
- package/dist/types/src/components/metadata/AuthorsModals.d.ts +23 -1
- package/dist/types/src/components/metadata/AuthorsSidebar.d.ts +3 -0
- package/dist/types/src/components/metadata/Metadata.d.ts +60 -0
- package/dist/types/src/components/metadata/{AuthorModalViews.d.ts → MetadataContainer.d.ts} +9 -2
- package/dist/types/src/components/metadata/SearchAuthorsSidebar.d.ts +4 -0
- package/dist/types/src/components/track-changes/utils.d.ts +0 -1
- package/dist/types/src/lib/authors.d.ts +3 -10
- package/dist/types/src/store/Store.d.ts +0 -2
- package/dist/types/src/store/useStore.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cjs/src/components/metadata/AuthorModalViews.js.map +0 -1
- package/dist/cjs/src/components/metadata/AuthorsInlineViewContainer.js.map +0 -1
- package/dist/es/src/components/metadata/AuthorModalViews.js +0 -131
- package/dist/es/src/components/metadata/AuthorModalViews.js.map +0 -1
- package/dist/es/src/components/metadata/AuthorsInlineViewContainer.js +0 -65
- package/dist/es/src/components/metadata/AuthorsInlineViewContainer.js.map +0 -1
- package/dist/types/src/components/metadata/AuthorsInlineViewContainer.d.ts +0 -23
|
@@ -37,11 +37,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.InspectorSection = exports.
|
|
40
|
+
exports.InspectorSection = exports.Field = exports.Subheading = void 0;
|
|
41
41
|
const ArrowDownBlue_1 = __importDefault(require("@manuscripts/assets/react/ArrowDownBlue"));
|
|
42
42
|
const style_guide_1 = require("@manuscripts/style-guide");
|
|
43
43
|
const react_1 = __importStar(require("react"));
|
|
44
44
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
45
|
+
const Metadata_1 = require("./metadata/Metadata");
|
|
45
46
|
const ApproveAllButton_1 = __importDefault(require("./track-changes/ApproveAllButton"));
|
|
46
47
|
const Section = styled_components_1.default.div `
|
|
47
48
|
border-bottom: 1px solid ${(props) => props.theme.colors.border.tertiary};
|
|
@@ -72,24 +73,6 @@ exports.Subheading = (0, styled_components_1.default)(HeadingText) `
|
|
|
72
73
|
exports.Field = styled_components_1.default.div `
|
|
73
74
|
margin-bottom: ${(props) => props.theme.grid.unit * 4}px;
|
|
74
75
|
`;
|
|
75
|
-
exports.ExpanderButton = (0, styled_components_1.default)(style_guide_1.IconButton).attrs(() => ({
|
|
76
|
-
size: 20,
|
|
77
|
-
defaultColor: true,
|
|
78
|
-
})) `
|
|
79
|
-
border: none;
|
|
80
|
-
border-radius: 50%;
|
|
81
|
-
|
|
82
|
-
&:focus,
|
|
83
|
-
&:hover {
|
|
84
|
-
&:not([disabled]) {
|
|
85
|
-
background: ${(props) => props.theme.colors.background.fifth};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
svg circle {
|
|
90
|
-
stroke: ${(props) => props.theme.colors.border.secondary};
|
|
91
|
-
}
|
|
92
|
-
`;
|
|
93
76
|
const Content = styled_components_1.default.div `
|
|
94
77
|
margin: ${(props) => props.theme.grid.unit * 2}px
|
|
95
78
|
${(props) => props.theme.grid.unit * 2}px
|
|
@@ -102,7 +85,7 @@ const InspectorSection = ({ title, children, approveAll, }) => {
|
|
|
102
85
|
react_1.default.createElement(Heading, { onClick: () => setExpanded(!expanded) },
|
|
103
86
|
react_1.default.createElement(HeadingText, null, title),
|
|
104
87
|
approveAll && can.handleSuggestion && (react_1.default.createElement(ApproveAllButton_1.default, { approveAll: approveAll })),
|
|
105
|
-
react_1.default.createElement(
|
|
88
|
+
react_1.default.createElement(Metadata_1.ExpanderButton, { "aria-label": 'Toggle expand section', onClick: () => setExpanded(!expanded), style: {
|
|
106
89
|
transform: expanded ? 'rotate(0deg)' : 'rotate(180deg)',
|
|
107
90
|
} },
|
|
108
91
|
react_1.default.createElement(ArrowDownBlue_1.default, null))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InspectorSection.js","sourceRoot":"","sources":["../../../../src/components/InspectorSection.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4FAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"InspectorSection.js","sourceRoot":"","sources":["../../../../src/components/InspectorSection.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4FAAmE;AACnE,0DAAyD;AACzD,+CAAuC;AACvC,0EAAsC;AAEtC,kDAAoD;AACpD,wFAA+D;AAE/D,MAAM,OAAO,GAAG,2BAAM,CAAC,GAAG,CAAA;6BACG,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ;eAC3D,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM;YAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;MAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,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C,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;MAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;MACpC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACzC,CAAA;AAOM,MAAM,gBAAgB,GAAoB,CAAC,EAChD,KAAK,EACL,QAAQ,EACR,UAAU,GACX,EAAE,EAAE;IACH,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAA;IAC9C,MAAM,GAAG,GAAG,IAAA,4BAAc,GAAE,CAAA;IAE5B,OAAO,CACL,8BAAC,OAAO;QACN,8BAAC,OAAO,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;YAC5C,8BAAC,WAAW,QAAE,KAAK,CAAe;YACjC,UAAU,IAAI,GAAG,CAAC,gBAAgB,IAAI,CACrC,8BAAC,0BAAgB,IAAC,UAAU,EAAE,UAAU,GAAI,CAC7C;YAED,8BAAC,yBAAc,kBACD,uBAAuB,EACnC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,EACrC,KAAK,EAAE;oBACL,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,gBAAgB;iBACxD;gBAED,8BAAC,uBAAa,OAAG,CACF,CACT;QACT,QAAQ,IAAI,8BAAC,OAAO,QAAE,QAAQ,CAAW,CAClC,CACX,CAAA;AACH,CAAC,CAAA;AA7BY,QAAA,gBAAgB,oBA6B5B"}
|
|
@@ -22,6 +22,7 @@ class AddAuthorsModalContainer extends react_1.default.Component {
|
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this.state = {
|
|
24
24
|
isCreateAuthorOpen: false,
|
|
25
|
+
searchingAuthors: false,
|
|
25
26
|
searchText: '',
|
|
26
27
|
searchResults: [],
|
|
27
28
|
};
|
|
@@ -35,6 +36,9 @@ class AddAuthorsModalContainer extends react_1.default.Component {
|
|
|
35
36
|
isCreateAuthorOpen: !this.state.isCreateAuthorOpen,
|
|
36
37
|
});
|
|
37
38
|
};
|
|
39
|
+
this.handleSearchFocus = () => this.setState({
|
|
40
|
+
searchingAuthors: !this.state.searchingAuthors,
|
|
41
|
+
});
|
|
38
42
|
this.handleSearchChange = (event) => {
|
|
39
43
|
this.setState({ searchText: event.currentTarget.value });
|
|
40
44
|
this.search(event.currentTarget.value);
|
|
@@ -60,11 +64,24 @@ class AddAuthorsModalContainer extends react_1.default.Component {
|
|
|
60
64
|
});
|
|
61
65
|
this.setState({ searchResults });
|
|
62
66
|
};
|
|
67
|
+
this.isAuthorExist = () => {
|
|
68
|
+
const name = this.state.searchText;
|
|
69
|
+
const [given, ...family] = name.split(' ');
|
|
70
|
+
const authors = this.props.authors;
|
|
71
|
+
for (const author of authors) {
|
|
72
|
+
if (author.bibliographicName.given.toLowerCase() === given.toLowerCase() &&
|
|
73
|
+
author.bibliographicName.family.toLowerCase() ===
|
|
74
|
+
family.join(' ').toLowerCase()) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
};
|
|
63
80
|
}
|
|
64
81
|
render() {
|
|
65
|
-
const { isCreateAuthorOpen, searchResults, searchText } = this.state;
|
|
66
|
-
const { numberOfAddedAuthors, createAuthor, addedAuthors, authors, handleAddingDoneCancel, nonAuthors, } = this.props;
|
|
67
|
-
return (react_1.default.createElement(AuthorsModals_1.AddAuthorsModal, { authors: authors, nonAuthors: nonAuthors, addedAuthors: addedAuthors, numberOfAddedAuthors: numberOfAddedAuthors, isCreateAuthorOpen: isCreateAuthorOpen, searchResults: searchResults, searchText: searchText, createAuthor: createAuthor, handleAddingDoneCancel: handleAddingDoneCancel, handleSearchChange: this.handleSearchChange, handleCreateAuthor: this.handleCreateAuthor }));
|
|
82
|
+
const { isCreateAuthorOpen, searchResults, searchText, searchingAuthors } = this.state;
|
|
83
|
+
const { numberOfAddedAuthors, createAuthor, addedAuthors, authors, handleAddingDoneCancel, nonAuthors, handleInvite, } = this.props;
|
|
84
|
+
return (react_1.default.createElement(AuthorsModals_1.AddAuthorsModal, { authors: authors, nonAuthors: nonAuthors, addedAuthors: addedAuthors, numberOfAddedAuthors: numberOfAddedAuthors, isCreateAuthorOpen: isCreateAuthorOpen, searchResults: searchResults, searchText: searchText, searchingAuthors: searchingAuthors, createAuthor: createAuthor, isAuthorExist: this.isAuthorExist, handleAddingDoneCancel: handleAddingDoneCancel, handleInvite: handleInvite, handleSearchFocus: this.handleSearchFocus, handleSearchChange: this.handleSearchChange, handleCreateAuthor: this.handleCreateAuthor }));
|
|
68
85
|
}
|
|
69
86
|
}
|
|
70
87
|
exports.AddAuthorsModalContainer = AddAuthorsModalContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddAuthorsModalContainer.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AddAuthorsModalContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAGH,kDAAyB;AAEzB,mDAAiD;
|
|
1
|
+
{"version":3,"file":"AddAuthorsModalContainer.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AddAuthorsModalContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAGH,kDAAyB;AAEzB,mDAAiD;AAwBjD,MAAa,wBAAyB,SAAQ,eAAK,CAAC,SAAuB;IAA3E;;QACS,UAAK,GAAG;YACb,kBAAkB,EAAE,KAAK;YACzB,gBAAgB,EAAE,KAAK;YACvB,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE;SAClB,CAAA;QAqCO,uBAAkB,GAAG,GAAG,EAAE;YAChC,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE;gBACjC,IAAI,C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oBAAoB,EAAE,oBAAoB,EAC1C,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,GAC3C,CACH,CAAA;IACH,CAAC;CAoEF;AA7GD,4DA6GC"}
|
|
@@ -49,7 +49,7 @@ const UserDataContainer = styled_components_1.default.div `
|
|
|
49
49
|
const SearchContainer = styled_components_1.default.div `
|
|
50
50
|
margin-bottom: ${(props) => props.theme.grid.unit * 2}px;
|
|
51
51
|
`;
|
|
52
|
-
const AddAuthorsSidebar = ({ nonAuthors, numberOfAddedAuthors, searchText, addedAuthors, handleDoneCancel, createAuthor, handleSearchChange, searchResults, authors, isCreateAuthorOpen, handleCreateAuthor, }) => {
|
|
52
|
+
const AddAuthorsSidebar = ({ nonAuthors, numberOfAddedAuthors, isSearching, searchText, addedAuthors, handleDoneCancel, createAuthor, handleSearchChange, handleSearchFocus, searchResults, handleInvite, authors, isAuthorExist, isCreateAuthorOpen, handleCreateAuthor, }) => {
|
|
53
53
|
return (react_1.default.createElement(Sidebar_1.ModalSidebar, { "data-cy": 'add-author-sidebar' },
|
|
54
54
|
react_1.default.createElement(Sidebar_1.SidebarHeader, { action: handleDoneCancel, isCancel: !numberOfAddedAuthors, title: 'Add Author' }),
|
|
55
55
|
react_1.default.createElement(SearchContainer, null,
|
|
@@ -61,7 +61,7 @@ const AddAuthorsSidebar = ({ nonAuthors, numberOfAddedAuthors, searchText, added
|
|
|
61
61
|
react_1.default.createElement(PersonName, null,
|
|
62
62
|
react_1.default.createElement(PersonInitial, null, person.bibliographicName.given),
|
|
63
63
|
person.bibliographicName.family))),
|
|
64
|
-
react_1.default.createElement(AddAuthorButton_1.default, { person: person, isSelected: addedAuthors.includes(person.userID), createAuthor: createAuthor, authors: authors })))))) : isCreateAuthorOpen ? (react_1.default.createElement(CreateAuthorPageContainer_1.default, { authors: authors, createAuthor: createAuthor, isOpen: isCreateAuthorOpen, handleCancel: handleCreateAuthor, searchText: searchText })) : (react_1.default.createElement(SearchAuthorsSidebar_1.default, { addedAuthors: addedAuthors, createAuthor: createAuthor, searchResults: searchResults, authors: authors }))));
|
|
64
|
+
react_1.default.createElement(AddAuthorButton_1.default, { person: person, isSelected: addedAuthors.includes(person.userID), createAuthor: createAuthor, authors: authors })))))) : isCreateAuthorOpen ? (react_1.default.createElement(CreateAuthorPageContainer_1.default, { authors: authors, createAuthor: createAuthor, isOpen: isCreateAuthorOpen, handleCancel: handleCreateAuthor, searchText: searchText })) : (react_1.default.createElement(SearchAuthorsSidebar_1.default, { handleInvite: handleInvite, searchText: searchText, addedAuthors: addedAuthors, createAuthor: createAuthor, searchResults: searchResults, authors: authors, isAuthorExist: isAuthorExist, handleCreateAuthor: handleCreateAuthor }))));
|
|
65
65
|
};
|
|
66
66
|
exports.default = AddAuthorsSidebar;
|
|
67
67
|
//# sourceMappingURL=AddAuthorsSidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddAuthorsSidebar.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AddAuthorsSidebar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAAiD;AAEjD,kDAAyB;AACzB,0EAAsC;AAEtC,wCAMmB;AACnB,wEAA+C;AAC/C,4FAAmE;AACnE,kFAAyD;AAEzD,MAAM,aAAa,GAAG,2BAAM,CAAC,IAAI,CAAA;kBACf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;iBACjC,CAAC,KAAK,EAAE,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AiB,CAAA"}
|
|
@@ -17,8 +17,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.AuthorFormContainer = void 0;
|
|
18
18
|
const style_guide_1 = require("@manuscripts/style-guide");
|
|
19
19
|
const react_1 = __importDefault(require("react"));
|
|
20
|
-
const
|
|
20
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
21
|
+
const InviteAuthorButton_1 = __importDefault(require("./InviteAuthorButton"));
|
|
22
|
+
const FormMessage = styled_components_1.default.div `
|
|
23
|
+
position: absolute;
|
|
24
|
+
bottom: ${(props) => props.theme.grid.unit * 5}px;
|
|
25
|
+
right: ${(props) => props.theme.grid.unit * 5}px;
|
|
26
|
+
width: 450px;
|
|
27
|
+
`;
|
|
28
|
+
const AuthorFormContainer = ({ author, affiliations, authorAffiliations, handleSave, addAuthorAffiliation, removeAuthorAffiliation, updateAffiliation, removeAuthor, isRemoveAuthorOpen, handleRemoveAuthor, isRejected, project, updateAuthor, getAuthorName, tokenActions, contributorRoles, createContributorRole, allowInvitingAuthors, }) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
21
29
|
react_1.default.createElement(style_guide_1.AuthorForm, { author: author, handleSave: handleSave, isRemoveAuthorOpen: isRemoveAuthorOpen, removeAuthor: removeAuthor, handleRemoveAuthor: handleRemoveAuthor, contributorRoles: contributorRoles, createContributorRole: createContributorRole }),
|
|
22
|
-
react_1.default.createElement(style_guide_1.AffiliationsEditor, { affiliations: affiliations, authorAffiliations: authorAffiliations, addAuthorAffiliation: addAuthorAffiliation, removeAuthorAffiliation: removeAuthorAffiliation, updateAffiliation: updateAffiliation })
|
|
30
|
+
react_1.default.createElement(style_guide_1.AffiliationsEditor, { affiliations: affiliations, authorAffiliations: authorAffiliations, addAuthorAffiliation: addAuthorAffiliation, removeAuthorAffiliation: removeAuthorAffiliation, updateAffiliation: updateAffiliation }),
|
|
31
|
+
!author.userID && !author.invitationID && allowInvitingAuthors && (react_1.default.createElement(FormMessage, null,
|
|
32
|
+
react_1.default.createElement(style_guide_1.AlertMessage, { type: style_guide_1.AlertMessageType.info, hideCloseButton: true },
|
|
33
|
+
getAuthorName(author) + ' ',
|
|
34
|
+
"does not have access to the project.",
|
|
35
|
+
react_1.default.createElement(InviteAuthorButton_1.default, { author: author, project: project, updateAuthor: updateAuthor, tokenActions: tokenActions })))),
|
|
36
|
+
author.invitationID &&
|
|
37
|
+
isRejected(author.invitationID) &&
|
|
38
|
+
allowInvitingAuthors && (react_1.default.createElement(FormMessage, null,
|
|
39
|
+
react_1.default.createElement(style_guide_1.AlertMessage, { type: style_guide_1.AlertMessageType.info, hideCloseButton: true },
|
|
40
|
+
getAuthorName(author) + ' ',
|
|
41
|
+
"does not have access to the project.",
|
|
42
|
+
react_1.default.createElement(InviteAuthorButton_1.default, { author: author, project: project, updateAuthor: updateAuthor, tokenActions: tokenActions }))))));
|
|
23
43
|
exports.AuthorFormContainer = AuthorFormContainer;
|
|
24
44
|
//# sourceMappingURL=AuthorFormContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorFormContainer.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AuthorFormContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;
|
|
1
|
+
{"version":3,"file":"AuthorFormContainer.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AuthorFormContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAQH,0DAOiC;AACjC,kDAAyB;AACzB,0EAAsC;AAItC,8EAAqD;AAErD,MAAM,WAAW,GAAG,2BAAM,CAAC,GAAG,CAAA;;YAElB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;WACrC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;CAE9C,CAAA;AAuBM,MAAM,mBAAmB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IAAI;YAC7D,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG;;YAE5B,8BAAC,4BAAkB,IACjB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,GAC1B,CACW,CACH,CACf,CACY,CAClB,CAAA;AApEY,QAAA,mBAAmB,uBAoE/B"}
|
|
@@ -17,25 +17,56 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
const json_schema_1 = require("@manuscripts/json-schema");
|
|
18
18
|
const transform_1 = require("@manuscripts/transform");
|
|
19
19
|
const react_1 = __importDefault(require("react"));
|
|
20
|
-
const
|
|
20
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
21
21
|
const AuthorsModals_1 = require("./AuthorsModals");
|
|
22
|
+
const Invited = styled_components_1.default.div `
|
|
23
|
+
display: flex;
|
|
24
|
+
font-size: ${(props) => props.theme.font.size.small};
|
|
25
|
+
color: ${(props) => props.theme.colors.brand.default};
|
|
26
|
+
`;
|
|
22
27
|
class AuthorsModalContainer extends react_1.default.Component {
|
|
23
28
|
constructor() {
|
|
24
29
|
super(...arguments);
|
|
25
30
|
this.state = {
|
|
26
31
|
isRemoveAuthorOpen: false,
|
|
32
|
+
invitationSent: false,
|
|
27
33
|
};
|
|
28
34
|
this.createContributorRole = async (name) => {
|
|
29
35
|
const contributorRole = (0, transform_1.buildContributorRole)(name);
|
|
30
|
-
return this.props.
|
|
36
|
+
return this.props.saveModel(contributorRole);
|
|
31
37
|
};
|
|
32
38
|
this.handleRemoveAuthor = () => this.setState({ isRemoveAuthorOpen: !this.state.isRemoveAuthorOpen });
|
|
39
|
+
this.handleDismiss = () => this.setState({ invitationSent: false });
|
|
33
40
|
this.removeAuthor = async (author) => {
|
|
34
41
|
await this.props.removeAuthor(author);
|
|
35
42
|
this.handleRemoveAuthor();
|
|
36
43
|
};
|
|
44
|
+
this.getAuthorName = (author) => {
|
|
45
|
+
return !author.bibliographicName.given
|
|
46
|
+
? 'Author '
|
|
47
|
+
: author.bibliographicName.given + ' ' + author.bibliographicName.family;
|
|
48
|
+
};
|
|
49
|
+
this.isRejected = (invitationID) => {
|
|
50
|
+
for (const invitation of this.props.invitations) {
|
|
51
|
+
if (invitation._id === invitationID) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
};
|
|
57
|
+
this.getSidebarItemDecorator = (authorID) => {
|
|
58
|
+
const { invitations } = this.props;
|
|
59
|
+
if (!invitations) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const author = this.props.authors.find((author) => author._id === authorID);
|
|
63
|
+
if (!author) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return invitations.find((invitation) => author.invitationID === invitation._id && !invitation.acceptedAt) ? (react_1.default.createElement(Invited, null, "Invited")) : null;
|
|
67
|
+
};
|
|
37
68
|
this.handleSaveAuthor = async (values) => {
|
|
38
|
-
await this.props.
|
|
69
|
+
await this.props.saveModel({
|
|
39
70
|
objectType: json_schema_1.ObjectTypes.Contributor,
|
|
40
71
|
...values,
|
|
41
72
|
});
|
|
@@ -46,19 +77,17 @@ class AuthorsModalContainer extends react_1.default.Component {
|
|
|
46
77
|
return;
|
|
47
78
|
}
|
|
48
79
|
let affiliationObj;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (!affiliationObj) {
|
|
55
|
-
affiliationObj = await this.props.saveTrackModel((0, transform_1.buildAffiliation)(affiliation));
|
|
80
|
+
if (typeof affiliation === 'string') {
|
|
81
|
+
affiliationObj = await this.props.saveModel((0, transform_1.buildAffiliation)(affiliation));
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
affiliationObj = affiliation;
|
|
56
85
|
}
|
|
57
86
|
const author = {
|
|
58
87
|
...selectedAuthor,
|
|
59
88
|
affiliations: (selectedAuthor.affiliations || []).concat(affiliationObj._id),
|
|
60
89
|
};
|
|
61
|
-
await this.props.
|
|
90
|
+
await this.props.saveModel(author);
|
|
62
91
|
};
|
|
63
92
|
this.removeAuthorAffiliation = async (affiliation) => {
|
|
64
93
|
const selectedAuthor = this.getSelectedAuthor();
|
|
@@ -69,36 +98,32 @@ class AuthorsModalContainer extends react_1.default.Component {
|
|
|
69
98
|
...selectedAuthor,
|
|
70
99
|
affiliations: (selectedAuthor.affiliations || []).filter((aff) => aff !== affiliation._id),
|
|
71
100
|
};
|
|
72
|
-
await this.props.
|
|
101
|
+
await this.props.saveModel(nextAuthor);
|
|
73
102
|
};
|
|
74
103
|
this.updateAffiliation = async (affiliation) => {
|
|
75
|
-
await this.props.
|
|
104
|
+
await this.props.saveModel(affiliation);
|
|
76
105
|
};
|
|
77
106
|
this.getSelectedAuthor = () => {
|
|
78
|
-
|
|
79
|
-
(0, utils_1.stripTracked)(this.props.selectedAuthor || '')) || null;
|
|
80
|
-
// console.log('xxxxxxxxxxxxxxxxxxxxxxxxxxx')
|
|
81
|
-
// console.log(this.props.selectedAuthor)
|
|
82
|
-
// console.log(this.props.authors)
|
|
83
|
-
// console.log('xxxxxxxxxxxxxxxxxxxxxxxxxxx')
|
|
84
|
-
return sel;
|
|
107
|
+
return (this.props.authors.find((author) => author._id === this.props.selectedAuthor) || null);
|
|
85
108
|
};
|
|
86
109
|
this.handleDrop = (oldIndex, newIndex) => {
|
|
87
110
|
this.props.handleDrop(this.props.authors, oldIndex, newIndex);
|
|
88
111
|
};
|
|
89
112
|
this.createEmptyAuthor = async () => {
|
|
90
113
|
const authorInfo = (0, transform_1.buildContributor)((0, transform_1.buildBibliographicName)({ given: '', family: '' }), 'author', this.props.authors.length + 1);
|
|
91
|
-
const author = await this.props.
|
|
114
|
+
const author = await this.props.saveModel(authorInfo);
|
|
92
115
|
this.props.selectAuthor(author);
|
|
93
116
|
};
|
|
94
117
|
}
|
|
118
|
+
componentDidMount() {
|
|
119
|
+
this.setState({
|
|
120
|
+
invitationSent: this.props.invitationSent,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
95
123
|
render() {
|
|
96
124
|
const { isRemoveAuthorOpen } = this.state;
|
|
97
|
-
const { authors, authorAffiliations, affiliations, selectAuthor, contributorRoles, } = this.props;
|
|
98
|
-
|
|
99
|
-
console.log('No selected author');
|
|
100
|
-
}
|
|
101
|
-
return (react_1.default.createElement(AuthorsModals_1.AuthorsModal, { authors: authors, authorAffiliations: authorAffiliations, affiliations: affiliations, selectedAuthor: this.getSelectedAuthor(), isRemoveAuthorOpen: isRemoveAuthorOpen, addAuthorAffiliation: this.addAuthorAffiliation, removeAuthorAffiliation: this.removeAuthorAffiliation, updateAffiliation: this.updateAffiliation, handleDrop: this.handleDrop, handleSaveAuthor: this.handleSaveAuthor, openAddAuthors: this.createEmptyAuthor, selectAuthor: selectAuthor, removeAuthor: this.removeAuthor, handleRemoveAuthor: this.handleRemoveAuthor, contributorRoles: contributorRoles, createContributorRole: this.createContributorRole }));
|
|
125
|
+
const { authors, authorAffiliations, affiliations, selectAuthor, project, tokenActions, updateAuthor, contributorRoles, allowInvitingAuthors, } = this.props;
|
|
126
|
+
return (react_1.default.createElement(AuthorsModals_1.AuthorsModal, { project: project, authors: authors, authorAffiliations: authorAffiliations, affiliations: affiliations, selectedAuthor: this.getSelectedAuthor(), isRemoveAuthorOpen: isRemoveAuthorOpen, updateAuthor: updateAuthor, addAuthorAffiliation: this.addAuthorAffiliation, removeAuthorAffiliation: this.removeAuthorAffiliation, updateAffiliation: this.updateAffiliation, getSidebarItemDecorator: this.getSidebarItemDecorator, handleDrop: this.handleDrop, handleSaveAuthor: this.handleSaveAuthor, openAddAuthors: this.createEmptyAuthor, selectAuthor: selectAuthor, isRejected: this.isRejected, removeAuthor: this.removeAuthor, getAuthorName: this.getAuthorName, handleRemoveAuthor: this.handleRemoveAuthor, tokenActions: tokenActions, invitationSent: this.state.invitationSent, handleDismiss: this.handleDismiss, contributorRoles: contributorRoles, createContributorRole: this.createContributorRole, allowInvitingAuthors: !!allowInvitingAuthors }));
|
|
102
127
|
}
|
|
103
128
|
}
|
|
104
129
|
exports.default = AuthorsModalContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorsModalContainer.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AuthorsModalContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"AuthorsModalContainer.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AuthorsModalContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAEH,0DAUiC;AAEjC,sDAM+B;AAC/B,kDAAyB;AACzB,0EAAsC;AAItC,mDAA8C;AAE9C,MAAM,OAAO,GAAG,2BAAM,CAAC,GAAG,CAAA;;eAEX,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;WAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO;CACrD,CAAA;AAoCD,MAAM,qBAAsB,SAAQ,eAAK,CAAC,SAAuB;IAAjE;;QACS,UAAK,GAAG;YACb,kBAAkB,EAAE,KAAK;YACzB,cAAc,EAAE,KAAK;SACtB,CAAA;QAoDO,0BAAqB,GAAG,KAAK,EACnC,IAAY,EACc,EAAE;YAC5B,MAAM,eAAe,GAAG,IAAA,gCAAoB,EAAC,IAAI,CAAC,CAAA;YAElD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,CAAA;QAC9C,CAAC,CAAA;QAEO,uBAAkB,GAAG,GAAG,EAAE,CAChC,IAAI,CAAC,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAA;QAE/D,kBAAa,GAAG,GAAG,EAAE,CAAC,IAAI,CAA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.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AddAuthorsModal = exports.AuthorsModal = exports.ScrollableModalMain = void 0;
|
|
17
|
+
exports.InviteAuthorsModal = exports.AddAuthorsModal = exports.AuthorsModal = exports.ScrollableModalMain = void 0;
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
19
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
20
|
+
const store_1 = require("../../store");
|
|
20
21
|
const Sidebar_1 = require("../Sidebar");
|
|
21
22
|
const AddAuthorsSidebar_1 = __importDefault(require("./AddAuthorsSidebar"));
|
|
22
23
|
const AuthorFormContainer_1 = require("./AuthorFormContainer");
|
|
23
24
|
const AuthorsPage_1 = require("./AuthorsPage");
|
|
24
25
|
const AuthorsSidebar_1 = __importDefault(require("./AuthorsSidebar"));
|
|
26
|
+
const InviteAuthorsSidebar_1 = __importDefault(require("./InviteAuthorsSidebar"));
|
|
25
27
|
exports.ScrollableModalMain = (0, styled_components_1.default)(Sidebar_1.StyledModalMain) `
|
|
26
28
|
overflow-y: auto;
|
|
27
29
|
`;
|
|
28
|
-
const AuthorsModal = ({ authors, authorAffiliations, affiliations, removeAuthor, selectAuthor, selectedAuthor, openAddAuthors, handleSaveAuthor, addAuthorAffiliation, removeAuthorAffiliation, updateAffiliation, handleDrop, isRemoveAuthorOpen, handleRemoveAuthor, contributorRoles, createContributorRole, }) => (react_1.default.createElement(Sidebar_1.ModalBody, null,
|
|
29
|
-
react_1.default.createElement(AuthorsSidebar_1.default, { authors: authors, authorAffiliations: authorAffiliations, selectAuthor: selectAuthor, selectedAuthor: selectedAuthor, openAddAuthors: openAddAuthors, handleDrop: handleDrop }),
|
|
30
|
-
react_1.default.createElement(exports.ScrollableModalMain, null, selectedAuthor ? (react_1.default.createElement(AuthorFormContainer_1.AuthorFormContainer, { author: selectedAuthor, affiliations: affiliations, authorAffiliations: authorAffiliations.get(selectedAuthor._id), handleSave: handleSaveAuthor, addAuthorAffiliation: addAuthorAffiliation, removeAuthorAffiliation: removeAuthorAffiliation, updateAffiliation: updateAffiliation, isRemoveAuthorOpen: isRemoveAuthorOpen, handleRemoveAuthor: handleRemoveAuthor, removeAuthor: removeAuthor, contributorRoles: contributorRoles, createContributorRole: createContributorRole })) : (react_1.default.createElement(AuthorsPage_1.AuthorDetailsPage, null)))));
|
|
30
|
+
const AuthorsModal = ({ authors, authorAffiliations, affiliations, removeAuthor, selectAuthor, selectedAuthor, openAddAuthors, handleSaveAuthor, addAuthorAffiliation, removeAuthorAffiliation, updateAffiliation, handleDrop, getSidebarItemDecorator, isRemoveAuthorOpen, handleRemoveAuthor, isRejected, project, updateAuthor, getAuthorName, tokenActions, invitationSent, handleDismiss, contributorRoles, createContributorRole, allowInvitingAuthors, }) => (react_1.default.createElement(Sidebar_1.ModalBody, null,
|
|
31
|
+
react_1.default.createElement(AuthorsSidebar_1.default, { authors: authors, authorAffiliations: authorAffiliations, selectAuthor: selectAuthor, selectedAuthor: selectedAuthor, openAddAuthors: openAddAuthors, handleDrop: handleDrop, getSidebarItemDecorator: getSidebarItemDecorator, invitationSent: invitationSent, handleDismiss: handleDismiss }),
|
|
32
|
+
react_1.default.createElement(exports.ScrollableModalMain, null, selectedAuthor ? (react_1.default.createElement(AuthorFormContainer_1.AuthorFormContainer, { author: selectedAuthor, affiliations: affiliations, authorAffiliations: authorAffiliations.get(selectedAuthor._id), handleSave: handleSaveAuthor, addAuthorAffiliation: addAuthorAffiliation, removeAuthorAffiliation: removeAuthorAffiliation, updateAffiliation: updateAffiliation, isRemoveAuthorOpen: isRemoveAuthorOpen, handleRemoveAuthor: handleRemoveAuthor, removeAuthor: removeAuthor, isRejected: isRejected, project: project, updateAuthor: updateAuthor, getAuthorName: getAuthorName, tokenActions: tokenActions, contributorRoles: contributorRoles, createContributorRole: createContributorRole, allowInvitingAuthors: allowInvitingAuthors })) : (react_1.default.createElement(AuthorsPage_1.AuthorDetailsPage, null)))));
|
|
31
33
|
exports.AuthorsModal = AuthorsModal;
|
|
32
|
-
const AddAuthorsModal = ({ nonAuthors, authors, addedAuthors, numberOfAddedAuthors, searchResults, searchText, createAuthor, handleAddingDoneCancel, handleSearchChange, isCreateAuthorOpen, handleCreateAuthor, }) => (react_1.default.createElement(Sidebar_1.ModalBody, null,
|
|
33
|
-
react_1.default.createElement(AddAuthorsSidebar_1.default, { authors: authors, nonAuthors: nonAuthors, numberOfAddedAuthors: numberOfAddedAuthors, searchText: searchText, addedAuthors: addedAuthors, handleDoneCancel: handleAddingDoneCancel, createAuthor: createAuthor, handleSearchChange: handleSearchChange, searchResults: searchResults, isCreateAuthorOpen: isCreateAuthorOpen, handleCreateAuthor: handleCreateAuthor }),
|
|
34
|
+
const AddAuthorsModal = ({ nonAuthors, authors, addedAuthors, numberOfAddedAuthors, searchingAuthors, searchResults, searchText, createAuthor, handleAddingDoneCancel, handleSearchChange, handleSearchFocus, handleInvite, isAuthorExist, isCreateAuthorOpen, handleCreateAuthor, }) => (react_1.default.createElement(Sidebar_1.ModalBody, null,
|
|
35
|
+
react_1.default.createElement(AddAuthorsSidebar_1.default, { authors: authors, nonAuthors: nonAuthors, numberOfAddedAuthors: numberOfAddedAuthors, isSearching: searchingAuthors, searchText: searchText, addedAuthors: addedAuthors, handleDoneCancel: handleAddingDoneCancel, createAuthor: createAuthor, handleSearchChange: handleSearchChange, handleSearchFocus: handleSearchFocus, searchResults: searchResults, handleInvite: handleInvite, isAuthorExist: isAuthorExist, isCreateAuthorOpen: isCreateAuthorOpen, handleCreateAuthor: handleCreateAuthor }),
|
|
34
36
|
react_1.default.createElement(Sidebar_1.StyledModalMain, null,
|
|
35
37
|
react_1.default.createElement(AuthorsPage_1.AddAuthorsPage, { addedAuthorsCount: numberOfAddedAuthors }))));
|
|
36
38
|
exports.AddAuthorsModal = AddAuthorsModal;
|
|
39
|
+
const InviteAuthorsModal = ({ invitationValues, handleInviteCancel, handleInvitationSubmit, invitationSent, }) => {
|
|
40
|
+
const [tokenActions] = (0, store_1.useStore)((store) => store.tokenActions);
|
|
41
|
+
return (react_1.default.createElement(Sidebar_1.ModalBody, null,
|
|
42
|
+
react_1.default.createElement(InviteAuthorsSidebar_1.default, { invitationValues: invitationValues, handleCancel: handleInviteCancel, handleSubmit: handleInvitationSubmit, invitationSent: invitationSent, tokenActions: tokenActions }),
|
|
43
|
+
react_1.default.createElement(Sidebar_1.StyledModalMain, null,
|
|
44
|
+
react_1.default.createElement(AuthorsPage_1.InviteCollaboratorsModal, null))));
|
|
45
|
+
};
|
|
46
|
+
exports.InviteAuthorsModal = InviteAuthorsModal;
|
|
37
47
|
//# sourceMappingURL=AuthorsModals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorsModals.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AuthorsModals.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;
|
|
1
|
+
{"version":3,"file":"AuthorsModals.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AuthorsModals.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAUH,kDAAyB;AACzB,0EAAsC;AAGtC,uCAAoD;AACpD,wCAAuD;AACvD,4EAAmD;AACnD,+DAA2D;AAE3D,+CAIsB;AACtB,sEAA6C;AAC7C,kFAAyD;AAE5C,QAAA,mBAAmB,GAAG,IAAA,2BAAM,EAAC,yBAAe,CAAC,CAAA;;CAEzD,CAAA;AA8BM,MAAM,YAAY,GAA0C,CAAC,EAClE,OAAO,EACP,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,YAAY,EACZ,a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,20 @@ const SidebarAction = styled_components_1.default.div `
|
|
|
24
24
|
align-items: center;
|
|
25
25
|
margin-bottom: ${(props) => props.theme.grid.unit * 4}px;
|
|
26
26
|
`;
|
|
27
|
-
const
|
|
27
|
+
const AlertMessageContainer = styled_components_1.default.div `
|
|
28
|
+
margin-bottom: ${(props) => props.theme.grid.unit * 2}px;
|
|
29
|
+
`;
|
|
30
|
+
const AuthorsSidebar = ({ openAddAuthors, invitationSent, handleDismiss, }) => (react_1.default.createElement(Sidebar_1.ModalSidebar, { "data-cy": 'authors-sidebar' },
|
|
28
31
|
react_1.default.createElement(Sidebar_1.SidebarHeader, { title: 'Authors' }),
|
|
29
32
|
react_1.default.createElement(Sidebar_1.SidebarContent, null,
|
|
30
33
|
react_1.default.createElement(SidebarAction, null,
|
|
31
34
|
react_1.default.createElement(AddButton_1.AddButton, { action: openAddAuthors, size: 'medium', title: 'New Author' })),
|
|
32
|
-
react_1.default.createElement(
|
|
35
|
+
invitationSent && (react_1.default.createElement(AlertMessageContainer, null,
|
|
36
|
+
react_1.default.createElement(style_guide_1.AlertMessage, { type: style_guide_1.AlertMessageType.success, hideCloseButton: true, dismissButton: {
|
|
37
|
+
text: 'OK',
|
|
38
|
+
action: () => {
|
|
39
|
+
handleDismiss();
|
|
40
|
+
},
|
|
41
|
+
} }, "Invitation was sent."))))));
|
|
33
42
|
exports.default = AuthorsSidebar;
|
|
34
43
|
//# sourceMappingURL=AuthorsSidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorsSidebar.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AuthorsSidebar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,
|
|
1
|
+
{"version":3,"file":"AuthorsSidebar.js","sourceRoot":"","sources":["../../../../../src/components/metadata/AuthorsSidebar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAIiC;AACjC,kDAAyB;AACzB,0EAAsC;AAEtC,4CAAwC;AACxC,wCAAwE;AAExE,MAAM,aAAa,GAAG,2BAAM,CAAC,GAAG,CAAA;;;mBAGb,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACtD,CAAA;AAED,MAAM,qBAAqB,GAAG,2BAAM,CAAC,GAAG,CAAA;mBACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACtD,CAAA;AAcD,MAAM,cAAc,GAAmC,CAAC,EACtD,cAAc,EACd,cAAc,EACd,aAAa,GACd,EAAE,EAAE,CAAC,CACJ,8BAAC,sBAAY,eAAU,iBAAiB;IACtC,8BAAC,uBAAa,IAAC,KAAK,EAAE,SAAS,GAAI;IAEnC,8BAAC,wBAAc;QACb,8BAAC,aAAa;YACZ,8BAAC,qBAAS,IACR,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,YAAY,GACnB,CACY;QACf,cAAc,IAAI,CACjB,8BAAC,qBAAqB;YACpB,8BAAC,0BAAY,IACX,IAAI,EAAE,8BAAgB,CAAC,OAAO,EAC9B,eAAe,EAAE,IAAI,EACrB,aAAa,EAAE;oBACb,IAAI,EAAE,IAAI;oBACV,MAAM,EAAE,GAAG,EAAE;wBACX,aAAa,EAAE,CAAA;oBACjB,CAAC;iBACF,2BAGY,CACO,CACzB,CACc,CACJ,CAChB,CAAA;AAED,kBAAe,cAAc,CAAA"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
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
|
+
*/
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -26,21 +37,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
38
|
};
|
|
28
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ExpanderButton = 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
|
-
*/
|
|
40
|
+
exports.Metadata = exports.ExpanderButton = void 0;
|
|
41
41
|
const style_guide_1 = require("@manuscripts/style-guide");
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
44
|
+
const AddAuthorsModalContainer_1 = require("./AddAuthorsModalContainer");
|
|
45
|
+
const AuthorsModalContainer_1 = __importDefault(require("./AuthorsModalContainer"));
|
|
46
|
+
const AuthorsModals_1 = require("./AuthorsModals");
|
|
44
47
|
exports.ExpanderButton = (0, styled_components_1.default)(style_guide_1.IconButton).attrs(() => ({
|
|
45
48
|
size: 20,
|
|
46
49
|
defaultColor: true,
|
|
@@ -76,19 +79,25 @@ const Header = styled_components_1.default.div `
|
|
|
76
79
|
display: initial;
|
|
77
80
|
}
|
|
78
81
|
`;
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
(0, react_1.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
const Metadata = (props) => {
|
|
83
|
+
const { manuscript, authorsAndAffiliations, contributorRoles, tokenActions, project, saveModel, } = props.store;
|
|
84
|
+
const handleInvitationSubmit = (0, react_1.useCallback)((values) => {
|
|
85
|
+
if (!authorsAndAffiliations) {
|
|
86
|
+
return Promise.reject();
|
|
87
|
+
}
|
|
88
|
+
return props.handleInvitationSubmit(authorsAndAffiliations.authors, values);
|
|
89
|
+
}, [authorsAndAffiliations, props]);
|
|
90
|
+
if (!authorsAndAffiliations || !contributorRoles) {
|
|
87
91
|
return null;
|
|
88
92
|
}
|
|
89
93
|
return (react_1.default.createElement(HeaderContainer, null,
|
|
90
94
|
react_1.default.createElement(Header, null,
|
|
91
|
-
react_1.default.createElement(style_guide_1.AuthorsContainer, { authorData:
|
|
95
|
+
props.expanded && (react_1.default.createElement(style_guide_1.AuthorsContainer, { authorData: authorsAndAffiliations, startEditing: props.startEditing, showEditButton: props.showAuthorEditButton, disableEditButton: props.disableEditButton, selectAuthor: props.selectAuthor })),
|
|
96
|
+
react_1.default.createElement(style_guide_1.StyledModal, { isOpen: props.editing, onRequestClose: props.stopEditing, shouldCloseOnOverlayClick: true },
|
|
97
|
+
react_1.default.createElement(style_guide_1.ModalContainer, null,
|
|
98
|
+
react_1.default.createElement(style_guide_1.ModalHeader, null,
|
|
99
|
+
react_1.default.createElement(style_guide_1.CloseButton, { onClick: props.stopEditing, "data-cy": 'modal-close-button' })),
|
|
100
|
+
props.isInvite ? (react_1.default.createElement(AuthorsModals_1.InviteAuthorsModal, { ...props, handleInvitationSubmit: handleInvitationSubmit })) : props.addingAuthors ? (react_1.default.createElement(AddAuthorsModalContainer_1.AddAuthorsModalContainer, { ...props, authors: authorsAndAffiliations.authors })) : (react_1.default.createElement(AuthorsModalContainer_1.default, { ...props, saveModel: saveModel, authors: authorsAndAffiliations.authors, authorAffiliations: authorsAndAffiliations.authorAffiliations, affiliations: authorsAndAffiliations.affiliations, project: project, manuscript: manuscript, tokenActions: tokenActions, contributorRoles: contributorRoles, allowInvitingAuthors: props.allowInvitingAuthors })))))));
|
|
92
101
|
};
|
|
93
|
-
exports.
|
|
94
|
-
//# sourceMappingURL=
|
|
102
|
+
exports.Metadata = Metadata;
|
|
103
|
+
//# sourceMappingURL=Metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Metadata.js","sourceRoot":"","sources":["../../../../../src/components/metadata/Metadata.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOH,0DAOiC;AACjC,+CAA0C;AAC1C,0EAAsC;AAGtC,yEAAqE;AAErE,oFAA2D;AAC3D,mDAAoD;AAEvC,QAAA,cAAc,GAAG,IAAA,2BAAM,EAAC,wBAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5D,IAAI,EAAE,EAA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