monkey-front-core 0.0.159 → 0.0.162

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.
@@ -2254,6 +2254,9 @@ class MonkeyEcxCommonsService {
2254
2254
  });
2255
2255
  }
2256
2256
  }
2257
+ handlePaginationOptions(service, callback) {
2258
+ service.setCallback(callback);
2259
+ }
2257
2260
  setPage(requestPaged) {
2258
2261
  this.__requestPaged = {
2259
2262
  ...this.__requestPaged,
@@ -2343,6 +2346,12 @@ class MonkeyEcxCommonsService {
2343
2346
  if (otherArgs?.callbackPagination) {
2344
2347
  this.__callbackPagination = otherArgs.callbackPagination;
2345
2348
  }
2349
+ if (otherArgs?.paginationOptions) {
2350
+ const { service, callback } = otherArgs.paginationOptions;
2351
+ service.setCallback((type) => {
2352
+ this.doPaginationv2.bind(this, type, callback);
2353
+ });
2354
+ }
2346
2355
  if (otherArgs?.feature) {
2347
2356
  const { flag, service } = otherArgs.feature;
2348
2357
  service.onFlags
@@ -2412,6 +2421,18 @@ class MonkeyEcxCommonsService {
2412
2421
  }
2413
2422
  }
2414
2423
  }
2424
+ doPaginationv2(type, callback) {
2425
+ if (!this.__onLoadingInProgress$.value) {
2426
+ const hasMorePages = this.setPage({
2427
+ page: {
2428
+ ...this.__page
2429
+ }
2430
+ }).nextPage();
2431
+ if (hasMorePages && callback) {
2432
+ callback();
2433
+ }
2434
+ }
2435
+ }
2415
2436
  setSearchByUrl(router, url, search, extras) {
2416
2437
  this.__data = null;
2417
2438
  this.__page = null;