From 7b6bbfef04fd13bcc0ce14948a8a662b458ef78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20QUAISSARD?= <mael.quaissard@smile.fr> Date: Mon, 7 Sep 2020 13:52:57 +0200 Subject: [PATCH] vitam context : add select all option + fix some bugs --- .../server/context/ContextConverter.java | 2 +- .../context-create/context-create.module.ts | 1 - .../context-edit-permission.component.html | 8 ++ .../context-edit-permission.component.ts | 9 ++ .../context-edit-permission.module.ts | 4 +- .../context-information-tab.component.ts | 1 + .../context-preview.component.ts | 9 +- .../referential/src/locale/messages.en.xlf | 87 ++++--------- .../referential/src/locale/messages.fr.xlf | 85 ++++--------- .../referential/src/locale/messages.xlf | 120 +++--------------- .../vitamui-select-all-option.component.html | 14 ++ .../vitamui-select-all-option.component.scss | 0 ...itamui-select-all-option.component.spec.ts | 25 ++++ .../vitamui-select-all-option.component.ts | 106 ++++++++++++++++ .../vitamui-select-all-option.module.ts | 17 +++ .../src/lib/vitamui-library.module.ts | 7 +- 16 files changed, 257 insertions(+), 238 deletions(-) create mode 100644 ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.html create mode 100644 ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.scss create mode 100644 ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.spec.ts create mode 100644 ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.ts create mode 100644 ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.module.ts diff --git a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/context/ContextConverter.java b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/context/ContextConverter.java index 9d0fec1b..3ec4093e 100644 --- a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/context/ContextConverter.java +++ b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/context/ContextConverter.java @@ -75,7 +75,7 @@ public class ContextConverter { PermissionDto permissionDto = new PermissionDto(); permissionDto.setTenant(permission.getTenant().toString()); permissionDto.setAccessContracts(permission.getAccessContract()); - permissionDto.setAccessContracts(permission.getAccessContract()); + permissionDto.setIngestContracts(permission.getIngestContract()); permissions.add(permissionDto); } diff --git a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-create.module.ts b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-create.module.ts index efc301a5..f6637a11 100644 --- a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-create.module.ts +++ b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-create.module.ts @@ -52,7 +52,6 @@ import {ContextCreateComponent} from './context-create.component'; import {ContextCreateValidators} from './context-create.validators'; import {ContextEditPermissionModule} from './context-edit-permission/context-edit-permission.module'; - @NgModule({ imports: [ CommonModule, diff --git a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.component.html b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.component.html index cb67c8c5..ec3228ac 100644 --- a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.component.html +++ b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.component.html @@ -33,6 +33,10 @@ <mat-select [(value)]="permission.accessContracts" placeholder="Contrats d'accès" (selectionChange)="onContractSelect()" i18n-placeholder="Application@@accessContractsFormApplicationPlaceholder" panelclass="vitamui-mat-select" multiple required> + <vitamui-select-all-option [value]="permission.accessContracts" [values]="getAccessContractKeys(permission.tenant)" + title="Tous les contrats d'accès" i18n-title="Application@@accessContractsFormApplicationSelectAll" + (toggleSelection)="permission.accessContracts = $event"> + </vitamui-select-all-option> <mat-option *ngFor='let contract of accessContracts.get(permission.tenant)' [value]="contract.key"> {{contract.label}} </mat-option> @@ -47,6 +51,10 @@ <mat-select [(value)]="permission.ingestContracts" placeholder="Contrats d'entrée" (selectionChange)="onContractSelect()" i18n-placeholder="Application@@accessContractsFormApplicationPlaceholder" panelclass="vitamui-mat-select" multiple required> + <vitamui-select-all-option [value]="permission.ingestContracts" [values]="getIngestContractKeys(permission.tenant)" + title="Tous les contrats d'entrée" i18n-title="Application@@ingestContractsFormApplicationSelectAll" + (toggleSelection)="permission.ingestContracts = $event"> + </vitamui-select-all-option> <mat-option *ngFor='let contract of ingestContracts.get(permission.tenant)' [value]="contract.key"> {{contract.label}} </mat-option> diff --git a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.component.ts b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.component.ts index df4d310e..8d450b7b 100644 --- a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.component.ts @@ -165,4 +165,13 @@ export class ContextEditPermissionComponent implements ControlValueAccessor, OnI this.disabled = isDisabled; } + getAccessContractKeys(tenant: string): string[] { + const contracts: Option[] = this.accessContracts.get(tenant); + return contracts != null ? contracts.map(item => item.key) : []; + } + + getIngestContractKeys(tenant: string) { + const contracts: Option[] = this.ingestContracts.get(tenant); + return contracts != null ? contracts.map(item => item.key) : []; + } } diff --git a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.module.ts b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.module.ts index 5495209b..d4d17195 100644 --- a/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.module.ts +++ b/ui/ui-frontend/projects/referential/src/app/context/context-create/context-edit-permission/context-edit-permission.module.ts @@ -45,6 +45,7 @@ import {MatSelectModule} from '@angular/material/select'; import {MatSnackBarModule} from '@angular/material/snack-bar'; import {MatTooltipModule} from '@angular/material/tooltip'; +import {VitamUILibraryModule} from 'projects/vitamui-library/src/public-api'; import {VitamUICommonModule} from 'ui-frontend-common'; import {ContextEditPermissionComponent} from './context-edit-permission.component'; @@ -59,7 +60,8 @@ import {ContextEditPermissionComponent} from './context-edit-permission.componen MatSnackBarModule, MatTooltipModule, ReactiveFormsModule, - VitamUICommonModule + VitamUICommonModule, + VitamUILibraryModule, ], declarations: [ ContextEditPermissionComponent diff --git a/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-information-tab/context-information-tab.component.ts b/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-information-tab/context-information-tab.component.ts index 9b0a10f1..12cd2777 100644 --- a/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-information-tab/context-information-tab.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-information-tab/context-information-tab.component.ts @@ -160,6 +160,7 @@ export class ContextInformationTabComponent { } resetForm(context: Context) { + this.statusControl.setValue(context.status === 'ACTIVE'); this.form.reset(context, {emitEvent: false}); } } diff --git a/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-preview.component.ts b/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-preview.component.ts index f330f139..7c800b6b 100644 --- a/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-preview.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-preview.component.ts @@ -34,7 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import {Component, EventEmitter, HostListener, Input, OnInit, Output, ViewChild} from '@angular/core'; +import {AfterViewInit, Component, EventEmitter, HostListener, Input, Output, ViewChild} from '@angular/core'; import {MatDialog} from '@angular/material/dialog'; import {MatTab, MatTabGroup, MatTabHeader} from '@angular/material/tabs'; import {ConfirmActionComponent, Context} from 'projects/vitamui-library/src/public-api'; @@ -49,7 +49,7 @@ import {ContextPermissionTabComponent} from './context-permission-tab/context-pe templateUrl: './context-preview.component.html', styleUrls: ['./context-preview.component.scss'] }) -export class ContextPreviewComponent implements OnInit { +export class ContextPreviewComponent implements AfterViewInit { @Output() previewClose: EventEmitter<any> = new EventEmitter(); @Input() context: Context; @@ -73,10 +73,7 @@ export class ContextPreviewComponent implements OnInit { constructor(private matDialog: MatDialog, private contextService: ContextService) { } - ngOnInit() { - } - - ngAfterViewInit = () => { + ngAfterViewInit() { this.tabs._handleClick = this.interceptTabChange.bind(this); this.tabLinks[0] = this.infoTab; this.tabLinks[1] = this.permsTab; diff --git a/ui/ui-frontend/projects/referential/src/locale/messages.en.xlf b/ui/ui-frontend/projects/referential/src/locale/messages.en.xlf index 33e8d98a..ceef5d97 100644 --- a/ui/ui-frontend/projects/referential/src/locale/messages.en.xlf +++ b/ui/ui-frontend/projects/referential/src/locale/messages.en.xlf @@ -65,13 +65,13 @@ <note priority="1" from="description">Management category</note> - <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">10</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">40</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">40</context></context-group></trans-unit><trans-unit id="PortalSettingsCategory" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">10</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">40</context></context-group></trans-unit><trans-unit id="PortalSettingsCategory" datatype="html"> <source>Paramétrage</source><target state="new"/> <note priority="1" from="description">Settings category</note> - <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">50</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">50</context></context-group></trans-unit><trans-unit id="downloadBarCancelled" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">50</context></context-group></trans-unit><trans-unit id="downloadBarCancelled" datatype="html"> <source> <x id="START_ITALIC_TEXT" ctype="x-i" equiv-text="<i>"/>info<x id="CLOSE_ITALIC_TEXT" ctype="x-i" equiv-text="</i>"/> <x id="START_TAG_SPAN" ctype="x-span" equiv-text="<span>"/>Téléchargement annulé<x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="</span>"/> </source><target state="new"/> @@ -90,7 +90,7 @@ </trans-unit><trans-unit id="closePopupConfirmDialogTitle" datatype="html"> <source>Fermer la fenêtre ?</source><target state="new"/> - <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/confirm-dialog/close-popup-dialog.component.d.ts</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">2</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">9</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">2</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">9</context></context-group></trans-unit><trans-unit id="closePopupConfirmDialogConfirmLabel" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/confirm-dialog/close-popup-dialog.component.d.ts</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">2</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">9</context></context-group></trans-unit><trans-unit id="closePopupConfirmDialogConfirmLabel" datatype="html"> <source>Fermer</source><target state="new"/> <context-group purpose="location"> <context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/confirm-dialog/close-popup-dialog.component.d.ts</context> @@ -311,14 +311,14 @@ </context-group> <note priority="1" from="description">at least one email</note> </trans-unit><trans-unit id="EnabledLabel" datatype="html"> - <source>Yes</source><target state="new"/> + <source>Oui</source><target state="new"/> <context-group purpose="location"> <context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/slide-toggle/slide-toggle.component.d.ts</context> <context context-type="linenumber">15</context> </context-group> <note priority="1" from="description">SlideToggle enabled label </note> </trans-unit><trans-unit id="DisabledLabel" datatype="html"> - <source>No</source><target state="new"/> + <source>Non</source><target state="new"/> <context-group purpose="location"> <context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/slide-toggle/slide-toggle.component.d.ts</context> <context context-type="linenumber">18</context> @@ -788,21 +788,21 @@ <source>Valider</source><target state="new"/> - <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">10</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">10</context></context-group></trans-unit><trans-unit id="confirmActionCancelDialogCancelLabel" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">10</context></context-group></trans-unit><trans-unit id="confirmActionCancelDialogCancelLabel" datatype="html"> <source>Annuler</source><target state="new"/> - <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">4</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">11</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">4</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">11</context></context-group></trans-unit><trans-unit id="PortalReferentialCategory" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">4</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">11</context></context-group></trans-unit><trans-unit id="PortalReferentialCategory" datatype="html"> <source>Référentiels</source><target state="new"/> <note priority="1" from="description">Referential category</note> - <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">10</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">10</context></context-group></trans-unit><trans-unit id="PortalOpauditCategory" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">10</context></context-group></trans-unit><trans-unit id="PortalOpauditCategory" datatype="html"> <source>Audits et opérations</source><target state="new"/> <note priority="1" from="description">operations and audits category</note> - <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">30</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">30</context></context-group></trans-unit><trans-unit id="accessContractPreviewTabInformation" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">30</context></context-group></trans-unit><trans-unit id="accessContractPreviewTabInformation" datatype="html"> <source>Informations</source><target state="new"/> <context-group purpose="location"> <context context-type="sourcefile">src/app/access-contract/access-contract-preview/access-contract-preview.component.html</context> @@ -1776,12 +1776,26 @@ <source>Tenant</source><target state="new"/> <note priority="1" from="description">Application</note> - <context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">19</context></context-group></trans-unit><trans-unit id="accessContractsFormApplicationPlaceholder" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">19</context></context-group></trans-unit><trans-unit id="accessContractsFormApplicationSelectAll" datatype="html"> + <source>Tous les contrats d'accès</source><target state="new"/> + <context-group purpose="location"> + <context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context> + <context context-type="linenumber">37</context> + </context-group> + <note priority="1" from="description">Application</note> + </trans-unit><trans-unit id="accessContractsFormApplicationPlaceholder" datatype="html"> <source>Contrats d'accès</source><target state="new"/> <note priority="1" from="description">Application</note> - <context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">33</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">47</context></context-group></trans-unit><trans-unit id="securityProfilePreviewTabInformation" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">33</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">51</context></context-group></trans-unit><trans-unit id="ingestContractsFormApplicationSelectAll" datatype="html"> + <source>Tous les contrats d'entrée</source><target state="new"/> + <context-group purpose="location"> + <context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context> + <context context-type="linenumber">55</context> + </context-group> + <note priority="1" from="description">Application</note> + </trans-unit><trans-unit id="securityProfilePreviewTabInformation" datatype="html"> <source>Informations</source><target state="new"/> <context-group purpose="location"> <context context-type="sourcefile">src/app/security-profile/security-profile-preview/security-profile-preview.component.html</context> @@ -2058,57 +2072,6 @@ <context context-type="linenumber">66</context> </context-group> <note priority="1" from="description">Clear Response adminDsl button</note> - </trans-unit><trans-unit id="ImportDialogMainTitle" datatype="html"> - <source>Nouveau versement</source><target state="new"/> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">8</context> - </context-group> - <note priority="1" from="description">Import dialog title</note> - </trans-unit><trans-unit id="ImportDialogAgencyTitle" datatype="html"> - <source> - Import d'un référentiel de service agent - </source><target state="new"/> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">11</context> - </context-group> - <note priority="1" from="description">Import dialog title</note> - </trans-unit><trans-unit id="importDialogDragAndDrop" datatype="html"> - <source>Glisser-déposer</source><target state="new"/> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">27</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit><trans-unit id="importDialogOr" datatype="html"> - <source>ou</source><target state="new"/> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">31</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit><trans-unit id="importDialogBrowse" datatype="html"> - <source> cliquer pour Parcourir</source><target state="new"/> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">32</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit><trans-unit id="importFinishButton" datatype="html"> - <source>Terminer</source><target state="new"/> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">50</context> - </context-group> - <note priority="1" from="description">Finish import button</note> - </trans-unit><trans-unit id="importCancelButton" datatype="html"> - <source>Annuler</source><target state="new"/> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">52</context> - </context-group> - <note priority="1" from="description">Cancel import button</note> </trans-unit></body> </file> </xliff> diff --git a/ui/ui-frontend/projects/referential/src/locale/messages.fr.xlf b/ui/ui-frontend/projects/referential/src/locale/messages.fr.xlf index 01acb2f5..303338f8 100644 --- a/ui/ui-frontend/projects/referential/src/locale/messages.fr.xlf +++ b/ui/ui-frontend/projects/referential/src/locale/messages.fr.xlf @@ -69,13 +69,13 @@ <note priority="1" from="description">Management category</note> - <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">10</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">40</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">40</context></context-group></trans-unit><trans-unit id="PortalSettingsCategory" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">10</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">40</context></context-group></trans-unit><trans-unit id="PortalSettingsCategory" datatype="html"> <source>Paramétrage</source><target state="final">Paramétrage</target> <note priority="1" from="description">Settings category</note> - <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">50</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">50</context></context-group></trans-unit><trans-unit id="downloadBarCancelled" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">50</context></context-group></trans-unit><trans-unit id="downloadBarCancelled" datatype="html"> <source> <x id="START_ITALIC_TEXT" ctype="x-i" equiv-text="<i>"/>info<x id="CLOSE_ITALIC_TEXT" ctype="x-i" equiv-text="</i>"/> <x id="START_TAG_SPAN" ctype="x-span" equiv-text="<span>"/>Téléchargement annulé<x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="</span>"/> </source><target state="final"> @@ -98,7 +98,7 @@ </trans-unit><trans-unit id="closePopupConfirmDialogTitle" datatype="html"> <source>Fermer la fenêtre ?</source><target state="final">Fermer la fenêtre ?</target> - <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/confirm-dialog/close-popup-dialog.component.d.ts</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">2</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">9</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">2</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">9</context></context-group></trans-unit><trans-unit id="closePopupConfirmDialogConfirmLabel" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/confirm-dialog/close-popup-dialog.component.d.ts</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">2</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">9</context></context-group></trans-unit><trans-unit id="closePopupConfirmDialogConfirmLabel" datatype="html"> <source>Fermer</source><target state="final">Fermer</target> <context-group purpose="location"> <context context-type="sourcefile">../../node_modules/ui-frontend-common/app/modules/components/confirm-dialog/close-popup-dialog.component.d.ts</context> @@ -878,21 +878,21 @@ <source>Valider</source><target state="final">Valider</target> - <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">10</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">10</context></context-group></trans-unit><trans-unit id="confirmActionCancelDialogCancelLabel" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">3</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">10</context></context-group></trans-unit><trans-unit id="confirmActionCancelDialogCancelLabel" datatype="html"> <source>Annuler</source><target state="final">Annuler</target> - <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">4</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">11</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">4</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context><context context-type="linenumber">11</context></context-group></trans-unit><trans-unit id="PortalReferentialCategory" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">4</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context><context context-type="linenumber">11</context></context-group></trans-unit><trans-unit id="PortalReferentialCategory" datatype="html"> <source>Référentiels</source><target state="final">Référentiels</target> <note priority="1" from="description">Referential category</note> - <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">10</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">10</context></context-group></trans-unit><trans-unit id="PortalOpauditCategory" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">10</context></context-group></trans-unit><trans-unit id="PortalOpauditCategory" datatype="html"> <source>Audits et opérations</source><target state="final">Audits et opérations</target> <note priority="1" from="description">operations and audits category</note> - <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">30</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context><context context-type="linenumber">30</context></context-group></trans-unit><trans-unit id="accessContractPreviewTabInformation" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">20</context></context-group><context-group purpose="location"><context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context><context context-type="linenumber">30</context></context-group></trans-unit><trans-unit id="accessContractPreviewTabInformation" datatype="html"> <source>Informations</source><target state="final">Informations</target> <context-group purpose="location"> <context context-type="sourcefile">src/app/access-contract/access-contract-preview/access-contract-preview.component.html</context> @@ -1922,12 +1922,26 @@ <source>Tenant</source><target state="final">Tenant</target> <note priority="1" from="description">Application</note> - <context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">19</context></context-group></trans-unit><trans-unit id="accessContractsFormApplicationPlaceholder" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">19</context></context-group></trans-unit><trans-unit id="accessContractsFormApplicationSelectAll" datatype="html"> + <source>Tous les contrats d'accès</source><target state="final">Tous les contrats d'accès</target> + <context-group purpose="location"> + <context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context> + <context context-type="linenumber">37</context> + </context-group> + <note priority="1" from="description">Application</note> + </trans-unit><trans-unit id="accessContractsFormApplicationPlaceholder" datatype="html"> <source>Contrats d'accès</source><target state="final">Contrats d'accès</target> <note priority="1" from="description">Application</note> - <context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">33</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">47</context></context-group></trans-unit><trans-unit id="securityProfilePreviewTabInformation" datatype="html"> + <context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">33</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context><context context-type="linenumber">51</context></context-group></trans-unit><trans-unit id="ingestContractsFormApplicationSelectAll" datatype="html"> + <source>Tous les contrats d'entrée</source><target state="final">Tous les contrats d'entrée</target> + <context-group purpose="location"> + <context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context> + <context context-type="linenumber">55</context> + </context-group> + <note priority="1" from="description">Application</note> + </trans-unit><trans-unit id="securityProfilePreviewTabInformation" datatype="html"> <source>Informations</source><target state="final">Informations</target> <context-group purpose="location"> <context context-type="sourcefile">src/app/security-profile/security-profile-preview/security-profile-preview.component.html</context> @@ -2209,59 +2223,6 @@ <context context-type="linenumber">66</context> </context-group> <note priority="1" from="description">Clear Response adminDsl button</note> - </trans-unit><trans-unit id="ImportDialogMainTitle" datatype="html"> - <source>Nouveau versement</source><target state="final">Nouveau versement</target> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">8</context> - </context-group> - <note priority="1" from="description">Import dialog title</note> - </trans-unit><trans-unit id="ImportDialogAgencyTitle" datatype="html"> - <source> - Import d'un référentiel de service agent - </source><target state="final"> - Import d'un référentiel de service agent - </target> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">11</context> - </context-group> - <note priority="1" from="description">Import dialog title</note> - </trans-unit><trans-unit id="importDialogDragAndDrop" datatype="html"> - <source>Glisser-déposer</source><target state="final">Glisser-déposer</target> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">27</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit><trans-unit id="importDialogOr" datatype="html"> - <source>ou</source><target state="final">ou</target> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">31</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit><trans-unit id="importDialogBrowse" datatype="html"> - <source> cliquer pour Parcourir</source><target state="final"> cliquer pour Parcourir</target> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">32</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit><trans-unit id="importFinishButton" datatype="html"> - <source>Terminer</source><target state="final">Terminer</target> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">50</context> - </context-group> - <note priority="1" from="description">Finish import button</note> - </trans-unit><trans-unit id="importCancelButton" datatype="html"> - <source>Annuler</source><target state="final">Annuler</target> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">52</context> - </context-group> - <note priority="1" from="description">Cancel import button</note> </trans-unit></body> </file> </xliff> diff --git a/ui/ui-frontend/projects/referential/src/locale/messages.xlf b/ui/ui-frontend/projects/referential/src/locale/messages.xlf index b19d066e..9c65bfbe 100644 --- a/ui/ui-frontend/projects/referential/src/locale/messages.xlf +++ b/ui/ui-frontend/projects/referential/src/locale/messages.xlf @@ -85,10 +85,6 @@ <context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context> <context context-type="linenumber">40</context> </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context> - <context context-type="linenumber">40</context> - </context-group> <note priority="1" from="description">Management category</note> </trans-unit> <trans-unit id="PortalSettingsCategory" datatype="html"> @@ -101,10 +97,6 @@ <context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context> <context context-type="linenumber">50</context> </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context> - <context context-type="linenumber">50</context> - </context-group> <note priority="1" from="description">Settings category</note> </trans-unit> <trans-unit id="downloadBarCancelled" datatype="html"> @@ -139,14 +131,6 @@ <context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context> <context context-type="linenumber">9</context> </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context> - <context context-type="linenumber">2</context> - </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context> - <context context-type="linenumber">9</context> - </context-group> </trans-unit> <trans-unit id="closePopupConfirmDialogConfirmLabel" datatype="html"> <source>Fermer</source> @@ -1097,14 +1081,6 @@ <context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context> <context context-type="linenumber">10</context> </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context> - <context context-type="linenumber">3</context> - </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context> - <context context-type="linenumber">10</context> - </context-group> </trans-unit> <trans-unit id="confirmActionCancelDialogCancelLabel" datatype="html"> <source>Annuler</source> @@ -1116,14 +1092,6 @@ <context context-type="sourcefile">../vitamui-library/src/lib/components/confirm-action/confirm-action.component.html</context> <context context-type="linenumber">11</context> </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context> - <context context-type="linenumber">4</context> - </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/confirm-action/confirm-action.component.d.ts</context> - <context context-type="linenumber">11</context> - </context-group> </trans-unit> <trans-unit id="PortalReferentialCategory" datatype="html"> <source>Référentiels</source> @@ -1131,10 +1099,6 @@ <context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context> <context context-type="linenumber">10</context> </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context> - <context context-type="linenumber">10</context> - </context-group> <note priority="1" from="description">Referential category</note> </trans-unit> <trans-unit id="PortalOpauditCategory" datatype="html"> @@ -1147,14 +1111,6 @@ <context context-type="sourcefile">../vitamui-library/src/lib/components/application-select-content/application-select-content.component.html</context> <context context-type="linenumber">30</context> </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context> - <context context-type="linenumber">20</context> - </context-group> - <context-group purpose="location"> - <context context-type="sourcefile">../../dist/vitamui-library/lib/components/application-select-content/application-select-content.component.d.ts</context> - <context context-type="linenumber">30</context> - </context-group> <note priority="1" from="description">operations and audits category</note> </trans-unit> <trans-unit id="accessContractPreviewLabelName" datatype="html"> @@ -2606,6 +2562,14 @@ </context-group> <note priority="1" from="description">Application</note> </trans-unit> + <trans-unit id="accessContractsFormApplicationSelectAll" datatype="html"> + <source>Tous les contrats d'accès</source> + <context-group purpose="location"> + <context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context> + <context context-type="linenumber">37</context> + </context-group> + <note priority="1" from="description">Application</note> + </trans-unit> <trans-unit id="accessContractsFormApplicationPlaceholder" datatype="html"> <source>Contrats d'accès</source> <context-group purpose="location"> @@ -2614,7 +2578,15 @@ </context-group> <context-group purpose="location"> <context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context> - <context context-type="linenumber">47</context> + <context context-type="linenumber">51</context> + </context-group> + <note priority="1" from="description">Application</note> + </trans-unit> + <trans-unit id="ingestContractsFormApplicationSelectAll" datatype="html"> + <source>Tous les contrats d'entrée</source> + <context-group purpose="location"> + <context context-type="sourcefile">src/app/context/context-create/context-edit-permission/context-edit-permission.component.html</context> + <context context-type="linenumber">55</context> </context-group> <note priority="1" from="description">Application</note> </trans-unit> @@ -3025,64 +2997,6 @@ </context-group> <note priority="1" from="description">Clear Response adminDsl button</note> </trans-unit> - <trans-unit id="ImportDialogMainTitle" datatype="html"> - <source>Nouveau versement</source> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">8</context> - </context-group> - <note priority="1" from="description">Import dialog title</note> - </trans-unit> - <trans-unit id="ImportDialogAgencyTitle" datatype="html"> - <source> - Import d'un référentiel de service agent - </source> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">11</context> - </context-group> - <note priority="1" from="description">Import dialog title</note> - </trans-unit> - <trans-unit id="importDialogDragAndDrop" datatype="html"> - <source>Glisser-déposer</source> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">27</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit> - <trans-unit id="importDialogOr" datatype="html"> - <source>ou</source> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">31</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit> - <trans-unit id="importDialogBrowse" datatype="html"> - <source> cliquer pour Parcourir</source> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">32</context> - </context-group> - <note priority="1" from="description">Import dialog drag</note> - </trans-unit> - <trans-unit id="importFinishButton" datatype="html"> - <source>Terminer</source> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">50</context> - </context-group> - <note priority="1" from="description">Finish import button</note> - </trans-unit> - <trans-unit id="importCancelButton" datatype="html"> - <source>Annuler</source> - <context-group purpose="location"> - <context context-type="sourcefile">src/app/shared/vitamui-import-dialog/vitamui-import-dialog.component.html</context> - <context context-type="linenumber">52</context> - </context-group> - <note priority="1" from="description">Cancel import button</note> - </trans-unit> </body> </file> </xliff> diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.html b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.html new file mode 100644 index 00000000..361047b0 --- /dev/null +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.html @@ -0,0 +1,14 @@ +<mat-pseudo-checkbox class="mat-option-pseudo-checkbox" + [state]="checkboxState" + [disabled]="disabled" + [ngClass]="selected ? 'bg-accent': ''"> +</mat-pseudo-checkbox> + +<span class="mat-option-text"> + {{title}} +</span> + +<div class="mat-option-ripple" mat-ripple + [matRippleTrigger]="_getHostElement()" + [matRippleDisabled]="disabled || disableRipple"> +</div> diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.scss b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.spec.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.spec.ts new file mode 100644 index 00000000..4a69195c --- /dev/null +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { VitamUISelectAllOptionComponent } from './vitamui-select-all-option.component'; + +describe('VitamuiSelectAllOptionComponent', () => { + let component: VitamUISelectAllOptionComponent; + let fixture: ComponentFixture<VitamUISelectAllOptionComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ VitamUISelectAllOptionComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(VitamUISelectAllOptionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.ts new file mode 100644 index 00000000..1b1107e9 --- /dev/null +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.component.ts @@ -0,0 +1,106 @@ +/* tslint:disable:component-selector */ +import {ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Inject, + Input, OnDestroy, OnInit, Optional, Output} from '@angular/core'; +import {AbstractControl} from '@angular/forms'; +import {MAT_OPTION_PARENT_COMPONENT, MatOptgroup, MatOption, + MatOptionParentComponent, MatPseudoCheckboxState} from '@angular/material/core'; +import {Subject} from 'rxjs'; +import {takeUntil} from 'rxjs/operators'; + +@Component({ + selector: 'vitamui-select-all-option', + templateUrl: './vitamui-select-all-option.component.html', + styleUrls: ['./vitamui-select-all-option.component.scss'] +}) +export class VitamUISelectAllOptionComponent extends MatOption implements OnInit, OnDestroy { + // You need to provide either a control or a model + // If you provide a model, you need to subscribe to the toggleSelectionEvent to update the selection + @Input() control: AbstractControl; + @Input() value: any[]; + + @Input() values: any[] = []; + @Input() title: string; + + protected unsubscribe: Subject<any>; + @Output() toggleSelection: EventEmitter<any[]> = new EventEmitter(); + + @HostBinding('class') cssClass = 'mat-option'; + @HostListener('click') click(): void { + this._selectViaInteraction(); + + if (this.control) { + this.control.setValue(this.selected ? this.values : []); + } else { + this.toggleSelection.emit(!this.selectedAll ? this.values : []); + } + } + + constructor(elementRef: ElementRef<HTMLElement>, + changeDetectorRef: ChangeDetectorRef, + @Optional() @Inject(MAT_OPTION_PARENT_COMPONENT) parent: MatOptionParentComponent, + @Optional() group: MatOptgroup) { + super(elementRef, changeDetectorRef, parent, group); + } + + ngOnInit(): void { + this.refresh(); + + if (this.control) { + this.unsubscribe = new Subject<any>(); + + this.control.valueChanges + .pipe(takeUntil(this.unsubscribe)) + .subscribe(() => { + this.refresh(); + }); + } + } + + ngOnDestroy(): void { + super.ngOnDestroy(); + + if (this.control) { + this.unsubscribe.next(); + this.unsubscribe.complete(); + } + } + + get selectedItemsCount(): number { + if (this.control) { + return Array.isArray(this.control.value) ? this.control.value.filter(el => el !== null).length : 0; + } else { + return this.value ? this.value.filter(el => el !== null).length : 0; + } + + } + + get selectedAll(): boolean { + return this.selectedItemsCount === this.values.length; + } + + get selectedPartially(): boolean { + const selectedItemsCount = this.selectedItemsCount; + return selectedItemsCount > 0 && selectedItemsCount < this.values.length; + } + + get checkboxState(): MatPseudoCheckboxState { + let state: MatPseudoCheckboxState = 'unchecked'; + + if (this.selectedAll) { + state = 'checked'; + } else if (this.selectedPartially) { + state = 'indeterminate'; + } + + return state; + } + + refresh(): void { + if (this.selectedItemsCount > 0) { + this.select(); + } else { + this.deselect(); + } + } +} + diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.module.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.module.ts new file mode 100644 index 00000000..de22f142 --- /dev/null +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/components/vitamui-select-all-option/vitamui-select-all-option.module.ts @@ -0,0 +1,17 @@ +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import {MatPseudoCheckboxModule, MatRippleModule} from '@angular/material'; + +import {VitamUISelectAllOptionComponent} from './vitamui-select-all-option.component'; + +@NgModule({ + imports: [ + CommonModule, + MatPseudoCheckboxModule, + MatRippleModule + ], + declarations: [VitamUISelectAllOptionComponent], + exports: [VitamUISelectAllOptionComponent], +}) +export class VitamUISelectAllOptionModule { +} diff --git a/ui/ui-frontend/projects/vitamui-library/src/lib/vitamui-library.module.ts b/ui/ui-frontend/projects/vitamui-library/src/lib/vitamui-library.module.ts index 3a7e1c9f..ae341bc5 100644 --- a/ui/ui-frontend/projects/vitamui-library/src/lib/vitamui-library.module.ts +++ b/ui/ui-frontend/projects/vitamui-library/src/lib/vitamui-library.module.ts @@ -10,6 +10,7 @@ import {VitamUIInputModule} from './components/vitamui-input/vitamui-input.modul import {UpdatedVitamUIMenuTileModule} from './components/vitamui-menu-tile/vitamui-menu-tile.module'; import {VitamUIRadioGroupModule} from './components/vitamui-radio-group/vitamui-radio-group.module'; import {VitamUIRadioModule} from './components/vitamui-radio/vitamui-radio.module'; +import {VitamUISelectAllOptionModule} from './components/vitamui-select-all-option/vitamui-select-all-option.module'; @NgModule({ declarations: [], @@ -23,7 +24,8 @@ import {VitamUIRadioModule} from './components/vitamui-radio/vitamui-radio.modul UpdatedVitamUIMenuTileModule, VitamUIInputModule, VitamUIRadioGroupModule, - VitamUIRadioModule + VitamUIRadioModule, + VitamUISelectAllOptionModule ], exports: [ CardGroupModule, @@ -35,7 +37,8 @@ import {VitamUIRadioModule} from './components/vitamui-radio/vitamui-radio.modul UpdatedVitamUIMenuTileModule, VitamUIInputModule, VitamUIRadioGroupModule, - VitamUIRadioModule + VitamUIRadioModule, + VitamUISelectAllOptionModule ] }) export class VitamUILibraryModule { -- GitLab