@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(
|
|
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