mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
96252: Extract form-specific code from SharedModule
This commit is contained in:
@@ -2,10 +2,7 @@ import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormComponent } from './form.component';
|
||||
import { DsDynamicFormComponent } from './builder/ds-dynamic-form-ui/ds-dynamic-form.component';
|
||||
import {
|
||||
DsDynamicFormControlContainerComponent,
|
||||
dsDynamicFormControlMapFn
|
||||
} from './builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component';
|
||||
import { DsDynamicFormControlContainerComponent, dsDynamicFormControlMapFn } from './builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component';
|
||||
import { DsDynamicListComponent } from './builder/ds-dynamic-form-ui/models/list/dynamic-list.component';
|
||||
import { DsDynamicLookupComponent } from './builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component';
|
||||
import { DsDynamicDisabledComponent } from './builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component';
|
||||
@@ -24,12 +21,21 @@ import { DsDynamicLookupRelationExternalSourceTabComponent } from './builder/ds-
|
||||
import { SharedModule } from '../shared.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SearchModule } from '../search/search.module';
|
||||
import { DYNAMIC_FORM_CONTROL_MAP_FN, DynamicFormsCoreModule } from '@ng-dynamic-forms/core';
|
||||
import { DYNAMIC_FORM_CONTROL_MAP_FN, DynamicFormLayoutService, DynamicFormsCoreModule, DynamicFormService, DynamicFormValidationService } from '@ng-dynamic-forms/core';
|
||||
import { ExistingMetadataListElementComponent } from './builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component';
|
||||
import { ExistingRelationListElementComponent } from './builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component';
|
||||
import { ExternalSourceEntryImportModalComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component';
|
||||
import { CustomSwitchComponent } from './builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component';
|
||||
import { DynamicFormsNGBootstrapUIModule } from '@ng-dynamic-forms/ui-ng-bootstrap';
|
||||
import { ChipsComponent } from './chips/chips.component';
|
||||
import { NumberPickerComponent } from './number-picker/number-picker.component';
|
||||
import { AuthorityConfidenceStateDirective } from './directives/authority-confidence-state.directive';
|
||||
import { SortablejsModule } from 'ngx-sortablejs';
|
||||
import { VocabularyTreeviewComponent } from './vocabulary-treeview/vocabulary-treeview.component';
|
||||
import { VocabularyTreeviewService } from './vocabulary-treeview/vocabulary-treeview.service';
|
||||
import { FormBuilderService } from './builder/form-builder.service';
|
||||
import { DsDynamicTypeBindRelationService } from './builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service';
|
||||
import { FormService } from './form.service';
|
||||
|
||||
const COMPONENTS = [
|
||||
CustomSwitchComponent,
|
||||
@@ -53,12 +59,20 @@ const COMPONENTS = [
|
||||
ExistingMetadataListElementComponent,
|
||||
ExistingRelationListElementComponent,
|
||||
ExternalSourceEntryImportModalComponent,
|
||||
FormComponent
|
||||
FormComponent,
|
||||
ChipsComponent,
|
||||
NumberPickerComponent,
|
||||
VocabularyTreeviewComponent,
|
||||
];
|
||||
|
||||
const DIRECTIVES = [
|
||||
AuthorityConfidenceStateDirective,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
...COMPONENTS
|
||||
...COMPONENTS,
|
||||
...DIRECTIVES,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
@@ -66,16 +80,25 @@ const COMPONENTS = [
|
||||
DynamicFormsNGBootstrapUIModule,
|
||||
SearchModule,
|
||||
SharedModule,
|
||||
TranslateModule
|
||||
TranslateModule,
|
||||
SortablejsModule,
|
||||
],
|
||||
exports: [
|
||||
...COMPONENTS
|
||||
...COMPONENTS,
|
||||
...DIRECTIVES,
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: DYNAMIC_FORM_CONTROL_MAP_FN,
|
||||
useValue: dsDynamicFormControlMapFn
|
||||
}
|
||||
},
|
||||
VocabularyTreeviewService,
|
||||
DynamicFormLayoutService,
|
||||
DynamicFormService,
|
||||
DynamicFormValidationService,
|
||||
FormBuilderService,
|
||||
DsDynamicTypeBindRelationService,
|
||||
FormService,
|
||||
]
|
||||
})
|
||||
export class FormModule {
|
||||
|
Reference in New Issue
Block a user