c3-components 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/esm2022/lib/c3-file-displayer/c3-file-display-card/c3-file-display-card.component.mjs +26 -26
  2. package/esm2022/lib/c3-file-displayer/c3-file-display-list/c3-file-display-list.component.mjs +5 -3
  3. package/esm2022/lib/c3-file-viewer/components/public/c3-file-viewer/c3-file-viewer.component.mjs +5 -3
  4. package/esm2022/lib/c3-file-viewer/components/public/c3-file-viewer-dialog/c3-file-viewer-dialog.component.mjs +1 -1
  5. package/esm2022/lib/c3-file-viewer/models/file-viewer.mjs +6 -3
  6. package/esm2022/lib/c3-prevent-event/c3-prevent-click-event.directive.mjs +28 -0
  7. package/esm2022/lib/c3-prevent-event/c3-prevent-keyboard-event.directive.mjs +41 -0
  8. package/esm2022/lib/c3-prevent-event/c3-stop-click-propagation.directive.mjs +20 -0
  9. package/esm2022/lib/c3-prevent-event/index.mjs +4 -0
  10. package/esm2022/public-api.mjs +5 -1
  11. package/fesm2022/c3-components.mjs +121 -32
  12. package/fesm2022/c3-components.mjs.map +1 -1
  13. package/lib/c3-file-displayer/c3-file-display-card/c3-file-display-card.component.d.ts +4 -4
  14. package/lib/c3-file-displayer/c3-file-display-list/c3-file-display-list.component.d.ts +1 -1
  15. package/lib/c3-file-viewer/models/file-viewer.d.ts +1 -0
  16. package/lib/c3-prevent-event/c3-prevent-click-event.directive.d.ts +13 -0
  17. package/lib/c3-prevent-event/c3-prevent-keyboard-event.directive.d.ts +17 -0
  18. package/lib/c3-prevent-event/c3-stop-click-propagation.directive.d.ts +6 -0
  19. package/lib/c3-prevent-event/index.d.ts +3 -0
  20. package/package.json +1 -1
  21. package/public-api.d.ts +4 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TemplateRef, Component, ViewChild, Input, forwardRef, Directive, HostListener, NgModule, Inject, signal, ViewContainerRef, inject, Injector, effect, Injectable, Pipe, EventEmitter, Output, ViewEncapsulation, Optional, input, output, viewChild, computed, HostBinding, model, ElementRef, contentChild, contentChildren } from '@angular/core';
2
+ import { TemplateRef, Component, ViewChild, Input, forwardRef, Directive, HostListener, NgModule, Inject, signal, ViewContainerRef, inject, Injector, effect, Injectable, Pipe, EventEmitter, Output, ViewEncapsulation, Optional, input, output, computed, viewChild, HostBinding, model, ElementRef, contentChild, contentChildren } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2$1 from '@angular/forms';
@@ -8,7 +8,7 @@ import * as i1$1 from '@angular/cdk/overlay';
8
8
  import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
9
9
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
10
10
  import { TemplatePortal } from '@angular/cdk/portal';
11
- import { Subscription, Subject, merge, takeUntil, BehaviorSubject, filter, skip, debounceTime, mergeMap, tap, map } from 'rxjs';
11
+ import { Subscription, Subject, merge, takeUntil, BehaviorSubject, filter, skip, debounceTime, mergeMap, tap, of, map } from 'rxjs';
12
12
  import * as i1$2 from '@angular/material/dialog';
13
13
  import { MAT_DIALOG_DATA, MatDialog, MatDialogModule } from '@angular/material/dialog';
14
14
  import * as i2 from '@angular/material/button';
@@ -849,10 +849,12 @@ class C3FileViewerComponent {
849
849
  });
850
850
  }
851
851
  onMouseOver() {
852
- this.fileViewer.hovered = true;
852
+ if (this.fileViewer)
853
+ this.fileViewer.hovered = true;
853
854
  }
