mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-19 07:53:02 +00:00
Merge branch 'master' into metadata-and-relationships-combined-in-submission
This commit is contained in:
@@ -70,7 +70,7 @@ import { SubmissionObjectDataService } from '../../../../core/submission/submiss
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { WorkspaceItem } from '../../../../core/submission/models/workspaceitem.model';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../testing/utils';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../remote-data.utils';
|
||||
import { FormService } from '../../form.service';
|
||||
import { SubmissionService } from '../../../../submission/submission.service';
|
||||
import { FormBuilderService } from '../form-builder.service';
|
||||
|
@@ -7,7 +7,7 @@ import { select, Store } from '@ngrx/store';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { Relationship } from '../../../../../core/shared/item-relationships/relationship.model';
|
||||
import { RelationshipOptions } from '../../models/relationship-options.model';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../testing/utils';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils';
|
||||
import { RemoveRelationshipAction } from '../relation-lookup-modal/relationship.actions';
|
||||
import { ItemSearchResult } from '../../../../object-collection/shared/item-search-result.model';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
|
@@ -32,7 +32,7 @@
|
||||
<ds-dynamic-form-control-container *ngFor="let _model of model.groups[idx].group"
|
||||
[bindId]="false"
|
||||
[context]="model.groups[idx]"
|
||||
[group]="control.at(idx)"
|
||||
[group]="control.get([idx])"
|
||||
[hidden]="_model.hidden"
|
||||
[layout]="layout"
|
||||
[model]="_model"
|
||||
|
@@ -12,7 +12,7 @@ import { FormBuilderService } from '../../../form-builder.service';
|
||||
|
||||
import { FormComponent } from '../../../../form.component';
|
||||
import { FormService } from '../../../../form.service';
|
||||
import { createTestComponent } from '../../../../../testing/utils';
|
||||
import { createTestComponent } from '../../../../../testing/utils.test';
|
||||
|
||||
export const DATE_TEST_GROUP = new FormGroup({
|
||||
date: new FormControl()
|
||||
|
@@ -6,7 +6,6 @@
|
||||
[ngClass]="getClass('element','control')">
|
||||
|
||||
<ds-dynamic-form-control-container *ngFor="let _model of model.group"
|
||||
[formId]="formId"
|
||||
[group]="control"
|
||||
[hasErrorMessaging]="model.hasErrorMessages"
|
||||
[hidden]="_model.hidden"
|
||||
|
@@ -17,11 +17,11 @@ import {
|
||||
} from '@ng-dynamic-forms/core';
|
||||
import { DynamicFormsNGBootstrapUIModule } from '@ng-dynamic-forms/ui-ng-bootstrap';
|
||||
import { AuthorityService } from '../../../../../../core/integration/authority.service';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service-stub';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service.stub';
|
||||
import { DynamicListRadioGroupModel } from './dynamic-list-radio-group.model';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
|
||||
import { createTestComponent } from '../../../../../testing/utils';
|
||||
import { createTestComponent } from '../../../../../testing/utils.test';
|
||||
|
||||
export const LAYOUT_TEST = {
|
||||
element: {
|
||||
|
@@ -32,7 +32,7 @@ export interface ListItem {
|
||||
export class DsDynamicListComponent extends DynamicFormControlComponent implements OnInit {
|
||||
@Input() bindId = true;
|
||||
@Input() group: FormGroup;
|
||||
@Input() model: DynamicListCheckboxGroupModel | DynamicListRadioGroupModel;
|
||||
@Input() model: any;
|
||||
|
||||
@Output() blur: EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
@@ -59,7 +59,7 @@
|
||||
ngbTooltip="{{'form.clear-help' | translate}}"
|
||||
placement="top"
|
||||
[disabled]="model.readOnly"
|
||||
(click)="remove($event)">{{'form.clear' | translate}}
|
||||
(click)="remove()">{{'form.clear' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-auto text-center">
|
||||
|
@@ -13,7 +13,7 @@ import {
|
||||
} from '@ng-dynamic-forms/core';
|
||||
import { DynamicFormsNGBootstrapUIModule } from '@ng-dynamic-forms/ui-ng-bootstrap';
|
||||
import { AuthorityService } from '../../../../../../core/integration/authority.service';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service-stub';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service.stub';
|
||||
import { DsDynamicLookupComponent } from './dynamic-lookup.component';
|
||||
import { DynamicLookupModel, DynamicLookupModelConfig } from './dynamic-lookup.model';
|
||||
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
||||
@@ -21,14 +21,11 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
|
||||
import { createTestComponent } from '../../../../../testing/utils';
|
||||
import { createTestComponent } from '../../../../../testing/utils.test';
|
||||
import { DynamicLookupNameModel } from './dynamic-lookup-name.model';
|
||||
import { AuthorityConfidenceStateDirective } from '../../../../../authority-confidence/authority-confidence-state.directive';
|
||||
import { ObjNgFor } from '../../../../../utils/object-ngfor.pipe';
|
||||
import { GLOBAL_CONFIG, GlobalConfig } from '../../../../../../../config';
|
||||
import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-config';
|
||||
import { WorkspaceitemsEditPageModule } from '../../../../../../+workspaceitems-edit-page/workspaceitems-edit-page.module';
|
||||
import { WorkspaceItem } from '../../../../../../core/submission/models/workspaceitem.model';
|
||||
import { GlobalConfig } from '../../../../../../../config/global-config.interface';
|
||||
|
||||
let LOOKUP_TEST_MODEL_CONFIG: DynamicLookupModelConfig = {
|
||||
authorityOptions: {
|
||||
@@ -83,8 +80,6 @@ let LOOKUP_TEST_GROUP = new FormGroup({
|
||||
lookupName: new FormControl()
|
||||
});
|
||||
|
||||
const envConfig: GlobalConfig = MOCK_SUBMISSION_CONFIG;
|
||||
|
||||
describe('Dynamic Lookup component', () => {
|
||||
function init() {
|
||||
LOOKUP_TEST_MODEL_CONFIG = {
|
||||
@@ -172,7 +167,6 @@ describe('Dynamic Lookup component', () => {
|
||||
providers: [
|
||||
ChangeDetectorRef,
|
||||
DsDynamicLookupComponent,
|
||||
{ provide: GLOBAL_CONFIG, useValue: envConfig },
|
||||
{ provide: AuthorityService, useValue: authorityService },
|
||||
{ provide: DynamicFormLayoutService, useValue: {} },
|
||||
{ provide: DynamicFormValidationService, useValue: {} }
|
||||
|
@@ -30,7 +30,7 @@ import { ConfidenceType } from '../../../../../../core/integration/models/confid
|
||||
export class DsDynamicLookupComponent extends DynamicFormControlComponent implements OnDestroy, OnInit {
|
||||
@Input() bindId = true;
|
||||
@Input() group: FormGroup;
|
||||
@Input() model: DynamicLookupModel | DynamicLookupNameModel;
|
||||
@Input() model: any;
|
||||
|
||||
@Output() blur: EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
@@ -12,27 +12,25 @@ import { SubmissionFormsModel } from '../../../../../../core/config/models/confi
|
||||
import { FormFieldModel } from '../../../models/form-field.model';
|
||||
import { FormBuilderService } from '../../../form-builder.service';
|
||||
import { FormService } from '../../../../form.service';
|
||||
import { GLOBAL_CONFIG, GlobalConfig } from '../../../../../../../config';
|
||||
import { FormComponent } from '../../../../form.component';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { Chips } from '../../../../../chips/models/chips.model';
|
||||
import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model';
|
||||
import { DsDynamicInputModel } from '../ds-dynamic-input.model';
|
||||
import { createTestComponent } from '../../../../../testing/utils';
|
||||
import { createTestComponent } from '../../../../../testing/utils.test';
|
||||
import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core';
|
||||
import { AuthorityService } from '../../../../../../core/integration/authority.service';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service-stub';
|
||||
import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-config';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service.stub';
|
||||
import { Store, StoreModule } from '@ngrx/store';
|
||||
import { MockStore } from '../../../../../testing/mock-store';
|
||||
import { StoreMock } from '../../../../../testing/store.mock';
|
||||
import { FormRowModel } from '../../../../../../core/config/models/config-submission-form.model';
|
||||
import { GlobalConfig } from '../../../../../../../config/global-config.interface';
|
||||
import { storeModuleConfig } from '../../../../../../app.reducer';
|
||||
|
||||
export let FORM_GROUP_TEST_MODEL_CONFIG;
|
||||
|
||||
export let FORM_GROUP_TEST_GROUP;
|
||||
|
||||
const config: GlobalConfig = MOCK_SUBMISSION_CONFIG;
|
||||
|
||||
const submissionId = '1234';
|
||||
|
||||
function init() {
|
||||
@@ -115,7 +113,7 @@ describe('DsDynamicRelationGroupComponent test suite', () => {
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
NgbModule,
|
||||
StoreModule.forRoot({}),
|
||||
StoreModule.forRoot({}, storeModuleConfig),
|
||||
TranslateModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
@@ -132,8 +130,7 @@ describe('DsDynamicRelationGroupComponent test suite', () => {
|
||||
FormComponent,
|
||||
FormService,
|
||||
{ provide: AuthorityService, useValue: new AuthorityServiceStub() },
|
||||
{ provide: GLOBAL_CONFIG, useValue: config },
|
||||
{ provide: Store, useClass: MockStore }
|
||||
{ provide: Store, useClass: StoreMock }
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
@@ -32,14 +32,13 @@ import { Chips } from '../../../../../chips/models/chips.model';
|
||||
import { hasValue, isEmpty, isNotEmpty, isNotNull } from '../../../../../empty.util';
|
||||
import { shrinkInOut } from '../../../../../animations/shrink';
|
||||
import { ChipsItem } from '../../../../../chips/models/chips-item.model';
|
||||
import { GlobalConfig } from '../../../../../../../config/global-config.interface';
|
||||
import { GLOBAL_CONFIG } from '../../../../../../../config';
|
||||
import { hasOnlyEmptyProperties } from '../../../../../object.util';
|
||||
import { IntegrationSearchOptions } from '../../../../../../core/integration/models/integration-options.model';
|
||||
import { AuthorityService } from '../../../../../../core/integration/authority.service';
|
||||
import { IntegrationData } from '../../../../../../core/integration/integration-data';
|
||||
import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model';
|
||||
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
|
||||
import { environment } from '../../../../../../../environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-dynamic-relation-group',
|
||||
@@ -67,8 +66,7 @@ export class DsDynamicRelationGroupComponent extends DynamicFormControlComponent
|
||||
|
||||
@ViewChild('formRef', {static: false}) private formRef: FormComponent;
|
||||
|
||||
constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig,
|
||||
private authorityService: AuthorityService,
|
||||
constructor(private authorityService: AuthorityService,
|
||||
private formBuilderService: FormBuilderService,
|
||||
private formService: FormService,
|
||||
private cdr: ChangeDetectorRef,
|
||||
@@ -295,7 +293,7 @@ export class DsDynamicRelationGroupComponent extends DynamicFormControlComponent
|
||||
initChipsValue,
|
||||
'value',
|
||||
this.model.mandatoryField,
|
||||
this.EnvConfig.submission.icons.metadata);
|
||||
environment.submission.icons.metadata);
|
||||
this.subs.push(
|
||||
this.chips.chipsItems
|
||||
.subscribe(() => {
|
||||
@@ -308,7 +306,7 @@ export class DsDynamicRelationGroupComponent extends DynamicFormControlComponent
|
||||
}
|
||||
}
|
||||
}),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private resetForm() {
|
||||
|
@@ -11,11 +11,11 @@ import { DynamicFormsNGBootstrapUIModule } from '@ng-dynamic-forms/ui-ng-bootstr
|
||||
|
||||
import { AuthorityOptions } from '../../../../../../core/integration/models/authority-options.model';
|
||||
import { AuthorityService } from '../../../../../../core/integration/authority.service';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service-stub';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service.stub';
|
||||
import { DsDynamicScrollableDropdownComponent } from './dynamic-scrollable-dropdown.component';
|
||||
import { DynamicScrollableDropdownModel } from './dynamic-scrollable-dropdown.model';
|
||||
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
|
||||
import { createTestComponent, hasClass } from '../../../../../testing/utils';
|
||||
import { createTestComponent, hasClass } from '../../../../../testing/utils.test';
|
||||
|
||||
export const SD_TEST_GROUP = new FormGroup({
|
||||
dropdown: new FormControl(),
|
||||
|
@@ -14,16 +14,14 @@ import { NgbModule, NgbTypeaheadSelectItemEvent } from '@ng-bootstrap/ng-bootstr
|
||||
|
||||
import { AuthorityOptions } from '../../../../../../core/integration/models/authority-options.model';
|
||||
import { AuthorityService } from '../../../../../../core/integration/authority.service';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service-stub';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service.stub';
|
||||
import { DsDynamicTagComponent } from './dynamic-tag.component';
|
||||
import { DynamicTagModel } from './dynamic-tag.model';
|
||||
import { GlobalConfig } from '../../../../../../../config/global-config.interface';
|
||||
import { GLOBAL_CONFIG } from '../../../../../../../config';
|
||||
import { Chips } from '../../../../../chips/models/chips.model';
|
||||
import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model';
|
||||
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
|
||||
import { createTestComponent } from '../../../../../testing/utils';
|
||||
import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-config';
|
||||
import { createTestComponent } from '../../../../../testing/utils.test';
|
||||
|
||||
function createKeyUpEvent(key: number) {
|
||||
/* tslint:disable:no-empty */
|
||||
@@ -40,7 +38,6 @@ function createKeyUpEvent(key: number) {
|
||||
|
||||
let TAG_TEST_GROUP;
|
||||
let TAG_TEST_MODEL_CONFIG;
|
||||
const envConfig: GlobalConfig = MOCK_SUBMISSION_CONFIG;
|
||||
|
||||
function init() {
|
||||
TAG_TEST_GROUP = new FormGroup({
|
||||
@@ -96,7 +93,6 @@ describe('DsDynamicTagComponent test suite', () => {
|
||||
ChangeDetectorRef,
|
||||
DsDynamicTagComponent,
|
||||
{ provide: AuthorityService, useValue: authorityServiceStub },
|
||||
{ provide: GLOBAL_CONFIG, useValue: envConfig },
|
||||
{ provide: DynamicFormLayoutService, useValue: {} },
|
||||
{ provide: DynamicFormValidationService, useValue: {} }
|
||||
],
|
||||
|
@@ -16,8 +16,7 @@ import { DynamicTagModel } from './dynamic-tag.model';
|
||||
import { IntegrationSearchOptions } from '../../../../../../core/integration/models/integration-options.model';
|
||||
import { Chips } from '../../../../../chips/models/chips.model';
|
||||
import { hasValue, isNotEmpty } from '../../../../../empty.util';
|
||||
import { GlobalConfig } from '../../../../../../../config/global-config.interface';
|
||||
import { GLOBAL_CONFIG } from '../../../../../../../config';
|
||||
import { environment } from '../../../../../../../environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-dynamic-tag',
|
||||
@@ -73,10 +72,9 @@ export class DsDynamicTagComponent extends DynamicFormControlComponent implement
|
||||
}),
|
||||
map((results) => results.list),
|
||||
tap(() => this.changeSearchingStatus(false)),
|
||||
merge(this.hideSearchingWhenUnsubscribed),);
|
||||
merge(this.hideSearchingWhenUnsubscribed));
|
||||
|
||||
constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig,
|
||||
private authorityService: AuthorityService,
|
||||
constructor(private authorityService: AuthorityService,
|
||||
private cdr: ChangeDetectorRef,
|
||||
protected layoutService: DynamicFormLayoutService,
|
||||
protected validationService: DynamicFormValidationService
|
||||
@@ -98,7 +96,7 @@ export class DsDynamicTagComponent extends DynamicFormControlComponent implement
|
||||
this.model.value,
|
||||
'display',
|
||||
null,
|
||||
this.EnvConfig.submission.icons.metadata);
|
||||
environment.submission.icons.metadata);
|
||||
|
||||
this.chips.chipsItems
|
||||
.subscribe((subItems: any[]) => {
|
||||
@@ -108,7 +106,7 @@ export class DsDynamicTagComponent extends DynamicFormControlComponent implement
|
||||
this.model.valueUpdates.next(items);
|
||||
this.change.emit(event);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
changeSearchingStatus(status: boolean) {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { AUTOCOMPLETE_OFF, DynamicFormControlLayout, serializable } from '@ng-dynamic-forms/core';
|
||||
import { DsDynamicInputModel, DsDynamicInputModelConfig } from '../ds-dynamic-input.model';
|
||||
import { AuthorityOptions } from '../../../../../../core/integration/models/authority-options.model';
|
||||
|
||||
export const DYNAMIC_FORM_CONTROL_TYPE_TAG = 'TAG';
|
||||
|
||||
@@ -22,7 +21,7 @@ export class DynamicTagModel extends DsDynamicInputModel {
|
||||
this.autoComplete = AUTOCOMPLETE_OFF;
|
||||
this.minChars = config.minChars || 3;
|
||||
const value = config.value || [];
|
||||
this.valueUpdates.next(value)
|
||||
this.valueUpdates.next(value);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -12,23 +12,19 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { AuthorityOptions } from '../../../../../../core/integration/models/authority-options.model';
|
||||
import { AuthorityService } from '../../../../../../core/integration/authority.service';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service-stub';
|
||||
import { AuthorityServiceStub } from '../../../../../testing/authority-service.stub';
|
||||
import { GlobalConfig } from '../../../../../../../config/global-config.interface';
|
||||
import { GLOBAL_CONFIG } from '../../../../../../../config';
|
||||
import { DsDynamicTypeaheadComponent } from './dynamic-typeahead.component';
|
||||
import { DynamicTypeaheadModel } from './dynamic-typeahead.model';
|
||||
import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model';
|
||||
import { createTestComponent } from '../../../../../testing/utils';
|
||||
import { createTestComponent } from '../../../../../testing/utils.test';
|
||||
import { AuthorityConfidenceStateDirective } from '../../../../../authority-confidence/authority-confidence-state.directive';
|
||||
import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-config';
|
||||
import { ObjNgFor } from '../../../../../utils/object-ngfor.pipe';
|
||||
|
||||
export let TYPEAHEAD_TEST_GROUP;
|
||||
|
||||
export let TYPEAHEAD_TEST_MODEL_CONFIG;
|
||||
|
||||
const envConfig: GlobalConfig = MOCK_SUBMISSION_CONFIG;
|
||||
|
||||
function init() {
|
||||
TYPEAHEAD_TEST_GROUP = new FormGroup({
|
||||
typeahead: new FormControl(),
|
||||
@@ -83,7 +79,6 @@ describe('DsDynamicTypeaheadComponent test suite', () => {
|
||||
providers: [
|
||||
ChangeDetectorRef,
|
||||
DsDynamicTypeaheadComponent,
|
||||
{ provide: GLOBAL_CONFIG, useValue: envConfig },
|
||||
{ provide: AuthorityService, useValue: authorityServiceStub },
|
||||
{ provide: DynamicFormLayoutService, useValue: {} },
|
||||
{ provide: DynamicFormValidationService, useValue: {} }
|
||||
|
@@ -28,6 +28,7 @@
|
||||
<ds-dynamic-lookup-relation-external-source-tab
|
||||
[label]="label"
|
||||
[listId]="listId"
|
||||
[repeatable]="repeatable"
|
||||
[item]="item"
|
||||
[collection]="collection"
|
||||
[relationship]="relationshipOptions"
|
||||
|
@@ -16,7 +16,8 @@ import { AddRelationshipAction, RemoveRelationshipAction } from './relationship.
|
||||
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
||||
import { PaginatedSearchOptions } from '../../../../search/paginated-search-options.model';
|
||||
import { ExternalSource } from '../../../../../core/shared/external-source.model';
|
||||
import { createPaginatedList, createSuccessfulRemoteDataObject$ } from '../../../../testing/utils';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils';
|
||||
import { createPaginatedList } from '../../../../testing/utils.test';
|
||||
import { ExternalSourceService } from '../../../../../core/data/external-source.service';
|
||||
import { LookupRelationService } from '../../../../../core/data/lookup-relation.service';
|
||||
|
||||
|
@@ -9,10 +9,9 @@ import { SearchConfigurationService } from '../../../../../../core/shared/search
|
||||
import { of as observableOf } from 'rxjs/internal/observable/of';
|
||||
import {
|
||||
createFailedRemoteDataObject$,
|
||||
createPaginatedList,
|
||||
createPendingRemoteDataObject$,
|
||||
createSuccessfulRemoteDataObject$
|
||||
} from '../../../../../testing/utils';
|
||||
} from '../../../../../remote-data.utils';
|
||||
import { ExternalSourceService } from '../../../../../../core/data/external-source.service';
|
||||
import { ExternalSource } from '../../../../../../core/shared/external-source.model';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
@@ -24,6 +23,7 @@ import { Item } from '../../../../../../core/shared/item.model';
|
||||
import { Collection } from '../../../../../../core/shared/collection.model';
|
||||
import { RelationshipOptions } from '../../../models/relationship-options.model';
|
||||
import { ExternalSourceEntryImportModalComponent } from './external-source-entry-import-modal/external-source-entry-import-modal.component';
|
||||
import { createPaginatedList } from '../../../../../testing/utils.test';
|
||||
|
||||
describe('DsDynamicLookupRelationExternalSourceTabComponent', () => {
|
||||
let component: DsDynamicLookupRelationExternalSourceTabComponent;
|
||||
|
@@ -72,7 +72,7 @@ export class DsDynamicLookupRelationExternalSourceTabComponent implements OnInit
|
||||
* The context to displaying lists for
|
||||
*/
|
||||
@Input() context: Context;
|
||||
|
||||
@Input() repeatable: boolean;
|
||||
/**
|
||||
* Emit an event when an object has been imported (or selected from similar local entries)
|
||||
*/
|
||||
|
@@ -8,12 +8,13 @@ import { LookupRelationService } from '../../../../../../../core/data/lookup-rel
|
||||
import { ExternalSourceEntry } from '../../../../../../../core/shared/external-source-entry.model';
|
||||
import { Item } from '../../../../../../../core/shared/item.model';
|
||||
import { ItemSearchResult } from '../../../../../../object-collection/shared/item-search-result.model';
|
||||
import { createPaginatedList, createSuccessfulRemoteDataObject$ } from '../../../../../../testing/utils';
|
||||
import { Collection } from '../../../../../../../core/shared/collection.model';
|
||||
import { RelationshipOptions } from '../../../../models/relationship-options.model';
|
||||
import { SelectableListService } from '../../../../../../object-list/selectable-list/selectable-list.service';
|
||||
import { ItemDataService } from '../../../../../../../core/data/item-data.service';
|
||||
import { NotificationsService } from '../../../../../../notifications/notifications.service';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../../../remote-data.utils';
|
||||
import { createPaginatedList } from '../../../../../../testing/utils.test';
|
||||
|
||||
describe('DsDynamicLookupRelationExternalSourceTabComponent', () => {
|
||||
let component: ExternalSourceEntryImportModalComponent;
|
||||
|
@@ -8,7 +8,8 @@ import { MetadataValue } from '../../../../../core/shared/metadata.models';
|
||||
import { RelationshipTypeService } from '../../../../../core/data/relationship-type.service';
|
||||
import { RelationshipService } from '../../../../../core/data/relationship.service';
|
||||
import { Relationship } from '../../../../../core/shared/item-relationships/relationship.model';
|
||||
import { createSuccessfulRemoteDataObject$, spyOnOperator } from '../../../../testing/utils';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils';
|
||||
import { spyOnOperator } from '../../../../testing/utils.test';
|
||||
import { RelationshipType } from '../../../../../core/shared/item-relationships/relationship-type.model';
|
||||
import { cold, hot } from 'jasmine-marbles';
|
||||
import * as operators from 'rxjs/operators';
|
||||
|
@@ -11,7 +11,7 @@ import { VarDirective } from '../../../../../utils/var.directive';
|
||||
import { RelationshipOptions } from '../../../models/relationship-options.model';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { PaginatedSearchOptions } from '../../../../../search/paginated-search-options.model';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../../testing/utils';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../../remote-data.utils';
|
||||
import { PaginatedList } from '../../../../../../core/data/paginated-list';
|
||||
import { ItemSearchResult } from '../../../../../object-collection/shared/item-search-result.model';
|
||||
import { Item } from '../../../../../../core/shared/item.model';
|
||||
|
@@ -14,7 +14,7 @@ import { By } from '@angular/platform-browser';
|
||||
import { RemoteData } from '../../../../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../../../../core/data/paginated-list';
|
||||
import { ListableObject } from '../../../../../object-collection/shared/listable-object.model';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../../testing/utils';
|
||||
import { createSuccessfulRemoteDataObject$ } from '../../../../../remote-data.utils';
|
||||
|
||||
describe('DsDynamicLookupRelationSelectionTabComponent', () => {
|
||||
let component: DsDynamicLookupRelationSelectionTabComponent;
|
||||
|
@@ -5,13 +5,13 @@ import { Observable } from 'rxjs';
|
||||
import { ListableObject } from '../../../../../object-collection/shared/listable-object.model';
|
||||
import { RemoteData } from '../../../../../../core/data/remote-data';
|
||||
import { map, switchMap, take } from 'rxjs/operators';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../../../testing/utils';
|
||||
import { PaginationComponentOptions } from '../../../../../pagination/pagination-component-options.model';
|
||||
import { PaginatedList } from '../../../../../../core/data/paginated-list';
|
||||
import { Router } from '@angular/router';
|
||||
import { PaginatedSearchOptions } from '../../../../../search/paginated-search-options.model';
|
||||
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
||||
import { Context } from '../../../../../../core/shared/context.model';
|
||||
import { createSuccessfulRemoteDataObject } from '../../../../../remote-data.utils';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-dynamic-lookup-relation-selection-tab',
|
||||
|
Reference in New Issue
Block a user