monkey-front-core 0.0.160 → 0.0.163
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.163.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-core-0.0.160.tgz +0 -0
|
@@ -2254,6 +2254,12 @@ class MonkeyEcxCommonsService {
|
|
|
2254
2254
|
});
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
|
+
handlePaginationOptions(args) {
|
|
2258
|
+
const { service, callback } = args;
|
|
2259
|
+
service.setCallback((type) => {
|
|
2260
|
+
this.doPaginationv2.bind(this, type, callback);
|
|
2261
|
+
});
|
|
2262
|
+
}
|
|
2257
2263
|
setPage(requestPaged) {
|
|
2258
2264
|
this.__requestPaged = {
|
|
2259
2265
|
...this.__requestPaged,
|
|
@@ -2343,6 +2349,9 @@ class MonkeyEcxCommonsService {
|
|
|
2343
2349
|
if (otherArgs?.callbackPagination) {
|
|
2344
2350
|
this.__callbackPagination = otherArgs.callbackPagination;
|
|
2345
2351
|
}
|
|
2352
|
+
if (otherArgs?.paginationOptions) {
|
|
2353
|
+
this.handlePaginationOptions(otherArgs?.paginationOptions);
|
|
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;
|