Skip to content

[NAE-1907] - Prompt user before leaving/reloading site when data does not need to be saved #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: release/6.4.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion projects/nae-example-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import {
ViewService,
ProfileModule,
Dashboard,
FrontActionModule, NAE_ASYNC_RENDERING_CONFIGURATION
FrontActionModule,
NAE_ASYNC_RENDERING_CONFIGURATION,
NAE_SAVE_DATA_INFORM
} from '@netgrif/components-core';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {FlexLayoutModule, FlexModule} from '@angular/flex-layout';
Expand Down Expand Up @@ -257,6 +259,7 @@ export function HttpLoaderFactory(http: HttpClient) {
enableAsyncRenderingForNewFields: true,
enableAsyncRenderingOnTaskExpand: true
}},
{provide: NAE_SAVE_DATA_INFORM, useValue: true},
ResourceProvider,
TranslateService,
TranslatePipe,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {Component, Inject, Input, OnDestroy, Optional} from "@angular/core";
import {Component, HostListener, Inject, Input, OnDestroy, Optional} from "@angular/core";
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../models/data-field-portal-data-injection-token";
import {DataField} from "../models/abstract-data-field";
import {FormControl} from "@angular/forms";
import {WrappedBoolean} from "../data-field-template/models/wrapped-boolean";
import {NAE_SAVE_DATA_INFORM} from "../models/save-data-inform-token";

