mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
AAE-21566 Handling new form event - show spinner (#9656)
* [AAE-21566] Add spinner event in process form * CR * CR * added test for spinner service * fix unit test * fix lint
This commit is contained in:
@@ -41,6 +41,7 @@ import { ConfirmDialogComponent } from '@alfresco/adf-content-services';
|
||||
import { v4 as uuidGeneration } from 'uuid';
|
||||
import { FormCloudDisplayMode, FormCloudDisplayModeConfiguration } from '../../services/form-fields.interfaces';
|
||||
import { DisplayModeService } from '../public-api';
|
||||
import { FormCloudSpinnerService } from '../services/spinner/form-cloud-spinner.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-cloud-form',
|
||||
@@ -128,9 +129,13 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
protected formService: FormService,
|
||||
private dialog: MatDialog,
|
||||
protected visibilityService: WidgetVisibilityService,
|
||||
private readonly displayModeService: DisplayModeService
|
||||
private readonly displayModeService: DisplayModeService,
|
||||
private spinnerService: FormCloudSpinnerService
|
||||
) {
|
||||
super();
|
||||
|
||||
this.spinnerService.initSpinnerHandling(this.onDestroy$);
|
||||
|
||||
this.id = uuidGeneration();
|
||||
|
||||
this.formService.formContentClicked.pipe(takeUntil(this.onDestroy$)).subscribe((content) => {
|
||||
@@ -375,6 +380,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
}
|
||||
return form;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -396,8 +402,10 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
|
||||
private refreshFormData() {
|
||||
this.form = this.parseForm(this.formCloudRepresentationJSON);
|
||||
this.onFormLoaded(this.form);
|
||||
this.onFormDataRefreshed(this.form);
|
||||
if (this.form) {
|
||||
this.onFormLoaded(this.form);
|
||||
this.onFormDataRefreshed(this.form);
|
||||
}
|
||||
}
|
||||
|
||||
protected onFormLoaded(form: FormModel) {
|
||||
|
Reference in New Issue
Block a user