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K,SAAU,CAAE,OAAQ,EAAY,QAAS,YAC5E,EACA,EAAiB,UAAU,mBAAqB,WAC5C,IAAI,EAAa,IAAI,EAAK,WAG1B,OAFA,EAAa,KAAK,qBAAqB,GACvC,EAAa,KAAK,uBAAuB,GAClC,KAAK,sBAAsB,EACtC,EACA,EAAiB,UAAU,qBAAuB,SAAU,GACxD,IAAI,EAAQ,KAOZ,OANI,KAAK,UACL,KAAK,SAAS,SAAQ,SAAU,GAE5B,GADA,EAAa,EAAW,IAAI,EAAM,KAAK,aAAc,EAAU,QACvC,IAAI,EAAM,KAAK,WAAY,EAAU,UAAU,cAC3E,IAEG,CACX,EACA,EAAiB,UAAU,uBAAyB,SAAU,GAC1D,IAAI,EAAQ,KAQZ,OAPI,KAAK,WAAW,SAChB,KAAK,WAAW,QAAQ,SAAQ,SAAU,GAClC,EAAkB,SAClB,EAAa,EAAW,IAAI,EAAM,KAAK,eAAe,QAAQ,UAAW,EAAiB,OAAI,EAAkB,QAExH,IAEG,CACX,EACA,EAAiB,UAAU,sBAAwB,SAAU,GAKzD,OAJI,KAAK,YAAc,KAAK,WAAiB,MAAK,KAAK,WAAoB,UAEvE,GADA,EAAa,EAAW,IAAI,KAAK,KAAK,aAAc,KAAK,WAAiB,OAClD,IAAI,KAAK,KAAK,cAAe,KAAK,WAAoB,UAE3E,CACX,EACO,CACX,CAlHqC,CAkHnC,IAIF,EAAQ,cAAgB,EACxB,EAAQ,KAAO,EACf,EAAQ,gBAAkB,GAC1B,EAAQ,iBAAmB,GAC3B,EAAQ,oBAAsB,GAE9B,OAAO,eAAe,EAAS,aAAc,CAAE,OAAO,GAErD","file":"/npm/ng2-smart-table-other-extended@1.0.4/bundles/table.umd.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/ng2-smart-table-other-extended@1.0.4/bundles/table.umd.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n  * @license ng2-smart-table v1.0.4\n  * Copyright (c) 2017 Akveo. https://akveo.github.io/ng2-smart-table/\n  * License: MIT\n  */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('rxjs'), require('@angular/core'), require('ng2-completer'), require('@angular/common'), require('@angular/forms'), require('rxjs/operators'), require('@angular/common/http')) :\n\ttypeof define === 'function' && define.amd ? define('index', ['exports', 'lodash', 'rxjs', '@angular/core', 'ng2-completer', '@angular/common', '@angular/forms', 'rxjs/operators', '@angular/common/http'], factory) :\n\t(factory((global.index = {}),global.lodash,global.Rx,global.ng.core,global.ng2completer,global.ng.common,global.ng.forms,global.Rx.operators,global.ng.common.http));\n}(this, (function (exports,lodash,rxjs,core,ng2Completer,common,forms,operators,http) { 'use strict';\n\n/**\n * Extending object that entered in first argument.\n *\n * Returns extended object or false if have no target object or incorrect type.\n *\n * If you wish to clone source object (without modify it), just use empty new\n * object as first argument, like this:\n *   deepExtend({}, yourObj_1, [yourObj_N]);\n */\nvar deepExtend = function () {\n    var objects = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        objects[_i] = arguments[_i];\n    }\n    if (arguments.length < 1 || typeof arguments[0] !== 'object') {\n        return false;\n    }\n    if (arguments.length < 2) {\n        return arguments[0];\n    }\n    var target = arguments[0];\n    // convert arguments to array and cut off target object\n    var args = Array.prototype.slice.call(arguments, 1);\n    var val, src;\n    args.forEach(function (obj) {\n        // skip argument if it is array or isn't object\n        if (typeof obj !== 'object' || Array.isArray(obj)) {\n            return;\n        }\n        Object.keys(obj).forEach(function (key) {\n            src = target[key]; // source value\n            val = obj[key]; // new value\n            // recursion prevention\n            if (val === target) {\n                return;\n                /**\n                         * if new value isn't object then just overwrite by new value\n                         * instead of extending.\n                         */\n            }\n            else if (typeof val !== 'object' || val === null) {\n                target[key] = val;\n                return;\n                // just clone arrays (and recursive clone objects inside)\n            }\n            else if (Array.isArray(val)) {\n                target[key] = lodash.cloneDeep(val);\n                return;\n                // overwrite by new value if source isn't object or array\n            }\n            else if (typeof src !== 'object' || src === null || Array.isArray(src)) {\n                target[key] = deepExtend({}, val);\n                return;\n                // source value and new value is objects both, extending...\n            }\n            else {\n                target[key] = deepExtend(src, val);\n                return;\n            }\n        });\n    });\n    return target;\n};\nvar Deferred = /** @class */ (function () {\n    function Deferred() {\n        var _this = this;\n        this.promise = new Promise(function (resolve, reject) {\n            _this.resolve = resolve;\n            _this.reject = reject;\n        });\n    }\n    return Deferred;\n}());\n// getDeepFromObject({result: {data: 1}}, 'result.data', 2); // returns 1\nfunction getDeepFromObject(object, name, defaultValue) {\n    if (object === void 0) { object = {}; }\n    var keys = name.split('.');\n    // clone the object\n    var level = deepExtend({}, object);\n    keys.forEach(function (k) {\n        if (level && typeof level[k] !== 'undefined') {\n            level = level[k];\n        }\n    });\n    return typeof level === 'undefined' ? defaultValue : level;\n}\n\nvar Cell = /** @class */ (function () {\n    function Cell(value, row, column, dataSet, className) {\n        this.value = value;\n        this.row = row;\n        this.column = column;\n        this.dataSet = dataSet;\n        this.className = className;\n        this.newClass = '';\n        this.newValue = '';\n        this.newValue = value;\n        this.newClass = className ? className : '';\n    }\n    Cell.prototype.getColumn = function () {\n        return this.column;\n    };\n    Cell.prototype.getRow = function () {\n        return this.row;\n    };\n    Cell.prototype.getValue = function () {\n        var valid = this.column.getValuePrepareFunction() instanceof Function;\n        var prepare = valid ? this.column.getValuePrepareFunction() : Cell.PREPARE;\n        return prepare.call(null, this.value, this.row.getData(), this);\n    };\n    Cell.prototype.getClass = function () {\n        return this.newClass;\n    };\n    Cell.prototype.setValue = function (value) {\n        this.newValue = value;\n    };\n    Cell.prototype.getId = function () {\n        return this.getColumn().id;\n    };\n    Cell.prototype.getTitle = function () {\n        return this.getColumn().title;\n    };\n    Cell.prototype.isEditable = function () {\n        if (this.getRow().index === -1) {\n            return this.getColumn().isAddable;\n        }\n        else {\n            return this.getColumn().isEditable;\n        }\n    };\n    Cell.PREPARE = function (value) { return value; };\n    return Cell;\n}());\n\nvar Row = /** @class */ (function () {\n    function Row(index, data, _dataSet) {\n        this.index = index;\n        this.data = data;\n        this._dataSet = _dataSet;\n        this.isSelected = false;\n        this.isInEditing = false;\n        this.cells = [];\n        this.process();\n    }\n    Row.prototype.getCell = function (column) {\n        return this.cells.find(function (el) { return el.getColumn() === column; });\n    };\n    Row.prototype.getCells = function () {\n        return this.cells;\n    };\n    Row.prototype.getData = function () {\n        return this.data;\n    };\n    Row.prototype.getIsSelected = function () {\n        return this.isSelected;\n    };\n    Row.prototype.getNewData = function () {\n        var values = Object.assign({}, this.data);\n        this.getCells().forEach(function (cell) { return values[cell.getColumn().id] = cell.newValue; });\n        return values;\n    };\n    Row.prototype.setData = function (data) {\n        this.data = data;\n        this.process();\n    };\n    Row.prototype.process = function () {\n        var _this = this;\n        this.cells = [];\n        this._dataSet.getColumns().forEach(function (column) {\n            var cell = _this.createCell(column);\n            _this.cells.push(cell);\n        });\n    };\n    Row.prototype.createCell = function (column) {\n        var defValue = column.settings.defaultValue ? column.settings.defaultValue : '';\n        var value;\n        var className;\n        if (this.data[column.id] && this.data[column.id].constructor.name === 'Object') {\n            value = this.data[column.id].td ? this.data[column.id].td : defValue;\n            className = this.data[column.id].class ? this.data[column.id].class : '';\n        }\n        else {\n            value = typeof this.data[column.id] === 'undefined' ? defValue : this.data[column.id];\n        }\n        return new Cell(value, this, column, this._dataSet, className);\n    };\n    return Row;\n}());\n\nvar Column = /** @class */ (function () {\n    function Column(id, settings, dataSet) {\n        this.id = id;\n        this.settings = settings;\n        this.dataSet = dataSet;\n        this.title = '';\n        this.type = '';\n        this.class = '';\n        this.width = '';\n        this.isSortable = false;\n        this.isEditable = true;\n        this.isAddable = true;\n        this.isFilterable = false;\n        this.sortDirection = '';\n        this.defaultSortDirection = '';\n        this.editor = { type: '', config: {}, component: null };\n        this.filter = { type: '', config: {} };\n        this.renderComponent = null;\n        this.process();\n    }\n    Column.prototype.getOnComponentInitFunction = function () {\n        return this.onComponentInitFunction;\n    };\n    Column.prototype.getCompareFunction = function () {\n        return this.compareFunction;\n    };\n    Column.prototype.getValuePrepareFunction = function () {\n        return this.valuePrepareFunction;\n    };\n    Column.prototype.getFilterFunction = function () {\n        return this.filterFunction;\n    };\n    Column.prototype.getConfig = function () {\n        return this.editor && this.editor.config;\n    };\n    Column.prototype.getFilterType = function () {\n        return this.filter && this.filter.type;\n    };\n    Column.prototype.getFilterConfig = function () {\n        return this.filter && this.filter.config;\n    };\n    Column.prototype.process = function () {\n        this.title = this.settings['title'];\n        this.class = this.settings['class'];\n        this.width = this.settings['width'];\n        this.type = this.prepareType();\n        this.editor = this.settings['editor'];\n        this.filter = this.settings['filter'];\n        this.renderComponent = this.settings['renderComponent'];\n        this.isFilterable = typeof this.settings['filter'] === 'undefined' ? true : !!this.settings['filter'];\n        this.defaultSortDirection = ['asc', 'desc']\n            .indexOf(this.settings['sortDirection']) !== -1 ? this.settings['sortDirection'] : '';\n        this.isSortable = typeof this.settings['sort'] === 'undefined' ? true : !!this.settings['sort'];\n        this.isEditable = typeof this.settings['editable'] === 'undefined' ? true : !!this.settings['editable'];\n        this.isAddable = typeof this.settings['addable'] === 'undefined' ? true : !!this.settings['addable'];\n        this.sortDirection = this.prepareSortDirection();\n        this.compareFunction = this.settings['compareFunction'];\n        this.valuePrepareFunction = this.settings['valuePrepareFunction'];\n        this.filterFunction = this.settings['filterFunction'];\n        this.onComponentInitFunction = this.settings['onComponentInitFunction'];\n    };\n    Column.prototype.prepareType = function () {\n        return this.settings['type'] || this.determineType();\n    };\n    Column.prototype.prepareSortDirection = function () {\n        return this.settings['sort'] === 'desc' ? 'desc' : 'asc';\n    };\n    Column.prototype.determineType = function () {\n        // TODO: determine type by data\n        return 'text';\n    };\n    return Column;\n}());\n\nvar DataSet = /** @class */ (function () {\n    function DataSet(data, columnSettings) {\n        if (data === void 0) { data = []; }\n        this.columnSettings = columnSettings;\n        this.data = [];\n        this.columns = [];\n        this.rows = [];\n        this.willSelect = 'first';\n        this.createColumns(columnSettings);\n        this.setData(data);\n        this.createNewRow();\n    }\n    DataSet.prototype.setData = function (data) {\n        this.data = data;\n        this.createRows();\n    };\n    DataSet.prototype.getColumns = function () {\n        return this.columns;\n    };\n    DataSet.prototype.getRows = function () {\n        return this.rows;\n    };\n    DataSet.prototype.getFirstRow = function () {\n        return this.rows[0];\n    };\n    DataSet.prototype.getLastRow = function () {\n        return this.rows[this.rows.length - 1];\n    };\n    DataSet.prototype.findRowByData = function (data) {\n        return this.rows.find(function (row) { return row.getData() === data; });\n    };\n    DataSet.prototype.deselectAll = function () {\n        this.rows.forEach(function (row) {\n            row.isSelected = false;\n        });\n    };\n    DataSet.prototype.selectRow = function (row) {\n        var previousIsSelected = row.isSelected;\n        this.deselectAll();\n        row.isSelected = !previousIsSelected;\n        this.selectedRow = row;\n        return this.selectedRow;\n    };\n    DataSet.prototype.multipleSelectRow = function (row) {\n        row.isSelected = !row.isSelected;\n        this.selectedRow = row;\n        return this.selectedRow;\n    };\n    DataSet.prototype.selectPreviousRow = function () {\n        if (this.rows.length > 0) {\n            var index = this.selectedRow ? this.selectedRow.index : 0;\n            if (index > this.rows.length - 1) {\n                index = this.rows.length - 1;\n            }\n            this.selectRow(this.rows[index]);\n            return this.selectedRow;\n        }\n    };\n    DataSet.prototype.selectFirstRow = function () {\n        if (this.rows.length > 0) {\n            this.selectRow(this.rows[0]);\n            return this.selectedRow;\n        }\n    };\n    DataSet.prototype.selectLastRow = function () {\n        if (this.rows.length > 0) {\n            this.selectRow(this.rows[this.rows.length - 1]);\n            return this.selectedRow;\n        }\n    };\n    DataSet.prototype.willSelectFirstRow = function () {\n        this.willSelect = 'first';\n    };\n    DataSet.prototype.willSelectLastRow = function () {\n        this.willSelect = 'last';\n    };\n    DataSet.prototype.select = function () {\n        if (this.getRows().length === 0) {\n            return;\n        }\n        if (this.willSelect) {\n            if (this.willSelect === 'first') {\n                this.selectFirstRow();\n            }\n            if (this.willSelect === 'last') {\n                this.selectLastRow();\n            }\n            this.willSelect = '';\n        }\n        else {\n            this.selectFirstRow();\n        }\n        return this.selectedRow;\n    };\n    DataSet.prototype.createNewRow = function () {\n        this.newRow = new Row(-1, {}, this);\n        this.newRow.isInEditing = true;\n    };\n    /**\n     * Create columns by mapping from the settings\n     * @param settings\n     * @private\n     */\n    /**\n       * Create columns by mapping from the settings\n       * @param settings\n       * @private\n       */\n    DataSet.prototype.createColumns = /**\n       * Create columns by mapping from the settings\n       * @param settings\n       * @private\n       */\n    function (settings) {\n        for (var id in settings) {\n            if (settings.hasOwnProperty(id)) {\n                this.columns.push(new Column(id, settings[id], this));\n            }\n        }\n    };\n    /**\n     * Create rows based on current data prepared in data source\n     * @private\n     */\n    /**\n       * Create rows based on current data prepared in data source\n       * @private\n       */\n    DataSet.prototype.createRows = /**\n       * Create rows based on current data prepared in data source\n       * @private\n       */\n    function () {\n        var _this = this;\n        this.rows = [];\n        this.data.forEach(function (el, index) {\n            _this.rows.push(new Row(index, el, _this));\n        });\n    };\n    return DataSet;\n}());\n\nvar Grid = /** @class */ (function () {\n    function Grid(source, settings) {\n        this.createFormShown = false;\n        this.onSelectRowSource = new rxjs.Subject();\n        this.setSettings(settings);\n        this.setSource(source);\n    }\n    Grid.prototype.showActionColumn = function (position) {\n        return this.isCurrentActionsPosition(position) && this.isActionsVisible();\n    };\n    Grid.prototype.isCurrentActionsPosition = function (position) {\n        return position == this.getSetting('actions.position');\n    };\n    Grid.prototype.isActionsVisible = function () {\n        return this.getSetting('actions.add') || this.getSetting('actions.edit') || this.getSetting('actions.delete') || this.getSetting('actions.custom').length;\n    };\n    Grid.prototype.isMultiSelectVisible = function () {\n        return this.getSetting('selectMode') === 'multi';\n    };\n    Grid.prototype.getNewRow = function () {\n        return this.dataSet.newRow;\n    };\n    Grid.prototype.setSettings = function (settings) {\n        this.settings = settings;\n        this.dataSet = new DataSet([], this.getSetting('columns'));\n        if (this.source) {\n            this.source.refresh();\n        }\n    };\n    Grid.prototype.getDataSet = function () {\n        return this.dataSet;\n    };\n    Grid.prototype.setSource = function (source) {\n        var _this = this;\n        this.source = this.prepareSource(source);\n        this.source.onChanged().subscribe(function (changes) { return _this.processDataChange(changes); });\n        this.source.onUpdated().subscribe(function (data) {\n            var changedRow = _this.dataSet.findRowByData(data);\n            changedRow.setData(data);\n        });\n    };\n    Grid.prototype.getSetting = function (name, defaultValue) {\n        return getDeepFromObject(this.settings, name, defaultValue);\n    };\n    Grid.prototype.getColumns = function () {\n        return this.dataSet.getColumns();\n    };\n    Grid.prototype.getRows = function () {\n        return this.dataSet.getRows();\n    };\n    Grid.prototype.selectRow = function (row) {\n        this.dataSet.selectRow(row);\n    };\n    Grid.prototype.multipleSelectRow = function (row) {\n        this.dataSet.multipleSelectRow(row);\n    };\n    Grid.prototype.onSelectRow = function () {\n        return this.onSelectRowSource.asObservable();\n    };\n    Grid.prototype.edit = function (row) {\n        row.isInEditing = true;\n    };\n    Grid.prototype.create = function (row, confirmEmitter) {\n        var _this = this;\n        var deferred = new Deferred();\n        deferred.promise.then(function (newData) {\n            newData = newData ? newData : row.getNewData();\n            if (deferred.resolve.skipAdd) {\n                _this.createFormShown = false;\n            }\n            else {\n                _this.source.prepend(newData).then(function () {\n                    _this.createFormShown = false;\n                    _this.dataSet.createNewRow();\n                });\n            }\n        }).catch(function (err) {\n            // doing nothing\n        });\n        if (this.getSetting('add.confirmCreate')) {\n            confirmEmitter.emit({\n                newData: row.getNewData(),\n                source: this.source,\n                confirm: deferred,\n            });\n        }\n        else {\n            deferred.resolve();\n        }\n    };\n    Grid.prototype.save = function (row, confirmEmitter) {\n        var _this = this;\n        var deferred = new Deferred();\n        deferred.promise.then(function (newData) {\n            newData = newData ? newData : row.getNewData();\n            if (deferred.resolve.skipEdit) {\n                row.isInEditing = false;\n            }\n            else {\n                _this.source.update(row.getData(), newData).then(function () {\n                    row.isInEditing = false;\n                });\n            }\n        }).catch(function (err) {\n            // doing nothing\n        });\n        if (this.getSetting('edit.confirmSave')) {\n            confirmEmitter.emit({\n                data: row.getData(),\n                newData: row.getNewData(),\n                source: this.source,\n                confirm: deferred,\n            });\n        }\n        else {\n            deferred.resolve();\n        }\n    };\n    Grid.prototype.delete = function (row, confirmEmitter) {\n        var _this = this;\n        var deferred = new Deferred();\n        deferred.promise.then(function () {\n            _this.source.remove(row.getData());\n        }).catch(function (err) {\n            // doing nothing\n        });\n        if (this.getSetting('delete.confirmDelete')) {\n            confirmEmitter.emit({\n                data: row.getData(),\n                source: this.source,\n                confirm: deferred,\n            });\n        }\n        else {\n            deferred.resolve();\n        }\n    };\n    Grid.prototype.processDataChange = function (changes) {\n        if (this.shouldProcessChange(changes)) {\n            this.dataSet.setData(changes['elements']);\n            if (this.getSetting('selectMode') !== 'multi') {\n                var row = this.determineRowToSelect(changes);\n                if (row) {\n                    this.onSelectRowSource.next(row);\n                }\n            }\n        }\n    };\n    Grid.prototype.shouldProcessChange = function (changes) {\n        if (['filter', 'sort', 'page', 'remove', 'refresh', 'load', 'paging'].indexOf(changes['action']) !== -1) {\n            return true;\n        }\n        else if (['prepend', 'append'].indexOf(changes['action']) !== -1 && !this.getSetting('pager.display')) {\n            return true;\n        }\n        return false;\n    };\n    // TODO: move to selectable? Separate directive\n    // TODO: move to selectable? Separate directive\n    Grid.prototype.determineRowToSelect = \n    // TODO: move to selectable? Separate directive\n    function (changes) {\n        if (['load', 'page', 'filter', 'sort', 'refresh'].indexOf(changes['action']) !== -1) {\n            return this.dataSet.select();\n        }\n        if (changes['action'] === 'remove') {\n            if (changes['elements'].length === 0) {\n                // we have to store which one to select as the data will be reloaded\n                this.dataSet.willSelectLastRow();\n            }\n            else {\n                return this.dataSet.selectPreviousRow();\n            }\n        }\n        if (changes['action'] === 'append') {\n            // we have to store which one to select as the data will be reloaded\n            this.dataSet.willSelectLastRow();\n        }\n        if (changes['action'] === 'add') {\n            return this.dataSet.selectFirstRow();\n        }\n        if (changes['action'] === 'update') {\n            return this.dataSet.selectFirstRow();\n        }\n        if (changes['action'] === 'prepend') {\n            // we have to store which one to select as the data will be reloaded\n            this.dataSet.willSelectFirstRow();\n        }\n        return null;\n    };\n    Grid.prototype.prepareSource = function (source) {\n        var initialSource = this.getInitialSort();\n        if (initialSource && initialSource['field'] && initialSource['direction']) {\n            source.setSort([initialSource], false);\n        }\n        if (this.getSetting('pager.display') === true) {\n            source.setPaging(1, this.getSetting('pager.perPage'), false);\n        }\n        source.refresh();\n        return source;\n    };\n    Grid.prototype.getInitialSort = function () {\n        var sortConf = {};\n        this.getColumns().forEach(function (column) {\n            if (column.isSortable && column.defaultSortDirection) {\n                sortConf['field'] = column.id;\n                sortConf['direction'] = column.defaultSortDirection;\n                sortConf['compare'] = column.getCompareFunction();\n            }\n        });\n        return sortConf;\n    };\n    Grid.prototype.getSelectedRows = function () {\n        return this.dataSet.getRows()\n            .filter(function (r) { return r.isSelected; });\n    };\n    Grid.prototype.selectAllRows = function (status) {\n        this.dataSet.getRows()\n            .forEach(function (r) { return r.isSelected = status; });\n    };\n    Grid.prototype.getFirstRow = function () {\n        return this.dataSet.getFirstRow();\n    };\n    Grid.prototype.getLastRow = function () {\n        return this.dataSet.getLastRow();\n    };\n    return Grid;\n}());\n\nvar CellComponent = /** @class */ (function () {\n    function CellComponent() {\n        this.inputClass = '';\n        this.mode = 'inline';\n        this.isInEditing = false;\n        this.edited = new core.EventEmitter();\n    }\n    CellComponent.prototype.onEdited = function (event) {\n        if (this.isNew) {\n            this.grid.create(this.grid.getNewRow(), this.createConfirm);\n        }\n        else {\n            this.grid.save(this.row, this.editConfirm);\n        }\n    };\n    CellComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-smart-table-cell',\n                    template: \"\\n    <table-cell-view-mode *ngIf=\\\"!isInEditing\\\" [cell]=\\\"cell\\\"></table-cell-view-mode>\\n    <table-cell-edit-mode *ngIf=\\\"isInEditing\\\" [cell]=\\\"cell\\\"\\n                          [inputClass]=\\\"inputClass\\\"\\n                          (edited)=\\\"onEdited($event)\\\">\\n    </table-cell-edit-mode>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    CellComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"row\": [{ type: core.Input },],\n        \"editConfirm\": [{ type: core.Input },],\n        \"createConfirm\": [{ type: core.Input },],\n        \"isNew\": [{ type: core.Input },],\n        \"cell\": [{ type: core.Input },],\n        \"inputClass\": [{ type: core.Input },],\n        \"mode\": [{ type: core.Input },],\n        \"isInEditing\": [{ type: core.Input },],\n        \"edited\": [{ type: core.Output },],\n    };\n    return CellComponent;\n}());\n\nvar EditCellDefault = /** @class */ (function () {\n    function EditCellDefault() {\n        this.inputClass = '';\n        this.edited = new core.EventEmitter();\n    }\n    EditCellDefault.prototype.onEdited = function (event) {\n        this.edited.next(event);\n        return false;\n    };\n    EditCellDefault.prototype.onStopEditing = function () {\n        this.cell.getRow().isInEditing = false;\n        return false;\n    };\n    EditCellDefault.prototype.onClick = function (event) {\n        event.stopPropagation();\n    };\n    EditCellDefault.propDecorators = {\n        \"cell\": [{ type: core.Input },],\n        \"inputClass\": [{ type: core.Input },],\n        \"edited\": [{ type: core.Output },],\n    };\n    return EditCellDefault;\n}());\n\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar CustomEditComponent = /** @class */ (function (_super) {\n    __extends(CustomEditComponent, _super);\n    function CustomEditComponent(resolver) {\n        var _this = _super.call(this) || this;\n        _this.resolver = resolver;\n        return _this;\n    }\n    CustomEditComponent.prototype.ngOnChanges = function (changes) {\n        var _this = this;\n        if (this.cell && !this.customComponent) {\n            var componentFactory = this.resolver.resolveComponentFactory(this.cell.getColumn().editor.component);\n            this.customComponent = this.dynamicTarget.createComponent(componentFactory);\n            // set @Inputs and @Outputs of custom component\n            this.customComponent.instance.cell = this.cell;\n            this.customComponent.instance.inputClass = this.inputClass;\n            this.customComponent.instance.onStopEditing.subscribe(function () { return _this.onStopEditing(); });\n            this.customComponent.instance.onEdited.subscribe(function (event) { return _this.onEdited(event); });\n            this.customComponent.instance.onClick.subscribe(function (event) { return _this.onClick(event); });\n        }\n    };\n    CustomEditComponent.prototype.ngOnDestroy = function () {\n        if (this.customComponent) {\n            this.customComponent.destroy();\n        }\n    };\n    CustomEditComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'table-cell-custom-editor',\n                    template: \"\\n    <ng-template #dynamicTarget></ng-template>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    CustomEditComponent.ctorParameters = function () { return [\n        { type: core.ComponentFactoryResolver, },\n    ]; };\n    CustomEditComponent.propDecorators = {\n        \"dynamicTarget\": [{ type: core.ViewChild, args: ['dynamicTarget', { read: core.ViewContainerRef },] },],\n    };\n    return CustomEditComponent;\n}(EditCellDefault));\n\nvar __extends$1 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar DefaultEditComponent = /** @class */ (function (_super) {\n    __extends$1(DefaultEditComponent, _super);\n    function DefaultEditComponent() {\n        return _super.call(this) || this;\n    }\n    DefaultEditComponent.prototype.getEditorType = function () {\n        return this.cell.getColumn().editor && this.cell.getColumn().editor.type;\n    };\n    DefaultEditComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'table-cell-default-editor',\n                    template: \"<div [ngSwitch]=\\\"getEditorType()\\\"><select-editor *ngSwitchCase=\\\"'list'\\\" [cell]=\\\"cell\\\" [inputClass]=\\\"inputClass\\\" (onClick)=\\\"onClick($event)\\\" (onEdited)=\\\"onEdited($event)\\\" (onStopEditing)=\\\"onStopEditing()\\\"></select-editor><textarea-editor *ngSwitchCase=\\\"'textarea'\\\" [cell]=\\\"cell\\\" [inputClass]=\\\"inputClass\\\" (onClick)=\\\"onClick($event)\\\" (onEdited)=\\\"onEdited($event)\\\" (onStopEditing)=\\\"onStopEditing()\\\"></textarea-editor><checkbox-editor *ngSwitchCase=\\\"'checkbox'\\\" [cell]=\\\"cell\\\" [inputClass]=\\\"inputClass\\\" (onClick)=\\\"onClick($event)\\\"></checkbox-editor><completer-editor *ngSwitchCase=\\\"'completer'\\\" [cell]=\\\"cell\\\"></completer-editor><input-editor *ngSwitchDefault [cell]=\\\"cell\\\" [inputClass]=\\\"inputClass\\\" (onClick)=\\\"onClick($event)\\\" (onEdited)=\\\"onEdited($event)\\\" (onStopEditing)=\\\"onStopEditing()\\\"></input-editor></div>\",\n                },] },\n    ];\n    /** @nocollapse */\n    DefaultEditComponent.ctorParameters = function () { return []; };\n    return DefaultEditComponent;\n}(EditCellDefault));\n\nvar EditCellComponent = /** @class */ (function () {\n    function EditCellComponent() {\n        this.inputClass = '';\n        this.edited = new core.EventEmitter();\n    }\n    EditCellComponent.prototype.onEdited = function (event) {\n        this.edited.next(event);\n        return false;\n    };\n    EditCellComponent.prototype.getEditorType = function () {\n        return this.cell.getColumn().editor && this.cell.getColumn().editor.type;\n    };\n    EditCellComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'table-cell-edit-mode',\n                    template: \"\\n      <div [ngSwitch]=\\\"getEditorType()\\\">\\n        <table-cell-custom-editor *ngSwitchCase=\\\"'custom'\\\"\\n                                  [cell]=\\\"cell\\\"\\n                                  [inputClass]=\\\"inputClass\\\"\\n                                  (edited)=\\\"onEdited($event)\\\">\\n        </table-cell-custom-editor>\\n        <table-cell-default-editor *ngSwitchDefault\\n                                  [cell]=\\\"cell\\\"\\n                                  [inputClass]=\\\"inputClass\\\"\\n                                  (edited)=\\\"onEdited($event)\\\">\\n        </table-cell-default-editor>\\n      </div>\\n    \",\n                },] },\n    ];\n    /** @nocollapse */\n    EditCellComponent.propDecorators = {\n        \"cell\": [{ type: core.Input },],\n        \"inputClass\": [{ type: core.Input },],\n        \"edited\": [{ type: core.Output },],\n    };\n    return EditCellComponent;\n}());\n\nvar DefaultEditor = /** @class */ (function () {\n    function DefaultEditor() {\n        this.onStopEditing = new core.EventEmitter();\n        this.onEdited = new core.EventEmitter();\n        this.onClick = new core.EventEmitter();\n    }\n    DefaultEditor.propDecorators = {\n        \"cell\": [{ type: core.Input },],\n        \"inputClass\": [{ type: core.Input },],\n        \"onStopEditing\": [{ type: core.Output },],\n        \"onEdited\": [{ type: core.Output },],\n        \"onClick\": [{ type: core.Output },],\n    };\n    return DefaultEditor;\n}());\n\nvar __extends$2 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar CheckboxEditorComponent = /** @class */ (function (_super) {\n    __extends$2(CheckboxEditorComponent, _super);\n    function CheckboxEditorComponent() {\n        return _super.call(this) || this;\n    }\n    CheckboxEditorComponent.prototype.onChange = function (event) {\n        var trueVal = (this.cell.getColumn().getConfig() && this.cell.getColumn().getConfig().true) || true;\n        var falseVal = (this.cell.getColumn().getConfig() && this.cell.getColumn().getConfig().false) || false;\n        this.cell.newValue = event.target.checked ? trueVal : falseVal;\n    };\n    CheckboxEditorComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'checkbox-editor',\n                    styles: [\":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em} /*# sourceMappingURL=editor.component.css.map */ \"],\n                    template: \"\\n    <input [ngClass]=\\\"inputClass\\\"\\n           type=\\\"checkbox\\\"\\n           class=\\\"form-control\\\"\\n           [name]=\\\"cell.getId()\\\"\\n           [disabled]=\\\"!cell.isEditable()\\\"\\n           [checked]=\\\"cell.getValue() == (cell.getColumn().getConfig()?.true || true)\\\"\\n           (click)=\\\"onClick.emit($event)\\\"\\n           (change)=\\\"onChange($event)\\\">\\n    \",\n                },] },\n    ];\n    /** @nocollapse */\n    CheckboxEditorComponent.ctorParameters = function () { return []; };\n    return CheckboxEditorComponent;\n}(DefaultEditor));\n\nvar __extends$3 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar CompleterEditorComponent = /** @class */ (function (_super) {\n    __extends$3(CompleterEditorComponent, _super);\n    function CompleterEditorComponent(completerService) {\n        var _this = _super.call(this) || this;\n        _this.completerService = completerService;\n        _this.completerStr = '';\n        return _this;\n    }\n    CompleterEditorComponent.prototype.ngOnInit = function () {\n        if (this.cell.getColumn().editor && this.cell.getColumn().editor.type === 'completer') {\n            var config = this.cell.getColumn().getConfig().completer;\n            config.dataService = this.completerService.local(config.data, config.searchFields, config.titleField);\n            config.dataService.descriptionField(config.descriptionField);\n        }\n    };\n    CompleterEditorComponent.prototype.onEditedCompleter = function (event) {\n        this.cell.newValue = event.title;\n        return false;\n    };\n    CompleterEditorComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'completer-editor',\n                    template: \"\\n    <ng2-completer [(ngModel)]=\\\"completerStr\\\"\\n                   [dataService]=\\\"cell.getColumn().getConfig().completer.dataService\\\"\\n                   [minSearchLength]=\\\"cell.getColumn().getConfig().completer.minSearchLength || 0\\\"\\n                   [pause]=\\\"cell.getColumn().getConfig().completer.pause || 0\\\"\\n                   [placeholder]=\\\"cell.getColumn().getConfig().completer.placeholder || 'Start typing...'\\\"\\n                   (selected)=\\\"onEditedCompleter($event)\\\">\\n    </ng2-completer>\\n    \",\n                },] },\n    ];\n    /** @nocollapse */\n    CompleterEditorComponent.ctorParameters = function () { return [\n        { type: ng2Completer.CompleterService, },\n    ]; };\n    return CompleterEditorComponent;\n}(DefaultEditor));\n\nvar __extends$4 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar InputEditorComponent = /** @class */ (function (_super) {\n    __extends$4(InputEditorComponent, _super);\n    function InputEditorComponent() {\n        return _super.call(this) || this;\n    }\n    InputEditorComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'input-editor',\n                    styles: [\":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em} /*# sourceMappingURL=editor.component.css.map */ \"],\n                    template: \"\\n    <input [ngClass]=\\\"inputClass\\\"\\n           class=\\\"form-control\\\"\\n           [(ngModel)]=\\\"cell.newValue\\\"\\n           [name]=\\\"cell.getId()\\\"\\n           [placeholder]=\\\"cell.getTitle()\\\"\\n           [disabled]=\\\"!cell.isEditable()\\\"\\n           (click)=\\\"onClick.emit($event)\\\"\\n           (keydown.enter)=\\\"onEdited.emit($event)\\\"\\n           (keydown.esc)=\\\"onStopEditing.emit()\\\">\\n    \",\n                },] },\n    ];\n    /** @nocollapse */\n    InputEditorComponent.ctorParameters = function () { return []; };\n    return InputEditorComponent;\n}(DefaultEditor));\n\nvar __extends$5 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar SelectEditorComponent = /** @class */ (function (_super) {\n    __extends$5(SelectEditorComponent, _super);\n    function SelectEditorComponent() {\n        return _super.call(this) || this;\n    }\n    SelectEditorComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'select-editor',\n                    template: \"\\n    <select [ngClass]=\\\"inputClass\\\"\\n            class=\\\"form-control\\\"\\n            [(ngModel)]=\\\"cell.newValue\\\"\\n            [name]=\\\"cell.getId()\\\"\\n            [disabled]=\\\"!cell.isEditable()\\\"\\n            (click)=\\\"onClick.emit($event)\\\"\\n            (keydown.enter)=\\\"onEdited.emit($event)\\\"\\n            (keydown.esc)=\\\"onStopEditing.emit()\\\">\\n\\n        <option *ngFor=\\\"let option of cell.getColumn().getConfig()?.list\\\" [value]=\\\"option.value\\\"\\n                [selected]=\\\"option.value === cell.getValue()\\\">{{ option.title }}\\n        </option>\\n    </select>\\n    \",\n                },] },\n    ];\n    /** @nocollapse */\n    SelectEditorComponent.ctorParameters = function () { return []; };\n    return SelectEditorComponent;\n}(DefaultEditor));\n\nvar __extends$6 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar TextareaEditorComponent = /** @class */ (function (_super) {\n    __extends$6(TextareaEditorComponent, _super);\n    function TextareaEditorComponent() {\n        return _super.call(this) || this;\n    }\n    TextareaEditorComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'textarea-editor',\n                    styles: [\":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em} /*# sourceMappingURL=editor.component.css.map */ \"],\n                    template: \"\\n    <textarea [ngClass]=\\\"inputClass\\\"\\n              class=\\\"form-control\\\"\\n              [(ngModel)]=\\\"cell.newValue\\\"\\n              [name]=\\\"cell.getId()\\\"\\n              [disabled]=\\\"!cell.isEditable()\\\"\\n              [placeholder]=\\\"cell.getTitle()\\\"\\n              (click)=\\\"onClick.emit($event)\\\"\\n              (keydown.enter)=\\\"onEdited.emit($event)\\\"\\n              (keydown.esc)=\\\"onStopEditing.emit()\\\">\\n    </textarea>\\n    \",\n                },] },\n    ];\n    /** @nocollapse */\n    TextareaEditorComponent.ctorParameters = function () { return []; };\n    return TextareaEditorComponent;\n}(DefaultEditor));\n\nvar CustomViewComponent = /** @class */ (function () {\n    function CustomViewComponent(resolver) {\n        this.resolver = resolver;\n    }\n    CustomViewComponent.prototype.ngOnInit = function () {\n        if (this.cell && !this.customComponent) {\n            this.createCustomComponent();\n            this.callOnComponentInit();\n            this.patchInstance();\n        }\n    };\n    CustomViewComponent.prototype.ngOnDestroy = function () {\n        if (this.customComponent) {\n            this.customComponent.destroy();\n        }\n    };\n    CustomViewComponent.prototype.createCustomComponent = function () {\n        var componentFactory = this.resolver.resolveComponentFactory(this.cell.getColumn().renderComponent);\n        this.customComponent = this.dynamicTarget.createComponent(componentFactory);\n    };\n    CustomViewComponent.prototype.callOnComponentInit = function () {\n        var onComponentInitFunction = this.cell.getColumn().getOnComponentInitFunction();\n        onComponentInitFunction && onComponentInitFunction(this.customComponent.instance);\n    };\n    CustomViewComponent.prototype.patchInstance = function () {\n        Object.assign(this.customComponent.instance, this.getPatch());\n    };\n    CustomViewComponent.prototype.getPatch = function () {\n        return {\n            value: this.cell.getValue(),\n            rowData: this.cell.getRow().getData()\n        };\n    };\n    CustomViewComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'custom-view-component',\n                    template: \"\\n    <ng-template #dynamicTarget></ng-template>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    CustomViewComponent.ctorParameters = function () { return [\n        { type: core.ComponentFactoryResolver, },\n    ]; };\n    CustomViewComponent.propDecorators = {\n        \"cell\": [{ type: core.Input },],\n        \"dynamicTarget\": [{ type: core.ViewChild, args: ['dynamicTarget', { read: core.ViewContainerRef },] },],\n    };\n    return CustomViewComponent;\n}());\n\nvar ViewCellComponent = /** @class */ (function () {\n    function ViewCellComponent() {\n    }\n    ViewCellComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'table-cell-view-mode',\n                    changeDetection: core.ChangeDetectionStrategy.OnPush,\n                    template: \"\\n    <div [ngSwitch]=\\\"cell.getColumn().type\\\">\\n        <custom-view-component *ngSwitchCase=\\\"'custom'\\\" [cell]=\\\"cell\\\"></custom-view-component>\\n        <div *ngSwitchCase=\\\"'html'\\\" [innerHTML]=\\\"cell.getValue()\\\"></div>\\n        <div *ngSwitchDefault>{{ cell.getValue() }}</div>\\n    </div>\\n    \",\n                },] },\n    ];\n    /** @nocollapse */\n    ViewCellComponent.propDecorators = {\n        \"cell\": [{ type: core.Input },],\n    };\n    return ViewCellComponent;\n}());\n\nvar CELL_COMPONENTS = [\n    CellComponent,\n    CustomEditComponent,\n    DefaultEditComponent,\n    EditCellComponent,\n    CheckboxEditorComponent,\n    CompleterEditorComponent,\n    InputEditorComponent,\n    SelectEditorComponent,\n    TextareaEditorComponent,\n    CustomViewComponent,\n    ViewCellComponent,\n];\nvar CellModule = /** @class */ (function () {\n    function CellModule() {\n    }\n    CellModule.decorators = [\n        { type: core.NgModule, args: [{\n                    imports: [\n                        common.CommonModule,\n                        forms.FormsModule,\n                        ng2Completer.Ng2CompleterModule,\n                    ],\n                    declarations: CELL_COMPONENTS.slice(),\n                    exports: CELL_COMPONENTS.slice(),\n                },] },\n    ];\n    return CellModule;\n}());\n\nvar DataSource = /** @class */ (function () {\n    function DataSource() {\n        this.onChangedSource = new rxjs.Subject();\n        this.onAddedSource = new rxjs.Subject();\n        this.onUpdatedSource = new rxjs.Subject();\n        this.onRemovedSource = new rxjs.Subject();\n    }\n    DataSource.prototype.refresh = function () {\n        this.emitOnChanged('refresh');\n    };\n    DataSource.prototype.load = function (data) {\n        this.emitOnChanged('load');\n        return Promise.resolve();\n    };\n    DataSource.prototype.onChanged = function () {\n        return this.onChangedSource.asObservable();\n    };\n    DataSource.prototype.onAdded = function () {\n        return this.onAddedSource.asObservable();\n    };\n    DataSource.prototype.onUpdated = function () {\n        return this.onUpdatedSource.asObservable();\n    };\n    DataSource.prototype.onRemoved = function () {\n        return this.onRemovedSource.asObservable();\n    };\n    DataSource.prototype.prepend = function (element) {\n        this.emitOnAdded(element);\n        this.emitOnChanged('prepend');\n        return Promise.resolve();\n    };\n    DataSource.prototype.append = function (element) {\n        this.emitOnAdded(element);\n        this.emitOnChanged('append');\n        return Promise.resolve();\n    };\n    DataSource.prototype.add = function (element) {\n        this.emitOnAdded(element);\n        this.emitOnChanged('add');\n        return Promise.resolve();\n    };\n    DataSource.prototype.remove = function (element) {\n        this.emitOnRemoved(element);\n        this.emitOnChanged('remove');\n        return Promise.resolve();\n    };\n    DataSource.prototype.update = function (element, values) {\n        this.emitOnUpdated(element);\n        this.emitOnChanged('update');\n        return Promise.resolve();\n    };\n    DataSource.prototype.empty = function () {\n        this.emitOnChanged('empty');\n        return Promise.resolve();\n    };\n    DataSource.prototype.setSort = function (conf, doEmit) {\n        if (doEmit) {\n            this.emitOnChanged('sort');\n        }\n    };\n    DataSource.prototype.setFilter = function (conf, andOperator, doEmit) {\n        if (doEmit) {\n            this.emitOnChanged('filter');\n        }\n    };\n    DataSource.prototype.addFilter = function (fieldConf, andOperator, doEmit) {\n        if (doEmit) {\n            this.emitOnChanged('filter');\n        }\n    };\n    DataSource.prototype.setPaging = function (page, perPage, doEmit) {\n        if (doEmit) {\n            this.emitOnChanged('paging');\n        }\n    };\n    DataSource.prototype.setPage = function (page, doEmit) {\n        if (doEmit) {\n            this.emitOnChanged('page');\n        }\n    };\n    DataSource.prototype.emitOnRemoved = function (element) {\n        this.onRemovedSource.next(element);\n    };\n    DataSource.prototype.emitOnUpdated = function (element) {\n        this.onUpdatedSource.next(element);\n    };\n    DataSource.prototype.emitOnAdded = function (element) {\n        this.onAddedSource.next(element);\n    };\n    DataSource.prototype.emitOnChanged = function (action) {\n        var _this = this;\n        this.getElements().then(function (elements) {\n            return _this.onChangedSource.next({\n                action: action,\n                elements: elements,\n                paging: _this.getPaging(),\n                filter: _this.getFilter(),\n                sort: _this.getSort(),\n            });\n        });\n    };\n    return DataSource;\n}());\n\nvar FilterComponent = /** @class */ (function () {\n    function FilterComponent() {\n        this.inputClass = '';\n        this.filter = new core.EventEmitter();\n        this.query = '';\n    }\n    FilterComponent.prototype.ngOnChanges = function (changes) {\n        var _this = this;\n        if (changes.source) {\n            if (!changes.source.firstChange) {\n                this.dataChangedSub.unsubscribe();\n            }\n            this.dataChangedSub = this.source.onChanged().subscribe(function (dataChanges) {\n                var filterConf = _this.source.getFilter();\n                if (filterConf && filterConf.filters && filterConf.filters.length === 0) {\n                    _this.query = '';\n                    // add a check for existing filters an set the query if one exists for this column\n                    // this covers instances where the filter is set by user code while maintaining existing functionality\n                }\n                else if (filterConf && filterConf.filters && filterConf.filters.length > 0) {\n                    filterConf.filters.forEach(function (k, v) {\n                        if (k.field == _this.column.id) {\n                            _this.query = k.search;\n                        }\n                    });\n                }\n            });\n        }\n    };\n    FilterComponent.prototype.onFilter = function (query) {\n        this.source.addFilter({\n            field: this.column.id,\n            search: query,\n            filter: this.column.getFilterFunction(),\n        });\n    };\n    FilterComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-smart-table-filter',\n                    styles: [\":host .ng2-smart-filter /deep/ input,:host .ng2-smart-filter /deep/ select{width:100%;line-height:normal;padding:.375em .75em;font-weight:400}:host .ng2-smart-filter /deep/ input[type=search]{box-sizing:inherit}:host .ng2-smart-filter /deep/ .completer-dropdown-holder{font-weight:400}:host .ng2-smart-filter /deep/ a{font-weight:400} /*# sourceMappingURL=filter.component.css.map */ \"],\n                    template: \"\\n    <div class=\\\"ng2-smart-filter\\\" *ngIf=\\\"column.isFilterable\\\" [ngSwitch]=\\\"column.getFilterType()\\\">\\n      <select-filter *ngSwitchCase=\\\"'list'\\\"\\n                     [query]=\\\"query\\\"\\n                     [ngClass]=\\\"inputClass\\\"\\n                     [column]=\\\"column\\\"\\n                     (filter)=\\\"onFilter($event)\\\">\\n      </select-filter>\\n      <checkbox-filter *ngSwitchCase=\\\"'checkbox'\\\"\\n                       [query]=\\\"query\\\"\\n                       [ngClass]=\\\"inputClass\\\"\\n                       [column]=\\\"column\\\"\\n                       (filter)=\\\"onFilter($event)\\\">\\n      </checkbox-filter>\\n      <completer-filter *ngSwitchCase=\\\"'completer'\\\"\\n                        [query]=\\\"query\\\"\\n                        [ngClass]=\\\"inputClass\\\"\\n                        [column]=\\\"column\\\"\\n                        (filter)=\\\"onFilter($event)\\\">\\n      </completer-filter>\\n      <input-filter *ngSwitchDefault\\n                    [query]=\\\"query\\\"\\n                    [ngClass]=\\\"inputClass\\\"\\n                    [column]=\\\"column\\\"\\n                    (filter)=\\\"onFilter($event)\\\">\\n      </input-filter>\\n    </div>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    FilterComponent.propDecorators = {\n        \"column\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"inputClass\": [{ type: core.Input },],\n        \"filter\": [{ type: core.Output },],\n    };\n    return FilterComponent;\n}());\n\nvar DefaultFilter = /** @class */ (function () {\n    function DefaultFilter() {\n        this.delay = 300;\n        this.filter = new core.EventEmitter();\n    }\n    DefaultFilter.prototype.ngOnDestroy = function () {\n        if (this.changesSubscription) {\n            this.changesSubscription.unsubscribe();\n        }\n    };\n    DefaultFilter.prototype.setFilter = function () {\n        this.filter.emit(this.query);\n    };\n    DefaultFilter.propDecorators = {\n        \"query\": [{ type: core.Input },],\n        \"inputClass\": [{ type: core.Input },],\n        \"column\": [{ type: core.Input },],\n        \"filter\": [{ type: core.Output },],\n    };\n    return DefaultFilter;\n}());\n\nvar __extends$7 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar CheckboxFilterComponent = /** @class */ (function (_super) {\n    __extends$7(CheckboxFilterComponent, _super);\n    function CheckboxFilterComponent() {\n        var _this = _super.call(this) || this;\n        _this.filterActive = false;\n        _this.inputControl = new forms.FormControl();\n        return _this;\n    }\n    CheckboxFilterComponent.prototype.ngOnInit = function () {\n        var _this = this;\n        this.changesSubscription = this.inputControl.valueChanges\n            .pipe(operators.debounceTime(this.delay))\n            .subscribe(function (checked) {\n            _this.filterActive = true;\n            var trueVal = (_this.column.getFilterConfig() && _this.column.getFilterConfig().true) || true;\n            var falseVal = (_this.column.getFilterConfig() && _this.column.getFilterConfig().false) || false;\n            _this.query = checked ? trueVal : falseVal;\n            _this.setFilter();\n        });\n    };\n    CheckboxFilterComponent.prototype.resetFilter = function (event) {\n        event.preventDefault();\n        this.query = '';\n        this.inputControl.setValue(false, { emitEvent: false });\n        this.filterActive = false;\n        this.setFilter();\n    };\n    CheckboxFilterComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'checkbox-filter',\n                    template: \"\\n    <input type=\\\"checkbox\\\" [formControl]=\\\"inputControl\\\" [ngClass]=\\\"inputClass\\\" class=\\\"form-control\\\">\\n    <a href=\\\"#\\\" *ngIf=\\\"filterActive\\\"\\n                (click)=\\\"resetFilter($event)\\\">{{column.getFilterConfig()?.resetText || 'reset'}}</a>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    CheckboxFilterComponent.ctorParameters = function () { return []; };\n    return CheckboxFilterComponent;\n}(DefaultFilter));\n\nvar __extends$8 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar CompleterFilterComponent = /** @class */ (function (_super) {\n    __extends$8(CompleterFilterComponent, _super);\n    function CompleterFilterComponent(completerService) {\n        var _this = _super.call(this) || this;\n        _this.completerService = completerService;\n        _this.completerContent = new rxjs.Subject();\n        return _this;\n    }\n    CompleterFilterComponent.prototype.ngOnInit = function () {\n        var _this = this;\n        var config = this.column.getFilterConfig().completer;\n        config.dataService = this.completerService.local(config.data, config.searchFields, config.titleField);\n        config.dataService.descriptionField(config.descriptionField);\n        this.changesSubscription = this.completerContent\n            .pipe(operators.map(function (ev) { return (ev && ev.title) || ev || ''; }), operators.distinctUntilChanged(), operators.debounceTime(this.delay))\n            .subscribe(function (search) {\n            _this.query = search;\n            _this.setFilter();\n        });\n    };\n    CompleterFilterComponent.prototype.inputTextChanged = function (event) {\n        // workaround to trigger the search event when the home/end buttons are clicked\n        // when this happens the [(ngModel)]=\"query\" is set to \"\" but the (selected) method is not called\n        // so here it gets called manually\n        if (event === '') {\n            this.completerContent.next(event);\n        }\n    };\n    CompleterFilterComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'completer-filter',\n                    template: \"\\n    <ng2-completer [(ngModel)]=\\\"query\\\"\\n                   (ngModelChange)=\\\"inputTextChanged($event)\\\"\\n                   [dataService]=\\\"column.getFilterConfig().completer.dataService\\\"\\n                   [minSearchLength]=\\\"column.getFilterConfig().completer.minSearchLength || 0\\\"\\n                   [pause]=\\\"column.getFilterConfig().completer.pause || 0\\\"\\n                   [placeholder]=\\\"column.getFilterConfig().completer.placeholder || 'Start typing...'\\\"\\n                   (selected)=\\\"completerContent.next($event)\\\">\\n    </ng2-completer>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    CompleterFilterComponent.ctorParameters = function () { return [\n        { type: ng2Completer.CompleterService, },\n    ]; };\n    return CompleterFilterComponent;\n}(DefaultFilter));\n\nvar __extends$9 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar InputFilterComponent = /** @class */ (function (_super) {\n    __extends$9(InputFilterComponent, _super);\n    function InputFilterComponent() {\n        var _this = _super.call(this) || this;\n        _this.inputControl = new forms.FormControl();\n        return _this;\n    }\n    InputFilterComponent.prototype.ngOnInit = function () {\n        var _this = this;\n        if (this.query) {\n            this.inputControl.setValue(this.query);\n        }\n        this.inputControl.valueChanges\n            .pipe(operators.skip(1), operators.distinctUntilChanged(), operators.debounceTime(this.delay))\n            .subscribe(function (value) {\n            _this.query = _this.inputControl.value;\n            _this.setFilter();\n        });\n    };\n    InputFilterComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'input-filter',\n                    template: \"\\n    <input\\n      [ngClass]=\\\"inputClass\\\"\\n      [formControl]=\\\"inputControl\\\"\\n      class=\\\"form-control\\\"\\n      type=\\\"text\\\"\\n      placeholder=\\\"{{ column.title }}\\\"/>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    InputFilterComponent.ctorParameters = function () { return []; };\n    return InputFilterComponent;\n}(DefaultFilter));\n\nvar __extends$10 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar SelectFilterComponent = /** @class */ (function (_super) {\n    __extends$10(SelectFilterComponent, _super);\n    function SelectFilterComponent() {\n        var _this = _super.call(this) || this;\n        _this.inputControl = new forms.FormControl();\n        return _this;\n    }\n    SelectFilterComponent.prototype.ngOnInit = function () {\n        var _this = this;\n        this.inputControl.valueChanges\n            .pipe(operators.skip(1), operators.distinctUntilChanged(), operators.debounceTime(this.delay))\n            .subscribe(function (value) { return _this.setFilter(); });\n    };\n    SelectFilterComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'select-filter',\n                    template: \"\\n    <select [ngClass]=\\\"inputClass\\\"\\n            class=\\\"form-control\\\"\\n            [(ngModel)]=\\\"query\\\"\\n            [formControl]=\\\"inputControl\\\">\\n\\n        <option value=\\\"\\\">{{ column.getFilterConfig().selectText }}</option>\\n        <option *ngFor=\\\"let option of column.getFilterConfig().list\\\" [value]=\\\"option.value\\\">\\n          {{ option.title }}\\n        </option>\\n    </select>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    SelectFilterComponent.ctorParameters = function () { return []; };\n    return SelectFilterComponent;\n}(DefaultFilter));\n\nvar FILTER_COMPONENTS = [\n    FilterComponent,\n    CheckboxFilterComponent,\n    CompleterFilterComponent,\n    InputFilterComponent,\n    SelectFilterComponent,\n];\nvar FilterModule = /** @class */ (function () {\n    function FilterModule() {\n    }\n    FilterModule.decorators = [\n        { type: core.NgModule, args: [{\n                    imports: [\n                        common.CommonModule,\n                        forms.FormsModule,\n                        forms.ReactiveFormsModule,\n                        ng2Completer.Ng2CompleterModule,\n                    ],\n                    declarations: FILTER_COMPONENTS.slice(),\n                    exports: FILTER_COMPONENTS.slice(),\n                },] },\n    ];\n    return FilterModule;\n}());\n\nvar PagerComponent = /** @class */ (function () {\n    function PagerComponent() {\n        this.perPageSelect = [];\n        this.changePage = new core.EventEmitter();\n        this.count = 0;\n    }\n    PagerComponent.prototype.ngOnChanges = function (changes) {\n        var _this = this;\n        if (changes.source) {\n            if (!changes.source.firstChange) {\n                this.dataChangedSub.unsubscribe();\n            }\n            this.dataChangedSub = this.source.onChanged().subscribe(function (dataChanges) {\n                _this.page = _this.source.getPaging().page;\n                _this.perPage = _this.source.getPaging().perPage;\n                _this.currentPerPage = _this.perPage;\n                _this.count = _this.source.count();\n                if (_this.isPageOutOfBounce()) {\n                    _this.source.setPage(--_this.page);\n                }\n                _this.processPageChange(dataChanges);\n                _this.initPages();\n            });\n        }\n    };\n    /**\n     * We change the page here depending on the action performed against data source\n     * if a new element was added to the end of the table - then change the page to the last\n     * if a new element was added to the beginning of the table - then to the first page\n     * @param changes\n     */\n    /**\n       * We change the page here depending on the action performed against data source\n       * if a new element was added to the end of the table - then change the page to the last\n       * if a new element was added to the beginning of the table - then to the first page\n       * @param changes\n       */\n    PagerComponent.prototype.processPageChange = /**\n       * We change the page here depending on the action performed against data source\n       * if a new element was added to the end of the table - then change the page to the last\n       * if a new element was added to the beginning of the table - then to the first page\n       * @param changes\n       */\n    function (changes) {\n        if (changes['action'] === 'prepend') {\n            this.source.setPage(1);\n        }\n        if (changes['action'] === 'append') {\n            this.source.setPage(this.getLast());\n        }\n    };\n    PagerComponent.prototype.shouldShow = function () {\n        return this.source.count() > this.perPage;\n    };\n    PagerComponent.prototype.paginate = function (page) {\n        this.source.setPage(page);\n        this.page = page;\n        this.changePage.emit({ page: page });\n        return false;\n    };\n    PagerComponent.prototype.next = function () {\n        return this.paginate(this.getPage() + 1);\n    };\n    PagerComponent.prototype.prev = function () {\n        return this.paginate(this.getPage() - 1);\n    };\n    PagerComponent.prototype.getPage = function () {\n        return this.page;\n    };\n    PagerComponent.prototype.getPages = function () {\n        return this.pages;\n    };\n    PagerComponent.prototype.getLast = function () {\n        return Math.ceil(this.count / this.perPage);\n    };\n    PagerComponent.prototype.isPageOutOfBounce = function () {\n        return (this.page * this.perPage) >= (this.count + this.perPage) && this.page > 1;\n    };\n    PagerComponent.prototype.initPages = function () {\n        var pagesCount = this.getLast();\n        var showPagesCount = 4;\n        showPagesCount = pagesCount < showPagesCount ? pagesCount : showPagesCount;\n        this.pages = [];\n        if (this.shouldShow()) {\n            var middleOne = Math.ceil(showPagesCount / 2);\n            middleOne = this.page >= middleOne ? this.page : middleOne;\n            var lastOne = middleOne + Math.floor(showPagesCount / 2);\n            lastOne = lastOne >= pagesCount ? pagesCount : lastOne;\n            var firstOne = lastOne - showPagesCount + 1;\n            for (var i = firstOne; i <= lastOne; i++) {\n                this.pages.push(i);\n            }\n        }\n    };\n    PagerComponent.prototype.onChangePerPage = function (event) {\n        if (this.currentPerPage) {\n            if (typeof this.currentPerPage === 'string' && this.currentPerPage.toLowerCase() === 'all') {\n                this.source.getPaging().perPage = null;\n            }\n            else {\n                this.source.getPaging().perPage = this.currentPerPage * 1;\n                this.source.refresh();\n            }\n            this.initPages();\n        }\n    };\n    PagerComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-smart-table-pager',\n                    styles: [\".ng2-smart-pagination{display:inline-flex;font-size:.875em;padding:0}.ng2-smart-pagination .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.ng2-smart-pagination .ng2-smart-page-item{display:inline}.ng2-smart-pagination .page-link-next,.ng2-smart-pagination .page-link-prev{font-size:10px}:host{display:flex;justify-content:space-between}:host select{margin:1rem 0 1rem 1rem}:host label{margin:1rem 0 1rem 1rem;line-height:2.5rem} /*# sourceMappingURL=pager.component.css.map */ \"],\n                    template: \"\\n    <nav *ngIf=\\\"shouldShow()\\\" class=\\\"ng2-smart-pagination-nav\\\">\\n      <ul class=\\\"ng2-smart-pagination pagination\\\">\\n        <li class=\\\"ng2-smart-page-item page-item\\\" [ngClass]=\\\"{disabled: getPage() == 1}\\\">\\n          <a class=\\\"ng2-smart-page-link page-link\\\" href=\\\"#\\\"\\n          (click)=\\\"getPage() == 1 ? false : paginate(1)\\\" aria-label=\\\"First\\\">\\n            <span aria-hidden=\\\"true\\\">&laquo;</span>\\n            <span class=\\\"sr-only\\\">First</span>\\n          </a>\\n        </li>\\n        <li class=\\\"ng2-smart-page-item page-item\\\" [ngClass]=\\\"{disabled: getPage() == 1}\\\">\\n          <a class=\\\"ng2-smart-page-link page-link page-link-prev\\\" href=\\\"#\\\"\\n             (click)=\\\"getPage() == 1 ? false : prev()\\\" aria-label=\\\"Prev\\\">\\n            <span aria-hidden=\\\"true\\\">&lt;</span>\\n            <span class=\\\"sr-only\\\">Prev</span>\\n          </a>\\n        </li>\\n        <li class=\\\"ng2-smart-page-item page-item\\\"\\n        [ngClass]=\\\"{active: getPage() == page}\\\" *ngFor=\\\"let page of getPages()\\\">\\n          <span class=\\\"ng2-smart-page-link page-link\\\"\\n          *ngIf=\\\"getPage() == page\\\">{{ page }} <span class=\\\"sr-only\\\">(current)</span></span>\\n          <a class=\\\"ng2-smart-page-link page-link\\\" href=\\\"#\\\"\\n          (click)=\\\"paginate(page)\\\" *ngIf=\\\"getPage() != page\\\">{{ page }}</a>\\n        </li>\\n\\n        <li class=\\\"ng2-smart-page-item page-item\\\"\\n            [ngClass]=\\\"{disabled: getPage() == getLast()}\\\">\\n          <a class=\\\"ng2-smart-page-link page-link page-link-next\\\" href=\\\"#\\\"\\n             (click)=\\\"getPage() == getLast() ? false : next()\\\" aria-label=\\\"Next\\\">\\n            <span aria-hidden=\\\"true\\\">&gt;</span>\\n            <span class=\\\"sr-only\\\">Next</span>\\n          </a>\\n        </li>\\n        \\n        <li class=\\\"ng2-smart-page-item page-item\\\"\\n        [ngClass]=\\\"{disabled: getPage() == getLast()}\\\">\\n          <a class=\\\"ng2-smart-page-link page-link\\\" href=\\\"#\\\"\\n          (click)=\\\"getPage() == getLast() ? false : paginate(getLast())\\\" aria-label=\\\"Last\\\">\\n            <span aria-hidden=\\\"true\\\">&raquo;</span>\\n            <span class=\\\"sr-only\\\">Last</span>\\n          </a>\\n        </li>\\n      </ul>\\n    </nav>\\n    \\n    <nav *ngIf=\\\"perPageSelect && perPageSelect.length > 0\\\" class=\\\"ng2-smart-pagination-per-page\\\">\\n      <label for=\\\"per-page\\\">\\n        Per Page:\\n      </label>\\n      <select (change)=\\\"onChangePerPage($event)\\\" [(ngModel)]=\\\"currentPerPage\\\" id=\\\"per-page\\\">\\n        <option *ngFor=\\\"let item of perPageSelect\\\" [value]=\\\"item\\\">{{ item }}</option>\\n      </select>\\n    </nav>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    PagerComponent.propDecorators = {\n        \"source\": [{ type: core.Input },],\n        \"perPageSelect\": [{ type: core.Input },],\n        \"changePage\": [{ type: core.Output },],\n    };\n    return PagerComponent;\n}());\n\nvar PagerModule = /** @class */ (function () {\n    function PagerModule() {\n    }\n    PagerModule.decorators = [\n        { type: core.NgModule, args: [{\n                    imports: [\n                        common.CommonModule,\n                        forms.FormsModule,\n                    ],\n                    declarations: [\n                        PagerComponent,\n                    ],\n                    exports: [\n                        PagerComponent,\n                    ],\n                },] },\n    ];\n    return PagerModule;\n}());\n\nvar Ng2SmartTableTbodyComponent = /** @class */ (function () {\n    function Ng2SmartTableTbodyComponent() {\n        this.save = new core.EventEmitter();\n        this.cancel = new core.EventEmitter();\n        this.edit = new core.EventEmitter();\n        this.delete = new core.EventEmitter();\n        this.custom = new core.EventEmitter();\n        this.edited = new core.EventEmitter();\n        this.userSelectRow = new core.EventEmitter();\n        this.editRowSelect = new core.EventEmitter();\n        this.multipleSelectRow = new core.EventEmitter();\n        this.rowHover = new core.EventEmitter();\n    }\n    Ng2SmartTableTbodyComponent.prototype.ngOnChanges = function () {\n        this.isMultiSelectVisible = this.grid.isMultiSelectVisible();\n        this.showActionColumnLeft = this.grid.showActionColumn('left');\n        this.mode = this.grid.getSetting('mode');\n        this.editInputClass = this.grid.getSetting('edit.inputClass');\n        this.showActionColumnRight = this.grid.showActionColumn('right');\n        this.isActionAdd = this.grid.getSetting('actions.add');\n        this.isActionEdit = this.grid.getSetting('actions.edit');\n        this.isActionDelete = this.grid.getSetting('actions.delete');\n        this.noDataMessage = this.grid.getSetting('noDataMessage');\n    };\n    Ng2SmartTableTbodyComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: '[ng2-st-tbody]',\n                    styles: [\":host .ng2-smart-row.selected{background:rgba(0,0,0,.05)}:host .ng2-smart-row .ng2-smart-actions.ng2-smart-action-multiple-select{text-align:center} /*# sourceMappingURL=tbody.component.css.map */ \"],\n                    template: \"<tr *ngFor=\\\"let row of grid.getRows()\\\" (click)=\\\"userSelectRow.emit(row)\\\" (mouseover)=\\\"rowHover.emit(row)\\\" class=\\\"ng2-smart-row\\\" [className]=\\\"rowClassFunction(row)\\\" [ngClass]=\\\"{selected: row.isSelected}\\\"><td *ngIf=\\\"isMultiSelectVisible\\\" class=\\\"ng2-smart-actions ng2-smart-action-multiple-select\\\" (click)=\\\"multipleSelectRow.emit(row)\\\"><input type=\\\"checkbox\\\" class=\\\"form-control\\\" [ngModel]=\\\"row.isSelected\\\"></td><td *ngIf=\\\"!row.isInEditing && showActionColumnLeft\\\" class=\\\"ng2-smart-actions\\\"><ng2-st-tbody-custom [grid]=\\\"grid\\\" (custom)=\\\"custom.emit($event)\\\" [row]=\\\"row\\\" [source]=\\\"source\\\"></ng2-st-tbody-custom><ng2-st-tbody-edit-delete [grid]=\\\"grid\\\" [deleteConfirm]=\\\"deleteConfirm\\\" [editConfirm]=\\\"editConfirm\\\" (edit)=\\\"edit.emit(row)\\\" (delete)=\\\"delete.emit(row)\\\" (editRowSelect)=\\\"editRowSelect.emit($event)\\\" [row]=\\\"row\\\" [source]=\\\"source\\\"></ng2-st-tbody-edit-delete></td><td *ngIf=\\\"row.isInEditing && showActionColumnLeft\\\" class=\\\"ng2-smart-actions\\\"><ng2-st-tbody-create-cancel [grid]=\\\"grid\\\" [row]=\\\"row\\\" [editConfirm]=\\\"editConfirm\\\"></ng2-st-tbody-create-cancel></td><td *ngFor=\\\"let cell of row.cells; index as idx;\\\" [ngClass]=\\\"grid.getColumns()[idx].class + ' ' + cell.getClass()\\\"><ng2-smart-table-cell [cell]=\\\"cell\\\" [grid]=\\\"grid\\\" [row]=\\\"row\\\" [isNew]=\\\"false\\\" [mode]=\\\"mode\\\" [editConfirm]=\\\"editConfirm\\\" [inputClass]=\\\"editInputClass\\\" [isInEditing]=\\\"row.isInEditing\\\"></ng2-smart-table-cell></td><td *ngIf=\\\"row.isInEditing && showActionColumnRight\\\" class=\\\"ng2-smart-actions\\\"><ng2-st-tbody-create-cancel [grid]=\\\"grid\\\" [row]=\\\"row\\\" [editConfirm]=\\\"editConfirm\\\"></ng2-st-tbody-create-cancel></td><td *ngIf=\\\"!row.isInEditing && showActionColumnRight\\\" class=\\\"ng2-smart-actions\\\"><ng2-st-tbody-custom [grid]=\\\"grid\\\" (custom)=\\\"custom.emit($event)\\\" [row]=\\\"row\\\" [source]=\\\"source\\\"></ng2-st-tbody-custom><ng2-st-tbody-edit-delete [grid]=\\\"grid\\\" [deleteConfirm]=\\\"deleteConfirm\\\" [editConfirm]=\\\"editConfirm\\\" [row]=\\\"row\\\" [source]=\\\"source\\\" (edit)=\\\"edit.emit(row)\\\" (delete)=\\\"delete.emit(row)\\\" (editRowSelect)=\\\"editRowSelect.emit($event)\\\"></ng2-st-tbody-edit-delete></td></tr><tr *ngIf=\\\"grid.getRows().length == 0\\\"><td [attr.colspan]=\\\"grid.getColumns().length + (isActionAdd || isActionEdit || isActionDelete)\\\">{{ noDataMessage }}</td></tr>\",\n                },] },\n    ];\n    /** @nocollapse */\n    Ng2SmartTableTbodyComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"deleteConfirm\": [{ type: core.Input },],\n        \"editConfirm\": [{ type: core.Input },],\n        \"rowClassFunction\": [{ type: core.Input },],\n        \"save\": [{ type: core.Output },],\n        \"cancel\": [{ type: core.Output },],\n        \"edit\": [{ type: core.Output },],\n        \"delete\": [{ type: core.Output },],\n        \"custom\": [{ type: core.Output },],\n        \"edited\": [{ type: core.Output },],\n        \"userSelectRow\": [{ type: core.Output },],\n        \"editRowSelect\": [{ type: core.Output },],\n        \"multipleSelectRow\": [{ type: core.Output },],\n        \"rowHover\": [{ type: core.Output },],\n    };\n    return Ng2SmartTableTbodyComponent;\n}());\n\nvar TbodyCreateCancelComponent = /** @class */ (function () {\n    function TbodyCreateCancelComponent() {\n    }\n    TbodyCreateCancelComponent.prototype.onSave = function (event) {\n        event.preventDefault();\n        event.stopPropagation();\n        this.grid.save(this.row, this.editConfirm);\n    };\n    TbodyCreateCancelComponent.prototype.onCancelEdit = function (event) {\n        event.preventDefault();\n        event.stopPropagation();\n        this.row.isInEditing = false;\n    };\n    TbodyCreateCancelComponent.prototype.ngOnChanges = function () {\n        this.saveButtonContent = this.grid.getSetting('edit.saveButtonContent');\n        this.cancelButtonContent = this.grid.getSetting('edit.cancelButtonContent');\n    };\n    TbodyCreateCancelComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-st-tbody-create-cancel',\n                    template: \"\\n    <a href=\\\"#\\\" class=\\\"ng2-smart-action ng2-smart-action-edit-save\\\"\\n        [innerHTML]=\\\"saveButtonContent\\\" (click)=\\\"onSave($event)\\\"></a>\\n    <a href=\\\"#\\\" class=\\\"ng2-smart-action ng2-smart-action-edit-cancel\\\"\\n        [innerHTML]=\\\"cancelButtonContent\\\" (click)=\\\"onCancelEdit($event)\\\"></a>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    TbodyCreateCancelComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"row\": [{ type: core.Input },],\n        \"editConfirm\": [{ type: core.Input },],\n    };\n    return TbodyCreateCancelComponent;\n}());\n\nvar TbodyEditDeleteComponent = /** @class */ (function () {\n    function TbodyEditDeleteComponent() {\n        this.edit = new core.EventEmitter();\n        this.delete = new core.EventEmitter();\n        this.editRowSelect = new core.EventEmitter();\n    }\n    TbodyEditDeleteComponent.prototype.onEdit = function (event) {\n        event.preventDefault();\n        event.stopPropagation();\n        this.editRowSelect.emit(this.row);\n        if (this.grid.getSetting('mode') === 'external') {\n            this.edit.emit({\n                data: this.row.getData(),\n                source: this.source,\n            });\n        }\n        else {\n            this.grid.edit(this.row);\n        }\n    };\n    TbodyEditDeleteComponent.prototype.onDelete = function (event) {\n        event.preventDefault();\n        event.stopPropagation();\n        if (this.grid.getSetting('mode') === 'external') {\n            this.delete.emit({\n                data: this.row.getData(),\n                source: this.source,\n            });\n        }\n        else {\n            this.grid.delete(this.row, this.deleteConfirm);\n        }\n    };\n    TbodyEditDeleteComponent.prototype.ngOnChanges = function () {\n        this.isActionEdit = this.grid.getSetting('actions.edit');\n        this.isActionDelete = this.grid.getSetting('actions.delete');\n        this.editRowButtonContent = this.grid.getSetting('edit.editButtonContent');\n        this.deleteRowButtonContent = this.grid.getSetting('delete.deleteButtonContent');\n    };\n    TbodyEditDeleteComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-st-tbody-edit-delete',\n                    changeDetection: core.ChangeDetectionStrategy.OnPush,\n                    template: \"\\n    <a href=\\\"#\\\" *ngIf=\\\"isActionEdit\\\" class=\\\"ng2-smart-action ng2-smart-action-edit-edit\\\"\\n        [innerHTML]=\\\"editRowButtonContent\\\" (click)=\\\"onEdit($event)\\\"></a>\\n    <a href=\\\"#\\\" *ngIf=\\\"isActionDelete\\\" class=\\\"ng2-smart-action ng2-smart-action-delete-delete\\\"\\n        [innerHTML]=\\\"deleteRowButtonContent\\\" (click)=\\\"onDelete($event)\\\"></a>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    TbodyEditDeleteComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"row\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"deleteConfirm\": [{ type: core.Input },],\n        \"editConfirm\": [{ type: core.Input },],\n        \"edit\": [{ type: core.Output },],\n        \"delete\": [{ type: core.Output },],\n        \"editRowSelect\": [{ type: core.Output },],\n    };\n    return TbodyEditDeleteComponent;\n}());\n\nvar TbodyCustomComponent = /** @class */ (function () {\n    function TbodyCustomComponent() {\n        this.custom = new core.EventEmitter();\n    }\n    TbodyCustomComponent.prototype.onCustom = function (action, event) {\n        event.preventDefault();\n        event.stopPropagation();\n        this.custom.emit({\n            action: action.name,\n            data: this.row.getData(),\n            source: this.source\n        });\n    };\n    TbodyCustomComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-st-tbody-custom',\n                    changeDetection: core.ChangeDetectionStrategy.OnPush,\n                    template: \"\\n      <a *ngFor=\\\"let action of grid.getSetting('actions.custom')\\\" href=\\\"#\\\"\\n         class=\\\"ng2-smart-action ng2-smart-action-custom-custom\\\" \\n         [innerHTML]=\\\"action.title\\\"\\n         (click)=\\\"onCustom(action, $event)\\\"></a>\\n        \"\n                },] },\n    ];\n    /** @nocollapse */\n    TbodyCustomComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"row\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"custom\": [{ type: core.Output },],\n    };\n    return TbodyCustomComponent;\n}());\n\nvar TBODY_COMPONENTS = [\n    TbodyCreateCancelComponent,\n    TbodyEditDeleteComponent,\n    TbodyCustomComponent,\n    Ng2SmartTableTbodyComponent\n];\nvar TBodyModule = /** @class */ (function () {\n    function TBodyModule() {\n    }\n    TBodyModule.decorators = [\n        { type: core.NgModule, args: [{\n                    imports: [\n                        common.CommonModule,\n                        forms.FormsModule,\n                        CellModule,\n                    ],\n                    declarations: TBODY_COMPONENTS.slice(),\n                    exports: TBODY_COMPONENTS.slice(),\n                },] },\n    ];\n    return TBodyModule;\n}());\n\nvar Ng2SmartTableTheadComponent = /** @class */ (function () {\n    function Ng2SmartTableTheadComponent() {\n        this.sort = new core.EventEmitter();\n        this.selectAllRows = new core.EventEmitter();\n        this.create = new core.EventEmitter();\n        this.filter = new core.EventEmitter();\n    }\n    Ng2SmartTableTheadComponent.prototype.ngOnChanges = function () {\n        this.isHideHeader = this.grid.getSetting('hideHeader');\n        this.isHideSubHeader = this.grid.getSetting('hideSubHeader');\n    };\n    Ng2SmartTableTheadComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: '[ng2-st-thead]',\n                    template: \"<ng-container *ngTemplateOutlet=\\\"tableHeadTopTemplate\\\"></ng-container><tr ng2-st-thead-titles-row *ngIf=\\\"!isHideHeader\\\" class=\\\"ng2-smart-titles\\\" [grid]=\\\"grid\\\" [isAllSelected]=\\\"isAllSelected\\\" [source]=\\\"source\\\" (sort)=\\\"sort.emit($event)\\\" (selectAllRows)=\\\"selectAllRows.emit($event)\\\"></tr><tr ng2-st-thead-filters-row *ngIf=\\\"!isHideSubHeader\\\" class=\\\"ng2-smart-filters\\\" [grid]=\\\"grid\\\" [source]=\\\"source\\\" (create)=\\\"create.emit($event)\\\" (filter)=\\\"filter.emit($event)\\\"></tr><tr ng2-st-thead-form-row *ngIf=\\\"grid.createFormShown\\\" [grid]=\\\"grid\\\" [createConfirm]=\\\"createConfirm\\\"></tr>\",\n                },] },\n    ];\n    /** @nocollapse */\n    Ng2SmartTableTheadComponent.propDecorators = {\n        \"tableHeadTopTemplate\": [{ type: core.Input },],\n        \"grid\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"isAllSelected\": [{ type: core.Input },],\n        \"createConfirm\": [{ type: core.Input },],\n        \"sort\": [{ type: core.Output },],\n        \"selectAllRows\": [{ type: core.Output },],\n        \"create\": [{ type: core.Output },],\n        \"filter\": [{ type: core.Output },],\n    };\n    return Ng2SmartTableTheadComponent;\n}());\n\nvar ActionsComponent = /** @class */ (function () {\n    function ActionsComponent() {\n        this.create = new core.EventEmitter();\n    }\n    ActionsComponent.prototype.ngOnChanges = function () {\n        this.createButtonContent = this.grid.getSetting('add.createButtonContent');\n        this.cancelButtonContent = this.grid.getSetting('add.cancelButtonContent');\n    };\n    ActionsComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-st-actions',\n                    template: \"\\n    <a href=\\\"#\\\" class=\\\"ng2-smart-action ng2-smart-action-add-create\\\"\\n        [innerHTML]=\\\"createButtonContent\\\"\\n        (click)=\\\"$event.preventDefault();create.emit($event)\\\"></a>\\n    <a href=\\\"#\\\" class=\\\"ng2-smart-action ng2-smart-action-add-cancel\\\"\\n        [innerHTML]=\\\"cancelButtonContent\\\"\\n        (click)=\\\"$event.preventDefault();grid.createFormShown = false;\\\"></a>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    ActionsComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"create\": [{ type: core.Output },],\n    };\n    return ActionsComponent;\n}());\n\nvar ActionsTitleComponent = /** @class */ (function () {\n    function ActionsTitleComponent(ref) {\n        this.ref = ref;\n    }\n    ActionsTitleComponent.prototype.ngAfterViewInit = function () {\n        this.ref.nativeElement.classList.add('ng2-smart-actions');\n    };\n    ActionsTitleComponent.prototype.ngOnChanges = function () {\n        this.actionsColumnTitle = this.grid.getSetting('actions.columnTitle');\n    };\n    ActionsTitleComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: '[ng2-st-actions-title]',\n                    template: \"\\n    <div class=\\\"ng2-smart-title\\\">{{ actionsColumnTitle }}</div>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    ActionsTitleComponent.ctorParameters = function () { return [\n        { type: core.ElementRef, },\n    ]; };\n    ActionsTitleComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n    };\n    return ActionsTitleComponent;\n}());\n\nvar AddButtonComponent = /** @class */ (function () {\n    function AddButtonComponent(ref) {\n        this.ref = ref;\n        this.create = new core.EventEmitter();\n    }\n    AddButtonComponent.prototype.ngAfterViewInit = function () {\n        this.ref.nativeElement.classList.add('ng2-smart-actions-title', 'ng2-smart-actions-title-add');\n    };\n    AddButtonComponent.prototype.ngOnChanges = function () {\n        this.isActionAdd = this.grid.getSetting('actions.add');\n        this.addNewButtonContent = this.grid.getSetting('add.addButtonContent');\n    };\n    AddButtonComponent.prototype.onAdd = function (event) {\n        event.preventDefault();\n        event.stopPropagation();\n        if (this.grid.getSetting('mode') === 'external') {\n            this.create.emit({\n                source: this.source,\n            });\n        }\n        else {\n            this.grid.createFormShown = true;\n        }\n    };\n    AddButtonComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: '[ng2-st-add-button]',\n                    template: \"\\n    <a *ngIf=\\\"isActionAdd\\\" href=\\\"#\\\" class=\\\"ng2-smart-action ng2-smart-action-add-add\\\"\\n        [innerHTML]=\\\"addNewButtonContent\\\" (click)=\\\"onAdd($event)\\\"></a>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    AddButtonComponent.ctorParameters = function () { return [\n        { type: core.ElementRef, },\n    ]; };\n    AddButtonComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"create\": [{ type: core.Output },],\n    };\n    return AddButtonComponent;\n}());\n\nvar CheckboxSelectAllComponent = /** @class */ (function () {\n    function CheckboxSelectAllComponent() {\n    }\n    CheckboxSelectAllComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: '[ng2-st-checkbox-select-all]',\n                    template: \"\\n    <input type=\\\"checkbox\\\" [ngModel]=\\\"isAllSelected\\\">\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    CheckboxSelectAllComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"isAllSelected\": [{ type: core.Input },],\n    };\n    return CheckboxSelectAllComponent;\n}());\n\nvar ColumnTitleComponent = /** @class */ (function () {\n    function ColumnTitleComponent() {\n        this.sort = new core.EventEmitter();\n    }\n    ColumnTitleComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-st-column-title',\n                    template: \"\\n    <div class=\\\"ng2-smart-title\\\">\\n      <ng2-smart-table-title [source]=\\\"source\\\" [column]=\\\"column\\\" (sort)=\\\"sort.emit($event)\\\"></ng2-smart-table-title>\\n    </div>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    ColumnTitleComponent.propDecorators = {\n        \"column\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"sort\": [{ type: core.Output },],\n    };\n    return ColumnTitleComponent;\n}());\n\nvar TitleComponent = /** @class */ (function () {\n    function TitleComponent() {\n        this.currentDirection = '';\n        this.sort = new core.EventEmitter();\n    }\n    TitleComponent.prototype.ngOnChanges = function (changes) {\n        var _this = this;\n        if (changes.source) {\n            if (!changes.source.firstChange) {\n                this.dataChangedSub.unsubscribe();\n            }\n            this.dataChangedSub = this.source.onChanged().subscribe(function (dataChanges) {\n                var sortConf = _this.source.getSort();\n                if (sortConf.length > 0 && sortConf[0]['field'] === _this.column.id) {\n                    _this.currentDirection = sortConf[0]['direction'];\n                }\n                else {\n                    _this.currentDirection = '';\n                }\n                // (from original ng2-smart-table) felt wasted to have this in runtime..\n                // sortConf.forEach((fieldConf: any) => {\n                // });\n            });\n        }\n    };\n    TitleComponent.prototype._sort = function (event) {\n        event.preventDefault();\n        this.changeSortDirection();\n        this.source.setSort([\n            {\n                field: this.column.id,\n                direction: this.currentDirection,\n                compare: this.column.getCompareFunction(),\n            },\n        ]);\n        this.sort.emit(null);\n        this.source.setPage(1);\n    };\n    TitleComponent.prototype.changeSortDirection = function () {\n        if (this.currentDirection) {\n            var newDirection = this.currentDirection === 'asc' ? 'desc' : 'asc';\n            this.currentDirection = newDirection;\n        }\n        else {\n            this.currentDirection = this.column.sortDirection;\n        }\n        return this.currentDirection;\n    };\n    TitleComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-smart-table-title',\n                    styles: [\"a.sort.asc,a.sort.desc{font-weight:700}a.sort.asc::after,a.sort.desc::after{content:'';display:inline-block;width:0;height:0;border-bottom:4px solid rgba(0,0,0,.3);border-top:4px solid transparent;border-left:4px solid transparent;border-right:4px solid transparent;margin-bottom:2px}a.sort.desc::after{-webkit-transform:rotate(-180deg);transform:rotate(-180deg);margin-bottom:-2px} /*# sourceMappingURL=title.component.css.map */ \"],\n                    template: \"\\n    <a href=\\\"#\\\" *ngIf=\\\"column.isSortable\\\"\\n                (click)=\\\"_sort($event, column)\\\"\\n                class=\\\"ng2-smart-sort-link sort\\\"\\n                [ngClass]=\\\"currentDirection\\\">\\n      {{ column.title }}\\n    </a>\\n    <span class=\\\"ng2-smart-sort\\\" *ngIf=\\\"!column.isSortable\\\">{{ column.title }}</span>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    TitleComponent.propDecorators = {\n        \"column\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"sort\": [{ type: core.Output },],\n    };\n    return TitleComponent;\n}());\n\nvar TheadFitlersRowComponent = /** @class */ (function () {\n    function TheadFitlersRowComponent() {\n        this.create = new core.EventEmitter();\n        this.filter = new core.EventEmitter();\n    }\n    TheadFitlersRowComponent.prototype.ngOnChanges = function () {\n        this.isMultiSelectVisible = this.grid.isMultiSelectVisible();\n        this.showActionColumnLeft = this.grid.showActionColumn('left');\n        this.showActionColumnRight = this.grid.showActionColumn('right');\n        this.filterInputClass = this.grid.getSetting('filter.inputClass');\n    };\n    TheadFitlersRowComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: '[ng2-st-thead-filters-row]',\n                    template: \"\\n    <th *ngIf=\\\"isMultiSelectVisible\\\"></th>\\n    <th ng2-st-add-button *ngIf=\\\"showActionColumnLeft\\\"\\n                          [grid]=\\\"grid\\\"\\n                          (create)=\\\"create.emit($event)\\\">\\n    </th>\\n    <th *ngFor=\\\"let column of grid.getColumns()\\\" class=\\\"ng2-smart-th {{ column.id }}\\\" [ngClass]=\\\"column.class\\\">\\n      <ng2-smart-table-filter [source]=\\\"source\\\"\\n                              [column]=\\\"column\\\"\\n                              [inputClass]=\\\"filterInputClass\\\"\\n                              (filter)=\\\"filter.emit($event)\\\">\\n      </ng2-smart-table-filter>\\n    </th>\\n    <th ng2-st-add-button *ngIf=\\\"showActionColumnRight\\\"\\n                          [grid]=\\\"grid\\\"\\n                          [source]=\\\"source\\\"\\n                          (create)=\\\"create.emit($event)\\\">\\n    </th>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    TheadFitlersRowComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"create\": [{ type: core.Output },],\n        \"filter\": [{ type: core.Output },],\n    };\n    return TheadFitlersRowComponent;\n}());\n\nvar TheadFormRowComponent = /** @class */ (function () {\n    function TheadFormRowComponent() {\n        this.create = new core.EventEmitter();\n    }\n    TheadFormRowComponent.prototype.onCreate = function (event) {\n        event.stopPropagation();\n        this.grid.create(this.grid.getNewRow(), this.createConfirm);\n    };\n    TheadFormRowComponent.prototype.ngOnChanges = function () {\n        this.isMultiSelectVisible = this.grid.isMultiSelectVisible();\n        this.showActionColumnLeft = this.grid.showActionColumn('left');\n        this.showActionColumnRight = this.grid.showActionColumn('right');\n        this.addInputClass = this.grid.getSetting('add.inputClass');\n    };\n    TheadFormRowComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: '[ng2-st-thead-form-row]',\n                    template: \"\\n      <td *ngIf=\\\"\\\"></td>\\n      <td  *ngIf=\\\"showActionColumnLeft\\\"  class=\\\"ng2-smart-actions\\\">\\n        <ng2-st-actions [grid]=\\\"grid\\\" (create)=\\\"onCreate($event)\\\"></ng2-st-actions>\\n      </td>\\n      <td *ngFor=\\\"let cell of grid.getNewRow().getCells(); index as idx\\\" [ngClass]=\\\"grid.getColumns()[idx].class\\\" >\\n        <ng2-smart-table-cell [cell]=\\\"cell\\\"\\n                              [grid]=\\\"grid\\\"\\n                              [isNew]=\\\"true\\\"\\n                              [createConfirm]=\\\"createConfirm\\\"\\n                              [inputClass]=\\\"addInputClass\\\"\\n                              [isInEditing]=\\\"grid.getNewRow().isInEditing\\\"\\n                              (edited)=\\\"onCreate($event)\\\">\\n        </ng2-smart-table-cell>\\n      </td>\\n      <td  *ngIf=\\\"showActionColumnRight\\\"  class=\\\"ng2-smart-actions\\\">\\n        <ng2-st-actions [grid]=\\\"grid\\\" (create)=\\\"onCreate($event)\\\"></ng2-st-actions>\\n      </td>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    TheadFormRowComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"row\": [{ type: core.Input },],\n        \"createConfirm\": [{ type: core.Input },],\n        \"create\": [{ type: core.Output },],\n    };\n    return TheadFormRowComponent;\n}());\n\nvar TheadTitlesRowComponent = /** @class */ (function () {\n    function TheadTitlesRowComponent() {\n        this.sort = new core.EventEmitter();\n        this.selectAllRows = new core.EventEmitter();\n    }\n    TheadTitlesRowComponent.prototype.ngOnChanges = function () {\n        this.isMultiSelectVisible = this.grid.isMultiSelectVisible();\n        this.showActionColumnLeft = this.grid.showActionColumn('left');\n        this.showActionColumnRight = this.grid.showActionColumn('right');\n    };\n    TheadTitlesRowComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: '[ng2-st-thead-titles-row]',\n                    template: \"\\n    <th ng2-st-checkbox-select-all *ngIf=\\\"isMultiSelectVisible\\\"\\n                                   [grid]=\\\"grid\\\"\\n                                   [source]=\\\"source\\\"\\n                                   [isAllSelected]=\\\"isAllSelected\\\"\\n                                   (click)=\\\"selectAllRows.emit($event)\\\">\\n    </th>\\n    <th ng2-st-actions-title *ngIf=\\\"showActionColumnLeft\\\" [grid]=\\\"grid\\\"></th>\\n    <th *ngFor=\\\"let column of grid.getColumns()\\\" class=\\\"ng2-smart-th {{ column.id }}\\\" [ngClass]=\\\"column.class\\\"\\n      [style.width]=\\\"column.width\\\" >\\n      <ng2-st-column-title [source]=\\\"source\\\" [column]=\\\"column\\\" (sort)=\\\"sort.emit($event)\\\"></ng2-st-column-title>\\n    </th>\\n    <th ng2-st-actions-title *ngIf=\\\"showActionColumnRight\\\" [grid]=\\\"grid\\\"></th>\\n  \",\n                },] },\n    ];\n    /** @nocollapse */\n    TheadTitlesRowComponent.propDecorators = {\n        \"grid\": [{ type: core.Input },],\n        \"isAllSelected\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"sort\": [{ type: core.Output },],\n        \"selectAllRows\": [{ type: core.Output },],\n    };\n    return TheadTitlesRowComponent;\n}());\n\nvar THEAD_COMPONENTS = [\n    ActionsComponent,\n    ActionsTitleComponent,\n    AddButtonComponent,\n    CheckboxSelectAllComponent,\n    ColumnTitleComponent,\n    TitleComponent,\n    TheadFitlersRowComponent,\n    TheadFormRowComponent,\n    TheadTitlesRowComponent,\n    Ng2SmartTableTheadComponent,\n];\nvar THeadModule = /** @class */ (function () {\n    function THeadModule() {\n    }\n    THeadModule.decorators = [\n        { type: core.NgModule, args: [{\n                    imports: [\n                        common.CommonModule,\n                        forms.FormsModule,\n                        FilterModule,\n                        CellModule,\n                    ],\n                    declarations: THEAD_COMPONENTS.slice(),\n                    exports: THEAD_COMPONENTS.slice(),\n                },] },\n    ];\n    return THeadModule;\n}());\n\nvar LocalSorter = /** @class */ (function () {\n    function LocalSorter() {\n    }\n    LocalSorter.sort = function (data, field, direction, customCompare) {\n        var dir = (direction === 'asc') ? 1 : -1;\n        var compare = customCompare ? customCompare : this.COMPARE;\n        return data.sort(function (a, b) {\n            return compare.call(null, dir, a[field], b[field]);\n        });\n    };\n    LocalSorter.COMPARE = function (direction, a, b) {\n        a = a.td ? a.td : a;\n        b = b.td ? b.td : b;\n        if (a < b) {\n            return -1 * direction;\n        }\n        if (a > b) {\n            return direction;\n        }\n        return 0;\n    };\n    return LocalSorter;\n}());\n\nvar LocalFilter = /** @class */ (function () {\n    function LocalFilter() {\n    }\n    LocalFilter.filter = function (data, field, search, customFilter) {\n        var filter = customFilter ? customFilter : this.FILTER;\n        return data.filter(function (el) {\n            var value = typeof el[field] === 'undefined' || el[field] === null ? '' : el[field].td ? el[field].td : el[field];\n            return filter.call(null, value, search);\n        });\n    };\n    LocalFilter.FILTER = function (value, search) {\n        return value.toString().toLowerCase().includes(search.toString().toLowerCase());\n    };\n    return LocalFilter;\n}());\n\nvar LocalPager = /** @class */ (function () {\n    function LocalPager() {\n    }\n    LocalPager.paginate = function (data, page, perPage) {\n        return data.slice(perPage * (page - 1), perPage * page);\n    };\n    return LocalPager;\n}());\n\nvar __extends$11 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar LocalDataSource = /** @class */ (function (_super) {\n    __extends$11(LocalDataSource, _super);\n    function LocalDataSource(data) {\n        if (data === void 0) { data = []; }\n        var _this = _super.call(this) || this;\n        _this.data = [];\n        _this.filteredAndSorted = [];\n        _this.sortConf = [];\n        _this.filterConf = {\n            filters: [],\n            andOperator: true,\n        };\n        _this.pagingConf = {};\n        _this.data = data;\n        return _this;\n    }\n    LocalDataSource.prototype.load = function (data) {\n        this.data = data;\n        return _super.prototype.load.call(this, data);\n    };\n    LocalDataSource.prototype.prepend = function (element) {\n        this.reset(true);\n        this.data.unshift(element);\n        return _super.prototype.prepend.call(this, element);\n    };\n    LocalDataSource.prototype.append = function (element) {\n        this.reset(true);\n        this.data.push(element);\n        return _super.prototype.append.call(this, element);\n    };\n    LocalDataSource.prototype.add = function (element) {\n        this.data.push(element);\n        return _super.prototype.add.call(this, element);\n    };\n    LocalDataSource.prototype.remove = function (element) {\n        this.data = this.data.filter(function (el) { return el !== element; });\n        return _super.prototype.remove.call(this, element);\n    };\n    LocalDataSource.prototype.update = function (element, values) {\n        var _this = this;\n        return new Promise(function (resolve, reject) {\n            _this.find(element).then(function (found) {\n                found = deepExtend(found, values);\n                _super.prototype.update.call(_this, found, values).then(resolve).catch(reject);\n            }).catch(reject);\n        });\n    };\n    LocalDataSource.prototype.find = function (element) {\n        var found = this.data.find(function (el) { return el === element; });\n        if (found) {\n            return Promise.resolve(found);\n        }\n        return Promise.reject(new Error('Element was not found in the dataset'));\n    };\n    LocalDataSource.prototype.getElements = function () {\n        var data = this.data.slice(0);\n        return Promise.resolve(this.prepareData(data));\n    };\n    LocalDataSource.prototype.getFilteredAndSorted = function () {\n        var data = this.data.slice(0);\n        this.prepareData(data);\n        return Promise.resolve(this.filteredAndSorted);\n    };\n    LocalDataSource.prototype.getAll = function () {\n        var data = this.data.slice(0);\n        return Promise.resolve(data);\n    };\n    LocalDataSource.prototype.reset = function (silent) {\n        if (silent === void 0) { silent = false; }\n        if (silent) {\n            this.filterConf = {\n                filters: [],\n                andOperator: true,\n            };\n            this.sortConf = [];\n            this.pagingConf['page'] = 1;\n        }\n        else {\n            this.setFilter([], true, false);\n            this.setSort([], false);\n            this.setPage(1);\n        }\n    };\n    LocalDataSource.prototype.empty = function () {\n        this.data = [];\n        return _super.prototype.empty.call(this);\n    };\n    LocalDataSource.prototype.count = function () {\n        return this.filteredAndSorted.length;\n    };\n    /**\n     *\n     * Array of conf objects\n     * [\n     *  {field: string, direction: asc|desc|null, compare: Function|null},\n     * ]\n     * @param conf\n     * @param doEmit\n     * @returns {LocalDataSource}\n     */\n    /**\n       *\n       * Array of conf objects\n       * [\n       *  {field: string, direction: asc|desc|null, compare: Function|null},\n       * ]\n       * @param conf\n       * @param doEmit\n       * @returns {LocalDataSource}\n       */\n    LocalDataSource.prototype.setSort = /**\n       *\n       * Array of conf objects\n       * [\n       *  {field: string, direction: asc|desc|null, compare: Function|null},\n       * ]\n       * @param conf\n       * @param doEmit\n       * @returns {LocalDataSource}\n       */\n    function (conf, doEmit) {\n        if (doEmit === void 0) { doEmit = true; }\n        if (conf !== null) {\n            conf.forEach(function (fieldConf) {\n                if (!fieldConf['field'] || typeof fieldConf['direction'] === 'undefined') {\n                    throw new Error('Sort configuration object is not valid');\n                }\n            });\n            this.sortConf = conf;\n        }\n        _super.prototype.setSort.call(this, conf, doEmit);\n        return this;\n    };\n    /**\n     *\n     * Array of conf objects\n     * [\n     *  {field: string, search: string, filter: Function|null},\n     * ]\n     * @param conf\n     * @param andOperator\n     * @param doEmit\n     * @returns {LocalDataSource}\n     */\n    /**\n       *\n       * Array of conf objects\n       * [\n       *  {field: string, search: string, filter: Function|null},\n       * ]\n       * @param conf\n       * @param andOperator\n       * @param doEmit\n       * @returns {LocalDataSource}\n       */\n    LocalDataSource.prototype.setFilter = /**\n       *\n       * Array of conf objects\n       * [\n       *  {field: string, search: string, filter: Function|null},\n       * ]\n       * @param conf\n       * @param andOperator\n       * @param doEmit\n       * @returns {LocalDataSource}\n       */\n    function (conf, andOperator, doEmit) {\n        var _this = this;\n        if (andOperator === void 0) { andOperator = true; }\n        if (doEmit === void 0) { doEmit = true; }\n        if (conf && conf.length > 0) {\n            conf.forEach(function (fieldConf) {\n                _this.addFilter(fieldConf, andOperator, false);\n            });\n        }\n        else {\n            this.filterConf = {\n                filters: [],\n                andOperator: true,\n            };\n        }\n        this.filterConf.andOperator = andOperator;\n        this.pagingConf['page'] = 1;\n        _super.prototype.setFilter.call(this, conf, andOperator, doEmit);\n        return this;\n    };\n    LocalDataSource.prototype.addFilter = function (fieldConf, andOperator, doEmit) {\n        var _this = this;\n        if (andOperator === void 0) { andOperator = true; }\n        if (doEmit === void 0) { doEmit = true; }\n        if (!fieldConf['field'] || typeof fieldConf['search'] === 'undefined') {\n            throw new Error('Filter configuration object is not valid');\n        }\n        var found = false;\n        this.filterConf.filters.forEach(function (currentFieldConf, index) {\n            if (currentFieldConf['field'] === fieldConf['field']) {\n                _this.filterConf.filters[index] = fieldConf;\n                found = true;\n            }\n        });\n        if (!found) {\n            this.filterConf.filters.push(fieldConf);\n        }\n        this.filterConf.andOperator = andOperator;\n        _super.prototype.addFilter.call(this, fieldConf, andOperator, doEmit);\n        return this;\n    };\n    LocalDataSource.prototype.setPaging = function (page, perPage, doEmit) {\n        if (doEmit === void 0) { doEmit = true; }\n        this.pagingConf['page'] = page;\n        this.pagingConf['perPage'] = perPage;\n        _super.prototype.setPaging.call(this, page, perPage, doEmit);\n        return this;\n    };\n    LocalDataSource.prototype.setPage = function (page, doEmit) {\n        if (doEmit === void 0) { doEmit = true; }\n        this.pagingConf['page'] = page;\n        _super.prototype.setPage.call(this, page, doEmit);\n        return this;\n    };\n    LocalDataSource.prototype.getSort = function () {\n        return this.sortConf;\n    };\n    LocalDataSource.prototype.getFilter = function () {\n        return this.filterConf;\n    };\n    LocalDataSource.prototype.getPaging = function () {\n        return this.pagingConf;\n    };\n    LocalDataSource.prototype.prepareData = function (data) {\n        data = this.filter(data);\n        data = this.sort(data);\n        this.filteredAndSorted = data.slice(0);\n        return this.paginate(data);\n    };\n    LocalDataSource.prototype.sort = function (data) {\n        if (this.sortConf) {\n            this.sortConf.forEach(function (fieldConf) {\n                data = LocalSorter\n                    .sort(data, fieldConf['field'], fieldConf['direction'], fieldConf['compare']);\n            });\n        }\n        return data;\n    };\n    // TODO: refactor?\n    // TODO: refactor?\n    LocalDataSource.prototype.filter = \n    // TODO: refactor?\n    function (data) {\n        if (this.filterConf.filters) {\n            if (this.filterConf.andOperator) {\n                this.filterConf.filters.forEach(function (fieldConf) {\n                    if (fieldConf['search'].length > 0) {\n                        data = LocalFilter\n                            .filter(data, fieldConf['field'], fieldConf['search'], fieldConf['filter']);\n                    }\n                });\n            }\n            else {\n                var mergedData_1 = [];\n                this.filterConf.filters.forEach(function (fieldConf) {\n                    if (fieldConf['search'].length > 0) {\n                        mergedData_1 = mergedData_1.concat(LocalFilter\n                            .filter(data, fieldConf['field'], fieldConf['search'], fieldConf['filter']));\n                    }\n                });\n                // remove non unique items\n                data = mergedData_1.filter(function (elem, pos, arr) {\n                    return arr.indexOf(elem) === pos;\n                });\n            }\n        }\n        return data;\n    };\n    LocalDataSource.prototype.paginate = function (data) {\n        if (this.pagingConf && this.pagingConf['page'] && this.pagingConf['perPage']) {\n            data = LocalPager.paginate(data, this.pagingConf['page'], this.pagingConf['perPage']);\n        }\n        return data;\n    };\n    return LocalDataSource;\n}(DataSource));\n\nvar Ng2SmartTableComponent = /** @class */ (function () {\n    function Ng2SmartTableComponent() {\n        this.settings = {};\n        this.rowSelect = new core.EventEmitter();\n        this.userRowSelect = new core.EventEmitter();\n        this.delete = new core.EventEmitter();\n        this.edit = new core.EventEmitter();\n        this.create = new core.EventEmitter();\n        this.custom = new core.EventEmitter();\n        this.deleteConfirm = new core.EventEmitter();\n        this.editConfirm = new core.EventEmitter();\n        this.createConfirm = new core.EventEmitter();\n        this.rowHover = new core.EventEmitter();\n        this.defaultSettings = {\n            mode: 'inline',\n            // inline|external|click-to-edit\n            selectMode: 'single',\n            // single|multi\n            hideHeader: false,\n            hideSubHeader: false,\n            actions: {\n                columnTitle: 'Actions',\n                add: true,\n                edit: true,\n                delete: true,\n                custom: [],\n                position: 'left',\n            },\n            filter: {\n                inputClass: '',\n            },\n            edit: {\n                inputClass: '',\n                editButtonContent: 'Edit',\n                saveButtonContent: 'Update',\n                cancelButtonContent: 'Cancel',\n                confirmSave: false,\n            },\n            add: {\n                inputClass: '',\n                addButtonContent: 'Add New',\n                createButtonContent: 'Create',\n                cancelButtonContent: 'Cancel',\n                confirmCreate: false,\n            },\n            delete: {\n                deleteButtonContent: 'Delete',\n                confirmDelete: false,\n            },\n            attr: {\n                id: '',\n                class: '',\n            },\n            noDataMessage: 'No data found',\n            columns: {},\n            pager: {\n                display: true,\n                perPage: 10,\n            },\n            rowClassFunction: function () { return \"\"; }\n        };\n        this.isAllSelected = false;\n    }\n    Ng2SmartTableComponent.prototype.ngOnChanges = function (changes) {\n        if (this.grid) {\n            if (changes['settings']) {\n                this.grid.setSettings(this.prepareSettings());\n            }\n            if (changes['source']) {\n                this.source = this.prepareSource();\n                this.grid.setSource(this.source);\n            }\n        }\n        else {\n            this.initGrid();\n        }\n        this.tableId = this.grid.getSetting('attr.id');\n        this.tableClass = this.grid.getSetting('attr.class');\n        this.isHideHeader = this.grid.getSetting('hideHeader');\n        this.isHideSubHeader = this.grid.getSetting('hideSubHeader');\n        this.isPagerDisplay = this.grid.getSetting('pager.display');\n        this.isPagerDisplay = this.grid.getSetting('pager.display');\n        this.perPageSelect = this.grid.getSetting('pager.perPageSelect');\n        this.rowClassFunction = this.grid.getSetting('rowClassFunction');\n    };\n    Ng2SmartTableComponent.prototype.editRowSelect = function (row) {\n        if (this.grid.getSetting('selectMode') === 'multi') {\n            this.onMultipleSelectRow(row);\n        }\n        else {\n            this.onSelectRow(row);\n        }\n    };\n    Ng2SmartTableComponent.prototype.onUserSelectRow = function (row) {\n        if (this.grid.getSetting('selectMode') !== 'multi') {\n            this.grid.selectRow(row);\n            this.emitUserSelectRow(row);\n            this.emitSelectRow(row);\n        }\n    };\n    Ng2SmartTableComponent.prototype.onRowHover = function (row) {\n        this.rowHover.emit(row);\n    };\n    Ng2SmartTableComponent.prototype.multipleSelectRow = function (row) {\n        this.grid.multipleSelectRow(row);\n        this.emitUserSelectRow(row);\n        this.emitSelectRow(row);\n    };\n    Ng2SmartTableComponent.prototype.onSelectAllRows = function ($event) {\n        this.isAllSelected = !this.isAllSelected;\n        this.grid.selectAllRows(this.isAllSelected);\n        this.emitUserSelectRow(null);\n        this.emitSelectRow(null);\n    };\n    Ng2SmartTableComponent.prototype.onSelectRow = function (row) {\n        this.grid.selectRow(row);\n        this.emitSelectRow(row);\n    };\n    Ng2SmartTableComponent.prototype.onMultipleSelectRow = function (row) {\n        this.emitSelectRow(row);\n    };\n    Ng2SmartTableComponent.prototype.initGrid = function () {\n        var _this = this;\n        this.source = this.prepareSource();\n        this.grid = new Grid(this.source, this.prepareSettings());\n        this.grid.onSelectRow().subscribe(function (row) { return _this.emitSelectRow(row); });\n    };\n    Ng2SmartTableComponent.prototype.prepareSource = function () {\n        if (this.source instanceof DataSource) {\n            return this.source;\n        }\n        else if (this.source instanceof Array) {\n            return new LocalDataSource(this.source);\n        }\n        return new LocalDataSource();\n    };\n    Ng2SmartTableComponent.prototype.prepareSettings = function () {\n        return deepExtend({}, this.defaultSettings, this.settings);\n    };\n    Ng2SmartTableComponent.prototype.changePage = function ($event) {\n        this.resetAllSelector();\n    };\n    Ng2SmartTableComponent.prototype.sort = function ($event) {\n        this.resetAllSelector();\n    };\n    Ng2SmartTableComponent.prototype.filter = function ($event) {\n        this.resetAllSelector();\n    };\n    Ng2SmartTableComponent.prototype.resetAllSelector = function () {\n        this.isAllSelected = false;\n    };\n    Ng2SmartTableComponent.prototype.emitUserSelectRow = function (row) {\n        var selectedRows = this.grid.getSelectedRows();\n        this.userRowSelect.emit({\n            data: row ? row.getData() : null,\n            isSelected: row ? row.getIsSelected() : null,\n            source: this.source,\n            selected: selectedRows && selectedRows.length ? selectedRows.map(function (r) { return r.getData(); }) : [],\n        });\n    };\n    Ng2SmartTableComponent.prototype.emitSelectRow = function (row) {\n        this.rowSelect.emit({\n            data: row ? row.getData() : null,\n            isSelected: row ? row.getIsSelected() : null,\n            source: this.source,\n        });\n    };\n    Ng2SmartTableComponent.decorators = [\n        { type: core.Component, args: [{\n                    selector: 'ng2-smart-table',\n                    styles: [\":host{font-size:1rem}:host /deep/ *{box-sizing:border-box}:host /deep/ button,:host /deep/ input,:host /deep/ optgroup,:host /deep/ select,:host /deep/ textarea{color:inherit;font:inherit;margin:0}:host /deep/ table{line-height:1.5em;border-collapse:collapse;border-spacing:0;display:table;width:100%;max-width:100%;overflow:auto;word-break:normal;word-break:keep-all}:host /deep/ table tr th{font-weight:700}:host /deep/ table tr section{font-size:.75em;font-weight:700}:host /deep/ table tr td,:host /deep/ table tr th{font-size:.875em;margin:0;padding:.5em 1em}:host /deep/ a{color:#1e6bb8;text-decoration:none}:host /deep/ a:hover{text-decoration:underline} /*# sourceMappingURL=ng2-smart-table.component.css.map */ \"],\n                    template: \"<table [id]=\\\"tableId\\\" [ngClass]=\\\"tableClass\\\"><thead ng2-st-thead *ngIf=\\\"!isHideHeader || !isHideSubHeader\\\" [tableHeadTopTemplate]=\\\"tableHeadTopTemplate\\\" [grid]=\\\"grid\\\" [isAllSelected]=\\\"isAllSelected\\\" [source]=\\\"source\\\" [createConfirm]=\\\"createConfirm\\\" (create)=\\\"create.emit($event)\\\" (selectAllRows)=\\\"onSelectAllRows($event)\\\" (sort)=\\\"sort($event)\\\" (filter)=\\\"filter($event)\\\"></thead><tbody ng2-st-tbody [grid]=\\\"grid\\\" [source]=\\\"source\\\" [deleteConfirm]=\\\"deleteConfirm\\\" [editConfirm]=\\\"editConfirm\\\" [rowClassFunction]=\\\"rowClassFunction\\\" (edit)=\\\"edit.emit($event)\\\" (delete)=\\\"delete.emit($event)\\\" (custom)=\\\"custom.emit($event)\\\" (userSelectRow)=\\\"onUserSelectRow($event)\\\" (editRowSelect)=\\\"editRowSelect($event)\\\" (multipleSelectRow)=\\\"multipleSelectRow($event)\\\" (rowHover)=\\\"onRowHover($event)\\\"></tbody></table><ng2-smart-table-pager *ngIf=\\\"isPagerDisplay\\\" [source]=\\\"source\\\" [perPageSelect]=\\\"perPageSelect\\\" (changePage)=\\\"changePage($event)\\\"></ng2-smart-table-pager>\",\n                },] },\n    ];\n    /** @nocollapse */\n    Ng2SmartTableComponent.propDecorators = {\n        \"tableHeadTopTemplate\": [{ type: core.Input },],\n        \"source\": [{ type: core.Input },],\n        \"settings\": [{ type: core.Input },],\n        \"rowSelect\": [{ type: core.Output },],\n        \"userRowSelect\": [{ type: core.Output },],\n        \"delete\": [{ type: core.Output },],\n        \"edit\": [{ type: core.Output },],\n        \"create\": [{ type: core.Output },],\n        \"custom\": [{ type: core.Output },],\n        \"deleteConfirm\": [{ type: core.Output },],\n        \"editConfirm\": [{ type: core.Output },],\n        \"createConfirm\": [{ type: core.Output },],\n        \"rowHover\": [{ type: core.Output },],\n    };\n    return Ng2SmartTableComponent;\n}());\n\nvar Ng2SmartTableModule = /** @class */ (function () {\n    function Ng2SmartTableModule() {\n    }\n    Ng2SmartTableModule.decorators = [\n        { type: core.NgModule, args: [{\n                    imports: [\n                        common.CommonModule,\n                        forms.FormsModule,\n                        forms.ReactiveFormsModule,\n                        CellModule,\n                        FilterModule,\n                        PagerModule,\n                        TBodyModule,\n                        THeadModule,\n                    ],\n                    declarations: [\n                        Ng2SmartTableComponent,\n                    ],\n                    exports: [\n                        Ng2SmartTableComponent,\n                    ],\n                },] },\n    ];\n    return Ng2SmartTableModule;\n}());\n\nvar ServerSourceConf = /** @class */ (function () {\n    function ServerSourceConf(_a) {\n        var _b = _a === void 0 ? {} : _a, _c = _b.endPoint, endPoint = _c === void 0 ? '' : _c, _d = _b.sortFieldKey, sortFieldKey = _d === void 0 ? '' : _d, _e = _b.sortDirKey, sortDirKey = _e === void 0 ? '' : _e, _f = _b.pagerPageKey, pagerPageKey = _f === void 0 ? '' : _f, _g = _b.pagerLimitKey, pagerLimitKey = _g === void 0 ? '' : _g, _h = _b.filterFieldKey, filterFieldKey = _h === void 0 ? '' : _h, _j = _b.totalKey, totalKey = _j === void 0 ? '' : _j, _k = _b.dataKey, dataKey = _k === void 0 ? '' : _k;\n        this.endPoint = endPoint ? endPoint : '';\n        this.sortFieldKey = sortFieldKey ? sortFieldKey : ServerSourceConf.SORT_FIELD_KEY;\n        this.sortDirKey = sortDirKey ? sortDirKey : ServerSourceConf.SORT_DIR_KEY;\n        this.pagerPageKey = pagerPageKey ? pagerPageKey : ServerSourceConf.PAGER_PAGE_KEY;\n        this.pagerLimitKey = pagerLimitKey ? pagerLimitKey : ServerSourceConf.PAGER_LIMIT_KEY;\n        this.filterFieldKey = filterFieldKey ? filterFieldKey : ServerSourceConf.FILTER_FIELD_KEY;\n        this.totalKey = totalKey ? totalKey : ServerSourceConf.TOTAL_KEY;\n        this.dataKey = dataKey ? dataKey : ServerSourceConf.DATA_KEY;\n    }\n    ServerSourceConf.SORT_FIELD_KEY = '_sort';\n    ServerSourceConf.SORT_DIR_KEY = '_order';\n    ServerSourceConf.PAGER_PAGE_KEY = '_page';\n    ServerSourceConf.PAGER_LIMIT_KEY = '_limit';\n    ServerSourceConf.FILTER_FIELD_KEY = '#field#_like';\n    ServerSourceConf.TOTAL_KEY = 'x-total-count';\n    ServerSourceConf.DATA_KEY = '';\n    return ServerSourceConf;\n}());\n\nvar __extends$12 = (this && this.__extends) || (function () {\n    var extendStatics = Object.setPrototypeOf ||\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar ServerDataSource = /** @class */ (function (_super) {\n    __extends$12(ServerDataSource, _super);\n    function ServerDataSource(http$$1, conf) {\n        if (conf === void 0) { conf = {}; }\n        var _this = _super.call(this) || this;\n        _this.http = http$$1;\n        _this.lastRequestCount = 0;\n        _this.conf = new ServerSourceConf(conf);\n        if (!_this.conf.endPoint) {\n            throw new Error('At least endPoint must be specified as a configuration of the server data source.');\n        }\n        return _this;\n    }\n    ServerDataSource.prototype.count = function () {\n        return this.lastRequestCount;\n    };\n    ServerDataSource.prototype.getElements = function () {\n        var _this = this;\n        return this.requestElements()\n            .pipe(operators.map(function (res) {\n            _this.lastRequestCount = _this.extractTotalFromResponse(res);\n            _this.data = _this.extractDataFromResponse(res);\n            return _this.data;\n        })).toPromise();\n    };\n    /**\n     * Extracts array of data from server response\n     * @param res\n     * @returns {any}\n     */\n    /**\n       * Extracts array of data from server response\n       * @param res\n       * @returns {any}\n       */\n    ServerDataSource.prototype.extractDataFromResponse = /**\n       * Extracts array of data from server response\n       * @param res\n       * @returns {any}\n       */\n    function (res) {\n        var rawData = res.body;\n        var data = !!this.conf.dataKey ? getDeepFromObject(rawData, this.conf.dataKey, []) : rawData;\n        if (data instanceof Array) {\n            return data;\n        }\n        throw new Error(\"Data must be an array.\\n    Please check that data extracted from the server response by the key '\" + this.conf.dataKey + \"' exists and is array.\");\n    };\n    /**\n     * Extracts total rows count from the server response\n     * Looks for the count in the heders first, then in the response body\n     * @param res\n     * @returns {any}\n     */\n    /**\n       * Extracts total rows count from the server response\n       * Looks for the count in the heders first, then in the response body\n       * @param res\n       * @returns {any}\n       */\n    ServerDataSource.prototype.extractTotalFromResponse = /**\n       * Extracts total rows count from the server response\n       * Looks for the count in the heders first, then in the response body\n       * @param res\n       * @returns {any}\n       */\n    function (res) {\n        if (res.headers.has(this.conf.totalKey)) {\n            return +res.headers.get(this.conf.totalKey);\n        }\n        else {\n            var rawData = res.body;\n            return getDeepFromObject(rawData, this.conf.totalKey, 0);\n        }\n    };\n    ServerDataSource.prototype.requestElements = function () {\n        var httpParams = this.createRequesParams();\n        return this.http.get(this.conf.endPoint, { params: httpParams, observe: 'response' });\n    };\n    ServerDataSource.prototype.createRequesParams = function () {\n        var httpParams = new http.HttpParams();\n        httpParams = this.addSortRequestParams(httpParams);\n        httpParams = this.addFilterRequestParams(httpParams);\n        return this.addPagerRequestParams(httpParams);\n    };\n    ServerDataSource.prototype.addSortRequestParams = function (httpParams) {\n        var _this = this;\n        if (this.sortConf) {\n            this.sortConf.forEach(function (fieldConf) {\n                httpParams = httpParams.set(_this.conf.sortFieldKey, fieldConf.field);\n                httpParams = httpParams.set(_this.conf.sortDirKey, fieldConf.direction.toUpperCase());\n            });\n        }\n        return httpParams;\n    };\n    ServerDataSource.prototype.addFilterRequestParams = function (httpParams) {\n        var _this = this;\n        if (this.filterConf.filters) {\n            this.filterConf.filters.forEach(function (fieldConf) {\n                if (fieldConf['search']) {\n                    httpParams = httpParams.set(_this.conf.filterFieldKey.replace('#field#', fieldConf['field']), fieldConf['search']);\n                }\n            });\n        }\n        return httpParams;\n    };\n    ServerDataSource.prototype.addPagerRequestParams = function (httpParams) {\n        if (this.pagingConf && this.pagingConf['page'] && this.pagingConf['perPage']) {\n            httpParams = httpParams.set(this.conf.pagerPageKey, this.pagingConf['page']);\n            httpParams = httpParams.set(this.conf.pagerLimitKey, this.pagingConf['perPage']);\n        }\n        return httpParams;\n    };\n    return ServerDataSource;\n}(LocalDataSource));\n\n\n\nexports.DefaultEditor = DefaultEditor;\nexports.Cell = Cell;\nexports.LocalDataSource = LocalDataSource;\nexports.ServerDataSource = ServerDataSource;\nexports.Ng2SmartTableModule = Ng2SmartTableModule;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n"]}