mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[AAE-3514] Create file viewer widget (#6142)
* AAE-3514 Create File viewer widget * AAE-3514 Fix complex fields behaviour * AAE-3514 Modify attach widget selection indicator * AAE-3514 Add unit tests to attach-file-cloud widget * AAE-3514 Add unit tests * AAE-3514 Increase coverage * AAE-3514 Fix review comments * AAE-3514 Fix review comments
This commit is contained in:
committed by
GitHub
parent
46383602f1
commit
3a464a7bed
@@ -32,7 +32,8 @@ import {
|
||||
FormFieldValidator,
|
||||
FormValues,
|
||||
FormModel,
|
||||
ContentLinkModel
|
||||
ContentLinkModel,
|
||||
UploadWidgetContentLinkModel
|
||||
} from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../services/form-cloud.service';
|
||||
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
||||
@@ -110,14 +111,19 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
this.formService.formContentClicked
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe((content) => {
|
||||
this.formContentClicked.emit(content);
|
||||
if (content instanceof UploadWidgetContentLinkModel) {
|
||||
this.form.setNodeIdValueForViewersLinkedToUploadWidget(content);
|
||||
this.onFormDataRefreshed(this.form);
|
||||
} else {
|
||||
this.formContentClicked.emit(content);
|
||||
}
|
||||
});
|
||||
|
||||
this.formService.updateFormValuesRequested
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe((valuesToSetIfNotPresent) => {
|
||||
this.data = this.form.addValuesNotPresent(valuesToSetIfNotPresent);
|
||||
this.refreshFormData();
|
||||
this.form.addValuesNotPresent(valuesToSetIfNotPresent);
|
||||
this.onFormDataRefreshed(this.form);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -219,7 +225,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
.getForm(appName, formId, appVersion)
|
||||
.pipe(
|
||||
map((form: any) => {
|
||||
const flattenForm = {...form.formRepresentation, ...form.formRepresentation.formDefinition};
|
||||
const flattenForm = { ...form.formRepresentation, ...form.formRepresentation.formDefinition };
|
||||
delete flattenForm.formDefinition;
|
||||
return flattenForm;
|
||||
}),
|
||||
|
Reference in New Issue
Block a user