diff --git a/libs/angular-accelerator/src/lib/components/column-group-selection/column-group-selection.component.html b/libs/angular-accelerator/src/lib/components/column-group-selection/column-group-selection.component.html index d24689c4..1682e3dc 100644 --- a/libs/angular-accelerator/src/lib/components/column-group-selection/column-group-selection.component.html +++ b/libs/angular-accelerator/src/lib/components/column-group-selection/column-group-selection.component.html @@ -2,11 +2,9 @@ diff --git a/libs/angular-accelerator/src/lib/components/column-group-selection/column-group-selection.component.ts b/libs/angular-accelerator/src/lib/components/column-group-selection/column-group-selection.component.ts index 70d9a77f..5d49730d 100644 --- a/libs/angular-accelerator/src/lib/components/column-group-selection/column-group-selection.component.ts +++ b/libs/angular-accelerator/src/lib/components/column-group-selection/column-group-selection.component.ts @@ -20,6 +20,11 @@ export class ColumnGroupSelectionComponent implements OnInit { } set selectedGroupKey(value: string) { this.selectedGroupKey$.next(value) + if (this.selectedGroupKey === this.customGroupKey) { + this.componentStateChanged.emit({ + activeColumnGroupKey: value, + }) + } } columns$ = new BehaviorSubject([]) @@ -51,13 +56,19 @@ export class ColumnGroupSelectionComponent implements OnInit { .filter((value, index, self) => self.indexOf(value) === index && value != null) ) ) - const activeColumns = this.columns.filter((c) => - c.predefinedGroupKeys?.includes(this.selectedGroupKey$.getValue() ?? this.defaultGroupKey) - ) - this.componentStateChanged.emit({ - activeColumnGroupKey: this.selectedGroupKey, - displayedColumns: activeColumns, - }) + if (this.selectedGroupKey === this.customGroupKey) { + this.componentStateChanged.emit({ + activeColumnGroupKey: this.selectedGroupKey, + }) + } else { + const activeColumns = this.columns.filter((c) => + c.predefinedGroupKeys?.includes(this.selectedGroupKey$.getValue() ?? this.defaultGroupKey) + ) + this.componentStateChanged.emit({ + activeColumnGroupKey: this.selectedGroupKey, + displayedColumns: activeColumns, + }) + } } changeGroupSelection(event: { value: string }) { @@ -71,16 +82,4 @@ export class ColumnGroupSelectionComponent implements OnInit { displayedColumns: activeColumns, }) } - - clearGroupSelection() { - let activeColumns = this.columns - if (this.defaultGroupKey) { - activeColumns = this.columns.filter((column) => column.predefinedGroupKeys?.includes(this.defaultGroupKey)) - } - this.groupSelectionChanged.emit({ activeColumns, groupKey: this.defaultGroupKey }) - this.componentStateChanged.emit({ - activeColumnGroupKey: this.defaultGroupKey, - displayedColumns: activeColumns, - }) - } } diff --git a/libs/angular-accelerator/src/lib/components/custom-group-column-selector/custom-group-column-selector.component.ts b/libs/angular-accelerator/src/lib/components/custom-group-column-selector/custom-group-column-selector.component.ts index a9e550f2..36640e64 100644 --- a/libs/angular-accelerator/src/lib/components/custom-group-column-selector/custom-group-column-selector.component.ts +++ b/libs/angular-accelerator/src/lib/components/custom-group-column-selector/custom-group-column-selector.component.ts @@ -39,6 +39,7 @@ export class CustomGroupColumnSelectorComponent implements OnInit { displayedColumns: this._displayedColumns, }) } + @Input() customGroupKey = '' @Input() dialogTitle = '' @Input() dialogTitleKey = '' @Input() openButtonTitle = '' @@ -139,6 +140,7 @@ export class CustomGroupColumnSelectorComponent implements OnInit { frozen: this.frozenActionColumnModel, position: this.actionColumnPositionModel, }, + activeColumnGroupKey: this.customGroupKey, }) } } diff --git a/libs/angular-accelerator/src/lib/components/interactive-data-view/interactive-data-view.component.html b/libs/angular-accelerator/src/lib/components/interactive-data-view/interactive-data-view.component.html index f7033389..d76c4320 100644 --- a/libs/angular-accelerator/src/lib/components/interactive-data-view/interactive-data-view.component.html +++ b/libs/angular-accelerator/src/lib/components/interactive-data-view/interactive-data-view.component.html @@ -51,6 +51,7 @@ *ngIf="layout === 'table'" [columns]="columns" [displayedColumns]="(displayedColumns$ | async) ?? []" + [customGroupKey]="customGroupKey" (columnSelectionChanged)="onColumnSelectionChange($event)" [frozenActionColumn]="frozenActionColumn" [actionColumnPosition]="actionColumnPosition" diff --git a/libs/angular-accelerator/src/lib/utils/create-remote-component-translate-loader.utils.ts b/libs/angular-accelerator/src/lib/utils/create-remote-component-translate-loader.utils.ts index 3c5d1e48..4ca68c3a 100644 --- a/libs/angular-accelerator/src/lib/utils/create-remote-component-translate-loader.utils.ts +++ b/libs/angular-accelerator/src/lib/utils/create-remote-component-translate-loader.utils.ts @@ -32,6 +32,8 @@ export function createRemoteComponentTranslateLoader( Location.joinWithSlash(baseUrl, `onecx-portal-lib/assets/i18n/`), '.json' ), + // translations of portal-integration-angular of shell + new CachingTranslateLoader(ts, http, `./onecx-portal-lib/assets/i18n/`, '.json'), // translations of the app new CachingTranslateLoader(ts, http, Location.joinWithSlash(baseUrl, `assets/i18n/`), '.json') ) diff --git a/libs/angular-accelerator/src/lib/utils/create-translate-loader.utils.spec.ts b/libs/angular-accelerator/src/lib/utils/create-translate-loader.utils.spec.ts index 128ad889..a5722888 100644 --- a/libs/angular-accelerator/src/lib/utils/create-translate-loader.utils.spec.ts +++ b/libs/angular-accelerator/src/lib/utils/create-translate-loader.utils.spec.ts @@ -40,7 +40,7 @@ describe('CreateTranslateLoader', () => { ) translateLoader.getTranslation('en').subscribe(() => { - expect(httpClientMock.get).toHaveBeenCalledTimes(4) + expect(httpClientMock.get).toHaveBeenCalledTimes(5) done() }) }) @@ -70,7 +70,7 @@ describe('CreateTranslateLoader', () => { ) translateLoader.getTranslation('en').subscribe(() => { - expect(httpClientMock.get).toHaveBeenCalledTimes(4) + expect(httpClientMock.get).toHaveBeenCalledTimes(5) done() }) }) diff --git a/libs/angular-accelerator/src/lib/utils/create-translate-loader.utils.ts b/libs/angular-accelerator/src/lib/utils/create-translate-loader.utils.ts index 296ccde0..9b63d44c 100644 --- a/libs/angular-accelerator/src/lib/utils/create-translate-loader.utils.ts +++ b/libs/angular-accelerator/src/lib/utils/create-translate-loader.utils.ts @@ -34,6 +34,8 @@ export function createTranslateLoader( Location.joinWithSlash(currentMfe.remoteBaseUrl, `onecx-portal-lib/assets/i18n/`), '.json' ), + // translations of portal-integration-angular of shell + new CachingTranslateLoader(ts, http, `./onecx-portal-lib/assets/i18n/`, '.json'), // Primelocale Translations new CachingTranslateLoader( ts, diff --git a/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.html b/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.html index ec990a1b..d4c2a8ef 100644 --- a/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.html @@ -18,7 +18,7 @@