UNPKG

@syncfusion/ej2-documenteditor

Version:

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

75 lines (74 loc) 2.83 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import { RibbonGroupBase } from '../ribbon-interfaces'; import { RibbonItemType, ItemOrientation } from '@syncfusion/ej2-ribbon'; // Constants for UI element IDs export var CLOSE_GROUP_ID = '_close_group'; export var CLOSE_BUTTON_ID = '_close_button'; /** * Represents the Close Group in Header & Footer tab * @private */ var CloseGroup = /** @class */ (function (_super) { __extends(CloseGroup, _super); /** * Constructor for the CloseGroup * @param {DocumentEditorContainer} container - DocumentEditorContainer instance */ function CloseGroup(container) { return _super.call(this, container) || this; } /** * Gets the ribbon group model for Close * @returns {RibbonGroupModel} The ribbon group model */ CloseGroup.prototype.getGroupModel = function () { var _this = this; return { id: this.ribbonId + CLOSE_GROUP_ID, header: this.localObj.getConstant('Close'), orientation: ItemOrientation.Row, enableGroupOverflow: true, overflowHeader: this.localObj.getConstant('Close'), collections: [ { items: [ { type: RibbonItemType.Button, id: this.ribbonId + CLOSE_BUTTON_ID, keyTip: 'C', buttonSettings: { content: this.localObj.getConstant('Close'), iconCss: 'e-icons e-de-ctnr-close', clicked: function () { return _this.closeHeaderFooter(); } }, ribbonTooltipSettings: { content: this.localObj.getConstant('Close header and footer view') } } ] } ] }; }; /** * Closes the header and footer editor * @returns {void} */ CloseGroup.prototype.closeHeaderFooter = function () { this.documentEditor.selection.closeHeaderFooter(); }; return CloseGroup; }(RibbonGroupBase)); export { CloseGroup };