From f7e2f51984260111788b9eda40fcfbae321a1610 Mon Sep 17 00:00:00 2001 From: AndyKIron Date: Sun, 8 Oct 2023 13:03:53 +0300 Subject: [PATCH] chore(isct-63): added attribution to the modal component --- .../modal-footer/modal-footer.component.html | 4 +++- .../components/modal-footer/modal-footer.component.ts | 11 ++++++++++- .../modal-header/modal-header.component.html | 3 ++- .../components/modal-header/modal-header.component.ts | 11 ++++++++++- .../components/modal/v3/modal.component.html | 4 +++- projects/fusion-ui/entities/test-ids-modifiers.ts | 5 ++--- 6 files changed, 30 insertions(+), 8 deletions(-) diff --git a/projects/fusion-ui/components/modal/v3/components/modal-footer/modal-footer.component.html b/projects/fusion-ui/components/modal/v3/components/modal-footer/modal-footer.component.html index d3610ca04..dbf7e7b17 100644 --- a/projects/fusion-ui/components/modal/v3/components/modal-footer/modal-footer.component.html +++ b/projects/fusion-ui/components/modal/v3/components/modal-footer/modal-footer.component.html @@ -1,6 +1,7 @@ diff --git a/projects/fusion-ui/components/modal/v3/components/modal-header/modal-header.component.ts b/projects/fusion-ui/components/modal/v3/components/modal-header/modal-header.component.ts index 9367989db..f72decea4 100644 --- a/projects/fusion-ui/components/modal/v3/components/modal-header/modal-header.component.ts +++ b/projects/fusion-ui/components/modal/v3/components/modal-header/modal-header.component.ts @@ -1,5 +1,6 @@ -import {Component, EventEmitter, Input, Output} from '@angular/core'; +import {Component, EventEmitter, Injector, Input, Output} from '@angular/core'; import {BehaviorSubject} from 'rxjs'; +import {ModalTestIdModifiers, TestIdsService} from '@ironsource/fusion-ui'; @Component({ selector: 'fusion-modal-header', @@ -9,6 +10,7 @@ import {BehaviorSubject} from 'rxjs'; export class ModalHeaderComponent { @Input() headerText: string; @Input() showCloseButton = true; + @Input() testId: string; private _infoText: string; @Input() set infoText(value: string) { @@ -18,10 +20,17 @@ export class ModalHeaderComponent { return this._infoText; } + /** @internal */ + modalTestIdModifiers: typeof ModalTestIdModifiers = ModalTestIdModifiers; + /** @internal */ + testIdsService: TestIdsService = this.injector.get(TestIdsService); + /** @internal */ closeButtonIcon = {iconName: 'close', iconVersion: 'v3'}; /** @internal */ infoIcon = {iconName: 'info', iconVersion: 'v3'}; @Output() close = new EventEmitter(); + + constructor(private injector: Injector) {} } diff --git a/projects/fusion-ui/components/modal/v3/modal.component.html b/projects/fusion-ui/components/modal/v3/modal.component.html index 5e654be33..4c9cc64a4 100644 --- a/projects/fusion-ui/components/modal/v3/modal.component.html +++ b/projects/fusion-ui/components/modal/v3/modal.component.html @@ -1,12 +1,13 @@