@eherve/angular-material-datatable 19.22.4 → 19.23.1
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-checkbox-value.component-BPdHTJh5.mjs → eherve-angular-material-datatable-cell-checkbox-value.component-Cs6iRiE5.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-BPdHTJh5.mjs.map → eherve-angular-material-datatable-cell-checkbox-value.component-Cs6iRiE5.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-CGePiR-X.mjs → eherve-angular-material-datatable-cell-date-value.component-PC25jsQl.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-CGePiR-X.mjs.map → eherve-angular-material-datatable-cell-date-value.component-PC25jsQl.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-U-jaa-Fh.mjs → eherve-angular-material-datatable-cell-duration-value.component-mCnxk3fO.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-U-jaa-Fh.mjs.map → eherve-angular-material-datatable-cell-duration-value.component-mCnxk3fO.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-DOOa7krr.mjs → eherve-angular-material-datatable-cell-number-value.component-4yOYghkn.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-DOOa7krr.mjs.map → eherve-angular-material-datatable-cell-number-value.component-4yOYghkn.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-select-value.component-DCUhU7Pn.mjs → eherve-angular-material-datatable-cell-select-value.component-hRxBNr9K.mjs} +5 -5
- package/fesm2022/{eherve-angular-material-datatable-cell-select-value.component-DCUhU7Pn.mjs.map → eherve-angular-material-datatable-cell-select-value.component-hRxBNr9K.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-eherve-angular-material-datatable-nPDHaxKg.mjs → eherve-angular-material-datatable-eherve-angular-material-datatable-naAMdiRT.mjs} +83 -15
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-naAMdiRT.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-get.pipe-C7JdxCnp.mjs → eherve-angular-material-datatable-get.pipe-DiH4sy4z.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-get.pipe-C7JdxCnp.mjs.map → eherve-angular-material-datatable-get.pipe-DiH4sy4z.mjs.map} +1 -1
- package/fesm2022/eherve-angular-material-datatable-suffix-function.pipe-CQO-ghpR.mjs +20 -0
- package/fesm2022/eherve-angular-material-datatable-suffix-function.pipe-CQO-ghpR.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable.mjs +1 -1
- package/lib/components/header-autocomplete-filter/header-autocomplete-filter.component.d.ts +1 -1
- package/lib/datatable.component.d.ts +2 -0
- package/lib/pipes/{color.pipe.d.ts → cell-color.pipe.d.ts} +3 -3
- package/lib/pipes/cell-opacity.pipe.d.ts +10 -0
- package/lib/pipes/included-in.pipe.d.ts +8 -0
- package/lib/pipes/suffix-function.pipe.d.ts +10 -0
- package/lib/tools/strip-html.tool.d.ts +2 -0
- package/lib/types/datatable-column.type.d.ts +27 -17
- package/lib/types/datatable-options.type.d.ts +3 -0
- package/package.json +1 -1
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-nPDHaxKg.mjs.map +0 -1
|
@@ -23,6 +23,7 @@ export declare class NgxMatDatatableComponent<Record = any> implements OnInit, O
|
|
|
23
23
|
paginator: MatPaginator | undefined;
|
|
24
24
|
contentRefs?: QueryList<NgxMatDatatableContentDirective>;
|
|
25
25
|
displayedColumns: string[];
|
|
26
|
+
disabledRows: Record[];
|
|
26
27
|
dataSource: DatagridDataSource<Record>;
|
|
27
28
|
loaded: boolean;
|
|
28
29
|
searchFormGroup: FormGroup;
|
|
@@ -52,6 +53,7 @@ export declare class NgxMatDatatableComponent<Record = any> implements OnInit, O
|
|
|
52
53
|
private buildExportSelectColumn;
|
|
53
54
|
private buildExportDurationColumn;
|
|
54
55
|
loadPage(): Promise<void>;
|
|
56
|
+
private buildDisabledRows;
|
|
55
57
|
private buildOrder;
|
|
56
58
|
updateColumns: UpdateColumn<Record>[];
|
|
57
59
|
openUpdateColumnDisplay(): void;
|
|
@@ -3,8 +3,8 @@ import { PipeTransform } from '@angular/core';
|
|
|
3
3
|
import { DatatableValueColumn } from '../types/datatable-column.type';
|
|
4
4
|
import { NgxMatDatatableOptions } from '../types/datatable-options.type';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class CellColorPipe<Record> implements PipeTransform {
|
|
7
7
|
transform(row: Record, column: DatatableValueColumn<Record>, options: NgxMatDatatableOptions<Record>): string | void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellColorPipe<any>, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellColorPipe<any>, "cellColor", true>;
|
|
10
10
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import { DatatableValueColumn } from '../types/datatable-column.type';
|
|
4
|
+
import { NgxMatDatatableOptions } from '../types/datatable-options.type';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CellOpacityPipe<Record> implements PipeTransform {
|
|
7
|
+
transform(row: Record, column: DatatableValueColumn<Record>, options: NgxMatDatatableOptions<Record>): number | void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellOpacityPipe<any>, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellOpacityPipe<any>, "cellOpacity", true>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class IncludedInPipe implements PipeTransform {
|
|
5
|
+
transform(elmt: any, obj: any[]): boolean;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IncludedInPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<IncludedInPipe, "includedIn", true>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import { DatatableValueColumn } from '../types/datatable-column.type';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type PipeFunction<Record> = (value: any, row: Record, column: DatatableValueColumn<Record>) => string;
|
|
6
|
+
export declare class ValueFunctionPipe<Record> implements PipeTransform {
|
|
7
|
+
transform(value: any, valueFunction: PipeFunction<Record>, row: Record, column: DatatableValueColumn<Record>): string | null;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValueFunctionPipe<any>, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ValueFunctionPipe<any>, "valueFunction", true>;
|
|
10
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
import { ComponentType } from '@angular/cdk/portal';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
+
import { PipeFunction } from '../pipes/suffix-function.pipe';
|
|
4
5
|
import { NgxMatDatasourceRequestOrderDir } from './datasource-service.type';
|
|
5
6
|
type Color<Record> = string | ((row: Record) => string | undefined);
|
|
6
7
|
type BaseColumn = {
|
|
@@ -35,23 +36,31 @@ export type DatatableComponentColumn = BaseColumn & {
|
|
|
35
36
|
export type DatatableContentColumn = BaseColumn & {
|
|
36
37
|
cellContentId: string;
|
|
37
38
|
};
|
|
38
|
-
export type
|
|
39
|
-
color?: Color<Record>;
|
|
40
|
-
backgroundColor?: Color<Record>;
|
|
41
|
-
transform?: (value: any, row: Record) => any;
|
|
42
|
-
} & ({
|
|
39
|
+
export type DatatablePrefixColumn<Record> = {
|
|
43
40
|
prefix?: string;
|
|
44
|
-
prefixContentId?: undefined;
|
|
45
41
|
} | {
|
|
46
|
-
prefix?: undefined;
|
|
47
42
|
prefixContentId?: string;
|
|
48
|
-
}
|
|
43
|
+
} | {
|
|
44
|
+
prefixFunction?: PipeFunction<Record>;
|
|
45
|
+
} | {
|
|
46
|
+
prefixComponent?: ComponentType<any>;
|
|
47
|
+
};
|
|
48
|
+
export type DatatableSuffixColumn<Record> = {
|
|
49
49
|
suffix?: string;
|
|
50
50
|
} | {
|
|
51
51
|
suffixContentId?: string;
|
|
52
|
-
}
|
|
52
|
+
} | {
|
|
53
|
+
suffixFunction?: PipeFunction<Record>;
|
|
54
|
+
} | {
|
|
55
|
+
suffixComponent?: ComponentType<any>;
|
|
56
|
+
};
|
|
57
|
+
export type DatatableValueColumn<Record> = BaseColumn & {
|
|
58
|
+
color?: Color<Record>;
|
|
59
|
+
backgroundColor?: Color<Record>;
|
|
60
|
+
transform?: (value: any, row: Record) => any;
|
|
61
|
+
} & DatatablePrefixColumn<Record> & DatatableSuffixColumn<Record>;
|
|
53
62
|
type Column<Record> = DatatableComponentColumn | DatatableContentColumn | DatatableValueColumn<Record>;
|
|
54
|
-
type SearchableColumn
|
|
63
|
+
type SearchableColumn = {
|
|
55
64
|
searchable: true;
|
|
56
65
|
searchProperty?: string;
|
|
57
66
|
};
|
|
@@ -67,7 +76,7 @@ export type DatatableSearchListOption = {
|
|
|
67
76
|
export type DatatableTextColumn<Record> = Column<Record> & {
|
|
68
77
|
type: 'text';
|
|
69
78
|
};
|
|
70
|
-
export type DatatableSearchTextColumn<Record> = DatatableTextColumn<Record> & SearchableColumn
|
|
79
|
+
export type DatatableSearchTextColumn<Record> = DatatableTextColumn<Record> & SearchableColumn & {
|
|
71
80
|
regexp?: boolean;
|
|
72
81
|
};
|
|
73
82
|
export type DatatableNumberColumn<Record> = Column<Record> & {
|
|
@@ -75,13 +84,14 @@ export type DatatableNumberColumn<Record> = Column<Record> & {
|
|
|
75
84
|
format?: string;
|
|
76
85
|
locale?: string;
|
|
77
86
|
};
|
|
78
|
-
export type DatatableSearchNumberColumn<Record> = DatatableNumberColumn<Record> & SearchableColumn
|
|
87
|
+
export type DatatableSearchNumberColumn<Record> = DatatableNumberColumn<Record> & SearchableColumn & {};
|
|
79
88
|
export type DatatableSelectColumn<Record> = Column<Record> & {
|
|
80
89
|
type: 'select';
|
|
81
90
|
isArrayValue?: boolean;
|
|
91
|
+
iconOnly?: boolean;
|
|
82
92
|
options: Observable<DatatableSearchListOption[]> | DatatableSearchListOption[];
|
|
83
93
|
};
|
|
84
|
-
export type DatatableSearchSelectColumn<Record> = DatatableSelectColumn<Record> & SearchableColumn
|
|
94
|
+
export type DatatableSearchSelectColumn<Record> = DatatableSelectColumn<Record> & SearchableColumn & {
|
|
85
95
|
multiple?: boolean;
|
|
86
96
|
placeholder?: string;
|
|
87
97
|
hasGroup?: boolean;
|
|
@@ -89,7 +99,7 @@ export type DatatableSearchSelectColumn<Record> = DatatableSelectColumn<Record>
|
|
|
89
99
|
export type DatatableAutocompleteColumn<Record> = Column<Record> & {
|
|
90
100
|
type: 'autocomplete';
|
|
91
101
|
};
|
|
92
|
-
export type DatatableSearchAutocompleteColumn<Record> = DatatableAutocompleteColumn<Record> & SearchableColumn
|
|
102
|
+
export type DatatableSearchAutocompleteColumn<Record> = DatatableAutocompleteColumn<Record> & SearchableColumn & {
|
|
93
103
|
placeholder?: string;
|
|
94
104
|
limit?: number;
|
|
95
105
|
loadOnFocus?: boolean;
|
|
@@ -100,7 +110,7 @@ export type DatatableSearchAutocompleteColumn<Record> = DatatableAutocompleteCol
|
|
|
100
110
|
export type DatatableCheckboxColumn<Record> = Column<Record> & {
|
|
101
111
|
type: 'checkbox';
|
|
102
112
|
};
|
|
103
|
-
export type DatatableSearchCheckboxColumn<Record> = DatatableCheckboxColumn<Record> & SearchableColumn
|
|
113
|
+
export type DatatableSearchCheckboxColumn<Record> = DatatableCheckboxColumn<Record> & SearchableColumn;
|
|
104
114
|
export type DatatableDateColumn<Record> = Column<Record> & {
|
|
105
115
|
type: 'date';
|
|
106
116
|
format?: string;
|
|
@@ -109,7 +119,7 @@ export type DatatableDateColumn<Record> = Column<Record> & {
|
|
|
109
119
|
withDuration?: boolean;
|
|
110
120
|
durationRefreshTime?: number;
|
|
111
121
|
};
|
|
112
|
-
export type DatatableSearchDateColumn<Record> = DatatableDateColumn<Record> & SearchableColumn
|
|
122
|
+
export type DatatableSearchDateColumn<Record> = DatatableDateColumn<Record> & SearchableColumn & {
|
|
113
123
|
placeholder?: string;
|
|
114
124
|
};
|
|
115
125
|
export type DatatableDurationColumn<Record> = Column<Record> & {
|
|
@@ -117,7 +127,7 @@ export type DatatableDurationColumn<Record> = Column<Record> & {
|
|
|
117
127
|
locale?: string;
|
|
118
128
|
largest?: number;
|
|
119
129
|
};
|
|
120
|
-
export type DatatableSearchDurationColumn<Record> = DatatableDurationColumn<Record> & SearchableColumn
|
|
130
|
+
export type DatatableSearchDurationColumn<Record> = DatatableDurationColumn<Record> & SearchableColumn & {
|
|
121
131
|
placeholder?: string;
|
|
122
132
|
};
|
|
123
133
|
export type DatatableDefaultColumn<Record> = Column<Record> & {
|
|
@@ -4,6 +4,7 @@ import { DatatableConfig } from './config.type';
|
|
|
4
4
|
import { NgxMatDatasourceService } from './datasource-service.type';
|
|
5
5
|
import { DatatableColumn, DatatableValueColumn } from './datatable-column.type';
|
|
6
6
|
import { FacetOptions } from './datatable-facet.type';
|
|
7
|
+
type Opacity<Record> = number | ((column: DatatableValueColumn<Record>, row: Record) => number | undefined);
|
|
7
8
|
type Color<Record> = string | ((column: DatatableValueColumn<Record>, row: Record) => string | undefined);
|
|
8
9
|
export type NgxMatDatatableOptions<Record> = {
|
|
9
10
|
title?: string;
|
|
@@ -31,8 +32,10 @@ export type NgxMatDatatableOptions<Record> = {
|
|
|
31
32
|
user?: Action<Record>[];
|
|
32
33
|
};
|
|
33
34
|
facets?: FacetOptions[];
|
|
35
|
+
rowOpacity?: Opacity<Record>;
|
|
34
36
|
rowColor?: Color<Record>;
|
|
35
37
|
rowBackgroundColor?: Color<Record>;
|
|
38
|
+
rowDisabled?: string | ((row: Record) => boolean);
|
|
36
39
|
disableRowAnimation?: boolean;
|
|
37
40
|
};
|
|
38
41
|
export {};
|