@manuscripts/body-editor 3.12.33 → 3.12.35

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 (70) hide show
  1. package/dist/cjs/components/ChangeHandlingForm.js +3 -2
  2. package/dist/cjs/components/affiliations/AffiliationForm.js +77 -44
  3. package/dist/cjs/components/affiliations/AffiliationsModal.js +69 -58
  4. package/dist/cjs/components/affiliations/AffiliationsPanel.js +1 -1
  5. package/dist/cjs/components/affiliations/CreateAffiliationModal.js +96 -0
  6. package/dist/cjs/components/authors/AuthorDetailsForm.js +110 -54
  7. package/dist/cjs/components/authors/AuthorsModal.js +71 -48
  8. package/dist/cjs/components/authors/AuthorsPanel.js +2 -2
  9. package/dist/cjs/components/authors/CreateAuthorModal.js +121 -0
  10. package/dist/cjs/components/authors/CreditDrawer.js +14 -12
  11. package/dist/cjs/components/authors-affiliations/AuthorsAndAffiliationsModals.js +8 -24
  12. package/dist/cjs/components/authors-affiliations/GenericPanel.js +2 -2
  13. package/dist/cjs/components/authors-affiliations/ModalTabs.js +80 -0
  14. package/dist/cjs/components/dialog/ConfirmationDialog.js +3 -2
  15. package/dist/cjs/components/form/CreateModalStyles.js +24 -0
  16. package/dist/cjs/components/form/FormFooter.js +8 -3
  17. package/dist/cjs/components/form/ModalFormActions.js +19 -42
  18. package/dist/cjs/components/form/UnsavedLabel.js +25 -0
  19. package/dist/cjs/components/hooks/useAffiliationShowsErrorIndicator.js +27 -0
  20. package/dist/cjs/components/hooks/useAuthorShowsErrorIndicator.js +40 -0
  21. package/dist/cjs/lib/authors-and-affiliations.js +51 -0
  22. package/dist/cjs/lib/helpers.js +28 -1
  23. package/dist/cjs/lib/normalize.js +17 -5
  24. package/dist/cjs/useEditor.js +7 -4
  25. package/dist/cjs/versions.js +1 -1
  26. package/dist/es/components/ChangeHandlingForm.js +3 -2
  27. package/dist/es/components/affiliations/AffiliationForm.js +75 -46
  28. package/dist/es/components/affiliations/AffiliationsModal.js +71 -60
  29. package/dist/es/components/affiliations/AffiliationsPanel.js +2 -2
  30. package/dist/es/components/affiliations/CreateAffiliationModal.js +56 -0
  31. package/dist/es/components/authors/AuthorDetailsForm.js +111 -56
  32. package/dist/es/components/authors/AuthorsModal.js +74 -51
  33. package/dist/es/components/authors/AuthorsPanel.js +3 -3
  34. package/dist/es/components/authors/CreateAuthorModal.js +81 -0
  35. package/dist/es/components/authors/CreditDrawer.js +13 -11
  36. package/dist/es/components/authors-affiliations/AuthorsAndAffiliationsModals.js +8 -24
  37. package/dist/es/components/authors-affiliations/GenericPanel.js +2 -2
  38. package/dist/es/components/authors-affiliations/ModalTabs.js +73 -0
  39. package/dist/es/components/dialog/ConfirmationDialog.js +3 -2
  40. package/dist/es/components/form/CreateModalStyles.js +18 -0
  41. package/dist/es/components/form/FormFooter.js +9 -4
  42. package/dist/es/components/form/ModalFormActions.js +18 -42
  43. package/dist/es/components/form/UnsavedLabel.js +18 -0
  44. package/dist/es/components/hooks/useAffiliationShowsErrorIndicator.js +21 -0
  45. package/dist/es/components/hooks/useAuthorShowsErrorIndicator.js +34 -0
  46. package/dist/es/lib/authors-and-affiliations.js +48 -0
  47. package/dist/es/lib/helpers.js +27 -1
  48. package/dist/es/lib/normalize.js +15 -4
  49. package/dist/es/useEditor.js +8 -5
  50. package/dist/es/versions.js +1 -1
  51. package/dist/es/views/affiliations.js +1 -1
  52. package/dist/types/components/affiliations/AffiliationForm.d.ts +6 -2
  53. package/dist/types/components/affiliations/AffiliationsModal.d.ts +1 -1
  54. package/dist/types/components/affiliations/CreateAffiliationModal.d.ts +8 -0
  55. package/dist/types/components/authors/AuthorDetailsForm.d.ts +11 -1
  56. package/dist/types/components/authors/AuthorsPanel.d.ts +1 -1
  57. package/dist/types/components/authors/CreateAuthorModal.d.ts +9 -0
  58. package/dist/types/components/authors/CreditDrawer.d.ts +2 -4
  59. package/dist/types/components/authors-affiliations/ModalTabs.d.ts +22 -0
  60. package/dist/types/components/form/CreateModalStyles.d.ts +4 -0
  61. package/dist/types/components/form/FormFooter.d.ts +2 -1
  62. package/dist/types/components/form/ModalFormActions.d.ts +12 -6
  63. package/dist/types/components/form/UnsavedLabel.d.ts +10 -0
  64. package/dist/types/components/hooks/useAffiliationShowsErrorIndicator.d.ts +5 -0
  65. package/dist/types/components/hooks/useAuthorShowsErrorIndicator.d.ts +5 -0
  66. package/dist/types/lib/authors-and-affiliations.d.ts +19 -0
  67. package/dist/types/lib/helpers.d.ts +2 -0
  68. package/dist/types/lib/normalize.d.ts +2 -1
  69. package/dist/types/versions.d.ts +1 -1
  70. package/package.json +2 -2
