@valtimo/dossier 5.7.0 → 5.8.0
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/dossier-list/dossier-list.component.mjs +7 -7
- package/fesm2015/valtimo-dossier.mjs +6 -6
- package/fesm2015/valtimo-dossier.mjs.map +1 -1
- package/fesm2020/valtimo-dossier.mjs +6 -6
- package/fesm2020/valtimo-dossier.mjs.map +1 -1
- package/lib/dossier-list/dossier-list.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -432,7 +432,7 @@ class DossierListComponent {
|
|
|
432
432
|
]).pipe(filter(([pagination]) => !!pagination), map(([pagination, documentDefinitionName, sequence, createdBy, globalSearchFilter]) => new DocumentSearchRequestImpl(documentDefinitionName, pagination.page - 1, pagination.size, sequence, createdBy, globalSearchFilter, pagination.sort)));
|
|
433
433
|
this.documentsRequest$ = this.documentSearchRequest$.pipe(distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)), tap(request => {
|
|
434
434
|
this.storedSearchRequestKey$.pipe(take(1)).subscribe(storedSearchRequestKey => {
|
|
435
|
-
this.logger.
|
|
435
|
+
this.logger.debug(`store request in local storage: ${JSON.stringify(request)}`);
|
|
436
436
|
localStorage.setItem(storedSearchRequestKey, JSON.stringify(request));
|
|
437
437
|
});
|
|
438
438
|
}), switchMap(documentSearchRequest => this.documentService.getDocuments(documentSearchRequest)), tap(documents => {
|
|
@@ -457,7 +457,7 @@ class DossierListComponent {
|
|
|
457
457
|
pageChange(newPage) {
|
|
458
458
|
this.pagination$.pipe(take(1)).subscribe(pagination => {
|
|
459
459
|
if (pagination && pagination.page !== newPage) {
|
|
460
|
-
this.logger.
|
|
460
|
+
this.logger.debug(`Page change: ${newPage}`);
|
|
461
461
|
this.pagination$.next({ ...pagination, page: newPage });
|
|
462
462
|
}
|
|
463
463
|
});
|
|
@@ -467,7 +467,7 @@ class DossierListComponent {
|
|
|
467
467
|
if (pagination && pagination.size !== newPageSize) {
|
|
468
468
|
const amountOfAvailablePages = Math.ceil(pagination.collectionSize / newPageSize);
|
|
469
469
|
const newPage = amountOfAvailablePages < pagination.page ? amountOfAvailablePages : pagination.page;
|
|
470
|
-
this.logger.
|
|
470
|
+
this.logger.debug(`Page size change. New Page: ${newPage} New page size: ${newPageSize}`);
|
|
471
471
|
this.pagination$.next({ ...pagination, size: newPageSize, page: newPage });
|
|
472
472
|
}
|
|
473
473
|
});
|
|
@@ -475,7 +475,7 @@ class DossierListComponent {
|
|
|
475
475
|
sortChanged(newSortState) {
|
|
476
476
|
this.pagination$.pipe(take(1)).subscribe(pagination => {
|
|
477
477
|
if (pagination && JSON.stringify(pagination.sort) !== JSON.stringify(newSortState)) {
|
|
478
|
-
this.logger.
|
|
478
|
+
this.logger.debug(`Sort state change: ${JSON.stringify(newSortState)}`);
|
|
479
479
|
this.pagination$.next({ ...pagination, sort: newSortState });
|
|
480
480
|
}
|
|
481
481
|
});
|
|
@@ -513,7 +513,7 @@ class DossierListComponent {
|
|
|
513
513
|
this.settingPaginationForDocName$.pipe(take(1)).subscribe(settingPaginationForDocName => {
|
|
514
514
|
if (documentDefinitionName !== settingPaginationForDocName) {
|
|
515
515
|
this.pagination$.next(undefined);
|
|
516
|
-
this.logger.
|
|
516
|
+
this.logger.debug('clear pagination');
|
|
517
517
|
this.settingPaginationForDocName$.next(documentDefinitionName);
|
|
518
518
|
this.setPagination(documentDefinitionName);
|
|
519
519
|
}
|
|
@@ -525,7 +525,7 @@ class DossierListComponent {
|
|
|
525
525
|
.subscribe(([hasStoredSearchRequest, storedSearchRequestKey, columns]) => {
|
|
526
526
|
const defaultPagination = this.getDefaultPagination(columns);
|
|
527
527
|
const storedPagination = this.getStoredPagination(hasStoredSearchRequest, storedSearchRequestKey);
|
|
528
|
-
this.logger.
|
|
528
|
+
this.logger.debug(`Set pagination: ${JSON.stringify(storedPagination || defaultPagination)}`);
|
|
529
529
|
this.pagination$.next(storedPagination || defaultPagination);
|
|
530
530
|
});
|
|
531
531
|
}
|