@indigina/ui-kit 1.1.636 → 1.1.637
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.
|
@@ -15179,7 +15179,7 @@ class KitGridViewsComponent {
|
|
|
15179
15179
|
new FetchGridViewsConfig(this.viewConfigGroup()),
|
|
15180
15180
|
]).subscribe(() => {
|
|
15181
15181
|
const views = this.store.selectSnapshot(KitGridViewsState.getViews());
|
|
15182
|
-
const viewName = this.activatedRoute.snapshot.params['view'] ?? this.activatedRoute.snapshot.data['view'];
|
|
15182
|
+
const viewName = this.activatedRoute.snapshot.params['view'] ?? this.activatedRoute.snapshot.data?.['view'] ?? '';
|
|
15183
15183
|
this.handleViewChange(views, viewName);
|
|
15184
15184
|
});
|
|
15185
15185
|
}
|
|
@@ -15190,7 +15190,7 @@ class KitGridViewsComponent {
|
|
|
15190
15190
|
return;
|
|
15191
15191
|
}
|
|
15192
15192
|
const views = this.store.selectSnapshot(KitGridViewsState.getViews());
|
|
15193
|
-
const viewName =
|
|
15193
|
+
const viewName = this.activatedRoute.snapshot.params['view'] ?? this.activatedRoute.snapshot.data?.['view'] ?? '';
|
|
15194
15194
|
this.handleViewChange(views, viewName);
|
|
15195
15195
|
});
|
|
15196
15196
|
}
|
|
@@ -15206,6 +15206,13 @@ class KitGridViewsComponent {
|
|
|
15206
15206
|
});
|
|
15207
15207
|
}
|
|
15208
15208
|
handleViewChange(views, viewName = '') {
|
|
15209
|
+
if (!viewName) {
|
|
15210
|
+
const firstView = views.find(view => !view.hidden);
|
|
15211
|
+
if (firstView) {
|
|
15212
|
+
void this.navigateToView(firstView.title, firstView.type, this.buildUrlParamsFromView(firstView.viewState));
|
|
15213
|
+
}
|
|
15214
|
+
return;
|
|
15215
|
+
}
|
|
15209
15216
|
if (viewName !== viewName.toLowerCase()) {
|
|
15210
15217
|
this.navigateToView(viewName, this.selectedView()?.type);
|
|
15211
15218
|
return;
|
|
@@ -15258,7 +15265,9 @@ class KitGridViewsComponent {
|
|
|
15258
15265
|
}
|
|
15259
15266
|
navigateToView(viewName, type = KitGridViewType.USER, params = {}) {
|
|
15260
15267
|
const routePath = kitEncodeViewNameToUrl(viewName.toLowerCase());
|
|
15261
|
-
|
|
15268
|
+
const hasView = !!(this.activatedRoute.snapshot.params['view'] ?? this.activatedRoute.snapshot.data?.['view']);
|
|
15269
|
+
const relativePrefix = hasView ? '../' : './';
|
|
15270
|
+
return this.router.navigate([`${relativePrefix}${routePath}`], {
|
|
15262
15271
|
relativeTo: this.activatedRoute,
|
|
15263
15272
|
queryParams: { ...params, type },
|
|
15264
15273
|
queryParamsHandling: 'merge',
|