@manuscripts/body-editor 2.7.28 → 2.7.29
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/components/affiliations/AffiliationItem.js +2 -2
- package/dist/cjs/components/affiliations/AffiliationsModal.js +3 -3
- package/dist/cjs/components/authors/AuthorsModal.js +3 -3
- package/dist/cjs/versions.js +1 -1
- package/dist/es/components/affiliations/AffiliationItem.js +2 -2
- package/dist/es/components/affiliations/AffiliationsModal.js +3 -3
- package/dist/es/components/authors/AuthorsModal.js +3 -3
- package/dist/es/versions.js +1 -1
- package/dist/types/versions.d.ts +1 -1
- package/package.json +3 -3
|
@@ -92,10 +92,10 @@ const AffiliationItem = ({ affiliation, isSelected, onClick, onDelete, showSucce
|
|
|
92
92
|
block: 'nearest',
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
return (react_1.default.createElement(AffiliationContainer, { onClick: onClick, className: isSelected ? 'active' : '', ref: ref },
|
|
95
|
+
return (react_1.default.createElement(AffiliationContainer, { "data-cy": "affiliation-item", onClick: onClick, className: isSelected ? 'active' : '', ref: ref },
|
|
96
96
|
react_1.default.createElement(style_guide_1.AffiliationIcon, { opacity: showSuccessIcon ? 0.05 : 1, style: { minWidth: 24, minHeight: 24 } }),
|
|
97
97
|
react_1.default.createElement(AffiliationBox, null,
|
|
98
|
-
react_1.default.createElement(AffiliationName,
|
|
98
|
+
react_1.default.createElement(AffiliationName, { "data-cy": "affiliation-name" }, affiliation.institution),
|
|
99
99
|
react_1.default.createElement(AffiliationDetails, null,
|
|
100
100
|
affiliation.city && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
101
101
|
affiliation.city,
|
|
@@ -384,7 +384,7 @@ const AffiliationsModal = ({ authors: $authors, affiliations: $affiliations, onS
|
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
386
|
return (react_1.default.createElement(style_guide_1.StyledModal, { isOpen: isOpen, onRequestClose: () => handleClose(), shouldCloseOnOverlayClick: true },
|
|
387
|
-
react_1.default.createElement(style_guide_1.ModalContainer,
|
|
387
|
+
react_1.default.createElement(style_guide_1.ModalContainer, { "data-cy": "affiliations-modal" },
|
|
388
388
|
react_1.default.createElement(style_guide_1.ModalHeader, null,
|
|
389
389
|
react_1.default.createElement(style_guide_1.CloseButton, { onClick: () => handleClose(), "data-cy": "modal-close-button" })),
|
|
390
390
|
react_1.default.createElement(StyledModalBody, null,
|
|
@@ -407,10 +407,10 @@ const AffiliationsModal = ({ authors: $authors, affiliations: $affiliations, onS
|
|
|
407
407
|
react_1.default.createElement(AffiliateButton, { onClick: () => setShowAuthorDrawer(true), "data-cy": "affiliate-authors-button" },
|
|
408
408
|
react_1.default.createElement(style_guide_1.AddUserIcon, { width: 16, height: 16 }),
|
|
409
409
|
"Affiliate Authors")),
|
|
410
|
-
react_1.default.createElement(style_guide_1.SelectedItemsBox, { items: selectedAuthors, onRemove: (id) => {
|
|
410
|
+
react_1.default.createElement(style_guide_1.SelectedItemsBox, { "data-cy": "affiliation-authors", items: selectedAuthors, onRemove: (id) => {
|
|
411
411
|
setSelectedIds((prev) => prev.filter((authorId) => authorId !== id));
|
|
412
412
|
}, placeholder: "No authors assigned" })),
|
|
413
|
-
showAuthorDrawer && (react_1.default.createElement(style_guide_1.Drawer, { items: authorItems, selectedIds: selectedIds, title: "Authors", onSelect: handleAuthorSelect, onBack: () => setShowAuthorDrawer(false), width: "100%" })))) : (react_1.default.createElement(FormPlaceholder_1.FormPlaceholder, { type: "affiliation", title:
|
|
413
|
+
showAuthorDrawer && (react_1.default.createElement(style_guide_1.Drawer, { items: authorItems, selectedIds: selectedIds, title: "Authors", onSelect: handleAuthorSelect, onBack: () => setShowAuthorDrawer(false), width: "100%" })))) : (react_1.default.createElement(FormPlaceholder_1.FormPlaceholder, { type: "affiliation", title: "Affiliation Details", message: "Select an affiliation from the list to display it's details here.", placeholderIcon: react_1.default.createElement(style_guide_1.AffiliationPlaceholderIcon, null) })))),
|
|
414
414
|
react_1.default.createElement(FormFooter_1.default, { onCancel: handleClose }))));
|
|
415
415
|
};
|
|
416
416
|
exports.AffiliationsModal = AffiliationsModal;
|
|
@@ -461,7 +461,7 @@ const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, author,
|
|
|
461
461
|
setSelectedAffiliations(affiliationItems.filter((item) => newAffiliations.includes(item.id)));
|
|
462
462
|
};
|
|
463
463
|
return (react_1.default.createElement(style_guide_1.StyledModal, { isOpen: isOpen, onRequestClose: () => handleClose(), shouldCloseOnOverlayClick: true },
|
|
464
|
-
react_1.default.createElement(style_guide_1.ModalContainer,
|
|
464
|
+
react_1.default.createElement(style_guide_1.ModalContainer, { "data-cy": "authors-modal" },
|
|
465
465
|
react_1.default.createElement(style_guide_1.ModalHeader, null,
|
|
466
466
|
react_1.default.createElement(style_guide_1.CloseButton, { onClick: () => handleClose(), "data-cy": "modal-close-button" })),
|
|
467
467
|
react_1.default.createElement(StyledModalBody, null,
|
|
@@ -488,8 +488,8 @@ const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, author,
|
|
|
488
488
|
react_1.default.createElement(AffiliateButton, { onClick: () => setShowAffiliationDrawer(true), "data-cy": "affiliate-authors-button" },
|
|
489
489
|
react_1.default.createElement(style_guide_1.AddInstitutionIcon, { width: 16, height: 16 }),
|
|
490
490
|
"Assign Institutions")),
|
|
491
|
-
react_1.default.createElement(style_guide_1.SelectedItemsBox, { items: selectedAffiliations, onRemove: handleRemoveAffiliation, placeholder: "No institutions assigned" })),
|
|
492
|
-
showAffiliationDrawer && (react_1.default.createElement(style_guide_1.Drawer, { items: affiliationItems, selectedIds: selectedAffiliationIds, title: "Authors", onSelect: handleAffiliationSelect, onBack: () => setShowAffiliationDrawer(false), width: "100%" })))) : (react_1.default.createElement(FormPlaceholder_1.FormPlaceholder, { type: "author", title:
|
|
491
|
+
react_1.default.createElement(style_guide_1.SelectedItemsBox, { "data-cy": "author-affiliations", items: selectedAffiliations, onRemove: handleRemoveAffiliation, placeholder: "No institutions assigned" })),
|
|
492
|
+
showAffiliationDrawer && (react_1.default.createElement(style_guide_1.Drawer, { items: affiliationItems, selectedIds: selectedAffiliationIds, title: "Authors", onSelect: handleAffiliationSelect, onBack: () => setShowAffiliationDrawer(false), width: "100%" })))) : (react_1.default.createElement(FormPlaceholder_1.FormPlaceholder, { type: "author", title: "Author Details", message: "Select an author from the list to display their details here.", placeholderIcon: react_1.default.createElement(style_guide_1.AuthorPlaceholderIcon, null) })))),
|
|
493
493
|
react_1.default.createElement(FormFooter_1.default, { onCancel: handleClose }))));
|
|
494
494
|
};
|
|
495
495
|
exports.AuthorsModal = AuthorsModal;
|
package/dist/cjs/versions.js
CHANGED
|
@@ -63,10 +63,10 @@ export const AffiliationItem = ({ affiliation, isSelected, onClick, onDelete, sh
|
|
|
63
63
|
block: 'nearest',
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
return (React.createElement(AffiliationContainer, { onClick: onClick, className: isSelected ? 'active' : '', ref: ref },
|
|
66
|
+
return (React.createElement(AffiliationContainer, { "data-cy": "affiliation-item", onClick: onClick, className: isSelected ? 'active' : '', ref: ref },
|
|
67
67
|
React.createElement(AffiliationIcon, { opacity: showSuccessIcon ? 0.05 : 1, style: { minWidth: 24, minHeight: 24 } }),
|
|
68
68
|
React.createElement(AffiliationBox, null,
|
|
69
|
-
React.createElement(AffiliationName,
|
|
69
|
+
React.createElement(AffiliationName, { "data-cy": "affiliation-name" }, affiliation.institution),
|
|
70
70
|
React.createElement(AffiliationDetails, null,
|
|
71
71
|
affiliation.city && (React.createElement(React.Fragment, null,
|
|
72
72
|
affiliation.city,
|
|
@@ -355,7 +355,7 @@ export const AffiliationsModal = ({ authors: $authors, affiliations: $affiliatio
|
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
357
|
return (React.createElement(StyledModal, { isOpen: isOpen, onRequestClose: () => handleClose(), shouldCloseOnOverlayClick: true },
|
|
358
|
-
React.createElement(ModalContainer,
|
|
358
|
+
React.createElement(ModalContainer, { "data-cy": "affiliations-modal" },
|
|
359
359
|
React.createElement(ModalHeader, null,
|
|
360
360
|
React.createElement(CloseButton, { onClick: () => handleClose(), "data-cy": "modal-close-button" })),
|
|
361
361
|
React.createElement(StyledModalBody, null,
|
|
@@ -378,9 +378,9 @@ export const AffiliationsModal = ({ authors: $authors, affiliations: $affiliatio
|
|
|
378
378
|
React.createElement(AffiliateButton, { onClick: () => setShowAuthorDrawer(true), "data-cy": "affiliate-authors-button" },
|
|
379
379
|
React.createElement(AddUserIcon, { width: 16, height: 16 }),
|
|
380
380
|
"Affiliate Authors")),
|
|
381
|
-
React.createElement(SelectedItemsBox, { items: selectedAuthors, onRemove: (id) => {
|
|
381
|
+
React.createElement(SelectedItemsBox, { "data-cy": "affiliation-authors", items: selectedAuthors, onRemove: (id) => {
|
|
382
382
|
setSelectedIds((prev) => prev.filter((authorId) => authorId !== id));
|
|
383
383
|
}, placeholder: "No authors assigned" })),
|
|
384
|
-
showAuthorDrawer && (React.createElement(Drawer, { items: authorItems, selectedIds: selectedIds, title: "Authors", onSelect: handleAuthorSelect, onBack: () => setShowAuthorDrawer(false), width: "100%" })))) : (React.createElement(FormPlaceholder, { type: "affiliation", title:
|
|
384
|
+
showAuthorDrawer && (React.createElement(Drawer, { items: authorItems, selectedIds: selectedIds, title: "Authors", onSelect: handleAuthorSelect, onBack: () => setShowAuthorDrawer(false), width: "100%" })))) : (React.createElement(FormPlaceholder, { type: "affiliation", title: "Affiliation Details", message: "Select an affiliation from the list to display it's details here.", placeholderIcon: React.createElement(AffiliationPlaceholderIcon, null) })))),
|
|
385
385
|
React.createElement(FormFooter, { onCancel: handleClose }))));
|
|
386
386
|
};
|
|
@@ -432,7 +432,7 @@ export const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, a
|
|
|
432
432
|
setSelectedAffiliations(affiliationItems.filter((item) => newAffiliations.includes(item.id)));
|
|
433
433
|
};
|
|
434
434
|
return (React.createElement(StyledModal, { isOpen: isOpen, onRequestClose: () => handleClose(), shouldCloseOnOverlayClick: true },
|
|
435
|
-
React.createElement(ModalContainer,
|
|
435
|
+
React.createElement(ModalContainer, { "data-cy": "authors-modal" },
|
|
436
436
|
React.createElement(ModalHeader, null,
|
|
437
437
|
React.createElement(CloseButton, { onClick: () => handleClose(), "data-cy": "modal-close-button" })),
|
|
438
438
|
React.createElement(StyledModalBody, null,
|
|
@@ -459,7 +459,7 @@ export const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, a
|
|
|
459
459
|
React.createElement(AffiliateButton, { onClick: () => setShowAffiliationDrawer(true), "data-cy": "affiliate-authors-button" },
|
|
460
460
|
React.createElement(AddInstitutionIcon, { width: 16, height: 16 }),
|
|
461
461
|
"Assign Institutions")),
|
|
462
|
-
React.createElement(SelectedItemsBox, { items: selectedAffiliations, onRemove: handleRemoveAffiliation, placeholder: "No institutions assigned" })),
|
|
463
|
-
showAffiliationDrawer && (React.createElement(Drawer, { items: affiliationItems, selectedIds: selectedAffiliationIds, title: "Authors", onSelect: handleAffiliationSelect, onBack: () => setShowAffiliationDrawer(false), width: "100%" })))) : (React.createElement(FormPlaceholder, { type: "author", title:
|
|
462
|
+
React.createElement(SelectedItemsBox, { "data-cy": "author-affiliations", items: selectedAffiliations, onRemove: handleRemoveAffiliation, placeholder: "No institutions assigned" })),
|
|
463
|
+
showAffiliationDrawer && (React.createElement(Drawer, { items: affiliationItems, selectedIds: selectedAffiliationIds, title: "Authors", onSelect: handleAffiliationSelect, onBack: () => setShowAffiliationDrawer(false), width: "100%" })))) : (React.createElement(FormPlaceholder, { type: "author", title: "Author Details", message: "Select an author from the list to display their details here.", placeholderIcon: React.createElement(AuthorPlaceholderIcon, null) })))),
|
|
464
464
|
React.createElement(FormFooter, { onCancel: handleClose }))));
|
|
465
465
|
};
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.7.
|
|
1
|
+
export const VERSION = '2.7.29';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.7.
|
|
1
|
+
export declare const VERSION = "2.7.29";
|
|
2
2
|
export declare const MATHJAX_VERSION = "3.2.2";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/body-editor",
|
|
3
3
|
"description": "Prosemirror components for editing and viewing manuscripts",
|
|
4
|
-
"version": "2.7.
|
|
4
|
+
"version": "2.7.29",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@iarna/word-count": "^1.1.2",
|
|
33
33
|
"@manuscripts/json-schema": "2.2.11",
|
|
34
34
|
"@manuscripts/library": "1.3.11",
|
|
35
|
-
"@manuscripts/style-guide": "2.0.
|
|
35
|
+
"@manuscripts/style-guide": "2.0.33",
|
|
36
36
|
"@manuscripts/track-changes-plugin": "1.9.4",
|
|
37
37
|
"@manuscripts/transform": "3.0.37",
|
|
38
38
|
"@popperjs/core": "^2.11.8",
|
|
@@ -117,4 +117,4 @@
|
|
|
117
117
|
"engines": {
|
|
118
118
|
"node": ">=20.16.0"
|
|
119
119
|
}
|
|
120
|
-
}
|
|
120
|
+
}
|