@manuscripts/article-editor 1.10.10 → 1.10.11-LEAN-3301

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/{types/components/metadata/SearchAuthorsSidebar.d.ts → cjs/components/UtilitiesEffects.js} +9 -10
  2. package/dist/cjs/components/UtilitiesEffects.js.map +1 -0
  3. package/dist/cjs/components/projects/ManuscriptPageContainer.js +4 -7
  4. package/dist/cjs/components/projects/ManuscriptPageContainer.js.map +1 -1
  5. package/dist/cjs/hooks/use-create-editor.js +11 -6
  6. package/dist/cjs/hooks/use-create-editor.js.map +1 -1
  7. package/dist/cjs/hooks/use-handle-snapshot.js +4 -1
  8. package/dist/cjs/hooks/use-handle-snapshot.js.map +1 -1
  9. package/dist/cjs/hooks/use-window-unload-effect.js +6 -2
  10. package/dist/cjs/hooks/use-window-unload-effect.js.map +1 -1
  11. package/dist/cjs/lib/deeper-equal.js +7 -3
  12. package/dist/cjs/lib/deeper-equal.js.map +1 -1
  13. package/dist/cjs/postgres-data/buildData.js +0 -4
  14. package/dist/cjs/postgres-data/buildData.js.map +1 -1
  15. package/dist/cjs/postgres-data/savingUtilities.js +29 -3
  16. package/dist/cjs/postgres-data/savingUtilities.js.map +1 -1
  17. package/dist/cjs/quarterback/QuarterbackStepsExchanger.js +14 -5
  18. package/dist/cjs/quarterback/QuarterbackStepsExchanger.js.map +1 -1
  19. package/dist/cjs/store/Store.js +1 -6
  20. package/dist/cjs/store/Store.js.map +1 -1
  21. package/dist/cjs/store/useStore.js +13 -12
  22. package/dist/cjs/store/useStore.js.map +1 -1
  23. package/dist/{types/components/metadata/AuthorsPage.d.ts → es/components/UtilitiesEffects.js} +7 -7
  24. package/dist/es/components/UtilitiesEffects.js.map +1 -0
  25. package/dist/es/components/projects/ManuscriptPageContainer.js +4 -7
  26. package/dist/es/components/projects/ManuscriptPageContainer.js.map +1 -1
  27. package/dist/es/hooks/use-create-editor.js +11 -6
  28. package/dist/es/hooks/use-create-editor.js.map +1 -1
  29. package/dist/es/hooks/use-handle-snapshot.js +4 -1
  30. package/dist/es/hooks/use-handle-snapshot.js.map +1 -1
  31. package/dist/es/hooks/use-window-unload-effect.js +6 -2
  32. package/dist/es/hooks/use-window-unload-effect.js.map +1 -1
  33. package/dist/es/lib/deeper-equal.js +7 -3
  34. package/dist/es/lib/deeper-equal.js.map +1 -1
  35. package/dist/es/postgres-data/buildData.js +0 -4
  36. package/dist/es/postgres-data/buildData.js.map +1 -1
  37. package/dist/es/postgres-data/savingUtilities.js +27 -2
  38. package/dist/es/postgres-data/savingUtilities.js.map +1 -1
  39. package/dist/es/quarterback/QuarterbackStepsExchanger.js +15 -6
  40. package/dist/es/quarterback/QuarterbackStepsExchanger.js.map +1 -1
  41. package/dist/es/store/Store.js +1 -6
  42. package/dist/es/store/Store.js.map +1 -1
  43. package/dist/es/store/useStore.js +13 -12
  44. package/dist/es/store/useStore.js.map +1 -1
  45. package/dist/types/components/{metadata/AuthorModalViews.d.ts → UtilitiesEffects.d.ts} +2 -3
  46. package/dist/types/hooks/use-window-unload-effect.d.ts +1 -1
  47. package/dist/types/postgres-data/savingUtilities.d.ts +2 -1
  48. package/dist/types/quarterback/QuarterbackStepsExchanger.d.ts +11 -2
  49. package/dist/types/store/Store.d.ts +2 -3
  50. package/dist/types/store/useStore.d.ts +3 -1
  51. package/package.json +3 -4
  52. package/dist/cjs/components/metadata/AddAuthorButton.js +0 -55
  53. package/dist/cjs/components/metadata/AddAuthorButton.js.map +0 -1
  54. package/dist/cjs/components/metadata/AddAuthorsModalContainer.js +0 -71
  55. package/dist/cjs/components/metadata/AddAuthorsModalContainer.js.map +0 -1
  56. package/dist/cjs/components/metadata/AddAuthorsSidebar.js +0 -67
  57. package/dist/cjs/components/metadata/AddAuthorsSidebar.js.map +0 -1
  58. package/dist/cjs/components/metadata/AuthorFormContainer.js +0 -24
  59. package/dist/cjs/components/metadata/AuthorFormContainer.js.map +0 -1
  60. package/dist/cjs/components/metadata/AuthorInvitationForm.js +0 -115
  61. package/dist/cjs/components/metadata/AuthorInvitationForm.js.map +0 -1
  62. package/dist/cjs/components/metadata/AuthorModalViews.js +0 -161
  63. package/dist/cjs/components/metadata/AuthorModalViews.js.map +0 -1
  64. package/dist/cjs/components/metadata/AuthorsModalContainer.js +0 -99
  65. package/dist/cjs/components/metadata/AuthorsModalContainer.js.map +0 -1
  66. package/dist/cjs/components/metadata/AuthorsModals.js +0 -37
  67. package/dist/cjs/components/metadata/AuthorsModals.js.map +0 -1
  68. package/dist/cjs/components/metadata/AuthorsPage.js +0 -100
  69. package/dist/cjs/components/metadata/AuthorsPage.js.map +0 -1
  70. package/dist/cjs/components/metadata/AuthorsSidebar.js +0 -34
  71. package/dist/cjs/components/metadata/AuthorsSidebar.js.map +0 -1
  72. package/dist/cjs/components/metadata/CreateAuthorPageContainer.js +0 -43
  73. package/dist/cjs/components/metadata/CreateAuthorPageContainer.js.map +0 -1
  74. package/dist/cjs/components/metadata/InviteAuthorButton.js +0 -62
  75. package/dist/cjs/components/metadata/InviteAuthorButton.js.map +0 -1
  76. package/dist/cjs/components/metadata/InviteAuthorPopperContainer.js +0 -62
  77. package/dist/cjs/components/metadata/InviteAuthorPopperContainer.js.map +0 -1
  78. package/dist/cjs/components/metadata/InviteAuthorsSidebar.js +0 -27
  79. package/dist/cjs/components/metadata/InviteAuthorsSidebar.js.map +0 -1
  80. package/dist/cjs/components/metadata/SearchAuthorsSidebar.js +0 -48
  81. package/dist/cjs/components/metadata/SearchAuthorsSidebar.js.map +0 -1
  82. package/dist/cjs/lib/authors.js +0 -124
  83. package/dist/cjs/lib/authors.js.map +0 -1
  84. package/dist/es/components/metadata/AddAuthorButton.js +0 -50
  85. package/dist/es/components/metadata/AddAuthorButton.js.map +0 -1
  86. package/dist/es/components/metadata/AddAuthorsModalContainer.js +0 -64
  87. package/dist/es/components/metadata/AddAuthorsModalContainer.js.map +0 -1
  88. package/dist/es/components/metadata/AddAuthorsSidebar.js +0 -62
  89. package/dist/es/components/metadata/AddAuthorsSidebar.js.map +0 -1
  90. package/dist/es/components/metadata/AuthorFormContainer.js +0 -17
  91. package/dist/es/components/metadata/AuthorFormContainer.js.map +0 -1
  92. package/dist/es/components/metadata/AuthorInvitationForm.js +0 -108
  93. package/dist/es/components/metadata/AuthorInvitationForm.js.map +0 -1
  94. package/dist/es/components/metadata/AuthorModalViews.js +0 -133
  95. package/dist/es/components/metadata/AuthorModalViews.js.map +0 -1
  96. package/dist/es/components/metadata/AuthorsModalContainer.js +0 -94
  97. package/dist/es/components/metadata/AuthorsModalContainer.js.map +0 -1
  98. package/dist/es/components/metadata/AuthorsModals.js +0 -29
  99. package/dist/es/components/metadata/AuthorsModals.js.map +0 -1
  100. package/dist/es/components/metadata/AuthorsPage.js +0 -92
  101. package/dist/es/components/metadata/AuthorsPage.js.map +0 -1
  102. package/dist/es/components/metadata/AuthorsSidebar.js +0 -29
  103. package/dist/es/components/metadata/AuthorsSidebar.js.map +0 -1
  104. package/dist/es/components/metadata/CreateAuthorPageContainer.js +0 -38
  105. package/dist/es/components/metadata/CreateAuthorPageContainer.js.map +0 -1
  106. package/dist/es/components/metadata/InviteAuthorButton.js +0 -57
  107. package/dist/es/components/metadata/InviteAuthorButton.js.map +0 -1
  108. package/dist/es/components/metadata/InviteAuthorPopperContainer.js +0 -57
  109. package/dist/es/components/metadata/InviteAuthorPopperContainer.js.map +0 -1
  110. package/dist/es/components/metadata/InviteAuthorsSidebar.js +0 -22
  111. package/dist/es/components/metadata/InviteAuthorsSidebar.js.map +0 -1
  112. package/dist/es/components/metadata/SearchAuthorsSidebar.js +0 -43
  113. package/dist/es/components/metadata/SearchAuthorsSidebar.js.map +0 -1
  114. package/dist/es/lib/authors.js +0 -112
  115. package/dist/es/lib/authors.js.map +0 -1
  116. package/dist/types/components/metadata/AddAuthorButton.d.ts +0 -29
  117. package/dist/types/components/metadata/AddAuthorsModalContainer.d.ts +0 -38
  118. package/dist/types/components/metadata/AddAuthorsSidebar.d.ts +0 -28
  119. package/dist/types/components/metadata/AuthorFormContainer.d.ts +0 -31
  120. package/dist/types/components/metadata/AuthorInvitationForm.d.ts +0 -36
  121. package/dist/types/components/metadata/AuthorsModalContainer.d.ts +0 -48
  122. package/dist/types/components/metadata/AuthorsModals.d.ts +0 -50
  123. package/dist/types/components/metadata/AuthorsSidebar.d.ts +0 -24
  124. package/dist/types/components/metadata/CreateAuthorPageContainer.d.ts +0 -25
  125. package/dist/types/components/metadata/InviteAuthorButton.d.ts +0 -33
  126. package/dist/types/components/metadata/InviteAuthorPopperContainer.d.ts +0 -31
  127. package/dist/types/components/metadata/InviteAuthorsSidebar.d.ts +0 -24
  128. package/dist/types/lib/authors.d.ts +0 -42
