mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-7119] Fix circular dependencies (#7472)
* fix language item dependency * fix public-api export * dependency fixes * fix circular deps * fix circular deps * fix circular deps * fix circular deps * fix circular dependency * workaround for circular deps * fix lint
This commit is contained in:
27
lib/core/form/services/form-validation-service.interface.ts
Normal file
27
lib/core/form/services/form-validation-service.interface.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Subject } from 'rxjs';
|
||||
import { FormFieldEvent } from '../events/form-field.event';
|
||||
import { ValidateFormFieldEvent } from '../events/validate-form-field.event';
|
||||
import { ValidateFormEvent } from '../events/validate-form.event';
|
||||
|
||||
export interface FormValidationService {
|
||||
formFieldValueChanged: Subject<FormFieldEvent>;
|
||||
validateForm: Subject<ValidateFormEvent>;
|
||||
validateFormField: Subject<ValidateFormFieldEvent>;
|
||||
}
|
@@ -23,11 +23,6 @@ import { Observable, Subject, from, of, throwError } from 'rxjs';
|
||||
import { FormDefinitionModel } from '../models/form-definition.model';
|
||||
import { ContentLinkModel } from './../components/widgets/core/content-link.model';
|
||||
import { GroupModel } from './../components/widgets/core/group.model';
|
||||
import { FormModel, FormOutcomeEvent, FormOutcomeModel, FormValues } from './../components/widgets/core/index';
|
||||
import {
|
||||
FormErrorEvent, FormEvent, FormFieldEvent,
|
||||
ValidateDynamicTableRowEvent, ValidateFormEvent, ValidateFormFieldEvent
|
||||
} from './../events/index';
|
||||
import { EcmModelService } from './ecm-model.service';
|
||||
import { map, catchError, switchMap, combineAll, defaultIfEmpty } from 'rxjs/operators';
|
||||
import {
|
||||
@@ -43,11 +38,22 @@ import {
|
||||
UsersApi,
|
||||
ActivitiGroupsApi
|
||||
} from '@alfresco/js-api';
|
||||
import { FormOutcomeEvent } from '../components/widgets/core/form-outcome-event.model';
|
||||
import { FormValues } from '../components/widgets/core/form-values';
|
||||
import { FormModel } from '../components/widgets/core/form.model';
|
||||
import { FormOutcomeModel } from '../components/widgets/core/form-outcome.model';
|
||||
import { FormEvent } from '../events/form.event';
|
||||
import { FormFieldEvent } from '../events/form-field.event';
|
||||
import { FormErrorEvent } from '../events/form-error.event';
|
||||
import { ValidateFormEvent } from '../events/validate-form.event';
|
||||
import { ValidateFormFieldEvent } from '../events/validate-form-field.event';
|
||||
import { ValidateDynamicTableRowEvent } from '../events/validate-dynamic-table-row.event';
|
||||
import { FormValidationService } from './form-validation-service.interface';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FormService {
|
||||
export class FormService implements FormValidationService {
|
||||
|
||||
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
|
||||
static GENERIC_ERROR_MESSAGE: string = 'Server error';
|
||||
|
Reference in New Issue
Block a user