@Component({
selector: 'ncc-base-data-field',
Expand All @@ -13,8 +14,10 @@ export abstract class AbstractBaseDataFieldComponent<T extends DataField<unknown
@Input() public dataField: T;
@Input() public formControlRef: FormControl;
@Input() public showLargeLayout: WrappedBoolean;
public _saveDataInform: boolean;

constructor(@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<T>) {
constructor(@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<T>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
if (!!dataFieldPortalData) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as I know, setting default value for an @Optional injector does not work as desired.
null is a falsy value, so it still works as intended.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if there is no such injection token provided, it will be considered as null, which will indicate falsy value, but I think, the default value is used because of without that it would be needed to add the @Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean to constructors of every subclass of AbstractBaseDataFieldComponent

this.dataField = dataFieldPortalData.dataField;
this.formControlRef = dataFieldPortalData.formControlRef;
Expand All @@ -24,12 +27,23 @@ export abstract class AbstractBaseDataFieldComponent<T extends DataField<unknown
this.dataField.registerFormControl(this.formControlRef)
}
}
this._saveDataInform = _saveDataInform;
}

ngOnDestroy(): void {
this.dataField.disconnectFormControl();
}

@HostListener('window:beforeunload', ['$event'])
beforeUnloadEventHandler(event) {
if (this._saveDataInform && this.dataField.isFocused()) {
this.dataField.unsetFocus();
(document.activeElement as HTMLElement).blur();
return false;
}
return true;
}

public checkPropertyInComponent(property: string): boolean {
return !!this.dataField?.component?.properties
&& property in this.dataField.component.properties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {Component, Inject, Optional} from '@angular/core';
import {LanguageIconsService} from './language-icons.service';
import {AbstractBaseDataFieldComponent} from "../base-component/abstract-base-data-field.component";
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../models/data-field-portal-data-injection-token";
import {NAE_SAVE_DATA_INFORM} from "../models/save-data-inform-token";


@Component({
Expand All @@ -15,8 +16,9 @@ export abstract class AbstractI18nErrorsComponent extends AbstractBaseDataFieldC

protected constructor(protected languageIconsService: LanguageIconsService,
protected _translate: TranslateService,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<I18nField>) {
super(dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<I18nField>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the default value (even if it doesn't work) should be provided only at the class that introduces the dependency (AbstractBaseDataFieldComponent in this case)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected.

super(dataFieldPortalData, _saveDataInform);
}

getErrorMessage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {Component, Inject, Input, Optional} from '@angular/core';
import {AbstractDataFieldComponent} from '../models/abstract-data-field-component';
import {NAE_INFORM_ABOUT_INVALID_DATA} from '../models/invalid-data-policy-token';
import {I18nField} from './models/i18n-field';
import {NAE_SAVE_DATA_INFORM} from '../models/save-data-inform-token';

/**
* @deprecated
Expand All @@ -14,7 +15,8 @@ export abstract class AbstractI18nFieldComponent extends AbstractDataFieldCompon

@Input() dataField: I18nField;

constructor(@Optional() @Inject(NAE_INFORM_ABOUT_INVALID_DATA) informAboutInvalidData: boolean | null) {
super(informAboutInvalidData);
constructor(@Optional() @Inject(NAE_INFORM_ABOUT_INVALID_DATA) informAboutInvalidData: boolean | null,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(informAboutInvalidData, saveDataInform);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {AbstractI18nErrorsComponent} from '../abstract-i18n-errors.component';
import {LanguageIcons} from '../models/language-icons';
import {I18nFieldTranslations} from '../models/i18n-field-value';
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../../models/data-field-portal-data-injection-token";
import {NAE_SAVE_DATA_INFORM} from "../../models/save-data-inform-token";

@Component({
selector: 'ncc-abstract-i18n-text-field',
Expand All @@ -34,8 +35,9 @@ export abstract class AbstractI18nTextFieldComponent extends AbstractI18nErrorsC
protected constructor(protected languageIconsService: LanguageIconsService,
protected _translateService: TranslateService,
protected _domSanitizer: DomSanitizer,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<I18nField>) {
super(languageIconsService, _translateService, dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<I18nField>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(languageIconsService, _translateService, dataFieldPortalData, _saveDataInform);
this.selectedLanguage = this._translateService.currentLang;
this.languageKeys = Object.keys(this.languageIconsService.languageIcons);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {DataField} from './abstract-data-field';
import {FormControl} from '@angular/forms';
import {Component, Inject, Input, OnDestroy, OnInit, Optional} from '@angular/core';
import {Component, HostListener, Inject, Input, OnDestroy, OnInit, Optional} from '@angular/core';
import {NAE_INFORM_ABOUT_INVALID_DATA} from './invalid-data-policy-token';
import {NAE_SAVE_DATA_INFORM} from './save-data-inform-token';

/**
* @deprecated as of v6.4.0
Expand All @@ -25,8 +26,19 @@ export abstract class AbstractDataFieldComponent implements OnInit, OnDestroy {
*/
protected _formControl: FormControl;

protected constructor(@Optional() @Inject(NAE_INFORM_ABOUT_INVALID_DATA) protected _informAboutInvalidData: boolean | null) {
this._formControl = new FormControl('', { updateOn: 'blur' });
@HostListener('window:beforeunload', ['$event'])
beforeUnloadEventHandler(event) {
if (this._saveDataInform && this.dataField.isFocused()) {
this.dataField.unsetFocus();
(document.activeElement as HTMLElement).blur();
return false;
}
return true;
}

protected constructor(@Optional() @Inject(NAE_INFORM_ABOUT_INVALID_DATA) protected _informAboutInvalidData: boolean | null,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) protected _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value doesn't work

this._formControl = new FormControl('', {updateOn: 'blur'});
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ export abstract class DataField<T> {
* */
private _input: ElementRef;

private _focused = false;

/**
* Reference to form control
* */
Expand Down Expand Up @@ -368,6 +370,18 @@ export abstract class DataField<T> {
this._input = value;
}

public setFocus() {
this._focused = true;
}

public unsetFocus() {
this._focused = false;
}

public isFocused() {
return this._focused;
}

get formControlRef(): FormControl {
return this._formControlRef;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {InjectionToken} from '@angular/core';

/**
* Whether invalid data values should be sent to backend or not. Invalid data is NOT set to backend by default.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad doc

* You can use this InjectionToken to override this behavior in a specific application scope.
*
* This token is ultimately injected by individual data fields, so this option can be in theory applied at a very low level of granularity.
* The library implementation doesn't allow access to such low level components, so a custom implementation is necessary to provide this
* token at such low level. Applying the token to individual task views is achievable with the default implementation.
*/
export const NAE_SAVE_DATA_INFORM = new InjectionToken<boolean>('NaeSaveDataInform');
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {TranslateService} from '@ngx-translate/core';
import {Component, Inject, Optional} from '@angular/core';
import {AbstractBaseDataFieldComponent} from "../base-component/abstract-base-data-field.component";
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../models/data-field-portal-data-injection-token";
import {NAE_SAVE_DATA_INFORM} from "../models/save-data-inform-token";

@Component({
selector: 'ncc-abstract-number-errors-field',
Expand All @@ -11,8 +12,9 @@ import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../models/data-field-
export abstract class AbstractNumberErrorsComponent extends AbstractBaseDataFieldComponent<NumberField>{

protected constructor(protected _translate: TranslateService,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<NumberField>) {
super(dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<NumberField>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected in all cases.

super(dataFieldPortalData, _saveDataInform);
}

getErrorMessage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {NumberField} from './models/number-field';
import {AbstractDataFieldComponent} from '../models/abstract-data-field-component';
import {TranslateService} from '@ngx-translate/core';
import {NAE_INFORM_ABOUT_INVALID_DATA} from '../models/invalid-data-policy-token';
import {NAE_SAVE_DATA_INFORM} from '../models/save-data-inform-token';

/**
* @deprecated
Expand All @@ -16,8 +17,9 @@ export abstract class AbstractNumberFieldComponent extends AbstractDataFieldComp
@Input() public dataField: NumberField;

protected constructor(protected _translate: TranslateService,
@Optional() @Inject(NAE_INFORM_ABOUT_INVALID_DATA) informAboutInvalidData: boolean | null) {
super(informAboutInvalidData);
@Optional() @Inject(NAE_INFORM_ABOUT_INVALID_DATA) informAboutInvalidData: boolean | null,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(informAboutInvalidData, saveDataInform);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {CurrencyPipe, getCurrencySymbol} from '@angular/common';
import {AbstractNumberErrorsComponent} from '../abstract-number-errors.component';
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../../models/data-field-portal-data-injection-token";
import {NumberField} from "../models/number-field";
import {NAE_SAVE_DATA_INFORM} from "../../models/save-data-inform-token";

@Component({
selector: 'ncc-abstract-currency-field',
Expand All @@ -18,8 +19,9 @@ export abstract class AbstractCurrencyNumberFieldComponent extends AbstractNumbe
public readonly WHITESPACE = ' ';

protected constructor(protected _currencyPipe: CurrencyPipe, translateService: TranslateService,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<NumberField>) {
super(translateService, dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<NumberField>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(translateService, dataFieldPortalData, _saveDataInform);
}

ngAfterViewInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {DecimalPipe} from "@angular/common";
import {TranslateService} from "@ngx-translate/core";
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../../models/data-field-portal-data-injection-token";
import {NumberField} from "../models/number-field";
import {NAE_SAVE_DATA_INFORM} from "../../models/save-data-inform-token";

@Component({
selector: 'ncc-abstract-number-decimal-field',
Expand All @@ -19,8 +20,9 @@ export abstract class AbstractNumberDecimalFieldComponent extends AbstractNumber

protected constructor(protected _decimalPipe: DecimalPipe,
_translate: TranslateService,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<NumberField>) {
super(_translate, dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<NumberField>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(_translate, dataFieldPortalData, _saveDataInform);
}

ngAfterViewInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {AbstractNumberErrorsComponent} from '../abstract-number-errors.component
import {Component, Inject, Optional} from '@angular/core';
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../../models/data-field-portal-data-injection-token";
import {NumberField} from "../models/number-field";
import {NAE_SAVE_DATA_INFORM} from "../../models/save-data-inform-token";

@Component({
selector: 'ncc-abstract-number-default-field',
Expand All @@ -11,7 +12,8 @@ import {NumberField} from "../models/number-field";
export abstract class AbstractDefaultNumberFieldComponent extends AbstractNumberErrorsComponent {

protected constructor(translateService: TranslateService,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<NumberField>) {
super(translateService, dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<NumberField>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(translateService, dataFieldPortalData, _saveDataInform);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export * from './models/boolean-label-enabled-token';
export * from './models/invalid-data-policy-token';
export * from './models/data-field-portal-data-injection-token';
export * from './filter-field/models/filter-field-injection-token';
export * from './models/save-data-inform-token';

/* Enums */
export * from './models/template-appearance';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {CustomCard} from '../../dashboard/cards/model/custom-dashboard-model/cus
import {Subscription} from 'rxjs';
import {TranslateService} from '@ngx-translate/core';
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../models/data-field-portal-data-injection-token";
import {NAE_SAVE_DATA_INFORM} from "../models/save-data-inform-token";

@Component({
selector: 'ncc-abstract-dashboard-text-field',
Expand All @@ -16,8 +17,9 @@ export abstract class AbstractDashboardTextFieldComponent extends AbstractTextEr
protected _sub: Subscription;

protected constructor(translate: TranslateService,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<TextField>) {
super(translate, dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<TextField>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(translate, dataFieldPortalData, _saveDataInform);
}

ngOnInit(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {TextAreaField} from './models/text-area-field';
import {Component, Inject, Optional} from "@angular/core";
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../models/data-field-portal-data-injection-token";
import {AbstractBaseDataFieldComponent} from "../base-component/abstract-base-data-field.component";
import {NAE_SAVE_DATA_INFORM} from "../models/save-data-inform-token";

@Component({
selector: 'ncc-text-errors',
Expand All @@ -13,8 +14,9 @@ import {AbstractBaseDataFieldComponent} from "../base-component/abstract-base-da
export abstract class AbstractTextErrorsComponent<T extends TextField> extends AbstractBaseDataFieldComponent<T>{

protected constructor(protected _translate: TranslateService,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<T>) {
super(dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<T>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(dataFieldPortalData, _saveDataInform);
}

protected buildErrorMessage(textField: TextField | TextAreaField, formControlRef: FormControl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {Component, Inject, Input, Optional} from '@angular/core';
import {TextField} from './models/text-field';
import {AbstractDataFieldComponent} from '../models/abstract-data-field-component';
import {NAE_INFORM_ABOUT_INVALID_DATA} from '../models/invalid-data-policy-token';
import {NAE_SAVE_DATA_INFORM} from '../models/save-data-inform-token';

@Component({
selector: 'ncc-abstract-text-field',
Expand All @@ -11,7 +12,8 @@ export abstract class AbstractTextFieldComponent extends AbstractDataFieldCompon

@Input() dataField: TextField;

protected constructor(@Optional() @Inject(NAE_INFORM_ABOUT_INVALID_DATA) informAboutInvalidData: boolean | null) {
super(informAboutInvalidData);
protected constructor(@Optional() @Inject(NAE_INFORM_ABOUT_INVALID_DATA) informAboutInvalidData: boolean | null,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(informAboutInvalidData, saveDataInform);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {FilterType} from '../../../filter/models/filter-type';
import {AbstractDashboardTextFieldComponent} from '../abstract-dashboard-text-field.component';
import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from "../../models/data-field-portal-data-injection-token";
import {TextField} from "../models/text-field";
import {NAE_SAVE_DATA_INFORM} from "../../models/save-data-inform-token";

@Component({
selector: 'ncc-abstract-dashboard-bar-chart-text-field',
Expand All @@ -14,8 +15,9 @@ import {TextField} from "../models/text-field";
export abstract class AbstractDashboardBarChartTextFieldComponent extends AbstractDashboardTextFieldComponent {

protected constructor(translate: TranslateService,
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<TextField>) {
super(translate, dataFieldPortalData);
@Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<TextField>,
@Optional() @Inject(NAE_SAVE_DATA_INFORM) _saveDataInform: boolean | null = false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value in inheritance chain

super(translate, dataFieldPortalData, _saveDataInform);
}

protected createCard(textFieldValue: string): CustomCard {
Expand Down
Loading
Loading