@quadrel-enterprise-ui/framework 21.4.4 → 21.4.5
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.
|
@@ -25736,6 +25736,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
25736
25736
|
*/
|
|
25737
25737
|
const QD_TABLE_DATA_RESOLVER_TOKEN = new InjectionToken('QD_TABLE_DATA_RESOLVER_TOKEN');
|
|
25738
25738
|
|
|
25739
|
+
/**
|
|
25740
|
+
* Resolves table data through the consumer's `QdTableDataResolver` and writes the result into the table store.
|
|
25741
|
+
*
|
|
25742
|
+
* #### Internal invariant
|
|
25743
|
+
*
|
|
25744
|
+
* Both streams wait for resolution criteria from the store and only resolve once criteria arrive.
|
|
25745
|
+
* The store yields criteria only while `pageIndex` and `pageSize` are set for this table. A resolver
|
|
25746
|
+
* result without `size` therefore stores `pageSize: undefined` and silences every later refresh,
|
|
25747
|
+
* because the stream keeps waiting for criteria that never come again. `handleResolverResult`
|
|
25748
|
+
* guards against that, so a broken result surfaces as an error instead of a table that stops
|
|
25749
|
+
* reacting without a trace.
|
|
25750
|
+
*/
|
|
25739
25751
|
class QdTableResolverService {
|
|
25740
25752
|
tableDataResolver = inject(QD_TABLE_DATA_RESOLVER_TOKEN, { optional: true });
|
|
25741
25753
|
tableStoreService = inject(QdTableStoreService);
|
|
@@ -25818,6 +25830,9 @@ class QdTableResolverService {
|
|
|
25818
25830
|
if (!result?.data)
|
|
25819
25831
|
throw new Error('Quadrel Framework | QdTable - Resolver result has no data.');
|
|
25820
25832
|
const { page, data, size, totalElements } = result;
|
|
25833
|
+
if (this._hasPagination && size === undefined)
|
|
25834
|
+
throw new Error('Quadrel Framework | QdTable - The QdTableDataResolver returned a result without "size". ' +
|
|
25835
|
+
'A paginated table stores it to resolve the next page and stops resolving without it.');
|
|
25821
25836
|
if (this.isOnEmptyPageWithRemainingEntries(result)) {
|
|
25822
25837
|
const lastValidPage = Math.ceil(totalElements / size) - 1;
|
|
25823
25838
|
this._isNavigatingToValidPage = true;
|
|
@@ -27412,7 +27427,7 @@ class QdTableComponent {
|
|
|
27412
27427
|
}
|
|
27413
27428
|
if (changes['config'] &&
|
|
27414
27429
|
!changes['config'].firstChange &&
|
|
27415
|
-
|
|
27430
|
+
!qdIsDeepEqual(changes['config'].previousValue, changes['config'].currentValue)) {
|
|
27416
27431
|
this.updateResponsiveRowServiceTableConfig();
|
|
27417
27432
|
this.updateFillingWidthServiceTableConfig();
|
|
27418
27433
|
}
|