@manuscripts/article-editor 1.6.7 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/components/Support.js +129 -0
- package/dist/cjs/src/components/Support.js.map +1 -0
- package/dist/cjs/src/components/inspector/ElementStyleInspector.js +14 -0
- package/dist/cjs/src/components/inspector/ElementStyleInspector.js.map +1 -0
- package/dist/cjs/src/components/inspector/StatisticsInspector.js +39 -0
- package/dist/cjs/src/components/inspector/StatisticsInspector.js.map +1 -0
- package/dist/cjs/src/components/library/CitationModel.js +210 -0
- package/dist/cjs/src/components/library/CitationModel.js.map +1 -0
- package/dist/cjs/src/components/library/CitationProperties.js +67 -0
- package/dist/cjs/src/components/library/CitationProperties.js.map +1 -0
- package/dist/cjs/src/components/library/ExternalSearch.js +156 -0
- package/dist/cjs/src/components/library/ExternalSearch.js.map +1 -0
- package/dist/cjs/src/components/library/GlobalLibrary.js +133 -0
- package/dist/cjs/src/components/library/GlobalLibrary.js.map +1 -0
- package/dist/cjs/src/components/library/LibraryCollectionCategories.js +53 -0
- package/dist/cjs/src/components/library/LibraryCollectionCategories.js.map +1 -0
- package/dist/cjs/src/components/library/LibraryForm.js +437 -0
- package/dist/cjs/src/components/library/LibraryForm.js.map +1 -0
- package/dist/cjs/src/components/library/LibraryItems.js +116 -0
- package/dist/cjs/src/components/library/LibraryItems.js.map +1 -0
- package/dist/cjs/src/components/library/LibraryPageContainer.js +107 -0
- package/dist/cjs/src/components/library/LibraryPageContainer.js.map +1 -0
- package/dist/cjs/src/components/library/LibrarySidebar.js +172 -0
- package/dist/cjs/src/components/library/LibrarySidebar.js.map +1 -0
- package/dist/cjs/src/components/library/Messages.js +25 -0
- package/dist/cjs/src/components/library/Messages.js.map +1 -0
- package/dist/cjs/src/components/library/ProjectLibrary.js +96 -0
- package/dist/cjs/src/components/library/ProjectLibrary.js.map +1 -0
- package/dist/cjs/src/components/metadata/HeaderFigure.js +147 -0
- package/dist/cjs/src/components/metadata/HeaderFigure.js.map +1 -0
- package/dist/cjs/src/components/metadata/Metadata.js +103 -0
- package/dist/cjs/src/components/metadata/Metadata.js.map +1 -0
- package/dist/cjs/src/components/metadata/MetadataContainer.js +203 -0
- package/dist/cjs/src/components/metadata/MetadataContainer.js.map +1 -0
- package/dist/cjs/src/components/metadata/TitleFieldContainer.js +56 -0
- package/dist/cjs/src/components/metadata/TitleFieldContainer.js.map +1 -0
- package/dist/cjs/src/components/projects/CategorisedKeywordsInput.js +439 -0
- package/dist/cjs/src/components/projects/CategorisedKeywordsInput.js.map +1 -0
- package/dist/cjs/src/components/projects/KeywordsInput.js +80 -0
- package/dist/cjs/src/components/projects/KeywordsInput.js.map +1 -0
- package/dist/cjs/src/components/projects/ManuscriptPageContainer.js +1 -2
- package/dist/cjs/src/components/projects/ManuscriptPageContainer.js.map +1 -1
- package/dist/cjs/src/components/projects/ManuscriptSidebar.js +4 -61
- package/dist/cjs/src/components/projects/ManuscriptSidebar.js.map +1 -1
- package/dist/cjs/src/components/projects/lean-workflow/ApplicationMenusLW.js +102 -0
- package/dist/cjs/src/components/projects/lean-workflow/ApplicationMenusLW.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/CommentList.js +289 -0
- package/dist/cjs/src/components/projects/lean-workflow/CommentList.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/CommentsTab.js +41 -0
- package/dist/cjs/src/components/projects/lean-workflow/CommentsTab.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/ContentTab.js +66 -0
- package/dist/cjs/src/components/projects/lean-workflow/ContentTab.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/EditorElement.js +252 -0
- package/dist/cjs/src/components/projects/lean-workflow/EditorElement.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/ExceptionDialog.js +150 -0
- package/dist/cjs/src/components/projects/lean-workflow/ExceptionDialog.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/ManuscriptPageContainerLW.js +187 -0
- package/dist/cjs/src/components/projects/lean-workflow/ManuscriptPageContainerLW.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/SaveStatusController.js +53 -0
- package/dist/cjs/src/components/projects/lean-workflow/SaveStatusController.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/TrackChangesStyles.js +106 -0
- package/dist/cjs/src/components/projects/lean-workflow/TrackChangesStyles.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/icons/DeleteIcon.js +27 -0
- package/dist/cjs/src/components/projects/lean-workflow/icons/DeleteIcon.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/icons/GroupIcon.js +29 -0
- package/dist/cjs/src/components/projects/lean-workflow/icons/GroupIcon.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/icons/LinkIcon.js +23 -0
- package/dist/cjs/src/components/projects/lean-workflow/icons/LinkIcon.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/icons/TemplateIcon.js +23 -0
- package/dist/cjs/src/components/projects/lean-workflow/icons/TemplateIcon.js.map +1 -0
- package/dist/cjs/src/components/projects/lean-workflow/provider/UserProvider.js +38 -0
- package/dist/cjs/src/components/projects/lean-workflow/provider/UserProvider.js.map +1 -0
- package/dist/cjs/src/components/requirements/RequirementContainer.js +58 -0
- package/dist/cjs/src/components/requirements/RequirementContainer.js.map +1 -0
- package/dist/cjs/src/components/requirements/RequirementsData.js +129 -0
- package/dist/cjs/src/components/requirements/RequirementsData.js.map +1 -0
- package/dist/cjs/src/components/requirements/RequirementsIcons.js +34 -0
- package/dist/cjs/src/components/requirements/RequirementsIcons.js.map +1 -0
- package/dist/cjs/src/components/requirements/RequirementsInspector.js +150 -0
- package/dist/cjs/src/components/requirements/RequirementsInspector.js.map +1 -0
- package/dist/cjs/src/components/requirements/RequirementsList.js +84 -0
- package/dist/cjs/src/components/requirements/RequirementsList.js.map +1 -0
- package/dist/cjs/src/components/requirements/SectionValidations.js +47 -0
- package/dist/cjs/src/components/requirements/SectionValidations.js.map +1 -0
- package/dist/cjs/src/components/track-changes/utils.js +2 -87
- package/dist/cjs/src/components/track-changes/utils.js.map +1 -1
- package/dist/cjs/src/hooks/use-create-editor.js +1 -9
- package/dist/cjs/src/hooks/use-create-editor.js.map +1 -1
- package/dist/cjs/src/hooks/use-requirements-validation.js +87 -0
- package/dist/cjs/src/hooks/use-requirements-validation.js.map +1 -0
- package/dist/cjs/src/hooks/use-tracked-model-management.js +4 -6
- package/dist/cjs/src/hooks/use-tracked-model-management.js.map +1 -1
- package/dist/cjs/src/lib/apollo.js +41 -0
- package/dist/cjs/src/lib/apollo.js.map +1 -0
- package/dist/cjs/src/lib/lean-workflow-gql.js +40 -0
- package/dist/cjs/src/lib/lean-workflow-gql.js.map +1 -0
- package/dist/cjs/src/lib/replace-attachments-ids.js +49 -0
- package/dist/cjs/src/lib/replace-attachments-ids.js.map +1 -0
- package/dist/cjs/src/postgres-data/buildUtilities.js +0 -10
- package/dist/cjs/src/postgres-data/buildUtilities.js.map +1 -1
- package/dist/cjs/src/quarterback/usePouchStore.js +1 -1
- package/dist/cjs/src/quarterback/usePouchStore.js.map +1 -1
- package/dist/cjs/src/store/Store.js.map +1 -1
- package/dist/cjs/src/store/index.js +0 -1
- package/dist/cjs/src/store/index.js.map +1 -1
- package/dist/cjs/stories/Citation.stories.js +43 -0
- package/dist/cjs/stories/Citation.stories.js.map +1 -0
- package/dist/cjs/stories/LibrarySidebar.stories.js +188 -0
- package/dist/cjs/stories/LibrarySidebar.stories.js.map +1 -0
- package/dist/cjs/stories/Metadata.stories.js +53 -0
- package/dist/cjs/stories/Metadata.stories.js.map +1 -0
- package/dist/cjs/stories/Notification.stories.js +62 -0
- package/dist/cjs/stories/Notification.stories.js.map +1 -0
- package/dist/cjs/stories/Page.stories.js +50 -0
- package/dist/cjs/stories/Page.stories.js.map +1 -0
- package/dist/cjs/stories/Panel.stories.js +62 -0
- package/dist/cjs/stories/Panel.stories.js.map +1 -0
- package/dist/cjs/stories/Placeholders.stories.js +23 -0
- package/dist/cjs/stories/Placeholders.stories.js.map +1 -0
- package/dist/cjs/stories/PopperButtons.stories.js +27 -0
- package/dist/cjs/stories/PopperButtons.stories.js.map +1 -0
- package/dist/cjs/stories/Progress.stories.js +25 -0
- package/dist/cjs/stories/Progress.stories.js.map +1 -0
- package/dist/cjs/stories/ProgressIndicator.stories.js +33 -0
- package/dist/cjs/stories/ProgressIndicator.stories.js.map +1 -0
- package/dist/cjs/stories/ReloadDialog.stories.js +21 -0
- package/dist/cjs/stories/ReloadDialog.stories.js.map +1 -0
- package/dist/cjs/stories/RequirementsInspector.stories.js +159 -0
- package/dist/cjs/stories/RequirementsInspector.stories.js.map +1 -0
- package/dist/cjs/stories/RequirmentsList.stories.js +36 -0
- package/dist/cjs/stories/RequirmentsList.stories.js.map +1 -0
- package/dist/cjs/stories/SelectField.stories.js +34 -0
- package/dist/cjs/stories/SelectField.stories.js.map +1 -0
- package/dist/cjs/stories/Support.stories.js +32 -0
- package/dist/cjs/stories/Support.stories.js.map +1 -0
- package/dist/cjs/stories/data/doc.js +27 -0
- package/dist/cjs/stories/data/doc.js.map +1 -0
- package/dist/cjs/stories/data/validationData.js +44 -0
- package/dist/cjs/stories/data/validationData.js.map +1 -0
- package/dist/es/src/components/Support.js +100 -0
- package/dist/es/src/components/Support.js.map +1 -0
- package/dist/es/src/components/inspector/ElementStyleInspector.js +13 -0
- package/dist/es/src/components/inspector/ElementStyleInspector.js.map +1 -0
- package/dist/es/src/components/inspector/StatisticsInspector.js +32 -0
- package/dist/es/src/components/inspector/StatisticsInspector.js.map +1 -0
- package/dist/es/src/components/library/CitationModel.js +180 -0
- package/dist/es/src/components/library/CitationModel.js.map +1 -0
- package/dist/es/src/components/library/CitationProperties.js +60 -0
- package/dist/es/src/components/library/CitationProperties.js.map +1 -0
- package/dist/es/src/components/library/ExternalSearch.js +127 -0
- package/dist/es/src/components/library/ExternalSearch.js.map +1 -0
- package/dist/es/src/components/library/GlobalLibrary.js +104 -0
- package/dist/es/src/components/library/GlobalLibrary.js.map +1 -0
- package/dist/es/src/components/library/LibraryCollectionCategories.js +45 -0
- package/dist/es/src/components/library/LibraryCollectionCategories.js.map +1 -0
- package/dist/es/src/components/library/LibraryForm.js +409 -0
- package/dist/es/src/components/library/LibraryForm.js.map +1 -0
- package/dist/es/src/components/library/LibraryItems.js +86 -0
- package/dist/es/src/components/library/LibraryItems.js.map +1 -0
- package/dist/es/src/components/library/LibraryPageContainer.js +80 -0
- package/dist/es/src/components/library/LibraryPageContainer.js.map +1 -0
- package/dist/es/src/components/library/LibrarySidebar.js +165 -0
- package/dist/es/src/components/library/LibrarySidebar.js.map +1 -0
- package/dist/es/src/components/library/Messages.js +18 -0
- package/dist/es/src/components/library/Messages.js.map +1 -0
- package/dist/es/src/components/library/ProjectLibrary.js +67 -0
- package/dist/es/src/components/library/ProjectLibrary.js.map +1 -0
- package/dist/es/src/components/metadata/HeaderFigure.js +117 -0
- package/dist/es/src/components/metadata/HeaderFigure.js.map +1 -0
- 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/TitleFieldContainer.js +49 -0
- package/dist/es/src/components/metadata/TitleFieldContainer.js.map +1 -0
- package/dist/es/src/components/projects/CategorisedKeywordsInput.js +409 -0
- package/dist/es/src/components/projects/CategorisedKeywordsInput.js.map +1 -0
- package/dist/es/src/components/projects/KeywordsInput.js +73 -0
- package/dist/es/src/components/projects/KeywordsInput.js.map +1 -0
- package/dist/es/src/components/projects/ManuscriptPageContainer.js +1 -2
- package/dist/es/src/components/projects/ManuscriptPageContainer.js.map +1 -1
- package/dist/es/src/components/projects/ManuscriptSidebar.js +5 -39
- package/dist/es/src/components/projects/ManuscriptSidebar.js.map +1 -1
- package/dist/es/src/components/projects/lean-workflow/ApplicationMenusLW.js +72 -0
- package/dist/es/src/components/projects/lean-workflow/ApplicationMenusLW.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/CommentList.js +259 -0
- package/dist/es/src/components/projects/lean-workflow/CommentList.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/CommentsTab.js +34 -0
- package/dist/es/src/components/projects/lean-workflow/CommentsTab.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/ContentTab.js +59 -0
- package/dist/es/src/components/projects/lean-workflow/ContentTab.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/EditorElement.js +227 -0
- package/dist/es/src/components/projects/lean-workflow/EditorElement.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/ExceptionDialog.js +120 -0
- package/dist/es/src/components/projects/lean-workflow/ExceptionDialog.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/ManuscriptPageContainerLW.js +159 -0
- package/dist/es/src/components/projects/lean-workflow/ManuscriptPageContainerLW.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/SaveStatusController.js +23 -0
- package/dist/es/src/components/projects/lean-workflow/SaveStatusController.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/TrackChangesStyles.js +99 -0
- package/dist/es/src/components/projects/lean-workflow/TrackChangesStyles.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/icons/DeleteIcon.js +20 -0
- package/dist/es/src/components/projects/lean-workflow/icons/DeleteIcon.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/icons/GroupIcon.js +22 -0
- package/dist/es/src/components/projects/lean-workflow/icons/GroupIcon.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/icons/LinkIcon.js +16 -0
- package/dist/es/src/components/projects/lean-workflow/icons/LinkIcon.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/icons/TemplateIcon.js +16 -0
- package/dist/es/src/components/projects/lean-workflow/icons/TemplateIcon.js.map +1 -0
- package/dist/es/src/components/projects/lean-workflow/provider/UserProvider.js +11 -0
- package/dist/es/src/components/projects/lean-workflow/provider/UserProvider.js.map +1 -0
- package/dist/es/src/components/requirements/RequirementContainer.js +51 -0
- package/dist/es/src/components/requirements/RequirementContainer.js.map +1 -0
- package/dist/es/src/components/requirements/RequirementsData.js +99 -0
- package/dist/es/src/components/requirements/RequirementsData.js.map +1 -0
- package/dist/es/src/components/requirements/RequirementsIcons.js +24 -0
- package/dist/es/src/components/requirements/RequirementsIcons.js.map +1 -0
- package/dist/es/src/components/requirements/RequirementsInspector.js +118 -0
- package/dist/es/src/components/requirements/RequirementsInspector.js.map +1 -0
- package/dist/es/src/components/requirements/RequirementsList.js +54 -0
- package/dist/es/src/components/requirements/RequirementsList.js.map +1 -0
- package/dist/es/src/components/requirements/SectionValidations.js +40 -0
- package/dist/es/src/components/requirements/SectionValidations.js.map +1 -0
- package/dist/es/src/components/track-changes/utils.js +0 -83
- package/dist/es/src/components/track-changes/utils.js.map +1 -1
- package/dist/es/src/hooks/use-create-editor.js +1 -9
- package/dist/es/src/hooks/use-create-editor.js.map +1 -1
- package/dist/es/src/hooks/use-requirements-validation.js +83 -0
- package/dist/es/src/hooks/use-requirements-validation.js.map +1 -0
- package/dist/es/src/hooks/use-tracked-model-management.js +6 -8
- package/dist/es/src/hooks/use-tracked-model-management.js.map +1 -1
- package/dist/es/src/lib/apollo.js +35 -0
- package/dist/es/src/lib/apollo.js.map +1 -0
- package/dist/es/src/lib/lean-workflow-gql.js +33 -0
- package/dist/es/src/lib/lean-workflow-gql.js.map +1 -0
- package/dist/es/src/lib/replace-attachments-ids.js +44 -0
- package/dist/es/src/lib/replace-attachments-ids.js.map +1 -0
- package/dist/es/src/postgres-data/buildUtilities.js +0 -10
- package/dist/es/src/postgres-data/buildUtilities.js.map +1 -1
- package/dist/es/src/quarterback/usePouchStore.js +1 -1
- package/dist/es/src/quarterback/usePouchStore.js.map +1 -1
- package/dist/es/src/store/Store.js.map +1 -1
- package/dist/es/src/store/index.js +0 -1
- package/dist/es/src/store/index.js.map +1 -1
- package/dist/es/stories/Citation.stories.js +38 -0
- package/dist/es/stories/Citation.stories.js.map +1 -0
- package/dist/es/stories/LibrarySidebar.stories.js +183 -0
- package/dist/es/stories/LibrarySidebar.stories.js.map +1 -0
- package/dist/es/stories/Metadata.stories.js +48 -0
- package/dist/es/stories/Metadata.stories.js.map +1 -0
- package/dist/es/stories/Notification.stories.js +57 -0
- package/dist/es/stories/Notification.stories.js.map +1 -0
- package/dist/es/stories/Page.stories.js +45 -0
- package/dist/es/stories/Page.stories.js.map +1 -0
- package/dist/es/stories/Panel.stories.js +57 -0
- package/dist/es/stories/Panel.stories.js.map +1 -0
- package/dist/es/stories/Placeholders.stories.js +18 -0
- package/dist/es/stories/Placeholders.stories.js.map +1 -0
- package/dist/es/stories/PopperButtons.stories.js +22 -0
- package/dist/es/stories/PopperButtons.stories.js.map +1 -0
- package/dist/es/stories/Progress.stories.js +20 -0
- package/dist/es/stories/Progress.stories.js.map +1 -0
- package/dist/es/stories/ProgressIndicator.stories.js +28 -0
- package/dist/es/stories/ProgressIndicator.stories.js.map +1 -0
- package/dist/es/stories/ReloadDialog.stories.js +16 -0
- package/dist/es/stories/ReloadDialog.stories.js.map +1 -0
- package/dist/es/stories/RequirementsInspector.stories.js +154 -0
- package/dist/es/stories/RequirementsInspector.stories.js.map +1 -0
- package/dist/es/stories/RequirmentsList.stories.js +31 -0
- package/dist/es/stories/RequirmentsList.stories.js.map +1 -0
- package/dist/es/stories/SelectField.stories.js +29 -0
- package/dist/es/stories/SelectField.stories.js.map +1 -0
- package/dist/es/stories/Support.stories.js +27 -0
- package/dist/es/stories/Support.stories.js.map +1 -0
- package/dist/es/stories/data/doc.js +21 -0
- package/dist/es/stories/data/doc.js.map +1 -0
- package/dist/es/stories/data/validationData.js +41 -0
- package/dist/es/stories/data/validationData.js.map +1 -0
- package/dist/types/src/components/Support.d.ts +13 -0
- package/dist/types/src/components/inspector/ElementStyleInspector.d.ts +13 -0
- package/dist/types/src/components/inspector/StatisticsInspector.d.ts +17 -0
- package/dist/types/src/components/library/CitationModel.d.ts +18 -0
- package/dist/types/src/components/library/CitationProperties.d.ts +17 -0
- package/dist/types/src/components/library/ExternalSearch.d.ts +19 -0
- package/dist/types/src/components/library/GlobalLibrary.d.ts +20 -0
- package/dist/types/src/components/library/LibraryCollectionCategories.d.ts +15 -0
- package/dist/types/src/components/library/LibraryForm.d.ts +20 -0
- package/dist/types/src/components/library/LibraryItems.d.ts +12 -0
- package/dist/types/src/components/library/LibraryPageContainer.d.ts +14 -0
- package/dist/types/src/components/library/LibrarySidebar.d.ts +21 -0
- package/dist/types/src/components/library/Messages.d.ts +15 -0
- package/dist/types/src/components/library/ProjectLibrary.d.ts +23 -0
- package/dist/types/src/components/metadata/HeaderFigure.d.ts +13 -0
- package/dist/types/src/components/metadata/Metadata.d.ts +60 -0
- package/dist/types/src/components/metadata/MetadataContainer.d.ts +21 -0
- package/dist/types/src/components/metadata/TitleFieldContainer.d.ts +19 -0
- package/dist/types/src/components/projects/CategorisedKeywordsInput.d.ts +6 -0
- package/dist/types/src/components/projects/KeywordsInput.d.ts +17 -0
- package/dist/types/src/components/projects/ManuscriptSidebar.d.ts +4 -9
- package/dist/types/src/components/projects/lean-workflow/ApplicationMenusLW.d.ts +20 -0
- package/dist/types/src/components/projects/lean-workflow/CommentList.d.ts +18 -0
- package/dist/types/src/components/projects/lean-workflow/CommentsTab.d.ts +7 -0
- package/dist/types/src/components/projects/lean-workflow/ContentTab.d.ts +6 -0
- package/dist/types/src/components/projects/lean-workflow/EditorElement.d.ts +18 -0
- package/dist/types/src/components/projects/lean-workflow/ExceptionDialog.d.ts +4 -0
- package/dist/types/src/components/projects/lean-workflow/ManuscriptPageContainerLW.d.ts +18 -0
- package/dist/types/src/components/projects/lean-workflow/SaveStatusController.d.ts +17 -0
- package/dist/types/src/components/projects/lean-workflow/TrackChangesStyles.d.ts +13 -0
- package/dist/types/src/components/projects/lean-workflow/icons/DeleteIcon.d.ts +13 -0
- package/dist/types/src/components/projects/lean-workflow/icons/GroupIcon.d.ts +15 -0
- package/dist/types/src/components/projects/lean-workflow/icons/LinkIcon.d.ts +13 -0
- package/dist/types/src/components/projects/lean-workflow/icons/TemplateIcon.d.ts +13 -0
- package/dist/types/src/components/projects/lean-workflow/provider/UserProvider.d.ts +22 -0
- package/dist/types/src/components/requirements/RequirementContainer.d.ts +19 -0
- package/dist/types/src/components/requirements/RequirementsData.d.ts +21 -0
- package/dist/types/src/components/requirements/RequirementsIcons.d.ts +16 -0
- package/dist/types/src/components/requirements/RequirementsInspector.d.ts +23 -0
- package/dist/types/src/components/requirements/RequirementsList.d.ts +16 -0
- package/dist/types/src/components/requirements/SectionValidations.d.ts +21 -0
- package/dist/types/src/components/track-changes/utils.d.ts +11 -2
- package/dist/types/src/hooks/use-requirements-validation.d.ts +22 -0
- package/dist/types/src/lib/apollo.d.ts +13 -0
- package/dist/types/src/lib/lean-workflow-gql.d.ts +66 -0
- package/dist/types/src/lib/replace-attachments-ids.d.ts +15 -0
- package/dist/types/src/postgres-data/buildUtilities.d.ts +0 -8
- package/dist/types/src/store/Store.d.ts +0 -2
- package/dist/types/src/store/index.d.ts +0 -1
- package/dist/types/stories/Citation.stories.d.ts +12 -0
- package/dist/types/stories/LibrarySidebar.stories.d.ts +12 -0
- package/dist/types/stories/Metadata.stories.d.ts +12 -0
- package/dist/types/stories/Notification.stories.d.ts +12 -0
- package/dist/types/stories/Page.stories.d.ts +12 -0
- package/dist/types/stories/Panel.stories.d.ts +12 -0
- package/dist/types/stories/Placeholders.stories.d.ts +12 -0
- package/dist/types/stories/PopperButtons.stories.d.ts +12 -0
- package/dist/types/stories/Progress.stories.d.ts +12 -0
- package/dist/types/stories/ProgressIndicator.stories.d.ts +12 -0
- package/dist/types/stories/ReloadDialog.stories.d.ts +12 -0
- package/dist/types/stories/RequirementsInspector.stories.d.ts +12 -0
- package/dist/types/stories/RequirmentsList.stories.d.ts +12 -0
- package/dist/types/stories/SelectField.stories.d.ts +12 -0
- package/dist/types/stories/Support.stories.d.ts +12 -0
- package/dist/types/stories/data/doc.d.ts +14 -0
- package/dist/types/stories/data/validationData.d.ts +13 -0
- package/package.json +6 -16
|
@@ -0,0 +1,36 @@
|
|
|
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 react_1 = require("@storybook/react");
|
|
18
|
+
const react_2 = __importDefault(require("react"));
|
|
19
|
+
const RequirementsList_1 = require("../src/components/requirements/RequirementsList");
|
|
20
|
+
const store_1 = require("../src/store");
|
|
21
|
+
const doc_1 = require("./data/doc");
|
|
22
|
+
const validationData_1 = require("./data/validationData");
|
|
23
|
+
const bulkUpdate = async (items) => {
|
|
24
|
+
return await new Promise((resolve, reject) => {
|
|
25
|
+
resolve();
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const state = {
|
|
29
|
+
bulkUpdate,
|
|
30
|
+
manuscriptID: doc_1.manuscriptID,
|
|
31
|
+
modelMap: doc_1.modelMap,
|
|
32
|
+
};
|
|
33
|
+
const store = new store_1.GenericStore(undefined, undefined, state);
|
|
34
|
+
(0, react_1.storiesOf)('Requirments/List', module).add('validations', () => (react_2.default.createElement(store_1.GenericStoreProvider, { store: store },
|
|
35
|
+
react_2.default.createElement(RequirementsList_1.RequirementsList, { validationResult: validationData_1.validationData }))));
|
|
36
|
+
//# sourceMappingURL=RequirmentsList.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequirmentsList.stories.js","sourceRoot":"","sources":["../../../stories/RequirmentsList.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAIH,4CAA4C;AAC5C,kDAAyB;AAEzB,sFAAkF;AAClF,wCAAiE;AACjE,oCAAmD;AACnD,0DAAsD;AAEtD,MAAM,UAAU,GAAG,KAAK,EAAE,KAA4B,EAAiB,EAAE;IACvE,OAAO,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACjD,OAAO,EAAE,CAAA;IACX,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,KAAK,GAAG;IACZ,UAAU;IACV,YAAY,EAAZ,kBAAY;IACZ,QAAQ,EAAR,cAAQ;CACT,CAAA;AAED,MAAM,KAAK,GAAG,IAAI,oBAAY,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;AAE3D,IAAA,iBAAS,EAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,CAC7D,8BAAC,4BAAoB,IAAC,KAAK,EAAE,KAAK;IAChC,8BAAC,mCAAgB,IACf,gBAAgB,EAAE,+BAAuC,GACzD,CACmB,CACxB,CAAC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 addon_actions_1 = require("@storybook/addon-actions");
|
|
19
|
+
const react_1 = require("@storybook/react");
|
|
20
|
+
const formik_1 = require("formik");
|
|
21
|
+
const react_2 = __importDefault(require("react"));
|
|
22
|
+
const SelectField_1 = require("../src/components/SelectField");
|
|
23
|
+
const options = [
|
|
24
|
+
{ value: 'en', label: 'English' },
|
|
25
|
+
{ value: 'fr', label: 'French' },
|
|
26
|
+
];
|
|
27
|
+
(0, react_1.storiesOf)('SelectField', module).add('manual submit', () => (react_2.default.createElement(formik_1.Formik, { initialValues: {
|
|
28
|
+
locale: 'en',
|
|
29
|
+
}, onSubmit: (0, addon_actions_1.action)('submit') },
|
|
30
|
+
react_2.default.createElement(formik_1.Form, null,
|
|
31
|
+
react_2.default.createElement(formik_1.Field, { name: 'locale', component: SelectField_1.SelectField, options: options }),
|
|
32
|
+
react_2.default.createElement("div", { style: { marginTop: 20 } },
|
|
33
|
+
react_2.default.createElement(style_guide_1.PrimaryButton, { type: "submit" }, "Save"))))));
|
|
34
|
+
//# sourceMappingURL=SelectField.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectField.stories.js","sourceRoot":"","sources":["../../../stories/SelectField.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAEH,0DAAwD;AACxD,4DAAiD;AACjD,4CAA4C;AAC5C,mCAA4C;AAC5C,kDAAyB;AAEzB,+DAA2D;AAE3D,MAAM,OAAO,GAAG;IACd,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;CACjC,CAAA;AAED,IAAA,iBAAS,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,CAC1D,8BAAC,eAAM,IACL,aAAa,EAAE;QACb,MAAM,EAAE,IAAI;KACb,EACD,QAAQ,EAAE,IAAA,sBAAM,EAAC,QAAQ,CAAC;IAE1B,8BAAC,aAAI;QACH,8BAAC,cAAK,IAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,yBAAW,EAAE,OAAO,EAAE,OAAO,GAAI;QACnE,uCAAK,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC3B,8BAAC,2BAAa,IAAC,IAAI,EAAC,QAAQ,WAAqB,CAC7C,CACD,CACA,CACV,CAAC,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 react_1 = require("@storybook/react");
|
|
18
|
+
const react_2 = __importDefault(require("react"));
|
|
19
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
20
|
+
const Support_1 = require("../src/components/Support");
|
|
21
|
+
const Container = styled_components_1.default.div `
|
|
22
|
+
height: 300px;
|
|
23
|
+
width: 300px;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
`;
|
|
29
|
+
(0, react_1.storiesOf)('Support', module).add('Menu', () => (react_2.default.createElement(Container, null,
|
|
30
|
+
react_2.default.createElement(Support_1.Support, null),
|
|
31
|
+
react_2.default.createElement(Support_1.Support, null))));
|
|
32
|
+
//# sourceMappingURL=Support.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Support.stories.js","sourceRoot":"","sources":["../../../stories/Support.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAEH,4CAA4C;AAC5C,kDAAyB;AACzB,0EAAsC;AAEtC,uDAAmD;AAEnD,MAAM,SAAS,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;CAO3B,CAAA;AAED,IAAA,iBAAS,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAC7C,8BAAC,SAAS;IACR,8BAAC,iBAAO,OAAG;IACX,8BAAC,iBAAO,OAAG,CACD,CACb,CAAC,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.doc = exports.manuscriptID = exports.modelMap = void 0;
|
|
18
|
+
const project_dump_2_json_1 = __importDefault(require("@manuscripts/examples/data/project-dump-2.json"));
|
|
19
|
+
const transform_1 = require("@manuscripts/transform");
|
|
20
|
+
exports.modelMap = new Map();
|
|
21
|
+
project_dump_2_json_1.default.data.forEach((model) => {
|
|
22
|
+
exports.modelMap.set(model._id, model);
|
|
23
|
+
});
|
|
24
|
+
const decoder = new transform_1.Decoder(exports.modelMap);
|
|
25
|
+
exports.manuscriptID = 'MPManuscript:561C1FB2-3A94-4460-AB75-426F80BC7071';
|
|
26
|
+
exports.doc = decoder.createArticleNode(exports.manuscriptID);
|
|
27
|
+
//# sourceMappingURL=doc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.js","sourceRoot":"","sources":["../../../../stories/data/doc.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,yGAAwE;AAExE,sDAAgD;AAEnC,QAAA,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAA;AAEjC,6BAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAY,EAAE,EAAE;IACxC,gBAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;AAChC,CAAC,CAAC,CAAA;AAEF,MAAM,OAAO,GAAG,IAAI,mBAAO,CAAC,gBAAQ,CAAC,CAAA;AAExB,QAAA,YAAY,GAAG,mDAAmD,CAAA;AAElE,QAAA,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,oBAAY,CAAC,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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) 2020 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.validationData = void 0;
|
|
15
|
+
exports.validationData = [
|
|
16
|
+
{
|
|
17
|
+
type: 'section-order',
|
|
18
|
+
severity: 0,
|
|
19
|
+
passed: true,
|
|
20
|
+
data: {
|
|
21
|
+
order: [],
|
|
22
|
+
},
|
|
23
|
+
fixable: true,
|
|
24
|
+
objectType: 'MPSectionOrderValidationResult',
|
|
25
|
+
_id: 'MPSectionOrderValidationResult:FCD54873-BAD0-488E-96C8-D1ECA23DD1F4',
|
|
26
|
+
message: 'Sections must be listed in the following order Abstract',
|
|
27
|
+
ignored: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: 'section-body-has-content',
|
|
31
|
+
passed: false,
|
|
32
|
+
severity: 0,
|
|
33
|
+
data: {
|
|
34
|
+
id: 'MPSection:6383A9BC-CB0E-4B0E-BB3A-31E0B5143256',
|
|
35
|
+
sectionCategory: 'MPSectionCategory:abstract',
|
|
36
|
+
},
|
|
37
|
+
fixable: true,
|
|
38
|
+
objectType: 'MPSectionBodyValidationResult',
|
|
39
|
+
_id: 'MPSectionBodyValidationResult:2C772412-BA8C-46A4-B0D6-DFDC8BCB793A',
|
|
40
|
+
message: 'Abstract section must contains content',
|
|
41
|
+
ignored: false,
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
//# sourceMappingURL=validationData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validationData.js","sourceRoot":"","sources":["../../../../stories/data/validationData.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAIU,QAAA,cAAc,GAA0B;IACnD;QACE,IAAI,EAAE,eAAe;QACrB,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE;YACJ,KAAK,EAAE,EAAE;SACV;QACD,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,gCAAgC;QAC5C,GAAG,EAAE,qEAAqE;QAC1E,OAAO,EAAE,yDAAyD;QAClE,OAAO,EAAE,KAAK;KACf;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,CAAC;QACX,IAAI,EAAE;YACJ,EAAE,EAAE,gDAAgD;YACpD,eAAe,EAAE,4BAA4B;SAC9C;QACD,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,+BAA+B;QAC3C,GAAG,EAAE,oEAAoE;QACzE,OAAO,EAAE,wCAAwC;QACjD,OAAO,EAAE,KAAK;KACf;CACF,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import DocumentationIcon from '@manuscripts/assets/react/Documentation';
|
|
13
|
+
import SupportIcon from '@manuscripts/assets/react/Support';
|
|
14
|
+
import { IconButton } from '@manuscripts/style-guide';
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { Manager, Popper, Reference } from 'react-popper';
|
|
17
|
+
import styled, { css } from 'styled-components';
|
|
18
|
+
import { useDropdown } from '../hooks/use-dropdown';
|
|
19
|
+
import { Popup } from './nav/Updates';
|
|
20
|
+
const Button = styled(IconButton).attrs(() => ({
|
|
21
|
+
size: 56,
|
|
22
|
+
})) `
|
|
23
|
+
color: ${(props) => props.theme.colors.text.secondary};
|
|
24
|
+
padding: ${(props) => props.theme.grid.unit * 2}px;
|
|
25
|
+
`;
|
|
26
|
+
const StyledSupportIcon = styled(SupportIcon) `
|
|
27
|
+
g {
|
|
28
|
+
stroke: currentColor;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
g {
|
|
33
|
+
stroke: #7fb5d5;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
const linkStyle = css `
|
|
38
|
+
display: flex;
|
|
39
|
+
padding: ${(props) => props.theme.grid.unit * 2}px
|
|
40
|
+
${(props) => props.theme.grid.unit * 4}px;
|
|
41
|
+
align-items: center;
|
|
42
|
+
font-size: ${(props) => props.theme.font.size.normal};
|
|
43
|
+
color: ${(props) => props.theme.colors.text.primary};
|
|
44
|
+
text-decoration: none;
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
background: ${(props) => props.theme.colors.background.fifth};
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
const ExternalMenuLink = styled.a.attrs({
|
|
51
|
+
target: '_blank',
|
|
52
|
+
rel: 'noopener noreferer',
|
|
53
|
+
}) `
|
|
54
|
+
${linkStyle}
|
|
55
|
+
`;
|
|
56
|
+
const MenuText = styled.div `
|
|
57
|
+
margin-left: ${(props) => props.theme.grid.unit * 2}px;
|
|
58
|
+
`;
|
|
59
|
+
const Menu = styled.div `
|
|
60
|
+
padding: ${(props) => props.theme.grid.unit * 2}px 0;
|
|
61
|
+
`;
|
|
62
|
+
const arrowTopBorderStyle = css `
|
|
63
|
+
bottom: -${(props) => props.theme.grid.unit * 2}px;
|
|
64
|
+
border-top: ${(props) => props.theme.grid.unit * 2}px solid
|
|
65
|
+
${(props) => props.theme.colors.border.secondary};
|
|
66
|
+
`;
|
|
67
|
+
const arrowBottomBorderStyle = css `
|
|
68
|
+
top: -${(props) => props.theme.grid.unit * 2}px;
|
|
69
|
+
border-bottom: ${(props) => props.theme.grid.unit * 2}px solid
|
|
70
|
+
${(props) => props.theme.colors.border.secondary};
|
|
71
|
+
`;
|
|
72
|
+
const Arrow = styled.div `
|
|
73
|
+
width: 0;
|
|
74
|
+
height: 0;
|
|
75
|
+
border-left: ${(props) => props.theme.grid.unit * 2}px solid transparent;
|
|
76
|
+
border-right: ${(props) => props.theme.grid.unit * 2}px solid transparent;
|
|
77
|
+
${(props) => props['data-placement'] === 'top'
|
|
78
|
+
? arrowTopBorderStyle
|
|
79
|
+
: arrowBottomBorderStyle};
|
|
80
|
+
position: absolute;
|
|
81
|
+
`;
|
|
82
|
+
const Container = styled.div `
|
|
83
|
+
position: relative;
|
|
84
|
+
`;
|
|
85
|
+
export const Support = React.memo(() => {
|
|
86
|
+
const { wrapperRef, toggleOpen, isOpen } = useDropdown();
|
|
87
|
+
return (React.createElement(Manager, null,
|
|
88
|
+
React.createElement("div", { ref: wrapperRef },
|
|
89
|
+
React.createElement(Reference, null, ({ ref }) => (React.createElement(Button, { ref: ref, onClick: toggleOpen },
|
|
90
|
+
React.createElement(StyledSupportIcon, { width: 32, height: 32 })))),
|
|
91
|
+
isOpen && (React.createElement(Popper, { placement: 'top' }, ({ ref, style, placement, arrowProps }) => (React.createElement("div", { ref: ref, style: { ...style, zIndex: 3 }, "data-placement": placement },
|
|
92
|
+
React.createElement(Container, null,
|
|
93
|
+
React.createElement(Popup, null,
|
|
94
|
+
React.createElement(Menu, null,
|
|
95
|
+
React.createElement(ExternalMenuLink, { href: 'https://support.manuscripts.io/' },
|
|
96
|
+
React.createElement(DocumentationIcon, null),
|
|
97
|
+
React.createElement(MenuText, null, "Documentation")))),
|
|
98
|
+
React.createElement(Arrow, { ...arrowProps, "data-placement": placement })))))))));
|
|
99
|
+
});
|
|
100
|
+
//# sourceMappingURL=Support.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Support.js","sourceRoot":"","sources":["../../../../src/components/Support.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,iBAAiB,MAAM,yCAAyC,CAAA;AACvE,OAAO,WAAW,MAAM,mCAAmC,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7C,IAAI,EAAE,EAAE;CACT,CAAC,CAAC,CAAA;WACQ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;aAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CAChD,CAAA;AAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;;;;;;;;;;CAU5C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AE,GAAI,CACrC,CACV,CACS;YAEX,MAAM,IAAI,CACT,oBAAC,MAAM,IAAC,SAAS,EAAE,KAAK,IACrB,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAC1C,6BACE,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,oBACd,SAAS;gBAEzB,oBAAC,SAAS;oBACR,oBAAC,KAAK;wBACJ,oBAAC,IAAI;4BACH,oBAAC,gBAAgB,IACf,IAAI,EAAE,iCAAiC;gCAEvC,oBAAC,iBAAiB,OAAG;gCACrB,oBAAC,QAAQ,wBAAyB,CACjB,CACd,CACD;oBAER,oBAAC,KAAK,OAAK,UAAU,oBAAkB,SAAS,GAAI,CAC1C,CACR,CACP,CACM,CACV,CACG,CACE,CACX,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ElementStyleInspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ElementStyleInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/ElementStyleInspector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { Statistics } from '@manuscripts/body-editor';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import styled from 'styled-components';
|
|
15
|
+
import { InspectorSection, Subheading } from '../InspectorSection';
|
|
16
|
+
const InspectorSubsection = styled.div `
|
|
17
|
+
margin-left: ${(props) => props.theme.grid.unit * 2}px;
|
|
18
|
+
|
|
19
|
+
:not(:first-child) {
|
|
20
|
+
margin-top: ${(props) => props.theme.grid.unit * 4}px;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export const StatisticsInspector = ({ manuscript, section }) => {
|
|
24
|
+
return (React.createElement(InspectorSection, { title: 'Statistics' },
|
|
25
|
+
React.createElement(InspectorSubsection, null,
|
|
26
|
+
React.createElement(Subheading, null, "Manuscript"),
|
|
27
|
+
React.createElement(Statistics, { node: manuscript })),
|
|
28
|
+
section && (React.createElement(InspectorSubsection, null,
|
|
29
|
+
React.createElement(Subheading, null, "Section"),
|
|
30
|
+
React.createElement(Statistics, { node: section })))));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=StatisticsInspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatisticsInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/StatisticsInspector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAElE,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;iBACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;kBAGnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;CAErD,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAG3B,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/B,OAAO,CACL,oBAAC,gBAAgB,IAAC,KAAK,EAAE,YAAY;QACnC,oBAAC,mBAAmB;YAClB,oBAAC,UAAU,qBAAwB;YAEnC,oBAAC,UAAU,IAAC,IAAI,EAAE,UAAU,GAAI,CACZ;QAErB,OAAO,IAAI,CACV,oBAAC,mBAAmB;YAClB,oBAAC,UAAU,kBAAqB;YAEhC,oBAAC,UAAU,IAAC,IAAI,EAAE,OAAO,GAAI,CACT,CACvB,CACgB,CACpB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2022 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import ReferenceLibraryIcon from '@manuscripts/assets/react/ReferenceLibraryIcon';
|
|
13
|
+
import { ObjectTypes, } from '@manuscripts/json-schema';
|
|
14
|
+
import { shortLibraryItemMetadata } from '@manuscripts/library';
|
|
15
|
+
import { Category, CloseButton, Dialog, ModalContainer, ModalHeader, StyledModal, } from '@manuscripts/style-guide';
|
|
16
|
+
import { getModelsByType } from '@manuscripts/transform';
|
|
17
|
+
import { isEqual } from 'lodash-es';
|
|
18
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
19
|
+
import ReactTooltip from 'react-tooltip';
|
|
20
|
+
import styled, { css } from 'styled-components';
|
|
21
|
+
import { ScrollableModalMain } from '../metadata/AuthorsModals';
|
|
22
|
+
import { GroupIcon } from '../projects/icons/GroupIcon';
|
|
23
|
+
import { ModalBody, ModalSidebar, SidebarContent, SidebarHeader, } from '../Sidebar';
|
|
24
|
+
import { CitedItemMetadata, CitedItemTitle } from './CitationEditor';
|
|
25
|
+
import ReferenceForm, { buildInitialValues, } from './ReferenceForm';
|
|
26
|
+
export const CitationModel = ({ editCitation, modelMap, saveCallback, selectedItem, setSelectedItem, setShowEditModel, deleteCallback, getReferences, }) => {
|
|
27
|
+
const stopEditing = useCallback(() => setShowEditModel(false), [setShowEditModel]);
|
|
28
|
+
const formMikRef = useRef(null);
|
|
29
|
+
const [{ referenceCount, references }, setReferences] = useState({
|
|
30
|
+
referenceCount: new Map(),
|
|
31
|
+
references: [],
|
|
32
|
+
});
|
|
33
|
+
const [showPendingChangeDialog, setShowPendingChangeDialog] = useState(false);
|
|
34
|
+
const onSelectReference = useCallback((e) => {
|
|
35
|
+
const other = formMikRef.current?.values;
|
|
36
|
+
if (!selectedItem || isEqual(buildInitialValues(selectedItem), other)) {
|
|
37
|
+
setSelectedItem(references.find(({ _id }) => _id === e.currentTarget.id));
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
setShowPendingChangeDialog(true);
|
|
41
|
+
}
|
|
42
|
+
}, [references, selectedItem, setSelectedItem]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (editCitation) {
|
|
45
|
+
getReferences(undefined)
|
|
46
|
+
.then((references) => {
|
|
47
|
+
const referenceCount = new Map();
|
|
48
|
+
getModelsByType(modelMap, ObjectTypes.Citation).map(({ embeddedCitationItems }) => embeddedCitationItems.map(({ bibliographyItem }) => {
|
|
49
|
+
let value = referenceCount.get(bibliographyItem);
|
|
50
|
+
referenceCount.set(bibliographyItem, (value && ++value) || 1);
|
|
51
|
+
}));
|
|
52
|
+
setReferences({ references, referenceCount });
|
|
53
|
+
})
|
|
54
|
+
.catch((e) => console.error(e));
|
|
55
|
+
}
|
|
56
|
+
}, [editCitation, getReferences, modelMap]);
|
|
57
|
+
const modelDeleteCallback = useCallback(() => {
|
|
58
|
+
deleteCallback();
|
|
59
|
+
setReferences({
|
|
60
|
+
referenceCount,
|
|
61
|
+
references: [
|
|
62
|
+
...references.filter(({ _id }) => _id !== selectedItem?._id),
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
}, [deleteCallback, referenceCount, references, selectedItem?._id]);
|
|
66
|
+
const modelSaveCallback = useCallback((item) => {
|
|
67
|
+
saveCallback(item);
|
|
68
|
+
setSelectedItem(item);
|
|
69
|
+
setReferences({
|
|
70
|
+
referenceCount,
|
|
71
|
+
references: [
|
|
72
|
+
...references.map((ref) => (ref._id === item?._id ? item : ref)),
|
|
73
|
+
],
|
|
74
|
+
});
|
|
75
|
+
}, [referenceCount, references, saveCallback, setSelectedItem]);
|
|
76
|
+
const disableDelete = ((selectedItem?._id && referenceCount.get(selectedItem._id)) || 0) > 0;
|
|
77
|
+
if (references.length < 1) {
|
|
78
|
+
return React.createElement(React.Fragment, null);
|
|
79
|
+
}
|
|
80
|
+
return (React.createElement(StyledModal, { isOpen: editCitation, onRequestClose: stopEditing, shouldCloseOnOverlayClick: true },
|
|
81
|
+
React.createElement(Dialog, { isOpen: showPendingChangeDialog, category: Category.confirmation, header: "You've made changes to this option", message: "Would you like to save or discard your changes?", actions: {
|
|
82
|
+
secondary: {
|
|
83
|
+
action: () => {
|
|
84
|
+
formMikRef.current?.resetForm();
|
|
85
|
+
setShowPendingChangeDialog(false);
|
|
86
|
+
},
|
|
87
|
+
title: 'Discard',
|
|
88
|
+
},
|
|
89
|
+
primary: {
|
|
90
|
+
action: () => {
|
|
91
|
+
modelSaveCallback(formMikRef.current?.values);
|
|
92
|
+
setShowPendingChangeDialog(false);
|
|
93
|
+
},
|
|
94
|
+
title: 'Save',
|
|
95
|
+
},
|
|
96
|
+
} }),
|
|
97
|
+
React.createElement(ModalContainer, null,
|
|
98
|
+
React.createElement(ModalHeader, null,
|
|
99
|
+
React.createElement(CloseButton, { onClick: stopEditing })),
|
|
100
|
+
React.createElement(ModalBody, null,
|
|
101
|
+
React.createElement(ReferencesSidebar, null,
|
|
102
|
+
React.createElement(SidebarHeader, { title: 'References' }),
|
|
103
|
+
React.createElement(ReferencesSidebarContent, null, references.map((item, index) => (React.createElement(ReferenceButton, { key: index, id: item._id, onClick: onSelectReference, selected: selectedItem?._id === item._id },
|
|
104
|
+
React.createElement(IconContainer, { "data-tip": true, "data-for": 'group-icon' },
|
|
105
|
+
React.createElement(ReferenceLibraryIcon, null),
|
|
106
|
+
React.createElement(GroupIcon, { numberOfCitations: referenceCount.get(item._id) || 0 }),
|
|
107
|
+
React.createElement(ReactTooltip, { disable: (referenceCount.get(item._id) || 0) < 1, id: 'group-icon', place: "bottom", effect: "solid", offset: { top: 40 }, className: "tooltip" }, "Number of times used in the document")),
|
|
108
|
+
React.createElement(Grid, null,
|
|
109
|
+
React.createElement(CitedItemTitle, { value: item.title || 'Untitled', withOverflow: true }),
|
|
110
|
+
React.createElement(CitedItemMetadata, null, shortLibraryItemMetadata(item)))))))),
|
|
111
|
+
React.createElement(ScrollableModalMain, null, selectedItem && (React.createElement(ReferenceForm, { item: selectedItem, formMikRef: formMikRef, disableDelete: disableDelete, deleteCallback: modelDeleteCallback, handleCancel: stopEditing, saveCallback: modelSaveCallback })))))));
|
|
112
|
+
};
|
|
113
|
+
const ReferencesSidebar = styled(ModalSidebar) `
|
|
114
|
+
width: 70%;
|
|
115
|
+
`;
|
|
116
|
+
const ReferencesSidebarContent = styled(SidebarContent) `
|
|
117
|
+
overflow-y: auto;
|
|
118
|
+
`;
|
|
119
|
+
const Grid = styled.div `
|
|
120
|
+
display: grid;
|
|
121
|
+
`;
|
|
122
|
+
export const Legend = styled.legend `
|
|
123
|
+
font: ${(props) => props.theme.font.weight.normal}
|
|
124
|
+
${(props) => props.theme.font.size.xlarge} /
|
|
125
|
+
${(props) => props.theme.font.lineHeight.large}
|
|
126
|
+
${(props) => props.theme.font.family.sans};
|
|
127
|
+
letter-spacing: -0.4px;
|
|
128
|
+
color: ${(props) => props.theme.colors.text.secondary};
|
|
129
|
+
`;
|
|
130
|
+
export const Fields = styled.div `
|
|
131
|
+
padding: 16px;
|
|
132
|
+
`;
|
|
133
|
+
export const Label = styled.label `
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
margin-bottom: 10px;
|
|
137
|
+
`;
|
|
138
|
+
export const Container = styled.div `
|
|
139
|
+
display: flex;
|
|
140
|
+
justify-content: space-between;
|
|
141
|
+
`;
|
|
142
|
+
export const Fieldset = styled.fieldset `
|
|
143
|
+
border: none;
|
|
144
|
+
|
|
145
|
+
&:not(:last-child) {
|
|
146
|
+
margin-bottom: 16px;
|
|
147
|
+
}
|
|
148
|
+
`;
|
|
149
|
+
const selectedReferenceStyle = css `
|
|
150
|
+
background: ${(props) => props.theme.colors.background.info};
|
|
151
|
+
border-top: 1px solid #bce7f6;
|
|
152
|
+
border-bottom: 1px solid #bce7f6;
|
|
153
|
+
`;
|
|
154
|
+
const ReferenceButton = styled.div `
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
display: flex;
|
|
157
|
+
justify-content: flex-start;
|
|
158
|
+
padding: ${(props) => props.theme.grid.unit * 4}px 0;
|
|
159
|
+
|
|
160
|
+
path {
|
|
161
|
+
fill: #c9c9c9;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:hover {
|
|
165
|
+
background: ${(props) => props.theme.colors.background.info};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
${(props) => props.selected && selectedReferenceStyle}
|
|
169
|
+
|
|
170
|
+
.tooltip {
|
|
171
|
+
max-width: ${(props) => props.theme.grid.unit * 25}px;
|
|
172
|
+
padding: ${(props) => props.theme.grid.unit * 2}px;
|
|
173
|
+
border-radius: 6px;
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
const IconContainer = styled.div `
|
|
177
|
+
padding-right: ${(props) => props.theme.grid.unit * 5}px;
|
|
178
|
+
position: relative;
|
|
179
|
+
`;
|
|
180
|
+
//# sourceMappingURL=CitationModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationModel.js","sourceRoot":"","sources":["../../../../../src/components/library/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KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE;eACvC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;CAGlD,CAAA;AAED,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;mBACb,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;CAEtD,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { TextField } from '@manuscripts/style-guide';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import styled from 'styled-components';
|
|
15
|
+
export const CitationProperties = ({ properties, setProperties }) => {
|
|
16
|
+
return (React.createElement(React.Fragment, null,
|
|
17
|
+
React.createElement(FormGroup, null,
|
|
18
|
+
React.createElement(FormLabel, null, "Show"),
|
|
19
|
+
React.createElement("select", { value: properties.displayScheme || 'show-all', onChange: (event) => setProperties({
|
|
20
|
+
...properties,
|
|
21
|
+
displayScheme: event.target.value,
|
|
22
|
+
}) },
|
|
23
|
+
React.createElement("option", { value: 'show-all' }, "Authors and year"),
|
|
24
|
+
React.createElement("option", { value: 'author-only' }, "Authors only"),
|
|
25
|
+
React.createElement("option", { value: 'suppress-author' }, "No authors"),
|
|
26
|
+
React.createElement("option", { value: 'composite' }, "Composite"))),
|
|
27
|
+
React.createElement(FormGroup, null,
|
|
28
|
+
React.createElement(FormLabel, null, "Prefix"),
|
|
29
|
+
React.createElement(TextField, { type: 'text', value: properties.prefix, onChange: (event) => setProperties({
|
|
30
|
+
...properties,
|
|
31
|
+
prefix: event.target.value,
|
|
32
|
+
}) })),
|
|
33
|
+
React.createElement(FormGroup, null,
|
|
34
|
+
React.createElement(FormLabel, null, "Suffix"),
|
|
35
|
+
React.createElement(TextField, { type: 'text', value: properties.suffix, onChange: (event) => setProperties({
|
|
36
|
+
...properties,
|
|
37
|
+
suffix: event.target.value,
|
|
38
|
+
}) })),
|
|
39
|
+
properties.displayScheme === 'composite' && (React.createElement(FormGroup, null,
|
|
40
|
+
React.createElement(FormLabel, null, "Infix"),
|
|
41
|
+
React.createElement(TextField, { type: 'text', value: properties.infix, onChange: (event) => setProperties({
|
|
42
|
+
...properties,
|
|
43
|
+
infix: event.target.value,
|
|
44
|
+
}) })))));
|
|
45
|
+
};
|
|
46
|
+
const FormGroup = styled.div `
|
|
47
|
+
margin: ${(props) => props.theme.grid.unit * 4}px 0;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
|
|
51
|
+
${TextField} {
|
|
52
|
+
padding: 2px;
|
|
53
|
+
flex: 1;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
const FormLabel = styled.label `
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
width: 50px;
|
|
59
|
+
`;
|
|
60
|
+
//# sourceMappingURL=CitationProperties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationProperties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