From 9c7be10967b3677c8845d3654d8c8a8c89b2c8fd Mon Sep 17 00:00:00 2001 From: Florent POITTEVIN <poittevin.florent@gmail.com> Date: Fri, 21 May 2021 15:35:03 +0200 Subject: [PATCH 1/2] feat(deposit): [AOU-509] update deposit fields presentation --- .../deposit-abstract-form.presentational.ts | 11 +- ...ion-academic-structure.presentational.html | 2 +- ...ription-classification.presentational.html | 18 +- ...description-collection.presentational.html | 18 +- ...-description-container.presentational.html | 75 +- ...rm-description-dataset.presentational.html | 10 +- ...-form-description-date.presentational.html | 2 +- ...rm-description-funding.presentational.html | 34 +- ...m-description-language.presentational.html | 10 +- ...-form-description-link.presentational.html | 28 +- ...-form-description-page.presentational.html | 26 +- ...publication-identifier.presentational.html | 278 ++---- ...publication-identifier.presentational.scss | 28 + ...n-publication-identifier.presentational.ts | 48 + ...-description-publisher.presentational.html | 18 +- ...ption-text-language-list.presentational.ts | 9 + ...cription-text-language.presentational.html | 12 +- ...escription-text-language.presentational.ts | 8 + ...t-form-first-step-type.presentational.html | 20 +- ...sit-form-first-step-type.presentational.ts | 8 - ...ourth-step-description.presentational.html | 467 +++++---- ...ourth-step-description.presentational.scss | 32 +- ...-fourth-step-description.presentational.ts | 15 +- ...hird-step-contributors.presentational.html | 27 +- ...osit-form-type-subtype.presentational.html | 18 +- .../deposit-form.presentational.ts | 10 + .../helpers/deposit-form-rule.helper.ts | 911 ++++++++---------- src/app/shared/enums/label-translate.enum.ts | 4 +- src/assets/i18n/de.json | 4 +- src/assets/i18n/en.json | 4 +- src/assets/i18n/fr.json | 4 +- 31 files changed, 1081 insertions(+), 1078 deletions(-) diff --git a/src/app/features/deposit/components/presentationals/deposit-abstract-form/deposit-abstract-form.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-abstract-form/deposit-abstract-form.presentational.ts index 7a7dcaae3..4693c4005 100644 --- a/src/app/features/deposit/components/presentationals/deposit-abstract-form/deposit-abstract-form.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-abstract-form/deposit-abstract-form.presentational.ts @@ -27,11 +27,9 @@ import { import { BaseFormDefinition, FormValidationHelper, - isNonEmptyString, isNotNullNorUndefined, isNullOrUndefined, ObservableUtil, - SOLIDIFY_CONSTANTS, } from "solidify-frontend"; @Directive() @@ -41,9 +39,6 @@ export abstract class DepositAbstractFormPresentational extends SharedAbstractPr @Input() formGroup: FormGroup; - @Input() - path: string; - @Input() mainFormGroup: FormGroup; @@ -97,12 +92,12 @@ export abstract class DepositAbstractFormPresentational extends SharedAbstractPr } } - getPath(fieldName: string): string { - return this.path + (isNonEmptyString(fieldName) ? (SOLIDIFY_CONSTANTS.DOT + fieldName) : SOLIDIFY_CONSTANTS.STRING_EMPTY); + getFormControlInCurrentFormGroup(key: string): AbstractControl { + return this.formGroup.get(key); } getFormControl(key: string): AbstractControl { - return this.formGroup.get(key); + return this.mainFormGroup.get(key); } isRequired(formControl: AbstractControl, key: string): boolean { diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-academic-structure/deposit-form-description-academic-structure.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-academic-structure/deposit-form-description-academic-structure.presentational.html index c1698e6ed..0ced0c2e8 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-academic-structure/deposit-form-description-academic-structure.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-academic-structure/deposit-form-description-academic-structure.presentational.html @@ -2,7 +2,7 @@ [isOpen]="true" class="panel" > - <mat-label class="label">{{depositFormRuleHelper.getLabel(mainFormGroup, path) | translate}}</mat-label> + <mat-label class="label">{{depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathStructure) | translate}}</mat-label> <ul *ngIf="structureSelected?.length > 0" class="list" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-classification/deposit-form-description-classification.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-classification/deposit-form-description-classification.presentational.html index 0b2bd19fa..5296a1e0c 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-classification/deposit-form-description-classification.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-classification/deposit-form-description-classification.presentational.html @@ -1,4 +1,4 @@ -<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" +<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathClassifications)" [fieldsTemplate]="fieldsTemplate" [formGroupFactory]="formGroupFactory" [formArray]="formArray" @@ -10,14 +10,14 @@ let-formGroup="formGroup" > <div class="container"> - <ng-container *ngIf="formDefinition.code as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathClassificationsCode as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.code) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -28,14 +28,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.item as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathClassificationsItem as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.item) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-collection/deposit-form-description-collection.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-collection/deposit-form-description-collection.presentational.html index 12e6c67b2..eed04cb59 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-collection/deposit-form-description-collection.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-collection/deposit-form-description-collection.presentational.html @@ -1,4 +1,4 @@ -<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" +<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathCollection)" [fieldsTemplate]="fieldsTemplate" [formGroupFactory]="formGroupFactory" [formArray]="formArray" @@ -10,14 +10,14 @@ let-formGroup="formGroup" > <div class="container"> - <ng-container *ngIf="formDefinition.name as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathCollectionName as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.name) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -28,14 +28,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.number as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathCollectionNumber as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.number) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.html index 8420e5ce1..64765903f 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.html @@ -1,33 +1,16 @@ <solidify-panel-expandable [isOpen]="true" - [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" + [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathContainer)" class="panel" > - <ng-container *ngIf="formDefinition.title as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-text-language *ngIf="getFormControl(fieldName) as fd" - [formGroup]="fd" - [listLanguages]="listLanguages" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - [resourceNameSpace]="sharedExternalDataJournalTitleActionNameSpace" - [state]="sharedExternalDataJournalTitleState" - [filterOptionsValueKey]="'mainTitle'" - [queryParametersSearchKey]="'title'" - [filteredOptionsCallbackLabel]="filteredOptionsCallback" - (autocompleteOptionSelected)="journalTitleDataSelected($event)" - ></aou-deposit-form-description-text-language> - </ng-template> - </ng-container> - <div class="four-column"> - <ng-container *ngIf="formDefinition.editor as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathContainerConferenceEditor as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -38,14 +21,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.conferenceTitle as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathContainerConferenceTitle as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -56,14 +39,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.conferencePlace as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathContainerConferencePlace as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -74,14 +57,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.volume as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathContainerVolume as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -93,14 +76,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.issue as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathContainerIssue as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -112,15 +95,15 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.conferenceDate as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> + <ng-container *ngIf="depositFormRuleHelper.pathContainerConferenceDate as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> <mat-form-field (click)="publicationDateDatepicker.open()" - *ngIf="getFormControl(fieldName) as fd" + *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [matDatepicker]="publicationDateDatepicker" [required]="formValidationHelper.hasRequiredField(fd)" @@ -138,14 +121,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.specialIssue as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathContainerSpecialIssue as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-dataset/deposit-form-description-dataset.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-dataset/deposit-form-description-dataset.presentational.html index 4a6382894..354355786 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-dataset/deposit-form-description-dataset.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-dataset/deposit-form-description-dataset.presentational.html @@ -1,4 +1,4 @@ -<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" +<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathDatasets)" [fieldsTemplate]="fieldsTemplate" [formGroupFactory]="formGroupFactory" [formArray]="formArray" @@ -10,13 +10,13 @@ <ng-template #fieldsTemplate let-formGroup="formGroup" > - <ng-container *ngIf="formDefinition.url as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <solidify-url-input-navigator *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathDatasetsUrl as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <solidify-url-input-navigator *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.url) as fd" [formControl]="fd" [positionLabel]="positionLabelInputMaterial" [appearance]="appearanceInputMaterial" - [placeholderToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName))" + [placeholderToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" > </solidify-url-input-navigator> </ng-template> diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-date/deposit-form-description-date.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-date/deposit-form-description-date.presentational.html index 1d47135ee..40bd6a8da 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-date/deposit-form-description-date.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-date/deposit-form-description-date.presentational.html @@ -1,4 +1,4 @@ -<solidify-panel-expandable [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" +<solidify-panel-expandable [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathDates)" [isOpen]="true" class="panel" > diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-funding/deposit-form-description-funding.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-funding/deposit-form-description-funding.presentational.html index 6eb2c44d0..696ee02ec 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-funding/deposit-form-description-funding.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-funding/deposit-form-description-funding.presentational.html @@ -1,4 +1,4 @@ -<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" +<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathFunder)" [fieldsTemplate]="fieldsTemplate" [formGroupFactory]="formGroupFactory" [formArray]="formArray" @@ -10,14 +10,14 @@ let-formGroup="formGroup" > <div class="container"> - <ng-container *ngIf="formDefinition.funder as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathFunderFunder as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.funder) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -28,14 +28,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.name as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathFunderProjectName as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.name) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -46,14 +46,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.code as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathFunderProjectCode as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.code) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -65,14 +65,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.acronym as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathFunderProjectAcronym as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.acronym) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-language/deposit-form-description-language.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-language/deposit-form-description-language.presentational.html index 25be5ffae..856561c6b 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-language/deposit-form-description-language.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-language/deposit-form-description-language.presentational.html @@ -1,4 +1,4 @@ -<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" +<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathLanguages)" [fieldsTemplate]="fieldsTemplate" [formGroupFactory]="formGroupFactory" [formArray]="formArray" @@ -10,14 +10,14 @@ <ng-template #fieldsTemplate let-formGroup="formGroup" > - <ng-container *ngIf="formDefinition.language as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathLanguagesLanguage as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.language) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <mat-select [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-link/deposit-form-description-link.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-link/deposit-form-description-link.presentational.html index 1f6940126..6f0119891 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-link/deposit-form-description-link.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-link/deposit-form-description-link.presentational.html @@ -1,4 +1,4 @@ -<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" +<aou-deposit-repeatable-fields [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathLinks)" [fieldsTemplate]="fieldsTemplate" [formGroupFactory]="formGroupFactory" [formArray]="formArray" @@ -10,40 +10,40 @@ let-formGroup="formGroup" > <div class="container"> - <ng-container *ngIf="formDefinition.target as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <solidify-url-input-navigator *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathLinksTarget as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <solidify-url-input-navigator *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.target) as fd" [formControl]="fd" [positionLabel]="positionLabelInputMaterial" [appearance]="appearanceInputMaterial" - [placeholderToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName))" + [placeholderToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" > </solidify-url-input-navigator> </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.description as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-text-language *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathLinksDescription as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-text-language *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.description) as fd" [formGroup]="fd" - [labelToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName))" + [labelToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" [listLanguages]="listLanguages" [hideLanguage]="true" - [path]="getPath(fieldName)" [mainFormGroup]="mainFormGroup" + [path]="fieldPath" ></aou-deposit-form-description-text-language> </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.type as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathLinksType as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="formValidationHelper.getFormControl(formGroup, formDefinition.type) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" aria-label="type link" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <mat-select [formControl]="fd" [solidifyValidation]="errors" > diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-page/deposit-form-description-page.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-page/deposit-form-description-page.presentational.html index 0d8176d76..4899438dd 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-page/deposit-form-description-page.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-page/deposit-form-description-page.presentational.html @@ -1,15 +1,15 @@ <solidify-panel-expandable [isOpen]="true" - [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" + [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathPages)" class="panel" > - <ng-container *ngIf="formDefinition.start as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathPagesStartPage as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -20,14 +20,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.end as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathPagesEndPage as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -38,14 +38,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.other as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathPagesNumberPagesArticleNumber as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.html index 25bea60f0..a0e7880f3 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.html @@ -1,215 +1,91 @@ <solidify-panel-expandable [isOpen]="true" - [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" + [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathIdentifier)" class="panel" > - <div class="container"> - <ng-container *ngIf="formDefinition.doi as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis + <div *ngIf="formControlIdentifier as fd" + class="identifier-selector" + > + <mat-form-field [appearance]="appearanceInputMaterial" + [floatLabel]="positionLabelInputMaterial" + solidifyTooltipOnEllipsis + > + <mat-label>{{labelTranslateEnum.identifier | translate}}</mat-label> + <mat-select [formControl]="fd" + [required]="formValidationHelper.hasRequiredField(fd)" + [disabled]="listIdentifiersAvailable.length === 0" + [solidifyValidation]="errors" + > + <mat-option *ngFor="let identifier of listIdentifiersAvailable" + [value]="identifier" > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> + {{depositFormRuleHelper.getLabel(mainFormGroup, identifier) | translate}} + </mat-option> + </mat-select> + <mat-error #errors></mat-error> + </mat-form-field> - <ng-container *ngIf="formDefinition.pmid as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> + <div *ngIf="true" + class="button-wrapper" + > + <button mat-button + class="button-add" + color="primary" + solidifyShortCuts + (click)="addIdentifier()" + (onEnter)="addIdentifier()" + [disabled]="!(fd.value | isNonEmptyString)" + >{{labelTranslateEnum.add | translate}} + </button> + </div> + </div> - <ng-container *ngIf="formDefinition.pmcid as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> - <ng-container *ngIf="formDefinition.isbn as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> + <div class="container"> - <ng-container *ngIf="formDefinition.issn as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - [matAutocomplete]="auto" - matInput - > - <mat-autocomplete autoActiveFirstOption - #auto="matAutocomplete" - (optionsScroll)="loadNextChunk()" - (optionSelected)="autocompleteOptionSelected($event)" + <ng-container *ngFor="let fieldPath of listIdentifiersSelected; let i = index"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <div class="identifier-wrapper"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" + [appearance]="appearanceInputMaterial" + [floatLabel]="positionLabelInputMaterial" + solidifyTooltipOnEllipsis > - <mat-option *ngFor="let option of (filteredOptionsObs | async)" - [value]="option" + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> + <input [formControl]="fd" + [required]="formValidationHelper.hasRequiredField(fd)" + [solidifyValidation]="errors" + [matAutocomplete]="auto" + matInput > - {{filteredOptionsCallback(option)}} - </mat-option> - </mat-autocomplete> - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> - - <ng-container *ngIf="formDefinition.arxiv as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> - - <ng-container *ngIf="formDefinition.mmsid as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> - - <ng-container *ngIf="formDefinition.dblp as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> - - <ng-container *ngIf="formDefinition.urn as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> - - <ng-container *ngIf="formDefinition.localNumber as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> - </ng-template> - </ng-container> + <mat-autocomplete autoActiveFirstOption + #auto="matAutocomplete" + (optionsScroll)="loadNextChunk()" + (optionSelected)="autocompleteOptionSelected($event)" + > + <mat-option *ngFor="let option of (filteredOptionsObs | async)" + [value]="option" + > + {{filteredOptionsCallback(option)}} + </mat-option> + </mat-autocomplete> + <mat-error #errors></mat-error> + </mat-form-field> - <ng-container *ngIf="formDefinition.repec as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" - [appearance]="appearanceInputMaterial" - [floatLabel]="positionLabelInputMaterial" - solidifyTooltipOnEllipsis - > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> - <input [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - [solidifyValidation]="errors" - matInput - > - <mat-error #errors></mat-error> - </mat-form-field> + <div class="button-delete-wrapper"> + <button class="button-delete" + type="button" + (click)="remove(i)" + mat-icon-button + mat-button + aria-label="delete" + [matTooltip]="labelTranslateEnum.delete | translate" + > + <solidify-icon [iconName]="iconNameEnum.delete" + class="size-18 icon" + ></solidify-icon> + </button> + </div> + </div> </ng-template> </ng-container> </div> diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.scss b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.scss index 1810bdd9d..fb9cbbcf8 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.scss +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.scss @@ -1,6 +1,34 @@ @import "../../../../../../sass/abstracts/abstracts"; :host { + .identifier-selector { + display: grid; + grid-template-columns: 1fr min-content; + align-items: center; + + .button-wrapper { + margin-left: 10px; + + .button-add { + margin-bottom: 20px; + } + } + } + + .identifier-wrapper { + display: grid; + grid-template-columns: 1fr min-content; + align-items: center; + + .button-delete-wrapper { + margin-left: 10px; + + .button-delete { + margin-bottom: 20px; + } + } + } + .panel { &::ng-deep { > .header { diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.ts index d61b5911d..beea9be9b 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.ts @@ -7,6 +7,7 @@ import { import { AbstractControl, FormBuilder, + FormControl, FormGroup, NG_VALUE_ACCESSOR, } from "@angular/forms"; @@ -60,6 +61,28 @@ import { export class DepositFormDescriptionPublicationIdentifierPresentational extends DepositAbstractFormPresentational implements OnInit { formDefinition: FormComponentFormDefinitionDepositFormPublicationIdentifiers = new FormComponentFormDefinitionDepositFormPublicationIdentifiers(); + formControlIdentifier: FormControl = new FormControl(); + + listIdentifiers: string[] = [ + // DepositFormRuleHelper.pathIdentifierDoi, + DepositFormRuleHelper.pathIdentifierPmid, + DepositFormRuleHelper.pathIdentifierPmcid, + // DepositFormRuleHelper.pathIdentifierIsbn, + // DepositFormRuleHelper.pathIdentifierIssn, + DepositFormRuleHelper.pathIdentifierArXiv, + DepositFormRuleHelper.pathIdentifierDblp, + DepositFormRuleHelper.pathIdentifierRepEc, + // DepositFormRuleHelper.pathIdentifierLocalNumber, + DepositFormRuleHelper.pathIdentifierMmsid, + DepositFormRuleHelper.pathIdentifierUrn, + ]; + + get listIdentifiersAvailable(): string[] { + return this.listIdentifiers.filter(i => this.listIdentifiersSelected.indexOf(i) === -1); + } + + listIdentifiersSelected: string[] = []; + filteredOptionsObs: Observable<JournalTitleDTO[]> = MemoizedUtil.list(this._store, SharedExternalDataJournalTitleState); isRequired(formControl: AbstractControl, key: string): boolean { @@ -87,6 +110,16 @@ export class DepositFormDescriptionPublicationIdentifierPresentational extends D ngOnInit(): void { super.ngOnInit(); + const listIdentifiersAuthorizedWithThisSubtype = this.listIdentifiers.filter(fieldPath => DepositFormRuleHelper.shouldDisplayField(this.mainFormGroup, fieldPath)); + this.listIdentifiers = listIdentifiersAuthorizedWithThisSubtype; + + this.listIdentifiers.forEach(fieldPath => { + const formControl = this.mainFormGroup.get(fieldPath); + if (isNonEmptyString(formControl?.value)) { + this.listIdentifiersSelected.push(fieldPath); + } + }); + this.subscribe(this.formGroup.get(this.formDefinition.issn).valueChanges.pipe( distinctUntilChanged(), filter(value => isNonEmptyString(value)), @@ -151,4 +184,19 @@ export class DepositFormDescriptionPublicationIdentifierPresentational extends D fcTitle.setValue(journalTitle.mainTitle); } } + + addIdentifier(): void { + this.listIdentifiersSelected.push(this.formControlIdentifier.value); + this.formControlIdentifier.setValue(undefined); + } + + remove(i: number): void { + const fieldPath = this.listIdentifiersSelected.splice(i, 1); + if (fieldPath.length > 0) { + const formControl = this.mainFormGroup.get(fieldPath[0]); + if (isNotNullNorUndefined(formControl)) { + formControl.setValue(undefined); + } + } + } } diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-publisher/deposit-form-description-publisher.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-publisher/deposit-form-description-publisher.presentational.html index 6b89e68dc..e4a38297a 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-publisher/deposit-form-description-publisher.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-publisher/deposit-form-description-publisher.presentational.html @@ -1,15 +1,15 @@ <solidify-panel-expandable [isOpen]="true" - [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, path)" + [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, depositFormRuleHelper.pathPublisher)" class="panel" > - <ng-container *ngIf="formDefinition.place as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathPublisherPlacePublication as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -20,14 +20,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.name as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathPublisherPublishingHouse as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language-list/deposit-form-description-text-language-list.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language-list/deposit-form-description-text-language-list.presentational.ts index f4af36372..8d22934d9 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language-list/deposit-form-description-text-language-list.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language-list/deposit-form-description-text-language-list.presentational.ts @@ -35,10 +35,12 @@ import { import { BaseFormDefinition, FormValidationHelper, + isNonEmptyString, isNotNullNorUndefined, isNullOrUndefined, NotificationService, ObservableUtil, + SOLIDIFY_CONSTANTS, SolidifyValidator, } from "solidify-frontend"; @@ -60,6 +62,9 @@ export class DepositFormDescriptionTextLanguageListPresentational extends Deposi listFormDefinitions: BaseFormDefinition[] = [this.formDefinition]; + @Input() + path: string; + @Input() listLanguages: Language[]; @@ -69,6 +74,10 @@ export class DepositFormDescriptionTextLanguageListPresentational extends Deposi @Input() isTextarea: boolean = false; + getPath(fieldName: string): string { + return this.path + (isNonEmptyString(fieldName) ? (SOLIDIFY_CONSTANTS.DOT + fieldName) : SOLIDIFY_CONSTANTS.STRING_EMPTY); + } + constructor(protected readonly _translate: TranslateService, protected readonly _store: Store, protected readonly _fb: FormBuilder, diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.html index 33204f181..34f567f44 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.html @@ -1,6 +1,6 @@ -<ng-container *ngIf="formDefinition.text as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" +<ng-container *ngIf="getPath(formDefinition.text) as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControlInCurrentFormGroup(formDefinition.text) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis @@ -41,9 +41,9 @@ </ng-container> <ng-template [ngIf]="!hideLanguage"> - <ng-container *ngIf="formDefinition.lang as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="getPath(formDefinition.lang) as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControlInCurrentFormGroup(formDefinition.lang) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.ts index 3a4798075..b430ec640 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.ts @@ -44,6 +44,7 @@ import { QueryParametersUtil, ResourceNameSpace, ResourceState, + SOLIDIFY_CONSTANTS, Type, } from "solidify-frontend"; @@ -63,6 +64,9 @@ import { export class DepositFormDescriptionTextLanguagePresentational<T> extends DepositAbstractFormPresentational implements ControlValueAccessor, OnInit { formDefinition: FormComponentFormDefinitionDepositFormTextLanguage = new FormComponentFormDefinitionDepositFormTextLanguage(); + @Input() + path: string; + @Input() resourceNameSpace: ResourceNameSpace; @@ -102,6 +106,10 @@ export class DepositFormDescriptionTextLanguagePresentational<T> extends Deposit @Output("autocompleteOptionSelected") readonly autocompleteOptionObs: Observable<T | undefined> = ObservableUtil.asObservable(this._autocompleteOptionBS); + getPath(fieldName: string): string { + return this.path + (isNonEmptyString(fieldName) ? (SOLIDIFY_CONSTANTS.DOT + fieldName) : SOLIDIFY_CONSTANTS.STRING_EMPTY); + } + constructor(private translate: TranslateService, private _store: Store, private readonly _fb: FormBuilder, diff --git a/src/app/features/deposit/components/presentationals/deposit-form-first-step-type/deposit-form-first-step-type.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-first-step-type/deposit-form-first-step-type.presentational.html index 162b9339c..284e23f29 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-first-step-type/deposit-form-first-step-type.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-first-step-type/deposit-form-first-step-type.presentational.html @@ -88,28 +88,26 @@ importMethodEnum.manual" class="right-part" > - <ng-container *ngIf="formDefinition.title as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-text-language *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathTitle as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-text-language *ngIf="getFormControl(fieldPath) as fd" [formGroup]="fd" - [labelToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName))" + [labelToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" [listLanguages]="listLanguages" [isMandatoryLanguage]="true" [mainFormGroup]="mainFormGroup" - [path]="getPath(fieldName)" - [hideLanguage]="!(depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName) + '.' + + [path]="fieldPath" + [hideLanguage]="!(depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath + '.' + formDefinitionTextLanguage.lang))" ></aou-deposit-form-description-text-language> </ng-template> </ng-container> - <ng-container *ngIf="formDefinitionFourthStep.languages as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPathFourthStepDescription(fieldName))"> - <aou-deposit-form-description-language *ngIf="getFormControlOnFourthStep(fieldName) as fd" - #depositDescriptionLanguagePresentational + <ng-container *ngIf="depositFormRuleHelper.pathLanguages as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-language *ngIf="getFormControl(fieldPath) as fd" [formArray]="fd" [listLanguages]="listLanguages" - [path]="getPathFourthStepDescription(fieldName)" [mainFormGroup]="mainFormGroup" ></aou-deposit-form-description-language> </ng-template> diff --git a/src/app/features/deposit/components/presentationals/deposit-form-first-step-type/deposit-form-first-step-type.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-first-step-type/deposit-form-first-step-type.presentational.ts index 50942282a..c6c35cf4f 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-first-step-type/deposit-form-first-step-type.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-first-step-type/deposit-form-first-step-type.presentational.ts @@ -92,14 +92,6 @@ export class DepositFormFirstStepTypePresentational extends DepositAbstractFormP return ImportMethodEnum; } - getFormControlOnFourthStep(key: string): AbstractControl { - return this.mainFormGroup.get(this.formDefinitionMain.description).get(key); - } - - getPathFourthStepDescription(fieldName: string): string { - return this.formDefinitionMain.description + (isNonEmptyString(fieldName) ? (SOLIDIFY_CONSTANTS.DOT + fieldName) : SOLIDIFY_CONSTANTS.STRING_EMPTY); - } - isEditable: boolean = true; @Input() diff --git a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.html index 29baf2999..6d567cc5d 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.html @@ -1,7 +1,54 @@ -<form *ngIf="formGroup" +<form *ngIf="formGroup && display" [formGroup]="formGroup" class="form-one-columns" > + <ng-container *ngIf="depositFormRuleHelper.pathTitle as fieldPath"> + <div *ngIf="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)" + class="deposit-title" + > + <aou-deposit-form-description-text-language *ngIf="getFormControl(fieldPath) as fd" + [formGroup]="fd" + [labelToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" + [listLanguages]="listLanguages" + [isMandatoryLanguage]="true" + [mainFormGroup]="mainFormGroup" + [path]="fieldPath" + [hideLanguage]="!(depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath + '.' + + formDefinitionTextLanguage.lang))" + ></aou-deposit-form-description-text-language> + + <div *ngIf="!displayOriginalTitle && !(getFormControl(depositFormRuleHelper.pathOriginalTitleText)?.value | isNonEmptyString) && + depositFormRuleHelper.shouldDisplayField(mainFormGroup, depositFormRuleHelper.pathOriginalTitle)" + class="button-wrapper" + > + <button mat-button + class="button-add" + color="primary" + solidifyShortCuts + (click)="addOriginalTitle()" + (onEnter)="addOriginalTitle()" + [disabled]="getFormControl(fieldPath)?.value | isNonEmptyString" + >{{labelTranslateEnum.addAnOriginalTitle | translate}} + </button> + </div> + </div> + </ng-container> + + <ng-container *ngIf="depositFormRuleHelper.pathOriginalTitle as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <ng-template [ngIf]="(getFormControl(depositFormRuleHelper.pathOriginalTitleText)?.value | isNonEmptyString) || displayOriginalTitle"> + <aou-deposit-form-description-text-language *ngIf="getFormControl(fieldPath) as fd" + [formGroup]="fd" + [isMandatoryLanguage]="true" + [labelToTranslate]="labelTranslateEnum.originalTitle" + [listLanguages]="listLanguages" + [path]="fieldPath" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-text-language> + </ng-template> + </ng-template> + </ng-container> + <aou-deposit-form-type-subtype [formGroup]="formGroup" [mainFormGroup]="mainFormGroup" [disabled]="disabled" @@ -11,95 +58,96 @@ (subtypeChange)="subtypeChange($event)" ></aou-deposit-form-type-subtype> - <solidify-panel-expandable [isOpen]="true" - [titleToTranslate]="labelTranslateEnum.mainBibliographicMetadata | translate" - class="panel" - > - <ng-container *ngIf="formDefinition.languages as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-language *ngIf="getFormControl(fieldName) as fd" - #depositDescriptionLanguagePresentational - [formArray]="fd" - [listLanguages]="listLanguages" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-language> - </ng-template> - </ng-container> + <ng-container *ngIf="depositFormRuleHelper.pathLanguages as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-language *ngIf="getFormControl(fieldPath) as fd" + #depositDescriptionLanguagePresentational + [formArray]="fd" + [listLanguages]="listLanguages" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-language> + </ng-template> + </ng-container> - <ng-container *ngIf="formDefinition.originalTitle as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-text-language *ngIf="getFormControl(fieldName) as fd" + <div class="two-columns ratio-2-1"> + <ng-container *ngIf="depositFormRuleHelper.pathContainerTitle as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-text-language *ngIf="getFormControl(fieldPath) as fd" [formGroup]="fd" - [isMandatoryLanguage]="true" - [labelToTranslate]="labelTranslateEnum.originalTitle" [listLanguages]="listLanguages" - [path]="getPath(fieldName)" + [path]="fieldPath" [mainFormGroup]="mainFormGroup" ></aou-deposit-form-description-text-language> </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.publisher as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-publisher *ngIf="getFormControl(fieldName) as fd" - [formGroup]="fd" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-publisher> - </ng-template> - </ng-container> - - <ng-container *ngIf="formDefinition.dates as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-date *ngIf="getFormControl(fieldName) as fd" - #depositFormDescriptionDatePresentational - [formArray]="fd" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" + <ng-container *ngIf="depositFormRuleHelper.pathIdentifierIssn as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" + [appearance]="appearanceInputMaterial" + [floatLabel]="positionLabelInputMaterial" + solidifyTooltipOnEllipsis > - </aou-deposit-form-description-date> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> + <input [formControl]="fd" + [required]="formValidationHelper.hasRequiredField(fd)" + [solidifyValidation]="errors" + matInput + > + <mat-error #errors></mat-error> + </mat-form-field> </ng-template> </ng-container> + </div> - <ng-container *ngIf="formDefinition.identifiers as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-publication-identifier *ngIf="getFormControl(fieldName) as fd" - [formGroup]="fd" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-publication-identifier> - </ng-template> - </ng-container> + <ng-container *ngIf="depositFormRuleHelper.pathPublisher as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-publisher *ngIf="getFormControl(fieldPath) as fd" + [formGroup]="fd" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-publisher> + </ng-template> + </ng-container> - </solidify-panel-expandable> + <ng-container *ngIf="depositFormRuleHelper.pathDates as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-date *ngIf="getFormControl(fieldPath) as fd" + #depositFormDescriptionDatePresentational + [formArray]="fd" + [mainFormGroup]="mainFormGroup" + > + </aou-deposit-form-description-date> + </ng-template> + </ng-container> - <solidify-panel-expandable [isOpen]="true" - [titleToTranslate]="labelTranslateEnum.secondaryBibliographicMetadata | translate" - class="panel" - > - <ng-container *ngIf="formDefinition.keywords as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <solidify-keyword-input *ngIf="getFormControl(fieldName) as fd" - [formControl]="fd" - [placeholderToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName))" - [spaceDelimiter]="false" - [appearance]="appearanceInputMaterial" - [positionLabel]="positionLabelInputMaterial" - class="keywords" - > - </solidify-keyword-input> - </ng-template> - </ng-container> + <ng-container *ngIf="depositFormRuleHelper.pathContainer as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-container *ngIf="getFormControl(fieldPath) as fd" + [formGroup]="fd" + [listLanguages]="listLanguages" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-container> + </ng-template> + </ng-container> + + <ng-container *ngIf="depositFormRuleHelper.pathPages as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-page *ngIf="getFormControl(fieldPath) as fd" + [formGroup]="fd" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-page> + </ng-template> + </ng-container> - <ng-container *ngIf="formDefinition.note as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <div class="two-columns ratio-2-1"> + <ng-container *ngIf="depositFormRuleHelper.pathEdition as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -110,35 +158,43 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.container as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-container *ngIf="getFormControl(fieldName) as fd" - [formGroup]="fd" - [listLanguages]="listLanguages" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-container> + <ng-container *ngIf="depositFormRuleHelper.pathIdentifierIsbn as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" + [appearance]="appearanceInputMaterial" + [floatLabel]="positionLabelInputMaterial" + solidifyTooltipOnEllipsis + > + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> + <input [formControl]="fd" + [required]="formValidationHelper.hasRequiredField(fd)" + [solidifyValidation]="errors" + matInput + > + <mat-error #errors></mat-error> + </mat-form-field> </ng-template> </ng-container> + </div> - <ng-container *ngIf="formDefinition.collections as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-collection *ngIf="getFormControl(fieldName) as fd" - [formArray]="fd" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-collection> - </ng-template> - </ng-container> + <ng-container *ngIf="depositFormRuleHelper.pathIdentifier as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-publication-identifier *ngIf="getFormControl(fieldPath) as fd" + [formGroup]="fd" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-publication-identifier> + </ng-template> + </ng-container> - <ng-container *ngIf="formDefinition.aouCollection as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <div class="two-columns ratio-1-2"> + <ng-container *ngIf="depositFormRuleHelper.pathIdentifierDoi as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -149,57 +205,95 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.datasets as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-dataset *ngIf="getFormControl(fieldName) as fd" - [formArray]="fd" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-dataset> - </ng-template> - </ng-container> + <!-- TODO COMPONENT TO SELECT EXTRA IDENTIFIER--> + </div> + + <ng-container *ngIf="depositFormRuleHelper.pathCommercialUrl as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <solidify-url-input-navigator *ngIf="getFormControl(fieldPath) as fd" + [formControl]="fd" + [positionLabel]="positionLabelInputMaterial" + [appearance]="appearanceInputMaterial" + [placeholderToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" + > + </solidify-url-input-navigator> + </ng-template> + </ng-container> - <ng-container *ngIf="formDefinition.publisherVersionUrl as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <solidify-url-input-navigator *ngIf="getFormControl(fieldName) as fd" - [formControl]="fd" - [positionLabel]="positionLabelInputMaterial" - [appearance]="appearanceInputMaterial" - [placeholderToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName))" + <ng-container *ngIf="depositFormRuleHelper.pathAbstract as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-text-language-list *ngIf="getFormControl(fieldPath) as fd" + [formArray]="fd" + [isTextarea]="true" + [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" + [labelTextToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, (fieldPath + + '.' + formDefinitionText.text))" + [listLanguages]="listLanguages" + [path]="fieldPath" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-text-language-list> + </ng-template> + </ng-container> + + <ng-container *ngIf="depositFormRuleHelper.pathKeywords as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <solidify-keyword-input *ngIf="getFormControl(fieldPath) as fd" + [formControl]="fd" + [placeholderToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" + [spaceDelimiter]="false" + [appearance]="appearanceInputMaterial" + [positionLabel]="positionLabelInputMaterial" + class="keywords" + > + </solidify-keyword-input> + </ng-template> + </ng-container> + + <ng-container *ngIf="depositFormRuleHelper.pathNote as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" + [appearance]="appearanceInputMaterial" + [floatLabel]="positionLabelInputMaterial" + solidifyTooltipOnEllipsis + > + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> + <input [formControl]="fd" + [required]="formValidationHelper.hasRequiredField(fd)" + [solidifyValidation]="errors" + matInput > - </solidify-url-input-navigator> - </ng-template> - </ng-container> + <mat-error #errors></mat-error> + </mat-form-field> + </ng-template> + </ng-container> - </solidify-panel-expandable> + <ng-container *ngIf="depositFormRuleHelper.pathCollection as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-collection *ngIf="getFormControl(fieldPath) as fd" + [formArray]="fd" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-collection> + </ng-template> + </ng-container> - <solidify-panel-expandable [isOpen]="true" - [titleToTranslate]="labelTranslateEnum.otherMetadata | translate" - class="panel" - > - <ng-container *ngIf="formDefinition.abstracts as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-text-language-list *ngIf="getFormControl(fieldName) as fd" - [formArray]="fd" - [isTextarea]="true" - [labelSectionToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName))" - [labelTextToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, (getPath(fieldName) + - '.' + formDefinitionText.text))" - [listLanguages]="listLanguages" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-text-language-list> - </ng-template> - </ng-container> + <ng-container *ngIf="depositFormRuleHelper.pathClassifications as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-classification *ngIf="getFormControl(fieldPath) as fd" + [formArray]="fd" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-classification> + </ng-template> + </ng-container> - <ng-container *ngIf="formDefinition.discipline as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <div class="two-columns ratio-1-2"> + <ng-container *ngIf="depositFormRuleHelper.pathIdentifierLocalNumber as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -210,14 +304,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.mandator as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathDiscipline as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -227,15 +321,63 @@ </mat-form-field> </ng-template> </ng-container> + </div> + + <ng-container *ngIf="depositFormRuleHelper.pathMandatedBy as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" + [appearance]="appearanceInputMaterial" + [floatLabel]="positionLabelInputMaterial" + solidifyTooltipOnEllipsis + > + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> + <input [formControl]="fd" + [required]="formValidationHelper.hasRequiredField(fd)" + [solidifyValidation]="errors" + matInput + > + <mat-error #errors></mat-error> + </mat-form-field> + </ng-template> + </ng-container> + + <ng-container *ngIf="depositFormRuleHelper.pathFunder as fieldName"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldName)"> + <aou-deposit-form-description-funding *ngIf="getFormControl(fieldName) as fd" + [formArray]="fd" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-funding> + </ng-template> + </ng-container> + + <ng-container *ngIf="depositFormRuleHelper.pathDatasets as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-dataset *ngIf="getFormControl(fieldPath) as fd" + [formArray]="fd" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-dataset> + </ng-template> + </ng-container> + + <ng-container *ngIf="depositFormRuleHelper.pathLinks as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <aou-deposit-form-description-link *ngIf="getFormControl(fieldPath) as fd" + [formArray]="fd" + [listLanguages]="listLanguages" + [mainFormGroup]="mainFormGroup" + ></aou-deposit-form-description-link> + </ng-template> + </ng-container> - <ng-container *ngIf="formDefinition.edition as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <div class="two-columns"> + <ng-container *ngIf="depositFormRuleHelper.pathAouInternalCollection as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -246,14 +388,14 @@ </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.award as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" + <ng-container *ngIf="depositFormRuleHelper.pathAward as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -263,37 +405,6 @@ </mat-form-field> </ng-template> </ng-container> + </div> - <ng-container *ngIf="formDefinition.classifications as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-classification *ngIf="getFormControl(fieldName) as fd" - [formArray]="fd" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-classification> - </ng-template> - </ng-container> - - <ng-container *ngIf="formDefinition.pages as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-page *ngIf="getFormControl(fieldName) as fd" - [formGroup]="fd" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-page> - </ng-template> - </ng-container> - - <ng-container *ngIf="formDefinition.links as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-link *ngIf="getFormControl(fieldName) as fd" - [formArray]="fd" - [listLanguages]="listLanguages" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-link> - </ng-template> - </ng-container> - - </solidify-panel-expandable> </form> diff --git a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.scss b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.scss index f0d942f7e..82774c9fc 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.scss +++ b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.scss @@ -1,6 +1,24 @@ @import "../sass/abstracts/abstracts"; :host { + .form-one-columns { + display: grid; + } + + .deposit-title { + display: grid; + grid-template-columns: 1fr min-content; + align-items: center; + + .button-wrapper { + margin-left: 10px; + + .button-add { + margin-bottom: 20px; + } + } + } + .panel { &::ng-deep { > .content { @@ -10,7 +28,7 @@ } ::ng-deep { - solidify-panel-expandable { + solidify-panel-expandable:not(.is-outline) { background-color: $panel-background; padding-left: 10px; padding-right: 10px; @@ -22,5 +40,17 @@ } } + .two-columns { + display: grid; + grid-gap: 20px; + grid-template-columns: 1fr 1fr; + + &.ratio-1-2 { + grid-template-columns: 1fr 2fr; + } + &.ratio-2-1 { + grid-template-columns: 2fr 1fr; + } + } } diff --git a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.ts index 345b79679..89919a680 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.ts @@ -47,6 +47,7 @@ export class DepositFormFourthStepDescriptionPresentational extends DepositAbstr formDefinitionFirstStepType: FormComponentFormDefinitionFirstStepType = new FormComponentFormDefinitionFirstStepType(); formDefinition: FormComponentFormDefinitionFourthStepDescription = new FormComponentFormDefinitionFourthStepDescription(); formDefinitionText: FormComponentFormDefinitionDepositFormTextLanguage = new FormComponentFormDefinitionDepositFormTextLanguage(); + formDefinitionTextLanguage: FormComponentFormDefinitionDepositFormTextLanguage = new FormComponentFormDefinitionDepositFormTextLanguage(); typeFormGroup: FormGroup; @@ -87,6 +88,10 @@ export class DepositFormFourthStepDescriptionPresentational extends DepositAbstr @ViewChild("depositFormDescriptionDatePresentational") readonly depositFormDescriptionDatePresentational: DepositFormDescriptionDatePresentational; + displayOriginalTitle: boolean = false; + + display: boolean = true; + constructor(protected readonly _changeDetector: ChangeDetectorRef, protected readonly _elementRef: ElementRef, protected readonly _injector: Injector, @@ -103,6 +108,14 @@ export class DepositFormFourthStepDescriptionPresentational extends DepositAbstr subtypeChange(subtype: string): void { this._subtypeBS.next(subtype); - this.externalDetectChanges(); + + // Allow to force to redisplay all field that depend of subtype selected + this.display = false; + this._changeDetector.detectChanges(); + this.display = true; + } + + addOriginalTitle(): void { + this.displayOriginalTitle = true; } } diff --git a/src/app/features/deposit/components/presentationals/deposit-form-third-step-contributors/deposit-form-third-step-contributors.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-third-step-contributors/deposit-form-third-step-contributors.presentational.html index 190d7f8f2..151612c79 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-third-step-contributors/deposit-form-third-step-contributors.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-third-step-contributors/deposit-form-third-step-contributors.presentational.html @@ -5,7 +5,7 @@ <solidify-panel-expandable [titleToTranslate]="labelTranslateEnum.contributors | translate" [isOpen]="true" > - <aou-deposit-table-contributor-container *ngIf="getFormControl(formDefinition.contributorMembersFrontend) as fd" + <aou-deposit-table-contributor-container *ngIf="getFormControlInCurrentFormGroup(formDefinition.contributorMembersFrontend) as fd" #contributorMembersFrontendContainer [formArray]="fd" [mode]="modeTableContributorEnum.contributors" @@ -15,7 +15,7 @@ </solidify-panel-expandable> - <div *ngIf="getFormControl(formDefinition.isCollaboration) as fd" + <div *ngIf="getFormControl(depositFormRuleHelper.pathContributorsIsCollaboration) as fd" class="is-collaboration" [class.is-checked]="fd.value | isTrue" > @@ -26,12 +26,12 @@ </mat-checkbox> </div> - <solidify-panel-expandable *ngIf="getFormControl(formDefinition.isCollaboration)?.value | isTrue" + <solidify-panel-expandable *ngIf="getFormControl(depositFormRuleHelper.pathContributorsIsCollaboration)?.value | isTrue" [titleToTranslate]="labelTranslateEnum.membersOfACollaboration | translate" [isOpen]="true" > - <aou-deposit-table-contributor-container *ngIf="getFormControl(formDefinition.collaborationMembersFrontend) as fd" + <aou-deposit-table-contributor-container *ngIf="getFormControlInCurrentFormGroup(formDefinition.collaborationMembersFrontend) as fd" #collaborationMembersFrontendContainer [formArray]="fd" [mode]="modeTableContributorEnum.collaborationMembers" @@ -40,21 +40,20 @@ </solidify-panel-expandable> - <ng-container *ngIf="formDefinition.academicStructures as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> + <ng-container *ngIf="depositFormRuleHelper.pathStructure as fieldName"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldName)"> <aou-deposit-form-description-academic-structure *ngIf="getFormControl(fieldName) as fd" [formArray]="fd" [listStructure]="listStructure" [isLoadingStructure]="isLoadingStructure" [defaultValue]="defaultData?.academicStructures" - [path]="getPath(fieldName)" [mainFormGroup]="mainFormGroup" ></aou-deposit-form-description-academic-structure> </ng-template> </ng-container> - <ng-container *ngIf="formDefinition.groups as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> + <ng-container *ngIf="depositFormRuleHelper.pathGroup as fieldName"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldName)"> <solidify-searchable-multi-select *ngIf="getFormControl(fieldName) as fd" [appearance]="appearanceInputMaterial" [formControl]="fd" @@ -78,14 +77,4 @@ </ng-template> </ng-container> - - <ng-container *ngIf="formDefinition.fundings as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <aou-deposit-form-description-funding *ngIf="getFormControl(fieldName) as fd" - [formArray]="fd" - [path]="getPath(fieldName)" - [mainFormGroup]="mainFormGroup" - ></aou-deposit-form-description-funding> - </ng-template> - </ng-container> </form> diff --git a/src/app/features/deposit/components/presentationals/deposit-form-type-subtype/deposit-form-type-subtype.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-type-subtype/deposit-form-type-subtype.presentational.html index 59577e5a4..ba0ca445e 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-type-subtype/deposit-form-type-subtype.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-type-subtype/deposit-form-type-subtype.presentational.html @@ -1,10 +1,10 @@ -<ng-container *ngIf="formDefinition.subtype as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> - <mat-form-field *ngIf="getFormControl(fieldName) as fd" +<ng-container *ngIf="depositFormRuleHelper.pathSubType as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName)) | translate}}</mat-label> + <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> <mat-select [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" @@ -24,17 +24,17 @@ </ng-template> </ng-container> -<ng-container *ngIf="formDefinition.subsubtype as fieldName"> - <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, getPath(fieldName))"> +<ng-container *ngIf="depositFormRuleHelper.pathSubsubtype as fieldPath"> + <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> <ng-template [ngIf]="listDepositSubSubtype | isNonEmptyArray"> - <solidify-panel-expandable [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, getPath(fieldName))" + <solidify-panel-expandable [titleToTranslate]="depositFormRuleHelper.getLabel(mainFormGroup, fieldPath)" [isOutline]="true" [isRequired]="true" class="subtype-panel" > - <mat-radio-group *ngIf="getFormControl(fieldName) as fd" + <mat-radio-group *ngIf="getFormControl(fieldPath) as fd" [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(getFormControl(fieldName))" + [required]="formValidationHelper.hasRequiredField(getFormControl(fieldPath))" class="radio-group" color="primary" > diff --git a/src/app/features/deposit/components/presentationals/deposit-form/deposit-form.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form/deposit-form.presentational.ts index 8aa91b15b..8a473bbf2 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form/deposit-form.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form/deposit-form.presentational.ts @@ -107,6 +107,7 @@ import { ConfirmDialog, ConfirmDialogData, isArray, + isEmptyString, isFalse, isNonEmptyArray, isNonEmptyString, @@ -660,12 +661,21 @@ export class DepositFormPresentational extends AbstractPresentational implements private computeValidationTitleLanguage(subType: Enums.Deposit.DepositFriendlyNameSubTypeEnum): void { const formControlTitleLanguage = this.form.get(DepositFormRuleHelper.pathTitleLanguage) as FormControl; + const formArrayLanguages = this.form.get(DepositFormRuleHelper.pathLanguages) as FormArray; if ([ Enums.Deposit.DepositFriendlyNameSubTypeEnum.THESIS, Enums.Deposit.DepositFriendlyNameSubTypeEnum.MASTER_OF_ADVANCED_STUDIES, Enums.Deposit.DepositFriendlyNameSubTypeEnum.MASTER_DEGREE, Enums.Deposit.DepositFriendlyNameSubTypeEnum.PRIVATE_DOCTOR_THESIS, ].indexOf(subType) !== -1) { + if (isNullOrUndefined(formControlTitleLanguage.value) || isEmptyString(formControlTitleLanguage.value)) { + if (formArrayLanguages.controls.length > 0) { + const languageDeposit = formArrayLanguages.controls[0].get(this.formDefinitionDepositFormLanguage.language)?.value; + if (isNonEmptyString(languageDeposit)) { + formControlTitleLanguage.setValue(languageDeposit); + } + } + } formControlTitleLanguage.setValidators([SolidifyValidator, Validators.required]); } else { formControlTitleLanguage.setValidators([SolidifyValidator]); diff --git a/src/app/features/deposit/helpers/deposit-form-rule.helper.ts b/src/app/features/deposit/helpers/deposit-form-rule.helper.ts index 1f046c431..4c117cb98 100644 --- a/src/app/features/deposit/helpers/deposit-form-rule.helper.ts +++ b/src/app/features/deposit/helpers/deposit-form-rule.helper.ts @@ -60,8 +60,13 @@ export class DepositFormRuleHelper { private static fdPublicationIdentifiers: FormComponentFormDefinitionDepositFormPublicationIdentifiers = new FormComponentFormDefinitionDepositFormPublicationIdentifiers(); private static fdContributor: FormComponentFormDefinitionDepositFormContributor = new FormComponentFormDefinitionDepositFormContributor(); - static pathSusSubType: string = DepositFormRuleHelper.fdMain.type + dot + DepositFormRuleHelper.fdFirstStepType.subsubtype; + static pathType: string = DepositFormRuleHelper.fdMain.type + dot + DepositFormRuleHelper.fdFirstStepType.type; + static pathContributorsContributors: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.contributors; + static pathContributorsIsCollaboration: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.isCollaboration; + static pathStructure: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.academicStructures; + static pathGroup: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.groups; static pathSubType: string = DepositFormRuleHelper.fdMain.type + dot + DepositFormRuleHelper.fdFirstStepType.subtype; + static pathSubsubtype: string = DepositFormRuleHelper.fdMain.type + dot + DepositFormRuleHelper.fdFirstStepType.subsubtype; static pathLanguages: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.languages; static pathLanguagesLanguage: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.languages + dot + DepositFormRuleHelper.fdLanguage.language; static pathTitle: string = DepositFormRuleHelper.fdMain.type + dot + DepositFormRuleHelper.fdFirstStepType.title; @@ -70,55 +75,49 @@ export class DepositFormRuleHelper { static pathOriginalTitle: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.originalTitle; static pathOriginalTitleText: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.originalTitle + dot + DepositFormRuleHelper.fdTextLanguage.text; static pathOriginalTitleLanguage: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.originalTitle + dot + DepositFormRuleHelper.fdTextLanguage.lang; - static pathStructure: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.academicStructures; - static pathGroup: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.groups; - static pathIdentifier: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers; - static pathIdentifierDoi: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.doi; - static pathIdentifierPmid: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.pmid; - static pathIdentifierPmcid: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.pmcid; - static pathIdentifierIsbn: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.isbn; - static pathIdentifierIssn: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.issn; - static pathIdentifierArXiv: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.arxiv; - static pathIdentifierDblp: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.dblp; - static pathIdentifierRepEc: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.repec; - static pathIdentifierLocalNumber: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.localNumber; - static pathIdentifierMmsid: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.mmsid; - static pathIdentifierUrn: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.urn; - static pathCommercialUrl: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.publisherVersionUrl; - static pathContainer: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container; static pathContainerTitle: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.title; static pathContainerTitleText: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.title + dot + DepositFormRuleHelper.fdTextLanguage.text; static pathContainerTitleLanguage: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.title + dot + DepositFormRuleHelper.fdTextLanguage.lang; - static pathContainerConferenceTitle: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.conferenceTitle; - static pathContainerConferenceEditor: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.editor; - static pathContainerConferencePlace: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.conferencePlace; - static pathContainerConferenceDate: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.conferenceDate; - static pathContainerVolume: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.volume; - static pathContainerIssue: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.issue; - static pathContainerSpecialIssue: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.specialIssue; - static pathMandatedBy: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.mandator; - static pathEdition: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.edition; - static pathClassifications: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.classifications; - static pathClassificationsCode: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.classifications + dot + DepositFormRuleHelper.fdClassification.code; - static pathClassificationsItem: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.classifications + dot + DepositFormRuleHelper.fdClassification.item; - static pathCollection: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.collections; - static pathCollectionName: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.collections + dot + DepositFormRuleHelper.fdCollection.name; - static pathCollectionNumber: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.collections + dot + DepositFormRuleHelper.fdCollection.number; + static pathIdentifierIssn: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.issn; static pathPublisher: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.publisher; static pathPublisherPlacePublication: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.publisher + dot + DepositFormRuleHelper.fdPublisher.place; static pathPublisherPublishingHouse: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.publisher + dot + DepositFormRuleHelper.fdPublisher.name; static pathDates: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.dates; - static pathDiscipline: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.discipline; + static pathContainer: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container; + static pathContainerVolume: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.volume; + static pathContainerIssue: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.issue; + static pathContainerSpecialIssue: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.specialIssue; + static pathContainerConferenceEditor: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.editor; + static pathContainerConferenceTitle: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.conferenceTitle; + static pathContainerConferencePlace: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.conferencePlace; + static pathContainerConferenceDate: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.container + dot + DepositFormRuleHelper.fdContainer.conferenceDate; static pathPages: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.pages; static pathPagesStartPage: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.pages + dot + DepositFormRuleHelper.fdPage.start; static pathPagesEndPage: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.pages + dot + DepositFormRuleHelper.fdPage.end; static pathPagesNumberPagesArticleNumber: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.pages + dot + DepositFormRuleHelper.fdPage.other; + static pathEdition: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.edition; + static pathIdentifierIsbn: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.isbn; + static pathIdentifierDoi: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.doi; + static pathIdentifier: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers; + static pathIdentifierPmid: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.pmid; + static pathIdentifierPmcid: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.pmcid; + static pathIdentifierArXiv: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.arxiv; + static pathIdentifierDblp: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.dblp; + static pathIdentifierRepEc: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.repec; + static pathIdentifierMmsid: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.mmsid; + static pathIdentifierUrn: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.urn; + static pathCommercialUrl: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.publisherVersionUrl; static pathAbstract: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.abstracts; static pathAbstractText: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.abstracts + dot + DepositFormRuleHelper.fdTextLanguage.text; static pathAbstractLanguage: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.abstracts + dot + DepositFormRuleHelper.fdTextLanguage.lang; static pathKeywords: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.keywords; static pathNote: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.note; - static pathAward: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.award; + static pathCollection: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.collections; + static pathCollectionName: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.collections + dot + DepositFormRuleHelper.fdCollection.name; + static pathCollectionNumber: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.collections + dot + DepositFormRuleHelper.fdCollection.number; + static pathIdentifierLocalNumber: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.identifiers + dot + DepositFormRuleHelper.fdPublicationIdentifiers.localNumber; + static pathDiscipline: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.discipline; + static pathMandatedBy: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.mandator; static pathFunder: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.fundings; static pathFunderFunder: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.fundings + dot + DepositFormRuleHelper.fdFunding.funder; static pathFunderProjectName: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.fundings + dot + DepositFormRuleHelper.fdFunding.name; @@ -133,119 +132,85 @@ export class DepositFormRuleHelper { static pathLinksDescriptionLanguage: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.links + dot + DepositFormRuleHelper.fdLink.description + dot + DepositFormRuleHelper.fdTextLanguage.lang; static pathLinksType: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.links + dot + DepositFormRuleHelper.fdLink.type; static pathAouInternalCollection: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.aouCollection; - static pathContributorsContributors: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.contributors; - static pathContributorsIsCollaboration: string = DepositFormRuleHelper.fdMain.contributors + dot + DepositFormRuleHelper.fdThirdStepContributors.isCollaboration; - static pathType: string = DepositFormRuleHelper.fdMain.type + dot + DepositFormRuleHelper.fdFirstStepType.type; + static pathAward: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.award; + + static pathClassifications: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.classifications; + static pathClassificationsCode: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.classifications + dot + DepositFormRuleHelper.fdClassification.code; + static pathClassificationsItem: string = DepositFormRuleHelper.fdMain.description + dot + DepositFormRuleHelper.fdFourthStepDescription.classifications + dot + DepositFormRuleHelper.fdClassification.item; - static shouldDisplayField(form: FormGroup, fieldPass: string): boolean { + static shouldDisplayField(form: FormGroup, fieldPath: string): boolean { const subType = form?.get(this.fdMain.type + "." + this.fdFirstStepType.subtype)?.value; - return this._shouldDisplayFieldDependingOfSubType(subType, fieldPass); + return this._shouldDisplayFieldDependingOfSubType(subType, fieldPath); } - private static _shouldDisplayFieldDependingOfSubType(subType: string, fieldPass: string): boolean { + private static _shouldDisplayFieldDependingOfSubType(subType: string, fieldPath: string): boolean { switch (subType) { case Enums.Deposit.DepositFriendlyNameSubTypeEnum.SCIENTIFIC_ARTICLE: case Enums.Deposit.DepositFriendlyNameSubTypeEnum.PROFESSIONAL_ARTICLE: + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.OTHER_ARTICLE: return [ + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, + this.pathStructure, + this.pathGroup, + this.pathType, this.pathSubType, - this.pathSusSubType, + ...(subType === Enums.Deposit.DepositFriendlyNameSubTypeEnum.OTHER_ARTICLE ? [] : [this.pathSubsubtype]), this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, + this.pathTitleLanguage, this.pathOriginalTitle, this.pathOriginalTitleText, this.pathOriginalTitleLanguage, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierDoi, - this.pathIdentifierPmid, - this.pathIdentifierPmcid, - this.pathIdentifierArXiv, - this.pathIdentifierDblp, - this.pathIdentifierRepEc, - this.pathIdentifierIssn, - this.pathCommercialUrl, - this.pathContainer, this.pathContainerTitle, this.pathContainerTitleText, this.pathContainerTitleLanguage, + this.pathIdentifierIssn, + // this.pathPublisher, + // this.pathPublisherPlacePublication, + // this.pathPublisherPublishingHouse, + this.pathDates, + this.pathContainer, this.pathContainerVolume, this.pathContainerIssue, this.pathContainerSpecialIssue, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, - this.pathDates, + // this.pathContainerConferenceEditor, + // this.pathContainerConferenceTitle, + // this.pathContainerConferencePlace, + // this.pathContainerConferenceDate, this.pathPages, this.pathPagesStartPage, this.pathPagesEndPage, this.pathPagesNumberPagesArticleNumber, - this.pathAbstract, - this.pathAbstractText, - this.pathAbstractLanguage, - this.pathKeywords, - this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, - this.pathDatasets, - this.pathDatasetsUrl, - this.pathLinks, - this.pathLinksTarget, - this.pathLinksDescription, - this.pathLinksDescriptionText, - this.pathLinksDescriptionLanguage, - this.pathLinksType, - this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.OTHER_ARTICLE: - return [ - this.pathSubType, - this.pathLanguages, - this.pathLanguagesLanguage, - this.pathTitle, - this.pathTitleText, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, + // this.pathEdition, + // this.pathIdentifierIsbn, this.pathIdentifierDoi, + this.pathIdentifier, this.pathIdentifierPmid, this.pathIdentifierPmcid, this.pathIdentifierArXiv, this.pathIdentifierDblp, this.pathIdentifierRepEc, - this.pathIdentifierIssn, + this.pathIdentifierMmsid, + this.pathIdentifierUrn, this.pathCommercialUrl, - this.pathContainer, - this.pathContainerTitle, - this.pathContainerTitleText, - this.pathContainerTitleLanguage, - this.pathContainerVolume, - this.pathContainerIssue, - this.pathContainerSpecialIssue, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, - this.pathDates, - this.pathPages, - this.pathPagesStartPage, - this.pathPagesEndPage, - this.pathPagesNumberPagesArticleNumber, this.pathAbstract, this.pathAbstractText, this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, + // this.pathCollection, + // this.pathCollectionName, + // this.pathCollectionNumber, + // this.pathIdentifierLocalNumber, + // this.pathDiscipline, + // this.pathMandatedBy, this.pathFunder, this.pathFunderFunder, - this.pathFunderProjectCode, this.pathFunderProjectName, + this.pathFunderProjectCode, this.pathFunderProjectAcronym, this.pathDatasets, this.pathDatasetsUrl, @@ -256,42 +221,74 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; + // this.pathAward, + ].indexOf(fieldPath) !== -1; case Enums.Deposit.DepositFriendlyNameSubTypeEnum.JOURNAL_ISSUE: return [ + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, + this.pathStructure, + this.pathGroup, + this.pathType, this.pathSubType, this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierIssn, - this.pathCommercialUrl, - this.pathContainer, + this.pathTitleLanguage, + this.pathOriginalTitle, + this.pathOriginalTitleText, + this.pathOriginalTitleLanguage, this.pathContainerTitle, this.pathContainerTitleText, this.pathContainerTitleLanguage, + this.pathIdentifierIssn, + // this.pathPublisher, + // this.pathPublisherPlacePublication, + // this.pathPublisherPublishingHouse, + this.pathDates, + this.pathContainer, this.pathContainerVolume, this.pathContainerIssue, this.pathContainerSpecialIssue, - this.pathDates, - this.pathPages, - this.pathPagesNumberPagesArticleNumber, + // this.pathContainerConferenceEditor, + // this.pathContainerConferenceTitle, + // this.pathContainerConferencePlace, + // this.pathContainerConferenceDate, + // this.pathPages, + // this.pathPagesStartPage, + // this.pathPagesEndPage, + // this.pathPagesNumberPagesArticleNumber, + // this.pathEdition, + // this.pathIdentifierIsbn, + // this.pathIdentifierDoi, + // this.pathIdentifier, + // this.pathIdentifierPmid, + // this.pathIdentifierPmcid, + // this.pathIdentifierArXiv, + // this.pathIdentifierDblp, + // this.pathIdentifierRepEc, + // this.pathIdentifierMmsid, + // this.pathIdentifierUrn, + this.pathCommercialUrl, this.pathAbstract, this.pathAbstractText, this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, - this.pathDatasets, - this.pathDatasetsUrl, + // this.pathCollection, + // this.pathCollectionName, + // this.pathCollectionNumber, + // this.pathIdentifierLocalNumber, + // this.pathDiscipline, + // this.pathMandatedBy, + // this.pathFunder, + // this.pathFunderFunder, + // this.pathFunderProjectName, + // this.pathFunderProjectCode, + // this.pathFunderProjectAcronym, + // this.pathDatasets, + // this.pathDatasetsUrl, this.pathLinks, this.pathLinksTarget, this.pathLinksDescription, @@ -299,41 +296,72 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; + // this.pathAward, + ].indexOf(fieldPath) !== -1; + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.BOOK: case Enums.Deposit.DepositFriendlyNameSubTypeEnum.COLLECTIVE_WORK: return [ + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, + this.pathStructure, + this.pathGroup, + this.pathType, this.pathSubType, this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, + this.pathTitleLanguage, this.pathOriginalTitle, this.pathOriginalTitleText, this.pathOriginalTitleLanguage, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierDoi, - this.pathIdentifierIsbn, - this.pathIdentifierMmsid, - this.pathCommercialUrl, - this.pathEdition, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, + // this.pathContainerTitle, + // this.pathContainerTitleText, + // this.pathContainerTitleLanguage, + // this.pathIdentifierIssn, this.pathPublisher, this.pathPublisherPlacePublication, this.pathPublisherPublishingHouse, this.pathDates, + // this.pathContainer, + // this.pathContainerVolume, + // this.pathContainerIssue, + // this.pathContainerSpecialIssue, + // this.pathContainerConferenceEditor, + // this.pathContainerConferenceTitle, + // this.pathContainerConferencePlace, + // this.pathContainerConferenceDate, this.pathPages, + this.pathPagesStartPage, + this.pathPagesEndPage, this.pathPagesNumberPagesArticleNumber, + this.pathEdition, + this.pathIdentifierIsbn, + this.pathIdentifierDoi, + this.pathIdentifier, + this.pathIdentifierPmid, + this.pathIdentifierPmcid, + this.pathIdentifierArXiv, + this.pathIdentifierDblp, + this.pathIdentifierRepEc, + this.pathIdentifierMmsid, + this.pathIdentifierUrn, + // this.pathCommercialUrl, + this.pathAbstract, + this.pathAbstractText, + this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, + this.pathCollection, + this.pathCollectionName, + this.pathCollectionNumber, + // this.pathIdentifierLocalNumber, + // this.pathDiscipline, + // this.pathMandatedBy, this.pathFunder, this.pathFunderFunder, - this.pathFunderProjectCode, this.pathFunderProjectName, + this.pathFunderProjectCode, this.pathFunderProjectAcronym, this.pathDatasets, this.pathDatasetsUrl, @@ -344,49 +372,72 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; + // this.pathAward, + ].indexOf(fieldPath) !== -1; case Enums.Deposit.DepositFriendlyNameSubTypeEnum.BOOK_CHAPTER: + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.CONTRIBUTION_TO_A_DICTIONARY_ENCYCLOPAEDIA: return [ + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, + this.pathStructure, + this.pathGroup, + this.pathType, this.pathSubType, this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, + this.pathTitleLanguage, this.pathOriginalTitle, this.pathOriginalTitleText, this.pathOriginalTitleLanguage, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierDoi, - this.pathCommercialUrl, - this.pathContainer, this.pathContainerTitle, this.pathContainerTitleText, this.pathContainerTitleLanguage, - this.pathContainerConferenceEditor, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, + // this.pathIdentifierIssn, this.pathPublisher, this.pathPublisherPlacePublication, this.pathPublisherPublishingHouse, this.pathDates, + this.pathContainer, + // this.pathContainerVolume, + // this.pathContainerIssue, + // this.pathContainerSpecialIssue, + this.pathContainerConferenceEditor, + // this.pathContainerConferenceTitle, + // this.pathContainerConferencePlace, + // this.pathContainerConferenceDate, this.pathPages, this.pathPagesStartPage, this.pathPagesEndPage, - this.pathPages, this.pathPagesNumberPagesArticleNumber, + this.pathEdition, + this.pathIdentifierIsbn, + this.pathIdentifierDoi, + this.pathIdentifier, + this.pathIdentifierPmid, + this.pathIdentifierPmcid, + this.pathIdentifierArXiv, + this.pathIdentifierDblp, + this.pathIdentifierRepEc, + this.pathIdentifierMmsid, + this.pathIdentifierUrn, + this.pathCommercialUrl, this.pathAbstract, this.pathAbstractText, this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, + this.pathCollection, + this.pathCollectionName, + this.pathCollectionNumber, + // this.pathIdentifierLocalNumber, + // this.pathDiscipline, + // this.pathMandatedBy, this.pathFunder, this.pathFunderFunder, - this.pathFunderProjectCode, this.pathFunderProjectName, + this.pathFunderProjectCode, this.pathFunderProjectAcronym, this.pathDatasets, this.pathDatasetsUrl, @@ -397,155 +448,72 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.CHAPTER_OF_PROCEEDINGS: + // this.pathAward, + ].indexOf(fieldPath) !== -1; + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.CONFERENCE_PROCEEDINGS: return [ + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, + this.pathStructure, + this.pathGroup, + this.pathType, this.pathSubType, this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, + this.pathTitleLanguage, this.pathOriginalTitle, this.pathOriginalTitleText, this.pathOriginalTitleLanguage, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierDoi, - this.pathCommercialUrl, - this.pathContainer, - this.pathContainerTitle, - this.pathContainerTitleText, - this.pathContainerTitleLanguage, - this.pathContainerConferenceEditor, - this.pathContainerConferenceTitle, - this.pathContainerConferencePlace, - this.pathContainerConferenceDate, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, + // this.pathContainerTitle, + // this.pathContainerTitleText, + // this.pathContainerTitleLanguage, + // this.pathIdentifierIssn, this.pathPublisher, this.pathPublisherPlacePublication, this.pathPublisherPublishingHouse, this.pathDates, - this.pathPages, - this.pathPagesStartPage, - this.pathPagesEndPage, - this.pathPages, - this.pathPagesNumberPagesArticleNumber, - this.pathAbstract, - this.pathAbstractText, - this.pathAbstractLanguage, - this.pathKeywords, - this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, - this.pathDatasets, - this.pathDatasetsUrl, - this.pathLinks, - this.pathLinksTarget, - this.pathLinksDescription, - this.pathLinksDescriptionText, - this.pathLinksDescriptionLanguage, - this.pathLinksType, - this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.CONTRIBUTION_TO_A_DICTIONARY_ENCYCLOPAEDIA: - return [ - this.pathSubType, - this.pathLanguages, - this.pathLanguagesLanguage, - this.pathTitle, - this.pathTitleText, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierDoi, - this.pathCommercialUrl, this.pathContainer, - this.pathContainerTitle, - this.pathContainerTitleText, - this.pathContainerTitleLanguage, - this.pathContainerConferenceEditor, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, - this.pathPublisher, - this.pathPublisherPlacePublication, - this.pathPublisherPublishingHouse, - this.pathDates, + // this.pathContainerVolume, + // this.pathContainerIssue, + // this.pathContainerSpecialIssue, + // this.pathContainerConferenceEditor, + this.pathContainerConferenceTitle, + this.pathContainerConferencePlace, + this.pathContainerConferenceDate, this.pathPages, this.pathPagesStartPage, this.pathPagesEndPage, - this.pathPages, this.pathPagesNumberPagesArticleNumber, - this.pathAbstract, - this.pathAbstractText, - this.pathAbstractLanguage, - this.pathKeywords, - this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, - this.pathDatasets, - this.pathDatasetsUrl, - this.pathLinks, - this.pathLinksTarget, - this.pathLinksDescription, - this.pathLinksDescriptionText, - this.pathLinksDescriptionLanguage, - this.pathLinksType, - this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.CONFERENCE_PROCEEDINGS: - return [ - this.pathSubType, - this.pathLanguages, - this.pathLanguagesLanguage, - this.pathTitle, - this.pathTitleText, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, + // this.pathEdition, + this.pathIdentifierIsbn, this.pathIdentifierDoi, + this.pathIdentifier, this.pathIdentifierPmid, this.pathIdentifierPmcid, this.pathIdentifierArXiv, this.pathIdentifierDblp, - this.pathIdentifierIsbn, + this.pathIdentifierRepEc, + this.pathIdentifierMmsid, + this.pathIdentifierUrn, this.pathCommercialUrl, - this.pathContainer, - this.pathContainerConferenceEditor, - this.pathContainerConferenceTitle, - this.pathContainerConferencePlace, - this.pathContainerConferenceDate, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, - this.pathPublisher, - this.pathPublisherPlacePublication, - this.pathPublisherPublishingHouse, - this.pathDates, - this.pathPages, - this.pathPagesNumberPagesArticleNumber, this.pathAbstract, this.pathAbstractText, this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, + this.pathCollection, + this.pathCollectionName, + this.pathCollectionNumber, + // this.pathIdentifierLocalNumber, + // this.pathDiscipline, + // this.pathMandatedBy, + // this.pathFunder, + // this.pathFunderFunder, + // this.pathFunderProjectName, + // this.pathFunderProjectCode, + // this.pathFunderProjectAcronym, this.pathDatasets, this.pathDatasetsUrl, this.pathLinks, @@ -555,116 +523,73 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; + // this.pathAward, + ].indexOf(fieldPath) !== -1; case Enums.Deposit.DepositFriendlyNameSubTypeEnum.PRESENTATION_SPEECH: + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.POSTER: + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.CHAPTER_OF_PROCEEDINGS: return [ - this.pathSubType, - this.pathLanguages, - this.pathLanguagesLanguage, - this.pathTitle, - this.pathTitleText, + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, this.pathStructure, this.pathGroup, - this.pathContainer, - this.pathContainerTitle, - this.pathContainerTitleText, - this.pathContainerTitleLanguage, - this.pathContainerConferenceEditor, - this.pathContainerConferenceTitle, - this.pathContainerConferencePlace, - this.pathContainerConferenceDate, - this.pathDates, - this.pathPages, - this.pathPagesNumberPagesArticleNumber, - this.pathAbstract, - this.pathAbstractText, - this.pathAbstractLanguage, - this.pathKeywords, - this.pathNote, - this.pathAward, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, - this.pathDatasets, - this.pathDatasetsUrl, - this.pathLinks, - this.pathLinksTarget, - this.pathLinksDescription, - this.pathLinksDescriptionText, - this.pathLinksDescriptionLanguage, - this.pathLinksType, - this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.POSTER: - return [ + this.pathType, this.pathSubType, this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, - this.pathStructure, - this.pathGroup, + this.pathTitleLanguage, + this.pathOriginalTitle, + this.pathOriginalTitleText, + this.pathOriginalTitleLanguage, + // this.pathContainerTitle, + // this.pathContainerTitleText, + // this.pathContainerTitleLanguage, + // this.pathIdentifierIssn, + this.pathPublisher, + this.pathPublisherPlacePublication, + this.pathPublisherPublishingHouse, + this.pathDates, this.pathContainer, - this.pathContainerTitle, - this.pathContainerTitleText, - this.pathContainerTitleLanguage, + // this.pathContainerVolume, + // this.pathContainerIssue, + // this.pathContainerSpecialIssue, this.pathContainerConferenceEditor, this.pathContainerConferenceTitle, this.pathContainerConferencePlace, this.pathContainerConferenceDate, - this.pathDates, + this.pathPages, + this.pathPagesStartPage, + this.pathPagesEndPage, + this.pathPagesNumberPagesArticleNumber, + // this.pathEdition, + this.pathIdentifierIsbn, + this.pathIdentifierDoi, + this.pathIdentifier, + this.pathIdentifierPmid, + this.pathIdentifierPmcid, + this.pathIdentifierArXiv, + this.pathIdentifierDblp, + this.pathIdentifierRepEc, + this.pathIdentifierMmsid, + this.pathIdentifierUrn, + this.pathCommercialUrl, this.pathAbstract, this.pathAbstractText, this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, - this.pathDatasets, - this.pathDatasetsUrl, - this.pathLinks, - this.pathLinksTarget, - this.pathLinksDescription, - this.pathLinksDescriptionText, - this.pathLinksDescriptionLanguage, - this.pathLinksType, - this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.THESIS: - return [ - this.pathSubType, - this.pathLanguages, - this.pathLanguagesLanguage, - this.pathTitle, - this.pathTitleText, - this.pathTitleLanguage, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierLocalNumber, this.pathCollection, this.pathCollectionName, this.pathCollectionNumber, - this.pathDates, - this.pathPages, - this.pathPagesNumberPagesArticleNumber, - this.pathAbstract, - this.pathAbstractText, - this.pathAbstractLanguage, - this.pathKeywords, - this.pathNote, - this.pathAward, + // this.pathIdentifierLocalNumber, + // this.pathDiscipline, + // this.pathMandatedBy, this.pathFunder, this.pathFunderFunder, - this.pathFunderProjectCode, this.pathFunderProjectName, + this.pathFunderProjectCode, this.pathFunderProjectAcronym, this.pathDatasets, this.pathDatasetsUrl, @@ -675,73 +600,75 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; + // this.pathAward, + ].indexOf(fieldPath) !== -1; + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.THESIS: + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.MASTER_OF_ADVANCED_STUDIES: + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.MASTER_DEGREE: case Enums.Deposit.DepositFriendlyNameSubTypeEnum.PRIVATE_DOCTOR_THESIS: return [ + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, + this.pathStructure, + this.pathGroup, + this.pathType, this.pathSubType, this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, this.pathTitleLanguage, - this.pathStructure, - this.pathGroup, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, + this.pathOriginalTitle, + this.pathOriginalTitleText, + this.pathOriginalTitleLanguage, + // this.pathContainerTitle, + // this.pathContainerTitleText, + // this.pathContainerTitleLanguage, + // this.pathIdentifierIssn, + // this.pathPublisher, + // this.pathPublisherPlacePublication, + // this.pathPublisherPublishingHouse, this.pathDates, + // this.pathContainer, + // this.pathContainerVolume, + // this.pathContainerIssue, + // this.pathContainerSpecialIssue, + // this.pathContainerConferenceEditor, + // this.pathContainerConferenceTitle, + // this.pathContainerConferencePlace, + // this.pathContainerConferenceDate, this.pathPages, + this.pathPagesStartPage, + this.pathPagesEndPage, this.pathPagesNumberPagesArticleNumber, + // this.pathEdition, + // this.pathIdentifierIsbn, + // this.pathIdentifierDoi, + // this.pathIdentifier, + // this.pathIdentifierPmid, + // this.pathIdentifierPmcid, + // this.pathIdentifierArXiv, + // this.pathIdentifierDblp, + // this.pathIdentifierRepEc, + // this.pathIdentifierMmsid, + // this.pathIdentifierUrn, + // this.pathCommercialUrl, this.pathAbstract, this.pathAbstractText, this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, - this.pathDatasets, - this.pathDatasetsUrl, - this.pathLinks, - this.pathLinksTarget, - this.pathLinksDescription, - this.pathLinksDescriptionText, - this.pathLinksDescriptionLanguage, - this.pathLinksType, - this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.MASTER_OF_ADVANCED_STUDIES: - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.MASTER_DEGREE: - return [ - this.pathSubType, - this.pathLanguages, - this.pathLanguagesLanguage, - this.pathTitle, - this.pathTitleText, - this.pathTitleLanguage, - this.pathStructure, - this.pathGroup, this.pathCollection, this.pathCollectionName, this.pathCollectionNumber, - this.pathDates, + this.pathIdentifierLocalNumber, this.pathDiscipline, - this.pathPages, - this.pathPagesNumberPagesArticleNumber, - this.pathAbstract, - this.pathAbstractText, - this.pathAbstractLanguage, - this.pathKeywords, - this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, + // this.pathMandatedBy, + // this.pathFunder, + // this.pathFunderFunder, + // this.pathFunderProjectName, + // this.pathFunderProjectCode, + // this.pathFunderProjectAcronym, this.pathDatasets, this.pathDatasetsUrl, this.pathLinks, @@ -751,85 +678,74 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; + this.pathAward, + ].indexOf(fieldPath) !== -1; case Enums.Deposit.DepositFriendlyNameSubTypeEnum.RESEARCH_REPORT: case Enums.Deposit.DepositFriendlyNameSubTypeEnum.TECHNICAL_REPORT: case Enums.Deposit.DepositFriendlyNameSubTypeEnum.WORKING_PAPER: + case Enums.Deposit.DepositFriendlyNameSubTypeEnum.PREPRINT: return [ + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, + this.pathStructure, + this.pathGroup, + this.pathType, this.pathSubType, this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierArXiv, - this.pathIdentifierLocalNumber, - this.pathIdentifierRepEc, - this.pathCommercialUrl, - this.pathMandatedBy, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, + this.pathTitleLanguage, + this.pathOriginalTitle, + this.pathOriginalTitleText, + this.pathOriginalTitleLanguage, + // this.pathContainerTitle, + // this.pathContainerTitleText, + // this.pathContainerTitleLanguage, + // this.pathIdentifierIssn, this.pathPublisher, this.pathPublisherPlacePublication, this.pathPublisherPublishingHouse, this.pathDates, + // this.pathContainer, + // this.pathContainerVolume, + // this.pathContainerIssue, + // this.pathContainerSpecialIssue, + // this.pathContainerConferenceEditor, + // this.pathContainerConferenceTitle, + // this.pathContainerConferencePlace, + // this.pathContainerConferenceDate, this.pathPages, + this.pathPagesStartPage, + this.pathPagesEndPage, this.pathPagesNumberPagesArticleNumber, - this.pathAbstract, - this.pathAbstractText, - this.pathAbstractLanguage, - this.pathKeywords, - this.pathNote, - this.pathAward, - this.pathFunder, - this.pathFunderFunder, - this.pathFunderProjectCode, - this.pathFunderProjectName, - this.pathFunderProjectAcronym, - this.pathDatasets, - this.pathDatasetsUrl, - this.pathLinks, - this.pathLinksTarget, - this.pathLinksDescription, - this.pathLinksDescriptionText, - this.pathLinksDescriptionLanguage, - this.pathLinksType, - this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; - case Enums.Deposit.DepositFriendlyNameSubTypeEnum.PREPRINT: - return [ - this.pathSubType, - this.pathLanguages, - this.pathLanguagesLanguage, - this.pathTitle, - this.pathTitleText, - this.pathStructure, - this.pathGroup, + // this.pathEdition, + this.pathIdentifierIsbn, + this.pathIdentifierDoi, this.pathIdentifier, + this.pathIdentifierPmid, + this.pathIdentifierPmcid, this.pathIdentifierArXiv, + this.pathIdentifierDblp, this.pathIdentifierRepEc, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, - this.pathPublisher, - this.pathPublisherPlacePublication, - this.pathPublisherPublishingHouse, - this.pathDates, - this.pathPages, - this.pathPagesNumberPagesArticleNumber, + this.pathIdentifierMmsid, + this.pathIdentifierUrn, + this.pathCommercialUrl, this.pathAbstract, this.pathAbstractText, this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, + this.pathCollection, + this.pathCollectionName, + this.pathCollectionNumber, + // this.pathIdentifierLocalNumber, + // this.pathDiscipline, + this.pathMandatedBy, this.pathFunder, this.pathFunderFunder, - this.pathFunderProjectCode, this.pathFunderProjectName, + this.pathFunderProjectCode, this.pathFunderProjectAcronym, this.pathDatasets, this.pathDatasetsUrl, @@ -840,64 +756,68 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, - ].indexOf(fieldPass) !== -1; + // this.pathAward, + ].indexOf(fieldPath) !== -1; default: return [ - this.pathSusSubType, + this.pathContributorsContributors, + this.pathContributorsIsCollaboration, + this.pathStructure, + this.pathGroup, + this.pathType, this.pathSubType, + this.pathSubsubtype, this.pathLanguages, this.pathLanguagesLanguage, this.pathTitle, this.pathTitleText, + this.pathTitleLanguage, this.pathOriginalTitle, this.pathOriginalTitleText, this.pathOriginalTitleLanguage, - this.pathStructure, - this.pathGroup, - this.pathIdentifier, - this.pathIdentifierDoi, - this.pathIdentifierPmid, - this.pathIdentifierIsbn, - this.pathIdentifierPmcid, - this.pathIdentifierArXiv, - this.pathIdentifierDblp, - this.pathIdentifierRepEc, - this.pathIdentifierLocalNumber, - this.pathIdentifierIssn, - this.pathIdentifierMmsid, - this.pathIdentifierUrn, - this.pathCommercialUrl, - this.pathContainer, this.pathContainerTitle, this.pathContainerTitleText, this.pathContainerTitleLanguage, - this.pathContainerConferenceTitle, - this.pathContainerConferenceEditor, - this.pathContainerConferencePlace, - this.pathContainerConferenceDate, - this.pathContainerVolume, - this.pathContainerIssue, - this.pathContainerSpecialIssue, - this.pathMandatedBy, - this.pathEdition, - this.pathCollection, - this.pathCollectionName, - this.pathCollectionNumber, + this.pathIdentifierIssn, this.pathPublisher, this.pathPublisherPlacePublication, this.pathPublisherPublishingHouse, this.pathDates, - this.pathDiscipline, + this.pathContainer, + this.pathContainerVolume, + this.pathContainerIssue, + this.pathContainerSpecialIssue, + this.pathContainerConferenceEditor, + this.pathContainerConferenceTitle, + this.pathContainerConferencePlace, + this.pathContainerConferenceDate, this.pathPages, this.pathPagesStartPage, this.pathPagesEndPage, this.pathPagesNumberPagesArticleNumber, + this.pathEdition, + this.pathIdentifierIsbn, + this.pathIdentifierDoi, + this.pathIdentifier, + this.pathIdentifierPmid, + this.pathIdentifierPmcid, + this.pathIdentifierArXiv, + this.pathIdentifierDblp, + this.pathIdentifierRepEc, + this.pathIdentifierMmsid, + this.pathIdentifierUrn, + this.pathCommercialUrl, this.pathAbstract, this.pathAbstractText, this.pathAbstractLanguage, this.pathKeywords, this.pathNote, - this.pathAward, + this.pathCollection, + this.pathCollectionName, + this.pathCollectionNumber, + this.pathIdentifierLocalNumber, + this.pathDiscipline, + this.pathMandatedBy, this.pathFunder, this.pathFunderFunder, this.pathFunderProjectName, @@ -912,10 +832,11 @@ export class DepositFormRuleHelper { this.pathLinksDescriptionLanguage, this.pathLinksType, this.pathAouInternalCollection, + this.pathAward, this.pathClassifications, this.pathClassificationsCode, this.pathClassificationsItem, - ].indexOf(fieldPass) !== -1; + ].indexOf(fieldPath) !== -1; } } @@ -1018,14 +939,14 @@ export class DepositFormRuleHelper { } } - static getLabel(form: FormGroup, fieldPass: string): string { + static getLabel(form: FormGroup, fieldPath: string): string { const subType = form?.get(this.fdMain.type + "." + this.fdFirstStepType.subtype)?.value; - return this.getLabelDependingOfSubType(subType, fieldPass); + return this.getLabelDependingOfSubType(subType, fieldPath); } - static getLabelDependingOfSubType(subType: string, fieldPass: string): string { - switch (fieldPass) { - case this.pathSusSubType: + static getLabelDependingOfSubType(subType: string, fieldPath: string): string { + switch (fieldPath) { + case this.pathSubsubtype: return LabelTranslateEnum.subtype; case this.pathSubType: return LabelTranslateEnum.type; diff --git a/src/app/shared/enums/label-translate.enum.ts b/src/app/shared/enums/label-translate.enum.ts index cea894bfd..e6b5818cd 100644 --- a/src/app/shared/enums/label-translate.enum.ts +++ b/src/app/shared/enums/label-translate.enum.ts @@ -445,9 +445,6 @@ export class LabelTranslateEnum { static characters: string = MARK_AS_TRANSLATABLE("general.label.characters"); static sourceOfDocumentReferences: string = MARK_AS_TRANSLATABLE("general.label.sourceOfDocumentReferences"); static externalService: string = MARK_AS_TRANSLATABLE("general.label.externalService"); - static mainBibliographicMetadata: string = MARK_AS_TRANSLATABLE("general.label.mainBibliographicMetadata"); - static secondaryBibliographicMetadata: string = MARK_AS_TRANSLATABLE("general.label.secondaryBibliographicMetadata"); - static otherMetadata: string = MARK_AS_TRANSLATABLE("general.label.otherMetadata"); static note: string = MARK_AS_TRANSLATABLE("general.label.note"); static collectionUnige: string = MARK_AS_TRANSLATABLE("general.label.collectionUnige"); static discipline: string = MARK_AS_TRANSLATABLE("general.label.discipline"); @@ -514,6 +511,7 @@ export class LabelTranslateEnum { static commentsBetweenValidators: string = MARK_AS_TRANSLATABLE("general.label.commentsBetweenValidators"); static submittedBy: string = MARK_AS_TRANSLATABLE("general.label.submittedBy"); static undefined: string = MARK_AS_TRANSLATABLE("general.label.undefined"); + static addAnOriginalTitle: string = MARK_AS_TRANSLATABLE("general.label.addAnOriginalTitle"); static received: string = MARK_AS_TRANSLATABLE("general.status.received"); static toProcess: string = MARK_AS_TRANSLATABLE("general.status.toProcess"); diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 8c0aa9352..b0bf98c22 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -566,6 +566,7 @@ "accessToken": "Zugriffstoken", "accessTokenValidity": "Gültigkeit des Zugriffstokens", "acronym": "Akronym", + "addAnOriginalTitle": "general.label.addAnOriginalTitle", "addMeAsContributor": "Mich als Beitragenden hinzufügen", "additionalInformation": "Zusätzliche Informationen", "additionalMetadata": "Zusätzliche Metadaten", @@ -786,7 +787,6 @@ "listView": "Listenansicht", "localNumber": "general.label.localNumber", "localThesis": "general.label.localThesis", - "mainBibliographicMetadata": "general.label.mainBibliographicMetadata", "maintainer": "Erhaltung", "maintenanceInProgress": "Wartungsarbeiten im Gange", "makingAManualDeposit": "general.label.makingAManualDeposit", @@ -846,7 +846,6 @@ "osdConformance": "Osd-Konformität", "other": "general.label.other", "otherKindOfImport": "general.label.otherKindOfImport", - "otherMetadata": "general.label.otherMetadata", "package": "Paket", "packages": "Pakete", "packagesInformation": "Informationen zu den Paketen", @@ -895,7 +894,6 @@ "runNumber": "Laufnummer", "scope": "Geltungsbereich", "search": "Suche", - "secondaryBibliographicMetadata": "general.label.secondaryBibliographicMetadata", "selectLanguage": "Sprache auswählen", "sensitivity": "Empfindlichkeit", "sentRequest": "Gesendete Anfrage", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index f59da70aa..d38397eb1 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -566,6 +566,7 @@ "accessToken": "Access token", "accessTokenValidity": "Access token validity", "acronym": "Acronym", + "addAnOriginalTitle": "Add an original title", "addMeAsContributor": "Add me as contributor", "additionalInformation": "Changelog", "additionalMetadata": "Additional metadata", @@ -786,7 +787,6 @@ "listView": "List view", "localNumber": "Local number", "localThesis": "Local thesis", - "mainBibliographicMetadata": "Main bibliographic metadata", "maintainer": "Maintainer", "maintenanceInProgress": "Maintenance in progress", "makingAManualDeposit": "Making a manual deposit", @@ -846,7 +846,6 @@ "osdConformance": "Osd conformance", "other": "Other", "otherKindOfImport": "Other kind of import", - "otherMetadata": "Other metadata", "package": "Package", "packages": "Packages", "packagesInformation": "Packages information", @@ -895,7 +894,6 @@ "runNumber": "Run number", "scope": "Scope", "search": "Search", - "secondaryBibliographicMetadata": "Secondary bibliographic metadata", "selectLanguage": "Select language", "sensitivity": "Sensitivity", "sentRequest": "Sent request", diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index f77c0184d..92bf38023 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -566,6 +566,7 @@ "accessToken": "Jeton d'accès", "accessTokenValidity": "Validité du jeton d'accès", "acronym": "Acronyme", + "addAnOriginalTitle": "Ajouter un titre original", "addMeAsContributor": "M'ajouter en tant que contributeur-trice", "additionalInformation": "Historique des changements", "additionalMetadata": "Métadonnées supplémentaires", @@ -786,7 +787,6 @@ "listView": "Vue liste", "localNumber": "Numéro local", "localThesis": "Thèse local", - "mainBibliographicMetadata": "Métadonnées bibliographiques principales", "maintainer": "Mainteneur", "maintenanceInProgress": "Maintenance en cours", "makingAManualDeposit": "Faire un dépôt manuel", @@ -846,7 +846,6 @@ "osdConformance": "Conformité osd", "other": "Autre", "otherKindOfImport": "Autre sorte d'import", - "otherMetadata": "Autres métadonnées", "package": "Paquet", "packages": "Paquets", "packagesInformation": "Information sur les paquets", @@ -895,7 +894,6 @@ "runNumber": "Numéro d'exécution", "scope": "Champ d'application", "search": "Rechercher", - "secondaryBibliographicMetadata": "Métadonnées bibliographiques secondaires", "selectLanguage": "Sélectionner une langue", "sensitivity": "Sensibilité", "sentRequest": "Demande envoyée", -- GitLab From f459570bb898fbc781ab775c8a94253914aff97b Mon Sep 17 00:00:00 2001 From: Florent POITTEVIN <poittevin.florent@gmail.com> Date: Wed, 26 May 2021 10:34:51 +0200 Subject: [PATCH 2/2] fix: merge change with container title search and remove conference date datepicker --- ...-description-container.presentational.html | 18 +++---- ...rm-description-container.presentational.ts | 19 ------- ...publication-identifier.presentational.html | 12 ----- ...n-publication-identifier.presentational.ts | 24 --------- ...cription-text-language.presentational.html | 5 +- ...escription-text-language.presentational.ts | 26 +++++----- ...ourth-step-description.presentational.html | 21 ++++++-- ...-fourth-step-description.presentational.ts | 50 +++++++++++++++++++ .../helpers/deposit-form-rule.helper.ts | 4 +- src/app/shared/enums/label-translate.enum.ts | 1 + src/assets/i18n/de.json | 1 + src/assets/i18n/en.json | 1 + src/assets/i18n/fr.json | 1 + 13 files changed, 99 insertions(+), 84 deletions(-) diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.html index 64765903f..29adb1ce7 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.html @@ -97,25 +97,25 @@ <ng-container *ngIf="depositFormRuleHelper.pathContainerConferenceDate as fieldPath"> <ng-template [ngIf]="depositFormRuleHelper.shouldDisplayField(mainFormGroup, fieldPath)"> - <mat-form-field (click)="publicationDateDatepicker.open()" - *ngIf="getFormControl(fieldPath) as fd" + <!-- (click)="publicationDateDatepicker.open()"--> + <mat-form-field *ngIf="getFormControl(fieldPath) as fd" [appearance]="appearanceInputMaterial" [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > <mat-label>{{depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | translate}}</mat-label> + <!-- [matDatepicker]="publicationDateDatepicker"--> <input [formControl]="fd" - [matDatepicker]="publicationDateDatepicker" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" matInput > - <mat-datepicker-toggle [for]="publicationDateDatepicker" - matSuffix - ></mat-datepicker-toggle> - <mat-datepicker #publicationDateDatepicker - [touchUi]="breakpointService.isSmallerThanMd()" - ></mat-datepicker> + <!-- <mat-datepicker-toggle [for]="publicationDateDatepicker"--> + <!-- matSuffix--> + <!-- ></mat-datepicker-toggle>--> + <!-- <mat-datepicker #publicationDateDatepicker--> + <!-- [touchUi]="breakpointService.isSmallerThanMd()"--> + <!-- ></mat-datepicker>--> <mat-error #errors></mat-error> </mat-form-field> </ng-template> diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.ts index 58617b993..7dee216de 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-container/deposit-form-description-container.presentational.ts @@ -54,17 +54,6 @@ export class DepositFormDescriptionContainerPresentational extends DepositAbstra @Input() listLanguages: Language[]; - filteredOptionsCallback: (option: JournalTitleDTO) => string = option => { - if (isNonEmptyString(option.issn)) { - return option.mainTitle + " - " + option.issn; - } - return option.mainTitle; - // tslint:disable-next-line:semicolon - }; - - sharedExternalDataJournalTitleActionNameSpace: ResourceNameSpace = sharedExternalDataJournalTitleActionNameSpace; - sharedExternalDataJournalTitleState: typeof SharedExternalDataJournalTitleState = SharedExternalDataJournalTitleState; - constructor(private translate: TranslateService, private _store: Store, private readonly _fb: FormBuilder, @@ -96,12 +85,4 @@ export class DepositFormDescriptionContainerPresentational extends DepositAbstra return form; } - - journalTitleDataSelected(journalTitle: JournalTitleDTO): void { - - const fcIssn = this.mainFormGroup.get(DepositFormRuleHelper.pathIdentifierIssn); - if (isNotNullNorUndefined(fcIssn)) { - fcIssn.setValue(journalTitle.issn); - } - } } diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.html index a0e7880f3..7e68c4418 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.html @@ -54,20 +54,8 @@ <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" - [matAutocomplete]="auto" matInput > - <mat-autocomplete autoActiveFirstOption - #auto="matAutocomplete" - (optionsScroll)="loadNextChunk()" - (optionSelected)="autocompleteOptionSelected($event)" - > - <mat-option *ngFor="let option of (filteredOptionsObs | async)" - [value]="option" - > - {{filteredOptionsCallback(option)}} - </mat-option> - </mat-autocomplete> <mat-error #errors></mat-error> </mat-form-field> diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.ts index beea9be9b..06dfbdfef 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-publication-identifier/deposit-form-description-publication-identifier.presentational.ts @@ -83,21 +83,11 @@ export class DepositFormDescriptionPublicationIdentifierPresentational extends D listIdentifiersSelected: string[] = []; - filteredOptionsObs: Observable<JournalTitleDTO[]> = MemoizedUtil.list(this._store, SharedExternalDataJournalTitleState); - isRequired(formControl: AbstractControl, key: string): boolean { const errors = formControl.get(key).errors; return isNullOrUndefined(errors) ? false : errors.required; } - filteredOptionsCallback: (option: JournalTitleDTO) => string = option => { - if (isNonEmptyString(option.issn)) { - return option.mainTitle + " - " + option.issn; - } - return option.mainTitle; - // tslint:disable-next-line:semicolon - }; - constructor(private translate: TranslateService, private _store: Store, private readonly _fb: FormBuilder, @@ -171,20 +161,6 @@ export class DepositFormDescriptionPublicationIdentifierPresentational extends D return form; } - loadNextChunk(): void { - this._store.dispatch(new SharedExternalDataJournalTitleAction.LoadNextChunkList()); - } - - autocompleteOptionSelected($event: MatAutocompleteSelectedEvent): void { - const journalTitle = $event.option.value as JournalTitleDTO; - this.formGroup.get(this.formDefinition.issn).setValue(journalTitle.issn); - - const fcTitle = this.mainFormGroup.get(DepositFormRuleHelper.pathContainerTitleText); - if (isNotNullNorUndefined(fcTitle)) { - fcTitle.setValue(journalTitle.mainTitle); - } - } - addIdentifier(): void { this.listIdentifiersSelected.push(this.formControlIdentifier.value); this.formControlIdentifier.setValue(undefined); diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.html index 34f567f44..f47fb0272 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.html @@ -5,7 +5,7 @@ [floatLabel]="positionLabelInputMaterial" solidifyTooltipOnEllipsis > - <mat-label>{{labelToTranslate | translate}}</mat-label> + <mat-label>{{((depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) | isNonEmptyString) ? depositFormRuleHelper.getLabel(mainFormGroup, fieldPath) : labelToTranslate) | translate}}</mat-label> <textarea *ngIf="isTextarea; else input" [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" @@ -15,13 +15,14 @@ cdkTextareaAutosize matInput > - </textarea> + </textarea> <ng-template #input> <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" matInput [matAutocomplete]="auto" + [matAutocompleteDisabled]="(filteredOptionsObs | async)?.length > 0" > <mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" diff --git a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.ts index b430ec640..2982f6188 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-description-text-language/deposit-form-description-text-language.presentational.ts @@ -124,20 +124,20 @@ export class DepositFormDescriptionTextLanguagePresentational<T> extends Deposit if (isNotNullNorUndefined(this.resourceNameSpace)) { this.filteredOptionsObs = MemoizedUtil.list(this._store, this.state); - } - this.subscribe(this.formGroup.get(this.formDefinition.text).valueChanges.pipe( - distinctUntilChanged(), - filter(value => isNonEmptyString(value)), - debounceTime(250), - tap(value => { - const queryParameters = new QueryParameters(); - const search = QueryParametersUtil.getSearchItems(queryParameters); - MappingObjectUtil.set(search, this.queryParametersSearchKey, value); - queryParameters.paging.pageSize = 10; - this._store.dispatch(new this.resourceNameSpace.GetAll(queryParameters)); - }), - )); + this.subscribe(this.formGroup.get(this.formDefinition.text).valueChanges.pipe( + distinctUntilChanged(), + filter(value => isNonEmptyString(value)), + debounceTime(250), + tap(value => { + const queryParameters = new QueryParameters(); + const search = QueryParametersUtil.getSearchItems(queryParameters); + MappingObjectUtil.set(search, this.queryParametersSearchKey, value); + queryParameters.paging.pageSize = 10; + this._store.dispatch(new this.resourceNameSpace.GetAll(queryParameters)); + }), + )); + } } autocompleteOptionSelected($event: MatAutocompleteSelectedEvent): void { diff --git a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.html b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.html index 6d567cc5d..f4cff8db1 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.html +++ b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.html @@ -77,6 +77,12 @@ [listLanguages]="listLanguages" [path]="fieldPath" [mainFormGroup]="mainFormGroup" + [resourceNameSpace]="sharedExternalDataJournalTitleActionNameSpace" + [state]="sharedExternalDataJournalTitleState" + [filterOptionsValueKey]="'mainTitle'" + [queryParametersSearchKey]="'title'" + [filteredOptionsCallbackLabel]="containerTitleFilteredOptionsCallback" + (autocompleteOptionSelected)="journalTitleDataSelected($event)" ></aou-deposit-form-description-text-language> </ng-template> </ng-container> @@ -92,8 +98,20 @@ <input [formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [solidifyValidation]="errors" + [matAutocomplete]="auto" matInput > + <mat-autocomplete autoActiveFirstOption + #auto="matAutocomplete" + (optionsScroll)="loadNextChunkContainerTitle()" + (optionSelected)="issnDataSelected($event)" + > + <mat-option *ngFor="let option of (containerTitleFilteredOptionsObs | async)" + [value]="option" + > + {{containerTitleFilteredOptionsCallback(option)}} + </mat-option> + </mat-autocomplete> <mat-error #errors></mat-error> </mat-form-field> </ng-template> @@ -204,8 +222,6 @@ </mat-form-field> </ng-template> </ng-container> - - <!-- TODO COMPONENT TO SELECT EXTRA IDENTIFIER--> </div> <ng-container *ngIf="depositFormRuleHelper.pathCommercialUrl as fieldPath"> @@ -406,5 +422,4 @@ </ng-template> </ng-container> </div> - </form> diff --git a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.ts b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.ts index 89919a680..fde7b8c65 100644 --- a/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.ts +++ b/src/app/features/deposit/components/presentationals/deposit-form-fourth-step-description/deposit-form-fourth-step-description.presentational.ts @@ -12,28 +12,42 @@ import { FormBuilder, FormGroup, } from "@angular/forms"; +import {MatAutocompleteSelectedEvent} from "@angular/material/autocomplete"; import {DepositAbstractFormPresentational} from "@app/features/deposit/components/presentationals/deposit-abstract-form/deposit-abstract-form.presentational"; import {DepositFormDescriptionDatePresentational} from "@app/features/deposit/components/presentationals/deposit-form-description-date/deposit-form-description-date.presentational"; import {DepositFormDescriptionLanguagePresentational} from "@app/features/deposit/components/presentationals/deposit-form-description-language/deposit-form-description-language.presentational"; +import {DepositFormRuleHelper} from "@app/features/deposit/helpers/deposit-form-rule.helper"; import { + FormComponentFormDefinitionDepositFormPublicationIdentifiers, FormComponentFormDefinitionDepositFormTextLanguage, FormComponentFormDefinitionFirstStepType, FormComponentFormDefinitionFourthStepDescription, FormComponentFormDefinitionMain, } from "@app/features/deposit/models/deposit-form-definition.model"; +import { + SharedExternalDataJournalTitleAction, + sharedExternalDataJournalTitleActionNameSpace, +} from "@app/shared/stores/external-data/external-data-journal/shared-external-data-journal-title.action"; import { DepositSubSubtype, DepositSubtype, + JournalTitleDTO, Language, } from "@models"; +import {Store} from "@ngxs/store"; +import {SharedExternalDataJournalTitleState} from "@shared/stores/external-data/external-data-journal/shared-external-data-journal-title.state"; import { BehaviorSubject, Observable, } from "rxjs"; import { + isNonEmptyString, + isNotNullNorUndefined, isNullOrUndefined, + MemoizedUtil, ObservableUtil, Override, + ResourceNameSpace, } from "solidify-frontend"; @Component({ @@ -46,6 +60,7 @@ export class DepositFormFourthStepDescriptionPresentational extends DepositAbstr formDefinitionMain: FormComponentFormDefinitionMain = new FormComponentFormDefinitionMain(); formDefinitionFirstStepType: FormComponentFormDefinitionFirstStepType = new FormComponentFormDefinitionFirstStepType(); formDefinition: FormComponentFormDefinitionFourthStepDescription = new FormComponentFormDefinitionFourthStepDescription(); + formDefinitionIdentifier: FormComponentFormDefinitionDepositFormPublicationIdentifiers = new FormComponentFormDefinitionDepositFormPublicationIdentifiers(); formDefinitionText: FormComponentFormDefinitionDepositFormTextLanguage = new FormComponentFormDefinitionDepositFormTextLanguage(); formDefinitionTextLanguage: FormComponentFormDefinitionDepositFormTextLanguage = new FormComponentFormDefinitionDepositFormTextLanguage(); @@ -92,14 +107,45 @@ export class DepositFormFourthStepDescriptionPresentational extends DepositAbstr display: boolean = true; + containerTitleFilteredOptionsObs: Observable<JournalTitleDTO[]> = MemoizedUtil.list(this._store, SharedExternalDataJournalTitleState); + + containerTitleFilteredOptionsCallback: (option: JournalTitleDTO) => string = option => { + if (isNonEmptyString(option.issn)) { + return option.mainTitle + " - " + option.issn; + } + return option.mainTitle; + // tslint:disable-next-line:semicolon + }; + + sharedExternalDataJournalTitleActionNameSpace: ResourceNameSpace = sharedExternalDataJournalTitleActionNameSpace; + sharedExternalDataJournalTitleState: typeof SharedExternalDataJournalTitleState = SharedExternalDataJournalTitleState; + constructor(protected readonly _changeDetector: ChangeDetectorRef, protected readonly _elementRef: ElementRef, protected readonly _injector: Injector, private readonly _fb: FormBuilder, + private readonly _store: Store, ) { super(_changeDetector); } + journalTitleDataSelected(journalTitle: JournalTitleDTO): void { + const fcIssn = this.mainFormGroup.get(DepositFormRuleHelper.pathIdentifierIssn); + if (isNotNullNorUndefined(fcIssn)) { + fcIssn.setValue(journalTitle.issn); + } + } + + issnDataSelected($event: MatAutocompleteSelectedEvent): void { + const journalTitle = $event.option.value as JournalTitleDTO; + this.mainFormGroup.get(DepositFormRuleHelper.pathIdentifierIssn).setValue(journalTitle.issn); + + const fcTitle = this.mainFormGroup.get(DepositFormRuleHelper.pathContainerTitleText); + if (isNotNullNorUndefined(fcTitle)) { + fcTitle.setValue(journalTitle.mainTitle); + } + } + @Override() externalDetectChanges(): void { this._changeDetector.detectChanges(); @@ -118,4 +164,8 @@ export class DepositFormFourthStepDescriptionPresentational extends DepositAbstr addOriginalTitle(): void { this.displayOriginalTitle = true; } + + loadNextChunkContainerTitle(): void { + this._store.dispatch(new SharedExternalDataJournalTitleAction.LoadNextChunkList()); + } } diff --git a/src/app/features/deposit/helpers/deposit-form-rule.helper.ts b/src/app/features/deposit/helpers/deposit-form-rule.helper.ts index 4c117cb98..f340b413d 100644 --- a/src/app/features/deposit/helpers/deposit-form-rule.helper.ts +++ b/src/app/features/deposit/helpers/deposit-form-rule.helper.ts @@ -1009,7 +1009,7 @@ export class DepositFormRuleHelper { case this.pathContainerTitle: return LabelTranslateEnum.container; case this.pathContainerTitleText: - return LabelTranslateEnum.originalTitle; + return LabelTranslateEnum.containerTitle; case this.pathContainerTitleLanguage: return LabelTranslateEnum.language; case this.pathContainerConferenceTitle: @@ -1101,7 +1101,7 @@ export class DepositFormRuleHelper { case this.pathClassificationsItem: return LabelTranslateEnum.item; default: - return "undefined"; + return SOLIDIFY_CONSTANTS.STRING_EMPTY; } } } diff --git a/src/app/shared/enums/label-translate.enum.ts b/src/app/shared/enums/label-translate.enum.ts index e6b5818cd..8daf5a88e 100644 --- a/src/app/shared/enums/label-translate.enum.ts +++ b/src/app/shared/enums/label-translate.enum.ts @@ -253,6 +253,7 @@ export class LabelTranslateEnum { static year: string = MARK_AS_TRANSLATABLE("general.label.year"); static lastChecksumVerification: string = MARK_AS_TRANSLATABLE("general.label.lastChecksumVerification"); static container: string = MARK_AS_TRANSLATABLE("general.label.container"); + static containerTitle: string = MARK_AS_TRANSLATABLE("general.label.containerTitle"); static numberOfFiles: string = MARK_AS_TRANSLATABLE("general.label.numberOfFiles"); static metadataVersion: string = MARK_AS_TRANSLATABLE("general.label.metadataVersion"); static archiveSize: string = MARK_AS_TRANSLATABLE("general.label.archiveSize"); diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index b0bf98c22..f1f636864 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -638,6 +638,7 @@ "conferenceTitle": "general.label.conferenceTitle", "confirmDeleteAction": "Bestätigung des Löschvorgangs", "container": "Container", + "containerTitle": "general.label.containerTitle", "contributor": "Beitragende", "contributorEpicene": "general.label.contributorEpicene", "contributors": "Beitragende", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index d38397eb1..bce9d1873 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -638,6 +638,7 @@ "conferenceTitle": "Conference title", "confirmDeleteAction": "Confirm delete action", "container": "Container", + "containerTitle": "Container title", "contributor": "Contributor", "contributorEpicene": "Contributor", "contributors": "Contributors", diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 92bf38023..4c86048ec 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -638,6 +638,7 @@ "conferenceTitle": "Titre de la conférence", "confirmDeleteAction": "Confirmer l'action de suppression", "container": "Conteneur", + "containerTitle": "Titre du container", "contributor": "Contributeur", "contributorEpicene": "Contributeur-trice", "contributors": "Contributeurs", -- GitLab