854
855
  onMouseLeave() {
855
- this.fileViewer.hovered = false;
856
+ if (this.fileViewer)
857
+ this.fileViewer.hovered = false;
856
858
  }
857
859
  ngOnChanges(changes) {
858
860
  if (changes['screenHeightOccupied'] && this.fileViewer)
@@ -1002,6 +1004,7 @@ class C3FileViewer {
1002
1004
  this.hovered = false;
1003
1005
  this._files = [];
1004
1006
  this.filesObjectUrl = [];
1007
+ this.locationBlobMap = new Map();
1005
1008
  this.scale = 1;
1006
1009
  this.rotation = 0;
1007
1010
  this.translateX = 0;
@@ -1028,7 +1031,9 @@ class C3FileViewer {
1028
1031
  }
1029
1032
  createObjectURL(file) {
1030
1033
  this.onLoadStart(file);
1031
- return this.getFile(file.location).pipe(map((response) => URL.createObjectURL(response)), tap(() => this.onLoad(file)));
1034
+ return of(file.location).pipe(mergeMap((location) => this.locationBlobMap.has(location)
1035
+ ? of(this.locationBlobMap.get(location))
1036
+ : this.getFile(location).pipe(map((response) => URL.createObjectURL(response)), tap((url) => this.locationBlobMap.set(location, url)))), tap(() => this.onLoad(file)));
1032
1037
  }
1033
1038
  getFile(location) {
1034
1039
  const client = this.config.customClient || this.client;
@@ -1256,30 +1261,30 @@ class C3FileDisplayCardComponent {
1256
1261
  this.deletable = input(false);
1257
1262
  this.size = input('32');
1258
1263
  this.onDelete = output();
1259
- }
1260
- getFileType() {
1261
- const file = this.fileObjectUrl();
1262
- if (file && file.type) {
1263
- if (file.type.startsWith('image'))
1264
- return 'image';
1265
- if (file.type.startsWith('application'))
1266
- return 'application';
1267
- if (file.type.startsWith('video'))
1268
- return 'video';
1269
- }
1270
- return 'unknown';
1271
- }
1272
- getFileObjectUrl() {
1273
- const file = this.fileObjectUrl();
1274
- return file && file.objectUrl ? file.objectUrl : null;
1275
- }
1276
- getFileName() {
1277
- const file = this.fileObjectUrl();
1278
- return file ? this.displayFn()(file) : '';
1279
- }
1280
- getDisplayName() {
1281
- const file = this.fileObjectUrl();
1282
- return file ? this.displayFn()(file) : '';
1264
+ this.getFileType = computed(() => {
1265
+ const file = this.fileObjectUrl();
1266
+ if (file && file.type) {
1267
+ if (file.type.startsWith('image'))
1268
+ return 'image';
1269
+ if (file.type.startsWith('application'))
1270
+ return 'application';
1271
+ if (file.type.startsWith('video'))
1272
+ return 'video';
1273
+ }
1274
+ return 'unknown';
1275
+ });
1276
+ this.getFileObjectUrl = computed(() => {
1277
+ const file = this.fileObjectUrl();
1278
+ return file && file.objectUrl ? file.objectUrl : null;
1279
+ });
1280
+ this.getFileName = computed(() => {
1281
+ const file = this.fileObjectUrl();
1282
+ return file ? this.displayFn()(file) : '';
1283
+ });
1284
+ this.getDisplayName = computed(() => {
1285
+ const file = this.fileObjectUrl();
1286
+ return file ? this.displayFn()(file) : '';
1287
+ });
1283
1288
  }
1284
1289
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3FileDisplayCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1285
1290
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: C3FileDisplayCardComponent, isStandalone: true, selector: "c3-file-display-card", inputs: { fileObjectUrl: { classPropertyName: "fileObjectUrl", publicName: "fileObjectUrl", isSignal: true, isRequired: true, transformFunction: null }, displayFn: { classPropertyName: "displayFn", publicName: "displayFn", isSignal: true, isRequired: false, transformFunction: null }, deletable: { classPropertyName: "deletable", publicName: "deletable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDelete: "onDelete" }, ngImport: i0, template: "<button\n class=\"file-card border\"\n [class.size-16]=\"size() === '16'\"\n [class.size-32]=\"size() === '32'\"\n [class.size-64]=\"size() === '64'\"\n [class.size-128]=\"size() === '128'\"\n [class.size-256]=\"size() === '256'\"\n>\n @if(deletable()) {\n <div class=\"actions\">\n <button mat-icon-button color=\"red\" (click)=\"onDelete.emit()\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n } @if(fileObjectUrl()) {\n @switch (getFileType()) { @case ('image') {\n <img\n class=\"h-full w-full object-cover\"\n [src]=\"(getFileObjectUrl() | async) || '/default-image.svg'\"\n [alt]=\"getFileName()\"\n />\n } @case ('application') {\n <mat-icon> file-pdf-box </mat-icon>\n } @case ('video') {\n <mat-icon> video </mat-icon>\n }\n }\n\n <div class=\"informations flex justify-between items-center\">\n <span class=\"text-xs text-white\">\n {{ getDisplayName() }}\n </span>\n </div>\n }\n</button>\n", styles: [":host{display:block;width:fit-content}:host .file-card{position:relative;border-radius:4px;border:1px solid #e0e0e0;overflow:hidden}:host .file-card .actions{position:absolute;top:-21px;right:-21px;z-index:1;display:none}:host .file-card img{border-radius:4px}:host .file-card:hover .actions{display:block}:host .file-card .informations{position:absolute;bottom:0;left:0;z-index:1;width:100%;background:#00000080;padding:0 4px}:host .size-16{height:4rem;width:4rem}:host .size-32{height:8rem;width:8rem}:host .size-64{height:16rem;width:16rem}:host .size-128{height:32rem;width:32rem}:host .size-256{height:64rem;width:64rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
@@ -1376,6 +1381,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
1376
1381
  args: [{ selector: 'c3-file-display-icon', standalone: true, imports: [CommonModule, MatIconModule], template: "<mat-icon [ngClass]=\"color()\">{{ displayedIcon() }}</mat-icon>\n", styles: [":host{display:block}:host .text-primary{color:var(--primary-color)}:host .text-secondary{color:var(--secondary-color)}:host .text-success{color:var(--success-color)}:host .text-gray{color:var(--gray-color)}\n"] }]
1377
1382
  }] });
1378
1383
 
1384
+ /**
1385
+ * A directive that prevents the default action and stops event propagation on click events.
1386
+ */
1387
+ class C3PreventClickDirective {
1388
+ /**
1389
+ * HostListener for the 'click' event.
1390
+ * @param {MouseEvent} event - The MouseEvent object representing the click event.
1391
+ */
1392
+ onClick(event) {
1393
+ event.preventDefault();
1394
+ event.stopPropagation();
1395
+ }
1396
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3PreventClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1397
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: C3PreventClickDirective, isStandalone: true, selector: "[c3-prevent-click]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 }); }
1398
+ }
1399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3PreventClickDirective, decorators: [{
1400
+ type: Directive,
1401
+ args: [{
1402
+ selector: '[c3-prevent-click]',
1403
+ standalone: true,
1404
+ }]
1405
+ }], propDecorators: { onClick: [{
1406
+ type: HostListener,
1407
+ args: ['click', ['$event']]
1408
+ }] } });
1409
+
1410
+ /**
1411
+ * A directive that prevents the default action and stops event propagation on specified keyboard events.
1412
+ */
1413
+ class C3PreventKeyboardEventDirective {
1414
+ constructor() {
1415
+ /**
1416
+ * The keyboard key to prevent the default action and stop event propagation for. Defaults to 'enter'.
1417
+ */
1418
+ this.key = 'enter';
1419
+ }
1420
+ /**
1421
+ * HostListener for the 'keydown' event.
1422
+ * @param {KeyboardEvent} event - The KeyboardEvent object representing the keydown event.
1423
+ */
1424
+ onKeyDown(event) {
1425
+ // Check if the key pressed matches the input key.
1426
+ if (event.key?.toLocaleLowerCase() === this.key.toLocaleLowerCase()) {
1427
+ // Prevent the default action associated with the event.
1428
+ event.preventDefault();
1429
+ // Stop the event from bubbling up the event chain.
1430
+ event.stopPropagation();
1431
+ }
1432
+ }
1433
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3PreventKeyboardEventDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1434
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: C3PreventKeyboardEventDirective, isStandalone: true, selector: "[c3-prevent-keyboard-event]", inputs: { key: "key" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 }); }
1435
+ }
1436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3PreventKeyboardEventDirective, decorators: [{
1437
+ type: Directive,
1438
+ args: [{
1439
+ selector: '[c3-prevent-keyboard-event]',
1440
+ standalone: true,
1441
+ }]
1442
+ }], propDecorators: { key: [{
1443
+ type: Input
1444
+ }], onKeyDown: [{
1445
+ type: HostListener,
1446
+ args: ['keydown', ['$event']]
1447
+ }] } });
1448
+
1449
+ class C3StopPropagationDirective {
1450
+ onClick(event) {
1451
+ event.stopImmediatePropagation();
1452
+ }
1453
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1454
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: C3StopPropagationDirective, isStandalone: true, selector: "[c3-stop-click-propagation]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 }); }
1455
+ }
1456
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3StopPropagationDirective, decorators: [{
1457
+ type: Directive,
1458
+ args: [{
1459
+ selector: '[c3-stop-click-propagation]',
1460
+ standalone: true,
1461
+ }]
1462
+ }], propDecorators: { onClick: [{
1463
+ type: HostListener,
1464
+ args: ['click', ['$event']]
1465
+ }] } });
1466
+
1379
1467
  class C3FileDisplayListComponent {
1380
1468
  constructor() {
1381
1469
  this.files = input.required();
@@ -1405,11 +1493,12 @@ class C3FileDisplayListComponent {
1405
1493
  this.dialog()?.openDialog();
1406
1494
  }
1407
1495
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3FileDisplayListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1408
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: C3FileDisplayListComponent, isStandalone: true, selector: "c3-file-display-list", inputs: { files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, displayFn: { classPropertyName: "displayFn", publicName: "displayFn", isSignal: true, isRequired: false, transformFunction: null }, deletable: { classPropertyName: "deletable", publicName: "deletable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDelete: "onDelete" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: C3FileViewerDialogComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- header -->\n<div class=\"header\">\n <div class=\"title full\">\n <span>Nom</span>\n </div>\n <div class=\"title\">\n <span>Date d'ajout</span>\n </div>\n <div class=\"icon\">\n <mat-icon>more_vert</mat-icon>\n </div>\n</div>\n<c3-file-viewer-dialog [fileViewer]=\"fileViewer\">\n <div class=\"file-display-list\">\n @for (file of files(); track $index) {\n <button>\n <div class=\"icon\">\n <c3-file-display-icon [fileType]=\"file.type\" />\n </div>\n <div class=\"name\">\n <span>{{ displayFn()(file) }}</span>\n </div>\n <div class=\"date-label\">\n <span>{{\n file.lastModified ? (file.lastModified | date : \"medium\") : \"-\"\n }}</span>\n </div>\n <button mat-icon-button>\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"openDialog($event, $index)\">\n Ouvrir\n </button>\n @if (deletable()) {\n <button mat-menu-item (click)=\"onDelete.emit(file)\">Supprimer</button>\n }\n </mat-menu>\n </button>\n }\n </div>\n</c3-file-viewer-dialog>\n", styles: [":host{display:flex;flex-direction:column;margin:.5rem}:host .header{display:flex;align-items:center;padding:0 .5rem;border-bottom:1px solid var(--mat-divider-color)}:host .header .title{flex-basis:304px;width:304px;font-size:1.5rem;font-weight:700}:host .header .title.full{flex:auto}:host .header .icon{flex-basis:40px;width:40px}:host .file-display-list{display:flex;flex-direction:column}:host .file-display-list>button{display:flex;flex-direction:row;height:3rem;align-items:center;border-bottom:1px solid var(--mat-divider-color);background-color:var(--mdc-protected-button-container-color);text-align:start;padding:0 .5rem}:host .file-display-list>button:hover{background-color:var(--background-hover)}:host .file-display-list>button .icon{flex-basis:56px;width:56px}:host .file-display-list>button .name{flex:auto;flex-basis:304px;width:304px}:host .file-display-list>button .date-label{flex-basis:304px;width:304px}\n"], dependencies: [{ kind: "ngmodule", type: C3FileViewerModule }, { kind: "component", type: C3FileViewerDialogComponent, selector: "c3-file-viewer-dialog", inputs: ["fileViewer", "dialogConfig"] }, { kind: "component", type: C3FileDisplayIconComponent, selector: "c3-file-display-icon", inputs: ["fileType"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }] }); }
1496
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: C3FileDisplayListComponent, isStandalone: true, selector: "c3-file-display-list", inputs: { files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, displayFn: { classPropertyName: "displayFn", publicName: "displayFn", isSignal: true, isRequired: false, transformFunction: null }, deletable: { classPropertyName: "deletable", publicName: "deletable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDelete: "onDelete" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: C3FileViewerDialogComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- header -->\n<div class=\"header\">\n <div class=\"title full\">\n <span>Nom</span>\n </div>\n <div class=\"title\">\n <span>Date d'ajout</span>\n </div>\n <div class=\"actions\">\n <ng-content></ng-content>\n </div>\n</div>\n<c3-file-viewer-dialog [fileViewer]=\"fileViewer\">\n <div class=\"file-display-list\">\n @for (file of files(); track $index) {\n <button>\n <div class=\"icon\">\n <c3-file-display-icon [fileType]=\"file.type\" />\n </div>\n <div class=\"name\">\n <span>{{ displayFn()(file) }}</span>\n </div>\n <div class=\"date-label\">\n <span>{{\n file.lastModified ? (file.lastModified | date : \"medium\") : \"-\"\n }}</span>\n </div>\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" c3-stop-click-propagation>\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"openDialog($event, $index)\">\n Ouvrir\n </button>\n @if (deletable()) {\n <button mat-menu-item (click)=\"onDelete.emit(file)\">Supprimer</button>\n }\n </mat-menu>\n </button>\n }\n </div>\n</c3-file-viewer-dialog>\n", styles: [":host{display:flex;flex-direction:column;margin:.5rem}:host .header{display:flex;align-items:center;padding:0 .5rem;border-bottom:1px solid var(--mat-divider-color)}:host .header .title{flex-basis:304px;width:304px;font-size:1.5rem;font-weight:700}:host .header .title.full{flex:auto}:host .header .icon{flex-basis:40px;width:40px}:host .file-display-list{display:flex;flex-direction:column}:host .file-display-list>button{display:flex;flex-direction:row;height:3rem;align-items:center;border-bottom:1px solid var(--mat-divider-color);background-color:var(--mdc-protected-button-container-color);text-align:start;padding:0 .5rem}:host .file-display-list>button:hover{background-color:var(--background-hover)}:host .file-display-list>button .icon{flex-basis:56px;width:56px}:host .file-display-list>button .name{flex:auto;flex-basis:304px;width:304px}:host .file-display-list>button .date-label{flex-basis:304px;width:304px}\n"], dependencies: [{ kind: "directive", type: C3StopPropagationDirective, selector: "[c3-stop-click-propagation]" }, { kind: "ngmodule", type: C3FileViewerModule }, { kind: "component", type: C3FileViewerDialogComponent, selector: "c3-file-viewer-dialog", inputs: ["fileViewer", "dialogConfig"] }, { kind: "component", type: C3FileDisplayIconComponent, selector: "c3-file-display-icon", inputs: ["fileType"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] }); }
1409
1497
  }
1410
1498
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: C3FileDisplayListComponent, decorators: [{
1411
1499
  type: Component,
1412
1500
  args: [{ selector: 'c3-file-display-list', standalone: true, imports: [
1501
+ C3StopPropagationDirective,
1413
1502
  C3FileViewerModule,
1414
1503
  C3FileDisplayIconComponent,
1415
1504
  CommonModule,
@@ -1417,7 +1506,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
1417
1506
  MatIconModule,
1418
1507
  MatNativeDateModule,
1419
1508
  MatMenuModule,
1420
- ], template: "<!-- header -->\n<div class=\"header\">\n <div class=\"title full\">\n <span>Nom</span>\n </div>\n <div class=\"title\">\n <span>Date d'ajout</span>\n </div>\n <div class=\"icon\">\n <mat-icon>more_vert</mat-icon>\n </div>\n</div>\n<c3-file-viewer-dialog [fileViewer]=\"fileViewer\">\n <div class=\"file-display-list\">\n @for (file of files(); track $index) {\n <button>\n <div class=\"icon\">\n <c3-file-display-icon [fileType]=\"file.type\" />\n </div>\n <div class=\"name\">\n <span>{{ displayFn()(file) }}</span>\n </div>\n <div class=\"date-label\">\n <span>{{\n file.lastModified ? (file.lastModified | date : \"medium\") : \"-\"\n }}</span>\n </div>\n <button mat-icon-button>\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"openDialog($event, $index)\">\n Ouvrir\n </button>\n @if (deletable()) {\n <button mat-menu-item (click)=\"onDelete.emit(file)\">Supprimer</button>\n }\n </mat-menu>\n </button>\n }\n </div>\n</c3-file-viewer-dialog>\n", styles: [":host{display:flex;flex-direction:column;margin:.5rem}:host .header{display:flex;align-items:center;padding:0 .5rem;border-bottom:1px solid var(--mat-divider-color)}:host .header .title{flex-basis:304px;width:304px;font-size:1.5rem;font-weight:700}:host .header .title.full{flex:auto}:host .header .icon{flex-basis:40px;width:40px}:host .file-display-list{display:flex;flex-direction:column}:host .file-display-list>button{display:flex;flex-direction:row;height:3rem;align-items:center;border-bottom:1px solid var(--mat-divider-color);background-color:var(--mdc-protected-button-container-color);text-align:start;padding:0 .5rem}:host .file-display-list>button:hover{background-color:var(--background-hover)}:host .file-display-list>button .icon{flex-basis:56px;width:56px}:host .file-display-list>button .name{flex:auto;flex-basis:304px;width:304px}:host .file-display-list>button .date-label{flex-basis:304px;width:304px}\n"] }]
1509
+ ], template: "<!-- header -->\n<div class=\"header\">\n <div class=\"title full\">\n <span>Nom</span>\n </div>\n <div class=\"title\">\n <span>Date d'ajout</span>\n </div>\n <div class=\"actions\">\n <ng-content></ng-content>\n </div>\n</div>\n<c3-file-viewer-dialog [fileViewer]=\"fileViewer\">\n <div class=\"file-display-list\">\n @for (file of files(); track $index) {\n <button>\n <div class=\"icon\">\n <c3-file-display-icon [fileType]=\"file.type\" />\n </div>\n <div class=\"name\">\n <span>{{ displayFn()(file) }}</span>\n </div>\n <div class=\"date-label\">\n <span>{{\n file.lastModified ? (file.lastModified | date : \"medium\") : \"-\"\n }}</span>\n </div>\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" c3-stop-click-propagation>\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"openDialog($event, $index)\">\n Ouvrir\n </button>\n @if (deletable()) {\n <button mat-menu-item (click)=\"onDelete.emit(file)\">Supprimer</button>\n }\n </mat-menu>\n </button>\n }\n </div>\n</c3-file-viewer-dialog>\n", styles: [":host{display:flex;flex-direction:column;margin:.5rem}:host .header{display:flex;align-items:center;padding:0 .5rem;border-bottom:1px solid var(--mat-divider-color)}:host .header .title{flex-basis:304px;width:304px;font-size:1.5rem;font-weight:700}:host .header .title.full{flex:auto}:host .header .icon{flex-basis:40px;width:40px}:host .file-display-list{display:flex;flex-direction:column}:host .file-display-list>button{display:flex;flex-direction:row;height:3rem;align-items:center;border-bottom:1px solid var(--mat-divider-color);background-color:var(--mdc-protected-button-container-color);text-align:start;padding:0 .5rem}:host .file-display-list>button:hover{background-color:var(--background-hover)}:host .file-display-list>button .icon{flex-basis:56px;width:56px}:host .file-display-list>button .name{flex:auto;flex-basis:304px;width:304px}:host .file-display-list>button .date-label{flex-basis:304px;width:304px}\n"] }]
1421
1510
  }], ctorParameters: () => [] });
