all files / document-editor-container/ribbon/developer-tab/ developer-tab.js

97.14% Statements 34/35
50% Branches 4/8
85.71% Functions 6/7
97.14% Lines 34/35
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62   14× 14× 14× 14× 14× 14×               14×                       68× 68× 68× 68×   14× 14×   14× 14×   14× 14×   14× 14×   14× 14× 14× 14×        
define(["require", "exports", "./form-fields-group", "./control-group", "./mapping-group", "./protect-group"], function (require, exports, form_fields_group_1, control_group_1, mapping_group_1, protect_group_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.DEVELOPER_TAB_ID = '_developer_tab';
    var DeveloperTab = (function () {
        function DeveloperTab(container) {
            this.container = container;
            this.ribbonId = this.container.element.id + '_ribbon';
            this.formFieldsGroup = new form_fields_group_1.FormFieldsGroup(container);
            this.controlGroup = new control_group_1.ControlGroup(container);
            this.mappingGroup = new mapping_group_1.MappingGroup(container);
            this.protectGroup = new protect_group_1.ProtectGroup(container);
        }
        Object.defineProperty(DeveloperTab.prototype, "documentEditor", {
            get: function () {
                return this.container.documentEditor;
            },
            enumerable: true,
            configurable: true
        });
        DeveloperTab.prototype.getDeveloperTab = function () {
            return {
                id: this.ribbonId + exports.DEVELOPER_TAB_ID,
                keyTip: 'D',
                header: this.container.localObj.getConstant('Developer'),
                groups: [
                    this.formFieldsGroup.getGroupModel(),
                    this.controlGroup.getGroupModel(),
                    this.mappingGroup.getGroupModel(),
                    this.protectGroup.getGroupModel()
                ]
            };
        };
        DeveloperTab.prototype.updateDeveloperTabOnSelectionChange = function () {
            this.formFieldsGroup.updateSelection();
            this.controlGroup.updateSelection();
            this.mappingGroup.updateSelection();
            this.protectGroup.updateSelection();
        };
        DeveloperTab.prototype.destroy = function () {
            Eif (this.formFieldsGroup.destroy) {
                this.formFieldsGroup.destroy();
            }
            Eif (this.controlGroup.destroy) {
                this.controlGroup.destroy();
            }
            Eif (this.mappingGroup.destroy) {
                this.mappingGroup.destroy();
            }
            Eif (this.protectGroup.destroy) {
                this.protectGroup.destroy();
            }
            this.formFieldsGroup = undefined;
            this.controlGroup = undefined;
            this.mappingGroup = undefined;
            this.protectGroup = undefined;
        };
        return DeveloperTab;
    }());
    exports.DeveloperTab = DeveloperTab;
});