From 2a03961cd014c37a1233083e225eea48e66c6bf0 Mon Sep 17 00:00:00 2001 From: Andrew Heys Date: Thu, 16 Jun 2016 10:34:25 -0400 Subject: [PATCH 1/2] Fixed bug on reload with empty page --- dist/ng-table.js | 6 ++++-- dist/ng-table.min.js | 2 +- dist/ng-table.min.js.map | 2 +- src/scripts/ngTableParams.js | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dist/ng-table.js b/dist/ng-table.js index 3d7358b6..cabd7208 100644 --- a/dist/ng-table.js +++ b/dist/ng-table.js @@ -1151,6 +1151,10 @@ if (!angular.equals(oldPages, newPages)){ currentPages = newPages; ngTableEventsChannel.publishPagesChanged(this, newPages, oldPages); + + if (self.data && self.data.length === 0 && self.total() > 0) { + self.page(self.page() - 1); + } } } })(); @@ -1343,8 +1347,6 @@ }]); })(); - - /** * ngTable: Table + Angular JS * diff --git a/dist/ng-table.min.js b/dist/ng-table.min.js index bfedf049..cb0ce1cc 100644 --- a/dist/ng-table.min.js +++ b/dist/ng-table.min.js @@ -1,4 +1,4 @@ /*! ngTable v1.0.0-beta.9 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(b,d,f){var g=Object.create(b),h=c();for(var i in h)void 0===g[i]&&(g[i]=h[i]),a.isFunction(g[i])||!function(a){var c=function d(){return 1!==arguments.length||e(arguments[0])?b[a]:void d.assign(null,arguments[0])};c.assign=function(c,d){b[a]=d},g[a]=c}(i),function(c){var h=g[c];g[c]=function(){if(1!==arguments.length||e(arguments[0])){var c=arguments[0]||d,i=Object.create(c);return a.extend(i,{$column:g,$columns:f}),h.call(b,i)}h.assign(null,arguments[0])},h.assign&&(g[c].assign=h.assign)}(i);return g}function c(){return{"class":d(""),filter:d(!1),groupable:d(!1),filterData:a.noop,headerTemplateURL:d(!1),headerTitle:d(""),sortable:d(!1),show:d(!0),title:d(""),titleAlt:d("")}}function d(a){var b=a,c=function d(){return 1!==arguments.length||e(arguments[0])?b:void d.assign(null,arguments[0])};return c.assign=function(a,c){b=c},c}function e(b){return null!=b&&a.isFunction(b.$new)}return{buildColumn:b}}])}(),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,f=c.group(),h=void 0;if(a.isFunction(f))d=f,h=f.sortDirection;else{var i=Object.keys(f)[0];h=f[i],d=function(a){return e(a,i)}}var j=c.settings(),k=j.dataOptions;j.dataOptions={applyPaging:!1};var m=j.getDataFnAdaptor(j.getData),n=b.when(m.call(j,c));return n.then(function(b){var e={};a.forEach(b,function(a){var b=d(a);e[b]=e[b]||{data:[],$hideRows:!j.groupOptions.isExpanded,value:b},e[b].data.push(a)});var f=[];for(var i in e)f.push(e[i]);if(h){var k=g.getOrderByFn(),m=l({value:h});f=k(f,m)}return g.applyPaging(f,c)})["finally"](function(){j.dataOptions=k})}function e(a,b){return"string"==typeof b&&(b=b.split(".")),void 0===a?void 0:0===b.length?a:null===a?void 0:e(a[b[0]],b.slice(1))}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,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.show(b)&&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||d.attr("ng-if"))&&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(b,d,f){var g=Object.create(b),h=c();for(var i in h)void 0===g[i]&&(g[i]=h[i]),a.isFunction(g[i])||!function(a){var c=function d(){return 1!==arguments.length||e(arguments[0])?b[a]:void d.assign(null,arguments[0])};c.assign=function(c,d){b[a]=d},g[a]=c}(i),function(c){var h=g[c];g[c]=function(){if(1!==arguments.length||e(arguments[0])){var c=arguments[0]||d,i=Object.create(c);return a.extend(i,{$column:g,$columns:f}),h.call(b,i)}h.assign(null,arguments[0])},h.assign&&(g[c].assign=h.assign)}(i);return g}function c(){return{"class":d(""),filter:d(!1),groupable:d(!1),filterData:a.noop,headerTemplateURL:d(!1),headerTitle:d(""),sortable:d(!1),show:d(!0),title:d(""),titleAlt:d("")}}function d(a){var b=a,c=function d(){return 1!==arguments.length||e(arguments[0])?b:void d.assign(null,arguments[0])};return c.assign=function(a,c){b=c},c}function e(b){return null!=b&&a.isFunction(b.$new)}return{buildColumn:b}}])}(),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,f=c.group(),h=void 0;if(a.isFunction(f))d=f,h=f.sortDirection;else{var i=Object.keys(f)[0];h=f[i],d=function(a){return e(a,i)}}var j=c.settings(),k=j.dataOptions;j.dataOptions={applyPaging:!1};var m=j.getDataFnAdaptor(j.getData),n=b.when(m.call(j,c));return n.then(function(b){var e={};a.forEach(b,function(a){var b=d(a);e[b]=e[b]||{data:[],$hideRows:!j.groupOptions.isExpanded,value:b},e[b].data.push(a)});var f=[];for(var i in e)f.push(e[i]);if(h){var k=g.getOrderByFn(),m=l({value:h});f=k(f,m)}return g.applyPaging(f,c)})["finally"](function(){j.dataOptions=k})}function e(a,b){return"string"==typeof b&&(b=b.split(".")),void 0===a?void 0:0===b.length?a:null===a?void 0:e(a[b[0]],b.slice(1))}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,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),v.data&&0===v.data.length&&v.total()>0&&v.page(v.page()-1))}}();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.show(b)&&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||d.attr("ng-if"))&&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 684dcec5..2e02433d 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","buildColumn","column","defaultScope","columns","extendedCol","create","defaults","createDefaults","prop","undefined","prop1","getterSetter","isScopeLike","assign","$scope","getterFn","context","$column","$columns","class","createGetterSetter","groupable","filterData","noop","headerTemplateURL","headerTitle","sortable","show","title","titleAlt","initialValue","newValue","object","$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","defaultSettingsFns","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","getPath","originalDataOptions","adaptedFn","gotData","groups","groupName","$hideRows","isExpanded","i","ks","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","hasVisibleFilterColumn","disableFilter","$filterRow","disabled","setupGroupRowBindingsToInternalScope","$groupRow","showGroup","showGroupGetter","getVisibleColumns","c","some","predicate","found","commonInit","bindDataToScope","newDatapage","visibleColumns","$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","getter","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,EA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,IACxBA,EAAKwX,SAAUjZ,GAAI,GAAI8F,MAAO,KAElCrE,EAAOA,MACPuD,EAAOkU,YAAczX,IAI7B,QAASuX,GAAevX,GAEpB,IAAK,GADD0X,GACK/O,EAAI,EAAGA,EAAI3I,EAAK7D,OAAQwM,IAAK,CAClC,GAAIT,GAAOlI,EAAK2I,EAChB,IAAIT,GAAoB,KAAZA,EAAK3J,GAAW,CACxBmZ,GAAU,CACV,QAGR,MAAOA,GAGX,QAASJ,GAAkB5T,GACvB,GAAI1D,GAAOxF,EAAQ4B,WAAWsH,EAAQ1D,MAAQ0D,EAAQ1D,OAAS0D,EAAQ1D,IACvE,OAAOkC,GAAG0E,KAAK5G,GAlCnB,GAAI0D,KACJ/F,KApBJnD,EAAQK,OAAO,WACV2X,UAAU,wBAAyB2E,GAExCA,EAAsB1Z,WAatB2Z,EAAgC3Z,SAAW,SAAU,SAAU,SAAU,SA0C7EjD,EAAQK,OAAO,WAAW8c,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,iwBAEpCrd,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","buildColumn","column","defaultScope","columns","extendedCol","create","defaults","createDefaults","prop","undefined","prop1","getterSetter","isScopeLike","assign","$scope","getterFn","context","$column","$columns","class","createGetterSetter","groupable","filterData","noop","headerTemplateURL","headerTitle","sortable","show","title","titleAlt","initialValue","newValue","object","$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","defaultSettingsFns","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","getPath","originalDataOptions","adaptedFn","gotData","groups","groupName","$hideRows","isExpanded","i","ks","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","hasVisibleFilterColumn","disableFilter","$filterRow","disabled","setupGroupRowBindingsToInternalScope","$groupRow","showGroup","showGroupGetter","getVisibleColumns","c","some","predicate","found","commonInit","bindDataToScope","newDatapage","visibleColumns","$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","getter","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,YA+uEA,OAruEJ,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,EAAgBG,UAAU,GAEvBA,UAAUC,OAAS,IAC1BF,EAAQC,UAAU,GAClBH,EAAgBG,UAAU,IAI1B1B,EAAQ8B,SAASP,GAAgB,CACjC,GAAIQ,GAAoBR,CACxBA,GAAgB,SAASS,GACrB,MAAOA,KAAcD,GAI7B,MAAON,GAAMQ,IAAI,WAAarB,EAAW,SAASM,EAAOX,GAErD,IAAIA,EA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uCAC7CD,EAAeC,IAAI,uBAAwB,sIAC3CD,EAAeC,IAAI,sBAAuB,gpCAC1CD,EAAeC,IAAI,0BAA2B,iwBAEpCrd,EAAQK,OAAO"} \ No newline at end of file diff --git a/src/scripts/ngTableParams.js b/src/scripts/ngTableParams.js index 52ad0e8e..a8d4bac3 100644 --- a/src/scripts/ngTableParams.js +++ b/src/scripts/ngTableParams.js @@ -619,6 +619,10 @@ if (!angular.equals(oldPages, newPages)){ currentPages = newPages; ngTableEventsChannel.publishPagesChanged(this, newPages, oldPages); + + if (self.data && self.data.length === 0 && self.total() > 0) { + self.page(self.page() - 1); + } } } })(); @@ -810,5 +814,3 @@ return NgTableParams; }]); })(); - - From d92519e854ffd8ed9dc32906295f64af5873cfd3 Mon Sep 17 00:00:00 2001 From: Andrew Heys Date: Thu, 15 Sep 2016 13:27:47 -0400 Subject: [PATCH 2/2] Changed pagination to reset to first page --- dist/ng-table.js | 2 +- dist/ng-table.min.js | 2 +- dist/ng-table.min.js.map | 2 +- src/scripts/ngTableParams.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/ng-table.js b/dist/ng-table.js index cabd7208..67e1ffa2 100644 --- a/dist/ng-table.js +++ b/dist/ng-table.js @@ -1153,7 +1153,7 @@ ngTableEventsChannel.publishPagesChanged(this, newPages, oldPages); if (self.data && self.data.length === 0 && self.total() > 0) { - self.page(self.page() - 1); + self.page(1); } } } diff --git a/dist/ng-table.min.js b/dist/ng-table.min.js index cb0ce1cc..1ef60c85 100644 --- a/dist/ng-table.min.js +++ b/dist/ng-table.min.js @@ -1,4 +1,4 @@ /*! ngTable v1.0.0-beta.9 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(b,d,f){var g=Object.create(b),h=c();for(var i in h)void 0===g[i]&&(g[i]=h[i]),a.isFunction(g[i])||!function(a){var c=function d(){return 1!==arguments.length||e(arguments[0])?b[a]:void d.assign(null,arguments[0])};c.assign=function(c,d){b[a]=d},g[a]=c}(i),function(c){var h=g[c];g[c]=function(){if(1!==arguments.length||e(arguments[0])){var c=arguments[0]||d,i=Object.create(c);return a.extend(i,{$column:g,$columns:f}),h.call(b,i)}h.assign(null,arguments[0])},h.assign&&(g[c].assign=h.assign)}(i);return g}function c(){return{"class":d(""),filter:d(!1),groupable:d(!1),filterData:a.noop,headerTemplateURL:d(!1),headerTitle:d(""),sortable:d(!1),show:d(!0),title:d(""),titleAlt:d("")}}function d(a){var b=a,c=function d(){return 1!==arguments.length||e(arguments[0])?b:void d.assign(null,arguments[0])};return c.assign=function(a,c){b=c},c}function e(b){return null!=b&&a.isFunction(b.$new)}return{buildColumn:b}}])}(),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,f=c.group(),h=void 0;if(a.isFunction(f))d=f,h=f.sortDirection;else{var i=Object.keys(f)[0];h=f[i],d=function(a){return e(a,i)}}var j=c.settings(),k=j.dataOptions;j.dataOptions={applyPaging:!1};var m=j.getDataFnAdaptor(j.getData),n=b.when(m.call(j,c));return n.then(function(b){var e={};a.forEach(b,function(a){var b=d(a);e[b]=e[b]||{data:[],$hideRows:!j.groupOptions.isExpanded,value:b},e[b].data.push(a)});var f=[];for(var i in e)f.push(e[i]);if(h){var k=g.getOrderByFn(),m=l({value:h});f=k(f,m)}return g.applyPaging(f,c)})["finally"](function(){j.dataOptions=k})}function e(a,b){return"string"==typeof b&&(b=b.split(".")),void 0===a?void 0:0===b.length?a:null===a?void 0:e(a[b[0]],b.slice(1))}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,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),v.data&&0===v.data.length&&v.total()>0&&v.page(v.page()-1))}}();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.show(b)&&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||d.attr("ng-if"))&&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(b,d,f){var g=Object.create(b),h=c();for(var i in h)void 0===g[i]&&(g[i]=h[i]),a.isFunction(g[i])||!function(a){var c=function d(){return 1!==arguments.length||e(arguments[0])?b[a]:void d.assign(null,arguments[0])};c.assign=function(c,d){b[a]=d},g[a]=c}(i),function(c){var h=g[c];g[c]=function(){if(1!==arguments.length||e(arguments[0])){var c=arguments[0]||d,i=Object.create(c);return a.extend(i,{$column:g,$columns:f}),h.call(b,i)}h.assign(null,arguments[0])},h.assign&&(g[c].assign=h.assign)}(i);return g}function c(){return{"class":d(""),filter:d(!1),groupable:d(!1),filterData:a.noop,headerTemplateURL:d(!1),headerTitle:d(""),sortable:d(!1),show:d(!0),title:d(""),titleAlt:d("")}}function d(a){var b=a,c=function d(){return 1!==arguments.length||e(arguments[0])?b:void d.assign(null,arguments[0])};return c.assign=function(a,c){b=c},c}function e(b){return null!=b&&a.isFunction(b.$new)}return{buildColumn:b}}])}(),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,f=c.group(),h=void 0;if(a.isFunction(f))d=f,h=f.sortDirection;else{var i=Object.keys(f)[0];h=f[i],d=function(a){return e(a,i)}}var j=c.settings(),k=j.dataOptions;j.dataOptions={applyPaging:!1};var m=j.getDataFnAdaptor(j.getData),n=b.when(m.call(j,c));return n.then(function(b){var e={};a.forEach(b,function(a){var b=d(a);e[b]=e[b]||{data:[],$hideRows:!j.groupOptions.isExpanded,value:b},e[b].data.push(a)});var f=[];for(var i in e)f.push(e[i]);if(h){var k=g.getOrderByFn(),m=l({value:h});f=k(f,m)}return g.applyPaging(f,c)})["finally"](function(){j.dataOptions=k})}function e(a,b){return"string"==typeof b&&(b=b.split(".")),void 0===a?void 0:0===b.length?a:null===a?void 0:e(a[b[0]],b.slice(1))}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,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),v.data&&0===v.data.length&&v.total()>0&&v.page(1))}}();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.show(b)&&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||d.attr("ng-if"))&&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 2e02433d..ee4ca0af 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","buildColumn","column","defaultScope","columns","extendedCol","create","defaults","createDefaults","prop","undefined","prop1","getterSetter","isScopeLike","assign","$scope","getterFn","context","$column","$columns","class","createGetterSetter","groupable","filterData","noop","headerTemplateURL","headerTitle","sortable","show","title","titleAlt","initialValue","newValue","object","$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","defaultSettingsFns","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","getPath","originalDataOptions","adaptedFn","gotData","groups","groupName","$hideRows","isExpanded","i","ks","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","hasVisibleFilterColumn","disableFilter","$filterRow","disabled","setupGroupRowBindingsToInternalScope","$groupRow","showGroup","showGroupGetter","getVisibleColumns","c","some","predicate","found","commonInit","bindDataToScope","newDatapage","visibleColumns","$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","getter","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,YA+uEA,OAruEJ,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,EAAgBG,UAAU,GAEvBA,UAAUC,OAAS,IAC1BF,EAAQC,UAAU,GAClBH,EAAgBG,UAAU,IAI1B1B,EAAQ8B,SAASP,GAAgB,CACjC,GAAIQ,GAAoBR,CACxBA,GAAgB,SAASS,GACrB,MAAOA,KAAcD,GAI7B,MAAON,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DD,EAAeC,IAAI,6BAA8B,wMACjDD,EAAeC,IAAI,yBAA0B,kuCAC7CD,EAAeC,IAAI,uBAAwB,sIAC3CD,EAAeC,IAAI,sBAAuB,gpCAC1CD,EAAeC,IAAI,0BAA2B,iwBAEpCrd,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","buildColumn","column","defaultScope","columns","extendedCol","create","defaults","createDefaults","prop","undefined","prop1","getterSetter","isScopeLike","assign","$scope","getterFn","context","$column","$columns","class","createGetterSetter","groupable","filterData","noop","headerTemplateURL","headerTitle","sortable","show","title","titleAlt","initialValue","newValue","object","$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","defaultSettingsFns","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","getPath","originalDataOptions","adaptedFn","gotData","groups","groupName","$hideRows","isExpanded","i","ks","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","hasVisibleFilterColumn","disableFilter","$filterRow","disabled","setupGroupRowBindingsToInternalScope","$groupRow","showGroup","showGroupGetter","getVisibleColumns","c","some","predicate","found","commonInit","bindDataToScope","newDatapage","visibleColumns","$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","getter","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,YA+uEA,OAruEJ,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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F,EAAQ4B,WAAWsH,EAAQ1D,MAAQ0D,EAAQ1D,OAAS0D,EAAQ1D,IACvE,OAAOkC,GAAG0E,KAAK5G,GAlCnB,GAAI0D,KACJ/F,KApBJnD,EAAQK,OAAO,WACV2X,UAAU,wBAAyB2E,GAExCA,EAAsB1Z,WAatB2Z,EAAgC3Z,SAAW,SAAU,SAAU,SAAU,SA0C7EjD,EAAQK,OAAO,WAAW8c,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,iwBAEpCrd,EAAQK,OAAO"} \ No newline at end of file diff --git a/src/scripts/ngTableParams.js b/src/scripts/ngTableParams.js index a8d4bac3..b2cfa7ff 100644 --- a/src/scripts/ngTableParams.js +++ b/src/scripts/ngTableParams.js @@ -621,7 +621,7 @@ ngTableEventsChannel.publishPagesChanged(this, newPages, oldPages); if (self.data && self.data.length === 0 && self.total() > 0) { - self.page(self.page() - 1); + self.page(1); } } }