1422
1511
 
1423
1512
  class C3FileDisplayerModule {
@@ -1859,5 +1948,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
1859
1948
  * Generated bundle index. Do not edit.
1860
1949
  */
1861
1950
 
1862
- export { C3AutoAnimateDirective, C3DialogEmbedChildComponent, C3DialogModule, C3DialogService, C3DropdownComponent, C3DropdownModule, C3DropdownTrigger, C3ExpansionComponent, C3ExpansionHeaderComponent, C3ExpansionModule, C3FileDisplayCardComponent, C3FileDisplayGridComponent, C3FileDisplayIconComponent, C3FileDisplayListComponent, C3FileDisplayerModule, C3FileViewer, C3FileViewerComponent, C3FileViewerDialog, C3FileViewerDialogComponent, C3FileViewerModule, C3FlowingMenuComponent, C3FlowingMenuItemComponent, C3FlowingMenuItemContentComponent, C3FlowingMenuModule, C3PromptDialogComponent, C3SafeUrlPipe, C3SelectOnFocusDirective, C3TraceCardAlignLeftDirective, C3TraceCardAlignRightDirective, C3TraceCardComponent, C3TraceCardContentComponent, C3TraceCardModule, C3TraceCardTitleComponent, C3TreeComponent, ConfirmDialogComponent, CustomFileEvent, FullScreenDirective, MAT_DROPDOWN_VALUE_ACCESSOR, booleanSignal };
1951
+ export { C3AutoAnimateDirective, C3DialogEmbedChildComponent, C3DialogModule, C3DialogService, C3DropdownComponent, C3DropdownModule, C3DropdownTrigger, C3ExpansionComponent, C3ExpansionHeaderComponent, C3ExpansionModule, C3FileDisplayCardComponent, C3FileDisplayGridComponent, C3FileDisplayIconComponent, C3FileDisplayListComponent, C3FileDisplayerModule, C3FileViewer, C3FileViewerComponent, C3FileViewerDialog, C3FileViewerDialogComponent, C3FileViewerModule, C3FlowingMenuComponent, C3FlowingMenuItemComponent, C3FlowingMenuItemContentComponent, C3FlowingMenuModule, C3PreventClickDirective, C3PreventKeyboardEventDirective, C3PromptDialogComponent, C3SafeUrlPipe, C3SelectOnFocusDirective, C3StopPropagationDirective, C3TraceCardAlignLeftDirective, C3TraceCardAlignRightDirective, C3TraceCardComponent, C3TraceCardContentComponent, C3TraceCardModule, C3TraceCardTitleComponent, C3TreeComponent, ConfirmDialogComponent, CustomFileEvent, FullScreenDirective, MAT_DROPDOWN_VALUE_ACCESSOR, booleanSignal };
1863
1952
  //# sourceMappingURL=c3-components.mjs.map