@syncfusion/ej2-documenteditor
Version:
Feature-rich document editor control with built-in support for context menu, options pane and dialogs.
83 lines (82 loc) • 2.94 kB
JavaScript
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';
export var TABLE_PROPERTIES_GROUP_ID = '_table_properties_group';
export var TABLE_PROPERTIES_BUTTON_ID = '_table_properties_button';
/**
* Represents the Table Properties Group in Table Layout tab
* @private
*/
var TablePropertiesGroup = /** @class */ (function (_super) {
__extends(TablePropertiesGroup, _super);
/**
* Constructor for the TablePropertiesGroup
*
* @param {DocumentEditorContainer} container - DocumentEditorContainer instance
*/
function TablePropertiesGroup(container) {
return _super.call(this, container) || this;
}
/**
* Gets the ribbon group model for Table Properties
*
* @returns {RibbonGroupModel} The ribbon group model
*/
TablePropertiesGroup.prototype.getGroupModel = function () {
return {
id: this.ribbonId + TABLE_PROPERTIES_GROUP_ID,
header: this.localObj.getConstant('Table'),
enableGroupOverflow: true,
overflowHeader: this.localObj.getConstant('Table'),
collections: [
{
items: [
this.getTablePropertiesButton()
]
}
]
};
};
/**
* Gets the Table Properties button model
*
* @returns {RibbonItemModel} The ribbon item model
*/
TablePropertiesGroup.prototype.getTablePropertiesButton = function () {
var _this = this;
return {
type: 'Button',
id: this.ribbonId + TABLE_PROPERTIES_BUTTON_ID,
keyTip: 'TP',
buttonSettings: {
content: this.localObj.getConstant('Properties'),
iconCss: 'e-icons e-de-ctnr-table',
clicked: function () { return _this.openTablePropertiesDialog(); }
},
ribbonTooltipSettings: {
content: this.localObj.getConstant('Show the Table Properties dialog')
}
};
};
/**
* Opens the table properties dialog
*
* @returns {void}
*/
TablePropertiesGroup.prototype.openTablePropertiesDialog = function () {
this.documentEditor.showDialog('TableProperties');
};
return TablePropertiesGroup;
}(RibbonGroupBase));
export { TablePropertiesGroup };