@@ -1,99 +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
- const json_schema_1 = require("@manuscripts/json-schema");
18
- const transform_1 = require("@manuscripts/transform");
19
- const react_1 = __importDefault(require("react"));
20
- const utils_1 = require("../track-changes/utils");
21
- const AuthorsModals_1 = require("./AuthorsModals");
22
- class AuthorsModalContainer extends react_1.default.Component {
23
- constructor() {
24
- super(...arguments);
25
- this.state = {
26
- isRemoveAuthorOpen: false,
27
- };
28
- this.createContributorRole = async (name) => {
29
- const contributorRole = (0, transform_1.buildContributorRole)(name);
30
- return this.props.saveTrackModel(contributorRole);
31
- };
32
- this.handleRemoveAuthor = () => this.setState({ isRemoveAuthorOpen: !this.state.isRemoveAuthorOpen });
33
- this.removeAuthor = async (author) => {
34
- await this.props.removeAuthor(author);
35
- this.handleRemoveAuthor();
36
- };
37
- this.handleSaveAuthor = async (values) => {
38
- await this.props.saveTrackModel({
39
- objectType: json_schema_1.ObjectTypes.Contributor,
40
- ...values,
41
- });
42
- };
43
- this.addAuthorAffiliation = async (affiliation) => {
44
- const selectedAuthor = this.getSelectedAuthor();
45
- if (!selectedAuthor) {
46
- return;
47
- }
48
- let affiliationObj;
49
- this.props.affiliations.forEach((aff) => {
50
- if (affiliation.startsWith(aff._id)) {
51
- affiliationObj = aff;
52
- }
53
- });
54
- if (!affiliationObj) {
55
- affiliationObj = await this.props.saveTrackModel((0, transform_1.buildAffiliation)(affiliation));
56
- }
57
- const author = {
58
- ...selectedAuthor,
59
- affiliations: (selectedAuthor.affiliations || []).concat(affiliationObj._id),
60
- };
61
- await this.props.saveTrackModel(author);
62
- };
63
- this.removeAuthorAffiliation = async (affiliation) => {
64
- const selectedAuthor = this.getSelectedAuthor();
65
- if (!selectedAuthor) {
66
- return;
67
- }
68
- const nextAuthor = {
69
- ...selectedAuthor,
70
- affiliations: (selectedAuthor.affiliations || []).filter((aff) => aff !== affiliation._id),
71
- };
72
- console.log(nextAuthor);
73
- await this.props.saveTrackModel(nextAuthor);
74
- };
75
- this.updateAffiliation = async (affiliation) => {
76
- await this.props.saveTrackModel(affiliation);
77
- };
78
- this.getSelectedAuthor = () => {
79
- const sel = this.props.authors.find((author) => (0, utils_1.stripTracked)(author._id) ===
80
- (0, utils_1.stripTracked)(this.props.selectedAuthor || '')) || null;
81
- return sel;
82
- };
83
- this.handleDrop = (oldIndex, newIndex) => {
84
- this.props.handleDrop(this.props.authors, oldIndex, newIndex);
85
- };
86
- this.createEmptyAuthor = async () => {
87
- const authorInfo = (0, transform_1.buildContributor)((0, transform_1.buildBibliographicName)({ given: '', family: '' }), 'author', this.props.authors.length + 1);
88
- const author = await this.props.saveTrackModel(authorInfo);
89
- this.props.selectAuthor(author);
90
- };
91
- }
92
- render() {
93
- const { isRemoveAuthorOpen } = this.state;
94
- const { authors, authorAffiliations, affiliations, selectAuthor, contributorRoles, } = this.props;
95
- return (react_1.default.createElement(AuthorsModals_1.AuthorsModal, { "data-cy": "authors-editing-modal", 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 }));
96
- }
97
- }
98
- exports.default = AuthorsModalContainer;
99
- //# sourceMappingURL=AuthorsModalContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthorsModalContainer.js","sourceRoot":"","sources":["../../../../src/components/metadata/AuthorsModalContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAEH,0DAOiC;AAEjC,sDAM+B;AAC/B,kDAAyB;AAGzB,kDAAqD;AACrD,mDAA8C;AA8B9C,MAAM,qBAAsB,SAAQ,eAAK,CAAC,SAAuB;IAAjE;;QACS,UAAK,GAAG;YACb,kBAAkB,EAAE,KAAK;SAC1B,CAAA;QAmCO,0BAAqB,GAAG,KAAK,EACnC,IAAY,EACc,EAAE;YAC5B,MAAM,eAAe,GAAG,IAAA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EAAE,gBAAgB,EAClC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,GACjD,CACH,CAAA;IACH,CAAC;CA0GF;AAED,kBAAe,qBAAqB,CAAA"}
@@ -1,37 +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.AddAuthorsModal = exports.AuthorsModal = exports.ScrollableModalMain = void 0;
18
- const react_1 = __importDefault(require("react"));
19
- const styled_components_1 = __importDefault(require("styled-components"));
20
- const Sidebar_1 = require("../Sidebar");
21
- const AddAuthorsSidebar_1 = __importDefault(require("./AddAuthorsSidebar"));
22
- const AuthorFormContainer_1 = require("./AuthorFormContainer");
23
- const AuthorsPage_1 = require("./AuthorsPage");
24
- const AuthorsSidebar_1 = __importDefault(require("./AuthorsSidebar"));
25
- exports.ScrollableModalMain = (0, styled_components_1.default)(Sidebar_1.StyledModalMain) `
26
- overflow-y: auto;
27
- `;
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)))));
31
- 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
- react_1.default.createElement(Sidebar_1.StyledModalMain, null,
35
- react_1.default.createElement(AuthorsPage_1.AddAuthorsPage, { addedAuthorsCount: numberOfAddedAuthors }))));
36
- exports.AddAuthorsModal = AddAuthorsModal;
37
- //# sourceMappingURL=AuthorsModals.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthorsModals.js","sourceRoot":"","sources":["../../../../src/components/metadata/AuthorsModals.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AASH,kDAAyB;AACzB,0EAAsC;AAGtC,wCAAuD;AACvD,4EAAmD;AACnD,+DAA2D;AAC3D,+CAAiE;AACjE,sEAA6C;AAEhC,QAAA,mBAAmB,GAAG,IAAA,2BAAM,EAAC,yBAAe,CAAC,CAAA;;CAEzD,CAAA;AAqBM,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,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GACtB,EAAE,EAAE,CAAC,CACJ,8BAAC,mBAAS;IACR,8BAAC,wBAAc,IACb,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,GACtB;IACF,8BAAC,2BAAmB,QACjB,cAAc,CAAC,CAAC,CAAC,CAChB,8BAAC,yCAAmB,IAClB,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAChB,kBAAkB,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAwB,EAEnE,UAAU,EAAE,gBAAgB,EAC5B,oBAAoB,EAAE,oBAAoB,EAC1C,uBAAuB,EAAE,uBAAuB,EAChD,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB,EAClC,qBAAqB,EAAE,qBAAqB,GAC5C,CACH,CAAC,CAAC,CAAC,CACF,8BAAC,+BAAiB,OAAG,CACtB,CACmB,CACZ,CACb,CAAA;AAlDY,QAAA,YAAY,gBAkDxB;AAqBM,MAAM,eAAe,GAA6C,CAAC,EACxE,UAAU,EACV,OAAO,EACP,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,EAAE,EAAE,CAAC,CACJ,8BAAC,mBAAS;IACR,8BAAC,2BAAiB,IAChB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,oBAAoB,EAC1C,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,sBAAsB,EACxC,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,kBAAkB,GACtC;IACF,8BAAC,yBAAe;QACd,8BAAC,4BAAc,IAAC,iBAAiB,EAAE,oBAAoB,GAAI,CAC3C,CACR,CACb,CAAA;AA/BY,QAAA,eAAe,mBA+B3B"}
@@ -1,100 +0,0 @@
1
- "use strict";
2
- /*!
3
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
4
- *
5
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- 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.AuthorDetailsPage = exports.AddAuthorsPage = void 0;
18
- const AddedIcon_1 = __importDefault(require("@manuscripts/assets/react/AddedIcon"));
19
- const AuthorPlaceholder_1 = __importDefault(require("@manuscripts/assets/react/AuthorPlaceholder"));
20
- const ContributorDetailsPlaceholder_1 = __importDefault(require("@manuscripts/assets/react/ContributorDetailsPlaceholder"));
21
- const react_1 = __importDefault(require("react"));
22
- const styled_components_1 = __importDefault(require("styled-components"));
23
- const AddAuthorsMessage = () => (react_1.default.createElement("span", null, "Add authors to your author list from your collaborators, or invite new ones"));
24
- const SelectAuthorMessage = () => (react_1.default.createElement("span", null, "Select an author from the list to display their details here."));
25
- const AddedAuthorsMessage = ({ addedCount }) => react_1.default.createElement("span", null, "Authors added");
26
- const OuterContainer = styled_components_1.default.div `
27
- display: flex;
28
- flex-direction: column;
29
- align-items: center;
30
- justify-content: center;
31
- height: 100%;
32
- overflow-y: auto;
33
- `;
34
- const InnerContainer = styled_components_1.default.div `
35
- text-align: center;
36
- max-width: 480px;
37
- font-size: ${(props) => props.theme.font.size.xlarge};
38
- line-height: ${(props) => props.theme.font.lineHeight.large};
39
- `;
40
- const Placeholder = styled_components_1.default.div `
41
- display: flex;
42
- justify-content: center;
43
- margin-bottom: ${(props) => props.theme.grid.unit * 5}px;
44
- `;
45
- const Action = styled_components_1.default.div `
46
- display: flex;
47
- align-items: center;
48
- justify-content: center;
49
- font-size: ${(props) => props.theme.font.size.xlarge};
50
- font-weight: ${(props) => props.theme.font.weight.medium};
51
- letter-spacing: -0.5px;
52
- `;
53
- const Message = styled_components_1.default.div `
54
- max-width: 400px;
55
- font-size: ${(props) => props.theme.font.size.xlarge};
56
- margin-top: ${(props) => props.theme.grid.unit * 6}px;
57
- font-weight: ${(props) => props.theme.font.weight.light};
58
- color: ${(props) => props.theme.colors.text.secondary};
59
-
60
- @media (max-width: 850px) {
61
- margin-right: ${(props) => props.theme.grid.unit * 5}px;
62
- margin-left: ${(props) => props.theme.grid.unit * 5}px;
63
- max-width: 350px;
64
- }
65
- `;
66
- const AddedMessage = (0, styled_components_1.default)(Message) `
67
- margin-top: 2px;
68
- `;
69
- const IconContainer = styled_components_1.default.div `
70
- display: flex;
71
- align-self: center;
72
- padding-right: 5px;
73
- `;
74
- const MessageContainer = styled_components_1.default.div `
75
- display: flex;
76
- justify-content: center;
77
- `;
78
- const AddAuthorsPage = ({ addedAuthorsCount, }) => (react_1.default.createElement(OuterContainer, null,
79
- react_1.default.createElement(InnerContainer, null,
80
- react_1.default.createElement(Placeholder, null,
81
- react_1.default.createElement(AuthorPlaceholder_1.default, null)),
82
- addedAuthorsCount ? (react_1.default.createElement(MessageContainer, { "data-cy": 'add-author-message' },
83
- react_1.default.createElement(IconContainer, null,
84
- react_1.default.createElement(AddedIcon_1.default, null)),
85
- react_1.default.createElement(AddedMessage, null,
86
- react_1.default.createElement(AddedAuthorsMessage, { addedCount: addedAuthorsCount })))) : (react_1.default.createElement(react_1.default.Fragment, null,
87
- react_1.default.createElement(Action, null, "Add Author"),
88
- react_1.default.createElement(Message, null,
89
- react_1.default.createElement(AddAuthorsMessage, null)))))));
90
- exports.AddAuthorsPage = AddAuthorsPage;
91
- const AuthorDetailsPage = () => (react_1.default.createElement(OuterContainer, { "data-cy": 'author-details' },
92
- react_1.default.createElement(InnerContainer, null,
93
- react_1.default.createElement(Placeholder, null,
94
- react_1.default.createElement(ContributorDetailsPlaceholder_1.default, null)),
95
- react_1.default.createElement(react_1.default.Fragment, null,
96
- react_1.default.createElement(Action, null, "Author Details"),
97
- react_1.default.createElement(Message, null,
98
- react_1.default.createElement(SelectAuthorMessage, null))))));
99
- exports.AuthorDetailsPage = AuthorDetailsPage;
100
- //# sourceMappingURL=AuthorsPage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthorsPage.js","sourceRoot":"","sources":["../../../../src/components/metadata/AuthorsPage.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,oFAA2D;AAC3D,oGAA2E;AAC3E,4HAAwF;AACxF,kDAAyB;AACzB,0EAAsC;AAEtC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,CAC9B,0HAEO,CACR,CAAA;AACD,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,CAChC,4GAA0E,CAC3E,CAAA;AAED,MAAM,mBAAmB,GAEpB,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,4DAA0B,CAAA;AAEnD,MAAM,cAAc,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;CAOhC,CAAA;AAED,MAAM,cAAc,GAAG,2BAAM,CAAC,GAAG,CAAA;;;eAGlB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM;iBACrC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK;CAC5D,CAAA;AAED,MAAM,WAAW,GAAG,2BAAM,CAAC,GAAG,CAAA;;;mBAGX,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACtD,CAAA;AAED,MAAM,MAAM,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;eAIV,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM;iBACrC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;;CAEzD,CAAA;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,GAAG,CA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8BAAC,OAAO;gBACN,8BAAC,iBAAiB,OAAG,CACb,CACK,CAClB,CACc,CACF,CAClB,CAAA;AA7BY,QAAA,cAAc,kBA6B1B;AAEM,MAAM,iBAAiB,GAA4B,GAAG,EAAE,CAAC,CAC9D,8BAAC,cAAc,eAAU,gBAAgB;IACvC,8BAAC,cAAc;QACb,8BAAC,WAAW;YACV,8BAAC,uCAAkB,OAAG,CACV;QAEd,8BAAC,eAAK,CAAC,QAAQ;YACb,8BAAC,MAAM,yBAAwB;YAC/B,8BAAC,OAAO;gBACN,8BAAC,mBAAmB,OAAG,CACf,CACK,CACF,CACF,CAClB,CAAA;AAfY,QAAA,iBAAiB,qBAe7B"}
@@ -1,34 +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
- const style_guide_1 = require("@manuscripts/style-guide");
18
- const react_1 = __importDefault(require("react"));
19
- const styled_components_1 = __importDefault(require("styled-components"));
20
- const AddButton_1 = require("../AddButton");
21
- const Sidebar_1 = require("../Sidebar");
22
- const SidebarAction = styled_components_1.default.div `
23
- display: flex;
24
- align-items: center;
25
- margin-bottom: ${(props) => props.theme.grid.unit * 4}px;
26
- `;
27
- const AuthorsSidebar = ({ openAddAuthors, authors, selectAuthor, handleDrop, selectedAuthor, }) => (react_1.default.createElement(Sidebar_1.ModalSidebar, { "data-cy": 'authors-sidebar' },
28
- react_1.default.createElement(Sidebar_1.SidebarHeader, { title: 'Authors' }),
29
- react_1.default.createElement(Sidebar_1.SidebarContent, null,
30
- react_1.default.createElement(SidebarAction, null,
31
- react_1.default.createElement(AddButton_1.AddButton, { action: openAddAuthors, size: 'medium', title: 'New Author' })),
32
- react_1.default.createElement(style_guide_1.AuthorsDND, { authors: authors, selectAuthor: selectAuthor, selectedAuthor: selectedAuthor, handleDrop: handleDrop }))));
33
- exports.default = AuthorsSidebar;
34
- //# sourceMappingURL=AuthorsSidebar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthorsSidebar.js","sourceRoot":"","sources":["../../../../src/components/metadata/AuthorsSidebar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAAwE;AACxE,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;AAWD,MAAM,cAAc,GAAmC,CAAC,EACtD,cAAc,EACd,OAAO,EACP,YAAY,EACZ,UAAU,EACV,cAAc,GACf,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;QAChB,8BAAC,wBAAU,IACT,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,GACtB,CACa,CACJ,CAChB,CAAA;AAED,kBAAe,cAAc,CAAA"}
@@ -1,43 +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
- const style_guide_1 = require("@manuscripts/style-guide");
18
- const react_1 = __importDefault(require("react"));
19
- const authors_1 = require("../../lib/authors");
20
- class CreateAuthorPageContainer extends react_1.default.Component {
21
- constructor() {
22
- super(...arguments);
23
- this.handleCreate = () => {
24
- this.props.createAuthor((0, authors_1.buildAuthorPriority)(this.props.authors), null, this.props.searchText);
25
- this.props.handleCancel();
26
- };
27
- }
28
- render() {
29
- const actions = {
30
- primary: {
31
- action: this.handleCreate,
32
- title: 'Create',
33
- },
34
- secondary: {
35
- action: this.props.handleCancel,
36
- title: 'Cancel',
37
- },
38
- };
39
- return (react_1.default.createElement(style_guide_1.Dialog, { isOpen: this.props.isOpen, actions: actions, category: style_guide_1.Category.confirmation, header: 'Create author', message: `Author already exist are you sure you want to create author with the same name?` }));
40
- }
41
- }
42
- exports.default = CreateAuthorPageContainer;
43
- //# sourceMappingURL=CreateAuthorPageContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateAuthorPageContainer.js","sourceRoot":"","sources":["../../../../src/components/metadata/CreateAuthorPageContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAA2D;AAC3D,kDAAyB;AAEzB,+CAAuD;AAevD,MAAM,yBAA0B,SAAQ,eAAK,CAAC,SAAgB;IAA9D;;QAsBU,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,CAAC,KAAK,CAAC,YAAY,CACrB,IAAA,6BAAmB,EAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EACvC,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,UAAU,CACtB,CAAA;YACD,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAA;QAC3B,CAAC,CAAA;IACH,CAAC;IA7BQ,MAAM;QACX,MAAM,OAAO,GAAG;YACd,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI,CAAC,YAAY;gBACzB,KAAK,EAAE,QAAQ;aAChB;YACD,SAAS,EAAE;gBACT,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;gBAC/B,KAAK,EAAE,QAAQ;aAChB;SACF,CAAA;QACD,OAAO,CACL,8BAAC,oBAAM,IACL,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,sBAAQ,CAAC,YAAY,EAC/B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,iFAAiF,GAC1F,CACH,CAAA;IACH,CAAC;CASF;AAED,kBAAe,yBAAyB,CAAA"}
@@ -1,62 +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
- const style_guide_1 = require("@manuscripts/style-guide");
18
- const react_1 = __importDefault(require("react"));
19
- const react_popper_1 = require("react-popper");
20
- const styled_components_1 = __importDefault(require("styled-components"));
21
- const InviteAuthorPopperContainer_1 = __importDefault(require("./InviteAuthorPopperContainer"));
22
- const Button = (0, styled_components_1.default)(style_guide_1.TextButton) `
23
- margin-left: ${(props) => props.theme.grid.unit * 3}px;
24
- `;
25
- class InviteAuthorButton extends react_1.default.Component {
26
- constructor() {
27
- super(...arguments);
28
- this.state = {
29
- isOpen: false,
30
- };
31
- this.togglePopper = () => {
32
- this.updateListener(!this.state.isOpen);
33
- this.setState({
34
- isOpen: !this.state.isOpen,
35
- });
36
- };
37
- this.handleClickOutside = (event) => {
38
- if (this.node && !this.node.contains(event.target)) {
39
- this.togglePopper();
40
- }
41
- };
42
- this.updateListener = (isOpen) => {
43
- if (isOpen) {
44
- document.addEventListener('mousedown', this.handleClickOutside);
45
- }
46
- else {
47
- document.removeEventListener('mousedown', this.handleClickOutside);
48
- }
49
- };
50
- }
51
- componentDidMount() {
52
- this.updateListener(this.state.isOpen);
53
- }
54
- render() {
55
- const { isOpen } = this.state;
56
- return (react_1.default.createElement(react_popper_1.Manager, null,
57
- react_1.default.createElement(react_popper_1.Reference, null, ({ ref }) => (react_1.default.createElement(Button, { ref: ref, onClick: this.togglePopper }, "Invite as Collaborator"))),
58
- isOpen && (react_1.default.createElement(react_popper_1.Popper, { placement: 'bottom', innerRef: (node) => (this.node = node) }, (popperProps) => (react_1.default.createElement(InviteAuthorPopperContainer_1.default, { popperProps: popperProps, project: this.props.project, author: this.props.author, updateAuthor: this.props.updateAuthor, tokenActions: this.props.tokenActions }))))));
59
- }
60
- }
61
- exports.default = InviteAuthorButton;
62
- //# sourceMappingURL=InviteAuthorButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InviteAuthorButton.js","sourceRoot":"","sources":["../../../../src/components/metadata/InviteAuthorButton.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAAqD;AACrD,kDAAyB;AACzB,+CAA8E;AAC9E,0EAAsC;AAGtC,gGAAuE;AAavE,MAAM,MAAM,GAAG,IAAA,2BAAM,EAAC,wBAAU,CAAC,CAAA;iBAChB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACpD,CAAA;AAED,MAAM,kBAAmB,SAAQ,eAAK,CAAC,SAAuB;IAA9D;;QACS,UAAK,GAAU;YACpB,MAAM,EAAE,KAAK;SACd,CAAA;QAwCO,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;YACvC,IAAI,CAAC,QAAQ,CAAC;gBACZ,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;aAC3B,CAAC,CAAA;QACJ,CAAC,CAAA;QAEO,uBAAkB,GAAkB,CAAC,KAAY,EAAE,EAAE;YAC3D,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,C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,CAAC;CAsBF;AAED,kBAAe,kBAAkB,CAAA"}
@@ -1,62 +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
- const style_guide_1 = require("@manuscripts/style-guide");
18
- const react_1 = __importDefault(require("react"));
19
- const styled_components_1 = __importDefault(require("styled-components"));
20
- const api_1 = require("../../lib/api");
21
- const tracking_1 = require("../../lib/tracking");
22
- const Popper_1 = require("../Popper");
23
- const AuthorInvitationForm_1 = require("./AuthorInvitationForm");
24
- const AlertMessageContainer = styled_components_1.default.div `
25
- margin-bottom: ${(props) => props.theme.grid.unit * 2}px;
26
- `;
27
- class InviteAuthorPopperContainer extends react_1.default.Component {
28
- constructor() {
29
- super(...arguments);
30
- this.state = {
31
- invitationError: null,
32
- };
33
- this.handleInvitationSubmit = async (values) => {
34
- const { project } = this.props;
35
- const { email, name, role } = values;
36
- await (0, api_1.projectInvite)(project._id, [{ email, name }], role);
37
- this.props.updateAuthor(this.props.author, email);
38
- (0, tracking_1.trackEvent)({
39
- category: 'Invitations',
40
- action: 'Send',
41
- label: `projectID=${project._id}`,
42
- });
43
- };
44
- }
45
- render() {
46
- const { popperProps, author, tokenActions } = this.props;
47
- const { invitationError } = this.state;
48
- return (react_1.default.createElement(Popper_1.CustomUpPopper, { popperProps: popperProps },
49
- react_1.default.createElement(Popper_1.PopperBody, null,
50
- !!invitationError && (react_1.default.createElement(AlertMessageContainer, null,
51
- react_1.default.createElement(style_guide_1.AlertMessage, { type: style_guide_1.AlertMessageType.error, hideCloseButton: true }, "Sending invitation failed."))),
52
- react_1.default.createElement(AuthorInvitationForm_1.InvitationForm, { invitationValues: {
53
- email: author.email || '',
54
- name: author.bibliographicName.given +
55
- ' ' +
56
- author.bibliographicName.family,
57
- role: 'Writer',
58
- }, handleSubmit: this.handleInvitationSubmit, allowSubmit: true, tokenActions: tokenActions }))));
59
- }
60
- }
61
- exports.default = InviteAuthorPopperContainer;
62
- //# sourceMappingURL=InviteAuthorPopperContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InviteAuthorPopperContainer.js","sourceRoot":"","sources":["../../../../src/components/metadata/InviteAuthorPopperContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAAyE;AACzE,kDAAyB;AAEzB,0EAAsC;AAEtC,uCAA6C;AAC7C,iDAA+C;AAE/C,sCAAsD;AACtD,iEAAyE;AAczE,MAAM,qBAAqB,GAAG,2BAAM,CAAC,GAAG,CAAA;mBACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACtD,CAAA;AAED,MAAM,2BAA4B,SAAQ,eAAK,CAAC,SAAgB;IAAhE;;QACS,UAAK,GAAU;YACpB,eAAe,EAAE,IAAI;SACtB,CAAA;QAoCO,2BAAsB,GAAG,KAAK,EAAE,MAAwB,EAAE,EAAE;YAClE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;YAC9B,MAAM,EAAE,KAAK,EAAE,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ict";
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
- const react_1 = __importDefault(require("react"));
18
- const Sidebar_1 = require("../Sidebar");
19
- const AuthorInvitationForm_1 = require("./AuthorInvitationForm");
20
- const InviteAuthorsSidebarContents = ({ invitationValues, handleCancel, handleSubmit, invitationSent, tokenActions, }) => (react_1.default.createElement(react_1.default.Fragment, null,
21
- react_1.default.createElement(Sidebar_1.SidebarHeader, { action: handleCancel, isCancel: !invitationSent, title: 'Invite' }),
22
- react_1.default.createElement(Sidebar_1.SidebarContent, null,
23
- react_1.default.createElement(AuthorInvitationForm_1.InvitationForm, { allowSubmit: true, invitationValues: invitationValues, handleSubmit: handleSubmit, tokenActions: tokenActions }))));
24
- const InviteAuthorsSidebar = ({ invitationValues, handleCancel, handleSubmit, invitationSent, tokenActions, }) => (react_1.default.createElement(Sidebar_1.ModalSidebar, null,
25
- react_1.default.createElement(InviteAuthorsSidebarContents, { handleCancel: handleCancel, handleSubmit: handleSubmit, invitationSent: invitationSent, invitationValues: invitationValues, tokenActions: tokenActions })));
26
- exports.default = InviteAuthorsSidebar;
27
- //# sourceMappingURL=InviteAuthorsSidebar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InviteAuthorsSidebar.js","sourceRoot":"","sources":["../../../../src/components/metadata/InviteAuthorsSidebar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAEH,kDAAyB;AAGzB,wCAAwE;AACxE,iEAAyE;AAWzE,MAAM,4BAA4B,GAAmC,CAAC,EACpE,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,YAAY,GACb,EAAE,EAAE,CAAC,CACJ;IACE,8BAAC,uBAAa,IACZ,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,cAAc,EACzB,KAAK,EAAE,QAAQ,GACf;IACF,8BAAC,wBAAc;QACb,8BAAC,qCAAc,IACb,WAAW,EAAE,IAAI,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,GAC1B,CACa,CAChB,CACJ,CAAA;AAED,MAAM,oBAAoB,GAAmC,CAAC,EAC5D,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,YAAY,GACb,EAAE,EAAE,CAAC,CACJ,8BAAC,sBAAY;IACX,8BAAC,4BAA4B,IAC3B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,GAC1B,CACW,CAChB,CAAA;AAED,kBAAe,oBAAoB,CAAA"}
@@ -1,48 +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
- const style_guide_1 = require("@manuscripts/style-guide");
18
- const react_1 = __importDefault(require("react"));
19
- const styled_components_1 = __importDefault(require("styled-components"));
20
- const Sidebar_1 = require("../Sidebar");
21
- const AddAuthorButton_1 = __importDefault(require("./AddAuthorButton"));
22
- const PersonInitial = styled_components_1.default.span `
23
- margin-right: ${(props) => props.theme.grid.unit}px;
24
- font-weight: ${(props) => props.theme.font.weight.light};
25
- `;
26
- const PersonName = styled_components_1.default.div `
27
- font-size: 120%;
28
- color: ${(props) => props.theme.colors.text.primary};
29
- font-weight: ${(props) => props.theme.font.weight.medium};
30
- `;
31
- const PeopleData = styled_components_1.default.div `
32
- padding-left: ${(props) => props.theme.grid.unit * 2}px;
33
- `;
34
- const UserDataContainer = styled_components_1.default.div `
35
- display: flex;
36
- align-items: center;
37
- `;
38
- const SearchAuthorsSidebar = ({ createAuthor, searchResults, addedAuthors, authors, }) => (react_1.default.createElement(react_1.default.Fragment, null,
39
- react_1.default.createElement(Sidebar_1.SidebarContent, null, searchResults.map((person) => (react_1.default.createElement(Sidebar_1.SidebarPersonContainer, { key: person._id },
40
- react_1.default.createElement(UserDataContainer, null,
41
- react_1.default.createElement(style_guide_1.Avatar, { src: person.avatar, size: 45 }),
42
- react_1.default.createElement(PeopleData, null,
43
- react_1.default.createElement(PersonName, null,
44
- react_1.default.createElement(PersonInitial, null, person.bibliographicName.given),
45
- person.bibliographicName.family))),
46
- react_1.default.createElement(AddAuthorButton_1.default, { person: person, isSelected: addedAuthors.includes(person.userID), createAuthor: createAuthor, authors: authors })))))));
47
- exports.default = SearchAuthorsSidebar;
48
- //# sourceMappingURL=SearchAuthorsSidebar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchAuthorsSidebar.js","sourceRoot":"","sources":["../../../../src/components/metadata/SearchAuthorsSidebar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAAiD;AAEjD,kDAAyB;AACzB,0EAAsC;AAEtC,wCAAmE;AACnE,wEAA+C;AAE/C,MAAM,aAAa,GAAG,2BAAM,CAAC,IAAI,CAAA;kBACf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;iBACjC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;CACxD,CAAA;AAED,MAAM,UAAU,GAAG,2BAAM,CAAC,GAAG,CAAA;;WAElB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;iBACpC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;CACzD,CAAA;AAED,MAAM,UAAU,GAAG,2BAAM,CAAC,GAAG,CAAA;kBACX,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACrD,CAAA;AAED,MAAM,iBAAiB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;CAGnC,CAAA;AAcD,MAAM,oBAAoB,GAAgD,CAAC,EACzE,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,GACR,EAAE,EAAE,CAAC,CACJ,8BAAC,eAAK,CAAC,QAAQ;IACb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