@c8y/ng1-modules 1017.0.253 → 1017.0.255

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";!function(){function e(o){e.$inject=["$scope","$element"];var i=[250,500,1e3];function a(e){if(e.paging&&(e.paging.next||e.paging.blind))return o("More data may be available.")}return{restrict:"EA",replace:!0,templateUrl:":::PLUGIN_PATH:::/ui/views/loadmore.html",link:function(t,e,o){t.hidePageSize=!0,t.getLoadMoreTooltip=_.partial(a,t);var n=!_.isUndefined(o.changePageSize);!t.hidePageSize&&n&&(t._pageSizes=_.cloneDeep(i),t.$on("paging.statistics.pageSize",function(e){var o=parseInt(e,10),n=_.cloneDeep(i);o&&(t._pageSizes=_.without(n,o))}))},controller:e};function e(n,t){var i;function a(){var e=jQuery(t),o=_.head(e);if(!i){var n=o.querySelector(".classForObserver");(i=new IntersectionObserver(r,{root:null,rootMargin:"0px 0px 0px 0px",threshold:1})).observe(n)}}function r(e){n.paging&&n.paging.next&&e.forEach(function(e){e.isIntersecting&&n.loadNext()})}n.$watch("paging",function(e){if(e&&e.next){var o=e.next;o===_.noop?n.shouldShowLoadMore=!0:e.noPreFetch?(n.shouldShowLoadMore=!0,a()):o().then(function(e){n.shouldShowLoadMore=!_.isEmpty(e),n.shouldShowLoadMore&&a()})}else n.shouldShowLoadMore=!1})}}e.$inject=["gettext"],angular.module("c8y.ui").directive("c8yLoadMore",e)}();
1
+ "use strict";!function(){function e(t){e.$inject=["$scope","$element"];var i=[250,500,1e3];function n(e){if(e.paging&&(e.paging.next||e.paging.blind))return t("More data may be available.")}return{restrict:"EA",replace:!0,templateUrl:":::PLUGIN_PATH:::/ui/views/loadmore.html",link:function(a,e,t){Object.hasOwn(t,"cheapnextcheck")&&(a.cheapNextCheck=!0),a.hidePageSize=!0,a.getLoadMoreTooltip=_.partial(n,a);var o=!_.isUndefined(t.changePageSize);!a.hidePageSize&&o&&(a._pageSizes=_.cloneDeep(i),a.$on("paging.statistics.pageSize",function(e){var t=parseInt(e,10),o=_.cloneDeep(i);t&&(a._pageSizes=_.without(o,t))}))},controller:e};function e(o,a){var i;function n(){var e=jQuery(a),t=_.head(e);if(!i){var o=t.querySelector(".classForObserver");(i=new IntersectionObserver(r,{root:null,rootMargin:"0px 0px 0px 0px",threshold:1})).observe(o)}}function r(e){o.paging&&o.paging.next&&e.forEach(function(e){e.isIntersecting&&o.loadNext()})}o.$watch("paging",function(e){if(e&&e.next){var t=e.next;t===_.noop?o.shouldShowLoadMore=!0:e.noPreFetch?(o.shouldShowLoadMore=!0,n()):o.cheapNextCheck&&e.statistics&&e.statistics.currentPage&&e.statistics.totalPages?(o.shouldShowLoadMore=e.statistics.currentPage<e.statistics.totalPages,o.shouldShowLoadMore&&n()):t().then(function(e){o.shouldShowLoadMore=!_.isEmpty(e),o.shouldShowLoadMore&&n()})}else o.shouldShowLoadMore=!1})}}e.$inject=["gettext"],angular.module("c8y.ui").directive("c8yLoadMore",e)}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1017.0.253",
3
+ "version": "1017.0.255",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -208,4 +208,4 @@
208
208
  <div class="tip" ng-class="{ expanded: user._expanded }"></div>
209
209
  </div>
210
210
 
211
- <c8y-load-more></c8y-load-more>
211
+ <c8y-load-more cheapNextCheck></c8y-load-more>