@acorex/platform 20.9.12 → 20.9.14
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/fesm2022/acorex-platform-common.mjs +86 -6
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +54 -0
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +12 -3
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-layout-entity.d.ts +16 -1
|
@@ -5470,6 +5470,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5470
5470
|
this.lastAppliedSortKey = null;
|
|
5471
5471
|
this.lastAppliedFilterKey = null;
|
|
5472
5472
|
this.hasQueryParamsFilters = false; // Flag to prevent overriding queryParams filters
|
|
5473
|
+
this.routeQueryContextKey = null;
|
|
5473
5474
|
/** Persisted expanded row ids for hierarchical lists (per view). */
|
|
5474
5475
|
this.expandedRowIds = signal([], ...(ngDevMode ? [{ debugName: "expandedRowIds" }] : /* istanbul ignore next */ []));
|
|
5475
5476
|
/** When true, row expand/collapse is not written to user settings (restore in progress). */
|
|
@@ -6287,6 +6288,59 @@ class AXPEntityMasterListViewModel {
|
|
|
6287
6288
|
}
|
|
6288
6289
|
return false;
|
|
6289
6290
|
}
|
|
6291
|
+
/**
|
|
6292
|
+
* Records the current route query context after initial resolver / view init so the first
|
|
6293
|
+
* subscription emission does not re-sync unnecessarily.
|
|
6294
|
+
*/
|
|
6295
|
+
markRouteQueryContextSynced(queryParamMap) {
|
|
6296
|
+
this.routeQueryContextKey = this.buildRouteQueryContextKey(queryParamMap);
|
|
6297
|
+
}
|
|
6298
|
+
/**
|
|
6299
|
+
* Reacts to any route query param change while the list route is reused (`reuse: queryParamsChange`).
|
|
6300
|
+
* Handles known keys (`view`, `filters`) and re-evaluates view visibility for expression-driven params.
|
|
6301
|
+
*/
|
|
6302
|
+
async syncFromRouteQueryParams(queryParamMap) {
|
|
6303
|
+
const contextKey = this.buildRouteQueryContextKey(queryParamMap);
|
|
6304
|
+
if (contextKey === this.routeQueryContextKey) {
|
|
6305
|
+
return { reloadList: false };
|
|
6306
|
+
}
|
|
6307
|
+
this.routeQueryContextKey = contextKey;
|
|
6308
|
+
const previousViewName = this.view().name;
|
|
6309
|
+
await this.setView(queryParamMap.get('view'));
|
|
6310
|
+
const filtersChanged = await this.syncFiltersFromRouteQueryParam(queryParamMap.get('filters'));
|
|
6311
|
+
await this.refreshVisibleViews();
|
|
6312
|
+
const viewChanged = this.view().name !== previousViewName;
|
|
6313
|
+
if (filtersChanged || viewChanged) {
|
|
6314
|
+
this.lastAppliedFilterKey = null;
|
|
6315
|
+
this.lastAppliedSortKey = null;
|
|
6316
|
+
await this.applyFilterAndSort();
|
|
6317
|
+
}
|
|
6318
|
+
return { reloadList: true };
|
|
6319
|
+
}
|
|
6320
|
+
buildRouteQueryContextKey(queryParamMap) {
|
|
6321
|
+
return [...queryParamMap.keys]
|
|
6322
|
+
.sort()
|
|
6323
|
+
.map((key) => `${key}=${queryParamMap.get(key) ?? ''}`)
|
|
6324
|
+
.join('&');
|
|
6325
|
+
}
|
|
6326
|
+
async syncFiltersFromRouteQueryParam(filtersJson) {
|
|
6327
|
+
const nextCanonical = AXPEntityMasterListViewModel.parseQueryParamFiltersToCanonical(filtersJson);
|
|
6328
|
+
const currentCanonical = this.hasQueryParamsFilters
|
|
6329
|
+
? this.filtersQueryParamCanonical(this.filterQueries())
|
|
6330
|
+
: null;
|
|
6331
|
+
if (nextCanonical === currentCanonical) {
|
|
6332
|
+
return false;
|
|
6333
|
+
}
|
|
6334
|
+
if (!filtersJson) {
|
|
6335
|
+
if (this.hasQueryParamsFilters) {
|
|
6336
|
+
this.hasQueryParamsFilters = false;
|
|
6337
|
+
await this.applyViewFilters();
|
|
6338
|
+
return true;
|
|
6339
|
+
}
|
|
6340
|
+
return false;
|
|
6341
|
+
}
|
|
6342
|
+
return this.applyFiltersFromQueryParams(filtersJson);
|
|
6343
|
+
}
|
|
6290
6344
|
/**
|
|
6291
6345
|
* Loads host and merge-detail related sortable field definitions (async registry resolution).
|
|
6292
6346
|
*/
|