@@ -0,0 +1,5 @@
1
+ import { FormikProps } from 'formik';
2
+ import { ContributorAttrs } from '../../lib/authors';
3
+ export declare function isNamePairError(formik: FormikProps<ContributorAttrs>, newEntity: boolean, requiredContinueActive?: boolean): boolean;
4
+ export declare function authorShowsErrorIndicator(formik: FormikProps<ContributorAttrs>, newEntity: boolean, requiredContinueActive?: boolean): boolean;
5
+ export declare const useAuthorShowsErrorIndicator: (newEntity: boolean, requiredContinueActive: boolean, onChange?: (hasError: boolean) => void) => void;
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * © 2026 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ManuscriptEditorView } from '@manuscripts/transform';
17
+ import { AffiliationAttrs, ContributorAttrs } from './authors';
18
+ export declare const upsertAuthor: (view: ManuscriptEditorView, attrs: ContributorAttrs) => void;
19
+ export declare const upsertAffiliation: (view: ManuscriptEditorView, attrs: AffiliationAttrs) => void;
@@ -15,10 +15,12 @@
15
15
  */
16
16
  import { ManuscriptEditorState, ManuscriptNode } from '@manuscripts/transform';
17
17
  import { Node, ResolvedPos } from 'prosemirror-model';
18
+ import { NodeSelection, TextSelection } from 'prosemirror-state';
18
19
  import { EditorView } from 'prosemirror-view';
19
20
  export declare const isNodeOfType: (...type: string[]) => (node: Node) => boolean;
20
21
  export declare const nearestAncestor: (func: (node: ManuscriptNode) => boolean) => ($pos: ResolvedPos) => number | null;
21
22
  export declare const mergeSimilarItems: <T>(compareFunc: (a: T, b: T) => boolean, mergeFunc: (a: T, b: T) => T) => (items: T[]) => T[];
23
+ export declare const selectionForOutlineNavigation: (doc: Node, pos: number) => NodeSelection | TextSelection;
22
24
  export declare const handleScrollToSelectedTarget: (view: EditorView) => boolean;
23
25
  export declare const findWordBoundaries: (state: ManuscriptEditorState, position: number) => {
24
26
  from: number;
@@ -14,7 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { Nodes } from '@manuscripts/transform';
17
- import { ContributorAttrs } from './authors';
17
+ import { AffiliationAttrs, ContributorAttrs } from './authors';
18
+ export declare const normalizeAffiliation: (a: AffiliationAttrs) => AffiliationAttrs;
18
19
  export declare const normalizeAuthor: (author: ContributorAttrs) => ContributorAttrs;
19
20
  type WithID = {
20
21
  id: string | undefined;
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.12.33";
1
+ export declare const VERSION = "3.12.35";
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": "3.12.33",
4
+ "version": "3.12.35",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -37,7 +37,7 @@
37
37
  "@citation-js/plugin-pubmed": "0.3.0",
38
38
  "@citation-js/plugin-ris": "0.7.18",
39
39
  "@iarna/word-count": "1.1.2",
40
- "@manuscripts/style-guide": "3.5.11",
40
+ "@manuscripts/style-guide": "3.5.12",
41
41
  "@manuscripts/track-changes-plugin": "2.3.10",
42
42
  "@manuscripts/transform": "4.3.38",
43
43
  "@popperjs/core": "2.11.8",