monkey-front-core 0.0.164 → 0.0.167
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.
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +20 -13
- package/fesm2015/monkey-front-core.mjs +19 -10
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +19 -12
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +6 -0
- package/monkey-front-core-0.0.167.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.164.tgz +0 -0
|
@@ -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(
|
|
2258
|
-
const {
|
|
2259
|
-
|
|
2260
|
-
|
|
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.
|
|
2357
|
+
this.__paginationOptions = otherArgs?.paginationOptions;
|
|
2358
|
+
this.handlePaginationOptions();
|
|
2354
2359
|
}
|
|
2355
2360
|
if (otherArgs?.feature) {
|
|
2356
2361
|
const { flag, service } = otherArgs.feature;
|
|
@@ -2423,16 +2428,18 @@ class MonkeyEcxCommonsService {
|
|
|
2423
2428
|
}
|
|
2424
2429
|
doPaginationv2(type, callback) {
|
|
2425
2430
|
if (!this.__onLoadingInProgress$.value) {
|
|
2426
|
-
|
|
2427
|
-
page: {
|
|
2428
|
-
...this.__page
|
|
2429
|
-
}
|
|
2430
|
-
}).nextPage();
|
|
2431
|
-
if (hasMorePages && callback) {
|
|
2431
|
+
if (callback) {
|
|
2432
2432
|
callback();
|
|
2433
2433
|
}
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
2436
|
+
setLinks(links) {
|
|
2437
|
+
this.__isAbleToDoPagination = {
|
|
2438
|
+
first: !!links?.first,
|
|
2439
|
+
next: !!links?.next
|
|
2440
|
+
};
|
|
2441
|
+
this.__links = links;
|
|
2442
|
+
}
|
|
2436
2443
|
setSearchByUrl(router, url, search, extras) {
|
|
2437
2444
|
this.__data = null;
|
|
2438
2445
|
this.__page = null;
|