From 2ebfabcf99f0d586d94d7e845fe43ab40474c7b1 Mon Sep 17 00:00:00 2001 From: ccrowhurstram Date: Fri, 18 Sep 2015 00:44:52 +0100 Subject: [PATCH] chore(release): 1.0.0-beta.5 distribution files --- CHANGELOG.md | 70 +++++++++++++++++++++++++++ bower.json | 2 +- dist/ng-table.js | 100 +++++++++++++++++++++++++++++---------- dist/ng-table.min.css | 2 +- dist/ng-table.min.js | 4 +- dist/ng-table.min.js.map | 2 +- package.json | 2 +- 7 files changed, 151 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c24b667..7f912472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,73 @@ + +# 1.0.0-beta.5 (2015-09-18) + + +## Bug Fixes + +- **NgTableParams:** afterCreated should be the very first event to fire + ([84d4220c](https://github.com/esvit/ng-table/commit/84d4220c1a1b61731773f5b5dc6861070dc9f99b)) +- **filterRow.html:** header-class should also apply to filter row + ([eed65436](https://github.com/esvit/ng-table/commit/eed65436acf4aa8d655492034e755dbbc5e73a1a)) +- **ngTableController:** reference to $column not always available in $column getter functions + ([adddb27d](https://github.com/esvit/ng-table/commit/adddb27de0abd4fb100ff4998ff6af83cbb6e13b)) + + +## Features + +- **ngTableController:** display the filter row by default when applicable + ([103b2be4](https://github.com/esvit/ng-table/commit/103b2be40fc703bf30acb782118d1bf4d5a1bd8e)) + + +## Breaking Changes + +- **NgTableParams:** due to [84d4220c](https://github.com/esvit/ng-table/commit/84d4220c1a1b61731773f5b5dc6861070dc9f99b), + + +The order of events firing has changed. + +Previously the `datasetChanged` event would fire after the `afterCreated` event. Now `afterCreated` +event will fires first. + +- **filterRow.html:** due to [eed65436](https://github.com/esvit/ng-table/commit/eed65436acf4aa8d655492034e755dbbc5e73a1a), + + +A css class specified using the header-class will now be added to the filter row header cell and not +just the sorting row. + +If you want to continue to apply the css rules *only* to the cell in the sorting header row you +will now need to qualify your css rule with the '.header' css class. + +So the following: + +```css +.my-customer-header { + /* rules */ +} +``` + +... will need to change to: + +```css +.header.my-customer-header { + /* rules */ +} +``` + +- **ngTableController:** due to [adddb27d](https://github.com/esvit/ng-table/commit/adddb27de0abd4fb100ff4998ff6af83cbb6e13b), + + +A context object combines and replaces the `$scope` and `locals` argument originally supplied to +`$column` getter functions. + +This context object prototypically inherits from the original `$scope` and has the fields from the +original `locals` argument as own properties. + +**It change is very unlikely to affect you** + +`ngTableColumn.buildColumn` now expects a third parameter - a reference to the `$columns` +array that will contain the column being built + + # 1.0.0-beta.4 (2015-09-13) diff --git a/bower.json b/bower.json index 97df86e0..7e56d506 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ng-table", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "main": [ "./dist/ng-table.min.js", "./dist/ng-table.min.css" diff --git a/dist/ng-table.js b/dist/ng-table.js index 46d345ae..06462ce2 100644 --- a/dist/ng-table.js +++ b/dist/ng-table.js @@ -459,9 +459,11 @@ * * @param {Object} column an existing $column or simple column data object * @param {Scope} defaultScope the $scope to supply to the $column getter methods when not supplied by caller + * @param {Array} columns a reference to the columns array to make available on the context supplied to the + * $column getter methods * @returns {Object} a $column object */ - function buildColumn(column, defaultScope){ + function buildColumn(column, defaultScope, columns){ // note: we're not modifying the original column object. This helps to avoid unintended side affects var extendedCol = Object.create(column); var defaults = createDefaults(); @@ -488,11 +490,13 @@ // satisfy the arguments expected by the function returned by parsedAttribute in the ngTable directive var getterFn = extendedCol[prop1]; extendedCol[prop1] = function () { - if (arguments.length === 0) { - return getterFn.call(column, defaultScope); - } else { - return getterFn.apply(column, arguments); - } + var scope = arguments[0] || defaultScope; + var context = Object.create(scope); + angular.extend(context, { + $column: extendedCol, + $columns: columns + }); + return getterFn.call(column, context); }; if (getterFn.assign){ extendedCol[prop1].assign = getterFn.assign; @@ -540,6 +544,7 @@ prevParamsMemento, errParamsMemento, isCommittedDataset = false, + initialEvents = [], log = function() { if (settings.debugMode && $log.debug) { $log.debug.apply($log, arguments); @@ -677,7 +682,16 @@ this.page(1); // reset page as a new dataset has been supplied } isCommittedDataset = false; - ngTableEventsChannel.publishDatasetChanged(this, newSettings.dataset, originalDataset); + + var fireEvent = function () { + ngTableEventsChannel.publishDatasetChanged(self, newSettings.dataset, originalDataset); + }; + + if (initialEvents){ + initialEvents.push(fireEvent); + } else { + fireEvent(); + } } log('ngTable: set settings', settings); return this; @@ -1268,6 +1282,12 @@ this.parameters(baseParameters, true); ngTableEventsChannel.publishAfterCreated(this); + // run events during construction after the initial create event. That way a consumer + // can subscribe to all events for a table without "dropping" an event + angular.forEach(initialEvents, function(event){ + event(); + }); + initialEvents = null; return this; }; @@ -1399,9 +1419,7 @@ this.loadFilterData = function ($columns) { angular.forEach($columns, function ($column) { var result; - result = $column.filterData($scope, { - $column: $column - }); + result = $column.filterData($scope); if (!result) { delete $column.filterData; return; @@ -1429,9 +1447,11 @@ }; this.buildColumns = function (columns) { - return columns.map(function(col){ - return ngTableColumn.buildColumn(col, $scope) - }) + var result = []; + columns.forEach(function(col){ + result.push(ngTableColumn.buildColumn(col, $scope, result)); + }); + return result }; this.parseNgTableDynamicExpr = function (attr) { @@ -1462,12 +1482,29 @@ $scope.params = params; }), false); + setupFilterRowBindingsToInternalScope(); + setupGroupRowBindingsToInternalScope(); + }; + + function setupFilterRowBindingsToInternalScope(){ if ($attrs.showFilter) { $scope.$parent.$watch($attrs.showFilter, function(value) { $scope.show_filter = value; }); + } else { + $scope.$watch(hasFilterColumn, function(value){ + $scope.show_filter = value; + }) + } + + if ($attrs.disableFilter) { + $scope.$parent.$watch($attrs.disableFilter, function(value) { + $scope.$filterRow.disabled = value; + }); } + } + function setupGroupRowBindingsToInternalScope(){ $scope.$groupRow = {}; if ($attrs.showGroup) { var showGroupGetter = $parse($attrs.showGroup); @@ -1475,6 +1512,7 @@ $scope.$groupRow.show = value; }); if (showGroupGetter.assign){ + // setup two-way databinding thus allowing ngTableGrowRow to assign to the showGroup expression $scope.$watch('$groupRow.show', function(value) { showGroupGetter.assign($scope.$parent, value); }); @@ -1484,13 +1522,7 @@ $scope.$groupRow.show = newValue; }); } - - if ($attrs.disableFilter) { - $scope.$parent.$watch($attrs.disableFilter, function(value) { - $scope.$filterRow.disabled = value; - }); - } - }; + } function getVisibleColumns(){ return ($scope.$columns || []).filter(function(c){ @@ -1498,6 +1530,26 @@ }); } + function hasFilterColumn(){ + if (!$scope.$columns) return false; + + return some($scope.$columns, function($column){ + return $column.filter($scope); + }); + } + + function some(array, predicate){ + var found = false; + for (var i = 0; i < array.length; i++) { + var obj = array[i]; + if (predicate(obj)){ + found = true; + break; + } + } + return found; + } + function commonInit(){ ngTableEventsChannel.onAfterReloadData(bindDataToScope, $scope, isMyPublisher); ngTableEventsChannel.onPagesChanged(bindPagesToScope, $scope, isMyPublisher); @@ -1597,13 +1649,11 @@ } var localValue; - var getter = function (scope, locals) { + var getter = function (context) { if (localValue !== undefined){ return localValue; } - return $parse(expr)(scope, angular.extend(locals || {}, { - $columns: columns - })); + return $parse(expr)(context); }; getter.assign = function($scope, value){ var parsedExpr = $parse(expr); @@ -2193,7 +2243,7 @@ })(); angular.module('ngTable').run(['$templateCache', function ($templateCache) { - $templateCache.put('ng-table/filterRow.html', '
'); + $templateCache.put('ng-table/filterRow.html', '
'); $templateCache.put('ng-table/filters/number.html', ' '); $templateCache.put('ng-table/filters/select-multiple.html', ' '); $templateCache.put('ng-table/filters/select.html', ' '); diff --git a/dist/ng-table.min.css b/dist/ng-table.min.css index 56b65577..45f0e6e8 100644 --- a/dist/ng-table.min.css +++ b/dist/ng-table.min.css @@ -1,3 +1,3 @@ -/*! ngTable v1.0.0-beta.4 by Vitalii Savchuk(esvit666@gmail.com) - https://github.com/esvit/ng-table - New BSD License */ +/*! ngTable v1.0.0-beta.5 by Vitalii Savchuk(esvit666@gmail.com) - https://github.com/esvit/ng-table - New BSD License */ .ng-table th{text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-table th.sortable{cursor:pointer}.ng-table th.sortable .sort-indicator{padding-right:18px;position:relative}.ng-table th.sortable .sort-indicator:after,.ng-table th.sortable .sort-indicator:before{content:"";border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:visible;right:5px;top:50%;position:absolute;opacity:.3;margin-top:-4px}.ng-table th.sortable .sort-indicator:before{margin-top:2px;border-bottom:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000}.ng-table th.sortable .sort-indicator:hover:after,.ng-table th.sortable .sort-indicator:hover:before{opacity:1;visibility:visible}.ng-table th.sortable.sort-desc,.ng-table th.sortable.sort-asc{background-color:rgba(141,192,219,.25);text-shadow:0 1px 1px rgba(255,255,255,.75)}.ng-table th.sortable.sort-desc .sort-indicator:after,.ng-table th.sortable.sort-asc .sort-indicator:after{margin-top:-2px}.ng-table th.sortable.sort-desc .sort-indicator:before,.ng-table th.sortable.sort-asc .sort-indicator:before{visibility:hidden}.ng-table th.sortable.sort-asc .sort-indicator:after,.ng-table th.sortable.sort-asc .sort-indicator:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.sortable.sort-desc .sort-indicator:after{border-bottom:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.filter .input-filter{margin:0;display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-table .ng-table-group-header th{text-align:left}.ng-table .ng-table-group-selector{display:block}.ng-table .ng-table-group-close,.ng-table .ng-table-group-toggle{float:right}.ng-table .ng-table-group-toggle{margin-right:5px}.ng-table+.pagination{margin-top:0}@media only screen and (max-width:800px){.ng-table-responsive{border-bottom:1px solid #999}.ng-table-responsive tr{border-top:1px solid #999;border-left:1px solid #999;border-right:1px solid #999}.ng-table-responsive td:before{position:absolute;padding:8px;left:0;top:0;width:50%;white-space:nowrap;text-align:left;font-weight:700}.ng-table-responsive thead tr th{text-align:left}.ng-table-responsive thead tr.ng-table-filters th{padding:0}.ng-table-responsive thead tr.ng-table-filters th form>div{padding:8px}.ng-table-responsive td{border:0;border-bottom:1px solid #eee;position:relative;padding-left:50%;white-space:normal;text-align:left}.ng-table-responsive td:before{content:attr(data-title-text)}.ng-table-responsive,.ng-table-responsive thead,.ng-table-responsive tbody,.ng-table-responsive th,.ng-table-responsive td,.ng-table-responsive tr{display:block}}.ng-table-group-selector:before,.ng-table-group-selector:after,.filter:before,.filter:after{display:table;content:" "}.ng-table-group-selector:after,.filter:after{clear:both}.filter>.filter-cell{float:left;box-sizing:border-box}.filter-horizontal>.filter-cell{padding:0 2px}.filter-horizontal>.filter-cell:first-child{padding-left:0}.filter-horizontal>.filter-cell:last-child,.filter-horizontal>.filter-cell.last{padding-right:0}.s12{width:100%}.s11{width:91.66666666666666%}.s10{width:83.33333333333334%}.s9{width:75%}.s8{width:66.66666666666666%}.s7{width:58.333333333333336%}.s6{width:50%}.s5{width:41.66666666666667%}.s4{width:33.33333333333333%}.s3{width:25%}.s2{width:16.666666666666664%}.s1{width:8.333333333333332%}@media all and (max-width:468px){.s12,.s11,.s10,.s9,.s8,.s7,.s6,.s5,.s4,.s3,.s2,.s1{width:100%}.filter>.filter-cell{padding:0}} \ No newline at end of file diff --git a/dist/ng-table.min.js b/dist/ng-table.min.js index a524f89a..adb4a2d5 100644 --- a/dist/ng-table.min.js +++ b/dist/ng-table.min.js @@ -1,4 +1,4 @@ -/*! ngTable v1.0.0-beta.4 by Vitalii Savchuk(esvit666@gmail.com) - https://github.com/esvit/ng-table - New BSD License */ +/*! ngTable v1.0.0-beta.5 by Vitalii Savchuk(esvit666@gmail.com) - https://github.com/esvit/ng-table - New BSD License */ -!function(a,b){"use strict";return"function"==typeof define&&define.amd?void define(["angular"],function(a){return b(a)}):b(a)}(window.angular||null,function(a){"use strict";return function(){a.module("ngTable",[])}(),function(){a.module("ngTable").value("ngTableDefaults",{params:{},settings:{}})}(),function(){function b(b){function c(b,c){var f=b.charAt(0).toUpperCase()+b.substring(1),g={};return g["on"+f]=d(b),g["publish"+f]=e(b),a.extend(c,g)}function d(c){return function(d){var e=a.identity,g=b;if(2===arguments.length?a.isFunction(arguments[1].$new)?g=arguments[1]:e=arguments[1]:arguments.length>2&&(g=arguments[1],e=arguments[2]),a.isObject(e)){var h=e;e=function(a){return a===h}}return g.$on("ngTable:"+c,function(a,b){if(!b.isNullInstance){var c=f(arguments,2),g=[b].concat(c);e.apply(this,g)&&d.apply(this,g)}})}}function e(a){return function(){var c=["ngTable:"+a].concat(Array.prototype.slice.call(arguments));b.$broadcast.apply(b,c)}}function f(a,b){return Array.prototype.slice.call(a,null==b?1:b)}var g={};return g=c("afterCreated",g),g=c("afterReloadData",g),g=c("datasetChanged",g),g=c("pagesChanged",g)}a.module("ngTable").factory("ngTableEventsChannel",b),b.$inject=["$rootScope"]}(),function(){function b(){function b(){c()}function c(){f=g}function d(b){var c=a.extend({},f,b);c.aliasUrls=a.extend({},f.aliasUrls,b.aliasUrls),f=c}function e(){function b(b,c){return a.isObject(b)&&(b=b.id),-1!==b.indexOf("/")?b:e.getUrlForAlias(b,c)}function c(a){return f.aliasUrls[a]||f.defaultBaseUrl+a+f.defaultExt}var d,e={config:d,getTemplateUrl:b,getUrlForAlias:c};return Object.defineProperty(e,"config",{get:function(){return d=d||a.copy(f)},enumerable:!0}),e}var f,g={defaultBaseUrl:"ng-table/filters/",defaultExt:".html",aliasUrls:{}};this.$get=e,this.resetConfigs=c,this.setConfig=d,b(),e.$inject=[]}a.module("ngTable").provider("ngTableFilterConfig",b),b.$inject=[]}(),function(){function b(){function b(b){function d(d){var e=d.settings().filterOptions;return a.isFunction(e.filterFn)?e.filterFn:b(e.filterFilterName||c.filterFilterName)}function e(){return b(c.sortingFilterName)}function f(a,b){if(!b.hasFilter())return a;var c=b.filter(!0),e=Object.keys(c),f=e.reduce(function(a,b){return a=j(a,c[b],b)},{}),g=d(b);return g.call(b,a,f,b.settings().filterOptions.filterComparator)}function g(a,b){var c=a.slice((b.page()-1)*b.count(),b.page()*b.count());return b.total(a.length),c}function h(a,b){var c=b.orderBy(),d=e(b);return c.length?d(a,c):a}function i(b,c){if(null==b)return[];var d=a.extend({},k,c.settings().dataOptions),e=d.applyFilter?f(b,c):b,i=d.applySort?h(e,c):e;return d.applyPaging?g(i,c):i}function j(a,b,c){var d=c.split("."),e=a,f=d[d.length-1],g=e,h=d.slice(0,d.length-1);return h.forEach(function(a){g.hasOwnProperty(a)||(g[a]={}),g=g[a]}),g[f]=b,e}var k={applyFilter:!0,applySort:!0,applyPaging:!0};return i.applyPaging=g,i.getFilterFn=d,i.getOrderByFn=e,i}var c=this;c.$get=b,c.filterFilterName="filter",c.sortingFilterName="orderBy",b.$inject=["$filter"]}a.module("ngTable").provider("ngTableDefaultGetData",b),b.$inject=[]}(),function(){function b(a){function b(b){return function(){var c=a.defer(),d=b.apply(this,[c].concat(Array.prototype.slice.call(arguments)));return d||(d=c.promise),d}}return b}a.module("ngTable").factory("ngTableGetDataBcShim",b),b.$inject=["$q"]}(),function(){a.module("ngTable").factory("ngTableColumn",[function(){function b(){return{"class":c(""),filter:c(!1),groupable:c(!1),filterData:a.noop,headerTemplateURL:c(!1),headerTitle:c(""),sortable:c(!1),show:c(!0),title:c(""),titleAlt:c("")}}function c(a){var b=a,c=function(){return b};return c.assign=function(a,c){b=c},c}function d(c,d){var e=Object.create(c),f=b();for(var g in f)void 0===e[g]&&(e[g]=f[g]),a.isFunction(e[g])||!function(a){var b=function(){return c[a]};b.assign=function(b,d){c[a]=d},e[a]=b}(g),function(a){var b=e[a];e[a]=function(){return 0===arguments.length?b.call(c,d):b.apply(c,arguments)},b.assign&&(e[a].assign=b.assign)}(g);return e}return{buildColumn:d}}])}(),function(){a.module("ngTable").factory("NgTableParams",["$q","$log","$filter","ngTableDefaults","ngTableGetDataBcShim","ngTableDefaultGetData","ngTableEventsChannel",function(b,c,d,e,f,g,h){var i=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},j=function(d,j){function k(b){var c=C.groupOptions&&C.groupOptions.defaultSort;if(a.isFunction(b))return null==b.sortDirection&&(b.sortDirection=c),b;if(a.isString(b)){var d={};return d[b]=c,d}if(a.isObject(b)){for(var e in b)null==b[e]&&(b[e]=c);return b}return b}function l(a){var b=[];for(var c in a)b.push(("asc"===a[c]?"+":"-")+c);return b}function m(){var b={params:B};return a.isFunction(B.group)&&(b.groupSortDirection=B.group.sortDirection),b}function n(){var b=B.filter&&B.filter.$,c=t&&t.params.filter&&t.params.filter.$;return!a.equals(b,c)}function o(){C.filterOptions.filterDelay===y.filterDelay&&C.total<=C.filterOptions.filterDelayThreshold&&C.getData===A.getData&&(C.filterOptions.filterDelay=0)}function p(){var a=C.getDataFnAdaptor(C.getData);return b.when(a.call(C,v))}function q(){var a=C.getGroupsFnAdaptor(C.getGroups);return b.when(a.call(C,v))}function r(a){var c=C.interceptors||[];return c.reduce(function(a,c){var d=c.response&&c.response.bind(c)||b.when,e=c.responseError&&c.responseError.bind(c)||b.reject;return a.then(function(a){return d(a,v)},function(a){return e(a,v)})},a())}function s(){function c(a){return g(a.settings().dataset,a)}function d(c){var d,e=c.group(),f=void 0;if(a.isFunction(e))d=e,f=e.sortDirection;else{var h=Object.keys(e)[0];f=e[h],d=function(a){return a[h]}}var i=c.settings(),j=i.dataOptions;i.dataOptions={applyPaging:!1};var k=i.getDataFnAdaptor(i.getData),m=b.when(k.call(i,c));return m.then(function(b){var e={};a.forEach(b,function(a){var b=d(a);e[b]=e[b]||{data:[],$hideRows:!i.groupOptions.isExpanded,value:b},e[b].data.push(a)});var h=[];for(var j in e)h.push(e[j]);if(f){var k=g.getOrderByFn(),m=l({value:f});h=k(h,m)}return g.applyPaging(h,c)})["finally"](function(){i.dataOptions=j})}return{getDataFnAdaptor:a.identity,getGroupsFnAdaptor:a.identity,getData:c,getGroups:d}}"boolean"==typeof d&&(this.isNullInstance=!0);var t,u,v=this,w=!1,x=function(){C.debugMode&&c.debug&&c.debug.apply(c,arguments)},y={filterComparator:void 0,filterDelay:500,filterDelayThreshold:1e4,filterFilterName:void 0,filterFn:void 0,filterLayout:"stack"},z={defaultSort:"asc",isExpanded:!0},A=s();this.data=[],this.parameters=function(b,c){if(c=c||!1,a.isDefined(b)){for(var d in b){var e=b[d];if(c&&d.indexOf("[")>=0){for(var f=d.split(/\[(.*)\]/).reverse(),g="",h=0,j=f.length;j>h;h++){var l=f[h];if(""!==l){var m=e;e={},e[g=l]=i(m)?parseFloat(m):m}}"sorting"===g&&(B[g]={}),B[g]=a.extend(B[g]||{},e[g])}else B[d]="group"===d?k(b[d]):i(b[d])?parseFloat(b[d]):b[d]}return x("ngTable: set parameters",B),this}return B},this.settings=function(b){if(a.isDefined(b)){b.filterOptions&&(b.filterOptions=a.extend({},C.filterOptions,b.filterOptions)),b.groupOptions&&(b.groupOptions=a.extend({},C.groupOptions,b.groupOptions)),a.isArray(b.dataset)&&(b.total=b.dataset.length),b.getData&&b.getData.length>1&&(b.getDataFnAdaptor=f),b.getGroups&&b.getGroups.length>2&&(b.getGroupsFnAdaptor=f);var c=C.dataset;C=a.extend(C,b),a.isArray(b.dataset)&&o();var d=b.hasOwnProperty("dataset")&&b.dataset!=c;return d&&(w&&this.page(1),w=!1,h.publishDatasetChanged(this,b.dataset,c)),x("ngTable: set settings",C),this}return C},this.page=function(b){return a.isDefined(b)?this.parameters({page:b}):B.page},this.total=function(b){return a.isDefined(b)?this.settings({total:b}):C.total},this.count=function(b){return a.isDefined(b)?this.parameters({count:b,page:1}):B.count},this.filter=function(b){if(a.isDefined(b)&&a.isObject(b))return this.parameters({filter:b,page:1});if(b===!0){for(var c=Object.keys(B.filter),d={},e=0;ed?6:d,i=[],h=Math.ceil(b/c),h>1){i.push({type:"prev",number:Math.max(1,a-1),active:a>1}),i.push({type:"first",number:1,active:a>1,current:1===a}),f=Math.round((C.paginationMaxBlocks-C.paginationMinBlocks)/2),g=Math.max(2,a-f),e=Math.min(h-1,a+2*f-(a-g)),g=Math.max(2,g-(2*f-(e-g)));for(var j=g;e>=j;)i.push(j===g&&2!==j||j===e&&j!==h-1?{type:"more",active:!1}:{type:"page",number:j,active:a!==j,current:a===j}),j++;i.push({type:"last",number:h,active:a!==h,current:a===h}),i.push({type:"next",number:Math.min(h,a+1),active:h>a})}return i},this.isDataReloadRequired=function(){return!w||!a.equals(m(),t)||n()},this.hasFilter=function(){return Object.keys(this.filter(!0)).length>0},this.hasGroup=function(b,c){return null==b?a.isFunction(B.group)||Object.keys(B.group).length>0:a.isFunction(b)?null==c?B.group===b:B.group===b&&b.sortDirection===c:null==c?-1!==Object.keys(B.group).indexOf(b):B.group[b]===c},this.hasFilterChanges=function(){var b=t&&t.params.filter;return!a.equals(B.filter,b)||n()},this.url=function(b){function c(a,c){b?e.push(c+"="+encodeURIComponent(a)):e[c]=encodeURIComponent(a)}function d(b,c){return"group"===c?!0:a.isDefined(b)&&""!==b}b=b||!1;var e=b?[]:{};for(var f in B)if(B.hasOwnProperty(f)){var g=B[f],h=encodeURIComponent(f);if("object"==typeof g){for(var i in g)if(d(g[i],f)){var j=h+"["+encodeURIComponent(i)+"]";c(g[i],j)}}else!a.isFunction(g)&&d(g,f)&&c(g,h)}return e},this.reload=function(){var c=this,d=null;C.$loading=!0,t=a.copy(m()),w=!0,d=r(c.hasGroup()?q:p),x("ngTable: reload data");var e=c.data;return d.then(function(a){return C.$loading=!1,u=null,c.data=a,h.publishAfterReloadData(c,a,e),c.reloadPages(),C.$scope&&C.$scope.$emit("ngTableAfterReloadData"),a})["catch"](function(a){return u=t,t=null,w=!1,b.reject(a)})},this.hasErrorState=function(){return!(!u||!a.equals(u,m()))},this.reloadPages=function(){var b;return function(){var c=b,d=v.generatePagesArray(v.page(),v.total(),v.count());a.equals(c,d)||(b=d,h.publishPagesChanged(this,d,c))}}();var B={page:1,count:10,filter:{},sorting:{},group:{}};a.extend(B,e.params);var C={$scope:null,$loading:!1,dataset:null,total:0,defaultSort:"desc",filterOptions:a.copy(y),groupOptions:a.copy(z),counts:[10,25,50,100],interceptors:[],paginationMaxBlocks:11,paginationMinBlocks:5,sortingIndicator:"span"};return this.settings(A),this.settings(e.settings),this.settings(j),this.parameters(d,!0),h.publishAfterCreated(this),this};return j}]),a.module("ngTable").factory("ngTableParams",["NgTableParams",function(a){return a}])}(),function(){a.module("ngTable").controller("ngTableController",["$scope","NgTableParams","$timeout","$parse","$compile","$attrs","$element","ngTableColumn","ngTableEventsChannel",function(b,c,d,e,f,g,h,i,j){function k(a){if(a&&!b.params.hasErrorState()){b.params.settings().$scope=b;var c=b.params,d=c.settings().filterOptions;if(c.hasFilterChanges()){var e=function(){c.page(1),c.reload()};d.filterDelay?n(e,d.filterDelay):e()}else c.reload()}}function l(){return(b.$columns||[]).filter(function(a){return a.show(b)})}function m(){function a(a,c){a.hasGroup()?(b.$groups=c||[],b.$groups.visibleColumnCount=l().length):b.$data=c}function c(a,c){b.pages=c}function d(a){return b.params===a}j.onAfterReloadData(a,b,d),j.onPagesChanged(c,b,d)}b.$filterRow={},b.$loading=!1,b.hasOwnProperty("params")||(b.params=new c(!0)),b.params.settings().$scope=b;var n=function(){var a=0;return function(b,c){d.cancel(a),a=d(b,c)}}();b.$watch("params",function(a,b){a!==b&&a&&a.reload()},!1),b.$watch("params.isDataReloadRequired()",k),this.compileDirectiveTemplates=function(){if(!h.hasClass("ng-table")){b.templates={header:g.templateHeader?g.templateHeader:"ng-table/header.html",pagination:g.templatePagination?g.templatePagination:"ng-table/pager.html"},h.addClass("ng-table");var c=null,d=!1;a.forEach(h.children(),function(a){"THEAD"===a.tagName&&(d=!0)}),d||(c=a.element(document.createElement("thead")).attr("ng-include","templates.header"),h.prepend(c));var e=a.element(document.createElement("div")).attr({"ng-table-pagination":"params","template-url":"templates.pagination"});h.after(e),c&&f(c)(b),f(e)(b)}},this.loadFilterData=function(c){a.forEach(c,function(c){var d;if(d=c.filterData(b,{$column:c}),!d)return void delete c.filterData;if(a.isObject(d)&&(a.isObject(d.promise)||a.isFunction(d.then))){var e=a.isFunction(d.then)?d:d.promise;return delete c.filterData,e.then(function(b){a.isArray(b)||a.isFunction(b)||a.isObject(b)||(b=[]),c.data=b})}return c.data=d})},this.buildColumns=function(a){return a.map(function(a){return i.buildColumn(a,b)})},this.parseNgTableDynamicExpr=function(a){if(!a||a.indexOf(" with ")>-1){var b=a.split(/\s+with\s+/);return{tableParams:b[0],columns:b[1]}}throw new Error("Parse error (expected example: ng-table-dynamic='tableParams with cols')")},this.setupBindingsToInternalScope=function(c){var d=e(c);if(b.$watch(d,function(c){a.isUndefined(c)||(b.paramsModel=d,b.params=c)},!1),g.showFilter&&b.$parent.$watch(g.showFilter,function(a){b.show_filter=a}),b.$groupRow={},g.showGroup){var f=e(g.showGroup);b.$parent.$watch(f,function(a){b.$groupRow.show=a}),f.assign&&b.$watch("$groupRow.show",function(a){f.assign(b.$parent,a)})}else b.$watch("params.hasGroup()",function(a){b.$groupRow.show=a});g.disableFilter&&b.$parent.$watch(g.disableFilter,function(a){b.$filterRow.disabled=a})},m()}])}(),function(){a.module("ngTable").directive("ngTable",["$q","$parse",function(b,c){return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(b){var d,e,f=[],g=0,h=[];return a.forEach(b.find("tr"),function(b){h.push(a.element(b))}),d=h.filter(function(a){return!a.hasClass("ng-table-group")})[0],e=h.filter(function(a){return a.hasClass("ng-table-group")})[0],d?(a.forEach(d.find("td"),function(b){var d=a.element(b);if(!d.attr("ignore-cell")||"true"!==d.attr("ignore-cell")){var h=function(a){return d.attr("x-data-"+a)||d.attr("data-"+a)||d.attr(a)},i=function(a,b){d.attr("x-data-"+a)?d.attr("x-data-"+a,b):d.attr("data"+a)?d.attr("data"+a,b):d.attr(a,b)},j=function(b){var d=h(b);if(!d)return void 0;var e,g=function(b,g){return void 0!==e?e:c(d)(b,a.extend(g||{},{$columns:f}))};return g.assign=function(a,b){var f=c(d);f.assign?f.assign(a.$parent,b):e=b},g},k=h("title-alt")||h("title");k&&d.attr("data-title-text","{{"+k+"}}"),f.push({id:g++,title:j("title"),titleAlt:j("title-alt"),headerTitle:j("header-title"),sortable:j("sortable"),"class":j("header-class"),filter:j("filter"),groupable:j("groupable"),headerTemplateURL:j("header"),filterData:j("filter-data"),show:d.attr("ng-if")?j("ng-if"):void 0}),e&&i("ng-if","$columns["+(f.length-1)+"].show(this)")}}),function(a,b,c,d){a.$columns=f=d.buildColumns(f),d.setupBindingsToInternalScope(c.ngTable),d.loadFilterData(f),d.compileDirectiveTemplates()}):void 0}}}])}(),function(){a.module("ngTable").directive("ngTableDynamic",[function(){return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(b){var c;return a.forEach(b.find("tr"),function(b){b=a.element(b),b.hasClass("ng-table-group")||c||(c=b)}),c?(a.forEach(c.find("td"),function(b){var c=a.element(b),d=function(a){return c.attr("x-data-"+a)||c.attr("data-"+a)||c.attr(a)},e=d("title");e||c.attr("data-title-text","{{$columns[$index].titleAlt(this) || $columns[$index].title(this)}}");var f=c.attr("ng-if");f||c.attr("ng-if","$columns[$index].show(this)")}),function(a,b,c,d){var e=d.parseNgTableDynamicExpr(c.ngTableDynamic);d.setupBindingsToInternalScope(e.tableParams),d.compileDirectiveTemplates(),a.$watchCollection(e.columns,function(b){a.$columns=d.buildColumns(b),d.loadFilterData(a.$columns)})}):void 0}}}])}(),function(){function b(a){function b(b,c,d){var e=a(d.ngTableColumnsBinding).assign;e&&b.$watch("$columns",function(a){var c=(a||[]).slice(0);e(b,c)})}var c={restrict:"A",require:"ngTable",link:b};return c}a.module("ngTable").directive("ngTableColumnsBinding",b),b.$inject=["$parse"]}(),function(){a.module("ngTable").directive("ngTablePagination",["$compile","ngTableEventsChannel",function(b,c){return{restrict:"A",scope:{params:"=ngTablePagination",templateUrl:"="},replace:!1,link:function(d,e){c.onAfterReloadData(function(a){d.pages=a.generatePagesArray()},d,function(a){return a===d.params}),d.$watch("templateUrl",function(c){if(!a.isUndefined(c)){var f=a.element(document.createElement("div"));f.attr({"ng-include":"templateUrl"}),e.append(f),b(f)(d)}})}}}])}(),function(){function b(b,c){b.config=c,b.getFilterCellCss=function(a,b){if("horizontal"!==b)return"s12";var c=Object.keys(a).length,d=parseInt(12/c,10);return"s"+d},b.getFilterPlaceholderValue=function(b){return a.isObject(b)?b.placeholder:""}}a.module("ngTable").controller("ngTableFilterRowController",b),b.$inject=["$scope","ngTableFilterConfig"]}(),function(){function b(){var a={restrict:"E",replace:!0,templateUrl:"ng-table/filterRow.html",scope:!0,controller:"ngTableFilterRowController"};return a}a.module("ngTable").directive("ngTableFilterRow",b),b.$inject=[]}(),function(){function b(b){function c(){b.getGroupables=g,b.getGroupTitle=f,b.getVisibleColumns=h,b.groupBy=i,b.isSelectedGroup=j,b.toggleDetail=l,b.$watch("params.group()",k,!0)}function d(){var a;a=b.params.hasGroup(b.$selGroup,"asc")?"desc":b.params.hasGroup(b.$selGroup,"desc")?"":"asc",b.params.group(b.$selGroup,a)}function e(a){return b.$columns.filter(function(c){return c.groupable(b)===a})[0]}function f(c){return a.isFunction(c)?c.title:c.title(b)}function g(){var a=b.$columns.filter(function(a){return a.groupable(b)});return m.concat(a)}function h(){return b.$columns.filter(function(a){return a.show(b)})}function i(a){j(a)?d():b.params.group(a.groupable?a.groupable(b):a)}function j(a){return a.groupable?a.groupable(b)===b.$selGroup:a===b.$selGroup}function k(c){var d=e(b.$selGroup);if(d&&d.show.assign&&d.show.assign(b,!0),a.isFunction(c))m=[c],b.$selGroup=c,b.$selGroupTitle=c.title;else{var f=Object.keys(c||{})[0],g=e(f);g&&(b.$selGroupTitle=g.title(b),b.$selGroup=f,g.show.assign&&g.show.assign(b,!1))}}function l(){return b.params.settings().groupOptions.isExpanded=!b.params.settings().groupOptions.isExpanded,b.params.reload()}var m=[];c()}a.module("ngTable").controller("ngTableGroupRowController",b),b.$inject=["$scope"]}(),function(){function b(){var a={restrict:"E",replace:!0,templateUrl:"ng-table/groupRow.html",scope:!0,controller:"ngTableGroupRowController",controllerAs:"dctrl"};return a}a.module("ngTable").directive("ngTableGroupRow",b),b.$inject=[]}(),function(){function b(a){function b(b,c){var d=b.sortable&&b.sortable();if(d){var e=a.params.settings().defaultSort,f="asc"===e?"desc":"asc",g=a.params.sorting()&&a.params.sorting()[d]&&a.params.sorting()[d]===e,h=c.ctrlKey||c.metaKey?a.params.sorting():{};h[d]=g?f:e,a.params.parameters({sorting:h})}}a.sortBy=b}a.module("ngTable").controller("ngTableSorterRowController",b),b.$inject=["$scope"]}(),function(){function b(){var a={restrict:"E",replace:!0,templateUrl:"ng-table/sorterRow.html",scope:!0,controller:"ngTableSorterRowController"};return a}a.module("ngTable").directive("ngTableSorterRow",b),b.$inject=[]}(),function(){function b(){var a={restrict:"A",controller:c};return a}function c(b,c,d,e){function f(){j=c(d.ngTableSelectFilterDs)(b),b.$watch(function(){return j.data},g)}function g(){i(j).then(function(a){a&&!h(a)&&a.unshift({id:"",title:""}),a=a||[],b.$selectData=a})}function h(a){for(var b,c=0;c
'),a.put("ng-table/filters/number.html",' '),a.put("ng-table/filters/select-multiple.html",' '),a.put("ng-table/filters/select.html",' '),a.put("ng-table/filters/text.html",' '),a.put("ng-table/groupRow.html",' {{$selGroupTitle}} '),a.put("ng-table/header.html"," "),a.put("ng-table/pager.html",' '),a.put("ng-table/sorterRow.html",'
')}]),a.module("ngTable")}); +!function(a,b){"use strict";return"function"==typeof define&&define.amd?void define(["angular"],function(a){return b(a)}):b(a)}(window.angular||null,function(a){"use strict";return function(){a.module("ngTable",[])}(),function(){a.module("ngTable").value("ngTableDefaults",{params:{},settings:{}})}(),function(){function b(b){function c(b,c){var f=b.charAt(0).toUpperCase()+b.substring(1),g={};return g["on"+f]=d(b),g["publish"+f]=e(b),a.extend(c,g)}function d(c){return function(d){var e=a.identity,g=b;if(2===arguments.length?a.isFunction(arguments[1].$new)?g=arguments[1]:e=arguments[1]:arguments.length>2&&(g=arguments[1],e=arguments[2]),a.isObject(e)){var h=e;e=function(a){return a===h}}return g.$on("ngTable:"+c,function(a,b){if(!b.isNullInstance){var c=f(arguments,2),g=[b].concat(c);e.apply(this,g)&&d.apply(this,g)}})}}function e(a){return function(){var c=["ngTable:"+a].concat(Array.prototype.slice.call(arguments));b.$broadcast.apply(b,c)}}function f(a,b){return Array.prototype.slice.call(a,null==b?1:b)}var g={};return g=c("afterCreated",g),g=c("afterReloadData",g),g=c("datasetChanged",g),g=c("pagesChanged",g)}a.module("ngTable").factory("ngTableEventsChannel",b),b.$inject=["$rootScope"]}(),function(){function b(){function b(){c()}function c(){f=g}function d(b){var c=a.extend({},f,b);c.aliasUrls=a.extend({},f.aliasUrls,b.aliasUrls),f=c}function e(){function b(b,c){return a.isObject(b)&&(b=b.id),-1!==b.indexOf("/")?b:e.getUrlForAlias(b,c)}function c(a){return f.aliasUrls[a]||f.defaultBaseUrl+a+f.defaultExt}var d,e={config:d,getTemplateUrl:b,getUrlForAlias:c};return Object.defineProperty(e,"config",{get:function(){return d=d||a.copy(f)},enumerable:!0}),e}var f,g={defaultBaseUrl:"ng-table/filters/",defaultExt:".html",aliasUrls:{}};this.$get=e,this.resetConfigs=c,this.setConfig=d,b(),e.$inject=[]}a.module("ngTable").provider("ngTableFilterConfig",b),b.$inject=[]}(),function(){function b(){function b(b){function d(d){var e=d.settings().filterOptions;return a.isFunction(e.filterFn)?e.filterFn:b(e.filterFilterName||c.filterFilterName)}function e(){return b(c.sortingFilterName)}function f(a,b){if(!b.hasFilter())return a;var c=b.filter(!0),e=Object.keys(c),f=e.reduce(function(a,b){return a=j(a,c[b],b)},{}),g=d(b);return g.call(b,a,f,b.settings().filterOptions.filterComparator)}function g(a,b){var c=a.slice((b.page()-1)*b.count(),b.page()*b.count());return b.total(a.length),c}function h(a,b){var c=b.orderBy(),d=e(b);return c.length?d(a,c):a}function i(b,c){if(null==b)return[];var d=a.extend({},k,c.settings().dataOptions),e=d.applyFilter?f(b,c):b,i=d.applySort?h(e,c):e;return d.applyPaging?g(i,c):i}function j(a,b,c){var d=c.split("."),e=a,f=d[d.length-1],g=e,h=d.slice(0,d.length-1);return h.forEach(function(a){g.hasOwnProperty(a)||(g[a]={}),g=g[a]}),g[f]=b,e}var k={applyFilter:!0,applySort:!0,applyPaging:!0};return i.applyPaging=g,i.getFilterFn=d,i.getOrderByFn=e,i}var c=this;c.$get=b,c.filterFilterName="filter",c.sortingFilterName="orderBy",b.$inject=["$filter"]}a.module("ngTable").provider("ngTableDefaultGetData",b),b.$inject=[]}(),function(){function b(a){function b(b){return function(){var c=a.defer(),d=b.apply(this,[c].concat(Array.prototype.slice.call(arguments)));return d||(d=c.promise),d}}return b}a.module("ngTable").factory("ngTableGetDataBcShim",b),b.$inject=["$q"]}(),function(){a.module("ngTable").factory("ngTableColumn",[function(){function b(){return{"class":c(""),filter:c(!1),groupable:c(!1),filterData:a.noop,headerTemplateURL:c(!1),headerTitle:c(""),sortable:c(!1),show:c(!0),title:c(""),titleAlt:c("")}}function c(a){var b=a,c=function(){return b};return c.assign=function(a,c){b=c},c}function d(c,d,e){var f=Object.create(c),g=b();for(var h in g)void 0===f[h]&&(f[h]=g[h]),a.isFunction(f[h])||!function(a){var b=function(){return c[a]};b.assign=function(b,d){c[a]=d},f[a]=b}(h),function(b){var g=f[b];f[b]=function(){var b=arguments[0]||d,h=Object.create(b);return a.extend(h,{$column:f,$columns:e}),g.call(c,h)},g.assign&&(f[b].assign=g.assign)}(h);return f}return{buildColumn:d}}])}(),function(){a.module("ngTable").factory("NgTableParams",["$q","$log","$filter","ngTableDefaults","ngTableGetDataBcShim","ngTableDefaultGetData","ngTableEventsChannel",function(b,c,d,e,f,g,h){var i=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},j=function(d,j){function k(b){var c=D.groupOptions&&D.groupOptions.defaultSort;if(a.isFunction(b))return null==b.sortDirection&&(b.sortDirection=c),b;if(a.isString(b)){var d={};return d[b]=c,d}if(a.isObject(b)){for(var e in b)null==b[e]&&(b[e]=c);return b}return b}function l(a){var b=[];for(var c in a)b.push(("asc"===a[c]?"+":"-")+c);return b}function m(){var b={params:C};return a.isFunction(C.group)&&(b.groupSortDirection=C.group.sortDirection),b}function n(){var b=C.filter&&C.filter.$,c=t&&t.params.filter&&t.params.filter.$;return!a.equals(b,c)}function o(){D.filterOptions.filterDelay===z.filterDelay&&D.total<=D.filterOptions.filterDelayThreshold&&D.getData===B.getData&&(D.filterOptions.filterDelay=0)}function p(){var a=D.getDataFnAdaptor(D.getData);return b.when(a.call(D,v))}function q(){var a=D.getGroupsFnAdaptor(D.getGroups);return b.when(a.call(D,v))}function r(a){var c=D.interceptors||[];return c.reduce(function(a,c){var d=c.response&&c.response.bind(c)||b.when,e=c.responseError&&c.responseError.bind(c)||b.reject;return a.then(function(a){return d(a,v)},function(a){return e(a,v)})},a())}function s(){function c(a){return g(a.settings().dataset,a)}function d(c){var d,e=c.group(),f=void 0;if(a.isFunction(e))d=e,f=e.sortDirection;else{var h=Object.keys(e)[0];f=e[h],d=function(a){return a[h]}}var i=c.settings(),j=i.dataOptions;i.dataOptions={applyPaging:!1};var k=i.getDataFnAdaptor(i.getData),m=b.when(k.call(i,c));return m.then(function(b){var e={};a.forEach(b,function(a){var b=d(a);e[b]=e[b]||{data:[],$hideRows:!i.groupOptions.isExpanded,value:b},e[b].data.push(a)});var h=[];for(var j in e)h.push(e[j]);if(f){var k=g.getOrderByFn(),m=l({value:f});h=k(h,m)}return g.applyPaging(h,c)})["finally"](function(){i.dataOptions=j})}return{getDataFnAdaptor:a.identity,getGroupsFnAdaptor:a.identity,getData:c,getGroups:d}}"boolean"==typeof d&&(this.isNullInstance=!0);var t,u,v=this,w=!1,x=[],y=function(){D.debugMode&&c.debug&&c.debug.apply(c,arguments)},z={filterComparator:void 0,filterDelay:500,filterDelayThreshold:1e4,filterFilterName:void 0,filterFn:void 0,filterLayout:"stack"},A={defaultSort:"asc",isExpanded:!0},B=s();this.data=[],this.parameters=function(b,c){if(c=c||!1,a.isDefined(b)){for(var d in b){var e=b[d];if(c&&d.indexOf("[")>=0){for(var f=d.split(/\[(.*)\]/).reverse(),g="",h=0,j=f.length;j>h;h++){var l=f[h];if(""!==l){var m=e;e={},e[g=l]=i(m)?parseFloat(m):m}}"sorting"===g&&(C[g]={}),C[g]=a.extend(C[g]||{},e[g])}else C[d]="group"===d?k(b[d]):i(b[d])?parseFloat(b[d]):b[d]}return y("ngTable: set parameters",C),this}return C},this.settings=function(b){if(a.isDefined(b)){b.filterOptions&&(b.filterOptions=a.extend({},D.filterOptions,b.filterOptions)),b.groupOptions&&(b.groupOptions=a.extend({},D.groupOptions,b.groupOptions)),a.isArray(b.dataset)&&(b.total=b.dataset.length),b.getData&&b.getData.length>1&&(b.getDataFnAdaptor=f),b.getGroups&&b.getGroups.length>2&&(b.getGroupsFnAdaptor=f);var c=D.dataset;D=a.extend(D,b),a.isArray(b.dataset)&&o();var d=b.hasOwnProperty("dataset")&&b.dataset!=c;if(d){w&&this.page(1),w=!1;var e=function(){h.publishDatasetChanged(v,b.dataset,c)};x?x.push(e):e()}return y("ngTable: set settings",D),this}return D},this.page=function(b){return a.isDefined(b)?this.parameters({page:b}):C.page},this.total=function(b){return a.isDefined(b)?this.settings({total:b}):D.total},this.count=function(b){return a.isDefined(b)?this.parameters({count:b,page:1}):C.count},this.filter=function(b){if(a.isDefined(b)&&a.isObject(b))return this.parameters({filter:b,page:1});if(b===!0){for(var c=Object.keys(C.filter),d={},e=0;ed?6:d,i=[],h=Math.ceil(b/c),h>1){i.push({type:"prev",number:Math.max(1,a-1),active:a>1}),i.push({type:"first",number:1,active:a>1,current:1===a}),f=Math.round((D.paginationMaxBlocks-D.paginationMinBlocks)/2),g=Math.max(2,a-f),e=Math.min(h-1,a+2*f-(a-g)),g=Math.max(2,g-(2*f-(e-g)));for(var j=g;e>=j;)i.push(j===g&&2!==j||j===e&&j!==h-1?{type:"more",active:!1}:{type:"page",number:j,active:a!==j,current:a===j}),j++;i.push({type:"last",number:h,active:a!==h,current:a===h}),i.push({type:"next",number:Math.min(h,a+1),active:h>a})}return i},this.isDataReloadRequired=function(){return!w||!a.equals(m(),t)||n()},this.hasFilter=function(){return Object.keys(this.filter(!0)).length>0},this.hasGroup=function(b,c){return null==b?a.isFunction(C.group)||Object.keys(C.group).length>0:a.isFunction(b)?null==c?C.group===b:C.group===b&&b.sortDirection===c:null==c?-1!==Object.keys(C.group).indexOf(b):C.group[b]===c},this.hasFilterChanges=function(){var b=t&&t.params.filter;return!a.equals(C.filter,b)||n()},this.url=function(b){function c(a,c){b?e.push(c+"="+encodeURIComponent(a)):e[c]=encodeURIComponent(a)}function d(b,c){return"group"===c?!0:a.isDefined(b)&&""!==b}b=b||!1;var e=b?[]:{};for(var f in C)if(C.hasOwnProperty(f)){var g=C[f],h=encodeURIComponent(f);if("object"==typeof g){for(var i in g)if(d(g[i],f)){var j=h+"["+encodeURIComponent(i)+"]";c(g[i],j)}}else!a.isFunction(g)&&d(g,f)&&c(g,h)}return e},this.reload=function(){var c=this,d=null;D.$loading=!0,t=a.copy(m()),w=!0,d=r(c.hasGroup()?q:p),y("ngTable: reload data");var e=c.data;return d.then(function(a){return D.$loading=!1,u=null,c.data=a,h.publishAfterReloadData(c,a,e),c.reloadPages(),D.$scope&&D.$scope.$emit("ngTableAfterReloadData"),a})["catch"](function(a){return u=t,t=null,w=!1,b.reject(a)})},this.hasErrorState=function(){return!(!u||!a.equals(u,m()))},this.reloadPages=function(){var b;return function(){var c=b,d=v.generatePagesArray(v.page(),v.total(),v.count());a.equals(c,d)||(b=d,h.publishPagesChanged(this,d,c))}}();var C={page:1,count:10,filter:{},sorting:{},group:{}};a.extend(C,e.params);var D={$scope:null,$loading:!1,dataset:null,total:0,defaultSort:"desc",filterOptions:a.copy(z),groupOptions:a.copy(A),counts:[10,25,50,100],interceptors:[],paginationMaxBlocks:11,paginationMinBlocks:5,sortingIndicator:"span"};return this.settings(B),this.settings(e.settings),this.settings(j),this.parameters(d,!0),h.publishAfterCreated(this),a.forEach(x,function(a){a()}),x=null,this};return j}]),a.module("ngTable").factory("ngTableParams",["NgTableParams",function(a){return a}])}(),function(){a.module("ngTable").controller("ngTableController",["$scope","NgTableParams","$timeout","$parse","$compile","$attrs","$element","ngTableColumn","ngTableEventsChannel",function(b,c,d,e,f,g,h,i,j){function k(a){if(a&&!b.params.hasErrorState()){b.params.settings().$scope=b;var c=b.params,d=c.settings().filterOptions;if(c.hasFilterChanges()){var e=function(){c.page(1),c.reload()};d.filterDelay?r(e,d.filterDelay):e()}else c.reload()}}function l(){g.showFilter?b.$parent.$watch(g.showFilter,function(a){b.show_filter=a}):b.$watch(o,function(a){b.show_filter=a}),g.disableFilter&&b.$parent.$watch(g.disableFilter,function(a){b.$filterRow.disabled=a})}function m(){if(b.$groupRow={},g.showGroup){var a=e(g.showGroup);b.$parent.$watch(a,function(a){b.$groupRow.show=a}),a.assign&&b.$watch("$groupRow.show",function(c){a.assign(b.$parent,c)})}else b.$watch("params.hasGroup()",function(a){b.$groupRow.show=a})}function n(){return(b.$columns||[]).filter(function(a){return a.show(b)})}function o(){return b.$columns?p(b.$columns,function(a){return a.filter(b)}):!1}function p(a,b){for(var c=!1,d=0;d-1){var b=a.split(/\s+with\s+/);return{tableParams:b[0],columns:b[1]}}throw new Error("Parse error (expected example: ng-table-dynamic='tableParams with cols')")},this.setupBindingsToInternalScope=function(c){var d=e(c);b.$watch(d,function(c){a.isUndefined(c)||(b.paramsModel=d,b.params=c)},!1),l(),m()},q()}])}(),function(){a.module("ngTable").directive("ngTable",["$q","$parse",function(b,c){return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(b){var d,e,f=[],g=0,h=[];return a.forEach(b.find("tr"),function(b){h.push(a.element(b))}),d=h.filter(function(a){return!a.hasClass("ng-table-group")})[0],e=h.filter(function(a){return a.hasClass("ng-table-group")})[0],d?(a.forEach(d.find("td"),function(b){var d=a.element(b);if(!d.attr("ignore-cell")||"true"!==d.attr("ignore-cell")){var h=function(a){return d.attr("x-data-"+a)||d.attr("data-"+a)||d.attr(a)},i=function(a,b){d.attr("x-data-"+a)?d.attr("x-data-"+a,b):d.attr("data"+a)?d.attr("data"+a,b):d.attr(a,b)},j=function(a){var b=h(a);if(!b)return void 0;var d,e=function(a){return void 0!==d?d:c(b)(a)};return e.assign=function(a,e){var f=c(b);f.assign?f.assign(a.$parent,e):d=e},e},k=h("title-alt")||h("title");k&&d.attr("data-title-text","{{"+k+"}}"),f.push({id:g++,title:j("title"),titleAlt:j("title-alt"),headerTitle:j("header-title"),sortable:j("sortable"),"class":j("header-class"),filter:j("filter"),groupable:j("groupable"),headerTemplateURL:j("header"),filterData:j("filter-data"),show:d.attr("ng-if")?j("ng-if"):void 0}),e&&i("ng-if","$columns["+(f.length-1)+"].show(this)")}}),function(a,b,c,d){a.$columns=f=d.buildColumns(f),d.setupBindingsToInternalScope(c.ngTable),d.loadFilterData(f),d.compileDirectiveTemplates()}):void 0}}}])}(),function(){a.module("ngTable").directive("ngTableDynamic",[function(){return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(b){var c;return a.forEach(b.find("tr"),function(b){b=a.element(b),b.hasClass("ng-table-group")||c||(c=b)}),c?(a.forEach(c.find("td"),function(b){var c=a.element(b),d=function(a){return c.attr("x-data-"+a)||c.attr("data-"+a)||c.attr(a)},e=d("title");e||c.attr("data-title-text","{{$columns[$index].titleAlt(this) || $columns[$index].title(this)}}");var f=c.attr("ng-if");f||c.attr("ng-if","$columns[$index].show(this)")}),function(a,b,c,d){var e=d.parseNgTableDynamicExpr(c.ngTableDynamic);d.setupBindingsToInternalScope(e.tableParams),d.compileDirectiveTemplates(),a.$watchCollection(e.columns,function(b){a.$columns=d.buildColumns(b),d.loadFilterData(a.$columns)})}):void 0}}}])}(),function(){function b(a){function b(b,c,d){var e=a(d.ngTableColumnsBinding).assign;e&&b.$watch("$columns",function(a){var c=(a||[]).slice(0);e(b,c)})}var c={restrict:"A",require:"ngTable",link:b};return c}a.module("ngTable").directive("ngTableColumnsBinding",b),b.$inject=["$parse"]}(),function(){a.module("ngTable").directive("ngTablePagination",["$compile","ngTableEventsChannel",function(b,c){return{restrict:"A",scope:{params:"=ngTablePagination",templateUrl:"="},replace:!1,link:function(d,e){c.onAfterReloadData(function(a){d.pages=a.generatePagesArray()},d,function(a){return a===d.params}),d.$watch("templateUrl",function(c){if(!a.isUndefined(c)){var f=a.element(document.createElement("div"));f.attr({"ng-include":"templateUrl"}),e.append(f),b(f)(d)}})}}}])}(),function(){function b(b,c){b.config=c,b.getFilterCellCss=function(a,b){if("horizontal"!==b)return"s12";var c=Object.keys(a).length,d=parseInt(12/c,10);return"s"+d},b.getFilterPlaceholderValue=function(b){return a.isObject(b)?b.placeholder:""}}a.module("ngTable").controller("ngTableFilterRowController",b),b.$inject=["$scope","ngTableFilterConfig"]}(),function(){function b(){var a={restrict:"E",replace:!0,templateUrl:"ng-table/filterRow.html",scope:!0,controller:"ngTableFilterRowController"};return a}a.module("ngTable").directive("ngTableFilterRow",b),b.$inject=[]}(),function(){function b(b){function c(){b.getGroupables=g,b.getGroupTitle=f,b.getVisibleColumns=h,b.groupBy=i,b.isSelectedGroup=j,b.toggleDetail=l,b.$watch("params.group()",k,!0)}function d(){var a;a=b.params.hasGroup(b.$selGroup,"asc")?"desc":b.params.hasGroup(b.$selGroup,"desc")?"":"asc",b.params.group(b.$selGroup,a)}function e(a){return b.$columns.filter(function(c){return c.groupable(b)===a})[0]}function f(c){return a.isFunction(c)?c.title:c.title(b)}function g(){var a=b.$columns.filter(function(a){return a.groupable(b)});return m.concat(a)}function h(){return b.$columns.filter(function(a){return a.show(b)})}function i(a){j(a)?d():b.params.group(a.groupable?a.groupable(b):a)}function j(a){return a.groupable?a.groupable(b)===b.$selGroup:a===b.$selGroup}function k(c){var d=e(b.$selGroup);if(d&&d.show.assign&&d.show.assign(b,!0),a.isFunction(c))m=[c],b.$selGroup=c,b.$selGroupTitle=c.title;else{var f=Object.keys(c||{})[0],g=e(f);g&&(b.$selGroupTitle=g.title(b),b.$selGroup=f,g.show.assign&&g.show.assign(b,!1))}}function l(){return b.params.settings().groupOptions.isExpanded=!b.params.settings().groupOptions.isExpanded,b.params.reload()}var m=[];c()}a.module("ngTable").controller("ngTableGroupRowController",b),b.$inject=["$scope"]}(),function(){function b(){var a={restrict:"E",replace:!0,templateUrl:"ng-table/groupRow.html",scope:!0,controller:"ngTableGroupRowController",controllerAs:"dctrl"};return a}a.module("ngTable").directive("ngTableGroupRow",b),b.$inject=[]}(),function(){function b(a){function b(b,c){var d=b.sortable&&b.sortable();if(d){var e=a.params.settings().defaultSort,f="asc"===e?"desc":"asc",g=a.params.sorting()&&a.params.sorting()[d]&&a.params.sorting()[d]===e,h=c.ctrlKey||c.metaKey?a.params.sorting():{};h[d]=g?f:e,a.params.parameters({sorting:h})}}a.sortBy=b}a.module("ngTable").controller("ngTableSorterRowController",b),b.$inject=["$scope"]}(),function(){function b(){var a={restrict:"E",replace:!0,templateUrl:"ng-table/sorterRow.html",scope:!0,controller:"ngTableSorterRowController"};return a}a.module("ngTable").directive("ngTableSorterRow",b),b.$inject=[]}(),function(){function b(){var a={restrict:"A",controller:c};return a}function c(b,c,d,e){function f(){j=c(d.ngTableSelectFilterDs)(b),b.$watch(function(){return j.data},g)}function g(){i(j).then(function(a){a&&!h(a)&&a.unshift({id:"",title:""}),a=a||[],b.$selectData=a})}function h(a){for(var b,c=0;c
'),a.put("ng-table/filters/number.html",' '),a.put("ng-table/filters/select-multiple.html",' '),a.put("ng-table/filters/select.html",' '),a.put("ng-table/filters/text.html",' '),a.put("ng-table/groupRow.html",' {{$selGroupTitle}} '),a.put("ng-table/header.html"," "),a.put("ng-table/pager.html",' '),a.put("ng-table/sorterRow.html",'
')}]),a.module("ngTable")}); //# sourceMappingURL=ng-table.min.js.map \ No newline at end of file diff --git a/dist/ng-table.min.js.map b/dist/ng-table.min.js.map index 779f9410..71ce29dd 100644 --- a/dist/ng-table.min.js.map +++ b/dist/ng-table.min.js.map @@ -1 +1 @@ -{"version":3,"file":"ng-table.min.js","sources":["ng-table.js"],"names":["angular","factory","define","amd","window","module","value","params","settings","ngTableEventsChannel","$rootScope","addChangeEvent","eventName","target","fnName","charAt","toUpperCase","substring","event","createEventSubscriptionFn","createPublishEventFn","extend","handler","eventSelector","identity","scope","arguments","length","isFunction","$new","isObject","requiredPublisher","publisher","$on","isNullInstance","eventArgs","rest","fnArgs","concat","apply","this","Array","prototype","slice","call","$broadcast","array","n","events","$inject","ngTableFilterConfigProvider","init","resetConfigs","config","defaultConfig","setConfig","customConfig","mergeConfig","aliasUrls","ngTableFilterConfig","getTemplateUrl","filterValue","filterKey","id","indexOf","service","getUrlForAlias","aliasName","defaultBaseUrl","defaultExt","publicConfig","Object","defineProperty","get","copy","enumerable","$get","provider","ngTableDefaultGetDataProvider","ngTableDefaultGetData","$filter","getFilterFn","filterOptions","filterFn","filterFilterName","getOrderByFn","sortingFilterName","applyFilter","data","hasFilter","filter","filterKeys","keys","parsedFilter","reduce","result","key","setPath","filterComparator","applyPaging","pagedData","page","count","total","applySort","orderBy","orderByFn","getData","options","defaultDataOptions","dataOptions","fData","orderedData","obj","path","split","ret","lastKey","parentPathKeys","forEach","hasOwnProperty","ngTableGetDataBcShim","$q","createWrapper","getDataFn","$defer","defer","pData","promise","createDefaults","class","createGetterSetter","groupable","filterData","noop","headerTemplateURL","headerTitle","sortable","show","title","titleAlt","initialValue","getter","assign","$scope","newValue","buildColumn","column","defaultScope","extendedCol","create","defaults","prop","undefined","prop1","getterFn","$log","ngTableDefaults","isNumber","isNaN","parseFloat","isFinite","NgTableParams","baseParameters","baseSettings","parseGroup","group","defaultSort","groupOptions","sortDirection","isString","grp","convertSortToOrderBy","sorting","push","createComparableParams","groupSortDirection","hasGlobalSearchFieldChanges","currentVal","$","previousVal","prevParamsMemento","equals","optimizeFilterDelay","filterDelay","defaultFilterOptions","filterDelayThreshold","defaultFettingsFns","runGetData","getDataFnAdaptor","when","self","runGetGroups","getGroupsFn","getGroupsFnAdaptor","getGroups","runInterceptorPipeline","fetchFn","interceptors","interceptor","thenFn","response","bind","rejectFn","responseError","reject","then","reason","getDefaultSettingFns","dataset","groupFn","groupField","item","originalDataOptions","adaptedFn","gotData","groups","groupName","$hideRows","isExpanded","i","errParamsMemento","isCommittedDataset","log","debugMode","debug","filterLayout","defaultGroupOptions","parameters","newParameters","parseParamsFromUrl","isDefined","reverse","len","name","v","newSettings","isArray","originalDataset","hasDatasetChanged","publishDatasetChanged","significantFilter","groupArray","sortArray","isSortBy","field","direction","generatePagesArray","currentPage","totalItems","pageSize","maxBlocks","maxPage","maxPivotPages","minPage","numPages","pages","Math","ceil","type","number","max","active","current","round","paginationMaxBlocks","paginationMinBlocks","min","isDataReloadRequired","hasGroup","hasFilterChanges","previousFilter","url","asString","collectValue","pairs","encodeURIComponent","isSignificantValue","subkey","pname","reload","$loading","oldData","publishAfterReloadData","reloadPages","$emit","hasErrorState","currentPages","oldPages","newPages","publishPagesChanged","counts","sortingIndicator","publishAfterCreated","controller","$timeout","$parse","$compile","$attrs","$element","ngTableColumn","onDataReloadStatusChange","newStatus","currentParams","delayFilter","getVisibleColumns","$columns","c","commonInit","bindDataToScope","newDatapage","$groups","visibleColumnCount","$data","bindPagesToScope","isMyPublisher","onAfterReloadData","onPagesChanged","$filterRow","timer","callback","ms","cancel","$watch","newParams","oldParams","compileDirectiveTemplates","hasClass","templates","header","templateHeader","pagination","templatePagination","addClass","headerTemplate","theadFound","children","e","tagName","element","document","createElement","attr","prepend","paginationTemplate","ng-table-pagination","template-url","after","loadFilterData","$column","buildColumns","columns","map","col","parseNgTableDynamicExpr","parts","tableParams","Error","setupBindingsToInternalScope","tableParamsExpr","tableParamsGetter","isUndefined","paramsModel","showFilter","$parent","show_filter","$groupRow","showGroup","showGroupGetter","disableFilter","disabled","directive","restrict","priority","compile","dataRow","groupRow","rows","find","tr","el","getAttrValue","setAttrValue","parsedAttribute","expr","localValue","locals","parsedExpr","titleExpr","attrs","ngTable","tElement","row","showExpr","ngTableDynamic","$watchCollection","newCols","ngTableColumnsBinding","linkFn","setter","newColumns","shallowClone","require","link","templateUrl","replace","pubParams","template","ng-include","append","ngTableFilterRowController","getFilterCellCss","layout","size","width","parseInt","getFilterPlaceholderValue","placeholder","ngTableFilterRow","ngTableGroupRowController","getGroupables","getGroupTitle","groupBy","isSelectedGroup","toggleDetail","setGroup","changeSortDirection","newDirection","$selGroup","findGroupColumn","groupKey","groupableCols","groupFns","existingGroupCol","$selGroupTitle","groupedColumn","ngTableGroupRow","controllerAs","ngTableSorterRowController","sortBy","parsedSortable","inverseSort","sortingParams","ctrlKey","metaKey","ngTableSorterRow","ngTableSelectFilterDs","ngTableSelectFilterDsController","bindDataSource","getSelectListData","hasEmptyOption","unshift","$selectData","isMatch","run","$templateCache","put"],"mappings":";;CAAC,SAASA,EAASC,GACf,YAEA,OAAsB,kBAAXC,SAAyBA,OAAOC,QACvCD,SAAQ,WAAY,SAASF,GACzB,MAAOC,GAAQD,KAGZC,EAAQD,IAErBI,OAAOJ,SAAW,KAAM,SAASA,GAC/B,YAkpEA,OAxoEJ,YAMIA,EAAQK,OAAO,iBAWnB,WAOIL,EAAQK,OAAO,WACVC,MAAM,mBACHC,UACAC,iBAYZ,WAoBI,QAASC,GAAqBC,GAW1B,QAASC,GAAeC,EAAWC,GAC/B,GAAIC,GAASF,EAAUG,OAAO,GAAGC,cAAgBJ,EAAUK,UAAU,GACjEC,IAGJ,OAFAA,GAAM,KAAOJ,GAAUK,EAA0BP,GACjDM,EAAM,UAAYJ,GAAUM,EAAqBR,GAC1CZ,EAAQqB,OAAOR,EAAQK,GAGlC,QAASC,GAA0BP,GAE/B,MAAO,UAAsBU,GACzB,GAAIC,GAAgBvB,EAAQwB,SACxBC,EAAQf,CAcZ,IAZyB,IAArBgB,UAAUC,OACN3B,EAAQ4B,WAAWF,UAAU,GAAGG,MAChCJ,EAAQC,UAAU,GAElBH,EAAgB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AgC,mSACnDD,EAAeC,IAAI,6BAA8B,wMACjDD,EAAeC,IAAI,yBAA0B,kuCAC7CD,EAAeC,IAAI,uBAAwB,sIAC3CD,EAAeC,IAAI,sBAAuB,gpCAC1CD,EAAeC,IAAI,0BAA2B,iwBAEpCxc,EAAQK,OAAO"} \ No newline at end of file +{"version":3,"file":"ng-table.min.js","sources":["ng-table.js"],"names":["angular","factory","define","amd","window","module","value","params","settings","ngTableEventsChannel","$rootScope","addChangeEvent","eventName","target","fnName","charAt","toUpperCase","substring","event","createEventSubscriptionFn","createPublishEventFn","extend","handler","eventSelector","identity","scope","arguments","length","isFunction","$new","isObject","requiredPublisher","publisher","$on","isNullInstance","eventArgs","rest","fnArgs","concat","apply","this","Array","prototype","slice","call","$broadcast","array","n","events","$inject","ngTableFilterConfigProvider","init","resetConfigs","config","defaultConfig","setConfig","customConfig","mergeConfig","aliasUrls","ngTableFilterConfig","getTemplateUrl","filterValue","filterKey","id","indexOf","service","getUrlForAlias","aliasName","defaultBaseUrl","defaultExt","publicConfig","Object","defineProperty","get","copy","enumerable","$get","provider","ngTableDefaultGetDataProvider","ngTableDefaultGetData","$filter","getFilterFn","filterOptions","filterFn","filterFilterName","getOrderByFn","sortingFilterName","applyFilter","data","hasFilter","filter","filterKeys","keys","parsedFilter","reduce","result","key","setPath","filterComparator","applyPaging","pagedData","page","count","total","applySort","orderBy","orderByFn","getData","options","defaultDataOptions","dataOptions","fData","orderedData","obj","path","split","ret","lastKey","parentPathKeys","forEach","hasOwnProperty","ngTableGetDataBcShim","$q","createWrapper","getDataFn","$defer","defer","pData","promise","createDefaults","class","createGetterSetter","groupable","filterData","noop","headerTemplateURL","headerTitle","sortable","show","title","titleAlt","initialValue","getter","assign","$scope","newValue","buildColumn","column","defaultScope","columns","extendedCol","create","defaults","prop","undefined","prop1","getterFn","context","$column","$columns","$log","ngTableDefaults","isNumber","isNaN","parseFloat","isFinite","NgTableParams","baseParameters","baseSettings","parseGroup","group","defaultSort","groupOptions","sortDirection","isString","grp","convertSortToOrderBy","sorting","push","createComparableParams","groupSortDirection","hasGlobalSearchFieldChanges","currentVal","$","previousVal","prevParamsMemento","equals","optimizeFilterDelay","filterDelay","defaultFilterOptions","filterDelayThreshold","defaultFettingsFns","runGetData","getDataFnAdaptor","when","self","runGetGroups","getGroupsFn","getGroupsFnAdaptor","getGroups","runInterceptorPipeline","fetchFn","interceptors","interceptor","thenFn","response","bind","rejectFn","responseError","reject","then","reason","getDefaultSettingFns","dataset","groupFn","groupField","item","originalDataOptions","adaptedFn","gotData","groups","groupName","$hideRows","isExpanded","i","errParamsMemento","isCommittedDataset","initialEvents","log","debugMode","debug","filterLayout","defaultGroupOptions","parameters","newParameters","parseParamsFromUrl","isDefined","reverse","len","name","v","newSettings","isArray","originalDataset","hasDatasetChanged","fireEvent","publishDatasetChanged","significantFilter","groupArray","sortArray","isSortBy","field","direction","generatePagesArray","currentPage","totalItems","pageSize","maxBlocks","maxPage","maxPivotPages","minPage","numPages","pages","Math","ceil","type","number","max","active","current","round","paginationMaxBlocks","paginationMinBlocks","min","isDataReloadRequired","hasGroup","hasFilterChanges","previousFilter","url","asString","collectValue","pairs","encodeURIComponent","isSignificantValue","subkey","pname","reload","$loading","oldData","publishAfterReloadData","reloadPages","$emit","hasErrorState","currentPages","oldPages","newPages","publishPagesChanged","counts","sortingIndicator","publishAfterCreated","controller","$timeout","$parse","$compile","$attrs","$element","ngTableColumn","onDataReloadStatusChange","newStatus","currentParams","delayFilter","setupFilterRowBindingsToInternalScope","showFilter","$parent","$watch","show_filter","hasFilterColumn","disableFilter","$filterRow","disabled","setupGroupRowBindingsToInternalScope","$groupRow","showGroup","showGroupGetter","getVisibleColumns","c","some","predicate","found","commonInit","bindDataToScope","newDatapage","$groups","visibleColumnCount","$data","bindPagesToScope","isMyPublisher","onAfterReloadData","onPagesChanged","timer","callback","ms","cancel","newParams","oldParams","compileDirectiveTemplates","hasClass","templates","header","templateHeader","pagination","templatePagination","addClass","headerTemplate","theadFound","children","e","tagName","element","document","createElement","attr","prepend","paginationTemplate","ng-table-pagination","template-url","after","loadFilterData","buildColumns","col","parseNgTableDynamicExpr","parts","tableParams","Error","setupBindingsToInternalScope","tableParamsExpr","tableParamsGetter","isUndefined","paramsModel","directive","restrict","priority","compile","dataRow","groupRow","rows","find","tr","el","getAttrValue","setAttrValue","parsedAttribute","expr","localValue","parsedExpr","titleExpr","attrs","ngTable","tElement","row","showExpr","ngTableDynamic","$watchCollection","newCols","ngTableColumnsBinding","linkFn","setter","newColumns","shallowClone","require","link","templateUrl","replace","pubParams","template","ng-include","append","ngTableFilterRowController","getFilterCellCss","layout","size","width","parseInt","getFilterPlaceholderValue","placeholder","ngTableFilterRow","ngTableGroupRowController","getGroupables","getGroupTitle","groupBy","isSelectedGroup","toggleDetail","setGroup","changeSortDirection","newDirection","$selGroup","findGroupColumn","groupKey","groupableCols","groupFns","existingGroupCol","$selGroupTitle","groupedColumn","ngTableGroupRow","controllerAs","ngTableSorterRowController","sortBy","parsedSortable","inverseSort","sortingParams","ctrlKey","metaKey","ngTableSorterRow","ngTableSelectFilterDs","ngTableSelectFilterDsController","bindDataSource","getSelectListData","hasEmptyOption","unshift","$selectData","isMatch","run","$templateCache","put"],"mappings":";;CAAC,SAASA,EAASC,GACf,YAEA,OAAsB,kBAAXC,SAAyBA,OAAOC,QACvCD,SAAQ,WAAY,SAASF,GACzB,MAAOC,GAAQD,KAGZC,EAAQD,IAErBI,OAAOJ,SAAW,KAAM,SAASA,GAC/B,YAosEA,OA1rEJ,YAMIA,EAAQK,OAAO,iBAWnB,WAOIL,EAAQK,OAAO,WACVC,MAAM,mBACHC,UACAC,iBAYZ,WAoBI,QAASC,GAAqBC,GAW1B,QAASC,GAAeC,EAAWC,GAC/B,GAAIC,GAASF,EAAUG,OAAO,GAAGC,cAAgBJ,EAAUK,UAAU,GACjEC,IAGJ,OAFAA,GAAM,KAAOJ,GAAUK,EAA0BP,GACjDM,EAAM,UAAYJ,GAAUM,EAAqBR,GAC1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0K,OAAO,WACV,MAAO5J,GAAQtE,MAChB+W,GAGP,QAASA,KACLC,EAAkB1S,GAASoD,KAAK,SAAS1H,GACjCA,IAASiX,EAAejX,IACxBA,EAAKkX,SAAU3Y,GAAI,GAAI4E,MAAO,KAElCnD,EAAOA,MACPwD,EAAO2T,YAAcnX,IAI7B,QAASiX,GAAejX,GAEpB,IAAK,GADDoX,GACK5O,EAAI,EAAGA,EAAIxI,EAAK7D,OAAQqM,IAAK,CAClC,GAAIR,GAAOhI,EAAKwI,EAChB,IAAIR,GAAoB,KAAZA,EAAKzJ,GAAW,CACxB6Y,GAAU,CACV,QAGR,MAAOA,GAGX,QAASJ,GAAkB1S,GACvB,GAAItE,GAAOxF,EAAQ4B,WAAWkI,EAAQtE,MAAQsE,EAAQtE,OAASsE,EAAQtE,IACvE,OAAOkC,GAAGwE,KAAK1G,GAlCnB,GAAIsE,KACJ3G,KApBJnD,EAAQK,OAAO,WACVsX,UAAU,wBAAyB0E,GAExCA,EAAsBpZ,WAatBqZ,EAAgCrZ,SAAW,SAAU,SAAU,SAAU,SA0C7EjD,EAAQK,OAAO,WAAWwc,KAAK,iBAAkB,SAAUC,GAC1DA,EAAeC,IAAI,0BAA2B,ilBAC9CD,EAAeC,IAAI,+BAAgC,0MACnDD,EAAeC,IAAI,wCAAyC,qPAC5DD,EAAeC,IAAI,+BAAgC,mSACnDD,EAAeC,IAAI,6BAA8B,wMACjDD,EAAeC,IAAI,yBAA0B,kuCAC7CD,EAAeC,IAAI,uBAAwB,sIAC3CD,EAAeC,IAAI,sBAAuB,gpCAC1CD,EAAeC,IAAI,0BAA2B,iwBAEpC/c,EAAQK,OAAO"} \ No newline at end of file diff --git a/package.json b/package.json index 150a4046..5899352e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng-table", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "author": "Vitalii Savchuk ", "license": "BSD", "repository": {