UNPKG

@syncfusion/ej2-documenteditor

Version:

Feature-rich document editor control with built-in support for context menu, options pane and dialogs.

77 lines (76 loc) 2.41 kB
import { CommentsGroup } from './comments-group'; import { TrackingGroup } from './tracking-group'; import { ProtectGroup } from './protect-group'; /** * Constants for tab identification */ export var REVIEW_TAB_ID = '_review_tab'; /** * ReviewTab module * @private */ var ReviewTab = /** @class */ (function () { /** * Constructor for ReviewTab class * @param {DocumentEditorContainer} container - DocumentEditorContainer instance */ function ReviewTab(container) { this.container = container; this.ribbonId = this.container.element.id + '_ribbon'; // Initialize group instances this.commentsGroup = new CommentsGroup(container); this.trackingGroup = new TrackingGroup(container); this.protectGroup = new ProtectGroup(container); } /** * Get the Review tab configuration * @returns {RibbonTabModel} - Review tab configuration * @private */ ReviewTab.prototype.getReviewTab = function () { return { id: this.ribbonId + REVIEW_TAB_ID, keyTip: 'R', header: this.container.localObj.getConstant('Review'), groups: [ this.commentsGroup.getGroupModel(), this.trackingGroup.getGroupModel(), this.protectGroup.getGroupModel() ] }; }; /** * Update UI when selection changes in the document * @returns {void} * @private */ ReviewTab.prototype.updateReviewTabOnSelectionChange = function () { // Update all groups based on current selection this.commentsGroup.updateSelection(); this.trackingGroup.updateSelection(); this.protectGroup.updateSelection(); }; /** * Destroy the ReviewTab instance * @returns {void} * @private */ ReviewTab.prototype.destroy = function () { // Clean up group resources if (this.commentsGroup.destroy) { this.commentsGroup.destroy(); } if (this.trackingGroup.destroy) { this.trackingGroup.destroy(); } if (this.protectGroup.destroy) { this.protectGroup.destroy(); } // Clear references this.commentsGroup = undefined; this.trackingGroup = undefined; this.protectGroup = undefined; }; return ReviewTab; }()); export { ReviewTab };