angular-ui-scroll
Advanced tools
Comparing version 1.7.1 to 1.7.2
/*! | ||
* angular-ui-scroll | ||
* https://github.com/angular-ui/ui-scroll | ||
* Version: 1.7.1 -- 2018-04-13T16:09:50.195Z | ||
* Version: 1.7.2 -- 2018-07-26T04:32:37.367Z | ||
* License: MIT | ||
@@ -141,3 +141,3 @@ */ | ||
this.applyLayout = function (layout) { | ||
this.css = Object.assign({}, layout.css); | ||
this.css = angular.extend({}, layout.css); | ||
this.mapTo = layout.mapTo; | ||
@@ -270,3 +270,3 @@ applyCss(this.header, this.css); | ||
index: index, | ||
css: Object.assign({}, column.css), | ||
css: angular.extend({}, column.css), | ||
mapTo: column.mapTo | ||
@@ -273,0 +273,0 @@ }); |
/*! | ||
* angular-ui-scroll | ||
* https://github.com/angular-ui/ui-scroll | ||
* Version: 1.7.1 -- 2018-04-13T16:09:50.195Z | ||
* Version: 1.7.2 -- 2018-07-26T04:32:37.367Z | ||
* License: MIT | ||
*/ | ||
!function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=7)}({7:function(t,n,r){"use strict";angular.module("ui.scroll.grid",[]).directive("uiScrollTh",["$log","$timeout",function(t,n){function r(t){this.getLayout=function(){return t.getLayout()},this.applyLayout=function(n){return t.applyLayout(n)},this.columnFromPoint=function(n,r){return t.columnFromPoint(n,r)},Object.defineProperty(this,"columns",{get:function(){return t.getColumns()}})}function e(t,n){this.css=function(){var r=arguments[0],e=arguments[1];if(1==arguments.length)return n.header.css(r);2==arguments.length&&(n.header.css(r,e),t.forEachRow(function(t){return t[n.id].css(r,e)}),n.css[r]=e)},this.moveBefore=function(r){return t.moveBefore(n,r)},this.exchangeWith=function(r){return t.exchangeWith(n,r)},Object.defineProperty(this,"columnId",{get:function(){return n.id}})}function o(t,n,r){function e(t,n,r){var e=t.offset();return!(n<e.left||e.left+t.outerWidth(!0)<n)&&!(r<e.top||e.top+t.outerHeight(!0)<r)}function o(t,n){t.detach(),n.before(t)}function i(t){var n=t.parent();t.detach(),n.append(t)}function u(t,n){t.removeAttr("style");for(var r in n)n.hasOwnProperty(r)&&t.css(r,n[r])}this.header=r,this.css={},this.mapTo=n.length,this.id=n.length,this.applyLayout=function(t){this.css=Object.assign({},t.css),this.mapTo=t.mapTo,u(this.header,this.css)},this.moveBefore=function(n){var e=this;n?(o(r,n.header),t.forEachRow(function(t){return o(t[e.id],t[n.id])})):(i(r),t.forEachRow(function(t){return i(t[e.id])}))},this.columnFromPoint=function(n,o){var i=this;if(e(r,n,o))return this;var u=null;return t.forEachRow(function(t){return u=e(t[i.id],n,o)?i:u}),u},this.applyCss=function(t){u(t,this.css)}}function i(t){function i(t){var n=t[0].parent(),r=[];t.forEach(function(n,e){c[e].applyCss(n),r[c[e].mapTo]=t[e],t[e].detach()}),r.forEach(function(t){return n.append(t)})}var u=this,c=[],a=new Map;n(function(){t.adapter.publicContext.gridAdapter=new r(u),t.adapter.transform=function(t,n){return i(a.get(t))}}),this.registerColumn=function(t){c.push(new o(this,c,t))},this.registerCell=function(t,n){var r=a.get(t);return r||(r=[],a.set(t,r)),!(r.length>=c.length)&&(r.push(n),!0)},this.unregisterCell=function(t,n){var r=a.get(t),e=r.indexOf(n);r.splice(e,1),r.length||a.delete(t)},this.forEachRow=function(t){a.forEach(t)},this.getColumns=function(){var t=this,n=[];return c.slice().sort(function(t,n){return t.mapTo-n.mapTo}).forEach(function(r){return n.push(new e(t,r))}),n},this.getLayout=function(){var t=[];return c.forEach(function(n,r){return t.push({index:r,css:Object.assign({},n.css),mapTo:n.mapTo})}),t},this.applyLayout=function(t){if(!t||t.length!=c.length)throw new Error("Failed to apply layout - number of layouts should match number of columns");t.forEach(function(t,n){return c[n].applyLayout(t)}),i(c.map(function(t){return t.header})),a.forEach(function(t){return i(t)})},this.moveBefore=function(t,n){var r=n;if(n%1!=0&&(r=n?c[n.columnId].mapTo:c.length),!(r<0||r>c.length)){var e=t.mapTo,o=null;r-=e<r?1:0,c.forEach(function(t){t.mapTo-=t.mapTo>e?1:0,t.mapTo+=t.mapTo>=r?1:0,o=t.mapTo===r+1?t:o}),t.mapTo=r,t.moveBefore(o)}},this.exchangeWith=function(t,n){n<0||n>=c.length||(c.find(function(t){return t.mapTo===n}).mapTo=t.mapTo,t.mapTo=n)},this.columnFromPoint=function(t,n){var r=c.find(function(r){return r.columnFromPoint(t,n)});return r?new e(this,r):void 0}}return{require:["^^uiScrollViewport"],restrict:"A",link:function(t,n,r,e){e[0].gridController=e[0].gridController||new i(e[0]),e[0].gridController.registerColumn(n)}}}]).directive("uiScrollTd",function(){return{require:["?^^uiScrollViewport"],restrict:"A",link:function(t,n,r,e){if(e[0]){var o=t,i=t.uiScrollTdInitializer;i||(i=t.uiScrollTdInitializer={linking:!0}),i.linking||(o=i.scope);var u=e[0].gridController;u.registerCell(o,n)&&t.$on("$destroy",function(){return u.unregisterCell(o,n)}),i.linking||i.onLink()}}}})}}); | ||
!function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=7)}({7:function(t,n,r){"use strict";angular.module("ui.scroll.grid",[]).directive("uiScrollTh",["$log","$timeout",function(t,n){function r(t){this.getLayout=function(){return t.getLayout()},this.applyLayout=function(n){return t.applyLayout(n)},this.columnFromPoint=function(n,r){return t.columnFromPoint(n,r)},Object.defineProperty(this,"columns",{get:function(){return t.getColumns()}})}function e(t,n){this.css=function(){var r=arguments[0],e=arguments[1];if(1==arguments.length)return n.header.css(r);2==arguments.length&&(n.header.css(r,e),t.forEachRow(function(t){return t[n.id].css(r,e)}),n.css[r]=e)},this.moveBefore=function(r){return t.moveBefore(n,r)},this.exchangeWith=function(r){return t.exchangeWith(n,r)},Object.defineProperty(this,"columnId",{get:function(){return n.id}})}function o(t,n,r){function e(t,n,r){var e=t.offset();return!(n<e.left||e.left+t.outerWidth(!0)<n)&&!(r<e.top||e.top+t.outerHeight(!0)<r)}function o(t,n){t.detach(),n.before(t)}function i(t){var n=t.parent();t.detach(),n.append(t)}function u(t,n){t.removeAttr("style");for(var r in n)n.hasOwnProperty(r)&&t.css(r,n[r])}this.header=r,this.css={},this.mapTo=n.length,this.id=n.length,this.applyLayout=function(t){this.css=angular.extend({},t.css),this.mapTo=t.mapTo,u(this.header,this.css)},this.moveBefore=function(n){var e=this;n?(o(r,n.header),t.forEachRow(function(t){return o(t[e.id],t[n.id])})):(i(r),t.forEachRow(function(t){return i(t[e.id])}))},this.columnFromPoint=function(n,o){var i=this;if(e(r,n,o))return this;var u=null;return t.forEachRow(function(t){return u=e(t[i.id],n,o)?i:u}),u},this.applyCss=function(t){u(t,this.css)}}function i(t){function i(t){var n=t[0].parent(),r=[];t.forEach(function(n,e){c[e].applyCss(n),r[c[e].mapTo]=t[e],t[e].detach()}),r.forEach(function(t){return n.append(t)})}var u=this,c=[],a=new Map;n(function(){t.adapter.publicContext.gridAdapter=new r(u),t.adapter.transform=function(t,n){return i(a.get(t))}}),this.registerColumn=function(t){c.push(new o(this,c,t))},this.registerCell=function(t,n){var r=a.get(t);return r||(r=[],a.set(t,r)),!(r.length>=c.length)&&(r.push(n),!0)},this.unregisterCell=function(t,n){var r=a.get(t),e=r.indexOf(n);r.splice(e,1),r.length||a.delete(t)},this.forEachRow=function(t){a.forEach(t)},this.getColumns=function(){var t=this,n=[];return c.slice().sort(function(t,n){return t.mapTo-n.mapTo}).forEach(function(r){return n.push(new e(t,r))}),n},this.getLayout=function(){var t=[];return c.forEach(function(n,r){return t.push({index:r,css:angular.extend({},n.css),mapTo:n.mapTo})}),t},this.applyLayout=function(t){if(!t||t.length!=c.length)throw new Error("Failed to apply layout - number of layouts should match number of columns");t.forEach(function(t,n){return c[n].applyLayout(t)}),i(c.map(function(t){return t.header})),a.forEach(function(t){return i(t)})},this.moveBefore=function(t,n){var r=n;if(n%1!=0&&(r=n?c[n.columnId].mapTo:c.length),!(r<0||r>c.length)){var e=t.mapTo,o=null;r-=e<r?1:0,c.forEach(function(t){t.mapTo-=t.mapTo>e?1:0,t.mapTo+=t.mapTo>=r?1:0,o=t.mapTo===r+1?t:o}),t.mapTo=r,t.moveBefore(o)}},this.exchangeWith=function(t,n){n<0||n>=c.length||(c.find(function(t){return t.mapTo===n}).mapTo=t.mapTo,t.mapTo=n)},this.columnFromPoint=function(t,n){var r=c.find(function(r){return r.columnFromPoint(t,n)});return r?new e(this,r):void 0}}return{require:["^^uiScrollViewport"],restrict:"A",link:function(t,n,r,e){e[0].gridController=e[0].gridController||new i(e[0]),e[0].gridController.registerColumn(n)}}}]).directive("uiScrollTd",function(){return{require:["?^^uiScrollViewport"],restrict:"A",link:function(t,n,r,e){if(e[0]){var o=t,i=t.uiScrollTdInitializer;i||(i=t.uiScrollTdInitializer={linking:!0}),i.linking||(o=i.scope);var u=e[0].gridController;u.registerCell(o,n)&&t.$on("$destroy",function(){return u.unregisterCell(o,n)}),i.linking||i.onLink()}}}})}}); | ||
//# sourceMappingURL=ui-scroll-grid.min.js.map |
/*! | ||
* angular-ui-scroll | ||
* https://github.com/angular-ui/ui-scroll | ||
* Version: 1.7.1 -- 2018-04-13T16:09:50.195Z | ||
* Version: 1.7.2 -- 2018-07-26T04:32:37.367Z | ||
* License: MIT | ||
@@ -193,5 +193,5 @@ */ | ||
// need to postpone min/maxIndexUser processing if the view is empty | ||
if (Number.isInteger(datasource[propName])) { | ||
if (angular.isNumber(datasource[propName])) { | ||
getter = datasource[propName]; | ||
if (Number.isInteger(getter)) { | ||
if (angular.isNumber(getter)) { | ||
onRenderHandlers = onRenderHandlers.filter(function (handler) { | ||
@@ -844,3 +844,3 @@ return handler.id !== propName; | ||
if (typeof value !== 'undefined') { | ||
if (Number.isInteger(value)) { | ||
if (angular.isNumber(value)) { | ||
value = value + 'px'; | ||
@@ -1052,3 +1052,3 @@ } | ||
Object.assign(buffer, { | ||
angular.extend(buffer, { | ||
size: bufferSize, | ||
@@ -1119,3 +1119,3 @@ | ||
remove: function remove(arg1, arg2) { | ||
if (Number.isInteger(arg1)) { | ||
if (angular.isNumber(arg1)) { | ||
// removes items from arg1 (including) through arg2 (excluding) | ||
@@ -1233,3 +1233,3 @@ for (var i = arg1; i < arg2; i++) { | ||
Object.assign(viewport, { | ||
angular.extend(viewport, { | ||
getScope: function getScope() { | ||
@@ -1589,3 +1589,3 @@ return scope; | ||
Object.assign(adapterOnScope, this.publicContext); | ||
angular.extend(adapterOnScope, this.publicContext); | ||
this.publicContext = adapterOnScope; | ||
@@ -1709,3 +1709,3 @@ } | ||
else if (index >= this.buffer.getAbsMinIndex() && index <= this.buffer.getAbsMaxIndex()) { | ||
if (Array.isArray(newItems) && !newItems.length) { | ||
if (angular.isArray(newItems) && !newItems.length) { | ||
this.viewport.removeCacheItem(index, index === this.buffer.minIndex); | ||
@@ -1725,3 +1725,3 @@ if (index === this.buffer.getAbsMinIndex()) { | ||
if (!Array.isArray(newItems)) { | ||
if (!angular.isArray(newItems)) { | ||
return; | ||
@@ -1728,0 +1728,0 @@ } |
/*! | ||
* angular-ui-scroll | ||
* https://github.com/angular-ui/ui-scroll | ||
* Version: 1.7.1 -- 2018-04-13T16:09:50.195Z | ||
* Version: 1.7.2 -- 2018-07-26T04:32:37.367Z | ||
* License: MIT | ||
*/ | ||
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var r=n(1),o=i(r),a=n(2),u=i(a),s=n(3),l=i(s),c=n(4),f=i(c),d=n(6),h=i(d);angular.module("ui.scroll",[]).constant("JQLiteExtras",o.default).run(["JQLiteExtras",function(e){window.jQuery||(new e).registerFor(angular.element),u.default.addCSSRules()}]).directive("uiScrollViewport",function(){return{restrict:"A",controller:["$scope","$element",function(e,t){var n=this;return this.container=t,this.viewport=t,this.scope=e,angular.forEach(t.children(),function(e){"tbody"===e.tagName.toLowerCase()&&(n.viewport=angular.element(e))}),this}]}}).directive("uiScroll",["$log","$injector","$rootScope","$timeout","$interval","$q","$parse",function(e,t,n,i,r,o,a){function s(e,s,c,d,p){function m(t,n){var i=a(t)(e);return isNaN(i)?n:i}function g(){G.forEach(function(e){return e.run()}),G=[]}function v(e,t){var n=void 0;Number.isInteger(e[t])&&(n=e[t],Number.isInteger(n)&&(G=G.filter(function(e){return e.id!==t}),G.push({id:t,run:function(){return e[t]=n}})))}function b(e,t,n){var i=Object.getOwnPropertyDescriptor(e,t);if(!i||!i.set&&!i.get){var r=void 0;v(e,t),Object.defineProperty(e,t,{set:function(i){if(r=i,z.length&&!Q.length)return void v(e,t);Q[n]=i;var o=X.topDataPos();X.adjustPaddings(),"minIndex"===t&&X.onAfterMinIndexSet(o)},get:function(){return r}})}}function x(t){return t&&t!==W||e.$$destroyed}function y(){X.bind("resize",V),X.bind("scroll",V)}function w(){X.unbind("resize",V),X.unbind("scroll",V)}function I(){X.resetTopPadding(),X.resetBottomPadding(),arguments.length&&(R=arguments[0]),Q.reset(R),v(L,"minIndex"),v(L,"maxIndex"),S()}function E(e){return e.element.height()&&e.element[0].offsetParent}function P(e){E(e)&&(Q.forEach(function(e){"function"==typeof e.unregisterVisibilityWatcher&&(e.unregisterVisibilityWatcher(),delete e.unregisterVisibilityWatcher)}),z.length||i(function(){return S()}))}function $(e,t){T(e,t,X.insertElement),E(e)||(e.unregisterVisibilityWatcher=e.scope.$watch(function(){return P(e)})),q.hideElement(e)}function T(e,t,n){var i=null,r=t>0?Q[t-1].element:void 0;if(p(function(t,o){i=n(t,r),e.element=t,e.scope=o,o[H]=e.item}),Y.transform){var o=e.scope.uiScrollTdInitializer;o&&o.linking?Y.transform(e.scope,e.element):e.scope.uiScrollTdInitializer={onLink:function(){return Y.transform(e.scope,e.element)},scope:e.scope}}return i}function O(){var e=[],t=[],n=[],i=[];return Q.forEach(function(r,o){switch(r.op){case"prepend":t.unshift(r);break;case"append":$(r,o),r.op="none",i.push(r);break;case"insert":e=e.concat(T(r,o,X.insertElementAnimated)),r.op="none",i.push(r);break;case"remove":n.push(r)}}),n.forEach(function(t){return e=e.concat(X.removeItem(t))}),t.length&&t.forEach(function(e){$(e),e.op="none"}),Q.forEach(function(e,t){return e.scope.$index=Q.first+t}),{prepended:t,removed:n,inserted:i,animated:e}}function k(e,t){t.animated.length?o.all(t.animated).then(function(){X.adjustPaddings(),S(e)}):X.adjustPaddings()}function A(e,t){X.shouldLoadBottom()?(!t||Q.effectiveHeight(t.inserted)>0)&&1===z.push(!0)&&(Y.loading(!0),U(e)):X.shouldLoadTop()&&(!t||Q.effectiveHeight(t.prepended)>0||z[0])&&1===z.push(!1)&&(Y.loading(!0),U(e))}function j(){var t=O();return!e.$$phase&&!n.$$phase&&e.$digest(),t.inserted.forEach(function(e){return q.showElement(e)}),t.prepended.forEach(function(e){return q.showElement(e)}),t}function S(e){e||(z=[],e=++W);var t=j();x(e)||(k(e,t),A(e),z.length||Y.calculateProperties())}function M(e){var t=j();X.onAfterPrepend(t),x(e)||(k(e,t),g(),A(e,t),z.shift(),z.length?U(e):(Y.loading(!1),y(),Y.calculateProperties()))}function U(e){z[0]?Q.length&&!X.shouldLoadBottom()?M(e):K(function(t){x(e)||(t.length<D&&(Q.eof=!0),t.length>0&&(X.clipTop(),Q.append(t)),M(e))}):Q.length&&!X.shouldLoadTop()?M(e):Z(function(t){x(e)||(t.length<D&&(Q.bof=!0),t.length>0&&(Q.length&&X.clipBottom(),Q.prepend(t)),M(e))})}function V(){n.$$phase||Y.isLoading||Y.disabled||(A(W),z.length?w():(Y.calculateProperties(),!e.$$phase&&e.$digest()))}function _(e){if(!Y.disabled){var t=X[0].scrollTop,n=X[0].scrollHeight-X[0].clientHeight;(0===t&&!Q.bof||t===n&&!Q.eof)&&e.preventDefault()}}var C=c.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);if(!C)throw new Error("Expected uiScroll in form of '_item_ in _datasource_' but got '"+c.uiScroll+"'");var L=null,H=C[1],N=C[2],B=d[0],D=Math.max(3,m(c.bufferSize,10)),F=Math.max(.3,m(c.padding,.5)),R=m(c.startIndex,1),W=0,z=[],q=new u.default(t,o),Q=new l.default(q,D,R),X=new f.default(q,Q,s,B,n,F),Y=new h.default(e,a,c,X,Q,S,I);B&&(B.adapter=Y);var J=function(){return"[object Object]"===Object.prototype.toString.call(L)&&"function"==typeof L.get};if(L=a(N)(e),!J()&&(L=t.get(N),!J()))throw new Error(N+" is not a valid datasource");var G=[];b(L,"minIndex","minIndexUser"),b(L,"maxIndex","maxIndexUser");var K=2!==L.get.length?function(e){return L.get(Q.next,D,e)}:function(e){L.get({index:Q.next,append:Q.length?Q[Q.length-1].item:void 0,count:D},e)},Z=2!==L.get.length?function(e){return L.get(Q.first-D,D,e)}:function(e){L.get({index:Q.first-D,prepend:Q.length?Q[0].item:void 0,count:D},e)};p(function(e,t){X.createPaddingElements(e[0]),t.$destroy(),e.remove()}),e.$on("$destroy",function(){w(),X.unbind("mousewheel",_)}),X.bind("mousewheel",_),function(){var e=0;if(X.applyContainerStyle())S();else var t=r(function(){if(e++,X.applyContainerStyle()&&(r.cancel(t),S()),50*e>=500)throw r.cancel(t),Error("ui-scroll directive requires a viewport with non-zero height in 500ms")},50)}()}return{require:["?^uiScrollViewport"],restrict:"A",transclude:"element",priority:1e3,terminal:!0,link:s}}])},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&u.return&&u.return()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(){i(this,e)}return o(e,[{key:"registerFor",value:function(e){function t(e,t,n){var i=e[0],o=r({top:["scrollTop","pageYOffset","scrollLeft"],left:["scrollLeft","pageXOffset","scrollTop"]}[t],3),a=o[0],u=o[1],l=o[2],c=void 0!==n;return s(i)?c?i.scrollTo(e[l].call(e),n):u in i?i[u]:i.document.documentElement[a]:(c&&(i[a]=n),i[a])}function n(e,t){var n=void 0,i=void 0,a=void 0,l=void 0,c=void 0,f=void 0,d=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0;if(s(e))return n=document.documentElement[{height:"clientHeight",width:"clientWidth"}[t]],{base:n,padding:0,border:0,margin:0};var b=r({width:[e.offsetWidth,"Left","Right"],height:[e.offsetHeight,"Top","Bottom"]}[t],3);return n=b[0],d=b[1],h=b[2],f=u(e),g=o(e,f["padding"+d])||0,v=o(e,f["padding"+h])||0,i=o(e,f["border"+d+"Width"])||0,a=o(e,f["border"+h+"Width"])||0,l=f["margin"+d],c=f["margin"+h],p=o(e,l)||0,m=o(e,c)||0,{base:n,padding:g+v,border:i+a,margin:p+m}}function i(e,t,i){var r=void 0,o=void 0,a=n(e,t);return a.base>0?{base:a.base-a.padding-a.border,outer:a.base,outerfull:a.base+a.margin}[i]:(r=u(e),o=r[t],(o<0||null===o)&&(o=e.style[t]||0),o=parseFloat(o)||0,{base:o-a.padding-a.border,outer:o,outerfull:o+a.padding+a.border+a.margin}[i])}var o=void 0,a=void 0,u=void 0,s=void 0;return a=angular.element.prototype.css,e.prototype.css=function(e,t){var n=this,i=n[0];if(i&&3!==i.nodeType&&8!==i.nodeType&&i.style)return a.call(n,e,t)},s=function(e){return e&&e.document&&e.location&&e.alert&&e.setInterval},window.getComputedStyle?(u=function(e){return window.getComputedStyle(e,null)},o=function(e,t){return parseFloat(t)}):(u=function(e){return e.currentStyle},o=function(e,t){var n=void 0,i=void 0,r=void 0,o=void 0,a=void 0,u=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;return new RegExp("^("+u+")(?!px)[a-z%]+$","i").test(t)?(a=e.style,n=a.left,r=e.runtimeStyle,o=r&&r.left,r&&(r.left=a.left),a.left=t,i=a.pixelLeft,a.left=n,o&&(r.left=o),i):parseFloat(t)}),angular.forEach({before:function(e){var t,n,i,r,o,a,u;if(u=this,n=u[0],o=u.parent(),t=o.contents(),t[0]===n)return o.prepend(e);for(i=r=1,a=t.length-1;1<=a?r<=a:r>=a;i=1<=a?++r:--r)if(t[i]===n)return void angular.element(t[i-1]).after(e);throw new Error("invalid DOM structure "+n.outerHTML)},height:function(e){var t;return t=this,void 0!==e?(Number.isInteger(e)&&(e+="px"),a.call(t,"height",e)):i(this[0],"height","base")},outerHeight:function(e){return i(this[0],"height",e?"outerfull":"outer")},outerWidth:function(e){return i(this[0],"width",e?"outerfull":"outer")},offset:function(e){var t=void 0,n=void 0,i=this,r={top:0,left:0},o=i[0],a=o&&o.ownerDocument;if(arguments.length){if(void 0===e)return i;throw new Error("offset setter method is not implemented")}if(a)return t=a.documentElement,null!=o.getBoundingClientRect&&(r=o.getBoundingClientRect()),n=a.defaultView||a.parentWindow,{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}},scrollTop:function(e){return t(this,"top",e)},scrollLeft:function(e){return t(this,"left",e)}},function(t,n){if(!e.prototype[n])return e.prototype[n]=t})}}]),e}();t.default=a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t,n){i(this,e),this.$animate=t.has&&t.has("$animate")?t.get("$animate"):null,this.isAngularVersionLessThen1_3=1===angular.version.major&&angular.version.minor<3,this.$q=n}return r(e,null,[{key:"addCSSRules",value:function(){var e=document.styleSheets[0],t=void 0;try{t=e.cssRules.length}catch(e){t=0}"insertRule"in e?e.insertRule(".ng-ui-scroll-hide{display: none}",t):"addRule"in e&&e.addRule(".ng-ui-scroll-hide","display: none",t)}}]),r(e,[{key:"hideElement",value:function(e){e.element.addClass("ng-ui-scroll-hide")}},{key:"showElement",value:function(e){e.element.removeClass("ng-ui-scroll-hide")}},{key:"insertElement",value:function(e,t){return t.after(e),[]}},{key:"removeElement",value:function(e){return e.element.remove(),e.scope.$destroy(),[]}},{key:"insertElementAnimated",value:function(e,t){if(!this.$animate)return this.insertElement(e,t);if(this.isAngularVersionLessThen1_3){var n=this.$q.defer();return this.$animate.enter(e,null,t,function(){return n.resolve()}),[n.promise]}return[this.$animate.enter(e,null,t)]}},{key:"removeElementAnimated",value:function(e){if(!this.$animate)return this.removeElement(e);if(this.isAngularVersionLessThen1_3){var t=this.$q.defer();return this.$animate.leave(e.element,function(){return e.scope.$destroy(),t.resolve()}),[t.promise]}return[this.$animate.leave(e.element).then(function(){return e.scope.$destroy()})]}}]),e}();t.default=o},function(e,t,n){"use strict";function i(e,t,n){var i=Object.create(Array.prototype);return Object.assign(i,{size:t,reset:function(e){i.remove(0,i.length),i.eof=!1,i.bof=!1,i.first=e,i.next=e,i.minIndex=e,i.maxIndex=e,i.minIndexUser=null,i.maxIndexUser=null},append:function(e){e.forEach(function(e){++i.next,i.insert("append",e)}),i.maxIndex=i.eof?i.next-1:Math.max(i.next-1,i.maxIndex)},prepend:function(e){e.reverse().forEach(function(e){--i.first,i.insert("prepend",e)}),i.minIndex=i.bof?i.minIndex=i.first:Math.min(i.first,i.minIndex)},insert:function(e,t,n){var r={item:t};if(e%1==0)r.op="insert",i.splice(e,0,r),n?i.first--:i.next++;else switch(r.op=e,e){case"append":i.push(r);break;case"prepend":i.unshift(r)}},remove:function(t,n){if(Number.isInteger(t)){for(var r=t;r<n;r++)e.removeElement(i[r]);return i.splice(t,n-t)}return i.splice(i.indexOf(t),1),"isTop"===t._op&&i.first===this.getAbsMinIndex()?this.incrementMinIndex():this.decrementMaxIndex(),"isTop"===t._op?i.first++:i.next--,i.length||(i.first=1,i.next=1),e.removeElementAnimated(t)},incrementMinIndex:function(){if(null!==i.minIndexUser){if(i.minIndex>i.minIndexUser)return void i.minIndexUser++;i.minIndex===i.minIndexUser&&i.minIndexUser++}i.minIndex++},decrementMaxIndex:function(){null!==i.maxIndexUser&&i.maxIndex<=i.maxIndexUser&&i.maxIndexUser--,i.maxIndex--},getAbsMinIndex:function(){return null!==i.minIndexUser?Math.min(i.minIndexUser,i.minIndex):i.minIndex},getAbsMaxIndex:function(){return null!==i.maxIndexUser?Math.max(i.maxIndexUser,i.maxIndex):i.maxIndex},effectiveHeight:function(e){if(!e.length)return 0;var t=Number.MAX_VALUE,n=Number.NEGATIVE_INFINITY;return e.forEach(function(e){e.element[0].offsetParent&&(t=Math.min(t,e.element.offset().top),n=Math.max(n,e.element.offset().top+e.element.outerHeight(!0)))}),Math.max(0,n-t)}}),i.reset(n),i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e,t,n,i,r,a){function u(){return c.outerHeight()*a}var s=null,l=null,c=i&&i.viewport?i.viewport:angular.element(window),f=i&&i.container?i.container:void 0,d=i&&i.scope?i.scope:r;return c.css({"overflow-anchor":"none","overflow-y":"auto",display:"block"}),Object.assign(c,{getScope:function(){return d},createPaddingElements:function(e){s=new o.default(e),l=new o.default(e),n.before(s.element),n.after(l.element),s.height(0),l.height(0)},applyContainerStyle:function(){return!f||(f!==c&&c.css("height",window.getComputedStyle(f[0]).height),c.height()>0)},bottomDataPos:function(){var e=c[0].scrollHeight;return(e=null!=e?e:c[0].document.documentElement.scrollHeight)-l.height()},topDataPos:function(){return s.height()},bottomVisiblePos:function(){return c.scrollTop()+c.outerHeight()},topVisiblePos:function(){return c.scrollTop()},insertElement:function(t,n){return e.insertElement(t,n||s.element)},insertElementAnimated:function(t,n){return e.insertElementAnimated(t,n||s.element)},shouldLoadBottom:function(){return!t.eof&&c.bottomDataPos()<c.bottomVisiblePos()+u()},clipBottom:function(){for(var e=0,n=0,i=0,r=c.bottomDataPos()-c.bottomVisiblePos()-u(),o=t.length-1;o>=0&&(i=t[o].element.outerHeight(!0),!(n+i>r));o--)l.cache.add(t[o]),n+=i,e++;e>0&&(t.eof=!1,t.remove(t.length-e,t.length),t.next-=e,c.adjustPaddings())},shouldLoadTop:function(){return!t.bof&&c.topDataPos()>c.topVisiblePos()-u()},clipTop:function(){for(var e=0,n=0,i=0,r=c.topVisiblePos()-c.topDataPos()-u(),o=0;o<t.length&&(i=t[o].element.outerHeight(!0),!(n+i>r));o++)s.cache.add(t[o]),n+=i,e++;e>0&&(s.height(s.height()+n),t.bof=!1,t.remove(0,e),t.first+=e)},adjustPaddings:function(){if(t.length){var e=t.reduce(function(e,t){return e+t.element.outerHeight(!0)},0),n=0,i=0;s.cache.forEach(function(e){e.index<t.first&&(n+=e.height,i++)});var r=0,o=0;l.cache.forEach(function(e){e.index>=t.next&&(r+=e.height,o++)});var a=e+n+r,u=a/(i+o+t.length),c=null!==t.minIndexUser&&t.minIndex>t.minIndexUser,f=null!==t.maxIndexUser&&t.maxIndex<t.maxIndexUser,d=c?(t.minIndex-t.minIndexUser)*u:0,h=f?(t.maxIndexUser-t.maxIndex)*u:0;s.height(n+d),l.height(r+h)}},onAfterMinIndexSet:function(e){if(null!==t.minIndexUser&&t.minIndex>t.minIndexUser){var n=s.height()-e;for(c.scrollTop(c.scrollTop()+n);(n-=c.scrollTop())>0;)l.height(l.height()+n),c.scrollTop(c.scrollTop()+n)}},onAfterPrepend:function(e){if(e.prepended.length){var n=t.effectiveHeight(e.prepended),i=s.height()-n;i>=0?s.height(i):(s.height(0),c.scrollTop(c.scrollTop()-i))}},resetTopPadding:function(){s.height(0),s.cache.clear()},resetBottomPadding:function(){l.height(0),l.cache.clear()},removeCacheItem:function(e,t){s.cache.remove(e,t),l.cache.remove(e,t)},removeItem:function(e){return this.removeCacheItem(e),t.remove(e)}}),c}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(5),o=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(){var e=[];return e.push.apply(e,arguments),Object.setPrototypeOf(e,r.prototype),e}function o(e){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("ui-scroll directive requires an Element node for templating the view");var t=void 0;switch(e.tagName.toLowerCase()){case"dl":throw new Error("ui-scroll directive does not support <"+e.tagName+"> as a repeating tag: "+e.outerHTML);case"tr":t=angular.element("<table><tr><td><div></div></td></tr></table>").find("tr");break;case"li":t=angular.element("<li></li>");break;default:t=angular.element("<div></div>")}return t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=function(){function e(){i(this,e)}return a(e,[{key:"add",value:function(e){for(var t=this.length-1;t>=0;t--)if(this[t].index===e.scope.$index)return void(this[t].height=e.element.outerHeight());this.push({index:e.scope.$index,height:e.element.outerHeight()}),this.sort(function(e,t){return e.index<t.index?-1:e.index>t.index?1:0})}},{key:"remove",value:function(e,t){for(var n=e%1==0?e:e.scope.$index,i=e%1==0?t:"isTop"===e._op,r=this.length-1;r>=0;r--)if(this[r].index===n){this.splice(r,1);break}if(!i)for(var o=this.length-1;o>=0;o--)this[o].index>n&&this[o].index--}},{key:"clear",value:function(){this.length=0}}]),e}();r.prototype=Object.create(Array.prototype),Object.getOwnPropertyNames(u.prototype).forEach(function(e){return r.prototype[e]=u.prototype[e]});var s=function(){function e(t){i(this,e),this.element=o(t),this.cache=new r}return a(e,[{key:"height",value:function(){return this.element.height.apply(this.element,arguments)}}]),e}();t.default=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t,n,r,o,a,u,s){i(this,e),this.$parse=n,this.$attr=r,this.viewport=o,this.buffer=a,this.doAdjust=u,this.reload=s,this.isLoading=!1,this.disabled=!1;var l=o.getScope();this.startScope=l.$parent?l:t,this.publicContext={},this.assignAdapter(r.adapter),this.generatePublicContext()}return r(e,[{key:"assignAdapter",value:function(e){if(e&&(e=e.replace(/^\s+|\s+$/gm,""))){var t=void 0;try{this.$parse(e).assign(this.startScope,{}),t=this.$parse(e)(this.startScope)}catch(t){throw t.message="Angular ui-scroll Adapter assignment exception.\nCan't parse \""+e+'" expression.\n'+t.message,t}Object.assign(t,this.publicContext),this.publicContext=t}}},{key:"generatePublicContext",value:function(){for(var e=this,t=["reload","applyUpdates","append","prepend","isBOF","isEOF","isEmpty"],n=t.length-1;n>=0;n--)this.publicContext[t[n]]=this[t[n]].bind(this);for(var i=["isLoading","topVisible","topVisibleElement","topVisibleScope","bottomVisible","bottomVisibleElement","bottomVisibleScope"],r=i.length-1;r>=0;r--)!function(t){var n=void 0,r=e.$attr[i[t]];Object.defineProperty(e,i[t],{get:function(){return n},set:function(o){n=o,e.publicContext[i[t]]=o,r&&e.$parse(r).assign(e.startScope,o)}})}(r);Object.defineProperty(this.publicContext,"disabled",{get:function(){return e.disabled},set:function(t){return(e.disabled=t)?null:e.doAdjust()}})}},{key:"loading",value:function(e){this.isLoading=e}},{key:"isBOF",value:function(){return this.buffer.bof}},{key:"isEOF",value:function(){return this.buffer.eof}},{key:"isEmpty",value:function(){return!this.buffer.length}},{key:"append",value:function(e){this.buffer.append(e),this.doAdjust(),this.viewport.clipTop(),this.viewport.clipBottom()}},{key:"prepend",value:function(e){this.buffer.prepend(e),this.doAdjust(),this.viewport.clipTop(),this.viewport.clipBottom()}},{key:"applyUpdates",value:function(e,t){"function"==typeof e?this.applyUpdatesFunc(e):this.applyUpdatesIndex(e,t),this.doAdjust()}},{key:"applyUpdatesFunc",value:function(e){var t=this;this.buffer.slice(0).forEach(function(n){t.applyUpdate(n,e(n.item,n.scope,n.element))})}},{key:"applyUpdatesIndex",value:function(e,t){if(e%1!=0)throw new Error("applyUpdates - "+e+" is not a valid index (should be an integer)");var n=e-this.buffer.first;n>=0&&n<this.buffer.length?this.applyUpdate(this.buffer[n],t):e>=this.buffer.getAbsMinIndex()&&e<=this.buffer.getAbsMaxIndex()&&Array.isArray(t)&&!t.length&&(this.viewport.removeCacheItem(e,e===this.buffer.minIndex),e===this.buffer.getAbsMinIndex()?this.buffer.incrementMinIndex():this.buffer.decrementMaxIndex())}},{key:"applyUpdate",value:function(e,t){var n=this;if(Array.isArray(t)){var i=this.buffer.indexOf(e);t.reverse().some(function(t){return t===e.item})||(e.op="remove",0!==i||t.length||(e._op="isTop")),t.forEach(function(t){t===e.item?i--:n.buffer.insert(i+1,t,-1===i)})}}},{key:"calculateProperties",value:function(){for(var e=null,t=0,n=!1,i=!1,r=this.buffer.length,o=0;o<r;o++){var a=this.buffer[o],u=a.element.offset().top;if(e!==u){var s=a.element.outerHeight(!0),l=this.viewport.topDataPos()+t+s;!n&&l>this.viewport.topVisiblePos()&&(n=!0,this.topVisible=a.item,this.topVisibleElement=a.element,this.topVisibleScope=a.scope),!i&&(l>=this.viewport.bottomVisiblePos()||o===r-1&&this.isEOF())&&(i=!0,this.bottomVisible=a.item,this.bottomVisibleElement=a.element,this.bottomVisibleScope=a.scope),t+=s}if(e=u,n&&i)break}}}]),e}();t.default=o}]); | ||
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var r=n(1),o=i(r),a=n(2),u=i(a),s=n(3),l=i(s),c=n(4),f=i(c),d=n(6),h=i(d);angular.module("ui.scroll",[]).constant("JQLiteExtras",o.default).run(["JQLiteExtras",function(e){window.jQuery||(new e).registerFor(angular.element),u.default.addCSSRules()}]).directive("uiScrollViewport",function(){return{restrict:"A",controller:["$scope","$element",function(e,t){var n=this;return this.container=t,this.viewport=t,this.scope=e,angular.forEach(t.children(),function(e){"tbody"===e.tagName.toLowerCase()&&(n.viewport=angular.element(e))}),this}]}}).directive("uiScroll",["$log","$injector","$rootScope","$timeout","$interval","$q","$parse",function(e,t,n,i,r,o,a){function s(e,s,c,d,p){function m(t,n){var i=a(t)(e);return isNaN(i)?n:i}function g(){G.forEach(function(e){return e.run()}),G=[]}function v(e,t){var n=void 0;angular.isNumber(e[t])&&(n=e[t],angular.isNumber(n)&&(G=G.filter(function(e){return e.id!==t}),G.push({id:t,run:function(){return e[t]=n}})))}function b(e,t,n){var i=Object.getOwnPropertyDescriptor(e,t);if(!i||!i.set&&!i.get){var r=void 0;v(e,t),Object.defineProperty(e,t,{set:function(i){if(r=i,z.length&&!Q.length)return void v(e,t);Q[n]=i;var o=X.topDataPos();X.adjustPaddings(),"minIndex"===t&&X.onAfterMinIndexSet(o)},get:function(){return r}})}}function x(t){return t&&t!==W||e.$$destroyed}function y(){X.bind("resize",V),X.bind("scroll",V)}function w(){X.unbind("resize",V),X.unbind("scroll",V)}function I(){X.resetTopPadding(),X.resetBottomPadding(),arguments.length&&(R=arguments[0]),Q.reset(R),v(L,"minIndex"),v(L,"maxIndex"),j()}function E(e){return e.element.height()&&e.element[0].offsetParent}function P(e){E(e)&&(Q.forEach(function(e){"function"==typeof e.unregisterVisibilityWatcher&&(e.unregisterVisibilityWatcher(),delete e.unregisterVisibilityWatcher)}),z.length||i(function(){return j()}))}function $(e,t){T(e,t,X.insertElement),E(e)||(e.unregisterVisibilityWatcher=e.scope.$watch(function(){return P(e)})),q.hideElement(e)}function T(e,t,n){var i=null,r=t>0?Q[t-1].element:void 0;if(p(function(t,o){i=n(t,r),e.element=t,e.scope=o,o[H]=e.item}),Y.transform){var o=e.scope.uiScrollTdInitializer;o&&o.linking?Y.transform(e.scope,e.element):e.scope.uiScrollTdInitializer={onLink:function(){return Y.transform(e.scope,e.element)},scope:e.scope}}return i}function k(){var e=[],t=[],n=[],i=[];return Q.forEach(function(r,o){switch(r.op){case"prepend":t.unshift(r);break;case"append":$(r,o),r.op="none",i.push(r);break;case"insert":e=e.concat(T(r,o,X.insertElementAnimated)),r.op="none",i.push(r);break;case"remove":n.push(r)}}),n.forEach(function(t){return e=e.concat(X.removeItem(t))}),t.length&&t.forEach(function(e){$(e),e.op="none"}),Q.forEach(function(e,t){return e.scope.$index=Q.first+t}),{prepended:t,removed:n,inserted:i,animated:e}}function O(e,t){t.animated.length?o.all(t.animated).then(function(){X.adjustPaddings(),j(e)}):X.adjustPaddings()}function A(e,t){X.shouldLoadBottom()?(!t||Q.effectiveHeight(t.inserted)>0)&&1===z.push(!0)&&(Y.loading(!0),U(e)):X.shouldLoadTop()&&(!t||Q.effectiveHeight(t.prepended)>0||z[0])&&1===z.push(!1)&&(Y.loading(!0),U(e))}function S(){var t=k();return!e.$$phase&&!n.$$phase&&e.$digest(),t.inserted.forEach(function(e){return q.showElement(e)}),t.prepended.forEach(function(e){return q.showElement(e)}),t}function j(e){e||(z=[],e=++W);var t=S();x(e)||(O(e,t),A(e),z.length||Y.calculateProperties())}function M(e){var t=S();X.onAfterPrepend(t),x(e)||(O(e,t),g(),A(e,t),z.shift(),z.length?U(e):(Y.loading(!1),y(),Y.calculateProperties()))}function U(e){z[0]?Q.length&&!X.shouldLoadBottom()?M(e):K(function(t){x(e)||(t.length<D&&(Q.eof=!0),t.length>0&&(X.clipTop(),Q.append(t)),M(e))}):Q.length&&!X.shouldLoadTop()?M(e):Z(function(t){x(e)||(t.length<D&&(Q.bof=!0),t.length>0&&(Q.length&&X.clipBottom(),Q.prepend(t)),M(e))})}function V(){n.$$phase||Y.isLoading||Y.disabled||(A(W),z.length?w():(Y.calculateProperties(),!e.$$phase&&e.$digest()))}function _(e){if(!Y.disabled){var t=X[0].scrollTop,n=X[0].scrollHeight-X[0].clientHeight;(0===t&&!Q.bof||t===n&&!Q.eof)&&e.preventDefault()}}var C=c.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);if(!C)throw new Error("Expected uiScroll in form of '_item_ in _datasource_' but got '"+c.uiScroll+"'");var L=null,H=C[1],N=C[2],B=d[0],D=Math.max(3,m(c.bufferSize,10)),F=Math.max(.3,m(c.padding,.5)),R=m(c.startIndex,1),W=0,z=[],q=new u.default(t,o),Q=new l.default(q,D,R),X=new f.default(q,Q,s,B,n,F),Y=new h.default(e,a,c,X,Q,j,I);B&&(B.adapter=Y);var J=function(){return"[object Object]"===Object.prototype.toString.call(L)&&"function"==typeof L.get};if(L=a(N)(e),!J()&&(L=t.get(N),!J()))throw new Error(N+" is not a valid datasource");var G=[];b(L,"minIndex","minIndexUser"),b(L,"maxIndex","maxIndexUser");var K=2!==L.get.length?function(e){return L.get(Q.next,D,e)}:function(e){L.get({index:Q.next,append:Q.length?Q[Q.length-1].item:void 0,count:D},e)},Z=2!==L.get.length?function(e){return L.get(Q.first-D,D,e)}:function(e){L.get({index:Q.first-D,prepend:Q.length?Q[0].item:void 0,count:D},e)};p(function(e,t){X.createPaddingElements(e[0]),t.$destroy(),e.remove()}),e.$on("$destroy",function(){w(),X.unbind("mousewheel",_)}),X.bind("mousewheel",_),function(){var e=0;if(X.applyContainerStyle())j();else var t=r(function(){if(e++,X.applyContainerStyle()&&(r.cancel(t),j()),50*e>=500)throw r.cancel(t),Error("ui-scroll directive requires a viewport with non-zero height in 500ms")},50)}()}return{require:["?^uiScrollViewport"],restrict:"A",transclude:"element",priority:1e3,terminal:!0,link:s}}])},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&u.return&&u.return()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(){i(this,e)}return o(e,[{key:"registerFor",value:function(e){function t(e,t,n){var i=e[0],o=r({top:["scrollTop","pageYOffset","scrollLeft"],left:["scrollLeft","pageXOffset","scrollTop"]}[t],3),a=o[0],u=o[1],l=o[2],c=void 0!==n;return s(i)?c?i.scrollTo(e[l].call(e),n):u in i?i[u]:i.document.documentElement[a]:(c&&(i[a]=n),i[a])}function n(e,t){var n=void 0,i=void 0,a=void 0,l=void 0,c=void 0,f=void 0,d=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0;if(s(e))return n=document.documentElement[{height:"clientHeight",width:"clientWidth"}[t]],{base:n,padding:0,border:0,margin:0};var b=r({width:[e.offsetWidth,"Left","Right"],height:[e.offsetHeight,"Top","Bottom"]}[t],3);return n=b[0],d=b[1],h=b[2],f=u(e),g=o(e,f["padding"+d])||0,v=o(e,f["padding"+h])||0,i=o(e,f["border"+d+"Width"])||0,a=o(e,f["border"+h+"Width"])||0,l=f["margin"+d],c=f["margin"+h],p=o(e,l)||0,m=o(e,c)||0,{base:n,padding:g+v,border:i+a,margin:p+m}}function i(e,t,i){var r=void 0,o=void 0,a=n(e,t);return a.base>0?{base:a.base-a.padding-a.border,outer:a.base,outerfull:a.base+a.margin}[i]:(r=u(e),o=r[t],(o<0||null===o)&&(o=e.style[t]||0),o=parseFloat(o)||0,{base:o-a.padding-a.border,outer:o,outerfull:o+a.padding+a.border+a.margin}[i])}var o=void 0,a=void 0,u=void 0,s=void 0;return a=angular.element.prototype.css,e.prototype.css=function(e,t){var n=this,i=n[0];if(i&&3!==i.nodeType&&8!==i.nodeType&&i.style)return a.call(n,e,t)},s=function(e){return e&&e.document&&e.location&&e.alert&&e.setInterval},window.getComputedStyle?(u=function(e){return window.getComputedStyle(e,null)},o=function(e,t){return parseFloat(t)}):(u=function(e){return e.currentStyle},o=function(e,t){var n=void 0,i=void 0,r=void 0,o=void 0,a=void 0,u=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;return new RegExp("^("+u+")(?!px)[a-z%]+$","i").test(t)?(a=e.style,n=a.left,r=e.runtimeStyle,o=r&&r.left,r&&(r.left=a.left),a.left=t,i=a.pixelLeft,a.left=n,o&&(r.left=o),i):parseFloat(t)}),angular.forEach({before:function(e){var t,n,i,r,o,a,u;if(u=this,n=u[0],o=u.parent(),t=o.contents(),t[0]===n)return o.prepend(e);for(i=r=1,a=t.length-1;1<=a?r<=a:r>=a;i=1<=a?++r:--r)if(t[i]===n)return void angular.element(t[i-1]).after(e);throw new Error("invalid DOM structure "+n.outerHTML)},height:function(e){var t;return t=this,void 0!==e?(angular.isNumber(e)&&(e+="px"),a.call(t,"height",e)):i(this[0],"height","base")},outerHeight:function(e){return i(this[0],"height",e?"outerfull":"outer")},outerWidth:function(e){return i(this[0],"width",e?"outerfull":"outer")},offset:function(e){var t=void 0,n=void 0,i=this,r={top:0,left:0},o=i[0],a=o&&o.ownerDocument;if(arguments.length){if(void 0===e)return i;throw new Error("offset setter method is not implemented")}if(a)return t=a.documentElement,null!=o.getBoundingClientRect&&(r=o.getBoundingClientRect()),n=a.defaultView||a.parentWindow,{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}},scrollTop:function(e){return t(this,"top",e)},scrollLeft:function(e){return t(this,"left",e)}},function(t,n){if(!e.prototype[n])return e.prototype[n]=t})}}]),e}();t.default=a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t,n){i(this,e),this.$animate=t.has&&t.has("$animate")?t.get("$animate"):null,this.isAngularVersionLessThen1_3=1===angular.version.major&&angular.version.minor<3,this.$q=n}return r(e,null,[{key:"addCSSRules",value:function(){var e=document.styleSheets[0],t=void 0;try{t=e.cssRules.length}catch(e){t=0}"insertRule"in e?e.insertRule(".ng-ui-scroll-hide{display: none}",t):"addRule"in e&&e.addRule(".ng-ui-scroll-hide","display: none",t)}}]),r(e,[{key:"hideElement",value:function(e){e.element.addClass("ng-ui-scroll-hide")}},{key:"showElement",value:function(e){e.element.removeClass("ng-ui-scroll-hide")}},{key:"insertElement",value:function(e,t){return t.after(e),[]}},{key:"removeElement",value:function(e){return e.element.remove(),e.scope.$destroy(),[]}},{key:"insertElementAnimated",value:function(e,t){if(!this.$animate)return this.insertElement(e,t);if(this.isAngularVersionLessThen1_3){var n=this.$q.defer();return this.$animate.enter(e,null,t,function(){return n.resolve()}),[n.promise]}return[this.$animate.enter(e,null,t)]}},{key:"removeElementAnimated",value:function(e){if(!this.$animate)return this.removeElement(e);if(this.isAngularVersionLessThen1_3){var t=this.$q.defer();return this.$animate.leave(e.element,function(){return e.scope.$destroy(),t.resolve()}),[t.promise]}return[this.$animate.leave(e.element).then(function(){return e.scope.$destroy()})]}}]),e}();t.default=o},function(e,t,n){"use strict";function i(e,t,n){var i=Object.create(Array.prototype);return angular.extend(i,{size:t,reset:function(e){i.remove(0,i.length),i.eof=!1,i.bof=!1,i.first=e,i.next=e,i.minIndex=e,i.maxIndex=e,i.minIndexUser=null,i.maxIndexUser=null},append:function(e){e.forEach(function(e){++i.next,i.insert("append",e)}),i.maxIndex=i.eof?i.next-1:Math.max(i.next-1,i.maxIndex)},prepend:function(e){e.reverse().forEach(function(e){--i.first,i.insert("prepend",e)}),i.minIndex=i.bof?i.minIndex=i.first:Math.min(i.first,i.minIndex)},insert:function(e,t,n){var r={item:t};if(e%1==0)r.op="insert",i.splice(e,0,r),n?i.first--:i.next++;else switch(r.op=e,e){case"append":i.push(r);break;case"prepend":i.unshift(r)}},remove:function(t,n){if(angular.isNumber(t)){for(var r=t;r<n;r++)e.removeElement(i[r]);return i.splice(t,n-t)}return i.splice(i.indexOf(t),1),"isTop"===t._op&&i.first===this.getAbsMinIndex()?this.incrementMinIndex():this.decrementMaxIndex(),"isTop"===t._op?i.first++:i.next--,i.length||(i.first=1,i.next=1),e.removeElementAnimated(t)},incrementMinIndex:function(){if(null!==i.minIndexUser){if(i.minIndex>i.minIndexUser)return void i.minIndexUser++;i.minIndex===i.minIndexUser&&i.minIndexUser++}i.minIndex++},decrementMaxIndex:function(){null!==i.maxIndexUser&&i.maxIndex<=i.maxIndexUser&&i.maxIndexUser--,i.maxIndex--},getAbsMinIndex:function(){return null!==i.minIndexUser?Math.min(i.minIndexUser,i.minIndex):i.minIndex},getAbsMaxIndex:function(){return null!==i.maxIndexUser?Math.max(i.maxIndexUser,i.maxIndex):i.maxIndex},effectiveHeight:function(e){if(!e.length)return 0;var t=Number.MAX_VALUE,n=Number.NEGATIVE_INFINITY;return e.forEach(function(e){e.element[0].offsetParent&&(t=Math.min(t,e.element.offset().top),n=Math.max(n,e.element.offset().top+e.element.outerHeight(!0)))}),Math.max(0,n-t)}}),i.reset(n),i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e,t,n,i,r,a){function u(){return c.outerHeight()*a}var s=null,l=null,c=i&&i.viewport?i.viewport:angular.element(window),f=i&&i.container?i.container:void 0,d=i&&i.scope?i.scope:r;return c.css({"overflow-anchor":"none","overflow-y":"auto",display:"block"}),angular.extend(c,{getScope:function(){return d},createPaddingElements:function(e){s=new o.default(e),l=new o.default(e),n.before(s.element),n.after(l.element),s.height(0),l.height(0)},applyContainerStyle:function(){return!f||(f!==c&&c.css("height",window.getComputedStyle(f[0]).height),c.height()>0)},bottomDataPos:function(){var e=c[0].scrollHeight;return(e=null!=e?e:c[0].document.documentElement.scrollHeight)-l.height()},topDataPos:function(){return s.height()},bottomVisiblePos:function(){return c.scrollTop()+c.outerHeight()},topVisiblePos:function(){return c.scrollTop()},insertElement:function(t,n){return e.insertElement(t,n||s.element)},insertElementAnimated:function(t,n){return e.insertElementAnimated(t,n||s.element)},shouldLoadBottom:function(){return!t.eof&&c.bottomDataPos()<c.bottomVisiblePos()+u()},clipBottom:function(){for(var e=0,n=0,i=0,r=c.bottomDataPos()-c.bottomVisiblePos()-u(),o=t.length-1;o>=0&&(i=t[o].element.outerHeight(!0),!(n+i>r));o--)l.cache.add(t[o]),n+=i,e++;e>0&&(t.eof=!1,t.remove(t.length-e,t.length),t.next-=e,c.adjustPaddings())},shouldLoadTop:function(){return!t.bof&&c.topDataPos()>c.topVisiblePos()-u()},clipTop:function(){for(var e=0,n=0,i=0,r=c.topVisiblePos()-c.topDataPos()-u(),o=0;o<t.length&&(i=t[o].element.outerHeight(!0),!(n+i>r));o++)s.cache.add(t[o]),n+=i,e++;e>0&&(s.height(s.height()+n),t.bof=!1,t.remove(0,e),t.first+=e)},adjustPaddings:function(){if(t.length){var e=t.reduce(function(e,t){return e+t.element.outerHeight(!0)},0),n=0,i=0;s.cache.forEach(function(e){e.index<t.first&&(n+=e.height,i++)});var r=0,o=0;l.cache.forEach(function(e){e.index>=t.next&&(r+=e.height,o++)});var a=e+n+r,u=a/(i+o+t.length),c=null!==t.minIndexUser&&t.minIndex>t.minIndexUser,f=null!==t.maxIndexUser&&t.maxIndex<t.maxIndexUser,d=c?(t.minIndex-t.minIndexUser)*u:0,h=f?(t.maxIndexUser-t.maxIndex)*u:0;s.height(n+d),l.height(r+h)}},onAfterMinIndexSet:function(e){if(null!==t.minIndexUser&&t.minIndex>t.minIndexUser){var n=s.height()-e;for(c.scrollTop(c.scrollTop()+n);(n-=c.scrollTop())>0;)l.height(l.height()+n),c.scrollTop(c.scrollTop()+n)}},onAfterPrepend:function(e){if(e.prepended.length){var n=t.effectiveHeight(e.prepended),i=s.height()-n;i>=0?s.height(i):(s.height(0),c.scrollTop(c.scrollTop()-i))}},resetTopPadding:function(){s.height(0),s.cache.clear()},resetBottomPadding:function(){l.height(0),l.cache.clear()},removeCacheItem:function(e,t){s.cache.remove(e,t),l.cache.remove(e,t)},removeItem:function(e){return this.removeCacheItem(e),t.remove(e)}}),c}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(5),o=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(){var e=[];return e.push.apply(e,arguments),Object.setPrototypeOf(e,r.prototype),e}function o(e){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("ui-scroll directive requires an Element node for templating the view");var t=void 0;switch(e.tagName.toLowerCase()){case"dl":throw new Error("ui-scroll directive does not support <"+e.tagName+"> as a repeating tag: "+e.outerHTML);case"tr":t=angular.element("<table><tr><td><div></div></td></tr></table>").find("tr");break;case"li":t=angular.element("<li></li>");break;default:t=angular.element("<div></div>")}return t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=function(){function e(){i(this,e)}return a(e,[{key:"add",value:function(e){for(var t=this.length-1;t>=0;t--)if(this[t].index===e.scope.$index)return void(this[t].height=e.element.outerHeight());this.push({index:e.scope.$index,height:e.element.outerHeight()}),this.sort(function(e,t){return e.index<t.index?-1:e.index>t.index?1:0})}},{key:"remove",value:function(e,t){for(var n=e%1==0?e:e.scope.$index,i=e%1==0?t:"isTop"===e._op,r=this.length-1;r>=0;r--)if(this[r].index===n){this.splice(r,1);break}if(!i)for(var o=this.length-1;o>=0;o--)this[o].index>n&&this[o].index--}},{key:"clear",value:function(){this.length=0}}]),e}();r.prototype=Object.create(Array.prototype),Object.getOwnPropertyNames(u.prototype).forEach(function(e){return r.prototype[e]=u.prototype[e]});var s=function(){function e(t){i(this,e),this.element=o(t),this.cache=new r}return a(e,[{key:"height",value:function(){return this.element.height.apply(this.element,arguments)}}]),e}();t.default=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t,n,r,o,a,u,s){i(this,e),this.$parse=n,this.$attr=r,this.viewport=o,this.buffer=a,this.doAdjust=u,this.reload=s,this.isLoading=!1,this.disabled=!1;var l=o.getScope();this.startScope=l.$parent?l:t,this.publicContext={},this.assignAdapter(r.adapter),this.generatePublicContext()}return r(e,[{key:"assignAdapter",value:function(e){if(e&&(e=e.replace(/^\s+|\s+$/gm,""))){var t=void 0;try{this.$parse(e).assign(this.startScope,{}),t=this.$parse(e)(this.startScope)}catch(t){throw t.message="Angular ui-scroll Adapter assignment exception.\nCan't parse \""+e+'" expression.\n'+t.message,t}angular.extend(t,this.publicContext),this.publicContext=t}}},{key:"generatePublicContext",value:function(){for(var e=this,t=["reload","applyUpdates","append","prepend","isBOF","isEOF","isEmpty"],n=t.length-1;n>=0;n--)this.publicContext[t[n]]=this[t[n]].bind(this);for(var i=["isLoading","topVisible","topVisibleElement","topVisibleScope","bottomVisible","bottomVisibleElement","bottomVisibleScope"],r=i.length-1;r>=0;r--)!function(t){var n=void 0,r=e.$attr[i[t]];Object.defineProperty(e,i[t],{get:function(){return n},set:function(o){n=o,e.publicContext[i[t]]=o,r&&e.$parse(r).assign(e.startScope,o)}})}(r);Object.defineProperty(this.publicContext,"disabled",{get:function(){return e.disabled},set:function(t){return(e.disabled=t)?null:e.doAdjust()}})}},{key:"loading",value:function(e){this.isLoading=e}},{key:"isBOF",value:function(){return this.buffer.bof}},{key:"isEOF",value:function(){return this.buffer.eof}},{key:"isEmpty",value:function(){return!this.buffer.length}},{key:"append",value:function(e){this.buffer.append(e),this.doAdjust(),this.viewport.clipTop(),this.viewport.clipBottom()}},{key:"prepend",value:function(e){this.buffer.prepend(e),this.doAdjust(),this.viewport.clipTop(),this.viewport.clipBottom()}},{key:"applyUpdates",value:function(e,t){"function"==typeof e?this.applyUpdatesFunc(e):this.applyUpdatesIndex(e,t),this.doAdjust()}},{key:"applyUpdatesFunc",value:function(e){var t=this;this.buffer.slice(0).forEach(function(n){t.applyUpdate(n,e(n.item,n.scope,n.element))})}},{key:"applyUpdatesIndex",value:function(e,t){if(e%1!=0)throw new Error("applyUpdates - "+e+" is not a valid index (should be an integer)");var n=e-this.buffer.first;n>=0&&n<this.buffer.length?this.applyUpdate(this.buffer[n],t):e>=this.buffer.getAbsMinIndex()&&e<=this.buffer.getAbsMaxIndex()&&angular.isArray(t)&&!t.length&&(this.viewport.removeCacheItem(e,e===this.buffer.minIndex),e===this.buffer.getAbsMinIndex()?this.buffer.incrementMinIndex():this.buffer.decrementMaxIndex())}},{key:"applyUpdate",value:function(e,t){var n=this;if(angular.isArray(t)){var i=this.buffer.indexOf(e);t.reverse().some(function(t){return t===e.item})||(e.op="remove",0!==i||t.length||(e._op="isTop")),t.forEach(function(t){t===e.item?i--:n.buffer.insert(i+1,t,-1===i)})}}},{key:"calculateProperties",value:function(){for(var e=null,t=0,n=!1,i=!1,r=this.buffer.length,o=0;o<r;o++){var a=this.buffer[o],u=a.element.offset().top;if(e!==u){var s=a.element.outerHeight(!0),l=this.viewport.topDataPos()+t+s;!n&&l>this.viewport.topVisiblePos()&&(n=!0,this.topVisible=a.item,this.topVisibleElement=a.element,this.topVisibleScope=a.scope),!i&&(l>=this.viewport.bottomVisiblePos()||o===r-1&&this.isEOF())&&(i=!0,this.bottomVisible=a.item,this.bottomVisibleElement=a.element,this.bottomVisibleScope=a.scope),t+=s}if(e=u,n&&i)break}}}]),e}();t.default=o}]); | ||
//# sourceMappingURL=ui-scroll.min.js.map |
{ | ||
"name": "angular-ui-scroll", | ||
"description": "AngularJS infinite scrolling module", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"src": "./src/", | ||
@@ -6,0 +6,0 @@ "public": "./dist/", |
### UI Scroll - [AngularJS](http://angularjs.org/) directive to provide infinite scroll over a limited element buffer | ||
[![Build Status](https://travis-ci.org/angular-ui/ui-scroll.svg?branch=master)](https://travis-ci.org/angular-ui/ui-scroll) | ||
[![npm version](https://badge.fury.io/js/angular-ui-scroll.svg)](http://badge.fury.io/js/angular-ui-scroll) | ||
[![Bower version](https://badge.fury.io/bo/angular-ui-scroll.svg)](http://badge.fury.io/bo/angular-ui-scroll) | ||
[![Build Status](https://travis-ci.org/angular-ui/ui-scroll.svg?branch=master)](https://travis-ci.org/angular-ui/ui-scroll) | ||
[![npm version](https://badge.fury.io/js/angular-ui-scroll.svg)](http://badge.fury.io/js/angular-ui-scroll) | ||
[![Bower version](https://badge.fury.io/bo/angular-ui-scroll.svg)](http://badge.fury.io/bo/angular-ui-scroll) | ||
[![Join the chat at https://gitter.im/angular-ui/ui-scroll](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/ui-scroll?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
@@ -84,3 +84,3 @@ | ||
_Important!_ The viewport height must be constrained. If the height of the viewport is not constrained | ||
_Important!_ The viewport height must be constrained. If the height of the viewport is not constrained | ||
(style="height:auto") it will pull the entire content of the datasource and may throw an Error depending on the number of items | ||
@@ -147,7 +147,7 @@ in the datasource. Even if it does not, using the directive this way does not provide any advantages over using ng-repeat, because | ||
- [uiScrollTd directive](#uiscrollth-and-uiscrolltd-directives) | ||
Also, there is one more additional module in a separate file: | ||
- __ui.scroll.jqlite__ module (it is empty since it was deprecated in v1.6.0) | ||
------------------- | ||
@@ -157,4 +157,4 @@ | ||
## uiScroll directive | ||
```html | ||
@@ -170,3 +170,3 @@ <div ui-scroll="item in myDatasource" | ||
### Parameters | ||
* **uiScroll – scroll expression** – The expression indicating how to enumerate a collection. Only one format is currently supported: `variable in datasource` – where variable is the user defined loop variable and datasource is the name of the data source to enumerate. | ||
@@ -276,3 +276,3 @@ * **buffer-size - expression**, optional - number of items requested from the datasource in a single request. The default is 10 and the minimal value is 3. | ||
Returns `true` if the dataset is empty and the internal buffer length = 0. Returns `false` otherwise. Mind that isEmpty() will return `true` during the **first** request is pending, so maybe it should be used together with `isLoading` property. | ||
Returns `true` if the dataset is empty and the internal buffer length = 0. Returns `false` otherwise. Mind that isEmpty() will return `true` during the **first** request is pending, so maybe it should be used together with `isLoading` property. | ||
@@ -441,15 +441,15 @@ * Method `reload` | ||
__1__. To run dev-server use | ||
``` | ||
npm start | ||
``` | ||
This should start development server on 5005 port over the [./demo](https://github.com/angular-ui/ui-scroll/tree/master/demo) folder. The dev-server proxy is configured to provide work with temporary distributive files (which are being built in-memory each time the sources from ./src have been changed) despite the direct links to public distributive files form ./dist folder. So the dist-folder should stay clear until the development is finished. | ||
__2__. To run tests in keep-alive mode use | ||
``` | ||
npm test | ||
``` | ||
This runs Karma testing against temporary distributive files that are being built in-memory by the Webpack. We created a number of specifications which consist of more than 200 tests. They are living at the [./test](https://github.com/angular-ui/ui-scroll/tree/master/test) folder. Karma watches both for ./src and ./test folders and automatically re-runs tests after the source code has been changed. | ||
@@ -466,7 +466,7 @@ | ||
__4__. To run full build process use | ||
``` | ||
npm run build | ||
``` | ||
After developing and testing are completed, the build process should be run to | ||
@@ -478,4 +478,4 @@ a) pass through jshint (both of ui-scroll and test specifications sources), | ||
Pull Rerquest should include source code (./scr) changes, may include tests (./test) changes and may not include public distributive (./dist) changes. | ||
------------------- | ||
@@ -486,2 +486,5 @@ | ||
### v1.7.2 | ||
* Fixed IE compatibility issues. | ||
### v1.7.1 | ||
@@ -491,3 +494,3 @@ * Fixed [Babel dependencies](https://github.com/angular-ui/ui-scroll/pull/195) and [CSS insertRule](https://github.com/angular-ui/ui-scroll/issues/201) issues. | ||
### v1.7.0 | ||
* Reduced dygest cycles amount. | ||
* Reduced digest cycles amount. | ||
* Refactored some core classes (Adapter, Padding). | ||
@@ -494,0 +497,0 @@ * Reconsidered min/max indices processing. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113
567
1394031
13597
4