From 7a5cf7c813e4b935256b9b3b12c38c8a0b448b6a Mon Sep 17 00:00:00 2001 From: markuczy Date: Mon, 17 Jun 2024 13:19:33 +0200 Subject: [PATCH] feat: dialog service enchancements --- .../button-dialog/button-dialog.component.html | 10 ++++++++-- .../button-dialog/button-dialog.component.scss | 5 +++++ .../button-dialog/button-dialog.component.ts | 1 + .../dialog-message-content.component.html | 4 ++-- .../src/lib/model/button-dialog.ts | 2 ++ .../src/lib/services/portal-dialog.service.ts | 4 ++++ 6 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.scss 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 0f8b1934..4c7b2674 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 @@ -1,6 +1,8 @@
- - +
+ + +
diff --git a/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.scss b/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.scss new file mode 100644 index 00000000..3eeb0e83 --- /dev/null +++ b/libs/portal-integration-angular/src/lib/core/components/button-dialog/button-dialog.component.scss @@ -0,0 +1,5 @@ +.buttonDialogScrollableContent { + overflow: auto; + max-height: 500px; + margin-bottom: 20px; +} \ No newline at end of file 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 c9786c88..1629d4fa 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 @@ -24,6 +24,7 @@ import { @Component({ selector: 'ocx-button-dialog', templateUrl: './button-dialog.component.html', + styleUrls: ['./button-dialog.component.scss'], }) export class ButtonDialogComponent implements OnInit { defaultPrimaryButtonDetails: ButtonDialogButtonDetails = { diff --git a/libs/portal-integration-angular/src/lib/core/components/button-dialog/dialog-message-content/dialog-message-content.component.html b/libs/portal-integration-angular/src/lib/core/components/button-dialog/dialog-message-content/dialog-message-content.component.html index 066a540a..d2acbbea 100644 --- a/libs/portal-integration-angular/src/lib/core/components/button-dialog/dialog-message-content/dialog-message-content.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/button-dialog/dialog-message-content/dialog-message-content.component.html @@ -1,6 +1,6 @@
-

+
{{message | translate:messageParameters}} -

+
\ No newline at end of file diff --git a/libs/portal-integration-angular/src/lib/model/button-dialog.ts b/libs/portal-integration-angular/src/lib/model/button-dialog.ts index 8811c973..a3dc828c 100644 --- a/libs/portal-integration-angular/src/lib/model/button-dialog.ts +++ b/libs/portal-integration-angular/src/lib/model/button-dialog.ts @@ -24,6 +24,8 @@ export interface ButtonDialogButtonDetails { key: string icon?: PrimeIcon parameters?: Record + tooltipKey?: string + tooltipPosition?: 'right' | 'left' | 'top' | 'bottom' | string | undefined } export interface ButtonDialogConfig { diff --git a/libs/portal-integration-angular/src/lib/services/portal-dialog.service.ts b/libs/portal-integration-angular/src/lib/services/portal-dialog.service.ts index 9ccd0ba7..7f2412bc 100644 --- a/libs/portal-integration-angular/src/lib/services/portal-dialog.service.ts +++ b/libs/portal-integration-angular/src/lib/services/portal-dialog.service.ts @@ -274,12 +274,16 @@ export class PortalDialogService { * const primaryButton = { * key: 'OK_BUTTON', * icon: PrimeIcons.CHECK + * tooltipKey: 'OK_TOOLTIP', + * tooltipPosition: 'bottom' * } * * // Refresh button with refresh icon * const secondaryButton = { * key: 'REFRESH_BUTTON', * icon: PrimeIcons.REFRESH + * tooltipKey: 'REFRESH_TOOLTIP', + * tooltipPosition: 'right' * } * * this.portalDialogService.openDialog('TITLE_KEY', 'WELCOME_MESSAGE', primaryButton, secondaryButton).subscribe((stateOnClose) => {