mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
moving lookup button outside of input field
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
"closed": null
|
||||
}
|
||||
],
|
||||
"languageCodes": []
|
||||
"languageCodes": ["en", "nl"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
<ng-container *ngTemplateOutlet="startTemplate?.templateRef; context: model"></ng-container>
|
||||
|
||||
<div [ngClass]="{'form-row': model.hasLanguages }">
|
||||
<div [ngClass]="{'form-row': model.hasLanguages || hasRelationLookup }">
|
||||
<div [ngClass]="getClass('grid', 'control')">
|
||||
|
||||
<ng-container #componentViewContainer></ng-container>
|
||||
@@ -35,11 +35,6 @@
|
||||
<option *ngFor="let lang of model.languageCodes" [value]="lang.code">{{lang.display}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-container *ngTemplateOutlet="endTemplate?.templateRef; context: model"></ng-container>
|
||||
|
||||
<ng-content></ng-content>
|
||||
|
||||
<div *ngIf="hasRelationLookup" class="col-auto text-center">
|
||||
<button class="btn btn-secondary"
|
||||
@@ -49,5 +44,25 @@
|
||||
(click)="openLookup(); $event.stopPropagation();">{{'form.lookup' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ng-container *ngTemplateOutlet="endTemplate?.templateRef; context: model"></ng-container>
|
||||
|
||||
<ng-content></ng-content>
|
||||
|
||||
|
||||
<div *ngIf="hasRelationLookup" class="mt-3">
|
||||
<ul class="list-unstyled">
|
||||
<li *ngFor="let result of ( model.value | async)">
|
||||
<ng-container *ngVar="result.indexableObject as v">
|
||||
<button type="button" class="close float-left" aria-label="Close button"
|
||||
(click)="removeSelection(result)">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<span class="d-inline-block align-middle ml-1">{{v | dsObjectKeys}}</span>
|
||||
<span class="d-inline-block align-middle ml-1">{{v.name}}</span>
|
||||
</ng-container>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -69,7 +69,7 @@ import { DsDynamicFormArrayComponent } from './models/array-group/dynamic-form-a
|
||||
import { DsDynamicRelationGroupComponent } from './models/relation-group/dynamic-relation-group.components';
|
||||
import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from './models/relation-group/dynamic-relation-group.model';
|
||||
import { DsDatePickerInlineComponent } from './models/date-picker-inline/dynamic-date-picker-inline.component';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { map, tap } from 'rxjs/operators';
|
||||
import { SelectableListState } from '../../../object-list/selectable-list/selectable-list.reducer';
|
||||
import { Observable } from 'rxjs';
|
||||
import { SearchResult } from '../../../search/search-result.model';
|
||||
@@ -77,9 +77,9 @@ import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
|
||||
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { RelationshipService } from '../../../../core/data/relationship.service';
|
||||
import { SelectableListService } from '../../../object-list/selectable-list/selectable-list.service';
|
||||
import { DsDynamicEmptyComponent } from './models/empty/dynamic-empty.component';
|
||||
import { DYNAMIC_FORM_CONTROL_TYPE_EMPTY } from './models/empty/dynamic-empty.model';
|
||||
import { DsDynamicLookupRelationModalComponent } from './models/empty/dynamic-lookup-relation-modal.component';
|
||||
import { DsDynamicDisabledComponent } from './models/disabled/dynamic-disabled.component';
|
||||
import { DYNAMIC_FORM_CONTROL_TYPE_DISABLED } from './models/disabled/dynamic-disabled.model';
|
||||
import { DsDynamicLookupRelationModalComponent } from './lookup-modal/dynamic-lookup-relation-modal.component';
|
||||
|
||||
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
||||
switch (model.type) {
|
||||
@@ -136,8 +136,8 @@ export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<
|
||||
case DYNAMIC_FORM_CONTROL_TYPE_LOOKUP_NAME:
|
||||
return DsDynamicLookupComponent;
|
||||
|
||||
case DYNAMIC_FORM_CONTROL_TYPE_EMPTY:
|
||||
return DsDynamicEmptyComponent;
|
||||
case DYNAMIC_FORM_CONTROL_TYPE_DISABLED:
|
||||
return DsDynamicDisabledComponent;
|
||||
|
||||
default:
|
||||
return null;
|
||||
@@ -195,7 +195,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
||||
private relationService: RelationshipService,
|
||||
private selectableListService: SelectableListService
|
||||
) {
|
||||
|
||||
super(componentFactoryResolver, layoutService, validationService);
|
||||
}
|
||||
|
||||
@@ -207,6 +206,7 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
||||
this.listId = 'list-' + this.model.relationship.relationshipType;
|
||||
this.model.value = this.selectableListService.getSelectableList(this.listId).pipe(
|
||||
map((listState: SelectableListState) => hasValue(listState) && hasValue(listState.selection) ? listState.selection : []),
|
||||
tap((t) => console.log(t))
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -259,12 +259,8 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
||||
modalComp.relationKey = this.model.name;
|
||||
modalComp.listId = this.listId;
|
||||
modalComp.filter = this.filter;
|
||||
modalComp.fieldName = this.searchConfig;
|
||||
modalComp.searchConfiguration = this.searchConfig;
|
||||
modalComp.label = this.model.label;
|
||||
|
||||
this.modalRef.result.then((resultString = '') => {
|
||||
this.modalValuesString = resultString;
|
||||
});
|
||||
}
|
||||
|
||||
removeSelection(object: SearchResult<DSpaceObject>) {
|
||||
|
@@ -1,26 +1,23 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PaginatedList } from '../../../../../../core/data/paginated-list';
|
||||
import { SearchResult } from '../../../../../search/search-result.model';
|
||||
import { RemoteData } from '../../../../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../../../core/data/paginated-list';
|
||||
import { SearchResult } from '../../../../search/search-result.model';
|
||||
import { RemoteData } from '../../../../../core/data/remote-data';
|
||||
import { Observable, ReplaySubject } from 'rxjs';
|
||||
import { SearchService } from '../../../../../../core/shared/search/search.service';
|
||||
import { PaginatedSearchOptions } from '../../../../../search/paginated-search-options.model';
|
||||
import { DSpaceObject } from '../../../../../../core/shared/dspace-object.model';
|
||||
import { PaginationComponentOptions } from '../../../../../pagination/pagination-component-options.model';
|
||||
import { SearchService } from '../../../../../core/shared/search/search.service';
|
||||
import { PaginatedSearchOptions } from '../../../../search/paginated-search-options.model';
|
||||
import { DSpaceObject } from '../../../../../core/shared/dspace-object.model';
|
||||
import { PaginationComponentOptions } from '../../../../pagination/pagination-component-options.model';
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { hasValue, isNotEmpty } from '../../../../../empty.util';
|
||||
import { hasValue, isNotEmpty } from '../../../../empty.util';
|
||||
import { concat, map, multicast, switchMap, take, takeWhile, tap } from 'rxjs/operators';
|
||||
import { Router } from '@angular/router';
|
||||
import { SEARCH_CONFIG_SERVICE } from '../../../../../../+my-dspace-page/my-dspace-page.component';
|
||||
import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service';
|
||||
import { SelectableListService } from '../../../../../object-list/selectable-list/selectable-list.service';
|
||||
import { SelectableListState } from '../../../../../object-list/selectable-list/selectable-list.reducer';
|
||||
import { ListableObject } from '../../../../../object-collection/shared/listable-object.model';
|
||||
import { RouteService } from '../../../../../services/route.service';
|
||||
import { getSucceededRemoteData } from '../../../../../../core/shared/operators';
|
||||
|
||||
const RELATION_TYPE_FILTER_PREFIX = 'f.entityType=';
|
||||
|
||||
import { SEARCH_CONFIG_SERVICE } from '../../../../../+my-dspace-page/my-dspace-page.component';
|
||||
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
||||
import { SelectableListService } from '../../../../object-list/selectable-list/selectable-list.service';
|
||||
import { SelectableListState } from '../../../../object-list/selectable-list/selectable-list.reducer';
|
||||
import { ListableObject } from '../../../../object-collection/shared/listable-object.model';
|
||||
import { RouteService } from '../../../../services/route.service';
|
||||
import { getSucceededRemoteData } from '../../../../../core/shared/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-dynamic-lookup-relation-modal',
|
@@ -0,0 +1,13 @@
|
||||
<div>
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col">
|
||||
<input class="form-control"
|
||||
[class.is-invalid]="showErrorMessages"
|
||||
[value]="model.value"
|
||||
[disabled]="model.disabled"
|
||||
[type]="model.inputType"
|
||||
[placeholder]="model.placeholder | translate"
|
||||
[readonly]="model.readOnly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -2,20 +2,17 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
|
||||
import { DynamicFormControlComponent, DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { DynamicEmptyModel } from './dynamic-empty.model';
|
||||
|
||||
/* TODO take a look at this when the REST entities submission is finished: we will probably need to get the fixed filter from the REST instead of filtering is out from the metadata field */
|
||||
const RELATION_TYPE_METADATA_PREFIX = 'relation.isPublicationOf';
|
||||
import { DynamicDisabledModel } from './dynamic-disabled.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-dynamic-empty',
|
||||
templateUrl: './dynamic-empty.component.html'
|
||||
selector: 'ds-dynamic-disabled',
|
||||
templateUrl: './dynamic-disabled.component.html'
|
||||
})
|
||||
export class DsDynamicEmptyComponent extends DynamicFormControlComponent {
|
||||
export class DsDynamicDisabledComponent extends DynamicFormControlComponent {
|
||||
|
||||
@Input() formId: string;
|
||||
@Input() group: FormGroup;
|
||||
@Input() model: DynamicEmptyModel;
|
||||
@Input() model: DynamicDisabledModel;
|
||||
|
||||
@Output() blur: EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -27,6 +24,4 @@ export class DsDynamicEmptyComponent extends DynamicFormControlComponent {
|
||||
) {
|
||||
super(layoutService, validationService);
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -1,26 +1,22 @@
|
||||
import { DynamicFormControlLayout, serializable } from '@ng-dynamic-forms/core';
|
||||
import { DsDynamicInputModel, DsDynamicInputModelConfig } from '../ds-dynamic-input.model';
|
||||
|
||||
export const DYNAMIC_FORM_CONTROL_TYPE_EMPTY = 'EMPTY';
|
||||
export const DYNAMIC_FORM_CONTROL_TYPE_DISABLED = 'EMPTY';
|
||||
|
||||
export interface DsDynamicEmptyModelConfig extends DsDynamicInputModelConfig {
|
||||
export interface DsDynamicDisabledModelConfig extends DsDynamicInputModelConfig {
|
||||
value?: any;
|
||||
repeatable: boolean;
|
||||
}
|
||||
|
||||
export class DynamicEmptyModel extends DsDynamicInputModel {
|
||||
export class DynamicDisabledModel extends DsDynamicInputModel {
|
||||
|
||||
@serializable() readonly type: string = DYNAMIC_FORM_CONTROL_TYPE_EMPTY;
|
||||
@serializable() readonly type: string = DYNAMIC_FORM_CONTROL_TYPE_DISABLED;
|
||||
@serializable() value: any;
|
||||
@serializable() repeatable: boolean;
|
||||
|
||||
constructor(config: DsDynamicEmptyModelConfig, layout?: DynamicFormControlLayout) {
|
||||
|
||||
constructor(config: DsDynamicDisabledModelConfig, layout?: DynamicFormControlLayout) {
|
||||
super(config, layout);
|
||||
|
||||
this.readOnly = true;
|
||||
this.disabled = true;
|
||||
this.repeatable = config.repeatable;
|
||||
this.valueUpdates.next(config.value);
|
||||
}
|
||||
}
|
@@ -11,7 +11,7 @@ import { AuthorityOptions } from '../../../../../core/integration/models/authori
|
||||
import { hasValue } from '../../../../empty.util';
|
||||
import { FormFieldMetadataValueObject } from '../../models/form-field-metadata-value.model';
|
||||
import { Workspaceitem } from '../../../../../core/submission/models/workspaceitem.model';
|
||||
import { RelationshipOptions } from './empty/model/relationship-options.model';
|
||||
import { RelationshipOptions } from '../../models/relationship-options.model';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
|
||||
export interface DsDynamicInputModelConfig extends DynamicInputModelConfig {
|
||||
@@ -21,6 +21,7 @@ export interface DsDynamicInputModelConfig extends DynamicInputModelConfig {
|
||||
language?: string;
|
||||
value?: any;
|
||||
relationship?: RelationshipOptions;
|
||||
repeatable: boolean;
|
||||
}
|
||||
|
||||
export class DsDynamicInputModel extends DynamicInputModel {
|
||||
@@ -31,10 +32,11 @@ export class DsDynamicInputModel extends DynamicInputModel {
|
||||
@serializable() languageUpdates: Subject<string>;
|
||||
@serializable() workspaceItem: Workspaceitem;
|
||||
@serializable() relationship?: RelationshipOptions;
|
||||
@serializable() repeatable?: boolean;
|
||||
|
||||
constructor(config: DsDynamicInputModelConfig, layout?: DynamicFormControlLayout) {
|
||||
super(config, layout);
|
||||
|
||||
this.repeatable = config.repeatable;
|
||||
this.readOnly = config.readOnly;
|
||||
this.value = config.value;
|
||||
this.relationship = config.relationship;
|
||||
|
@@ -1,40 +0,0 @@
|
||||
<!--<div>-->
|
||||
<!-- <div *ngIf="model.repeatable || !((model.value | async) && (model.value | async).length > 0)" class="form-row align-items-center">-->
|
||||
<!-- <div class="col">-->
|
||||
<!-- <input class="form-control"-->
|
||||
<!-- [class.is-invalid]="showErrorMessages"-->
|
||||
<!-- [value]="modalValuesString"-->
|
||||
<!-- [disabled]="model.disabled"-->
|
||||
<!-- [type]="model.inputType"-->
|
||||
<!-- [placeholder]="model.placeholder | translate"-->
|
||||
<!-- [readonly]="model.readOnly">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="col-auto text-center">-->
|
||||
<!-- <button class="btn btn-secondary"-->
|
||||
<!-- type="submit"-->
|
||||
<!-- ngbTooltip="{{'form.lookup-help' | translate}}"-->
|
||||
<!-- placement="top"-->
|
||||
<!-- (click)="openLookup(); $event.stopPropagation();">{{'form.lookup' | translate}}-->
|
||||
<!-- </button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="mt-3">-->
|
||||
<!-- <ul class="list-unstyled">-->
|
||||
<!-- <li *ngFor="let result of (model.value | async)">-->
|
||||
<!-- <ng-container *ngVar="result.indexableObject as value">-->
|
||||
<!-- <button type="button" class="close float-left" aria-label="Close button"-->
|
||||
<!-- (click)="removeSelection(result)">-->
|
||||
<!-- <span aria-hidden="true">×</span>-->
|
||||
<!-- </button>-->
|
||||
<!-- <span class="d-inline-block align-middle ml-1">{{value.name}}</span>-->
|
||||
<!-- <input [dynamicId]="bindId && model.id"-->
|
||||
<!-- [name]="model.name"-->
|
||||
<!-- type="hidden"-->
|
||||
<!-- [ngModel]="value.uuid"-->
|
||||
<!-- [disabled]="true"-->
|
||||
<!-- [readonly]="true">-->
|
||||
<!-- </ng-container>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </div>-->
|
||||
<!--</div>-->
|
@@ -2,7 +2,7 @@ import { autoserialize } from 'cerialize';
|
||||
import { FormRowModel } from '../../../../core/config/models/config-submission-forms.model';
|
||||
import { LanguageCode } from './form-field-language-value.model';
|
||||
import { FormFieldMetadataValueObject } from './form-field-metadata-value.model';
|
||||
import { RelationshipOptions } from '../ds-dynamic-form-ui/models/empty/model/relationship-options.model';
|
||||
import { RelationshipOptions } from './relationship-options.model';
|
||||
|
||||
export class FormFieldModel {
|
||||
|
||||
@@ -34,7 +34,7 @@ export class FormFieldModel {
|
||||
selectableMetadata: FormFieldMetadataValueObject[];
|
||||
|
||||
@autoserialize
|
||||
selectableRelationships: RelationshipOptions[];
|
||||
selectableRelationship: RelationshipOptions;
|
||||
|
||||
@autoserialize
|
||||
rows: FormRowModel[];
|
||||
|
11
src/app/shared/form/builder/parsers/disabled-field-parser.ts
Normal file
11
src/app/shared/form/builder/parsers/disabled-field-parser.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { FieldParser } from './field-parser';
|
||||
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
|
||||
import { DsDynamicDisabledModelConfig, DynamicDisabledModel } from '../ds-dynamic-form-ui/models/disabled/dynamic-disabled.model';
|
||||
|
||||
export class DisabledFieldParser extends FieldParser {
|
||||
|
||||
public modelFactory(fieldValue?: FormFieldMetadataValueObject | any, label?: boolean): any {
|
||||
const emptyModelConfig: DsDynamicDisabledModelConfig = this.initModel(null, label);
|
||||
return new DynamicDisabledModel(emptyModelConfig)
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
import { FieldParser } from './field-parser';
|
||||
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
|
||||
import { DsDynamicEmptyModelConfig, DynamicEmptyModel } from '../ds-dynamic-form-ui/models/empty/dynamic-empty.model';
|
||||
|
||||
export class EmptyFieldParser extends FieldParser {
|
||||
|
||||
public modelFactory(fieldValue?: FormFieldMetadataValueObject | any, label?: boolean): any {
|
||||
const emptyModelConfig: DsDynamicEmptyModelConfig = this.initModel(null, label);
|
||||
return new DynamicEmptyModel(emptyModelConfig)
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
import { hasValue, isNotEmpty, isNotNull, isNotUndefined } from '../../../empty.util';
|
||||
import { hasValue, isEmpty, isNotEmpty, isNotNull, isNotUndefined } from '../../../empty.util';
|
||||
import { FormFieldModel } from '../models/form-field.model';
|
||||
|
||||
import { uniqueId } from 'lodash';
|
||||
@@ -27,6 +27,7 @@ export abstract class FieldParser {
|
||||
&& (this.configData.input.type !== 'list')
|
||||
&& (this.configData.input.type !== 'tag')
|
||||
&& (this.configData.input.type !== 'group')
|
||||
&& isEmpty(this.configData.selectableRelationship)
|
||||
) {
|
||||
let arrayCounter = 0;
|
||||
let fieldArrayCounter = 0;
|
||||
@@ -71,7 +72,7 @@ export abstract class FieldParser {
|
||||
|
||||
} else {
|
||||
const model = this.modelFactory(this.getInitFieldValue());
|
||||
if (model.hasLanguages) {
|
||||
if (model.hasLanguages || isNotEmpty(model.relationship)) {
|
||||
setLayout(model, 'grid', 'control', 'col');
|
||||
}
|
||||
return model;
|
||||
@@ -185,7 +186,8 @@ export abstract class FieldParser {
|
||||
controlModel.readOnly = this.parserOptions.readOnly;
|
||||
controlModel.disabled = this.parserOptions.readOnly;
|
||||
controlModel.workspaceItem = this.workspaceItem;
|
||||
controlModel.relationship = this.configData.selectableRelationships;
|
||||
controlModel.relationship = this.configData.selectableRelationship;
|
||||
controlModel.repeatable = this.configData.repeatable;
|
||||
|
||||
// Set label
|
||||
this.setLabel(controlModel, label, labelEmpty);
|
||||
|
@@ -12,7 +12,7 @@ import { NameFieldParser } from './name-field-parser';
|
||||
import { SeriesFieldParser } from './series-field-parser';
|
||||
import { TagFieldParser } from './tag-field-parser';
|
||||
import { TextareaFieldParser } from './textarea-field-parser';
|
||||
import { EmptyFieldParser } from './empty-field-parser';
|
||||
import { DisabledFieldParser } from './disabled-field-parser';
|
||||
|
||||
export class ParserFactory {
|
||||
public static getConstructor(type: ParserType): GenericConstructor<FieldParser> {
|
||||
@@ -51,7 +51,7 @@ export class ParserFactory {
|
||||
return TextareaFieldParser
|
||||
}
|
||||
case undefined: {
|
||||
return EmptyFieldParser
|
||||
return DisabledFieldParser
|
||||
}
|
||||
default: {
|
||||
return undefined;
|
||||
|
@@ -1,9 +1,6 @@
|
||||
import { DsDynamicInputModel } from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model';
|
||||
import { DynamicQualdropModel } from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-qualdrop.model';
|
||||
import {
|
||||
DynamicRowArrayModel,
|
||||
DynamicRowArrayModelConfig
|
||||
} from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
|
||||
import { DynamicRowArrayModel, DynamicRowArrayModelConfig } from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
|
||||
import { DynamicSelectModel } from '@ng-dynamic-forms/core';
|
||||
import { FormRowModel } from '../../core/config/models/config-submission-forms.model';
|
||||
import { SubmissionScopeType } from '../../core/submission/submission-scope-type';
|
||||
@@ -14,7 +11,6 @@ import { AuthorityValue } from '../../core/integration/models/authority.value';
|
||||
import { FormFieldMetadataValueObject } from '../form/builder/models/form-field-metadata-value.model';
|
||||
import { DynamicRowGroupModel } from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-group-model';
|
||||
import { Workspaceitem } from '../../core/submission/models/workspaceitem.model';
|
||||
import { Item } from '../../core/shared/item.model';
|
||||
|
||||
export const qualdropSelectConfig = {
|
||||
name: 'dc.identifier_QUALDROP_METADATA',
|
||||
@@ -57,6 +53,7 @@ export const qualdropInputConfig = {
|
||||
id: 'dc_identifier_QUALDROP_VALUE',
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: 'test',
|
||||
workspaceItem: new Workspaceitem()
|
||||
};
|
||||
@@ -123,6 +120,7 @@ const relationGroupConfig = {
|
||||
mandatoryField: 'false',
|
||||
relationFields: ['journal', 'issue'],
|
||||
scopeUUID: 'scope',
|
||||
repeatable: false,
|
||||
submissionScope: SubmissionScopeType.WorkspaceItem,
|
||||
value: {
|
||||
journal: [
|
||||
@@ -156,6 +154,7 @@ export const inputWithLanguageAndAuthorityConfig = {
|
||||
id: 'testWithAuthority',
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: {
|
||||
value: 'testWithLanguageAndAuthority',
|
||||
display: 'testWithLanguageAndAuthority',
|
||||
@@ -182,6 +181,7 @@ export const inputWithLanguageConfig = {
|
||||
id: 'testWithLanguage',
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: 'testWithLanguage',
|
||||
workspaceItem: new Workspaceitem()
|
||||
};
|
||||
@@ -205,6 +205,7 @@ export const inputWithLanguageAndAuthorityArrayConfig = {
|
||||
id: 'testWithLanguageAndAuthorityArray',
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: [{
|
||||
value: 'testLanguageAndAuthorityArray',
|
||||
display: 'testLanguageAndAuthorityArray',
|
||||
@@ -220,6 +221,7 @@ export const inputWithFormFieldValueConfig = {
|
||||
id: 'testWithFormField',
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: new FormFieldMetadataValueObject('testWithFormFieldValue'),
|
||||
workspaceItem: new Workspaceitem()
|
||||
};
|
||||
@@ -231,6 +233,7 @@ export const inputWithAuthorityValueConfig = {
|
||||
id: 'testWithAuthorityField',
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: Object.assign({}, new AuthorityValue(), { value: 'testWithAuthorityValue', id: 'testWithAuthorityValue', display: 'testWithAuthorityValue' }),
|
||||
workspaceItem: new Workspaceitem()
|
||||
};
|
||||
@@ -242,6 +245,7 @@ export const inputWithObjectValueConfig = {
|
||||
id: 'testWithObjectValue',
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
value: { value: 'testWithObjectValue', id: 'testWithObjectValue', display: 'testWithObjectValue' },
|
||||
workspaceItem: new Workspaceitem()
|
||||
};
|
||||
@@ -258,6 +262,7 @@ export const fileFormEditInputConfig = {
|
||||
id: 'dc_title',
|
||||
readOnly: false,
|
||||
disabled: false,
|
||||
repeatable: false,
|
||||
workspaceItem: new Workspaceitem()
|
||||
};
|
||||
|
||||
|
@@ -138,7 +138,7 @@ import { RoleDirective } from './roles/role.directive';
|
||||
import { UserMenuComponent } from './auth-nav-menu/user-menu/user-menu.component';
|
||||
import { ClaimedTaskActionsReturnToPoolComponent } from './mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component';
|
||||
import { ItemDetailPreviewFieldComponent } from './object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component';
|
||||
import { DsDynamicLookupRelationModalComponent } from './form/builder/ds-dynamic-form-ui/models/empty/dynamic-lookup-relation-modal.component';
|
||||
import { DsDynamicLookupRelationModalComponent } from './form/builder/ds-dynamic-form-ui/lookup-modal/dynamic-lookup-relation-modal.component';
|
||||
import { SearchResultsComponent } from './search/search-results/search-results.component';
|
||||
import { SearchSidebarComponent } from './search/search-sidebar/search-sidebar.component';
|
||||
import { SearchSettingsComponent } from './search/search-settings/search-settings.component';
|
||||
@@ -159,7 +159,7 @@ import { SearchFacetSelectedOptionComponent } from './search/search-filters/sear
|
||||
import { SearchFacetRangeOptionComponent } from './search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component';
|
||||
import { SearchSwitchConfigurationComponent } from './search/search-switch-configuration/search-switch-configuration.component';
|
||||
import { SearchAuthorityFilterComponent } from './search/search-filters/search-filter/search-authority-filter/search-authority-filter.component';
|
||||
import { DsDynamicEmptyComponent } from './form/builder/ds-dynamic-form-ui/models/empty/dynamic-empty.component';
|
||||
import { DsDynamicDisabledComponent } from './form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component';
|
||||
|
||||
const MODULES = [
|
||||
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
||||
@@ -220,7 +220,7 @@ const COMPONENTS = [
|
||||
DsDynamicFormControlContainerComponent,
|
||||
DsDynamicListComponent,
|
||||
DsDynamicLookupComponent,
|
||||
DsDynamicEmptyComponent,
|
||||
DsDynamicDisabledComponent,
|
||||
DsDynamicLookupRelationModalComponent,
|
||||
DsDynamicScrollableDropdownComponent,
|
||||
DsDynamicTagComponent,
|
||||
@@ -325,7 +325,7 @@ const ENTRY_COMPONENTS = [
|
||||
SearchResultGridElementComponent,
|
||||
DsDynamicListComponent,
|
||||
DsDynamicLookupComponent,
|
||||
DsDynamicEmptyComponent,
|
||||
DsDynamicDisabledComponent,
|
||||
DsDynamicLookupRelationModalComponent,
|
||||
DsDynamicScrollableDropdownComponent,
|
||||
DsDynamicTagComponent,
|
||||
|
Reference in New Issue
Block a user