monkey-front-core 0.0.165 → 0.0.166

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.
@@ -2145,6 +2145,7 @@ class MonkeyEcxCommonsService {
2145
2145
  // eslint-disable-next-line no-console
2146
2146
  return console.error('Method callbackPagination needs to be declared');
2147
2147
  };
2148
+ this.__isAbleToDoPagination = {};
2148
2149
  this.handleInit();
2149
2150
  }
2150
2151
  handleInit() {
@@ -2254,11 +2255,14 @@ class MonkeyEcxCommonsService {
2254
2255
  });
2255
2256
  }
2256
2257
  }
2257
- handlePaginationOptions(args) {
2258
- const { service, callback } = args;
2259
- service.setCallback((type) => {
2260
- this.doPaginationv2(type, callback);
2261
- });
2258
+ handlePaginationOptions() {
2259
+ const { __paginationOptions } = this;
2260
+ if (__paginationOptions) {
2261
+ const { service, callback } = __paginationOptions;
2262
+ service?.setCallback((type) => {
2263
+ this.doPaginationv2(type, callback);
2264
+ });
2265
+ }
2262
2266
  }
2263
2267
  setPage(requestPaged) {
2264
2268
  this.__requestPaged = {
@@ -2350,7 +2354,8 @@ class MonkeyEcxCommonsService {
2350
2354
  this.__callbackPagination = otherArgs.callbackPagination;
2351
2355
  }
2352
2356
  if (otherArgs?.paginationOptions) {
2353
- this.handlePaginationOptions(otherArgs?.paginationOptions);
2357
+ this.__paginationOptions = otherArgs?.paginationOptions;
2358
+ this.handlePaginationOptions();
2354
2359
  }
2355
2360
  if (otherArgs?.feature) {
2356
2361
  const { flag, service } = otherArgs.feature;
@@ -2433,6 +2438,13 @@ class MonkeyEcxCommonsService {
2433
2438
  }
2434
2439
  }
2435
2440
  }
2441
+ setLinks(links) {
2442
+ this.__isAbleToDoPagination = {
2443
+ first: !!links?.first,
2444
+ next: !!links?.next
2445
+ };
2446
+ this.__links = links;
2447
+ }
2436
2448
  setSearchByUrl(router, url, search, extras) {
2437
2449
  this.__data = null;
2438
2450
  this.__page = null;