mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-10773] Make Form core process agonostic (#8032)
* move form list in a component * move things in the right place * move last pice in the right place * move things in the right place * move people and group in the right place * move radio and typehead form service start remove responsibilities * remove model service and editor service from formService * move dropdwon in process-service finish remove service from form service * fix some wrong import * move activiti * fix double quote imports * move dynamic table * fix shell * move unit test * [ci:force] fix lint issues * fix build and some unit test * fix process spec type spy problems [ci:foce] * fix * fix broken tests * fix lint issues * fix cloud dropdown test * cleanup process-service-cloud tests * fix people process * improve e2e test Co-authored-by: Kasia Biernat <kasia.biernat@hyland.com>
This commit is contained in:
@@ -15,26 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Observable, of, Subject } from 'rxjs';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import {
|
||||
AlfrescoApiService,
|
||||
EcmModelService,
|
||||
LogService,
|
||||
FormService,
|
||||
FormOutcomeEvent
|
||||
} from '@alfresco/adf-core';
|
||||
TaskFormService
|
||||
} from '@alfresco/adf-process-services';
|
||||
import { AlfrescoApiService, LogService } from '@alfresco/adf-core';
|
||||
|
||||
@Injectable()
|
||||
export class FakeFormService extends FormService {
|
||||
executeOutcome = new Subject<FormOutcomeEvent>();
|
||||
export class FakeTaskFormService extends TaskFormService {
|
||||
|
||||
constructor(
|
||||
ecmModelService: EcmModelService,
|
||||
apiService: AlfrescoApiService,
|
||||
protected logService: LogService
|
||||
) {
|
||||
super(ecmModelService, apiService, logService);
|
||||
constructor(apiService: AlfrescoApiService, logService: LogService) {
|
||||
super(apiService, logService);
|
||||
}
|
||||
|
||||
public getRestFieldValues(
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, ViewChild, OnDestroy, OnInit } from '@angular/core';
|
||||
import { FormModel, FormService, LogService, FormOutcomeEvent } from '@alfresco/adf-core';
|
||||
import { FormComponent } from '@alfresco/adf-process-services';
|
||||
import { FormComponent, EditorService } from '@alfresco/adf-process-services';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
@@ -42,7 +42,7 @@ export class FormListComponent implements OnInit, OnDestroy {
|
||||
showValidationIcon = false;
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
constructor(private formService: FormService, private logService: LogService) {
|
||||
constructor(private formService: FormService, private editorService: EditorService, private logService: LogService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -63,7 +63,7 @@ export class FormListComponent implements OnInit, OnDestroy {
|
||||
onRowDblClick(event: CustomEvent<any>) {
|
||||
const rowForm = event.detail.value.obj;
|
||||
|
||||
this.formService.getFormDefinitionById(rowForm.id).subscribe((formModel) => {
|
||||
this.editorService.getFormDefinitionById(rowForm.id).subscribe((formModel) => {
|
||||
const form = this.formService.parseForm(formModel.formDefinition);
|
||||
this.form = form;
|
||||
});
|
||||
|
@@ -22,8 +22,11 @@ import {
|
||||
FormOutcomeEvent,
|
||||
CoreAutomationService
|
||||
} from '@alfresco/adf-core';
|
||||
import {
|
||||
TaskFormService
|
||||
} from '@alfresco/adf-process-services';
|
||||
import { InMemoryFormService } from '../../services/in-memory-form.service';
|
||||
import { FakeFormService } from './fake-form.service';
|
||||
import { FakeTaskFormService } from './fake-tak-form.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
@@ -31,7 +34,7 @@ import { takeUntil } from 'rxjs/operators';
|
||||
selector: 'app-form-loading',
|
||||
templateUrl: './form-loading.component.html',
|
||||
styleUrls: ['./form-loading.component.scss'],
|
||||
providers: [{ provide: FormService, useClass: FakeFormService }]
|
||||
providers: [{ provide: FakeTaskFormService, useClass: TaskFormService }]
|
||||
})
|
||||
export class FormLoadingComponent implements OnInit, OnDestroy {
|
||||
form: FormModel;
|
||||
|
@@ -35,8 +35,7 @@ import {
|
||||
ScriptFilesApi
|
||||
} from '@alfresco/js-api';
|
||||
import {
|
||||
FORM_FIELD_VALIDATORS, FormRenderingService, FormService,
|
||||
DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues,
|
||||
FORM_FIELD_VALIDATORS, FormRenderingService, FormService, AppConfigService, PaginationComponent, UserPreferenceValues,
|
||||
AlfrescoApiService, UserPreferencesService, LogService, DataCellEvent, NotificationService
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
@@ -54,10 +53,12 @@ import {
|
||||
TaskFiltersComponent,
|
||||
TaskListComponent,
|
||||
ProcessFormRenderingService,
|
||||
APP_LIST_LAYOUT_LIST
|
||||
APP_LIST_LAYOUT_LIST,
|
||||
ValidateDynamicTableRowEvent,
|
||||
DynamicTableRow
|
||||
} from '@alfresco/adf-process-services';
|
||||
import { Subject } from 'rxjs';
|
||||
import { /*CustomEditorComponent*/ CustomStencil01 } from './custom-editor/custom-editor.component';
|
||||
import { CustomStencil01 } from './custom-editor/custom-editor.component';
|
||||
import { DemoFieldValidator } from './demo-field-validator';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
import { Location } from '@angular/common';
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppConfigService, AlfrescoApiService, EcmModelService, LogService,
|
||||
import { AppConfigService, LogService,
|
||||
FormFieldOption, FormService, FormValues, FormModel,
|
||||
FormOutcomeModel, FormOutcomeEvent } from '@alfresco/adf-core';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
@@ -43,10 +43,8 @@ export class InMemoryFormService extends FormService {
|
||||
executeOutcome = new Subject<FormOutcomeEvent>();
|
||||
|
||||
constructor(appConfig: AppConfigService,
|
||||
ecmModelService: EcmModelService,
|
||||
apiService: AlfrescoApiService,
|
||||
protected logService: LogService) {
|
||||
super(ecmModelService, apiService, logService);
|
||||
super();
|
||||
this.data = appConfig.get<ProcessServiceData>('activiti');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user