@beyondwork/docx-react-component 1.0.4 → 1.0.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beyondwork/docx-react-component",
3
3
  "publisher": "beyondwork",
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "description": "Embeddable React Word (docx) editor with review, comments, tracked changes, and round-trip OOXML fidelity.",
6
6
  "type": "module",
7
7
  "files": [
@@ -517,6 +517,7 @@ export interface WordReviewEditorProps {
517
517
  readOnly?: boolean;
518
518
  reviewMode?: "editing" | "review";
519
519
  markupDisplay?: "clean" | "simple" | "all";
520
+ showReviewPanel?: boolean;
520
521
  datastore?: EditorDatastoreAdapter;
521
522
  autosave?: AutosaveConfig;
522
523
  onEvent?: (event: WordReviewEditorEvent) => void;
@@ -252,6 +252,7 @@ export const WordReviewEditor = forwardRef<WordReviewEditorRef, WordReviewEditor
252
252
  onWarning,
253
253
  readOnly = false,
254
254
  reviewMode = "review",
255
+ showReviewPanel = true,
255
256
  } = props;
256
257
 
257
258
  const [runtime, setRuntime] = useState<WordReviewEditorRuntime | null>(null);
@@ -623,7 +624,10 @@ export const WordReviewEditor = forwardRef<WordReviewEditorRef, WordReviewEditor
623
624
  }
624
625
 
625
626
  const selectionPreview = summarizeSelectionPreview(snapshot);
626
- const capabilities = deriveCapabilities(snapshot, reviewMode);
627
+ const derivedCapabilities = deriveCapabilities(snapshot, reviewMode);
628
+ const capabilities = showReviewPanel
629
+ ? derivedCapabilities
630
+ : { ...derivedCapabilities, reviewRailVisible: false };
627
631
  const diagnosticsModeMessage = getDiagnosticsModeMessage(loadError ?? snapshot.fatalError);
628
632
  const accessibilityInstructionsId = `${documentId}-accessibility-instructions`;
629
633
  const accessibilityStatusId = `${documentId}-accessibility-status`;