all files / rich-text-editor/actions/ base-quick-toolbar.js

96.21% Statements 254/264
89.5% Branches 162/181
100% Functions 21/21
96.21% Lines 254/264
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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437   1981× 1981× 1981× 1981× 1981× 1981× 1981× 1981× 1981×   1981× 1981× 22×   1981×   1981× 1981× 377×   1604× 78×   1526× 22×     1504×   1981× 1981× 1981× 1981× 1981× 1981× 1981× 1981×   1981× 1981×             1981×   263× 263× 263× 263×   263× 263× 263× 263× 92× 92× 92× 94× 94×       171×   263× 263× 237×   26×     20×   263× 263× 263× 92× 92× 92×       171×   263× 242×     21×   263× 263× 263× 263×   793× 793× 793× 793× 793× 793× 429×     364×   793× 465×   241×       241×   241×   21× 21×                             18× 13×         21× 21×               200×       200×   200×     793× 793× 793×   429× 429×   429× 429× 429× 429× 429× 429× 429× 429× 429× 429× 429× 429× 429× 429× 429× 36×   429× 26× 26× 26×     403× 403× 403×   429× 217× 217×     212×   429× 429× 429×                 429×   429× 429× 429× 429× 429×         429×         429×                               429×       263×   429× 364×   429× 429× 429× 429× 429×   429×     429× 429×       19×             442× 442× 69×   442× 442× 442×     442×       436× 423×     442× 413× 413×     442× 442×   164×     2421× 2421× 422× 422× 422× 422× 422× 422×     91×             91× 91× 22×             22× 22×   91× 91×     2379× 400×   1979× 153× 153×   1979× 1979× 1979× 1979× 1979× 1979×   1979× 1979× 1979× 1979× 1979× 1979× 1979×   1981×     1981× 1981× 1981× 499×     29× 12× 12× 12×                 1979× 1979× 1979× 499×          
define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "@syncfusion/ej2-popups", "../base/constant", "../base/classes", "../base/enum", "../base/util", "./base-toolbar", "./dropdown-buttons", "./color-picker"], function (require, exports, ej2_base_1, ej2_base_2, ej2_popups_1, events, classes, enum_1, util_1, base_toolbar_1, dropdown_buttons_1, color_picker_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var BaseQuickToolbar = (function () {
        function BaseQuickToolbar(parent, locator) {
            this.parent = parent;
            this.locator = locator;
            this.isRendered = false;
            this.isDestroyed = false;
            this.renderFactory = this.locator.getService('rendererFactory');
            this.contentRenderer = this.renderFactory.getRenderer(enum_1.RenderType.Content);
            this.popupRenderer = this.renderFactory.getRenderer(enum_1.RenderType.Popup);
            this.dropDownButtons = new dropdown_buttons_1.DropDownButtons(this.parent, this.locator);
            this.colorPickerObj = new color_picker_1.ColorPickerInput(this.parent, this.locator);
        }
        BaseQuickToolbar.prototype.appendPopupContent = function () {
            this.toolbarElement = this.parent.createElement('div', { className: classes.CLS_QUICK_TB });
            if (this.element.classList.contains(classes.CLS_TEXT_POP)) {
                this.toolbarElement.classList.add(classes.CLS_TEXT_QUICK_TB);
            }
            this.element.appendChild(this.toolbarElement);
        };
        BaseQuickToolbar.prototype.render = function (args) {
            var className;
            if (args.popupType === 'Image') {
                className = classes.CLS_IMAGE_POP;
            }
            else if (args.popupType === 'Inline') {
                className = classes.CLS_INLINE_POP;
            }
            else if (args.popupType === 'Text') {
                className = classes.CLS_TEXT_POP;
            }
            else {
                className = '';
            }
            var popupId = ej2_base_1.getUniqueID(args.popupType + '_Quick_Popup');
            this.stringItems = args.toolbarItems;
            this.element = this.parent.createElement('div', { id: popupId, className: className + ' ' + classes.CLS_RTE_ELEMENTS });
            this.element.setAttribute('aria-owns', this.parent.getID());
            this.appendPopupContent();
            this.createToolbar(args.toolbarItems, args.mode, args.cssClass);
            this.popupRenderer.renderPopup(this);
            this.addEventListener();
        };
        BaseQuickToolbar.prototype.createToolbar = function (items, mode, cssClass) {
            this.quickTBarObj = new base_toolbar_1.BaseToolbar(this.parent, this.locator);
            this.quickTBarObj.render({
                container: 'quick',
                target: this.toolbarElement,
                items: items,
                mode: mode,
                cssClass: cssClass
            });
            this.quickTBarObj.toolbarObj.refresh();
        };
        BaseQuickToolbar.prototype.setPosition = function (e) {
            var x;
            var y;
            var imgWrapper = ej2_base_1.closest(e.target, '.e-img-caption');
            var isAligned = (e.target.classList.contains('e-imginline') ||
                e.target.classList.contains('e-imgbreak')) ? false : true;
            var target = !ej2_base_1.isNullOrUndefined(imgWrapper) ? imgWrapper : e.target;
            ej2_base_2.addClass([this.toolbarElement], [classes.CLS_RM_WHITE_SPACE]);
            var targetOffsetTop;
            if (!ej2_base_1.isNullOrUndefined(ej2_base_1.closest(target, 'table')) && !target.classList.contains('e-multi-cells-select') && !target.classList.contains('e-rte-image')) {
                targetOffsetTop = target.offsetTop;
                var parentTable = ej2_base_1.closest(target, 'table');
                while (!ej2_base_1.isNullOrUndefined(parentTable)) {
                    targetOffsetTop += parentTable.offsetTop;
                    parentTable = ej2_base_1.closest(parentTable.parentElement, 'table');
                }
            }
            else {
                targetOffsetTop = (target.classList.contains('e-rte-audio')) ? target.parentElement.offsetTop : target.offsetTop;
            }
            var parentOffsetTop = window.pageYOffset + e.parentData.top;
            if ((targetOffsetTop - e.editTop) > e.popHeight) {
                y = parentOffsetTop + e.tBarElementHeight + (targetOffsetTop - e.editTop) - e.popHeight - 5;
            }
            else if (((e.editTop + e.editHeight) - (targetOffsetTop + target.offsetHeight)) > e.popHeight) {
                y = parentOffsetTop + e.tBarElementHeight + (targetOffsetTop - e.editTop) + target.offsetHeight + 5;
            }
            else {
                y = e.y;
            }
            target = isAligned ? e.target : target;
            var targetOffsetLeft;
            if (!ej2_base_1.isNullOrUndefined(ej2_base_1.closest(target, 'table')) && !target.classList.contains('e-multi-cells-select') && !target.classList.contains('e-rte-image')) {
                targetOffsetLeft = target.offsetLeft;
                var parentTable = ej2_base_1.closest(target.parentElement, 'th, td');
                while (!ej2_base_1.isNullOrUndefined(parentTable)) {
                    targetOffsetLeft += parentTable.offsetLeft;
                    parentTable = ej2_base_1.closest(parentTable.parentElement, 'table');
                }
            }
            else {
                targetOffsetLeft = (target.classList.contains('e-rte-audio')) ? target.parentElement.offsetLeft : target.offsetLeft;
            }
            if (target.offsetWidth > e.popWidth) {
                x = (target.offsetWidth / 2) - (e.popWidth / 2) + e.parentData.left + targetOffsetLeft;
            }
            else {
                x = e.parentData.left + targetOffsetLeft;
            }
            this.popupObj.position.X = ((x + e.popWidth) > e.parentData.right) ? e.parentData.right - e.popWidth : x;
            this.popupObj.position.Y = (y >= 0) ? y : e.y + 5;
            this.popupObj.dataBind();
            ej2_base_2.removeClass([this.toolbarElement], [classes.CLS_RM_WHITE_SPACE]);
        };
        BaseQuickToolbar.prototype.checkCollision = function (e, viewPort, type) {
            var x;
            var y;
            var parentTop = e.parentData.top;
            var contentTop = e.windowY + parentTop + e.tBarElementHeight;
            var collision = [];
            if (viewPort === 'document') {
                collision = ej2_popups_1.isCollide(e.popup);
            }
            else {
                collision = ej2_popups_1.isCollide(e.popup, e.parentElement);
            }
            for (var i = 0; i < collision.length; i++) {
                switch (collision[i]) {
                    case 'top':
                        Iif (viewPort === 'document') {
                            y = e.windowY;
                        }
                        else {
                            y = (window.pageYOffset + parentTop) + e.tBarElementHeight;
                        }
                        break;
                    case 'bottom': {
                        var posY = void 0;
                        if (viewPort === 'document') {
                            Iif (type === 'inline' || type === 'text') {
                                posY = (e.y - e.popHeight - 10);
                            }
                            else {
                                Eif ((e.windowHeight - (parentTop + e.tBarElementHeight)) > e.popHeight) {
                                    Iif ((contentTop - e.windowHeight) > e.popHeight) {
                                        posY = (contentTop + (e.windowHeight - parentTop)) - e.popHeight;
                                    }
                                    else {
                                        posY = contentTop;
                                    }
                                }
                                else {
                                    posY = e.windowY + (parentTop + e.tBarElementHeight);
                                }
                            }
                        }
                        else {
                            if (e.target.tagName !== 'IMG') {
                                posY = (e.parentData.bottom + window.pageYOffset) - e.popHeight - 10;
                            }
                            else {
                                posY = (e.parentData.bottom + window.pageYOffset) - e.popHeight - 5;
                            }
                        }
                        y = posY;
                        break;
                    }
                    case 'right':
                        Iif (type === 'inline' || type === 'text') {
                            x = window.pageXOffset + (e.windowWidth - (e.popWidth + e.bodyRightSpace + 10));
                        }
                        else {
                            x = e.x - e.popWidth;
                        }
                        break;
                    case 'left':
                        Iif (type === 'inline' || type === 'text') {
                            x = 0;
                        }
                        else {
                            x = e.parentData.left;
                        }
                        break;
                }
            }
            this.popupObj.position.X = (x) ? x : this.popupObj.position.X;
            this.popupObj.position.Y = (y) ? y : this.popupObj.position.Y;
            this.popupObj.dataBind();
        };
        BaseQuickToolbar.prototype.showPopup = function (x, y, target, type) {
            var _this = this;
            var eventArgs = { popup: this.popupObj, cancel: false, targetElement: target,
                positionX: x, positionY: y };
            this.parent.trigger(events.beforeQuickToolbarOpen, eventArgs, function (beforeQuickToolbarArgs) {
                Eif (!beforeQuickToolbarArgs.cancel) {
                    var editPanelTop = void 0;
                    var editPanelHeight = void 0;
                    var bodyStyle = window.getComputedStyle(document.body);
                    var bodyRight = parseFloat(bodyStyle.marginRight.split('px')[0]) + parseFloat(bodyStyle.paddingRight.split('px')[0]);
                    var windowHeight = window.innerHeight;
                    var windowWidth = window.innerWidth;
                    var parent_1 = _this.parent.element;
                    var toolbarAvail = !ej2_base_2.isNullOrUndefined(_this.parent.getToolbar());
                    var tbHeight = toolbarAvail && _this.parent.toolbarModule.getToolbarHeight();
                    var expTBHeight = toolbarAvail && _this.parent.toolbarModule.getExpandTBarPopHeight();
                    var tBarHeight = (toolbarAvail) ? (tbHeight + expTBHeight) : 0;
                    ej2_base_2.addClass([_this.element], [classes.CLS_HIDE]);
                    if (ej2_base_2.Browser.isDevice && !util_1.isIDevice()) {
                        ej2_base_2.addClass([_this.parent.getToolbar()], [classes.CLS_HIDE]);
                    }
                    if (_this.parent.iframeSettings.enable) {
                        var cntEle = _this.contentRenderer.getPanel().contentWindow;
                        editPanelTop = cntEle.pageYOffset;
                        editPanelHeight = cntEle.innerHeight;
                    }
                    else {
                        var cntEle = ej2_base_1.closest(target, '.' + classes.CLS_RTE_CONTENT);
                        editPanelTop = (cntEle) ? cntEle.scrollTop : 0;
                        editPanelHeight = (cntEle) ? cntEle.offsetHeight : 0;
                    }
                    if ((!_this.parent.inlineMode.enable && !ej2_base_1.closest(target, 'table') && type !== 'text' && type !== 'link') || target.tagName === 'IMG') {
                        _this.parent.disableToolbarItem(_this.parent.toolbarSettings.items);
                        _this.parent.enableToolbarItem(['Undo', 'Redo']);
                    }
                    else {
                        _this.parent.enableToolbarItem(_this.parent.toolbarSettings.items);
                    }
                    ej2_base_1.append([_this.element], document.body);
                    Eif (_this.parent.showTooltip) {
                        _this.tooltip = new ej2_popups_1.Tooltip({
                            target: '#' + _this.element.id + ' [title]',
                            openDelay: 400,
                            showTipPointer: true,
                            beforeRender: _this.tooltipBeforeRender.bind(_this),
                            windowCollision: true,
                            position: 'BottomCenter',
                            cssClass: _this.parent.getCssClass()
                        });
                        _this.tooltip.appendTo(_this.element);
                    }
                    _this.popupObj.position.X = beforeQuickToolbarArgs.positionX + 20;
                    _this.popupObj.position.Y = beforeQuickToolbarArgs.positionY + 20;
                    _this.popupObj.dataBind();
                    _this.popupObj.element.classList.add('e-popup-open');
                    _this.dropDownButtons.renderDropDowns({
                        container: _this.toolbarElement,
                        containerType: 'quick',
                        items: _this.stringItems
                    });
                    _this.colorPickerObj.renderColorPickerInput({
                        container: _this.toolbarElement,
                        containerType: 'quick',
                        items: _this.stringItems
                    });
                    var showPopupData = {
                        x: x, y: y,
                        target: target,
                        editTop: editPanelTop,
                        editHeight: editPanelHeight,
                        popup: _this.popupObj.element,
                        popHeight: _this.popupObj.element.offsetHeight,
                        popWidth: _this.popupObj.element.offsetWidth,
                        parentElement: parent_1,
                        bodyRightSpace: bodyRight,
                        windowY: window.pageYOffset,
                        windowHeight: windowHeight,
                        windowWidth: windowWidth,
                        parentData: parent_1.getBoundingClientRect(),
                        tBarElementHeight: tBarHeight
                    };
                    if ((ej2_base_1.closest(target, 'TABLE') || target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
                        (target.classList.contains(classes.CLS_AUDIOWRAP) || target.classList.contains(classes.CLS_CLICKELEM) ||
                            target.classList.contains(classes.CLS_VID_CLICK_ELEM)))) &&
                        (x === beforeQuickToolbarArgs.positionX || y === beforeQuickToolbarArgs.positionY)) {
                        _this.setPosition(showPopupData);
                    }
                    if (!_this.parent.inlineMode.enable) {
                        _this.checkCollision(showPopupData, 'parent', '');
                    }
                    _this.checkCollision(showPopupData, 'document', ((_this.parent.inlineMode.enable) ? 'inline' : (type === 'text') ? 'text' : ''));
                    _this.popupObj.element.classList.remove('e-popup-open');
                    ej2_base_2.removeClass([_this.element], [classes.CLS_HIDE]);
                    _this.popupObj.show({ name: 'ZoomIn', duration: (ej2_base_2.Browser.isIE ? 250 : 400) }, target);
                    if (_this.popupObj && _this.parent.cssClass) {
                        ej2_base_2.removeClass([_this.popupObj.element], _this.parent.cssClass.replace(/\s+/g, ' ').trim().split(' '));
                        ej2_base_2.addClass([_this.popupObj.element], _this.parent.cssClass.replace(/\s+/g, ' ').trim().split(' '));
                    }
                    ej2_base_2.setStyleAttribute(_this.element, {
                        maxWidth: window.outerWidth + 'px'
                    });
                    ej2_base_2.addClass([_this.element], [classes.CLS_POP]);
                    _this.isRendered = true;
                }
            });
        };
        BaseQuickToolbar.prototype.tooltipBeforeRender = function (args) {
            Iif (args.target.querySelector('.e-active')) {
                args.cancel = true;
                if (!ej2_base_1.isNullOrUndefined(args.target.getAttribute('title'))) {
                    this.parent.notify(events.closeTooltip, { target: args.target, isTitle: true });
                }
            }
        };
        BaseQuickToolbar.prototype.hidePopup = function () {
            var isSourceCodeEnabled = !ej2_base_1.isNullOrUndefined(this.parent.rootContainer) && this.parent.rootContainer.classList.contains('e-source-code-enabled');
            if (ej2_base_2.Browser.isDevice && !util_1.isIDevice()) {
                ej2_base_2.removeClass([this.parent.getToolbar()], [classes.CLS_HIDE]);
            }
            Eif (!ej2_base_1.isNullOrUndefined(this.element.querySelectorAll('[data-title]'))) {
                var removeHandEle = this.element.querySelectorAll('[data-title]');
                removeHandEle.forEach(function (e) {
                    var event = new MouseEvent('mouseout', { bubbles: true, cancelable: true });
                    e.dispatchEvent(event);
                });
            }
            if (!ej2_base_2.isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
                if (!ej2_base_2.isNullOrUndefined(document.querySelector('#' + this.element.id + ' [data-tooltip-id]'))) {
                    var tooltipTargetEle = document.querySelector('#' + this.element.id + ' [data-tooltip-id]');
                    var dataContent = tooltipTargetEle.getAttribute('data-content');
                    tooltipTargetEle.removeAttribute('data-content');
                    tooltipTargetEle.setAttribute('title', dataContent);
                    tooltipTargetEle.removeAttribute('data-tooltip-id');
                }
                this.tooltip.destroy();
            }
            else {
                if (!ej2_base_2.isNullOrUndefined(this.tooltip)) {
                    this.tooltip.destroy();
                }
            }
            if (!ej2_base_2.isNullOrUndefined(this.parent.getToolbar()) && !this.parent.inlineMode.enable) {
                Eif (!isSourceCodeEnabled) {
                    this.parent.enableToolbarItem(this.parent.toolbarSettings.items);
                }
            }
            this.removeEleFromDOM();
            this.isRendered = false;
        };
        BaseQuickToolbar.prototype.addQTBarItem = function (item, index) {
            this.quickTBarObj.toolbarObj.addItems(this.quickTBarObj.getItems(item, 'toolbar'), index);
        };
        BaseQuickToolbar.prototype.removeQTBarItem = function (index) {
            this.quickTBarObj.toolbarObj.removeItems(index);
        };
        BaseQuickToolbar.prototype.removeEleFromDOM = function () {
            var element = this.popupObj.element;
            if (this.isRendered) {
                this.dropDownButtons.destroyDropDowns();
                this.colorPickerObj.destroyColorPicker();
                ej2_base_2.removeClass([this.element], [classes.CLS_POP]);
                ej2_base_1.detach(element);
                var args = this.popupObj;
                this.parent.trigger(events.quickToolbarClose, args);
            }
        };
        BaseQuickToolbar.prototype.updateStatus = function (args) {
            var options = {
                args: args,
                dropDownModule: this.dropDownButtons,
                parent: this.parent,
                tbElements: ej2_base_1.selectAll('.' + classes.CLS_TB_ITEM, this.element),
                tbItems: this.quickTBarObj.toolbarObj.items
            };
            util_1.setToolbarStatus(options, true, this.parent);
            if (this.parent.quickToolbarSettings.text && this.parent.quickToolbarModule.textQTBar) {
                var options_1 = {
                    args: args,
                    dropDownModule: this.parent.quickToolbarModule.textQTBar.dropDownButtons,
                    parent: this.parent,
                    tbElements: ej2_base_1.selectAll('.' + classes.CLS_TB_ITEM, this.parent.quickToolbarModule.textQTBar.element),
                    tbItems: this.parent.quickToolbarModule.textQTBar.quickTBarObj.toolbarObj.items
                };
                util_1.setToolbarStatus(options_1, true, this.parent);
                util_1.updateUndoRedoStatus(this.parent.quickToolbarModule.textQTBar.quickTBarObj, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
            }
            Eif (!ej2_base_1.select('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
                util_1.updateUndoRedoStatus(this.parent.getBaseToolbarObject(), this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
            }
        };
        BaseQuickToolbar.prototype.destroy = function () {
            if (this.isDestroyed) {
                return;
            }
            if (this.tooltip && !this.tooltip.isDestroyed) {
                this.tooltip.destroy();
                this.tooltip = null;
            }
            this.removeEventListener();
            this.quickTBarObj.destroy();
            this.quickTBarObj = null;
            Eif (this.popupObj && !this.popupObj.isDestroyed) {
                this.removeEleFromDOM();
                this.popupObj.destroy();
            }
            this.colorPickerObj = null;
            this.dropDownButtons = null;
            this.stringItems = null;
            this.dropDownButtons = null;
            this.colorPickerObj = null;
            this.toolbarElement = null;
            this.isDestroyed = true;
        };
        BaseQuickToolbar.prototype.addEventListener = function () {
            Iif (this.parent.isDestroyed) {
                return;
            }
            this.parent.on(events.destroy, this.destroy, this);
            this.parent.on(events.modelChanged, this.onPropertyChanged, this);
            if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
                this.parent.on(events.toolbarUpdated, this.updateStatus, this);
            }
        };
        BaseQuickToolbar.prototype.onPropertyChanged = function (e) {
            if (!ej2_base_2.isNullOrUndefined(e.newProp.inlineMode)) {
                for (var _i = 0, _a = Object.keys(e.newProp.inlineMode); _i < _a.length; _i++) {
                    var prop = _a[_i];
                    switch (prop) {
                        case 'enable':
                            if (e.newProp.inlineMode.enable) {
                                this.parent.on(events.toolbarUpdated, this.updateStatus, this);
                            }
                            else {
                                this.parent.off(events.toolbarUpdated, this.updateStatus);
                            }
                            break;
                    }
                }
            }
        };
        BaseQuickToolbar.prototype.removeEventListener = function () {
            this.parent.off(events.destroy, this.destroy);
            this.parent.off(events.modelChanged, this.onPropertyChanged);
            if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
                this.parent.off(events.toolbarUpdated, this.updateStatus);
            }
        };
        return BaseQuickToolbar;
    }());
    exports.BaseQuickToolbar = BaseQuickToolbar;
});