@eherve/angular-material-datatable 19.0.6 → 19.0.8
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.
- package/fesm2022/eherve-angular-material-datatable-cell-number-value.component-dz3XviiN.mjs +25 -0
- package/fesm2022/eherve-angular-material-datatable-cell-number-value.component-dz3XviiN.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-cell-select-value.component-DZct44PZ.mjs → eherve-angular-material-datatable-cell-select-value.component-D4VrsZhO.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-select-value.component-DZct44PZ.mjs.map → eherve-angular-material-datatable-cell-select-value.component-D4VrsZhO.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-eherve-angular-material-datatable-DbSmJKGx.mjs → eherve-angular-material-datatable-eherve-angular-material-datatable-Cg0TK8KO.mjs} +63 -45
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-Cg0TK8KO.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable-find-cell-content.pipe-On98SQ1u.mjs +18 -0
- package/fesm2022/eherve-angular-material-datatable-find-cell-content.pipe-On98SQ1u.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable.mjs +1 -1
- package/lib/components/cell-number-value/cell-number-value.component.d.ts +8 -0
- package/lib/components/header-date-filter/header-date-filter.component.d.ts +5 -3
- package/lib/datatable.component.d.ts +3 -3
- package/lib/datatable.module.d.ts +1 -1
- package/lib/directives/datatable-cell.directive.d.ts +4 -4
- package/lib/pipes/find-cell-content.pipe.d.ts +5 -6
- package/lib/types/datatable-column.type.d.ts +5 -3
- package/package.json +1 -1
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-DbSmJKGx.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-find-cell-content.pipe-Cco9XewC.mjs +0 -18
- package/fesm2022/eherve-angular-material-datatable-find-cell-content.pipe-Cco9XewC.mjs.map +0 -1
|
@@ -277,7 +277,7 @@ class OperatorSelectComponent {
|
|
|
277
277
|
multi: true,
|
|
278
278
|
useExisting: forwardRef(() => OperatorSelectComponent),
|
|
279
279
|
},
|
|
280
|
-
], ngImport: i0, template: "<!-- @format -->\n\n@if (control) {\n <button\n mat-mini-fab\n color=\"primary\"\n class=\"operator-button\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"$event.stopPropagation(); isOpen = !isOpen\">\n {{ control.value }}\n </button>\n\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"isOpen\">\n <div class=\"operator-column\" @fade>\n @for (operator of operators; track operator) {\n @if (operator !== control.value) {\n <button\n mat-mini-fab\n color=\"primary\"\n class=\"operator-button\"\n (click)=\"control.setValue(operator); isOpen = !isOpen\">\n {{ operator }}\n </button>\n }\n }\n </div>\n </ng-template>\n}\n", styles: [".operator-button{--mdc-fab-small-container-elevation-shadow: none;--mdc-fab-small-hover-container-elevation-shadow: none;--mdc-fab-small-focus-container-elevation-shadow: none;--mdc-fab-small-container-shape: 50%;--mdc-fab-small-container-color: var(--mat-sys-primary);--mat-fab-small-foreground-color: var(--mat-sys-on-primary);font-size:16px;width:26px;height:26px;padding:6px}.operator-button ::ng-deep .mat-mdc-button-touch-target{height:36px;width:36px}.operator-column{display:flex;box-sizing:border-box;flex-direction:column}.operator-column .operator-button{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }], animations: [
|
|
280
|
+
], ngImport: i0, template: "<!-- @format -->\n\n@if (control) {\n <button\n mat-mini-fab\n color=\"primary\"\n class=\"ngx-mat-datatable-operator-button\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"$event.stopPropagation(); isOpen = !isOpen\">\n {{ control.value }}\n </button>\n\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"isOpen\">\n <div class=\"ngx-mat-datatable-operator-column\" @fade>\n @for (operator of operators; track operator) {\n @if (operator !== control.value) {\n <button\n mat-mini-fab\n color=\"primary\"\n class=\"ngx-mat-datatable-operator-button\"\n (click)=\"control.setValue(operator); isOpen = !isOpen\">\n {{ operator }}\n </button>\n }\n }\n </div>\n </ng-template>\n}\n", styles: [".ngx-mat-datatable-operator-button{--mdc-fab-small-container-elevation-shadow: none;--mdc-fab-small-hover-container-elevation-shadow: none;--mdc-fab-small-focus-container-elevation-shadow: none;--mdc-fab-small-container-shape: 50%;--mdc-fab-small-container-color: var(--mat-sys-primary);--mat-fab-small-foreground-color: var(--mat-sys-on-primary);font-size:16px;width:26px;height:26px;padding:6px}.ngx-mat-datatable-operator-button ::ng-deep .mat-mdc-button-touch-target{height:36px;width:36px}.ngx-mat-datatable-operator-column{display:flex;box-sizing:border-box;flex-direction:column}.ngx-mat-datatable-operator-column .ngx-mat-datatable-operator-button{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }], animations: [
|
|
281
281
|
trigger('fade', [
|
|
282
282
|
transition(':enter', [
|
|
283
283
|
style({ opacity: 0 }), // initial
|
|
@@ -309,7 +309,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
309
309
|
multi: true,
|
|
310
310
|
useExisting: forwardRef(() => OperatorSelectComponent),
|
|
311
311
|
},
|
|
312
|
-
], template: "<!-- @format -->\n\n@if (control) {\n <button\n mat-mini-fab\n color=\"primary\"\n class=\"operator-button\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"$event.stopPropagation(); isOpen = !isOpen\">\n {{ control.value }}\n </button>\n\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"isOpen\">\n <div class=\"operator-column\" @fade>\n @for (operator of operators; track operator) {\n @if (operator !== control.value) {\n <button\n mat-mini-fab\n color=\"primary\"\n class=\"operator-button\"\n (click)=\"control.setValue(operator); isOpen = !isOpen\">\n {{ operator }}\n </button>\n }\n }\n </div>\n </ng-template>\n}\n", styles: [".operator-button{--mdc-fab-small-container-elevation-shadow: none;--mdc-fab-small-hover-container-elevation-shadow: none;--mdc-fab-small-focus-container-elevation-shadow: none;--mdc-fab-small-container-shape: 50%;--mdc-fab-small-container-color: var(--mat-sys-primary);--mat-fab-small-foreground-color: var(--mat-sys-on-primary);font-size:16px;width:26px;height:26px;padding:6px}.operator-button ::ng-deep .mat-mdc-button-touch-target{height:36px;width:36px}.operator-column{display:flex;box-sizing:border-box;flex-direction:column}.operator-column .operator-button{margin-top:8px}\n"] }]
|
|
312
|
+
], template: "<!-- @format -->\n\n@if (control) {\n <button\n mat-mini-fab\n color=\"primary\"\n class=\"ngx-mat-datatable-operator-button\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"$event.stopPropagation(); isOpen = !isOpen\">\n {{ control.value }}\n </button>\n\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"isOpen\">\n <div class=\"ngx-mat-datatable-operator-column\" @fade>\n @for (operator of operators; track operator) {\n @if (operator !== control.value) {\n <button\n mat-mini-fab\n color=\"primary\"\n class=\"ngx-mat-datatable-operator-button\"\n (click)=\"control.setValue(operator); isOpen = !isOpen\">\n {{ operator }}\n </button>\n }\n }\n </div>\n </ng-template>\n}\n", styles: [".ngx-mat-datatable-operator-button{--mdc-fab-small-container-elevation-shadow: none;--mdc-fab-small-hover-container-elevation-shadow: none;--mdc-fab-small-focus-container-elevation-shadow: none;--mdc-fab-small-container-shape: 50%;--mdc-fab-small-container-color: var(--mat-sys-primary);--mat-fab-small-foreground-color: var(--mat-sys-on-primary);font-size:16px;width:26px;height:26px;padding:6px}.ngx-mat-datatable-operator-button ::ng-deep .mat-mdc-button-touch-target{height:36px;width:36px}.ngx-mat-datatable-operator-column{display:flex;box-sizing:border-box;flex-direction:column}.ngx-mat-datatable-operator-column .ngx-mat-datatable-operator-button{margin-top:8px}\n"] }]
|
|
313
313
|
}], propDecorators: { setDisableRange: [{
|
|
314
314
|
type: Input,
|
|
315
315
|
args: ['disableRange']
|
|
@@ -321,8 +321,8 @@ class HeaderDateFilterComponent {
|
|
|
321
321
|
control;
|
|
322
322
|
selectControl = new FormControl(undefined);
|
|
323
323
|
rangeGroup = new FormGroup({
|
|
324
|
-
|
|
325
|
-
|
|
324
|
+
from: new FormControl(undefined, Validators.required),
|
|
325
|
+
to: new FormControl(undefined, Validators.required),
|
|
326
326
|
});
|
|
327
327
|
operatorControl = new FormControl('=');
|
|
328
328
|
onChange = () => { };
|
|
@@ -334,8 +334,12 @@ class HeaderDateFilterComponent {
|
|
|
334
334
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
335
335
|
subsink = new Subscription();
|
|
336
336
|
writeValue = (value) => {
|
|
337
|
-
if (value?.value !== this.
|
|
338
|
-
|
|
337
|
+
// if (value?.operator && this.operatorControl.value !== value.operator) this.operatorControl.setValue(value.operator);
|
|
338
|
+
// if (['<>', '≤≥'].includes(this.operatorControl.value!)) {
|
|
339
|
+
// if (value?.value?.from !== this.rangeGroup.value.from && value?.value?.to !== this.rangeGroup.value.to) {
|
|
340
|
+
// this.rangeGroup.setValue({ from: value.value.from, to: value.value.to });
|
|
341
|
+
// }
|
|
342
|
+
// } else if (value?.value !== this.selectControl.value) this.selectControl.setValue(value?.value);
|
|
339
343
|
};
|
|
340
344
|
registerOnChange(onChange) {
|
|
341
345
|
this.onChange = onChange;
|
|
@@ -361,34 +365,26 @@ class HeaderDateFilterComponent {
|
|
|
361
365
|
else if (!value)
|
|
362
366
|
this.control.setValue(undefined);
|
|
363
367
|
else
|
|
364
|
-
this.control.setValue(
|
|
368
|
+
this.control.setValue(this.buildValue(this.operatorControl.value, value));
|
|
365
369
|
}));
|
|
366
370
|
this.subsink.add(this.rangeGroup.valueChanges.pipe(debounceTime(500)).subscribe(value => {
|
|
367
371
|
if (this.rangeGroup.invalid)
|
|
368
372
|
return;
|
|
369
|
-
|
|
373
|
+
if (!value)
|
|
370
374
|
this.control.setValue(undefined);
|
|
371
375
|
else
|
|
372
|
-
this.control.setValue(
|
|
373
|
-
value: [value.start, value.end],
|
|
374
|
-
regex: false,
|
|
375
|
-
operator: this.operatorControl.value,
|
|
376
|
-
});
|
|
376
|
+
this.control.setValue(this.buildValue(this.operatorControl.value, value));
|
|
377
377
|
}));
|
|
378
378
|
this.subsink.add(this.operatorControl.valueChanges.subscribe((value) => {
|
|
379
|
-
if (['<>', '≤≥'].includes(
|
|
379
|
+
if (['<>', '≤≥'].includes(value)) {
|
|
380
380
|
if (!this.rangeGroup.value || this.rangeGroup.invalid)
|
|
381
381
|
return;
|
|
382
|
-
this.control.setValue(
|
|
383
|
-
value: [this.rangeGroup.value.start, this.rangeGroup.value.end],
|
|
384
|
-
regex: false,
|
|
385
|
-
operator: value,
|
|
386
|
-
});
|
|
382
|
+
this.control.setValue(this.buildValue(value, this.rangeGroup.value));
|
|
387
383
|
}
|
|
388
384
|
else {
|
|
389
385
|
if (!this.selectControl.value)
|
|
390
386
|
return;
|
|
391
|
-
this.control.setValue(
|
|
387
|
+
this.control.setValue(this.buildValue(value, this.selectControl.value));
|
|
392
388
|
}
|
|
393
389
|
}));
|
|
394
390
|
this.changeDetectorRef.detectChanges();
|
|
@@ -396,6 +392,27 @@ class HeaderDateFilterComponent {
|
|
|
396
392
|
ngOnDestroy() {
|
|
397
393
|
this.subsink.unsubscribe();
|
|
398
394
|
}
|
|
395
|
+
buildValue(operator, value) {
|
|
396
|
+
switch (operator) {
|
|
397
|
+
case '=':
|
|
398
|
+
return {
|
|
399
|
+
operator: '≤≥',
|
|
400
|
+
value: { from: moment(value).startOf('day'), to: moment(value).endOf('day') },
|
|
401
|
+
};
|
|
402
|
+
case '>':
|
|
403
|
+
return { operator, value: moment(value).endOf('day') };
|
|
404
|
+
case '≥':
|
|
405
|
+
return { operator, value: moment(value).startOf('day') };
|
|
406
|
+
case '<':
|
|
407
|
+
return { operator, value: moment(value).startOf('day') };
|
|
408
|
+
case '≤':
|
|
409
|
+
return { operator, value: moment(value).endOf('day') };
|
|
410
|
+
case '<>':
|
|
411
|
+
return { operator, value: { from: moment(value.from).endOf('day'), to: moment(value.to).startOf('day') } };
|
|
412
|
+
case '≤≥':
|
|
413
|
+
return { operator, value: { from: moment(value.from).startOf('day'), to: moment(value.to).endOf('day') } };
|
|
414
|
+
}
|
|
415
|
+
}
|
|
399
416
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: HeaderDateFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
400
417
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: HeaderDateFilterComponent, isStandalone: true, selector: "lib-header-date-filter", inputs: { column: "column" }, providers: [
|
|
401
418
|
{
|
|
@@ -404,7 +421,7 @@ class HeaderDateFilterComponent {
|
|
|
404
421
|
useExisting: forwardRef(() => HeaderDateFilterComponent),
|
|
405
422
|
},
|
|
406
423
|
provideMomentDateAdapter(),
|
|
407
|
-
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n @if (['<>', '\u2264\u2265'].includes(operatorControl.value!)) {\n <mat-form-field class=\"ngx-datatable-date-filter\" appearance=\"fill\" [class.has-value]=\"selectControl.value\">\n <mat-label [innerHTML]=\"column.header\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <mat-date-range-input [formGroup]=\"rangeGroup\" [rangePicker]=\"rangePicker\">\n <input matStartDate formControlName=\"
|
|
424
|
+
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n @if (['<>', '\u2264\u2265'].includes(operatorControl.value!)) {\n <mat-form-field class=\"ngx-datatable-date-filter\" appearance=\"fill\" [class.has-value]=\"selectControl.value\">\n <mat-label [innerHTML]=\"column.header\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <mat-date-range-input [formGroup]=\"rangeGroup\" [rangePicker]=\"rangePicker\">\n <input matStartDate formControlName=\"from\" [placeholder]=\"column.placeholder!\" />\n <input matEndDate formControlName=\"to\" [placeholder]=\"column.placeholder!\" />\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"rangePicker\"></mat-datepicker-toggle>\n <mat-date-range-picker #rangePicker></mat-date-range-picker>\n\n <button *ngIf=\"selectControl.value\" mat-icon-button matSuffix size=\"small\" (click)=\"rangeGroup.reset()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n } @else {\n <mat-form-field class=\"ngx-datatable-date-filter\" appearance=\"fill\" [class.has-value]=\"selectControl.value\">\n <mat-label [innerHTML]=\"column.header\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput [matDatepicker]=\"datePicker\" [formControl]=\"selectControl\" [placeholder]=\"column.placeholder!\" />\n <mat-datepicker-toggle matIconSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker></mat-datepicker>\n\n <button\n *ngIf=\"selectControl.value\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n }\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4$2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i4$2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i4$2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i4$2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: OperatorSelectComponent, selector: "lib-operator-select", inputs: ["disableRange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
408
425
|
}
|
|
409
426
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: HeaderDateFilterComponent, decorators: [{
|
|
410
427
|
type: Component,
|
|
@@ -425,7 +442,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
425
442
|
useExisting: forwardRef(() => HeaderDateFilterComponent),
|
|
426
443
|
},
|
|
427
444
|
provideMomentDateAdapter(),
|
|
428
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- @format -->\n\n@if (selectControl) {\n @if (['<>', '\u2264\u2265'].includes(operatorControl.value!)) {\n <mat-form-field class=\"ngx-datatable-date-filter\" appearance=\"fill\" [class.has-value]=\"selectControl.value\">\n <mat-label [innerHTML]=\"column.header\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <mat-date-range-input [formGroup]=\"rangeGroup\" [rangePicker]=\"rangePicker\">\n <input matStartDate formControlName=\"
|
|
445
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- @format -->\n\n@if (selectControl) {\n @if (['<>', '\u2264\u2265'].includes(operatorControl.value!)) {\n <mat-form-field class=\"ngx-datatable-date-filter\" appearance=\"fill\" [class.has-value]=\"selectControl.value\">\n <mat-label [innerHTML]=\"column.header\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <mat-date-range-input [formGroup]=\"rangeGroup\" [rangePicker]=\"rangePicker\">\n <input matStartDate formControlName=\"from\" [placeholder]=\"column.placeholder!\" />\n <input matEndDate formControlName=\"to\" [placeholder]=\"column.placeholder!\" />\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"rangePicker\"></mat-datepicker-toggle>\n <mat-date-range-picker #rangePicker></mat-date-range-picker>\n\n <button *ngIf=\"selectControl.value\" mat-icon-button matSuffix size=\"small\" (click)=\"rangeGroup.reset()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n } @else {\n <mat-form-field class=\"ngx-datatable-date-filter\" appearance=\"fill\" [class.has-value]=\"selectControl.value\">\n <mat-label [innerHTML]=\"column.header\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput [matDatepicker]=\"datePicker\" [formControl]=\"selectControl\" [placeholder]=\"column.placeholder!\" />\n <mat-datepicker-toggle matIconSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker></mat-datepicker>\n\n <button\n *ngIf=\"selectControl.value\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n }\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
429
446
|
}], propDecorators: { column: [{
|
|
430
447
|
type: Input
|
|
431
448
|
}] } });
|
|
@@ -486,7 +503,7 @@ class TimeUnitSelectComponent {
|
|
|
486
503
|
multi: true,
|
|
487
504
|
useExisting: forwardRef(() => TimeUnitSelectComponent),
|
|
488
505
|
},
|
|
489
|
-
], ngImport: i0, template: "<!-- @format -->\n\n@if (control) {\n <button\n mat-flat-button\n color=\"primary\"\n class=\"
|
|
506
|
+
], ngImport: i0, template: "<!-- @format -->\n\n@if (control) {\n <button\n mat-flat-button\n color=\"primary\"\n class=\"ngx-mat-datatable-time-unit-button\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"$event.stopPropagation(); isOpen = !isOpen\">\n <span>\n {{ unitNames[control.value] }}\n </span>\n </button>\n\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"isOpen\">\n <div class=\"ngx-mat-datatable-time-unit-column\" @fade>\n @for (unit of units; track unit) {\n @if (unit !== control.value) {\n <button\n mat-flat-button\n color=\"primary\"\n class=\"ngx-mat-datatable-time-unit-button\"\n (click)=\"control.setValue(unit); isOpen = !isOpen\">\n <span>\n {{ unitNames[unit] }}\n </span>\n </button>\n }\n }\n </div>\n </ng-template>\n}\n", styles: [".ngx-mat-datatable-time-unit-button{font-size:12px;height:26px;padding:6px}.ngx-mat-datatable-time-unit-button ::ng-deep .mat-mdc-button-touch-target{height:36px;width:36px}.ngx-mat-datatable-time-unit-column{display:flex;box-sizing:border-box;flex-direction:column}.ngx-mat-datatable-time-unit-column .ngx-mat-datatable-time-unit-button{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], animations: [
|
|
490
507
|
trigger('fade', [
|
|
491
508
|
transition(':enter', [
|
|
492
509
|
style({ opacity: 0 }), // initial
|
|
@@ -518,7 +535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
518
535
|
multi: true,
|
|
519
536
|
useExisting: forwardRef(() => TimeUnitSelectComponent),
|
|
520
537
|
},
|
|
521
|
-
], template: "<!-- @format -->\n\n@if (control) {\n <button\n mat-flat-button\n color=\"primary\"\n class=\"
|
|
538
|
+
], template: "<!-- @format -->\n\n@if (control) {\n <button\n mat-flat-button\n color=\"primary\"\n class=\"ngx-mat-datatable-time-unit-button\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"$event.stopPropagation(); isOpen = !isOpen\">\n <span>\n {{ unitNames[control.value] }}\n </span>\n </button>\n\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"isOpen\">\n <div class=\"ngx-mat-datatable-time-unit-column\" @fade>\n @for (unit of units; track unit) {\n @if (unit !== control.value) {\n <button\n mat-flat-button\n color=\"primary\"\n class=\"ngx-mat-datatable-time-unit-button\"\n (click)=\"control.setValue(unit); isOpen = !isOpen\">\n <span>\n {{ unitNames[unit] }}\n </span>\n </button>\n }\n }\n </div>\n </ng-template>\n}\n", styles: [".ngx-mat-datatable-time-unit-button{font-size:12px;height:26px;padding:6px}.ngx-mat-datatable-time-unit-button ::ng-deep .mat-mdc-button-touch-target{height:36px;width:36px}.ngx-mat-datatable-time-unit-column{display:flex;box-sizing:border-box;flex-direction:column}.ngx-mat-datatable-time-unit-column .ngx-mat-datatable-time-unit-button{margin-top:8px}\n"] }]
|
|
522
539
|
}], propDecorators: { setLocale: [{
|
|
523
540
|
type: Input,
|
|
524
541
|
args: ['locale']
|
|
@@ -896,23 +913,23 @@ class DatagridDataSource extends DataSource {
|
|
|
896
913
|
}
|
|
897
914
|
|
|
898
915
|
/** @format */
|
|
899
|
-
class
|
|
916
|
+
class NgxMatDatatableContentDirective {
|
|
900
917
|
templateRef;
|
|
901
|
-
|
|
918
|
+
id;
|
|
902
919
|
constructor(templateRef) {
|
|
903
920
|
this.templateRef = templateRef;
|
|
904
921
|
}
|
|
905
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type:
|
|
906
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.4", type:
|
|
922
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableContentDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
923
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.4", type: NgxMatDatatableContentDirective, isStandalone: true, selector: "[ngxMatDatatableContent]", inputs: { id: ["ngxMatDatatableContent", "id"] }, ngImport: i0 });
|
|
907
924
|
}
|
|
908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type:
|
|
925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableContentDirective, decorators: [{
|
|
909
926
|
type: Directive,
|
|
910
927
|
args: [{
|
|
911
|
-
selector: '[
|
|
928
|
+
selector: '[ngxMatDatatableContent]',
|
|
912
929
|
}]
|
|
913
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: {
|
|
930
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { id: [{
|
|
914
931
|
type: Input,
|
|
915
|
-
args: ['
|
|
932
|
+
args: ['ngxMatDatatableContent']
|
|
916
933
|
}] } });
|
|
917
934
|
|
|
918
935
|
/** @format */
|
|
@@ -920,7 +937,7 @@ class NgxMatDatatableComponent {
|
|
|
920
937
|
options;
|
|
921
938
|
onDisplayChanged = new EventEmitter();
|
|
922
939
|
paginator;
|
|
923
|
-
|
|
940
|
+
contentRefs;
|
|
924
941
|
displayedColumns = [];
|
|
925
942
|
dataSource;
|
|
926
943
|
loaded = false;
|
|
@@ -1085,7 +1102,7 @@ class NgxMatDatatableComponent {
|
|
|
1085
1102
|
.forEach(c => (c.order.index = index++));
|
|
1086
1103
|
}
|
|
1087
1104
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1088
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: NgxMatDatatableComponent, isStandalone: true, selector: "ngx-mat-datatable", inputs: { options: "options" }, outputs: { onDisplayChanged: "onDisplayChanged" }, queries: [{ propertyName: "cellRefs", predicate: NgxMatDatatableCellDirective }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<!-- @format -->\n\n<div *ngIf=\"dataSource\" id=\"container\">\n <ng-container *ngTemplateOutlet=\"actionsTmpl\"></ng-container>\n\n <div id=\"table-container\">\n <table\n id=\"table\"\n intersectionObserver\n (intersection)=\"load($event.intersect)\"\n mat-table\n [fixedLayout]=\"false\"\n [dataSource]=\"dataSource\"\n multiTemplateDataRows>\n @for (column of options.columns; track column) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"headerTmpl; context: { column }\"></ng-container>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"cellTmpl; context: { column, row }\"></ng-container>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n\n <mat-paginator\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"options.pageSizeOptions || [5, 10, 20, 50, 100]\"\n [pageSize]=\"(options.pageSizeOptions || [5, 10, 20, 50, 100])[options.pageSizeOptionsIndex || 0]\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n\n <div id=\"loading\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner></mat-spinner>\n </div>\n</div>\n\n<ng-template #actionsTmpl>\n <div id=\"actions\">\n <div id=\"actions-start\"></div>\n\n <div id=\"actions-center\"></div>\n\n <div id=\"actions-end\">\n <div\n *ngIf=\"\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder\n \">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || 'Afficher / masquer des colonnes'\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n\n <div *ngIf=\"options.actions?.refresh\" class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only\"\n [disabled]=\"dataSource.loading$ | async\"\n (click)=\"loadPage()\">\n <mat-icon>sync</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<mat-menu #columnsMenu=\"matMenu\" class=\"datatable-columns-menu\">\n <div\n id=\"column-options\"\n cdkDropList\n has-handle\n [cdkDropListDisabled]=\"!options.actions?.columns?.reorder\"\n (cdkDropListDropped)=\"reorderColumns($event)\">\n @for (column of updateColumns; track column) {\n @if (['_select', '_rownumber'].includes(column.header)) {\n <div mat-list-item cdkDrag></div>\n } @else {\n <div class=\"column-options-item\" mat-list-item cdkDrag (click)=\"$event.stopPropagation()\">\n <button\n *ngIf=\"options.actions?.columns?.hideAndShow\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.hidden ? 'toggle-off' : 'toggle-on'\"\n (click)=\"column.hidden = !column.hidden\"\n [style.margin-right.px]=\"8\">\n <mat-icon>\n @if (!column.hidden) {\n visibility\n } @else {\n visibility_off\n }\n </mat-icon>\n </button>\n <button\n *ngIf=\"options.actions?.columns?.sticky\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.sticky ? 'toggle-on' : 'toggle-off'\"\n (click)=\"column.sticky = !column.sticky\"\n [style.margin-right.px]=\"8\">\n <mat-icon>push_pin </mat-icon>\n </button>\n <span [style.margin-right.px]=\"8\">{{ column.header }}</span>\n <mat-icon\n *ngIf=\"options.actions?.columns?.reorder\"\n size=\"small\"\n class=\"handle\"\n cdkDragHandle\n [style.margin]=\"'0 8px 0 auto'\">\n open_with\n </mat-icon>\n </div>\n }\n }\n </div>\n</mat-menu>\n\n<ng-template #headerTmpl let-column=\"column\">\n <div class=\"header\" [formGroup]=\"searchFormGroup\">\n @if (column.searchable) {\n @switch (column.type) {\n @case ('text') {\n <lib-header-text-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-duration-filter>\n }\n @default {\n <span>{{ column.header }}</span>\n }\n }\n } @else {\n <span>{{ column.header }}</span>\n }\n <ng-container *ngTemplateOutlet=\"headerActionsTmpl; context: { column }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #headerActionsTmpl let-column=\"column\">\n <div class=\"header-actions\">\n <ng-container *ngIf=\"column.sortable\">\n <button\n class=\"sort-btn\"\n mat-icon-button\n size=\"small\"\n (click)=\"sortColumn(column)\"\n [matBadgeHidden]=\"!column.order\"\n [matBadge]=\"column.order?.index + 1\">\n @switch (column.order?.dir) {\n @case ('asc') {\n <mat-icon size=\"small\">arrow_upward</mat-icon>\n }\n @case ('desc') {\n <mat-icon size=\"small\">arrow_downward</mat-icon>\n }\n @default {\n <mat-icon size=\"small\">sort</mat-icon>\n }\n }\n </button>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #cellTmpl let-column=\"column\" let-row=\"row\">\n @defer (on viewport) {\n <div class=\"cell\">\n @let value = row | get: column.property;\n @if (column.cellComponent) {\n <ng-container *ngComponentOutlet=\"column.cellComponent; inputs: { column, row, value }\" />\n } @else if (column.cellContent) {\n @let cell = cellRefs | findCellContent: column;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else {\n @if (column.prefix) {\n {{ column.prefix }}\n }\n @switch (column.type) {\n @case ('select') {\n <lib-cell-select-value [column]=\"column\" [row]=\"row\"></lib-cell-select-value>\n }\n @case ('checkbox') {\n <lib-cell-checkbox-value [column]=\"column\" [row]=\"row\"></lib-cell-checkbox-value>\n }\n @case ('date') {\n <lib-cell-date-value [column]=\"column\" [row]=\"row\"></lib-cell-date-value>\n }\n @case ('duration') {\n <lib-cell-duration-value [column]=\"column\" [row]=\"row\"></lib-cell-duration-value>\n }\n @default {\n {{ value }}\n }\n }\n @if (column.suffix) {\n {{ column.suffix }}\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n", styles: [":host{display:block;--datatable-background: #ffffff;--datatable-border-color: #ccc;--datatable-sticky-background: var(--datatable-background);--datatable-sticky-border: 1px dashed #e6a93a}#container{display:flex;box-sizing:border-box;flex-direction:column;position:relative;overflow:hidden;height:100%;width:100%;background-color:var(--datatable-background)}#actions{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;border-bottom:1px solid var(--datatable-border-color)}#actions #actions-start,#actions #actions-center,#actions #actions-end{display:flex;box-sizing:border-box;align-items:center;flex-direction:row}#actions #actions-start{place-content:center start}#actions #actions-center{place-content:center center}#actions #actions-end{place-content:center end}#actions .action{position:relative}#actions .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#column-options .column-options-item{overflow:hidden;display:flex;box-sizing:border-box;align-items:center;flex-direction:row;place-content:center start}#column-options .column-options-item button.toggle-off{--mdc-icon-button-icon-color: var(--mdc-icon-button-disabled-icon-color)}#column-options .column-options-item mat-icon.handle{color:var(--mdc-icon-button-disabled-icon-color)}#table-container{flex:1 1 100%;overflow:auto;width:100%;scrollbar-width:thin}#table{width:100%;height:100%;--mat-table-background-color: var(--datatable-background);--mat-table-row-item-outline-color: var(--datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{opacity:1;background:var(--datatable-sticky-background, var(--datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--datatable-sticky-border)}#table ::ng-deep .mat-mdc-header-cell{padding:0 8px}#table ::ng-deep .mat-mdc-header-cell mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}#table ::ng-deep .mat-mdc-cell{padding:0 8px}#table .header{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}#table .header .header-actions .sort-btn{--mat-badge-container-size: 12px;--mat-badge-line-height: 16px;--mat-badge-text-size: 10px;--mat-badge-legacy-container-size: 18px}#table .cell{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%}#paginator{--mat-paginator-container-background-color: var(--datatable-background);border-top:1px solid var(--datatable-border-color)}#loading{position:absolute;z-index:200;inset:0;background-color:#00000029}#loading mat-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small]{--mdc-icon-button-state-layer-size: 30px;--mdc-icon-button-icon-size: 18px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] .mat-mdc-button-touch-target{height:36px;width:36px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] mat-icon{height:18px;width:18px;font-size:18px}.row{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: HeaderAutocompleteFilterComponent, selector: "lib-header-autocomplete-filter", inputs: ["column"] }, { kind: "component", type: HeaderCheckboxFilterComponent, selector: "lib-header-checkbox-filter", inputs: ["column"] }, { kind: "component", type: HeaderDateFilterComponent, selector: "lib-header-date-filter", inputs: ["column"] }, { kind: "component", type: HeaderDurationFilterComponent, selector: "lib-header-duration-filter", inputs: ["column"] }, { kind: "component", type: HeaderNumberFilterComponent, selector: "lib-header-number-filter", inputs: ["column"] }, { kind: "component", type: HeaderSelectFilterComponent, selector: "lib-header-select-filter", inputs: ["column"] }, { kind: "component", type: HeaderTextFilterComponent, selector: "lib-header-text-filter", inputs: ["column"] }, { kind: "ngmodule", type: IntersectionObserverModule }, { kind: "directive", type: i3.IntersectionObserverDirective, selector: "[intersectionObserver]", inputs: ["visitClass", "leaveClass", "removeVisitClass", "removeLeaveClass", "useScroll", "threshold", "autoRemove"], outputs: ["intersection"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i5$2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i9.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i10$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], animations: [
|
|
1105
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: NgxMatDatatableComponent, isStandalone: true, selector: "ngx-mat-datatable", inputs: { options: "options" }, outputs: { onDisplayChanged: "onDisplayChanged" }, queries: [{ propertyName: "contentRefs", predicate: NgxMatDatatableContentDirective }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<!-- @format -->\n\n<div *ngIf=\"dataSource\" id=\"container\">\n <ng-container *ngTemplateOutlet=\"actionsTmpl\"></ng-container>\n\n <div id=\"table-container\">\n <table\n id=\"table\"\n intersectionObserver\n (intersection)=\"load($event.intersect)\"\n mat-table\n [fixedLayout]=\"false\"\n [dataSource]=\"dataSource\"\n multiTemplateDataRows>\n @for (column of options.columns; track column) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"headerTmpl; context: { column }\"></ng-container>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"cellTmpl; context: { column, row }\"></ng-container>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n\n <mat-paginator\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"options.pageSizeOptions || [5, 10, 20, 50, 100]\"\n [pageSize]=\"(options.pageSizeOptions || [5, 10, 20, 50, 100])[options.pageSizeOptionsIndex || 0]\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n\n <div id=\"loading\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner></mat-spinner>\n </div>\n</div>\n\n<ng-template #actionsTmpl>\n <div id=\"actions\">\n <div id=\"actions-start\"></div>\n\n <div id=\"actions-center\"></div>\n\n <div id=\"actions-end\">\n <div\n *ngIf=\"\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder\n \">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || 'Afficher / masquer des colonnes'\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n\n <div *ngIf=\"options.actions?.refresh\" class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only\"\n [disabled]=\"dataSource.loading$ | async\"\n (click)=\"loadPage()\">\n <mat-icon>sync</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<mat-menu #columnsMenu=\"matMenu\" class=\"datatable-columns-menu\">\n <div\n id=\"column-options\"\n cdkDropList\n has-handle\n [cdkDropListDisabled]=\"!options.actions?.columns?.reorder\"\n (cdkDropListDropped)=\"reorderColumns($event)\">\n @for (column of updateColumns; track column) {\n @if (['_select', '_rownumber'].includes(column.header)) {\n <div mat-list-item cdkDrag></div>\n } @else {\n <div class=\"column-options-item\" mat-list-item cdkDrag (click)=\"$event.stopPropagation()\">\n <button\n *ngIf=\"options.actions?.columns?.hideAndShow\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.hidden ? 'toggle-off' : 'toggle-on'\"\n (click)=\"column.hidden = !column.hidden\"\n [style.margin-right.px]=\"8\">\n <mat-icon>\n @if (!column.hidden) {\n visibility\n } @else {\n visibility_off\n }\n </mat-icon>\n </button>\n <button\n *ngIf=\"options.actions?.columns?.sticky\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.sticky ? 'toggle-on' : 'toggle-off'\"\n (click)=\"column.sticky = !column.sticky\"\n [style.margin-right.px]=\"8\">\n <mat-icon>push_pin </mat-icon>\n </button>\n <span [style.margin-right.px]=\"8\">{{ column.header }}</span>\n <mat-icon\n *ngIf=\"options.actions?.columns?.reorder\"\n size=\"small\"\n class=\"handle\"\n cdkDragHandle\n [style.margin]=\"'0 8px 0 auto'\">\n open_with\n </mat-icon>\n </div>\n }\n }\n </div>\n</mat-menu>\n\n<ng-template #headerTmpl let-column=\"column\">\n <div class=\"header\" [formGroup]=\"searchFormGroup\">\n @if (column.searchable) {\n @switch (column.type) {\n @case ('text') {\n <lib-header-text-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-duration-filter>\n }\n @default {\n <span>{{ column.header }}</span>\n }\n }\n } @else {\n <span>{{ column.header }}</span>\n }\n <ng-container *ngTemplateOutlet=\"headerActionsTmpl; context: { column }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #headerActionsTmpl let-column=\"column\">\n <div class=\"header-actions\">\n <ng-container *ngIf=\"column.sortable\">\n <button\n class=\"sort-btn\"\n mat-icon-button\n size=\"small\"\n (click)=\"sortColumn(column)\"\n [matBadgeHidden]=\"!column.order\"\n [matBadge]=\"column.order?.index + 1\">\n @switch (column.order?.dir) {\n @case ('asc') {\n <mat-icon size=\"small\">arrow_upward</mat-icon>\n }\n @case ('desc') {\n <mat-icon size=\"small\">arrow_downward</mat-icon>\n }\n @default {\n <mat-icon size=\"small\">sort</mat-icon>\n }\n }\n </button>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #cellTmpl let-column=\"column\" let-row=\"row\">\n @defer (on viewport) {\n <div class=\"cell\">\n @let value = row | get: column.property;\n @if (column.cellComponent) {\n <ng-container *ngComponentOutlet=\"column.cellComponent; inputs: { column, row, value }\" />\n } @else if (column.cellContentId) {\n @let cell = contentRefs | findContent: column.cellContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else {\n @if (column.prefixContentId) {\n @let cell = contentRefs | findContent: column.prefixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.prefix) {\n <span [outerHTML]=\"column.prefix\"></span>\n }\n @switch (column.type) {\n @case ('number') {\n <lib-cell-number-value [column]=\"column\" [row]=\"row\"></lib-cell-number-value>\n }\n @case ('select') {\n <lib-cell-select-value [column]=\"column\" [row]=\"row\"></lib-cell-select-value>\n }\n @case ('checkbox') {\n <lib-cell-checkbox-value [column]=\"column\" [row]=\"row\"></lib-cell-checkbox-value>\n }\n @case ('date') {\n <lib-cell-date-value [column]=\"column\" [row]=\"row\"></lib-cell-date-value>\n }\n @case ('duration') {\n <lib-cell-duration-value [column]=\"column\" [row]=\"row\"></lib-cell-duration-value>\n }\n @default {\n <span [outerHTML]=\"value\"></span>\n }\n }\n @if (column.suffixContentId) {\n @let cell = contentRefs | findContent: column.suffixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.suffix) {\n <span [outerHTML]=\"column.suffix\"></span>\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n", styles: [":host{display:block;--datatable-background: #ffffff;--datatable-border-color: #ccc;--datatable-sticky-background: var(--datatable-background);--datatable-sticky-border: 1px dashed #e6a93a}#container{display:flex;box-sizing:border-box;flex-direction:column;position:relative;overflow:hidden;height:100%;width:100%;background-color:var(--datatable-background)}#actions{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;border-bottom:1px solid var(--datatable-border-color)}#actions #actions-start,#actions #actions-center,#actions #actions-end{display:flex;box-sizing:border-box;align-items:center;flex-direction:row}#actions #actions-start{place-content:center start}#actions #actions-center{place-content:center center}#actions #actions-end{place-content:center end}#actions .action{position:relative}#actions .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#column-options .column-options-item{overflow:hidden;display:flex;box-sizing:border-box;align-items:center;flex-direction:row;place-content:center start}#column-options .column-options-item button.toggle-off{--mdc-icon-button-icon-color: var(--mdc-icon-button-disabled-icon-color)}#column-options .column-options-item mat-icon.handle{color:var(--mdc-icon-button-disabled-icon-color)}#table-container{flex:1 1 100%;overflow:auto;width:100%;scrollbar-width:thin}#table{width:100%;height:100%;--mat-table-background-color: var(--datatable-background);--mat-table-row-item-outline-color: var(--datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{opacity:1;background:var(--datatable-sticky-background, var(--datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--datatable-sticky-border)}#table ::ng-deep .mat-mdc-header-cell{padding:0 8px}#table ::ng-deep .mat-mdc-header-cell mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}#table ::ng-deep .mat-mdc-cell{padding:0 8px}#table .header{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}#table .header .header-actions .sort-btn{--mat-badge-container-size: 12px;--mat-badge-line-height: 16px;--mat-badge-text-size: 10px;--mat-badge-legacy-container-size: 18px}#table .cell{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%}#paginator{--mat-paginator-container-background-color: var(--datatable-background);border-top:1px solid var(--datatable-border-color)}#loading{position:absolute;z-index:200;inset:0;background-color:#00000029}#loading mat-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small]{--mdc-icon-button-state-layer-size: 30px;--mdc-icon-button-icon-size: 18px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] .mat-mdc-button-touch-target{height:36px;width:36px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] mat-icon{height:18px;width:18px;font-size:18px}.row{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: HeaderAutocompleteFilterComponent, selector: "lib-header-autocomplete-filter", inputs: ["column"] }, { kind: "component", type: HeaderCheckboxFilterComponent, selector: "lib-header-checkbox-filter", inputs: ["column"] }, { kind: "component", type: HeaderDateFilterComponent, selector: "lib-header-date-filter", inputs: ["column"] }, { kind: "component", type: HeaderDurationFilterComponent, selector: "lib-header-duration-filter", inputs: ["column"] }, { kind: "component", type: HeaderNumberFilterComponent, selector: "lib-header-number-filter", inputs: ["column"] }, { kind: "component", type: HeaderSelectFilterComponent, selector: "lib-header-select-filter", inputs: ["column"] }, { kind: "component", type: HeaderTextFilterComponent, selector: "lib-header-text-filter", inputs: ["column"] }, { kind: "ngmodule", type: IntersectionObserverModule }, { kind: "directive", type: i3.IntersectionObserverDirective, selector: "[intersectionObserver]", inputs: ["visitClass", "leaveClass", "removeVisitClass", "removeLeaveClass", "useScroll", "threshold", "autoRemove"], outputs: ["intersection"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i5$2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i9.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i10$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], animations: [
|
|
1089
1106
|
trigger('fade', [
|
|
1090
1107
|
transition(':enter', [
|
|
1091
1108
|
style({ opacity: 0 }), // initial
|
|
@@ -1096,18 +1113,19 @@ class NgxMatDatatableComponent {
|
|
|
1096
1113
|
animate('0.2s', style({ opacity: 0 })), // final
|
|
1097
1114
|
]),
|
|
1098
1115
|
]),
|
|
1099
|
-
], deferBlockDependencies: [() => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-BsEd3gO0.mjs').then(m => m.CellCheckboxValueComponent), import('./eherve-angular-material-datatable-cell-date-value.component-C_LQOP4q.mjs').then(m => m.CellDateValueComponent), import('./eherve-angular-material-datatable-cell-duration-value.component-Bev5fbig.mjs').then(m => m.CellDurationValueComponent), import('./eherve-angular-material-datatable-cell-select-value.component-
|
|
1116
|
+
], deferBlockDependencies: [() => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-BsEd3gO0.mjs').then(m => m.CellCheckboxValueComponent), import('./eherve-angular-material-datatable-cell-date-value.component-C_LQOP4q.mjs').then(m => m.CellDateValueComponent), import('./eherve-angular-material-datatable-cell-duration-value.component-Bev5fbig.mjs').then(m => m.CellDurationValueComponent), import('./eherve-angular-material-datatable-cell-number-value.component-dz3XviiN.mjs').then(m => m.CellNumberValueComponent), import('./eherve-angular-material-datatable-cell-select-value.component-D4VrsZhO.mjs').then(m => m.CellSelectValueComponent), i1.NgComponentOutlet, i1.NgTemplateOutlet, import('./eherve-angular-material-datatable-find-cell-content.pipe-On98SQ1u.mjs').then(m => m.FindContentPipe), import('./eherve-angular-material-datatable-get.pipe--ODBMh1N.mjs').then(m => m.GetPipe)]] });
|
|
1100
1117
|
}
|
|
1101
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, resolveDeferredDeps: () => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-BsEd3gO0.mjs').then(m => m.CellCheckboxValueComponent), import('./eherve-angular-material-datatable-cell-date-value.component-C_LQOP4q.mjs').then(m => m.CellDateValueComponent), import('./eherve-angular-material-datatable-cell-duration-value.component-Bev5fbig.mjs').then(m => m.CellDurationValueComponent), import('./eherve-angular-material-datatable-cell-select-value.component-
|
|
1118
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, resolveDeferredDeps: () => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-BsEd3gO0.mjs').then(m => m.CellCheckboxValueComponent), import('./eherve-angular-material-datatable-cell-date-value.component-C_LQOP4q.mjs').then(m => m.CellDateValueComponent), import('./eherve-angular-material-datatable-cell-duration-value.component-Bev5fbig.mjs').then(m => m.CellDurationValueComponent), import('./eherve-angular-material-datatable-cell-number-value.component-dz3XviiN.mjs').then(m => m.CellNumberValueComponent), import('./eherve-angular-material-datatable-cell-select-value.component-D4VrsZhO.mjs').then(m => m.CellSelectValueComponent), import('./eherve-angular-material-datatable-find-cell-content.pipe-On98SQ1u.mjs').then(m => m.FindContentPipe), import('./eherve-angular-material-datatable-get.pipe--ODBMh1N.mjs').then(m => m.GetPipe)], resolveMetadata: (CellCheckboxValueComponent, CellDateValueComponent, CellDurationValueComponent, CellNumberValueComponent, CellSelectValueComponent, FindContentPipe, GetPipe) => ({ decorators: [{
|
|
1102
1119
|
type: Component,
|
|
1103
1120
|
args: [{ imports: [
|
|
1104
1121
|
CellCheckboxValueComponent,
|
|
1105
1122
|
CellDateValueComponent,
|
|
1106
1123
|
CellDurationValueComponent,
|
|
1124
|
+
CellNumberValueComponent,
|
|
1107
1125
|
CellSelectValueComponent,
|
|
1108
1126
|
CommonModule,
|
|
1109
1127
|
DragDropModule,
|
|
1110
|
-
|
|
1128
|
+
FindContentPipe,
|
|
1111
1129
|
FormsModule,
|
|
1112
1130
|
GetPipe,
|
|
1113
1131
|
HeaderAutocompleteFilterComponent,
|
|
@@ -1139,7 +1157,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ng
|
|
|
1139
1157
|
animate('0.2s', style({ opacity: 0 })), // final
|
|
1140
1158
|
]),
|
|
1141
1159
|
]),
|
|
1142
|
-
], template: "<!-- @format -->\n\n<div *ngIf=\"dataSource\" id=\"container\">\n <ng-container *ngTemplateOutlet=\"actionsTmpl\"></ng-container>\n\n <div id=\"table-container\">\n <table\n id=\"table\"\n intersectionObserver\n (intersection)=\"load($event.intersect)\"\n mat-table\n [fixedLayout]=\"false\"\n [dataSource]=\"dataSource\"\n multiTemplateDataRows>\n @for (column of options.columns; track column) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"headerTmpl; context: { column }\"></ng-container>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"cellTmpl; context: { column, row }\"></ng-container>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n\n <mat-paginator\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"options.pageSizeOptions || [5, 10, 20, 50, 100]\"\n [pageSize]=\"(options.pageSizeOptions || [5, 10, 20, 50, 100])[options.pageSizeOptionsIndex || 0]\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n\n <div id=\"loading\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner></mat-spinner>\n </div>\n</div>\n\n<ng-template #actionsTmpl>\n <div id=\"actions\">\n <div id=\"actions-start\"></div>\n\n <div id=\"actions-center\"></div>\n\n <div id=\"actions-end\">\n <div\n *ngIf=\"\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder\n \">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || 'Afficher / masquer des colonnes'\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n\n <div *ngIf=\"options.actions?.refresh\" class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only\"\n [disabled]=\"dataSource.loading$ | async\"\n (click)=\"loadPage()\">\n <mat-icon>sync</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<mat-menu #columnsMenu=\"matMenu\" class=\"datatable-columns-menu\">\n <div\n id=\"column-options\"\n cdkDropList\n has-handle\n [cdkDropListDisabled]=\"!options.actions?.columns?.reorder\"\n (cdkDropListDropped)=\"reorderColumns($event)\">\n @for (column of updateColumns; track column) {\n @if (['_select', '_rownumber'].includes(column.header)) {\n <div mat-list-item cdkDrag></div>\n } @else {\n <div class=\"column-options-item\" mat-list-item cdkDrag (click)=\"$event.stopPropagation()\">\n <button\n *ngIf=\"options.actions?.columns?.hideAndShow\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.hidden ? 'toggle-off' : 'toggle-on'\"\n (click)=\"column.hidden = !column.hidden\"\n [style.margin-right.px]=\"8\">\n <mat-icon>\n @if (!column.hidden) {\n visibility\n } @else {\n visibility_off\n }\n </mat-icon>\n </button>\n <button\n *ngIf=\"options.actions?.columns?.sticky\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.sticky ? 'toggle-on' : 'toggle-off'\"\n (click)=\"column.sticky = !column.sticky\"\n [style.margin-right.px]=\"8\">\n <mat-icon>push_pin </mat-icon>\n </button>\n <span [style.margin-right.px]=\"8\">{{ column.header }}</span>\n <mat-icon\n *ngIf=\"options.actions?.columns?.reorder\"\n size=\"small\"\n class=\"handle\"\n cdkDragHandle\n [style.margin]=\"'0 8px 0 auto'\">\n open_with\n </mat-icon>\n </div>\n }\n }\n </div>\n</mat-menu>\n\n<ng-template #headerTmpl let-column=\"column\">\n <div class=\"header\" [formGroup]=\"searchFormGroup\">\n @if (column.searchable) {\n @switch (column.type) {\n @case ('text') {\n <lib-header-text-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-duration-filter>\n }\n @default {\n <span>{{ column.header }}</span>\n }\n }\n } @else {\n <span>{{ column.header }}</span>\n }\n <ng-container *ngTemplateOutlet=\"headerActionsTmpl; context: { column }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #headerActionsTmpl let-column=\"column\">\n <div class=\"header-actions\">\n <ng-container *ngIf=\"column.sortable\">\n <button\n class=\"sort-btn\"\n mat-icon-button\n size=\"small\"\n (click)=\"sortColumn(column)\"\n [matBadgeHidden]=\"!column.order\"\n [matBadge]=\"column.order?.index + 1\">\n @switch (column.order?.dir) {\n @case ('asc') {\n <mat-icon size=\"small\">arrow_upward</mat-icon>\n }\n @case ('desc') {\n <mat-icon size=\"small\">arrow_downward</mat-icon>\n }\n @default {\n <mat-icon size=\"small\">sort</mat-icon>\n }\n }\n </button>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #cellTmpl let-column=\"column\" let-row=\"row\">\n @defer (on viewport) {\n <div class=\"cell\">\n @let value = row | get: column.property;\n @if (column.cellComponent) {\n <ng-container *ngComponentOutlet=\"column.cellComponent; inputs: { column, row, value }\" />\n } @else if (column.cellContent) {\n @let cell = cellRefs | findCellContent: column;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else {\n @if (column.prefix) {\n {{ column.prefix }}\n }\n @switch (column.type) {\n @case ('select') {\n <lib-cell-select-value [column]=\"column\" [row]=\"row\"></lib-cell-select-value>\n }\n @case ('checkbox') {\n <lib-cell-checkbox-value [column]=\"column\" [row]=\"row\"></lib-cell-checkbox-value>\n }\n @case ('date') {\n <lib-cell-date-value [column]=\"column\" [row]=\"row\"></lib-cell-date-value>\n }\n @case ('duration') {\n <lib-cell-duration-value [column]=\"column\" [row]=\"row\"></lib-cell-duration-value>\n }\n @default {\n {{ value }}\n }\n }\n @if (column.suffix) {\n {{ column.suffix }}\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n", styles: [":host{display:block;--datatable-background: #ffffff;--datatable-border-color: #ccc;--datatable-sticky-background: var(--datatable-background);--datatable-sticky-border: 1px dashed #e6a93a}#container{display:flex;box-sizing:border-box;flex-direction:column;position:relative;overflow:hidden;height:100%;width:100%;background-color:var(--datatable-background)}#actions{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;border-bottom:1px solid var(--datatable-border-color)}#actions #actions-start,#actions #actions-center,#actions #actions-end{display:flex;box-sizing:border-box;align-items:center;flex-direction:row}#actions #actions-start{place-content:center start}#actions #actions-center{place-content:center center}#actions #actions-end{place-content:center end}#actions .action{position:relative}#actions .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#column-options .column-options-item{overflow:hidden;display:flex;box-sizing:border-box;align-items:center;flex-direction:row;place-content:center start}#column-options .column-options-item button.toggle-off{--mdc-icon-button-icon-color: var(--mdc-icon-button-disabled-icon-color)}#column-options .column-options-item mat-icon.handle{color:var(--mdc-icon-button-disabled-icon-color)}#table-container{flex:1 1 100%;overflow:auto;width:100%;scrollbar-width:thin}#table{width:100%;height:100%;--mat-table-background-color: var(--datatable-background);--mat-table-row-item-outline-color: var(--datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{opacity:1;background:var(--datatable-sticky-background, var(--datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--datatable-sticky-border)}#table ::ng-deep .mat-mdc-header-cell{padding:0 8px}#table ::ng-deep .mat-mdc-header-cell mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}#table ::ng-deep .mat-mdc-cell{padding:0 8px}#table .header{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}#table .header .header-actions .sort-btn{--mat-badge-container-size: 12px;--mat-badge-line-height: 16px;--mat-badge-text-size: 10px;--mat-badge-legacy-container-size: 18px}#table .cell{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%}#paginator{--mat-paginator-container-background-color: var(--datatable-background);border-top:1px solid var(--datatable-border-color)}#loading{position:absolute;z-index:200;inset:0;background-color:#00000029}#loading mat-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small]{--mdc-icon-button-state-layer-size: 30px;--mdc-icon-button-icon-size: 18px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] .mat-mdc-button-touch-target{height:36px;width:36px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] mat-icon{height:18px;width:18px;font-size:18px}.row{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
1160
|
+
], template: "<!-- @format -->\n\n<div *ngIf=\"dataSource\" id=\"container\">\n <ng-container *ngTemplateOutlet=\"actionsTmpl\"></ng-container>\n\n <div id=\"table-container\">\n <table\n id=\"table\"\n intersectionObserver\n (intersection)=\"load($event.intersect)\"\n mat-table\n [fixedLayout]=\"false\"\n [dataSource]=\"dataSource\"\n multiTemplateDataRows>\n @for (column of options.columns; track column) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"headerTmpl; context: { column }\"></ng-container>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"cellTmpl; context: { column, row }\"></ng-container>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n\n <mat-paginator\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"options.pageSizeOptions || [5, 10, 20, 50, 100]\"\n [pageSize]=\"(options.pageSizeOptions || [5, 10, 20, 50, 100])[options.pageSizeOptionsIndex || 0]\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n\n <div id=\"loading\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner></mat-spinner>\n </div>\n</div>\n\n<ng-template #actionsTmpl>\n <div id=\"actions\">\n <div id=\"actions-start\"></div>\n\n <div id=\"actions-center\"></div>\n\n <div id=\"actions-end\">\n <div\n *ngIf=\"\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder\n \">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || 'Afficher / masquer des colonnes'\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n\n <div *ngIf=\"options.actions?.refresh\" class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only\"\n [disabled]=\"dataSource.loading$ | async\"\n (click)=\"loadPage()\">\n <mat-icon>sync</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<mat-menu #columnsMenu=\"matMenu\" class=\"datatable-columns-menu\">\n <div\n id=\"column-options\"\n cdkDropList\n has-handle\n [cdkDropListDisabled]=\"!options.actions?.columns?.reorder\"\n (cdkDropListDropped)=\"reorderColumns($event)\">\n @for (column of updateColumns; track column) {\n @if (['_select', '_rownumber'].includes(column.header)) {\n <div mat-list-item cdkDrag></div>\n } @else {\n <div class=\"column-options-item\" mat-list-item cdkDrag (click)=\"$event.stopPropagation()\">\n <button\n *ngIf=\"options.actions?.columns?.hideAndShow\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.hidden ? 'toggle-off' : 'toggle-on'\"\n (click)=\"column.hidden = !column.hidden\"\n [style.margin-right.px]=\"8\">\n <mat-icon>\n @if (!column.hidden) {\n visibility\n } @else {\n visibility_off\n }\n </mat-icon>\n </button>\n <button\n *ngIf=\"options.actions?.columns?.sticky\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.sticky ? 'toggle-on' : 'toggle-off'\"\n (click)=\"column.sticky = !column.sticky\"\n [style.margin-right.px]=\"8\">\n <mat-icon>push_pin </mat-icon>\n </button>\n <span [style.margin-right.px]=\"8\">{{ column.header }}</span>\n <mat-icon\n *ngIf=\"options.actions?.columns?.reorder\"\n size=\"small\"\n class=\"handle\"\n cdkDragHandle\n [style.margin]=\"'0 8px 0 auto'\">\n open_with\n </mat-icon>\n </div>\n }\n }\n </div>\n</mat-menu>\n\n<ng-template #headerTmpl let-column=\"column\">\n <div class=\"header\" [formGroup]=\"searchFormGroup\">\n @if (column.searchable) {\n @switch (column.type) {\n @case ('text') {\n <lib-header-text-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-duration-filter>\n }\n @default {\n <span>{{ column.header }}</span>\n }\n }\n } @else {\n <span>{{ column.header }}</span>\n }\n <ng-container *ngTemplateOutlet=\"headerActionsTmpl; context: { column }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #headerActionsTmpl let-column=\"column\">\n <div class=\"header-actions\">\n <ng-container *ngIf=\"column.sortable\">\n <button\n class=\"sort-btn\"\n mat-icon-button\n size=\"small\"\n (click)=\"sortColumn(column)\"\n [matBadgeHidden]=\"!column.order\"\n [matBadge]=\"column.order?.index + 1\">\n @switch (column.order?.dir) {\n @case ('asc') {\n <mat-icon size=\"small\">arrow_upward</mat-icon>\n }\n @case ('desc') {\n <mat-icon size=\"small\">arrow_downward</mat-icon>\n }\n @default {\n <mat-icon size=\"small\">sort</mat-icon>\n }\n }\n </button>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #cellTmpl let-column=\"column\" let-row=\"row\">\n @defer (on viewport) {\n <div class=\"cell\">\n @let value = row | get: column.property;\n @if (column.cellComponent) {\n <ng-container *ngComponentOutlet=\"column.cellComponent; inputs: { column, row, value }\" />\n } @else if (column.cellContentId) {\n @let cell = contentRefs | findContent: column.cellContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else {\n @if (column.prefixContentId) {\n @let cell = contentRefs | findContent: column.prefixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.prefix) {\n <span [outerHTML]=\"column.prefix\"></span>\n }\n @switch (column.type) {\n @case ('number') {\n <lib-cell-number-value [column]=\"column\" [row]=\"row\"></lib-cell-number-value>\n }\n @case ('select') {\n <lib-cell-select-value [column]=\"column\" [row]=\"row\"></lib-cell-select-value>\n }\n @case ('checkbox') {\n <lib-cell-checkbox-value [column]=\"column\" [row]=\"row\"></lib-cell-checkbox-value>\n }\n @case ('date') {\n <lib-cell-date-value [column]=\"column\" [row]=\"row\"></lib-cell-date-value>\n }\n @case ('duration') {\n <lib-cell-duration-value [column]=\"column\" [row]=\"row\"></lib-cell-duration-value>\n }\n @default {\n <span [outerHTML]=\"value\"></span>\n }\n }\n @if (column.suffixContentId) {\n @let cell = contentRefs | findContent: column.suffixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.suffix) {\n <span [outerHTML]=\"column.suffix\"></span>\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n", styles: [":host{display:block;--datatable-background: #ffffff;--datatable-border-color: #ccc;--datatable-sticky-background: var(--datatable-background);--datatable-sticky-border: 1px dashed #e6a93a}#container{display:flex;box-sizing:border-box;flex-direction:column;position:relative;overflow:hidden;height:100%;width:100%;background-color:var(--datatable-background)}#actions{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;border-bottom:1px solid var(--datatable-border-color)}#actions #actions-start,#actions #actions-center,#actions #actions-end{display:flex;box-sizing:border-box;align-items:center;flex-direction:row}#actions #actions-start{place-content:center start}#actions #actions-center{place-content:center center}#actions #actions-end{place-content:center end}#actions .action{position:relative}#actions .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#column-options .column-options-item{overflow:hidden;display:flex;box-sizing:border-box;align-items:center;flex-direction:row;place-content:center start}#column-options .column-options-item button.toggle-off{--mdc-icon-button-icon-color: var(--mdc-icon-button-disabled-icon-color)}#column-options .column-options-item mat-icon.handle{color:var(--mdc-icon-button-disabled-icon-color)}#table-container{flex:1 1 100%;overflow:auto;width:100%;scrollbar-width:thin}#table{width:100%;height:100%;--mat-table-background-color: var(--datatable-background);--mat-table-row-item-outline-color: var(--datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{opacity:1;background:var(--datatable-sticky-background, var(--datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--datatable-sticky-border)}#table ::ng-deep .mat-mdc-header-cell{padding:0 8px}#table ::ng-deep .mat-mdc-header-cell mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}#table ::ng-deep .mat-mdc-cell{padding:0 8px}#table .header{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}#table .header .header-actions .sort-btn{--mat-badge-container-size: 12px;--mat-badge-line-height: 16px;--mat-badge-text-size: 10px;--mat-badge-legacy-container-size: 18px}#table .cell{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%}#paginator{--mat-paginator-container-background-color: var(--datatable-background);border-top:1px solid var(--datatable-border-color)}#loading{position:absolute;z-index:200;inset:0;background-color:#00000029}#loading mat-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small]{--mdc-icon-button-state-layer-size: 30px;--mdc-icon-button-icon-size: 18px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] .mat-mdc-button-touch-target{height:36px;width:36px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] mat-icon{height:18px;width:18px;font-size:18px}.row{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
1143
1161
|
}], ctorParameters: null, propDecorators: { options: [{
|
|
1144
1162
|
type: Input,
|
|
1145
1163
|
args: ['options']
|
|
@@ -1148,22 +1166,22 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ng
|
|
|
1148
1166
|
}], paginator: [{
|
|
1149
1167
|
type: ViewChild,
|
|
1150
1168
|
args: [MatPaginator]
|
|
1151
|
-
}],
|
|
1169
|
+
}], contentRefs: [{
|
|
1152
1170
|
type: ContentChildren,
|
|
1153
|
-
args: [
|
|
1171
|
+
args: [NgxMatDatatableContentDirective]
|
|
1154
1172
|
}] } }) });
|
|
1155
1173
|
|
|
1156
1174
|
/** @format */
|
|
1157
1175
|
class NgxMatDatatableModule {
|
|
1158
1176
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1159
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableModule, imports: [CommonModule, NgxMatDatatableComponent,
|
|
1177
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableModule, imports: [CommonModule, NgxMatDatatableComponent, NgxMatDatatableContentDirective], exports: [NgxMatDatatableComponent, NgxMatDatatableContentDirective] });
|
|
1160
1178
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableModule, imports: [CommonModule, NgxMatDatatableComponent] });
|
|
1161
1179
|
}
|
|
1162
1180
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableModule, decorators: [{
|
|
1163
1181
|
type: NgModule,
|
|
1164
1182
|
args: [{
|
|
1165
|
-
imports: [CommonModule, NgxMatDatatableComponent,
|
|
1166
|
-
exports: [NgxMatDatatableComponent,
|
|
1183
|
+
imports: [CommonModule, NgxMatDatatableComponent, NgxMatDatatableContentDirective],
|
|
1184
|
+
exports: [NgxMatDatatableComponent, NgxMatDatatableContentDirective],
|
|
1167
1185
|
}]
|
|
1168
1186
|
}] });
|
|
1169
1187
|
|
|
@@ -1181,5 +1199,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1181
1199
|
* Generated bundle index. Do not edit.
|
|
1182
1200
|
*/
|
|
1183
1201
|
|
|
1184
|
-
export { NgxMatDatatableComponent as N, SelectOptionPipe as S, NgxMatDatatableModule as a,
|
|
1185
|
-
//# sourceMappingURL=eherve-angular-material-datatable-eherve-angular-material-datatable-
|
|
1202
|
+
export { NgxMatDatatableComponent as N, SelectOptionPipe as S, NgxMatDatatableModule as a, NgxMatDatatableContentDirective as b };
|
|
1203
|
+
//# sourceMappingURL=eherve-angular-material-datatable-eherve-angular-material-datatable-Cg0TK8KO.mjs.map
|