monkey-front-core 0.0.161 → 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.
- package/esm2020/lib/core/interfaces/monkeyecx-request-paged.mjs +1 -1
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +22 -1
- package/esm2020/lib/core/services/pagination/index.mjs +2 -0
- package/esm2020/lib/core/services/pagination/monkeyecx-pagination.service.mjs +24 -0
- package/fesm2015/monkey-front-core.mjs +19 -0
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +21 -0
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/monkeyecx-request-paged.d.ts +3 -0
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +7 -0
- package/lib/core/services/pagination/index.d.ts +1 -0
- package/lib/core/services/pagination/monkeyecx-pagination.service.d.ts +9 -0
- package/monkey-front-core-0.0.162.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.161.tgz +0 -0
|
@@ -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;
|