mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[DURACOM-191] Remove register-email-form.module, form.module, shared-browse-by.module and process-page-shared.module
This commit is contained in:
@@ -30,7 +30,6 @@ import {
|
|||||||
import {
|
import {
|
||||||
APP_CONFIG,
|
APP_CONFIG,
|
||||||
APP_DATA_SERVICES_MAP,
|
APP_DATA_SERVICES_MAP,
|
||||||
APP_DYNAMIC_FORM_CONTROL_FN,
|
|
||||||
AppConfig,
|
AppConfig,
|
||||||
} from '../config/app-config.interface';
|
} from '../config/app-config.interface';
|
||||||
import { environment } from '../environments/environment';
|
import { environment } from '../environments/environment';
|
||||||
@@ -46,6 +45,7 @@ import { dsDynamicFormControlMapFn } from './shared/form/builder/ds-dynamic-form
|
|||||||
import { MenuService } from './shared/menu/menu.service';
|
import { MenuService } from './shared/menu/menu.service';
|
||||||
import { ThemeService } from './shared/theme-support/theme.service';
|
import { ThemeService } from './shared/theme-support/theme.service';
|
||||||
import { Angulartics2DSpace } from './statistics/angulartics/dspace-provider';
|
import { Angulartics2DSpace } from './statistics/angulartics/dspace-provider';
|
||||||
|
import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs the initialization of the app.
|
* Performs the initialization of the app.
|
||||||
@@ -117,7 +117,7 @@ export abstract class InitService {
|
|||||||
useValue: LAZY_DATA_SERVICES,
|
useValue: LAZY_DATA_SERVICES,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: APP_DYNAMIC_FORM_CONTROL_FN,
|
provide: DYNAMIC_FORM_CONTROL_MAP_FN,
|
||||||
useValue: dsDynamicFormControlMapFn,
|
useValue: dsDynamicFormControlMapFn,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -1,51 +0,0 @@
|
|||||||
import { DatePipe } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap';
|
|
||||||
|
|
||||||
import { ProcessDetailComponent } from './detail/process-detail.component';
|
|
||||||
import { ProcessDetailFieldComponent } from './detail/process-detail-field/process-detail-field.component';
|
|
||||||
import { ProcessFormComponent } from './form/process-form.component';
|
|
||||||
import { ParameterSelectComponent } from './form/process-parameters/parameter-select/parameter-select.component';
|
|
||||||
import { BooleanValueInputComponent } from './form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component';
|
|
||||||
import { DateValueInputComponent } from './form/process-parameters/parameter-value-input/date-value-input/date-value-input.component';
|
|
||||||
import { FileValueInputComponent } from './form/process-parameters/parameter-value-input/file-value-input/file-value-input.component';
|
|
||||||
import { ParameterValueInputComponent } from './form/process-parameters/parameter-value-input/parameter-value-input.component';
|
|
||||||
import { StringValueInputComponent } from './form/process-parameters/parameter-value-input/string-value-input/string-value-input.component';
|
|
||||||
import { ProcessParametersComponent } from './form/process-parameters/process-parameters.component';
|
|
||||||
import { ScriptHelpComponent } from './form/script-help/script-help.component';
|
|
||||||
import { ScriptsSelectComponent } from './form/scripts-select/scripts-select.component';
|
|
||||||
import { NewProcessComponent } from './new/new-process.component';
|
|
||||||
import { ProcessOverviewComponent } from './overview/process-overview.component';
|
|
||||||
import { ProcessOverviewTableComponent } from './overview/table/process-overview-table.component';
|
|
||||||
import { ProcessBreadcrumbResolver } from './process-breadcrumb.resolver';
|
|
||||||
import { ProcessBreadcrumbsService } from './process-breadcrumbs.service';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
NgbCollapseModule,
|
|
||||||
NewProcessComponent,
|
|
||||||
ScriptsSelectComponent,
|
|
||||||
ScriptHelpComponent,
|
|
||||||
ParameterSelectComponent,
|
|
||||||
ProcessParametersComponent,
|
|
||||||
StringValueInputComponent,
|
|
||||||
ParameterValueInputComponent,
|
|
||||||
FileValueInputComponent,
|
|
||||||
BooleanValueInputComponent,
|
|
||||||
DateValueInputComponent,
|
|
||||||
ProcessOverviewComponent,
|
|
||||||
ProcessOverviewTableComponent,
|
|
||||||
ProcessDetailComponent,
|
|
||||||
ProcessDetailFieldComponent,
|
|
||||||
ProcessFormComponent,
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
ProcessBreadcrumbResolver,
|
|
||||||
ProcessBreadcrumbsService,
|
|
||||||
DatePipe,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
export class ProcessPageSharedModule {
|
|
||||||
|
|
||||||
}
|
|
@@ -9,20 +9,3 @@ const DECLARATIONS = [
|
|||||||
ThemedRegisterEmailFormComponent,
|
ThemedRegisterEmailFormComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
...DECLARATIONS,
|
|
||||||
],
|
|
||||||
providers: [],
|
|
||||||
exports: [
|
|
||||||
...DECLARATIONS,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The module that contains the components related to the email registration
|
|
||||||
*/
|
|
||||||
export class RegisterEmailFormModule {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@@ -1,38 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
import { SearchConfigurationService } from '../core/shared/search/search-configuration.service';
|
|
||||||
import { SearchFilterService } from '../core/shared/search/search-filter.service';
|
|
||||||
import { SearchModule } from '../shared/search/search.module';
|
|
||||||
import { SidebarService } from '../shared/sidebar/sidebar.service';
|
|
||||||
import { StatisticsModule } from '../statistics/statistics.module';
|
|
||||||
import { ConfigurationSearchPageGuard } from './configuration-search-page.guard';
|
|
||||||
import { SearchPageComponent } from './search-page.component';
|
|
||||||
import { ThemedSearchPageComponent } from './themed-search-page.component';
|
|
||||||
|
|
||||||
const components = [
|
|
||||||
SearchPageComponent,
|
|
||||||
ThemedSearchPageComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
SearchModule,
|
|
||||||
StatisticsModule.forRoot(),
|
|
||||||
...components,
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
SidebarService,
|
|
||||||
SearchFilterService,
|
|
||||||
ConfigurationSearchPageGuard,
|
|
||||||
SearchConfigurationService,
|
|
||||||
],
|
|
||||||
exports: components,
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This module handles all components and pipes that are necessary for the search page
|
|
||||||
*/
|
|
||||||
export class SearchPageModule {
|
|
||||||
}
|
|
@@ -9,7 +9,6 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { SharedBrowseByModule } from '../../browse-by/shared-browse-by.module';
|
|
||||||
import { AccessControlArrayFormComponent } from './access-control-array-form.component';
|
import { AccessControlArrayFormComponent } from './access-control-array-form.component';
|
||||||
import { ToDatePipe } from './to-date.pipe';
|
import { ToDatePipe } from './to-date.pipe';
|
||||||
|
|
||||||
@@ -19,7 +18,7 @@ describe('AccessControlArrayFormComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, SharedBrowseByModule, TranslateModule.forRoot(), NgbDatepickerModule, AccessControlArrayFormComponent, ToDatePipe],
|
imports: [CommonModule, FormsModule, TranslateModule.forRoot(), NgbDatepickerModule, AccessControlArrayFormComponent, ToDatePipe],
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
});
|
});
|
||||||
|
@@ -17,14 +17,12 @@ import { of } from 'rxjs';
|
|||||||
|
|
||||||
import { BulkAccessConfigDataService } from '../../core/config/bulk-access-config-data.service';
|
import { BulkAccessConfigDataService } from '../../core/config/bulk-access-config-data.service';
|
||||||
import { Item } from '../../core/shared/item.model';
|
import { Item } from '../../core/shared/item.model';
|
||||||
import { SharedBrowseByModule } from '../browse-by/shared-browse-by.module';
|
|
||||||
import { SelectableListService } from '../object-list/selectable-list/selectable-list.service';
|
import { SelectableListService } from '../object-list/selectable-list/selectable-list.service';
|
||||||
import { AccessControlFormContainerComponent } from './access-control-form-container.component';
|
import { AccessControlFormContainerComponent } from './access-control-form-container.component';
|
||||||
import { createAccessControlInitialFormState } from './access-control-form-container-intial-state';
|
import { createAccessControlInitialFormState } from './access-control-form-container-intial-state';
|
||||||
import { BulkAccessControlService } from './bulk-access-control.service';
|
import { BulkAccessControlService } from './bulk-access-control.service';
|
||||||
import { ITEM_ACCESS_CONTROL_SELECT_BITSTREAMS_LIST_ID } from './item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component';
|
import { ITEM_ACCESS_CONTROL_SELECT_BITSTREAMS_LIST_ID } from './item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component';
|
||||||
|
|
||||||
|
|
||||||
describe('AccessControlFormContainerComponent', () => {
|
describe('AccessControlFormContainerComponent', () => {
|
||||||
let component: AccessControlFormContainerComponent<any>;
|
let component: AccessControlFormContainerComponent<any>;
|
||||||
let fixture: ComponentFixture<AccessControlFormContainerComponent<any>>;
|
let fixture: ComponentFixture<AccessControlFormContainerComponent<any>>;
|
||||||
@@ -36,7 +34,6 @@ describe('AccessControlFormContainerComponent', () => {
|
|||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [CommonModule,
|
imports: [CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
SharedBrowseByModule,
|
|
||||||
NgbDatepickerModule,
|
NgbDatepickerModule,
|
||||||
UiSwitchModule],
|
UiSwitchModule],
|
||||||
})
|
})
|
||||||
@@ -69,7 +66,6 @@ describe('AccessControlFormContainerComponent', () => {
|
|||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
SharedBrowseByModule,
|
|
||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
NgbDatepickerModule,
|
NgbDatepickerModule,
|
||||||
UiSwitchModule,
|
UiSwitchModule,
|
||||||
|
@@ -1,22 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
import { BrowseByComponent } from './browse-by.component';
|
|
||||||
import { ThemedBrowseByComponent } from './themed-browse-by.component';
|
|
||||||
|
|
||||||
const DECLARATIONS = [
|
|
||||||
BrowseByComponent,
|
|
||||||
ThemedBrowseByComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
...DECLARATIONS,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
...DECLARATIONS,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class SharedBrowseByModule {
|
|
||||||
}
|
|
@@ -20,7 +20,6 @@ import { getMockThemeService } from '../../mocks/theme-service.mock';
|
|||||||
import { AuthServiceStub } from '../../testing/auth-service.stub';
|
import { AuthServiceStub } from '../../testing/auth-service.stub';
|
||||||
import { MenuServiceStub } from '../../testing/menu-service.stub';
|
import { MenuServiceStub } from '../../testing/menu-service.stub';
|
||||||
import { ThemeService } from '../../theme-support/theme.service';
|
import { ThemeService } from '../../theme-support/theme.service';
|
||||||
import { DsoPageModule } from '../dso-page.module';
|
|
||||||
import { DsoEditMenuComponent } from './dso-edit-menu.component';
|
import { DsoEditMenuComponent } from './dso-edit-menu.component';
|
||||||
|
|
||||||
describe('DsoEditMenuComponent', () => {
|
describe('DsoEditMenuComponent', () => {
|
||||||
@@ -52,7 +51,7 @@ describe('DsoEditMenuComponent', () => {
|
|||||||
});
|
});
|
||||||
spyOn(menuService, 'getMenuTopSections').and.returnValue(observableOf([section]));
|
spyOn(menuService, 'getMenuTopSections').and.returnValue(observableOf([section]));
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule, DsoPageModule, DsoEditMenuComponent],
|
imports: [TranslateModule.forRoot(), RouterTestingModule, DsoEditMenuComponent],
|
||||||
providers: [
|
providers: [
|
||||||
Injector,
|
Injector,
|
||||||
{ provide: MenuService, useValue: menuService },
|
{ provide: MenuService, useValue: menuService },
|
||||||
|
@@ -1,54 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { RouterModule } from '@angular/router';
|
|
||||||
import {
|
|
||||||
NgbDropdownModule,
|
|
||||||
NgbTooltipModule,
|
|
||||||
} from '@ng-bootstrap/ng-bootstrap';
|
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
|
|
||||||
import { DsoEditMenuExpandableSectionComponent } from '../dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component';
|
|
||||||
import { DsoEditMenuComponent } from '../dso-page/dso-edit-menu/dso-edit-menu.component';
|
|
||||||
import { DsoEditMenuSectionComponent } from '../dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component';
|
|
||||||
|
|
||||||
const COMPONENTS = [
|
|
||||||
DsoEditMenuComponent,
|
|
||||||
DsoEditMenuSectionComponent,
|
|
||||||
DsoEditMenuExpandableSectionComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
const ENTRY_COMPONENTS = [
|
|
||||||
];
|
|
||||||
|
|
||||||
const MODULES = [
|
|
||||||
TranslateModule,
|
|
||||||
RouterModule,
|
|
||||||
CommonModule,
|
|
||||||
NgbTooltipModule,
|
|
||||||
NgbDropdownModule,
|
|
||||||
];
|
|
||||||
const PROVIDERS = [
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
...MODULES,
|
|
||||||
...COMPONENTS,
|
|
||||||
...ENTRY_COMPONENTS,
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
...PROVIDERS,
|
|
||||||
...ENTRY_COMPONENTS,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
...COMPONENTS,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This module handles all components, providers and modules that are needed for the menu
|
|
||||||
*/
|
|
||||||
export class DsoPageModule {
|
|
||||||
|
|
||||||
}
|
|
@@ -20,6 +20,7 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
|
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import {
|
import {
|
||||||
|
DYNAMIC_FORM_CONTROL_MAP_FN,
|
||||||
DynamicCheckboxGroupModel,
|
DynamicCheckboxGroupModel,
|
||||||
DynamicCheckboxModel,
|
DynamicCheckboxModel,
|
||||||
DynamicColorPickerModel,
|
DynamicColorPickerModel,
|
||||||
@@ -60,7 +61,6 @@ import { of as observableOf } from 'rxjs';
|
|||||||
import {
|
import {
|
||||||
APP_CONFIG,
|
APP_CONFIG,
|
||||||
APP_DATA_SERVICES_MAP,
|
APP_DATA_SERVICES_MAP,
|
||||||
APP_DYNAMIC_FORM_CONTROL_FN,
|
|
||||||
} from '../../../../../config/app-config.interface';
|
} from '../../../../../config/app-config.interface';
|
||||||
import { environment } from '../../../../../environments/environment';
|
import { environment } from '../../../../../environments/environment';
|
||||||
import { ItemDataService } from '../../../../core/data/item-data.service';
|
import { ItemDataService } from '../../../../core/data/item-data.service';
|
||||||
@@ -252,7 +252,7 @@ describe('DsDynamicFormControlContainerComponent test suite', () => {
|
|||||||
{ provide: NgZone, useValue: new NgZone({}) },
|
{ provide: NgZone, useValue: new NgZone({}) },
|
||||||
{ provide: APP_CONFIG, useValue: environment },
|
{ provide: APP_CONFIG, useValue: environment },
|
||||||
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
||||||
{ provide: APP_DYNAMIC_FORM_CONTROL_FN, useValue: dsDynamicFormControlMapFn },
|
{ provide: DYNAMIC_FORM_CONTROL_MAP_FN, useValue: dsDynamicFormControlMapFn },
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
|
@@ -37,17 +37,8 @@ import {
|
|||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
} from '@ng-bootstrap/ng-bootstrap';
|
} from '@ng-bootstrap/ng-bootstrap';
|
||||||
import {
|
import {
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_ARRAY,
|
DYNAMIC_FORM_CONTROL_MAP_FN,
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX,
|
DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX,
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX_GROUP,
|
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER,
|
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_GROUP,
|
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_INPUT,
|
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_RADIO_GROUP,
|
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_SELECT,
|
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA,
|
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_TIMEPICKER,
|
|
||||||
DynamicDatePickerModel,
|
|
||||||
DynamicFormArrayGroupModel,
|
DynamicFormArrayGroupModel,
|
||||||
DynamicFormArrayModel,
|
DynamicFormArrayModel,
|
||||||
DynamicFormComponentService,
|
DynamicFormComponentService,
|
||||||
@@ -62,16 +53,6 @@ import {
|
|||||||
DynamicFormValidationService,
|
DynamicFormValidationService,
|
||||||
DynamicTemplateDirective,
|
DynamicTemplateDirective,
|
||||||
} from '@ng-dynamic-forms/core';
|
} from '@ng-dynamic-forms/core';
|
||||||
import {
|
|
||||||
DynamicNGBootstrapCalendarComponent,
|
|
||||||
DynamicNGBootstrapCheckboxComponent,
|
|
||||||
DynamicNGBootstrapCheckboxGroupComponent,
|
|
||||||
DynamicNGBootstrapInputComponent,
|
|
||||||
DynamicNGBootstrapRadioGroupComponent,
|
|
||||||
DynamicNGBootstrapSelectComponent,
|
|
||||||
DynamicNGBootstrapTextAreaComponent,
|
|
||||||
DynamicNGBootstrapTimePickerComponent,
|
|
||||||
} from '@ng-dynamic-forms/ui-ng-bootstrap';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import {
|
import {
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
@@ -92,7 +73,6 @@ import {
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
APP_CONFIG,
|
APP_CONFIG,
|
||||||
APP_DYNAMIC_FORM_CONTROL_FN,
|
|
||||||
AppConfig,
|
AppConfig,
|
||||||
DynamicFormControlFn,
|
DynamicFormControlFn,
|
||||||
} from '../../../../../config/app-config.interface';
|
} from '../../../../../config/app-config.interface';
|
||||||
@@ -136,101 +116,15 @@ import { FormService } from '../../form.service';
|
|||||||
import { FormBuilderService } from '../form-builder.service';
|
import { FormBuilderService } from '../form-builder.service';
|
||||||
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
|
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
|
||||||
import { RelationshipOptions } from '../models/relationship-options.model';
|
import { RelationshipOptions } from '../models/relationship-options.model';
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from './ds-dynamic-form-constants';
|
|
||||||
import { DsDynamicTypeBindRelationService } from './ds-dynamic-type-bind-relation.service';
|
import { DsDynamicTypeBindRelationService } from './ds-dynamic-type-bind-relation.service';
|
||||||
import {
|
import {
|
||||||
ExistingMetadataListElementComponent,
|
ExistingMetadataListElementComponent,
|
||||||
ReorderableRelationship,
|
ReorderableRelationship,
|
||||||
} from './existing-metadata-list-element/existing-metadata-list-element.component';
|
} from './existing-metadata-list-element/existing-metadata-list-element.component';
|
||||||
import { ExistingRelationListElementComponent } from './existing-relation-list-element/existing-relation-list-element.component';
|
import { ExistingRelationListElementComponent } from './existing-relation-list-element/existing-relation-list-element.component';
|
||||||
import { DsDynamicFormArrayComponent } from './models/array-group/dynamic-form-array.component';
|
|
||||||
import { CustomSwitchComponent } from './models/custom-switch/custom-switch.component';
|
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_CUSTOM_SWITCH } from './models/custom-switch/custom-switch.model';
|
import { DYNAMIC_FORM_CONTROL_TYPE_CUSTOM_SWITCH } from './models/custom-switch/custom-switch.model';
|
||||||
import { DsDatePickerComponent } from './models/date-picker/date-picker.component';
|
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_DSDATEPICKER } from './models/date-picker/date-picker.model';
|
|
||||||
import { DsDatePickerInlineComponent } from './models/date-picker-inline/dynamic-date-picker-inline.component';
|
|
||||||
import { DsDynamicDisabledComponent } from './models/disabled/dynamic-disabled.component';
|
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_DISABLED } from './models/disabled/dynamic-disabled.model';
|
|
||||||
import { DsDynamicFormGroupComponent } from './models/form-group/dynamic-form-group.component';
|
|
||||||
import { DsDynamicListComponent } from './models/list/dynamic-list.component';
|
|
||||||
import { DynamicListCheckboxGroupModel } from './models/list/dynamic-list-checkbox-group.model';
|
|
||||||
import { DynamicListRadioGroupModel } from './models/list/dynamic-list-radio-group.model';
|
|
||||||
import { DsDynamicLookupComponent } from './models/lookup/dynamic-lookup.component';
|
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_LOOKUP } from './models/lookup/dynamic-lookup.model';
|
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_LOOKUP_NAME } from './models/lookup/dynamic-lookup-name.model';
|
|
||||||
import { DsDynamicOneboxComponent } from './models/onebox/dynamic-onebox.component';
|
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_ONEBOX } from './models/onebox/dynamic-onebox.model';
|
|
||||||
import { DsDynamicRelationGroupComponent } from './models/relation-group/dynamic-relation-group.components';
|
|
||||||
import { DsDynamicScrollableDropdownComponent } from './models/scrollable-dropdown/dynamic-scrollable-dropdown.component';
|
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_SCROLLABLE_DROPDOWN } from './models/scrollable-dropdown/dynamic-scrollable-dropdown.model';
|
|
||||||
import { DsDynamicTagComponent } from './models/tag/dynamic-tag.component';
|
|
||||||
import { DYNAMIC_FORM_CONTROL_TYPE_TAG } from './models/tag/dynamic-tag.model';
|
|
||||||
import { DsDynamicLookupRelationModalComponent } from './relation-lookup-modal/dynamic-lookup-relation-modal.component';
|
import { DsDynamicLookupRelationModalComponent } from './relation-lookup-modal/dynamic-lookup-relation-modal.component';
|
||||||
|
|
||||||
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
|
||||||
switch (model.type) {
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_ARRAY:
|
|
||||||
return DsDynamicFormArrayComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX:
|
|
||||||
return DynamicNGBootstrapCheckboxComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX_GROUP:
|
|
||||||
return (model instanceof DynamicListCheckboxGroupModel) ? DsDynamicListComponent : DynamicNGBootstrapCheckboxGroupComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER:
|
|
||||||
return (model as DynamicDatePickerModel).inline ? DynamicNGBootstrapCalendarComponent : DsDatePickerInlineComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_GROUP:
|
|
||||||
return DsDynamicFormGroupComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_INPUT:
|
|
||||||
return DynamicNGBootstrapInputComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_RADIO_GROUP:
|
|
||||||
return (model instanceof DynamicListRadioGroupModel) ? DsDynamicListComponent : DynamicNGBootstrapRadioGroupComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_SELECT:
|
|
||||||
return DynamicNGBootstrapSelectComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA:
|
|
||||||
return DynamicNGBootstrapTextAreaComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_TIMEPICKER:
|
|
||||||
return DynamicNGBootstrapTimePickerComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_ONEBOX:
|
|
||||||
return DsDynamicOneboxComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_SCROLLABLE_DROPDOWN:
|
|
||||||
return DsDynamicScrollableDropdownComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_TAG:
|
|
||||||
return DsDynamicTagComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP:
|
|
||||||
return DsDynamicRelationGroupComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_DSDATEPICKER:
|
|
||||||
return DsDatePickerComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_LOOKUP:
|
|
||||||
return DsDynamicLookupComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_LOOKUP_NAME:
|
|
||||||
return DsDynamicLookupComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_DISABLED:
|
|
||||||
return DsDynamicDisabledComponent;
|
|
||||||
|
|
||||||
case DYNAMIC_FORM_CONTROL_TYPE_CUSTOM_SWITCH:
|
|
||||||
return CustomSwitchComponent;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-dynamic-form-control-container',
|
selector: 'ds-dynamic-form-control-container',
|
||||||
styleUrls: ['./ds-dynamic-form-control-container.component.scss'],
|
styleUrls: ['./ds-dynamic-form-control-container.component.scss'],
|
||||||
@@ -320,7 +214,7 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
|||||||
public formBuilderService: FormBuilderService,
|
public formBuilderService: FormBuilderService,
|
||||||
private submissionService: SubmissionService,
|
private submissionService: SubmissionService,
|
||||||
@Inject(APP_CONFIG) protected appConfig: AppConfig,
|
@Inject(APP_CONFIG) protected appConfig: AppConfig,
|
||||||
@Inject(APP_DYNAMIC_FORM_CONTROL_FN) protected dynamicFormControlFn: DynamicFormControlFn,
|
@Inject(DYNAMIC_FORM_CONTROL_MAP_FN) protected dynamicFormControlFn: DynamicFormControlFn,
|
||||||
) {
|
) {
|
||||||
super(ref, componentFactoryResolver, layoutService, validationService, dynamicFormComponentService, relationService);
|
super(ref, componentFactoryResolver, layoutService, validationService, dynamicFormComponentService, relationService);
|
||||||
this.fetchThumbnail = this.appConfig.browseBy.showThumbnails;
|
this.fetchThumbnail = this.appConfig.browseBy.showThumbnails;
|
||||||
|
@@ -27,6 +27,7 @@ import {
|
|||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
} from '@ng-bootstrap/ng-bootstrap';
|
} from '@ng-bootstrap/ng-bootstrap';
|
||||||
import {
|
import {
|
||||||
|
DYNAMIC_FORM_CONTROL_MAP_FN,
|
||||||
DynamicFormLayoutService,
|
DynamicFormLayoutService,
|
||||||
DynamicFormValidationService,
|
DynamicFormValidationService,
|
||||||
} from '@ng-dynamic-forms/core';
|
} from '@ng-dynamic-forms/core';
|
||||||
@@ -35,7 +36,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
import {
|
import {
|
||||||
APP_CONFIG,
|
APP_CONFIG,
|
||||||
APP_DATA_SERVICES_MAP,
|
APP_DATA_SERVICES_MAP,
|
||||||
APP_DYNAMIC_FORM_CONTROL_FN,
|
|
||||||
} from 'src/config/app-config.interface';
|
} from 'src/config/app-config.interface';
|
||||||
import { environment } from 'src/environments/environment.test';
|
import { environment } from 'src/environments/environment.test';
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ describe('DsDynamicRelationGroupComponent test suite', () => {
|
|||||||
{ provide: SubmissionService, useValue: {} },
|
{ provide: SubmissionService, useValue: {} },
|
||||||
{ provide: APP_CONFIG, useValue: environment },
|
{ provide: APP_CONFIG, useValue: environment },
|
||||||
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
||||||
{ provide: APP_DYNAMIC_FORM_CONTROL_FN, useValue: dsDynamicFormControlMapFn },
|
{ provide: DYNAMIC_FORM_CONTROL_MAP_FN, useValue: dsDynamicFormControlMapFn },
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
})
|
})
|
||||||
|
@@ -1,125 +0,0 @@
|
|||||||
import { CdkTreeModule } from '@angular/cdk/tree';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import {
|
|
||||||
NgbDatepickerModule,
|
|
||||||
NgbTimepickerModule,
|
|
||||||
} from '@ng-bootstrap/ng-bootstrap';
|
|
||||||
import {
|
|
||||||
DYNAMIC_FORM_CONTROL_MAP_FN,
|
|
||||||
DynamicFormLayoutService,
|
|
||||||
DynamicFormsCoreModule,
|
|
||||||
DynamicFormService,
|
|
||||||
DynamicFormValidationService,
|
|
||||||
} from '@ng-dynamic-forms/core';
|
|
||||||
import { DynamicFormsNGBootstrapUIModule } from '@ng-dynamic-forms/ui-ng-bootstrap';
|
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
import { NgxMaskModule } from 'ngx-mask';
|
|
||||||
import { SortablejsModule } from 'ngx-sortablejs';
|
|
||||||
|
|
||||||
import { SearchModule } from '../search/search.module';
|
|
||||||
import { DsDynamicFormComponent } from './builder/ds-dynamic-form-ui/ds-dynamic-form.component';
|
|
||||||
import { DsDynamicFormControlContainerComponent } from './builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component';
|
|
||||||
import { dsDynamicFormControlMapFn } from './builder/ds-dynamic-form-ui/ds-dynamic-form-control-map-fn';
|
|
||||||
import { DsDynamicTypeBindRelationService } from './builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service';
|
|
||||||
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 { DsDynamicFormArrayComponent } from './builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component';
|
|
||||||
import { CustomSwitchComponent } from './builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component';
|
|
||||||
import { DsDatePickerComponent } from './builder/ds-dynamic-form-ui/models/date-picker/date-picker.component';
|
|
||||||
import { DsDatePickerInlineComponent } from './builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component';
|
|
||||||
import { DsDynamicDisabledComponent } from './builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component';
|
|
||||||
import { DsDynamicFormGroupComponent } from './builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.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 { DsDynamicOneboxComponent } from './builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component';
|
|
||||||
import { DsDynamicRelationGroupComponent } from './builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components';
|
|
||||||
import { DsDynamicScrollableDropdownComponent } from './builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component';
|
|
||||||
import { DsDynamicTagComponent } from './builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component';
|
|
||||||
import { DsDynamicLookupRelationModalComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component';
|
|
||||||
import { DsDynamicLookupRelationExternalSourceTabComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.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 { ThemedExternalSourceEntryImportModalComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/themed-external-source-entry-import-modal.component';
|
|
||||||
import { ThemedDynamicLookupRelationExternalSourceTabComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component';
|
|
||||||
import { DsDynamicLookupRelationSearchTabComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component';
|
|
||||||
import { ThemedDynamicLookupRelationSearchTabComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component';
|
|
||||||
import { DsDynamicLookupRelationSelectionTabComponent } from './builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component';
|
|
||||||
import { FormBuilderService } from './builder/form-builder.service';
|
|
||||||
import { ChipsComponent } from './chips/chips.component';
|
|
||||||
import { AuthorityConfidenceStateDirective } from './directives/authority-confidence-state.directive';
|
|
||||||
import { FormComponent } from './form.component';
|
|
||||||
import { FormService } from './form.service';
|
|
||||||
import { NumberPickerComponent } from './number-picker/number-picker.component';
|
|
||||||
import { VocabularyTreeviewComponent } from './vocabulary-treeview/vocabulary-treeview.component';
|
|
||||||
import { VocabularyTreeviewModalComponent } from './vocabulary-treeview-modal/vocabulary-treeview-modal.component';
|
|
||||||
|
|
||||||
const COMPONENTS = [
|
|
||||||
CustomSwitchComponent,
|
|
||||||
DsDynamicFormComponent,
|
|
||||||
DsDynamicFormControlContainerComponent,
|
|
||||||
DsDynamicListComponent,
|
|
||||||
DsDynamicLookupComponent,
|
|
||||||
DsDynamicLookupRelationSearchTabComponent,
|
|
||||||
ThemedDynamicLookupRelationSearchTabComponent,
|
|
||||||
DsDynamicLookupRelationSelectionTabComponent,
|
|
||||||
DsDynamicLookupRelationExternalSourceTabComponent,
|
|
||||||
ThemedDynamicLookupRelationExternalSourceTabComponent,
|
|
||||||
DsDynamicDisabledComponent,
|
|
||||||
DsDynamicLookupRelationModalComponent,
|
|
||||||
DsDynamicScrollableDropdownComponent,
|
|
||||||
DsDynamicTagComponent,
|
|
||||||
DsDynamicOneboxComponent,
|
|
||||||
DsDynamicRelationGroupComponent,
|
|
||||||
DsDatePickerComponent,
|
|
||||||
DsDynamicFormGroupComponent,
|
|
||||||
DsDynamicFormArrayComponent,
|
|
||||||
DsDatePickerInlineComponent,
|
|
||||||
ExistingMetadataListElementComponent,
|
|
||||||
ExistingRelationListElementComponent,
|
|
||||||
ExternalSourceEntryImportModalComponent,
|
|
||||||
FormComponent,
|
|
||||||
ChipsComponent,
|
|
||||||
NumberPickerComponent,
|
|
||||||
VocabularyTreeviewComponent,
|
|
||||||
VocabularyTreeviewModalComponent,
|
|
||||||
ThemedExternalSourceEntryImportModalComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
const DIRECTIVES = [
|
|
||||||
AuthorityConfidenceStateDirective,
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
DynamicFormsCoreModule,
|
|
||||||
DynamicFormsNGBootstrapUIModule,
|
|
||||||
SearchModule,
|
|
||||||
TranslateModule,
|
|
||||||
SortablejsModule,
|
|
||||||
NgxMaskModule.forRoot(),
|
|
||||||
NgbDatepickerModule,
|
|
||||||
NgbTimepickerModule,
|
|
||||||
CdkTreeModule,
|
|
||||||
...COMPONENTS,
|
|
||||||
...DIRECTIVES,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
...COMPONENTS,
|
|
||||||
...DIRECTIVES,
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
{
|
|
||||||
provide: DYNAMIC_FORM_CONTROL_MAP_FN,
|
|
||||||
useValue: dsDynamicFormControlMapFn,
|
|
||||||
},
|
|
||||||
DynamicFormLayoutService,
|
|
||||||
DynamicFormService,
|
|
||||||
DynamicFormValidationService,
|
|
||||||
FormBuilderService,
|
|
||||||
DsDynamicTypeBindRelationService,
|
|
||||||
FormService,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class FormModule {
|
|
||||||
}
|
|
@@ -30,7 +30,6 @@ import { TestScheduler } from 'rxjs/testing';
|
|||||||
import {
|
import {
|
||||||
APP_CONFIG,
|
APP_CONFIG,
|
||||||
APP_DATA_SERVICES_MAP,
|
APP_DATA_SERVICES_MAP,
|
||||||
APP_DYNAMIC_FORM_CONTROL_FN,
|
|
||||||
} from 'src/config/app-config.interface';
|
} from 'src/config/app-config.interface';
|
||||||
import { environment } from 'src/environments/environment.test';
|
import { environment } from 'src/environments/environment.test';
|
||||||
|
|
||||||
@@ -68,6 +67,7 @@ import {
|
|||||||
ResourcePolicyEvent,
|
ResourcePolicyEvent,
|
||||||
ResourcePolicyFormComponent,
|
ResourcePolicyFormComponent,
|
||||||
} from './resource-policy-form.component';
|
} from './resource-policy-form.component';
|
||||||
|
import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core';
|
||||||
|
|
||||||
export const mockResourcePolicyFormData = {
|
export const mockResourcePolicyFormData = {
|
||||||
name: [
|
name: [
|
||||||
@@ -233,7 +233,7 @@ describe('ResourcePolicyFormComponent test suite', () => {
|
|||||||
{ provide: SubmissionService, useValue: {} },
|
{ provide: SubmissionService, useValue: {} },
|
||||||
{ provide: APP_CONFIG, useValue: environment },
|
{ provide: APP_CONFIG, useValue: environment },
|
||||||
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
||||||
{ provide: APP_DYNAMIC_FORM_CONTROL_FN, useValue: dsDynamicFormControlMapFn },
|
{ provide: DYNAMIC_FORM_CONTROL_MAP_FN, useValue: dsDynamicFormControlMapFn },
|
||||||
provideMockStore({}),
|
provideMockStore({}),
|
||||||
],
|
],
|
||||||
schemas: [
|
schemas: [
|
||||||
|
@@ -3,7 +3,6 @@ import { NgModule } from '@angular/core';
|
|||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { FormModule } from '../form/form.module';
|
|
||||||
import { ResourcePolicyCreateComponent } from './create/resource-policy-create.component';
|
import { ResourcePolicyCreateComponent } from './create/resource-policy-create.component';
|
||||||
import { ResourcePolicyEditComponent } from './edit/resource-policy-edit.component';
|
import { ResourcePolicyEditComponent } from './edit/resource-policy-edit.component';
|
||||||
import { ResourcePolicyEntryComponent } from './entry/resource-policy-entry.component';
|
import { ResourcePolicyEntryComponent } from './entry/resource-policy-entry.component';
|
||||||
@@ -29,7 +28,6 @@ const PROVIDERS = [
|
|||||||
imports: [
|
imports: [
|
||||||
NgbModule,
|
NgbModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormModule,
|
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
...COMPONENTS,
|
...COMPONENTS,
|
||||||
],
|
],
|
||||||
|
@@ -4,6 +4,7 @@ import {
|
|||||||
TestBed,
|
TestBed,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
|
DYNAMIC_FORM_CONTROL_MAP_FN,
|
||||||
DynamicCheckboxModel,
|
DynamicCheckboxModel,
|
||||||
DynamicDatePickerModel,
|
DynamicDatePickerModel,
|
||||||
DynamicFormArrayModel,
|
DynamicFormArrayModel,
|
||||||
@@ -16,7 +17,6 @@ import { of as observableOf } from 'rxjs';
|
|||||||
import {
|
import {
|
||||||
APP_CONFIG,
|
APP_CONFIG,
|
||||||
APP_DATA_SERVICES_MAP,
|
APP_DATA_SERVICES_MAP,
|
||||||
APP_DYNAMIC_FORM_CONTROL_FN,
|
|
||||||
} from 'src/config/app-config.interface';
|
} from 'src/config/app-config.interface';
|
||||||
import { environment } from 'src/environments/environment.test';
|
import { environment } from 'src/environments/environment.test';
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ describe('SubmissionSectionAccessesComponent', () => {
|
|||||||
{ provide: SubmissionService, useValue: {} },
|
{ provide: SubmissionService, useValue: {} },
|
||||||
{ provide: APP_CONFIG, useValue: environment },
|
{ provide: APP_CONFIG, useValue: environment },
|
||||||
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
||||||
{ provide: APP_DYNAMIC_FORM_CONTROL_FN, useValue: dsDynamicFormControlMapFn },
|
{ provide: DYNAMIC_FORM_CONTROL_MAP_FN, useValue: dsDynamicFormControlMapFn },
|
||||||
FormBuilderService,
|
FormBuilderService,
|
||||||
provideMockStore({}),
|
provideMockStore({}),
|
||||||
],
|
],
|
||||||
@@ -218,7 +218,7 @@ describe('SubmissionSectionAccessesComponent', () => {
|
|||||||
{ provide: SubmissionService, useValue: {} },
|
{ provide: SubmissionService, useValue: {} },
|
||||||
{ provide: APP_CONFIG, useValue: environment },
|
{ provide: APP_CONFIG, useValue: environment },
|
||||||
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
||||||
{ provide: APP_DYNAMIC_FORM_CONTROL_FN, useValue: dsDynamicFormControlMapFn },
|
{ provide: DYNAMIC_FORM_CONTROL_MAP_FN, useValue: dsDynamicFormControlMapFn },
|
||||||
FormBuilderService,
|
FormBuilderService,
|
||||||
provideMockStore({}),
|
provideMockStore({}),
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@ import {
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
} from '@angular/forms';
|
} from '@angular/forms';
|
||||||
import {
|
import {
|
||||||
|
DYNAMIC_FORM_CONTROL_MAP_FN,
|
||||||
DynamicCheckboxModel,
|
DynamicCheckboxModel,
|
||||||
DynamicFormControlEvent,
|
DynamicFormControlEvent,
|
||||||
DynamicFormControlEventType,
|
DynamicFormControlEventType,
|
||||||
@@ -27,7 +28,6 @@ import { DsDynamicTypeBindRelationService } from 'src/app/shared/form/builder/ds
|
|||||||
import {
|
import {
|
||||||
APP_CONFIG,
|
APP_CONFIG,
|
||||||
APP_DATA_SERVICES_MAP,
|
APP_DATA_SERVICES_MAP,
|
||||||
APP_DYNAMIC_FORM_CONTROL_FN,
|
|
||||||
} from 'src/config/app-config.interface';
|
} from 'src/config/app-config.interface';
|
||||||
import { environment } from 'src/environments/environment.test';
|
import { environment } from 'src/environments/environment.test';
|
||||||
|
|
||||||
@@ -37,6 +37,7 @@ import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder
|
|||||||
import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder';
|
import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder';
|
||||||
import { Collection } from '../../../core/shared/collection.model';
|
import { Collection } from '../../../core/shared/collection.model';
|
||||||
import { License } from '../../../core/shared/license.model';
|
import { License } from '../../../core/shared/license.model';
|
||||||
|
import { SubmissionObjectDataService } from '../../../core/submission/submission-object-data.service';
|
||||||
import { dsDynamicFormControlMapFn } from '../../../shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-map-fn';
|
import { dsDynamicFormControlMapFn } from '../../../shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-map-fn';
|
||||||
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
|
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
|
||||||
import { FormFieldMetadataValueObject } from '../../../shared/form/builder/models/form-field-metadata-value.model';
|
import { FormFieldMetadataValueObject } from '../../../shared/form/builder/models/form-field-metadata-value.model';
|
||||||
@@ -48,9 +49,13 @@ import {
|
|||||||
mockLicenseParsedErrors,
|
mockLicenseParsedErrors,
|
||||||
mockSubmissionCollectionId,
|
mockSubmissionCollectionId,
|
||||||
mockSubmissionId,
|
mockSubmissionId,
|
||||||
|
mockSubmissionObject,
|
||||||
} from '../../../shared/mocks/submission.mock';
|
} from '../../../shared/mocks/submission.mock';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils';
|
import {
|
||||||
|
createSuccessfulRemoteDataObject,
|
||||||
|
createSuccessfulRemoteDataObject$,
|
||||||
|
} from '../../../shared/remote-data.utils';
|
||||||
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
|
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
|
||||||
import { SectionsServiceStub } from '../../../shared/testing/sections-service.stub';
|
import { SectionsServiceStub } from '../../../shared/testing/sections-service.stub';
|
||||||
import { SubmissionServiceStub } from '../../../shared/testing/submission-service.stub';
|
import { SubmissionServiceStub } from '../../../shared/testing/submission-service.stub';
|
||||||
@@ -179,7 +184,13 @@ describe('SubmissionSectionLicenseComponent test suite', () => {
|
|||||||
{ provide: DsDynamicTypeBindRelationService, useValue: getMockDsDynamicTypeBindRelationService() },
|
{ provide: DsDynamicTypeBindRelationService, useValue: getMockDsDynamicTypeBindRelationService() },
|
||||||
{ provide: APP_CONFIG, useValue: environment },
|
{ provide: APP_CONFIG, useValue: environment },
|
||||||
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
||||||
{ provide: APP_DYNAMIC_FORM_CONTROL_FN, useValue: dsDynamicFormControlMapFn },
|
{ provide: DYNAMIC_FORM_CONTROL_MAP_FN, useValue: dsDynamicFormControlMapFn },
|
||||||
|
{
|
||||||
|
provide: SubmissionObjectDataService,
|
||||||
|
useValue: {
|
||||||
|
findById: () => observableOf(createSuccessfulRemoteDataObject(mockSubmissionObject)),
|
||||||
|
},
|
||||||
|
},
|
||||||
SubmissionSectionLicenseComponent,
|
SubmissionSectionLicenseComponent,
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
|
@@ -19,7 +19,6 @@ import { LdnServicesService } from '../admin/admin-ldn-services/ldn-services-dat
|
|||||||
import { storeModuleConfig } from '../app.reducer';
|
import { storeModuleConfig } from '../app.reducer';
|
||||||
import { SubmissionAccessesConfigDataService } from '../core/config/submission-accesses-config-data.service';
|
import { SubmissionAccessesConfigDataService } from '../core/config/submission-accesses-config-data.service';
|
||||||
import { SubmissionUploadsConfigDataService } from '../core/config/submission-uploads-config-data.service';
|
import { SubmissionUploadsConfigDataService } from '../core/config/submission-uploads-config-data.service';
|
||||||
import { FormModule } from '../shared/form/form.module';
|
|
||||||
import { UploadModule } from '../shared/upload/upload.module';
|
import { UploadModule } from '../shared/upload/upload.module';
|
||||||
import { SubmissionEditComponent } from './edit/submission-edit.component';
|
import { SubmissionEditComponent } from './edit/submission-edit.component';
|
||||||
import { ThemedSubmissionEditComponent } from './edit/themed-submission-edit.component';
|
import { ThemedSubmissionEditComponent } from './edit/themed-submission-edit.component';
|
||||||
@@ -115,7 +114,6 @@ const DECLARATIONS = [
|
|||||||
StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig<SubmissionState, Action>),
|
StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig<SubmissionState, Action>),
|
||||||
EffectsModule.forFeature(),
|
EffectsModule.forFeature(),
|
||||||
EffectsModule.forFeature(submissionEffects),
|
EffectsModule.forFeature(submissionEffects),
|
||||||
FormModule,
|
|
||||||
NgbModalModule,
|
NgbModalModule,
|
||||||
NgbCollapseModule,
|
NgbCollapseModule,
|
||||||
NgbAccordionModule,
|
NgbAccordionModule,
|
||||||
@@ -125,7 +123,6 @@ const DECLARATIONS = [
|
|||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
...DECLARATIONS,
|
...DECLARATIONS,
|
||||||
FormModule,
|
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
SectionUploadService,
|
SectionUploadService,
|
||||||
|
@@ -2,8 +2,6 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
|
|
||||||
import { RootModule } from '../../app/root.module';
|
import { RootModule } from '../../app/root.module';
|
||||||
import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module';
|
|
||||||
import { DsoPageModule } from '../../app/shared/dso-page/dso-page.module';
|
|
||||||
import { JournalComponent } from './app/entity-groups/journal-entities/item-pages/journal/journal.component';
|
import { JournalComponent } from './app/entity-groups/journal-entities/item-pages/journal/journal.component';
|
||||||
import { JournalIssueComponent } from './app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component';
|
import { JournalIssueComponent } from './app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component';
|
||||||
import { JournalVolumeComponent } from './app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component';
|
import { JournalVolumeComponent } from './app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component';
|
||||||
@@ -80,8 +78,6 @@ const DECLARATIONS = [
|
|||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
RootModule,
|
RootModule,
|
||||||
SharedBrowseByModule,
|
|
||||||
DsoPageModule,
|
|
||||||
...DECLARATIONS,
|
...DECLARATIONS,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
@@ -13,12 +13,7 @@ import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
|||||||
import { IdlePreloadModule } from 'angular-idle-preload';
|
import { IdlePreloadModule } from 'angular-idle-preload';
|
||||||
|
|
||||||
import { AppModule } from '../../app/app.module';
|
import { AppModule } from '../../app/app.module';
|
||||||
import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module';
|
|
||||||
import { RootModule } from '../../app/root.module';
|
import { RootModule } from '../../app/root.module';
|
||||||
import { SearchPageModule } from '../../app/search-page/search-page.module';
|
|
||||||
import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module';
|
|
||||||
import { DsoPageModule } from '../../app/shared/dso-page/dso-page.module';
|
|
||||||
import { FormModule } from '../../app/shared/form/form.module';
|
|
||||||
import { MenuModule } from '../../app/shared/menu/menu.module';
|
import { MenuModule } from '../../app/shared/menu/menu.module';
|
||||||
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
||||||
import { SearchModule } from '../../app/shared/search/search.module';
|
import { SearchModule } from '../../app/shared/search/search.module';
|
||||||
@@ -206,13 +201,9 @@ const DECLARATIONS = [
|
|||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
IdlePreloadModule,
|
IdlePreloadModule,
|
||||||
MenuModule,
|
MenuModule,
|
||||||
DsoPageModule,
|
|
||||||
NgbModule,
|
NgbModule,
|
||||||
RegisterEmailFormModule,
|
|
||||||
RouterModule,
|
RouterModule,
|
||||||
ScrollToModule,
|
ScrollToModule,
|
||||||
SearchPageModule,
|
|
||||||
SharedBrowseByModule,
|
|
||||||
StatisticsModule,
|
StatisticsModule,
|
||||||
StatisticsPageModule,
|
StatisticsPageModule,
|
||||||
StoreModule,
|
StoreModule,
|
||||||
@@ -224,7 +215,6 @@ const DECLARATIONS = [
|
|||||||
ResourcePoliciesModule,
|
ResourcePoliciesModule,
|
||||||
SystemWideAlertModule,
|
SystemWideAlertModule,
|
||||||
NgxGalleryModule,
|
NgxGalleryModule,
|
||||||
FormModule,
|
|
||||||
...DECLARATIONS,
|
...DECLARATIONS,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
@@ -2,7 +2,6 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
|
|
||||||
import { RootModule } from '../../app/root.module';
|
import { RootModule } from '../../app/root.module';
|
||||||
import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module';
|
|
||||||
import { HeaderComponent } from './app/header/header.component';
|
import { HeaderComponent } from './app/header/header.component';
|
||||||
import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component';
|
import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component';
|
||||||
import { HomeNewsComponent } from './app/home-page/home-news/home-news.component';
|
import { HomeNewsComponent } from './app/home-page/home-news/home-news.component';
|
||||||
@@ -25,7 +24,6 @@ const DECLARATIONS = [
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
SharedBrowseByModule,
|
|
||||||
RootModule,
|
RootModule,
|
||||||
...DECLARATIONS,
|
...DECLARATIONS,
|
||||||
],
|
],
|
||||||
|
@@ -12,10 +12,7 @@ import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
|||||||
import { IdlePreloadModule } from 'angular-idle-preload';
|
import { IdlePreloadModule } from 'angular-idle-preload';
|
||||||
|
|
||||||
import { AppModule } from '../../app/app.module';
|
import { AppModule } from '../../app/app.module';
|
||||||
import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module';
|
|
||||||
import { RootModule } from '../../app/root.module';
|
import { RootModule } from '../../app/root.module';
|
||||||
import { SearchPageModule } from '../../app/search-page/search-page.module';
|
|
||||||
import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-by.module';
|
|
||||||
import { MenuModule } from '../../app/shared/menu/menu.module';
|
import { MenuModule } from '../../app/shared/menu/menu.module';
|
||||||
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
||||||
import { SearchModule } from '../../app/shared/search/search.module';
|
import { SearchModule } from '../../app/shared/search/search.module';
|
||||||
@@ -37,11 +34,8 @@ const DECLARATIONS = [
|
|||||||
IdlePreloadModule,
|
IdlePreloadModule,
|
||||||
MenuModule,
|
MenuModule,
|
||||||
NgbModule,
|
NgbModule,
|
||||||
RegisterEmailFormModule,
|
|
||||||
RouterModule,
|
RouterModule,
|
||||||
ScrollToModule,
|
ScrollToModule,
|
||||||
SearchPageModule,
|
|
||||||
SharedBrowseByModule,
|
|
||||||
StatisticsModule,
|
StatisticsModule,
|
||||||
StatisticsPageModule,
|
StatisticsPageModule,
|
||||||
StoreModule,
|
StoreModule,
|
||||||
|
Reference in New Issue
Block a user