@x15ventures/x15-ui-library 3.19.0 → 3.20.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/THIRD_PARTY_LICENSES.md +11182 -0
- package/dist/cjs/autoGenerated/libraryThemes.js +12 -12
- package/dist/cjs/autoGenerated/libraryThemes.js.map +1 -1
- package/dist/cjs/autoGenerated/libraryThemes.json +12 -12
- package/dist/cjs/components/design/banners/pageBanner/PageBanner.js +27 -12
- package/dist/cjs/components/design/banners/pageBanner/PageBanner.js.map +1 -1
- package/dist/cjs/components/design/card/cardHeader/CardHeaderItem.js +22 -15
- package/dist/cjs/components/design/card/cardHeader/CardHeaderItem.js.map +1 -1
- package/dist/cjs/components/design/dialog/dialog.css +4 -0
- package/dist/cjs/components/design/logos/LogoLink.js +2 -1
- package/dist/cjs/components/design/logos/LogoLink.js.map +1 -1
- package/dist/cjs/components/design/logos/VentureLogo.js +2 -1
- package/dist/cjs/components/design/logos/VentureLogo.js.map +1 -1
- package/dist/cjs/components/design/revealMore/RevealMoreBelow.js +2 -2
- package/dist/cjs/components/design/revealMore/RevealMoreBelow.js.map +1 -1
- package/dist/cjs/components/design/skeleton/Skeleton.js +15 -5
- package/dist/cjs/components/design/skeleton/Skeleton.js.map +1 -1
- package/dist/cjs/components/design/themeLoader/ThemeLoader.js +1 -1
- package/dist/cjs/components/design/themeLoader/ThemeLoader.js.map +1 -1
- package/dist/cjs/components/form/buttons/SimpleButton.js +3 -1
- package/dist/cjs/components/form/buttons/SimpleButton.js.map +1 -1
- package/dist/cjs/components/form/buttons/button.interface.js.map +1 -1
- package/dist/cjs/components/form/buttons/userPicButton/UserPicButton.js +5 -3
- package/dist/cjs/components/form/buttons/userPicButton/UserPicButton.js.map +1 -1
- package/dist/cjs/components/form/formFields/subComponents/inputs/file/dragAndDrop/DragAndDropFileUpload.js +64 -19
- package/dist/cjs/components/form/formFields/subComponents/inputs/file/dragAndDrop/DragAndDropFileUpload.js.map +1 -1
- package/dist/cjs/components/navigation/link/Link.js +2 -1
- package/dist/cjs/components/navigation/link/Link.js.map +1 -1
- package/dist/cjs/components/testing/devToolbar/DevToolbar.js +5 -3
- package/dist/cjs/components/testing/devToolbar/DevToolbar.js.map +1 -1
- package/dist/cjs/constants/fileUploadTypes.js +9 -4
- package/dist/cjs/constants/fileUploadTypes.js.map +1 -1
- package/dist/cjs/helpers/dateHelpers.js +34 -23
- package/dist/cjs/helpers/dateHelpers.js.map +1 -1
- package/dist/cjs/helpers/fileHelpers.js +58 -0
- package/dist/cjs/helpers/fileHelpers.js.map +1 -0
- package/dist/cjs/helpers/index.js +44 -0
- package/dist/cjs/helpers/index.js.map +1 -1
- package/dist/cjs/helpers/interactionsHelper.js +8 -1
- package/dist/cjs/helpers/interactionsHelper.js.map +1 -1
- package/dist/cjs/helpers/objectHelpers.js +23 -9
- package/dist/cjs/helpers/objectHelpers.js.map +1 -1
- package/dist/cjs/helpers/stringHelpers.js +61 -5
- package/dist/cjs/helpers/stringHelpers.js.map +1 -1
- package/dist/cjs/helpers/urlHelpers.js +48 -0
- package/dist/cjs/helpers/urlHelpers.js.map +1 -0
- package/dist/cjs/index.js +191 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/package.json +3 -305
- package/dist/cjs/styles/index.css +18 -0
- package/dist/cjs/styles/variables/cssVars/_designVariables.css +18 -0
- package/dist/cjs/widgets/documentComments/DocumentComments.js +305 -0
- package/dist/cjs/widgets/documentComments/DocumentComments.js.map +1 -0
- package/dist/cjs/widgets/documentComments/_documentCommentsVariables.css +0 -0
- package/dist/cjs/widgets/documentComments/documentComments.css +107 -0
- package/dist/cjs/widgets/documentComments/documentComments.interfaces.js +6 -0
- package/dist/cjs/widgets/documentComments/documentComments.interfaces.js.map +1 -0
- package/dist/cjs/widgets/documentComments/index.js +19 -0
- package/dist/cjs/widgets/documentComments/index.js.map +1 -0
- package/dist/cjs/widgets/documentComparer/DocumentComparer.js +309 -0
- package/dist/cjs/widgets/documentComparer/DocumentComparer.js.map +1 -0
- package/dist/cjs/widgets/documentComparer/_documentComparerVariables.css +0 -0
- package/dist/cjs/widgets/documentComparer/documentComparer.css +117 -0
- package/dist/cjs/widgets/documentComparer/documentComparer.interfaces.js +6 -0
- package/dist/cjs/widgets/documentComparer/documentComparer.interfaces.js.map +1 -0
- package/dist/cjs/widgets/documentComparer/index.js +19 -0
- package/dist/cjs/widgets/documentComparer/index.js.map +1 -0
- package/dist/cjs/widgets/documentEditor/DocumentEditor.js +142 -0
- package/dist/cjs/widgets/documentEditor/DocumentEditor.js.map +1 -0
- package/dist/cjs/widgets/documentEditor/_documentEditorVariables.css +0 -0
- package/dist/cjs/widgets/documentEditor/documentEditor.css +33 -0
- package/dist/cjs/widgets/documentEditor/documentEditor.interfaces.js +6 -0
- package/dist/cjs/widgets/documentEditor/documentEditor.interfaces.js.map +1 -0
- package/dist/cjs/widgets/documentEditor/index.js +19 -0
- package/dist/cjs/widgets/documentEditor/index.js.map +1 -0
- package/dist/cjs/widgets/documentViewer/DocumentViewer.js +206 -0
- package/dist/cjs/widgets/documentViewer/DocumentViewer.js.map +1 -0
- package/dist/cjs/widgets/documentViewer/_documentViewerVariables.css +0 -0
- package/dist/cjs/widgets/documentViewer/documentViewer.css +82 -0
- package/dist/cjs/widgets/documentViewer/documentViewer.interfaces.js +6 -0
- package/dist/cjs/widgets/documentViewer/documentViewer.interfaces.js.map +1 -0
- package/dist/cjs/widgets/documentViewer/index.js +19 -0
- package/dist/cjs/widgets/documentViewer/index.js.map +1 -0
- package/dist/cjs/widgets/index.js +126 -0
- package/dist/cjs/widgets/index.js.map +1 -1
- package/dist/cjs/widgets/shared/documents/ToggleGroup.js +32 -0
- package/dist/cjs/widgets/shared/documents/ToggleGroup.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/_documentVariables.css +0 -0
- package/dist/cjs/widgets/shared/documents/annotations/AnnotationLayer.js +279 -0
- package/dist/cjs/widgets/shared/documents/annotations/AnnotationLayer.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/annotations/_annotationLayerVariables.css +0 -0
- package/dist/cjs/widgets/shared/documents/annotations/annotationLayer.css +65 -0
- package/dist/cjs/widgets/shared/documents/annotations/annotations.interfaces.js +21 -0
- package/dist/cjs/widgets/shared/documents/annotations/annotations.interfaces.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/annotations/highlightRegistry.js +67 -0
- package/dist/cjs/widgets/shared/documents/annotations/highlightRegistry.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/annotations/index.js +39 -0
- package/dist/cjs/widgets/shared/documents/annotations/index.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/annotations/textIndex.js +112 -0
- package/dist/cjs/widgets/shared/documents/annotations/textIndex.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/annotations/textQuoteAnchor.js +160 -0
- package/dist/cjs/widgets/shared/documents/annotations/textQuoteAnchor.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/documentHelpers.js +186 -0
- package/dist/cjs/widgets/shared/documents/documentHelpers.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/documents.interfaces.js +6 -0
- package/dist/cjs/widgets/shared/documents/documents.interfaces.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/documentDiff/DocumentDiff.js +73 -0
- package/dist/cjs/widgets/shared/documents/engines/documentDiff/DocumentDiff.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/documentDiff/_documentDiffVariables.css +0 -0
- package/dist/cjs/widgets/shared/documents/engines/documentDiff/buildDocumentDiff.js +114 -0
- package/dist/cjs/widgets/shared/documents/engines/documentDiff/buildDocumentDiff.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/documentDiff/documentDiff.css +69 -0
- package/dist/cjs/widgets/shared/documents/engines/documentDiff/documentDiff.interfaces.js +6 -0
- package/dist/cjs/widgets/shared/documents/engines/documentDiff/documentDiff.interfaces.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/lazyEngines.js +19 -0
- package/dist/cjs/widgets/shared/documents/engines/lazyEngines.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/MarkdownEditorEngine.js +200 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/MarkdownEditorEngine.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/_markdownEditorEngineVariables.css +0 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/markdownEditorEngine.css +50 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/markdownEditorEngine.interfaces.js +6 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/markdownEditorEngine.interfaces.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/markdownTextIndex.js +179 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/markdownTextIndex.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/sanitizeForMdx.js +278 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/sanitizeForMdx.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/sourceAnnotations.js +208 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownEditor/sourceAnnotations.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/MarkdownRenderer.js +85 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/MarkdownRenderer.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/_markdownRendererVariables.css +0 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/markdownRenderer.css +78 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/index.js +64 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/index.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/markdownNode.interfaces.js +6 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/markdownNode.interfaces.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/rehypeTableCleanup.js +71 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/rehypeTableCleanup.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/remarkPlugins.js +192 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/remarkPlugins.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/remarkSafeTables.js +86 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/remarkSafeTables.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/tableHelpers.js +38 -0
- package/dist/cjs/widgets/shared/documents/engines/markdownRenderer/plugins/tableHelpers.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/wordRenderer/WordRenderer.js +49 -0
- package/dist/cjs/widgets/shared/documents/engines/wordRenderer/WordRenderer.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/wordRenderer/renderWordDocument.js +214 -0
- package/dist/cjs/widgets/shared/documents/engines/wordRenderer/renderWordDocument.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/wordRenderer/wordPreviewNumbering.js +112 -0
- package/dist/cjs/widgets/shared/documents/engines/wordRenderer/wordPreviewNumbering.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/engines/wordRenderer/wordXml.js +68 -0
- package/dist/cjs/widgets/shared/documents/engines/wordRenderer/wordXml.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/index.js +50 -0
- package/dist/cjs/widgets/shared/documents/index.js.map +1 -0
- package/dist/cjs/widgets/shared/documents/toggleGroup.css +8 -0
- package/dist/cjs/widgets/shared/documents/useDocumentContent.js +222 -0
- package/dist/cjs/widgets/shared/documents/useDocumentContent.js.map +1 -0
- package/dist/components/design/banners/pageBanner/PageBanner.d.ts.map +1 -1
- package/dist/components/design/card/cardHeader/CardHeaderItem.d.ts.map +1 -1
- package/dist/components/design/logos/LogoLink.d.ts.map +1 -1
- package/dist/components/design/logos/VentureLogo.d.ts.map +1 -1
- package/dist/components/design/skeleton/Skeleton.d.ts +1 -1
- package/dist/components/design/skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/design/themeLoader/ThemeLoader.d.ts.map +1 -1
- package/dist/components/form/buttons/SimpleButton.d.ts.map +1 -1
- package/dist/components/form/buttons/button.interface.d.ts +1 -0
- package/dist/components/form/buttons/button.interface.d.ts.map +1 -1
- package/dist/components/form/buttons/userPicButton/UserPicButton.d.ts.map +1 -1
- package/dist/components/form/formFields/subComponents/inputs/file/dragAndDrop/DragAndDropFileUpload.d.ts.map +1 -1
- package/dist/components/navigation/link/Link.d.ts.map +1 -1
- package/dist/components/testing/devToolbar/DevToolbar.d.ts.map +1 -1
- package/dist/constants/fileUploadTypes.d.ts.map +1 -1
- package/dist/esm/autoGenerated/libraryThemes.js +12 -12
- package/dist/esm/autoGenerated/libraryThemes.js.map +1 -1
- package/dist/esm/autoGenerated/libraryThemes.json +12 -12
- package/dist/esm/components/design/banners/pageBanner/PageBanner.js +27 -12
- package/dist/esm/components/design/banners/pageBanner/PageBanner.js.map +1 -1
- package/dist/esm/components/design/card/cardHeader/CardHeaderItem.js +22 -15
- package/dist/esm/components/design/card/cardHeader/CardHeaderItem.js.map +1 -1
- package/dist/esm/components/design/dialog/dialog.css +4 -0
- package/dist/esm/components/design/logos/LogoLink.js +2 -1
- package/dist/esm/components/design/logos/LogoLink.js.map +1 -1
- package/dist/esm/components/design/logos/VentureLogo.js +2 -1
- package/dist/esm/components/design/logos/VentureLogo.js.map +1 -1
- package/dist/esm/components/design/revealMore/RevealMoreBelow.js +1 -1
- package/dist/esm/components/design/revealMore/RevealMoreBelow.js.map +1 -1
- package/dist/esm/components/design/skeleton/Skeleton.js +15 -5
- package/dist/esm/components/design/skeleton/Skeleton.js.map +1 -1
- package/dist/esm/components/design/themeLoader/ThemeLoader.js +1 -1
- package/dist/esm/components/design/themeLoader/ThemeLoader.js.map +1 -1
- package/dist/esm/components/form/buttons/SimpleButton.js +3 -1
- package/dist/esm/components/form/buttons/SimpleButton.js.map +1 -1
- package/dist/esm/components/form/buttons/button.interface.js.map +1 -1
- package/dist/esm/components/form/buttons/userPicButton/UserPicButton.js +5 -3
- package/dist/esm/components/form/buttons/userPicButton/UserPicButton.js.map +1 -1
- package/dist/esm/components/form/formFields/subComponents/inputs/file/dragAndDrop/DragAndDropFileUpload.js +65 -19
- package/dist/esm/components/form/formFields/subComponents/inputs/file/dragAndDrop/DragAndDropFileUpload.js.map +1 -1
- package/dist/esm/components/navigation/link/Link.js +2 -1
- package/dist/esm/components/navigation/link/Link.js.map +1 -1
- package/dist/esm/components/testing/devToolbar/DevToolbar.js +5 -3
- package/dist/esm/components/testing/devToolbar/DevToolbar.js.map +1 -1
- package/dist/esm/constants/fileUploadTypes.js +9 -4
- package/dist/esm/constants/fileUploadTypes.js.map +1 -1
- package/dist/esm/helpers/dateHelpers.js +34 -23
- package/dist/esm/helpers/dateHelpers.js.map +1 -1
- package/dist/esm/helpers/fileHelpers.js +48 -0
- package/dist/esm/helpers/fileHelpers.js.map +1 -0
- package/dist/esm/helpers/index.js +2 -0
- package/dist/esm/helpers/index.js.map +1 -1
- package/dist/esm/helpers/interactionsHelper.js +5 -0
- package/dist/esm/helpers/interactionsHelper.js.map +1 -1
- package/dist/esm/helpers/objectHelpers.js +23 -9
- package/dist/esm/helpers/objectHelpers.js.map +1 -1
- package/dist/esm/helpers/stringHelpers.js +61 -5
- package/dist/esm/helpers/stringHelpers.js.map +1 -1
- package/dist/esm/helpers/urlHelpers.js +40 -0
- package/dist/esm/helpers/urlHelpers.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +2 -304
- package/dist/esm/styles/index.css +18 -0
- package/dist/esm/styles/variables/cssVars/_designVariables.css +18 -0
- package/dist/esm/widgets/documentComments/DocumentComments.js +298 -0
- package/dist/esm/widgets/documentComments/DocumentComments.js.map +1 -0
- package/dist/esm/widgets/documentComments/_documentCommentsVariables.css +0 -0
- package/dist/esm/widgets/documentComments/documentComments.css +107 -0
- package/dist/esm/widgets/documentComments/documentComments.interfaces.js +2 -0
- package/dist/esm/widgets/documentComments/documentComments.interfaces.js.map +1 -0
- package/dist/esm/widgets/documentComments/index.js +2 -0
- package/dist/esm/widgets/documentComments/index.js.map +1 -0
- package/dist/esm/widgets/documentComparer/DocumentComparer.js +301 -0
- package/dist/esm/widgets/documentComparer/DocumentComparer.js.map +1 -0
- package/dist/esm/widgets/documentComparer/_documentComparerVariables.css +0 -0
- package/dist/esm/widgets/documentComparer/documentComparer.css +117 -0
- package/dist/esm/widgets/documentComparer/documentComparer.interfaces.js +2 -0
- package/dist/esm/widgets/documentComparer/documentComparer.interfaces.js.map +1 -0
- package/dist/esm/widgets/documentComparer/index.js +2 -0
- package/dist/esm/widgets/documentComparer/index.js.map +1 -0
- package/dist/esm/widgets/documentEditor/DocumentEditor.js +135 -0
- package/dist/esm/widgets/documentEditor/DocumentEditor.js.map +1 -0
- package/dist/esm/widgets/documentEditor/_documentEditorVariables.css +0 -0
- package/dist/esm/widgets/documentEditor/documentEditor.css +33 -0
- package/dist/esm/widgets/documentEditor/documentEditor.interfaces.js +2 -0
- package/dist/esm/widgets/documentEditor/documentEditor.interfaces.js.map +1 -0
- package/dist/esm/widgets/documentEditor/index.js +2 -0
- package/dist/esm/widgets/documentEditor/index.js.map +1 -0
- package/dist/esm/widgets/documentViewer/DocumentViewer.js +198 -0
- package/dist/esm/widgets/documentViewer/DocumentViewer.js.map +1 -0
- package/dist/esm/widgets/documentViewer/_documentViewerVariables.css +0 -0
- package/dist/esm/widgets/documentViewer/documentViewer.css +82 -0
- package/dist/esm/widgets/documentViewer/documentViewer.interfaces.js +2 -0
- package/dist/esm/widgets/documentViewer/documentViewer.interfaces.js.map +1 -0
- package/dist/esm/widgets/documentViewer/index.js +2 -0
- package/dist/esm/widgets/documentViewer/index.js.map +1 -0
- package/dist/esm/widgets/index.js +6 -0
- package/dist/esm/widgets/index.js.map +1 -1
- package/dist/esm/widgets/shared/documents/ToggleGroup.js +24 -0
- package/dist/esm/widgets/shared/documents/ToggleGroup.js.map +1 -0
- package/dist/esm/widgets/shared/documents/_documentVariables.css +0 -0
- package/dist/esm/widgets/shared/documents/annotations/AnnotationLayer.js +273 -0
- package/dist/esm/widgets/shared/documents/annotations/AnnotationLayer.js.map +1 -0
- package/dist/esm/widgets/shared/documents/annotations/_annotationLayerVariables.css +0 -0
- package/dist/esm/widgets/shared/documents/annotations/annotationLayer.css +65 -0
- package/dist/esm/widgets/shared/documents/annotations/annotations.interfaces.js +14 -0
- package/dist/esm/widgets/shared/documents/annotations/annotations.interfaces.js.map +1 -0
- package/dist/esm/widgets/shared/documents/annotations/highlightRegistry.js +58 -0
- package/dist/esm/widgets/shared/documents/annotations/highlightRegistry.js.map +1 -0
- package/dist/esm/widgets/shared/documents/annotations/index.js +4 -0
- package/dist/esm/widgets/shared/documents/annotations/index.js.map +1 -0
- package/dist/esm/widgets/shared/documents/annotations/textIndex.js +103 -0
- package/dist/esm/widgets/shared/documents/annotations/textIndex.js.map +1 -0
- package/dist/esm/widgets/shared/documents/annotations/textQuoteAnchor.js +150 -0
- package/dist/esm/widgets/shared/documents/annotations/textQuoteAnchor.js.map +1 -0
- package/dist/esm/widgets/shared/documents/documentHelpers.js +168 -0
- package/dist/esm/widgets/shared/documents/documentHelpers.js.map +1 -0
- package/dist/esm/widgets/shared/documents/documents.interfaces.js +2 -0
- package/dist/esm/widgets/shared/documents/documents.interfaces.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/documentDiff/DocumentDiff.js +65 -0
- package/dist/esm/widgets/shared/documents/engines/documentDiff/DocumentDiff.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/documentDiff/_documentDiffVariables.css +0 -0
- package/dist/esm/widgets/shared/documents/engines/documentDiff/buildDocumentDiff.js +102 -0
- package/dist/esm/widgets/shared/documents/engines/documentDiff/buildDocumentDiff.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/documentDiff/documentDiff.css +69 -0
- package/dist/esm/widgets/shared/documents/engines/documentDiff/documentDiff.interfaces.js +2 -0
- package/dist/esm/widgets/shared/documents/engines/documentDiff/documentDiff.interfaces.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/lazyEngines.js +13 -0
- package/dist/esm/widgets/shared/documents/engines/lazyEngines.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/MarkdownEditorEngine.js +191 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/MarkdownEditorEngine.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/_markdownEditorEngineVariables.css +0 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/markdownEditorEngine.css +50 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/markdownEditorEngine.interfaces.js +2 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/markdownEditorEngine.interfaces.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/markdownTextIndex.js +170 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/markdownTextIndex.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/sanitizeForMdx.js +270 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/sanitizeForMdx.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/sourceAnnotations.js +198 -0
- package/dist/esm/widgets/shared/documents/engines/markdownEditor/sourceAnnotations.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/MarkdownRenderer.js +76 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/MarkdownRenderer.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/_markdownRendererVariables.css +0 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/markdownRenderer.css +78 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/index.js +5 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/index.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/markdownNode.interfaces.js +2 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/markdownNode.interfaces.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/rehypeTableCleanup.js +64 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/rehypeTableCleanup.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/remarkPlugins.js +182 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/remarkPlugins.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/remarkSafeTables.js +78 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/remarkSafeTables.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/tableHelpers.js +30 -0
- package/dist/esm/widgets/shared/documents/engines/markdownRenderer/plugins/tableHelpers.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/wordRenderer/WordRenderer.js +41 -0
- package/dist/esm/widgets/shared/documents/engines/wordRenderer/WordRenderer.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/wordRenderer/renderWordDocument.js +207 -0
- package/dist/esm/widgets/shared/documents/engines/wordRenderer/renderWordDocument.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/wordRenderer/wordPreviewNumbering.js +105 -0
- package/dist/esm/widgets/shared/documents/engines/wordRenderer/wordPreviewNumbering.js.map +1 -0
- package/dist/esm/widgets/shared/documents/engines/wordRenderer/wordXml.js +57 -0
- package/dist/esm/widgets/shared/documents/engines/wordRenderer/wordXml.js.map +1 -0
- package/dist/esm/widgets/shared/documents/index.js +3 -0
- package/dist/esm/widgets/shared/documents/index.js.map +1 -0
- package/dist/esm/widgets/shared/documents/toggleGroup.css +8 -0
- package/dist/esm/widgets/shared/documents/useDocumentContent.js +215 -0
- package/dist/esm/widgets/shared/documents/useDocumentContent.js.map +1 -0
- package/dist/helpers/dateHelpers.d.ts.map +1 -1
- package/dist/helpers/fileHelpers.d.ts +5 -0
- package/dist/helpers/fileHelpers.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/interactionsHelper.d.ts +2 -0
- package/dist/helpers/interactionsHelper.d.ts.map +1 -1
- package/dist/helpers/objectHelpers.d.ts.map +1 -1
- package/dist/helpers/stringHelpers.d.ts.map +1 -1
- package/dist/helpers/urlHelpers.d.ts +3 -0
- package/dist/helpers/urlHelpers.d.ts.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/package.json +42 -28
- package/dist/widgets/documentComments/DocumentComments.d.ts +7 -0
- package/dist/widgets/documentComments/DocumentComments.d.ts.map +1 -0
- package/dist/widgets/documentComments/documentComments.interfaces.d.ts +57 -0
- package/dist/widgets/documentComments/documentComments.interfaces.d.ts.map +1 -0
- package/dist/widgets/documentComments/index.d.ts +3 -0
- package/dist/widgets/documentComments/index.d.ts.map +1 -0
- package/dist/widgets/documentComparer/DocumentComparer.d.ts +7 -0
- package/dist/widgets/documentComparer/DocumentComparer.d.ts.map +1 -0
- package/dist/widgets/documentComparer/documentComparer.interfaces.d.ts +78 -0
- package/dist/widgets/documentComparer/documentComparer.interfaces.d.ts.map +1 -0
- package/dist/widgets/documentComparer/index.d.ts +3 -0
- package/dist/widgets/documentComparer/index.d.ts.map +1 -0
- package/dist/widgets/documentEditor/DocumentEditor.d.ts +7 -0
- package/dist/widgets/documentEditor/DocumentEditor.d.ts.map +1 -0
- package/dist/widgets/documentEditor/documentEditor.interfaces.d.ts +40 -0
- package/dist/widgets/documentEditor/documentEditor.interfaces.d.ts.map +1 -0
- package/dist/widgets/documentEditor/index.d.ts +3 -0
- package/dist/widgets/documentEditor/index.d.ts.map +1 -0
- package/dist/widgets/documentViewer/DocumentViewer.d.ts +7 -0
- package/dist/widgets/documentViewer/DocumentViewer.d.ts.map +1 -0
- package/dist/widgets/documentViewer/documentViewer.interfaces.d.ts +47 -0
- package/dist/widgets/documentViewer/documentViewer.interfaces.d.ts.map +1 -0
- package/dist/widgets/documentViewer/index.d.ts +3 -0
- package/dist/widgets/documentViewer/index.d.ts.map +1 -0
- package/dist/widgets/index.d.ts +12 -0
- package/dist/widgets/index.d.ts.map +1 -1
- package/dist/widgets/shared/documents/ToggleGroup.d.ts +15 -0
- package/dist/widgets/shared/documents/ToggleGroup.d.ts.map +1 -0
- package/dist/widgets/shared/documents/annotations/AnnotationLayer.d.ts +27 -0
- package/dist/widgets/shared/documents/annotations/AnnotationLayer.d.ts.map +1 -0
- package/dist/widgets/shared/documents/annotations/annotations.interfaces.d.ts +43 -0
- package/dist/widgets/shared/documents/annotations/annotations.interfaces.d.ts.map +1 -0
- package/dist/widgets/shared/documents/annotations/highlightRegistry.d.ts +12 -0
- package/dist/widgets/shared/documents/annotations/highlightRegistry.d.ts.map +1 -0
- package/dist/widgets/shared/documents/annotations/index.d.ts +6 -0
- package/dist/widgets/shared/documents/annotations/index.d.ts.map +1 -0
- package/dist/widgets/shared/documents/annotations/textIndex.d.ts +16 -0
- package/dist/widgets/shared/documents/annotations/textIndex.d.ts.map +1 -0
- package/dist/widgets/shared/documents/annotations/textQuoteAnchor.d.ts +15 -0
- package/dist/widgets/shared/documents/annotations/textQuoteAnchor.d.ts.map +1 -0
- package/dist/widgets/shared/documents/documentHelpers.d.ts +14 -0
- package/dist/widgets/shared/documents/documentHelpers.d.ts.map +1 -0
- package/dist/widgets/shared/documents/documents.interfaces.d.ts +20 -0
- package/dist/widgets/shared/documents/documents.interfaces.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/documentDiff/DocumentDiff.d.ts +6 -0
- package/dist/widgets/shared/documents/engines/documentDiff/DocumentDiff.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/documentDiff/buildDocumentDiff.d.ts +25 -0
- package/dist/widgets/shared/documents/engines/documentDiff/buildDocumentDiff.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/documentDiff/documentDiff.interfaces.d.ts +17 -0
- package/dist/widgets/shared/documents/engines/documentDiff/documentDiff.interfaces.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/lazyEngines.d.ts +5 -0
- package/dist/widgets/shared/documents/engines/lazyEngines.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/MarkdownEditorEngine.d.ts +8 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/MarkdownEditorEngine.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/markdownEditorEngine.interfaces.d.ts +23 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/markdownEditorEngine.interfaces.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/markdownTextIndex.d.ts +12 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/markdownTextIndex.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/sanitizeForMdx.d.ts +8 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/sanitizeForMdx.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/sourceAnnotations.d.ts +32 -0
- package/dist/widgets/shared/documents/engines/markdownEditor/sourceAnnotations.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/MarkdownRenderer.d.ts +12 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/index.d.ts +7 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/index.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/markdownNode.interfaces.d.ts +16 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/markdownNode.interfaces.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/rehypeTableCleanup.d.ts +3 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/rehypeTableCleanup.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/remarkPlugins.d.ts +6 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/remarkPlugins.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/remarkSafeTables.d.ts +3 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/remarkSafeTables.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/tableHelpers.d.ts +8 -0
- package/dist/widgets/shared/documents/engines/markdownRenderer/plugins/tableHelpers.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/wordRenderer/WordRenderer.d.ts +11 -0
- package/dist/widgets/shared/documents/engines/wordRenderer/WordRenderer.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/wordRenderer/renderWordDocument.d.ts +7 -0
- package/dist/widgets/shared/documents/engines/wordRenderer/renderWordDocument.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/wordRenderer/wordPreviewNumbering.d.ts +3 -0
- package/dist/widgets/shared/documents/engines/wordRenderer/wordPreviewNumbering.d.ts.map +1 -0
- package/dist/widgets/shared/documents/engines/wordRenderer/wordXml.d.ts +21 -0
- package/dist/widgets/shared/documents/engines/wordRenderer/wordXml.d.ts.map +1 -0
- package/dist/widgets/shared/documents/index.d.ts +5 -0
- package/dist/widgets/shared/documents/index.d.ts.map +1 -0
- package/dist/widgets/shared/documents/useDocumentContent.d.ts +11 -0
- package/dist/widgets/shared/documents/useDocumentContent.d.ts.map +1 -0
- package/package.json +42 -28
- package/readme.md +49 -2
- package/dist/components/design/dialog/Dialog.test.d.ts +0 -5
- package/dist/components/design/dialog/Dialog.test.d.ts.map +0 -1
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.test.d.ts +0 -5
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.test.d.ts.map +0 -1
- package/dist/components/design/tooltip/Tooltip.test.d.ts +0 -2
- package/dist/components/design/tooltip/Tooltip.test.d.ts.map +0 -1
- package/dist/components/form/buttons/SimpleButton.test.d.ts +0 -5
- package/dist/components/form/buttons/SimpleButton.test.d.ts.map +0 -1
- package/dist/components/form/formFields/formFieldWrapper/FormField.test.d.ts +0 -5
- package/dist/components/form/formFields/formFieldWrapper/FormField.test.d.ts.map +0 -1
- package/dist/components/form/formFields/subComponents/inputs/checkbox/InputCheckbox.test.d.ts +0 -5
- package/dist/components/form/formFields/subComponents/inputs/checkbox/InputCheckbox.test.d.ts.map +0 -1
- package/dist/components/form/formFields/subComponents/inputs/checkbox/checkboxSwitch/CheckboxSwitch.test.d.ts +0 -5
- package/dist/components/form/formFields/subComponents/inputs/checkbox/checkboxSwitch/CheckboxSwitch.test.d.ts.map +0 -1
- package/dist/components/form/formFields/subComponents/inputs/file/dragAndDrop/DragAndDropFileUpload.test.d.ts +0 -5
- package/dist/components/form/formFields/subComponents/inputs/file/dragAndDrop/DragAndDropFileUpload.test.d.ts.map +0 -1
- package/dist/components/form/formFields/subComponents/inputs/file/fileAttachmentList/FileAttachmentsList.test.d.ts +0 -5
- package/dist/components/form/formFields/subComponents/inputs/file/fileAttachmentList/FileAttachmentsList.test.d.ts.map +0 -1
- package/dist/components/form/formFields/subComponents/inputs/text/InputText.test.d.ts +0 -5
- package/dist/components/form/formFields/subComponents/inputs/text/InputText.test.d.ts.map +0 -1
- package/dist/components/form/formFields/subComponents/nestedFormContext.test.d.ts +0 -5
- package/dist/components/form/formFields/subComponents/nestedFormContext.test.d.ts.map +0 -1
- package/dist/components/form/formFields/subComponents/select/Select.test.d.ts +0 -5
- package/dist/components/form/formFields/subComponents/select/Select.test.d.ts.map +0 -1
- package/dist/components/form/formFields/subComponents/textarea/Textarea.test.d.ts +0 -5
- package/dist/components/form/formFields/subComponents/textarea/Textarea.test.d.ts.map +0 -1
- package/dist/components/form/hookFormWrapper/HookFormWrapper.test.d.ts +0 -5
- package/dist/components/form/hookFormWrapper/HookFormWrapper.test.d.ts.map +0 -1
- package/dist/components/form/validation/ValidationMessages.test.d.ts +0 -5
- package/dist/components/form/validation/ValidationMessages.test.d.ts.map +0 -1
- package/dist/components/navigation/bubbleNavigator/bubbleNavigatorUtilities.test.d.ts +0 -2
- package/dist/components/navigation/bubbleNavigator/bubbleNavigatorUtilities.test.d.ts.map +0 -1
- package/dist/components/navigation/menu/menuItemContent/MenuItemIcon.test.d.ts +0 -5
- package/dist/components/navigation/menu/menuItemContent/MenuItemIcon.test.d.ts.map +0 -1
- package/dist/helpers/ageHelpers.test.d.ts +0 -2
- package/dist/helpers/ageHelpers.test.d.ts.map +0 -1
- package/dist/helpers/dateHelpers.test.d.ts +0 -2
- package/dist/helpers/dateHelpers.test.d.ts.map +0 -1
- package/dist/helpers/formatters.test.d.ts +0 -5
- package/dist/helpers/formatters.test.d.ts.map +0 -1
- package/dist/helpers/iconHelpers.test.d.ts +0 -5
- package/dist/helpers/iconHelpers.test.d.ts.map +0 -1
- package/dist/helpers/numberHelpers.test.d.ts +0 -5
- package/dist/helpers/numberHelpers.test.d.ts.map +0 -1
- package/dist/helpers/objectHelpers.test.d.ts +0 -2
- package/dist/helpers/objectHelpers.test.d.ts.map +0 -1
- package/dist/helpers/stringHelpers.test.d.ts +0 -2
- package/dist/helpers/stringHelpers.test.d.ts.map +0 -1
- package/dist/hooks/InteractiveHostFocus.test.d.ts +0 -5
- package/dist/hooks/InteractiveHostFocus.test.d.ts.map +0 -1
- package/dist/widgets/processLauncher/ProcessLauncher.test.d.ts +0 -5
- package/dist/widgets/processLauncher/ProcessLauncher.test.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentComments.js","names":["React","useEffect","useMemo","useRef","useState","useForm","HeaderBar","SimpleButton","Textarea","dateToShortReadableDate","getPreferredScrollBehavior","ToggleGroup","defaultDocumentCommentsLabels","heading","filter","open","count","resolved","newPinnedComment","newGeneralComment","post","cancel","reply","replyTo","authorName","sendReply","resolve","reopen","showInDocument","detached","generalComment","noOpenComments","noResolvedComments","quoteLabel","CommentHeader","createdAt","formatDate","createElement","className","dateTime","DocumentComments","id","comments","headingLevel","selectedCommentId","pendingAnchor","detachedCommentIds","canComment","canCommentRequested","canReply","canReplyRequested","canResolve","canResolveRequested","allowGeneralComments","initialFilter","onAddComment","onReply","onToggleResolved","onSelectComment","onCancelPending","headerActions","labels","customLabels","customCssClasses","Boolean","formMethods","defaultValues","newComment","setFilter","replyingToId","setReplyingToId","isSubmitting","setIsSubmitting","cardRefs","Map","String","watch","openComments","comment","resolvedComments","displayedComments","showNewCommentForm","commentsRef","current","selected","find","get","scrollIntoView","block","behavior","submit","action","field","setValue","handlePost","content","trim","posted","anchor","handleCancelPending","handleReply","commentId","openReply","renderThread","isSelected","isDetached","includes","cardClasses","card","join","key","ref","element","set","delete","undefined","author","name","exact","replies","length","map","replyItem","formContext","label","text","cssClass","onClickHandler","disabled","ariaPressed","wrapper","legend","value","onChange","options","form","list"],"sources":["../../../../src/widgets/documentComments/DocumentComments.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC, useEffect, useMemo, useRef, useState } from 'react';\nimport { FieldValues, useForm } from 'react-hook-form';\n\nimport { HeaderBar, SimpleButton, Textarea } from '../../components';\nimport { dateToShortReadableDate } from '../../helpers/dateHelpers';\nimport { getPreferredScrollBehavior } from '../../helpers/interactionsHelper';\nimport { DocumentComment } from '../shared/documents/annotations/annotations.interfaces';\nimport { ToggleGroup } from '../shared/documents/ToggleGroup';\nimport {\n DocumentCommentsFilter,\n DocumentCommentsLabels,\n DocumentCommentsProps\n} from './documentComments.interfaces';\n\nimport './documentComments.scss';\n\nexport const defaultDocumentCommentsLabels: DocumentCommentsLabels = {\n heading: 'Comments',\n filter: 'Show comments',\n open: (count) => `Open (${ count })`,\n resolved: (count) => `Resolved (${ count })`,\n newPinnedComment: 'Comment on the selected text',\n newGeneralComment: 'Comment on the document',\n post: 'Post comment',\n cancel: 'Cancel',\n reply: 'Reply',\n replyTo: (authorName) => `Reply to ${ authorName }`,\n sendReply: 'Send reply',\n resolve: 'Resolve',\n reopen: 'Reopen',\n showInDocument: 'Show in document',\n detached: 'The text this comment was on has changed or been removed.',\n generalComment: 'General comment',\n noOpenComments: 'There are no open comments.',\n noResolvedComments: 'There are no resolved comments.',\n quoteLabel: 'Commented text'\n};\n\ntype FormValues = { newComment: string; reply: string };\n\ntype CommentHeaderProps = {\n authorName: string;\n createdAt: string;\n formatDate: NonNullable<DocumentCommentsProps['formatDate']>;\n};\n\nconst CommentHeader: FC<CommentHeaderProps> = ({ authorName, createdAt, formatDate }) => (\n <div className=\"documentComments__cardHeader\">\n <span className=\"documentComments__author\">{ authorName }</span>\n <time className=\"documentComments__date\" dateTime={ createdAt }>{ formatDate(createdAt) ?? createdAt }</time>\n </div>\n);\n\n/*\n DocumentComments lists a document's comment threads and lets people add comments (on selected\n text or the whole document), reply, and resolve or reopen them. The host application owns the\n comment data and persistence; this widget renders it and reports actions through callbacks.\n */\nexport const DocumentComments: FC<DocumentCommentsProps> = (\n {\n id,\n comments,\n headingLevel = 3,\n selectedCommentId,\n pendingAnchor = null,\n detachedCommentIds = [],\n canComment: canCommentRequested = true,\n canReply: canReplyRequested = canCommentRequested,\n canResolve: canResolveRequested = canCommentRequested,\n allowGeneralComments = true,\n initialFilter = 'open',\n formatDate = dateToShortReadableDate,\n onAddComment,\n onReply,\n onToggleResolved,\n onSelectComment,\n onCancelPending,\n headerActions,\n labels: customLabels,\n customCssClasses = {}\n }\n) => {\n const labels = useMemo(() => ({ ...defaultDocumentCommentsLabels, ...customLabels }), [customLabels]);\n // An action is only offered when the host can act on it; otherwise a submitted draft would be lost.\n const canComment = canCommentRequested && Boolean(onAddComment);\n const canReply = canReplyRequested && Boolean(onReply);\n const canResolve = canResolveRequested && Boolean(onToggleResolved);\n // Untyped because the library's form fields accept a generic form context.\n const formMethods = useForm<FieldValues>({ defaultValues: { newComment: '', reply: '' } satisfies FormValues });\n const [filter, setFilter] = useState<DocumentCommentsFilter>(initialFilter);\n const [replyingToId, setReplyingToId] = useState<string | null>(null);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const cardRefs = useRef(new Map<string, HTMLLIElement>());\n\n const newComment = String(formMethods.watch('newComment') ?? '');\n const reply = String(formMethods.watch('reply') ?? '');\n const openComments = comments.filter((comment) => !comment.resolved);\n const resolvedComments = comments.filter((comment) => comment.resolved);\n const displayedComments = filter === 'open' ? openComments : resolvedComments;\n const showNewCommentForm = canComment && filter === 'open' && (pendingAnchor !== null || allowGeneralComments);\n\n // A new selection is commented on in the open list, so switch to it.\n useEffect(() => {\n if (pendingAnchor) {\n setFilter('open');\n }\n }, [pendingAnchor]);\n\n // Read through a ref so only a change of selection scrolls the list, not new comments or replies.\n const commentsRef = useRef(comments);\n commentsRef.current = comments;\n\n // Bring the selected thread into view, e.g. after its bubble is chosen in the document.\n useEffect(() => {\n const selected = commentsRef.current.find((comment) => comment.id === selectedCommentId);\n if (!selected) {\n return;\n }\n setFilter(selected.resolved ? 'resolved' : 'open');\n cardRefs.current.get(selected.id)?.scrollIntoView?.({ block: 'nearest', behavior: getPreferredScrollBehavior() });\n }, [selectedCommentId]);\n\n const submit = async (action: () => void | Promise<void>, field: keyof FormValues) => {\n setIsSubmitting(true);\n try {\n await action();\n formMethods.setValue(field, '');\n return true;\n } catch {\n // The host's callback reports the failure; the draft is kept so it can be retried.\n return false;\n } finally {\n setIsSubmitting(false);\n }\n };\n\n const handlePost = async () => {\n const content = newComment.trim();\n if (!content || !onAddComment) {\n return;\n }\n const posted = await submit(() => onAddComment({ content, ...(pendingAnchor ? { anchor: pendingAnchor } : {}) }), 'newComment');\n if (posted && pendingAnchor) {\n onCancelPending?.();\n }\n };\n\n const handleCancelPending = () => {\n formMethods.setValue('newComment', '');\n onCancelPending?.();\n };\n\n const handleReply = async (commentId: string) => {\n const content = reply.trim();\n if (content && onReply && await submit(() => onReply(commentId, content), 'reply')) {\n setReplyingToId(null);\n }\n };\n\n const openReply = (commentId: string) => {\n formMethods.setValue('reply', '');\n setReplyingToId(commentId);\n };\n\n const renderThread = (comment: DocumentComment) => {\n const isSelected = comment.id === selectedCommentId;\n const isDetached = Boolean(comment.anchor) && detachedCommentIds.includes(comment.id);\n const cardClasses = [\n 'documentComments__card',\n isSelected ? 'documentComments__card--selected' : '',\n comment.resolved ? 'documentComments__card--resolved' : '',\n isDetached ? 'documentComments__card--detached' : '',\n customCssClasses.card || ''\n ].filter(Boolean).join(' ');\n\n return (\n <li\n key={ comment.id }\n ref={ (element) => {\n if (element) {\n cardRefs.current.set(comment.id, element);\n } else {\n cardRefs.current.delete(comment.id);\n }\n } }\n className={ cardClasses }\n aria-current={ isSelected ? 'true' : undefined }\n >\n <CommentHeader authorName={ comment.author.name } createdAt={ comment.createdAt } formatDate={ formatDate } />\n\n { comment.anchor ? (\n <blockquote className=\"documentComments__quote\" aria-label={ labels.quoteLabel }>{ comment.anchor.exact }</blockquote>\n ) : (\n <p className=\"documentComments__general\">{ labels.generalComment }</p>\n ) }\n { isDetached && <p className=\"documentComments__detached\">{ labels.detached }</p> }\n\n <p className=\"documentComments__content\">{ comment.content }</p>\n\n { comment.replies?.length ? (\n <ul className=\"documentComments__replies\">\n { comment.replies.map((replyItem) => (\n <li key={ replyItem.id } className=\"documentComments__reply\">\n <CommentHeader authorName={ replyItem.author.name } createdAt={ replyItem.createdAt } formatDate={ formatDate } />\n <p className=\"documentComments__content\">{ replyItem.content }</p>\n </li>\n )) }\n </ul>\n ) : null }\n\n { replyingToId === comment.id ? (\n <div className=\"documentComments__replyForm\">\n <Textarea\n formContext={ formMethods }\n label={ { text: labels.replyTo(comment.author.name) } }\n field={ { id: `${ id }_reply_${ comment.id }`, name: 'reply' } }\n />\n <div className=\"documentComments__actions\">\n <SimpleButton\n id={ `${ id }_cancelReply_${ comment.id }` }\n label={ labels.cancel }\n cssClass=\"button secondary outline compact\"\n onClickHandler={ () => setReplyingToId(null) }\n />\n <SimpleButton\n id={ `${ id }_sendReply_${ comment.id }` }\n label={ labels.sendReply }\n cssClass=\"button primary compact\"\n disabled={ !reply.trim() || isSubmitting }\n onClickHandler={ () => handleReply(comment.id) }\n />\n </div>\n </div>\n ) : (\n <div className=\"documentComments__actions\">\n { comment.anchor && !isDetached && onSelectComment && (\n <SimpleButton\n id={ `${ id }_show_${ comment.id }` }\n label={ labels.showInDocument }\n cssClass=\"button secondary text-only compact\"\n ariaPressed={ isSelected }\n onClickHandler={ () => onSelectComment?.(comment.id) }\n />\n ) }\n { canReply && !comment.resolved && (\n <SimpleButton\n id={ `${ id }_reply_${ comment.id }` }\n label={ labels.reply }\n cssClass=\"button secondary outline compact\"\n onClickHandler={ () => openReply(comment.id) }\n />\n ) }\n { canResolve && (\n <SimpleButton\n id={ `${ id }_resolve_${ comment.id }` }\n label={ comment.resolved ? labels.reopen : labels.resolve }\n cssClass=\"button secondary outline compact\"\n onClickHandler={ () => onToggleResolved?.(comment.id, !comment.resolved) }\n />\n ) }\n </div>\n ) }\n </li>\n );\n };\n\n return (\n <section id={ id } className={ `documentComments ${ customCssClasses.wrapper || '' }`.trim() } aria-label={ labels.heading }>\n <HeaderBar text={ labels.heading } headingLevel={ headingLevel }>\n { headerActions }\n </HeaderBar>\n\n <ToggleGroup\n id={ `${ id }_filter` }\n legend={ labels.filter }\n value={ filter }\n onChange={ setFilter }\n options={ [\n { value: 'open', label: labels.open(openComments.length) },\n { value: 'resolved', label: labels.resolved(resolvedComments.length) }\n ] }\n />\n\n { showNewCommentForm && (\n <div className={ `documentComments__form ${ customCssClasses.form || '' }`.trim() }>\n { pendingAnchor && (\n <blockquote className=\"documentComments__quote\" aria-label={ labels.quoteLabel }>{ pendingAnchor.exact }</blockquote>\n ) }\n <Textarea\n formContext={ formMethods }\n label={ { text: pendingAnchor ? labels.newPinnedComment : labels.newGeneralComment } }\n field={ { id: `${ id }_newComment`, name: 'newComment' } }\n />\n <div className=\"documentComments__actions\">\n { pendingAnchor && (\n <SimpleButton\n id={ `${ id }_cancelPending` }\n label={ labels.cancel }\n cssClass=\"button secondary outline compact\"\n onClickHandler={ handleCancelPending }\n />\n ) }\n <SimpleButton\n id={ `${ id }_post` }\n label={ labels.post }\n cssClass=\"button primary compact\"\n disabled={ !newComment.trim() || isSubmitting }\n onClickHandler={ handlePost }\n />\n </div>\n </div>\n ) }\n\n { displayedComments.length ? (\n <ul className={ `documentComments__list ${ customCssClasses.list || '' }`.trim() }>\n { displayedComments.map(renderThread) }\n </ul>\n ) : (\n <p className=\"documentComments__empty\">{ filter === 'open' ? labels.noOpenComments : labels.noResolvedComments }</p>\n ) }\n </section>\n );\n};\n\nexport default DocumentComments;\n"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,IAAQC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACvE,SAAsBC,OAAO,QAAQ,iBAAiB;AAEtD,SAASC,SAAS,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,kBAAkB;AACpE,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,0BAA0B,QAAQ,kCAAkC;AAE7E,SAASC,WAAW,QAAQ,iCAAiC;AAO7D,OAAO,yBAAyB;AAEhC,OAAO,MAAMC,6BAAqD,GAAG;EACnEC,OAAO,EAAE,UAAU;EACnBC,MAAM,EAAE,eAAe;EACvBC,IAAI,EAAGC,KAAK,IAAK,SAAUA,KAAK,GAAI;EACpCC,QAAQ,EAAGD,KAAK,IAAK,aAAcA,KAAK,GAAI;EAC5CE,gBAAgB,EAAE,8BAA8B;EAChDC,iBAAiB,EAAE,yBAAyB;EAC5CC,IAAI,EAAE,cAAc;EACpBC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAGC,UAAU,IAAK,YAAaA,UAAU,EAAG;EACnDC,SAAS,EAAE,YAAY;EACvBC,OAAO,EAAE,S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M,GAAG+C,MAAM,CAAC9B,cAAc,GAAG8B,MAAM,CAAC7B,kBAAuB,CAE9G,CAAC;AAEd,CAAC;AAED,eAAeQ,gBAAgB","ignoreList":[]}
|
|
File without changes
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
.documentComments {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--documentCommentsGap, var(--documentGap, 10px));
|
|
5
|
+
min-width: 0;
|
|
6
|
+
font-size: var(--documentCommentsFontSize, 0.875rem);
|
|
7
|
+
}
|
|
8
|
+
.documentComments .headerBar {
|
|
9
|
+
margin-bottom: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.documentComments__form,
|
|
13
|
+
.documentComments__replyForm {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: var(--documentCommentsGap, var(--documentGap, 10px));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.documentComments__list,
|
|
20
|
+
.documentComments__replies {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: var(--documentCommentsGap, var(--documentGap, 10px));
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 0;
|
|
26
|
+
list-style: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.documentComments__card {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: var(--documentCommentsGap, var(--documentGap, 10px));
|
|
33
|
+
padding: var(--documentCommentsCardPadding, 15px);
|
|
34
|
+
border: var(--documentCommentsCardBorder, var(--documentBorder));
|
|
35
|
+
border-radius: var(--documentCommentsCardBorderRadius, var(--documentBorderRadius, 5px));
|
|
36
|
+
background: var(--documentCommentsCardBg, var(--documentBg, #fff));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.documentComments__card--selected {
|
|
40
|
+
border-color: var(--documentCommentsSelectedBorderColor, var(--primaryButtonBg, currentColor));
|
|
41
|
+
box-shadow: 0 0 0 var(--documentCommentsSelectedBorderWidth, 2px) var(--documentCommentsSelectedBorderColor, var(--primaryButtonBg, currentColor));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.documentComments__card--resolved {
|
|
45
|
+
opacity: var(--documentCommentsResolvedOpacity, 0.75);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.documentComments__cardHeader {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-wrap: wrap;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
gap: 5px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.documentComments__author {
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.documentComments__date,
|
|
60
|
+
.documentComments__general,
|
|
61
|
+
.documentComments__empty {
|
|
62
|
+
color: var(--documentCommentsMutedColor, var(--documentMutedFgColor));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.documentComments__quote {
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 5px 10px;
|
|
68
|
+
border-left: var(--documentCommentsQuoteBorder, 3px solid var(--statusWarnColor, #fc0));
|
|
69
|
+
background: var(--documentCommentsQuoteBg, var(--documentSubtleBg));
|
|
70
|
+
font-style: italic;
|
|
71
|
+
overflow-wrap: anywhere;
|
|
72
|
+
white-space: pre-line;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.documentComments__general,
|
|
76
|
+
.documentComments__content,
|
|
77
|
+
.documentComments__empty {
|
|
78
|
+
margin: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.documentComments__content {
|
|
82
|
+
overflow-wrap: anywhere;
|
|
83
|
+
white-space: pre-line;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.documentComments__detached {
|
|
87
|
+
margin: 0;
|
|
88
|
+
color: var(--documentCommentsDetachedColor, var(--documentErrorColor, #f00));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.documentComments__replies {
|
|
92
|
+
padding-left: var(--documentCommentsReplyIndent, 15px);
|
|
93
|
+
border-left: var(--documentCommentsCardBorder, var(--documentBorder));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.documentComments__reply {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: 5px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.documentComments__actions {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-wrap: wrap;
|
|
105
|
+
justify-content: flex-end;
|
|
106
|
+
gap: 5px;
|
|
107
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentComments.interfaces.js","names":[],"sources":["../../../../src/widgets/documentComments/documentComments.interfaces.ts"],"sourcesContent":["import { ReactNode } from 'react';\n\nimport { DocumentComment, TextQuoteAnchor } from '../shared/documents/annotations/annotations.interfaces';\n\nexport type DocumentCommentsFilter = 'open' | 'resolved';\n\nexport type NewDocumentComment = {\n content: string;\n // Absent for a general comment about the whole document.\n anchor?: TextQuoteAnchor;\n};\n\nexport type DocumentCommentsLabels = {\n heading: string;\n filter: string;\n /* eslint-disable-next-line no-unused-vars */\n open: (count: number) => string;\n /* eslint-disable-next-line no-unused-vars */\n resolved: (count: number) => string;\n newPinnedComment: string;\n newGeneralComment: string;\n post: string;\n cancel: string;\n reply: string;\n /* eslint-disable-next-line no-unused-vars */\n replyTo: (authorName: string) => string;\n sendReply: string;\n resolve: string;\n reopen: string;\n showInDocument: string;\n detached: string;\n generalComment: string;\n noOpenComments: string;\n noResolvedComments: string;\n quoteLabel: string;\n};\n\nexport type DocumentCommentsCssClasses = {\n wrapper?: string;\n form?: string;\n list?: string;\n card?: string;\n};\n\nexport type DocumentCommentsProps = {\n id: string;\n comments: DocumentComment[];\n headingLevel?: 2 | 3 | 4 | 5;\n selectedCommentId?: string;\n // Text the reader has just selected to comment on; shows a pinned new-comment form.\n pendingAnchor?: TextQuoteAnchor | null;\n // Pinned comments whose quoted text can no longer be found, e.g. from DocumentViewer's onAnchorStatusChange.\n detachedCommentIds?: string[];\n canComment?: boolean;\n canReply?: boolean;\n canResolve?: boolean;\n // Allow comments about the whole document as well as on selected text.\n allowGeneralComments?: boolean;\n initialFilter?: DocumentCommentsFilter;\n // Defaults to the library's dateToShortReadableDate; return null to show the value as given.\n /* eslint-disable-next-line no-unused-vars */\n formatDate?: (value: string) => string | null;\n // Return a promise to keep the form disabled until it settles; the draft is kept if it rejects.\n /* eslint-disable-next-line no-unused-vars */\n onAddComment?: (comment: NewDocumentComment) => void | Promise<void>;\n /* eslint-disable-next-line no-unused-vars */\n onReply?: (commentId: string, content: string) => void | Promise<void>;\n /* eslint-disable-next-line no-unused-vars */\n onToggleResolved?: (commentId: string, resolved: boolean) => void;\n /* eslint-disable-next-line no-unused-vars */\n onSelectComment?: (commentId: string) => void;\n onCancelPending?: () => void;\n // Rendered in the panel header, e.g. a close button.\n headerActions?: ReactNode;\n labels?: Partial<DocumentCommentsLabels>;\n customCssClasses?: DocumentCommentsCssClasses;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["DocumentComments","defaultDocumentCommentsLabels"],"sources":["../../../../src/widgets/documentComments/index.ts"],"sourcesContent":["export { DocumentComments, defaultDocumentCommentsLabels } from './DocumentComments';\n\nexport type {\n DocumentCommentsCssClasses,\n DocumentCommentsFilter,\n DocumentCommentsLabels,\n DocumentCommentsProps,\n NewDocumentComment\n} from './documentComments.interfaces';\n"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,6BAA6B,QAAQ,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import React, { Suspense, useEffect, useMemo, useState } from 'react';
|
|
5
|
+
import { HeaderBar, PageBanner, SimpleButton } from '../../components';
|
|
6
|
+
import { LoadingMessage } from '../../components/design/loadingMessage/LoadingMessage';
|
|
7
|
+
import { DocumentEditor } from '../documentEditor/DocumentEditor';
|
|
8
|
+
import { DocumentViewer } from '../documentViewer/DocumentViewer';
|
|
9
|
+
import { AnnotationLayer } from '../shared/documents/annotations/AnnotationLayer';
|
|
10
|
+
import { dateToShortReadableDate } from '../../helpers/dateHelpers';
|
|
11
|
+
import { resolveDocumentResourceWithFallback } from '../shared/documents/documentHelpers';
|
|
12
|
+
import { LazyDocumentDiff, LazyMarkdownRenderer } from '../shared/documents/engines/lazyEngines';
|
|
13
|
+
import { ToggleGroup } from '../shared/documents/ToggleGroup';
|
|
14
|
+
import { useDocumentContent } from '../shared/documents/useDocumentContent';
|
|
15
|
+
import './documentComparer.css';
|
|
16
|
+
export const defaultDocumentComparerLabels = {
|
|
17
|
+
originalHeading: 'Original',
|
|
18
|
+
revisedHeading: 'Revised',
|
|
19
|
+
viewSelector: 'Comparison view',
|
|
20
|
+
sideBySide: 'Side by side',
|
|
21
|
+
differences: 'Differences',
|
|
22
|
+
diffSelector: 'Difference format',
|
|
23
|
+
formatted: 'Formatted',
|
|
24
|
+
source: 'Markdown source',
|
|
25
|
+
edit: 'Edit',
|
|
26
|
+
save: 'Save changes',
|
|
27
|
+
cancel: 'Cancel',
|
|
28
|
+
version: 'Version',
|
|
29
|
+
lastModified: 'Last modified',
|
|
30
|
+
notRecorded: 'Not recorded',
|
|
31
|
+
loadingHeading: 'Loading',
|
|
32
|
+
loadingMessage: 'Loading document',
|
|
33
|
+
loadError: 'The revised document could not be loaded.',
|
|
34
|
+
noSourcePreview: 'No preview of the original document is available.',
|
|
35
|
+
added: 'Added',
|
|
36
|
+
removed: 'Removed',
|
|
37
|
+
noChanges: 'There are no differences between the documents.',
|
|
38
|
+
diffSummary: (added, removed) => `${added} added, ${removed} removed`,
|
|
39
|
+
pageImageAlt: (page, total, title) => `Page ${page} of ${total} of ${title}`
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/*
|
|
43
|
+
DocumentComparer shows an original document beside a revised markdown version, or the
|
|
44
|
+
differences between the revised version and a baseline, and optionally lets the revised version
|
|
45
|
+
be edited. Review and lifecycle workflow belongs to the host application, which supplies it
|
|
46
|
+
through the action slots.
|
|
47
|
+
*/
|
|
48
|
+
export const DocumentComparer = ({
|
|
49
|
+
id,
|
|
50
|
+
title,
|
|
51
|
+
headingLevel = 2,
|
|
52
|
+
originalDocument,
|
|
53
|
+
revisedDocument,
|
|
54
|
+
baselineMarkdown,
|
|
55
|
+
initialView = 'sideBySide',
|
|
56
|
+
initialDiffView = 'rendered',
|
|
57
|
+
revisedPosition = 'start',
|
|
58
|
+
enableEditing = false,
|
|
59
|
+
onChange,
|
|
60
|
+
onSave,
|
|
61
|
+
editorProps = {},
|
|
62
|
+
originalRenderers,
|
|
63
|
+
resolveResourceUrl,
|
|
64
|
+
trustedPdfOrigins,
|
|
65
|
+
formatDate = dateToShortReadableDate,
|
|
66
|
+
headerActions,
|
|
67
|
+
originalPanelActions,
|
|
68
|
+
revisedPanelActions,
|
|
69
|
+
footerActions,
|
|
70
|
+
annotations,
|
|
71
|
+
labels: customLabels,
|
|
72
|
+
customCssClasses = {}
|
|
73
|
+
}) => {
|
|
74
|
+
const labels = useMemo(() => ({
|
|
75
|
+
...defaultDocumentComparerLabels,
|
|
76
|
+
...customLabels
|
|
77
|
+
}), [customLabels]);
|
|
78
|
+
const revisedContent = useDocumentContent(revisedDocument, 'markdown');
|
|
79
|
+
const loadedMarkdown = revisedContent.loaded?.content;
|
|
80
|
+
const [savedMarkdown, setSavedMarkdown] = useState(undefined);
|
|
81
|
+
const [draftMarkdown, setDraftMarkdown] = useState(undefined);
|
|
82
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
83
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
84
|
+
const [view, setView] = useState(initialView);
|
|
85
|
+
const [diffView, setDiffView] = useState(initialDiffView);
|
|
86
|
+
|
|
87
|
+
// A newly loaded revised document replaces any local edits made to the previous one.
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
setSavedMarkdown(loadedMarkdown);
|
|
90
|
+
setDraftMarkdown(loadedMarkdown);
|
|
91
|
+
setIsEditing(false);
|
|
92
|
+
}, [loadedMarkdown]);
|
|
93
|
+
const currentMarkdown = (isEditing ? draftMarkdown : savedMarkdown) ?? '';
|
|
94
|
+
const baseline = baselineMarkdown ?? loadedMarkdown ?? '';
|
|
95
|
+
const isDirty = draftMarkdown !== savedMarkdown;
|
|
96
|
+
const panelHeadingLevel = Math.min(headingLevel + 1, 6);
|
|
97
|
+
const resolveRevisedResource = resource => resolveDocumentResourceWithFallback(resource, revisedDocument.url, resolveResourceUrl);
|
|
98
|
+
const handleDraftChange = markdown => {
|
|
99
|
+
setDraftMarkdown(markdown);
|
|
100
|
+
onChange?.(markdown);
|
|
101
|
+
};
|
|
102
|
+
const handleCancel = () => {
|
|
103
|
+
setDraftMarkdown(savedMarkdown);
|
|
104
|
+
setIsEditing(false);
|
|
105
|
+
};
|
|
106
|
+
const handleSave = async () => {
|
|
107
|
+
const markdown = draftMarkdown ?? '';
|
|
108
|
+
setIsSaving(true);
|
|
109
|
+
try {
|
|
110
|
+
await onSave?.({
|
|
111
|
+
markdown,
|
|
112
|
+
baselineMarkdown: baseline
|
|
113
|
+
});
|
|
114
|
+
setSavedMarkdown(markdown);
|
|
115
|
+
setIsEditing(false);
|
|
116
|
+
} catch {
|
|
117
|
+
// The host's onSave reports the failure; staying in edit mode keeps the draft so it can be retried.
|
|
118
|
+
} finally {
|
|
119
|
+
setIsSaving(false);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const loadingIndicator = /*#__PURE__*/React.createElement(LoadingMessage, {
|
|
123
|
+
heading: labels.loadingHeading,
|
|
124
|
+
loadingMessage: labels.loadingMessage,
|
|
125
|
+
isInline: true
|
|
126
|
+
});
|
|
127
|
+
const renderMetadata = document => /*#__PURE__*/React.createElement("dl", {
|
|
128
|
+
className: "documentComparer__metadata"
|
|
129
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("dt", null, labels.version), /*#__PURE__*/React.createElement("dd", null, document.version || labels.notRecorded)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("dt", null, labels.lastModified), /*#__PURE__*/React.createElement("dd", null, document.lastModified ? formatDate(document.lastModified) ?? document.lastModified : labels.notRecorded)));
|
|
130
|
+
const renderPanel = (panel, document, heading, body, actions) => {
|
|
131
|
+
const cssClass = panel === 'original' ? customCssClasses.originalPanel : customCssClasses.revisedPanel;
|
|
132
|
+
return /*#__PURE__*/React.createElement("article", {
|
|
133
|
+
className: `documentComparer__panel documentComparer__panel--${panel} ${cssClass || ''}`.trim(),
|
|
134
|
+
"aria-label": heading
|
|
135
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
136
|
+
className: "documentComparer__panelHeader"
|
|
137
|
+
}, /*#__PURE__*/React.createElement(HeaderBar, {
|
|
138
|
+
text: heading,
|
|
139
|
+
headingLevel: panelHeadingLevel
|
|
140
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
141
|
+
className: "documentComparer__documentTitle"
|
|
142
|
+
}, document.title), renderMetadata(document)), /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: "documentComparer__panelBody"
|
|
144
|
+
}, body), actions && /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
className: "documentComparer__panelActions"
|
|
146
|
+
}, actions));
|
|
147
|
+
};
|
|
148
|
+
const renderOriginalBody = () => {
|
|
149
|
+
const {
|
|
150
|
+
pageImages = []
|
|
151
|
+
} = originalDocument;
|
|
152
|
+
if (pageImages.length) {
|
|
153
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
154
|
+
className: "documentComparer__pages"
|
|
155
|
+
}, pageImages.map((pageUrl, pageIndex) => /*#__PURE__*/React.createElement("img", {
|
|
156
|
+
key: pageUrl,
|
|
157
|
+
src: pageUrl,
|
|
158
|
+
alt: labels.pageImageAlt(pageIndex + 1, pageImages.length, originalDocument.title),
|
|
159
|
+
loading: "lazy"
|
|
160
|
+
})));
|
|
161
|
+
}
|
|
162
|
+
if (!originalDocument.file && !originalDocument.url && originalDocument.text === undefined) {
|
|
163
|
+
return /*#__PURE__*/React.createElement("p", {
|
|
164
|
+
className: "documentComparer__message"
|
|
165
|
+
}, labels.noSourcePreview);
|
|
166
|
+
}
|
|
167
|
+
return /*#__PURE__*/React.createElement(DocumentViewer, {
|
|
168
|
+
id: `${id}_originalViewer`,
|
|
169
|
+
document: originalDocument,
|
|
170
|
+
showHeader: false,
|
|
171
|
+
showMetadata: false,
|
|
172
|
+
contentHeadingOffset: panelHeadingLevel,
|
|
173
|
+
renderers: originalRenderers,
|
|
174
|
+
resolveResourceUrl: resolveResourceUrl,
|
|
175
|
+
trustedPdfOrigins: trustedPdfOrigins,
|
|
176
|
+
customCssClasses: {
|
|
177
|
+
wrapper: 'documentComparer__viewer'
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
const renderRevisedBody = () => {
|
|
182
|
+
if (revisedContent.status === 'error') {
|
|
183
|
+
return /*#__PURE__*/React.createElement(PageBanner, {
|
|
184
|
+
id: `${id}_revisedError`,
|
|
185
|
+
type: "error",
|
|
186
|
+
icon: "warning",
|
|
187
|
+
displayMode: "inline",
|
|
188
|
+
animation: "none",
|
|
189
|
+
disableClose: true
|
|
190
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
191
|
+
role: "alert"
|
|
192
|
+
}, labels.loadError));
|
|
193
|
+
}
|
|
194
|
+
if (revisedContent.status !== 'ready') {
|
|
195
|
+
return loadingIndicator;
|
|
196
|
+
}
|
|
197
|
+
if (isEditing) {
|
|
198
|
+
return /*#__PURE__*/React.createElement(DocumentEditor, _extends({
|
|
199
|
+
id: `${id}_editor`,
|
|
200
|
+
label: `${labels.edit}: ${revisedDocument.title}`,
|
|
201
|
+
hideLabel: true,
|
|
202
|
+
markdown: currentMarkdown,
|
|
203
|
+
baselineMarkdown: baseline,
|
|
204
|
+
onChange: handleDraftChange,
|
|
205
|
+
resolveResourceUrl: resolveRevisedResource,
|
|
206
|
+
annotations: annotations
|
|
207
|
+
}, editorProps));
|
|
208
|
+
}
|
|
209
|
+
const renderer = /*#__PURE__*/React.createElement(Suspense, {
|
|
210
|
+
fallback: loadingIndicator
|
|
211
|
+
}, /*#__PURE__*/React.createElement(LazyMarkdownRenderer, {
|
|
212
|
+
markdown: currentMarkdown,
|
|
213
|
+
headingOffset: panelHeadingLevel,
|
|
214
|
+
resolveResourceUrl: resolveRevisedResource
|
|
215
|
+
}));
|
|
216
|
+
return annotations ? /*#__PURE__*/React.createElement(AnnotationLayer, _extends({}, annotations, {
|
|
217
|
+
id: `${id}_annotations`
|
|
218
|
+
}), renderer) : renderer;
|
|
219
|
+
};
|
|
220
|
+
const editingActions = enableEditing && revisedContent.status === 'ready' && (isEditing ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SimpleButton, {
|
|
221
|
+
id: `${id}_cancel`,
|
|
222
|
+
label: labels.cancel,
|
|
223
|
+
cssClass: "button secondary outline compact",
|
|
224
|
+
onClickHandler: handleCancel
|
|
225
|
+
}), /*#__PURE__*/React.createElement(SimpleButton, {
|
|
226
|
+
id: `${id}_save`,
|
|
227
|
+
label: labels.save,
|
|
228
|
+
cssClass: "button primary compact",
|
|
229
|
+
disabled: !isDirty || isSaving,
|
|
230
|
+
onClickHandler: handleSave
|
|
231
|
+
})) : /*#__PURE__*/React.createElement(SimpleButton, {
|
|
232
|
+
id: `${id}_edit`,
|
|
233
|
+
label: labels.edit,
|
|
234
|
+
cssClass: "button secondary compact",
|
|
235
|
+
onClickHandler: () => setIsEditing(true)
|
|
236
|
+
}));
|
|
237
|
+
const revisedActions = (editingActions || revisedPanelActions) && /*#__PURE__*/React.createElement(React.Fragment, null, revisedPanelActions, editingActions);
|
|
238
|
+
const panels = [/*#__PURE__*/React.createElement(React.Fragment, {
|
|
239
|
+
key: "revised"
|
|
240
|
+
}, renderPanel('revised', revisedDocument, labels.revisedHeading, renderRevisedBody(), revisedActions)), /*#__PURE__*/React.createElement(React.Fragment, {
|
|
241
|
+
key: "original"
|
|
242
|
+
}, renderPanel('original', originalDocument, labels.originalHeading, renderOriginalBody(), originalPanelActions))];
|
|
243
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
244
|
+
id: id,
|
|
245
|
+
className: `documentComparer ${customCssClasses.wrapper || ''}`.trim(),
|
|
246
|
+
"aria-label": title
|
|
247
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
248
|
+
className: `documentComparer__header ${customCssClasses.header || ''}`.trim()
|
|
249
|
+
}, /*#__PURE__*/React.createElement(HeaderBar, {
|
|
250
|
+
text: title,
|
|
251
|
+
headingLevel: headingLevel
|
|
252
|
+
}, headerActions), /*#__PURE__*/React.createElement("div", {
|
|
253
|
+
className: "documentComparer__controls"
|
|
254
|
+
}, /*#__PURE__*/React.createElement(ToggleGroup, {
|
|
255
|
+
id: `${id}_view`,
|
|
256
|
+
legend: labels.viewSelector,
|
|
257
|
+
value: view,
|
|
258
|
+
onChange: setView,
|
|
259
|
+
options: [{
|
|
260
|
+
value: 'sideBySide',
|
|
261
|
+
label: labels.sideBySide
|
|
262
|
+
}, {
|
|
263
|
+
value: 'differences',
|
|
264
|
+
label: labels.differences
|
|
265
|
+
}]
|
|
266
|
+
}), view === 'differences' && /*#__PURE__*/React.createElement(ToggleGroup, {
|
|
267
|
+
id: `${id}_diffView`,
|
|
268
|
+
legend: labels.diffSelector,
|
|
269
|
+
value: diffView,
|
|
270
|
+
onChange: setDiffView,
|
|
271
|
+
options: [{
|
|
272
|
+
value: 'rendered',
|
|
273
|
+
label: labels.formatted
|
|
274
|
+
}, {
|
|
275
|
+
value: 'source',
|
|
276
|
+
label: labels.source
|
|
277
|
+
}]
|
|
278
|
+
}))), view === 'sideBySide' && /*#__PURE__*/React.createElement("div", {
|
|
279
|
+
className: `documentComparer__columns ${customCssClasses.columns || ''}`.trim()
|
|
280
|
+
}, revisedPosition === 'start' ? panels : [...panels].reverse()), view === 'differences' && /*#__PURE__*/React.createElement("div", {
|
|
281
|
+
className: `documentComparer__differences ${customCssClasses.differences || ''}`.trim()
|
|
282
|
+
}, revisedContent.status === 'ready' ? /*#__PURE__*/React.createElement(Suspense, {
|
|
283
|
+
fallback: loadingIndicator
|
|
284
|
+
}, /*#__PURE__*/React.createElement(LazyDocumentDiff, {
|
|
285
|
+
baseline: baseline,
|
|
286
|
+
revised: currentMarkdown,
|
|
287
|
+
view: diffView,
|
|
288
|
+
headingOffset: headingLevel,
|
|
289
|
+
resolveResourceUrl: resolveRevisedResource,
|
|
290
|
+
labels: {
|
|
291
|
+
added: labels.added,
|
|
292
|
+
removed: labels.removed,
|
|
293
|
+
noChanges: labels.noChanges,
|
|
294
|
+
summary: labels.diffSummary
|
|
295
|
+
}
|
|
296
|
+
})) : renderRevisedBody()), footerActions && /*#__PURE__*/React.createElement("div", {
|
|
297
|
+
className: `documentComparer__footer ${customCssClasses.footer || ''}`.trim()
|
|
298
|
+
}, footerActions));
|
|
299
|
+
};
|
|
300
|
+
export default DocumentComparer;
|
|
301
|
+
//# sourceMappingURL=DocumentComparer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentComparer.js","names":["_extends","React","Suspense","useEffect","useMemo","useState","HeaderBar","PageBanner","SimpleButton","LoadingMessage","DocumentEditor","DocumentViewer","AnnotationLayer","dateToShortReadableDate","resolveDocumentResourceWithFallback","LazyDocumentDiff","LazyMarkdownRenderer","ToggleGroup","useDocumentContent","defaultDocumentComparerLabels","originalHeading","revisedHeading","viewSelector","sideBySide","differences","diffSelector","formatted","source","edit","save","cancel","version","lastModified","notRecorded","loadingHeading","loadingMessage","loadError","noSourcePreview","added","removed","noChanges","diffSummary","pageImageAlt","page","total","title","DocumentComparer","id","headingLevel","originalDocument","revisedDocument","baselineMarkdown","initialView","initialDiffView","revisedPosition","enableEditing","onChange","onSave","editorProps","originalRenderers","resolveResourceUrl","trustedPdfOrigins","formatDate","headerActions","originalPanelActions","revisedPanelActions","footerActions","annotations","labels","customLabels","customCssClasses","revisedContent","loadedMarkdown","loaded","content","savedMarkdown","setSavedMarkdown","undefined","draftMarkdown","setDraftMarkdown","isEditing","setIsEditing","isSaving","setIsSaving","view","setView","diffView","setDiffView","currentMarkdown","baseline","isDirty","panelHeadingLevel","Math","min","resolveRevisedResource","resource","url","handleDraftChange","markdown","handleCancel","handleSave","loadingIndicator","createElement","heading","isInline","renderMetadata","document","className","renderPanel","panel","body","actions","cssClass","originalPanel","revisedPanel","trim","text","renderOriginalBody","pageImages","length","map","pageUrl","pageIndex","key","src","alt","loading","file","showHeader","showMetadata","contentHeadingOffset","renderers","wrapper","renderRevisedBody","status","type","icon","displayMode","animation","disableClose","role","label","hideLabel","renderer","fallback","headingOffset","editingActions","Fragment","onClickHandler","disabled","revisedActions","panels","header","legend","value","options","columns","reverse","revised","summary","footer"],"sources":["../../../../src/widgets/documentComparer/DocumentComparer.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC, ReactNode, Suspense, useEffect, useMemo, useState } from 'react';\n\nimport { HeaderBar, PageBanner, SimpleButton } from '../../components';\nimport { LoadingMessage } from '../../components/design/loadingMessage/LoadingMessage';\nimport { DocumentEditor } from '../documentEditor/DocumentEditor';\nimport { DocumentViewer } from '../documentViewer/DocumentViewer';\nimport { AnnotationLayer } from '../shared/documents/annotations/AnnotationLayer';\nimport { dateToShortReadableDate } from '../../helpers/dateHelpers';\nimport { resolveDocumentResourceWithFallback } from '../shared/documents/documentHelpers';\nimport { LazyDocumentDiff, LazyMarkdownRenderer } from '../shared/documents/engines/lazyEngines';\nimport { ToggleGroup } from '../shared/documents/ToggleGroup';\nimport { useDocumentContent } from '../shared/documents/useDocumentContent';\nimport {\n ComparisonDocument,\n DocumentComparerLabels,\n DocumentComparerProps,\n DocumentComparerView,\n DocumentDiffView\n} from './documentComparer.interfaces';\n\nimport './documentComparer.scss';\n\n\nexport const defaultDocumentComparerLabels: DocumentComparerLabels = {\n originalHeading: 'Original',\n revisedHeading: 'Revised',\n viewSelector: 'Comparison view',\n sideBySide: 'Side by side',\n differences: 'Differences',\n diffSelector: 'Difference format',\n formatted: 'Formatted',\n source: 'Markdown source',\n edit: 'Edit',\n save: 'Save changes',\n cancel: 'Cancel',\n version: 'Version',\n lastModified: 'Last modified',\n notRecorded: 'Not recorded',\n loadingHeading: 'Loading',\n loadingMessage: 'Loading document',\n loadError: 'The revised document could not be loaded.',\n noSourcePreview: 'No preview of the original document is available.',\n added: 'Added',\n removed: 'Removed',\n noChanges: 'There are no differences between the documents.',\n diffSummary: (added, removed) => `${ added } added, ${ removed } removed`,\n pageImageAlt: (page, total, title) => `Page ${ page } of ${ total } of ${ title }`\n};\n\n/*\n DocumentComparer shows an original document beside a revised markdown version, or the\n differences between the revised version and a baseline, and optionally lets the revised version\n be edited. Review and lifecycle workflow belongs to the host application, which supplies it\n through the action slots.\n */\nexport const DocumentComparer: FC<DocumentComparerProps> = (\n {\n id,\n title,\n headingLevel = 2,\n originalDocument,\n revisedDocument,\n baselineMarkdown,\n initialView = 'sideBySide',\n initialDiffView = 'rendered',\n revisedPosition = 'start',\n enableEditing = false,\n onChange,\n onSave,\n editorProps = {},\n originalRenderers,\n resolveResourceUrl,\n trustedPdfOrigins,\n formatDate = dateToShortReadableDate,\n headerActions,\n originalPanelActions,\n revisedPanelActions,\n footerActions,\n annotations,\n labels: customLabels,\n customCssClasses = {}\n }\n) => {\n const labels = useMemo(() => ({ ...defaultDocumentComparerLabels, ...customLabels }), [customLabels]);\n const revisedContent = useDocumentContent(revisedDocument, 'markdown');\n const loadedMarkdown = revisedContent.loaded?.content;\n\n const [savedMarkdown, setSavedMarkdown] = useState<string | undefined>(undefined);\n const [draftMarkdown, setDraftMarkdown] = useState<string | undefined>(undefined);\n const [isEditing, setIsEditing] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [view, setView] = useState<DocumentComparerView>(initialView);\n const [diffView, setDiffView] = useState<DocumentDiffView>(initialDiffView);\n\n // A newly loaded revised document replaces any local edits made to the previous one.\n useEffect(() => {\n setSavedMarkdown(loadedMarkdown);\n setDraftMarkdown(loadedMarkdown);\n setIsEditing(false);\n }, [loadedMarkdown]);\n\n const currentMarkdown = (isEditing ? draftMarkdown : savedMarkdown) ?? '';\n const baseline = baselineMarkdown ?? loadedMarkdown ?? '';\n const isDirty = draftMarkdown !== savedMarkdown;\n const panelHeadingLevel = Math.min(headingLevel + 1, 6) as 2 | 3 | 4 | 5;\n\n const resolveRevisedResource = (resource: string) =>\n resolveDocumentResourceWithFallback(resource, revisedDocument.url, resolveResourceUrl);\n\n const handleDraftChange = (markdown: string) => {\n setDraftMarkdown(markdown);\n onChange?.(markdown);\n };\n\n const handleCancel = () => {\n setDraftMarkdown(savedMarkdown);\n setIsEditing(false);\n };\n\n const handleSave = async () => {\n const markdown = draftMarkdown ?? '';\n setIsSaving(true);\n try {\n await onSave?.({ markdown, baselineMarkdown: baseline });\n setSavedMarkdown(markdown);\n setIsEditing(false);\n } catch {\n // The host's onSave reports the failure; staying in edit mode keeps the draft so it can be retried.\n } finally {\n setIsSaving(false);\n }\n };\n\n const loadingIndicator = <LoadingMessage heading={ labels.loadingHeading } loadingMessage={ labels.loadingMessage } isInline />;\n\n const renderMetadata = (document: ComparisonDocument) => (\n <dl className=\"documentComparer__metadata\">\n <div>\n <dt>{ labels.version }</dt>\n <dd>{ document.version || labels.notRecorded }</dd>\n </div>\n <div>\n <dt>{ labels.lastModified }</dt>\n <dd>{ document.lastModified ? formatDate(document.lastModified) ?? document.lastModified : labels.notRecorded }</dd>\n </div>\n </dl>\n );\n\n const renderPanel = (\n panel: 'original' | 'revised',\n document: ComparisonDocument,\n heading: string,\n body: ReactNode,\n actions: ReactNode\n ) => {\n const cssClass = panel === 'original' ? customCssClasses.originalPanel : customCssClasses.revisedPanel;\n return (\n <article className={ `documentComparer__panel documentComparer__panel--${ panel } ${ cssClass || '' }`.trim() } aria-label={ heading }>\n <div className=\"documentComparer__panelHeader\">\n <HeaderBar text={ heading } headingLevel={ panelHeadingLevel } />\n <p className=\"documentComparer__documentTitle\">{ document.title }</p>\n { renderMetadata(document) }\n </div>\n <div className=\"documentComparer__panelBody\">{ body }</div>\n { actions && <div className=\"documentComparer__panelActions\">{ actions }</div> }\n </article>\n );\n };\n\n const renderOriginalBody = (): ReactNode => {\n const { pageImages = [] } = originalDocument;\n if (pageImages.length) {\n return (\n <div className=\"documentComparer__pages\">\n { pageImages.map((pageUrl, pageIndex) => (\n <img\n key={ pageUrl }\n src={ pageUrl }\n alt={ labels.pageImageAlt(pageIndex + 1, pageImages.length, originalDocument.title) }\n loading=\"lazy\"\n />\n )) }\n </div>\n );\n }\n if (!originalDocument.file && !originalDocument.url && originalDocument.text === undefined) {\n return <p className=\"documentComparer__message\">{ labels.noSourcePreview }</p>;\n }\n return (\n <DocumentViewer\n id={ `${ id }_originalViewer` }\n document={ originalDocument }\n showHeader={ false }\n showMetadata={ false }\n contentHeadingOffset={ panelHeadingLevel }\n renderers={ originalRenderers }\n resolveResourceUrl={ resolveResourceUrl }\n trustedPdfOrigins={ trustedPdfOrigins }\n customCssClasses={ { wrapper: 'documentComparer__viewer' } }\n />\n );\n };\n\n const renderRevisedBody = (): ReactNode => {\n if (revisedContent.status === 'error') {\n return (\n <PageBanner id={ `${ id }_revisedError` } type=\"error\" icon=\"warning\" displayMode=\"inline\" animation=\"none\" disableClose>\n <span role=\"alert\">{ labels.loadError }</span>\n </PageBanner>\n );\n }\n if (revisedContent.status !== 'ready') {\n return loadingIndicator;\n }\n if (isEditing) {\n return (\n <DocumentEditor\n id={ `${ id }_editor` }\n label={ `${ labels.edit }: ${ revisedDocument.title }` }\n hideLabel\n markdown={ currentMarkdown }\n baselineMarkdown={ baseline }\n onChange={ handleDraftChange }\n resolveResourceUrl={ resolveRevisedResource }\n annotations={ annotations }\n { ...editorProps }\n />\n );\n }\n const renderer = (\n <Suspense fallback={ loadingIndicator }>\n <LazyMarkdownRenderer\n markdown={ currentMarkdown }\n headingOffset={ panelHeadingLevel }\n resolveResourceUrl={ resolveRevisedResource }\n />\n </Suspense>\n );\n return annotations\n ? <AnnotationLayer { ...annotations } id={ `${ id }_annotations` }>{ renderer }</AnnotationLayer>\n : renderer;\n };\n\n const editingActions = enableEditing && revisedContent.status === 'ready' && (\n isEditing ? (\n <>\n <SimpleButton id={ `${ id }_cancel` } label={ labels.cancel } cssClass=\"button secondary outline compact\" onClickHandler={ handleCancel } />\n <SimpleButton\n id={ `${ id }_save` }\n label={ labels.save }\n cssClass=\"button primary compact\"\n disabled={ !isDirty || isSaving }\n onClickHandler={ handleSave }\n />\n </>\n ) : (\n <SimpleButton id={ `${ id }_edit` } label={ labels.edit } cssClass=\"button secondary compact\" onClickHandler={ () => setIsEditing(true) } />\n )\n );\n\n const revisedActions = (editingActions || revisedPanelActions) && (\n <>\n { revisedPanelActions }\n { editingActions }\n </>\n );\n\n const panels = [\n <React.Fragment key=\"revised\">\n { renderPanel('revised', revisedDocument, labels.revisedHeading, renderRevisedBody(), revisedActions) }\n </React.Fragment>,\n <React.Fragment key=\"original\">\n { renderPanel('original', originalDocument, labels.originalHeading, renderOriginalBody(), originalPanelActions) }\n </React.Fragment>\n ];\n\n return (\n <section id={ id } className={ `documentComparer ${ customCssClasses.wrapper || '' }`.trim() } aria-label={ title }>\n <div className={ `documentComparer__header ${ customCssClasses.header || '' }`.trim() }>\n <HeaderBar text={ title } headingLevel={ headingLevel }>\n { headerActions }\n </HeaderBar>\n <div className=\"documentComparer__controls\">\n <ToggleGroup\n id={ `${ id }_view` }\n legend={ labels.viewSelector }\n value={ view }\n onChange={ setView }\n options={ [{ value: 'sideBySide', label: labels.sideBySide }, { value: 'differences', label: labels.differences }] }\n />\n { view === 'differences' && (\n <ToggleGroup\n id={ `${ id }_diffView` }\n legend={ labels.diffSelector }\n value={ diffView }\n onChange={ setDiffView }\n options={ [{ value: 'rendered', label: labels.formatted }, { value: 'source', label: labels.source }] }\n />\n ) }\n </div>\n </div>\n\n { view === 'sideBySide' && (\n <div className={ `documentComparer__columns ${ customCssClasses.columns || '' }`.trim() }>\n { revisedPosition === 'start' ? panels : [...panels].reverse() }\n </div>\n ) }\n\n { view === 'differences' && (\n <div className={ `documentComparer__differences ${ customCssClasses.differences || '' }`.trim() }>\n { revisedContent.status === 'ready' ? (\n <Suspense fallback={ loadingIndicator }>\n <LazyDocumentDiff\n baseline={ baseline }\n revised={ currentMarkdown }\n view={ diffView }\n headingOffset={ headingLevel }\n resolveResourceUrl={ resolveRevisedResource }\n labels={ {\n added: labels.added,\n removed: labels.removed,\n noChanges: labels.noChanges,\n summary: labels.diffSummary\n } }\n />\n </Suspense>\n ) : renderRevisedBody() }\n </div>\n ) }\n\n { footerActions && <div className={ `documentComparer__footer ${ customCssClasses.footer || '' }`.trim() }>{ footerActions }</div> }\n </section>\n );\n};\n\nexport default DocumentComparer;\n"],"mappings":"AAAA,YAAY;;AAAC,OAAAA,QAAA;AAEb,OAAOC,KAAK,IAAmBC,QAAQ,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAEpF,SAASC,SAAS,EAAEC,UAAU,EAAEC,YAAY,QAAQ,kBAAkB;AACtE,SAASC,cAAc,QAAQ,uDAAuD;AACtF,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,eAAe,QAAQ,iDAAiD;AACjF,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,mCAAmC,QAAQ,qCAAqC;AACzF,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,yCAAyC;AAChG,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SAASC,kBAAkB,QAAQ,wCAAwC;AAS3E,OAAO,yBAAyB;AAGhC,OAAO,MAAMC,6BAAqD,GAAG;EACnEC,eAAe,EAAE,UAAU;EAC3BC,cAAc,EAAE,SAAS;EACzBC,YAAY,EAAE,iBAAiB;EAC/BC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