From f0102d6fdf4064a9414c18d56f8e658379ac02ea Mon Sep 17 00:00:00 2001 From: "kim.tran" Date: Fri, 8 Mar 2024 10:15:48 +0100 Subject: [PATCH 1/2] fix: viewModeChanged type change --- .../core/components/search-header/search-header.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.ts b/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.ts index 546d28f8..8f00077b 100644 --- a/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.ts @@ -53,7 +53,7 @@ export class SearchHeaderComponent implements AfterViewInit { @Output() searched: EventEmitter = new EventEmitter() @Output() resetted: EventEmitter = new EventEmitter() @Output() selectedSearchConfigChanged: EventEmitter = new EventEmitter() - @Output() viewModeChanged: EventEmitter = new EventEmitter() + @Output() viewModeChanged: EventEmitter<'basic' | 'advanced'> = new EventEmitter() @ContentChild('additionalToolbarContent') additionalToolbarContent: TemplateRef | undefined From 355350e30c7c098cdba1c2ae9b68c1752f2e4b71 Mon Sep 17 00:00:00 2001 From: "kim.tran" Date: Fri, 8 Mar 2024 13:23:29 +0100 Subject: [PATCH 2/2] fix: search config dialog --- .../button-dialog/button-dialog.component.ts | 2 +- ...r-edit-search-config-dialog.component.html | 3 +- ...-or-edit-search-config-dialog.component.ts | 31 ++++++++++++++++--- .../page-header/page-header.component.html | 2 ++ .../page-header/page-header.component.ts | 3 ++ .../search-config/search-config.component.ts | 4 +-- .../search-header.component.html | 5 ++- .../search-header/search-header.component.ts | 6 ++++ 8 files changed, 46 insertions(+), 10 deletions(-) diff --git a/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.ts b/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.ts index 25f6b190..c9786c88 100644 --- a/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.ts @@ -140,7 +140,7 @@ export class ButtonDialogComponent implements OnInit { //populate container Object.keys(this.dialogData.componentData).forEach((k) => { - componentRef.instance[k] = this.dialogData.componentData[k] + componentRef.setInput(k, this.dialogData.componentData[k]) }) this.componentRef = componentRef } diff --git a/libs/portal-integration-angular/src/lib/core/components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component.html b/libs/portal-integration-angular/src/lib/core/components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component.html index e8b4d141..182dc5f7 100644 --- a/libs/portal-integration-angular/src/lib/core/components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component.html @@ -10,7 +10,7 @@
- +
@@ -18,7 +18,6 @@
diff --git a/libs/portal-integration-angular/src/lib/core/components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component.ts b/libs/portal-integration-angular/src/lib/core/components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component.ts index b0205c84..3ad73901 100644 --- a/libs/portal-integration-angular/src/lib/core/components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component.ts @@ -24,17 +24,40 @@ export class CreateOrEditSearchConfigDialogComponent DialogResult, DialogButtonClicked { - @Input() searchConfigName: string | undefined - @Input() saveInputValues: boolean | undefined - @Input() saveColumns: boolean | undefined - placeHolderKey = 'OCX_SEARCH_CONFIG.PLACEHOLDER' + @Input() + set searchConfigName(value: string | undefined){ + this.searchConfigFormGroup.controls['searchConfigName'].setValue(value) + } + get searchConfigName(): string | undefined { + return this.searchConfigFormGroup.controls['searchConfigName'].value + } + + @Input() + set saveInputValues(value: boolean | undefined) { + this.searchConfigFormGroup.controls['saveInputValues'].setValue(value) + } + get saveInputValues(): boolean | undefined { + return this.searchConfigFormGroup.controls['saveInputValues'].value + } + + @Input() + set saveColumns(value: boolean | undefined) { + this.searchConfigFormGroup.controls['saveColumns'].setValue(value) + } + get saveColumns(): boolean | undefined { + return this.searchConfigFormGroup.controls['saveColumns'].value + } + @Output() primaryButtonEnabled: EventEmitter = new EventEmitter() + searchConfigFormGroup: FormGroup = new FormGroup({ searchConfigName: new FormControl(''), saveInputValues: new FormControl(false), saveColumns: new FormControl(false), }) + placeHolderKey = 'OCX_SEARCH_CONFIG.PLACEHOLDER' dialogResult: CreateOrEditSearchDialogContent = { searchConfigName: '', saveInputValues: false, saveColumns: false } + constructor() { this.searchConfigFormGroup.valueChanges .pipe( diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html index 88c7a1a0..cc3fb36d 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html @@ -29,6 +29,8 @@

{{ subheader }}

+ +
diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts index 4ad11e35..db806029 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts @@ -113,6 +113,9 @@ export class PageHeaderComponent implements OnInit, OnChanges { @ContentChild('additionalToolbarContent') additionalToolbarContent: TemplateRef | undefined + @ContentChild('additionalToolbarContentLeft') + additionalToolbarContentLeft: TemplateRef | undefined + overflowActions: MenuItem[] = [] inlineActions: Action[] | undefined dd = new Date() diff --git a/libs/portal-integration-angular/src/lib/core/components/search-config/search-config.component.ts b/libs/portal-integration-angular/src/lib/core/components/search-config/search-config.component.ts index 056c0113..6eb093a3 100644 --- a/libs/portal-integration-angular/src/lib/core/components/search-config/search-config.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/search-config/search-config.component.ts @@ -23,7 +23,7 @@ export class SearchConfigComponent implements OnInit { }) } - onSearchConfigChange(searchConfig: SearchConfigInfo) { - this.selectedSearchConfigChanged?.emit(searchConfig) + onSearchConfigChange(event: { value: SearchConfigInfo }) { + this.selectedSearchConfigChanged?.emit(event.value) } } diff --git a/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.html b/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.html index b6845003..ca28b62b 100644 --- a/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.html @@ -4,9 +4,12 @@ [manualBreadcrumbs]="manualBreadcrumbs" [actions]="headerActions" > - + + + +
diff --git a/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.ts b/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.ts index 8f00077b..04eecf6c 100644 --- a/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/search-header/search-header.component.ts @@ -60,6 +60,12 @@ export class SearchHeaderComponent implements AfterViewInit { get _additionalToolbarContent(): TemplateRef | undefined { return this.additionalToolbarContent } + @ContentChild('additionalToolbarContentLeft') + additionalToolbarContentLeft: TemplateRef | undefined + + get _additionalToolbarContentLeft(): TemplateRef | undefined { + return this.additionalToolbarContentLeft + } @ViewChild('searchParameterFields') searchParameterFields: ElementRef | undefined