@eherve/angular-material-datatable 19.28.0 → 22.0.0
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.mjs +5804 -2970
- package/fesm2022/eherve-angular-material-datatable.mjs.map +1 -1
- package/package.json +13 -12
- package/types/eherve-angular-material-datatable.d.ts +565 -0
- package/index.d.ts +0 -5
- package/lib/components/cell-checkbox-value/cell-checkbox-value.component.d.ts +0 -8
- package/lib/components/cell-date-value/cell-date-value.component.d.ts +0 -17
- package/lib/components/cell-duration-value/cell-duration-value.component.d.ts +0 -11
- package/lib/components/cell-number-value/cell-number-value.component.d.ts +0 -8
- package/lib/components/cell-select-value/cell-select-value.component.d.ts +0 -14
- package/lib/components/header-autocomplete-filter/header-autocomplete-filter.component.d.ts +0 -46
- package/lib/components/header-checkbox-filter/header-checkbox-filter.component.d.ts +0 -23
- package/lib/components/header-date-filter/header-date-filter.component.d.ts +0 -39
- package/lib/components/header-duration-filter/header-duration-filter.component.d.ts +0 -34
- package/lib/components/header-number-filter/header-number-filter.component.d.ts +0 -26
- package/lib/components/header-select-filter/header-select-filter.component.d.ts +0 -32
- package/lib/components/header-text-filter/header-text-filter.component.d.ts +0 -26
- package/lib/components/operator-select/operator-select.component.d.ts +0 -21
- package/lib/components/progress-spinner/progress-spinner.component.d.ts +0 -22
- package/lib/components/time-unit-select/time-unit-select.component.d.ts +0 -28
- package/lib/datasource.d.ts +0 -30
- package/lib/datatable-default-options.d.ts +0 -5
- package/lib/datatable.component.d.ts +0 -123
- package/lib/datatable.intl.d.ts +0 -35
- package/lib/datatable.module.d.ts +0 -8
- package/lib/date-refresh.service.d.ts +0 -8
- package/lib/directives/datatable-cell.directive.d.ts +0 -10
- package/lib/directives/datatable-row-viewport.directive.d.ts +0 -22
- package/lib/pipes/background-color.pipe.d.ts +0 -10
- package/lib/pipes/cell-color.pipe.d.ts +0 -10
- package/lib/pipes/cell-opacity.pipe.d.ts +0 -10
- package/lib/pipes/filter.pipe.d.ts +0 -10
- package/lib/pipes/find-cell-content.pipe.d.ts +0 -9
- package/lib/pipes/find.pipe.d.ts +0 -10
- package/lib/pipes/get.pipe.d.ts +0 -8
- package/lib/pipes/included-in.pipe.d.ts +0 -8
- package/lib/pipes/is-array.pipe.d.ts +0 -8
- package/lib/pipes/merge.pipe.d.ts +0 -8
- package/lib/pipes/moment-format.pipe.d.ts +0 -12
- package/lib/pipes/order-by.pipe.d.ts +0 -8
- package/lib/pipes/safe-html.pipe.d.ts +0 -10
- package/lib/pipes/select-option.pipe.d.ts +0 -9
- package/lib/pipes/sort-facet-entries.pipe.d.ts +0 -10
- package/lib/pipes/suffix-function.pipe.d.ts +0 -10
- package/lib/pipes/sum.pipe.d.ts +0 -8
- package/lib/pipes/transform.pipe.d.ts +0 -9
- package/lib/select-options-cache.service.d.ts +0 -9
- package/lib/tools/datasource-request.tool.d.ts +0 -9
- package/lib/tools/datatable-export.tool.d.ts +0 -21
- package/lib/tools/duration.tool.d.ts +0 -5
- package/lib/tools/get.tool.d.ts +0 -2
- package/lib/tools/strip-html.tool.d.ts +0 -2
- package/lib/types/action.type.d.ts +0 -21
- package/lib/types/config.type.d.ts +0 -10
- package/lib/types/datasource-service.type.d.ts +0 -55
- package/lib/types/datatable-column.type.d.ts +0 -141
- package/lib/types/datatable-facet.type.d.ts +0 -40
- package/lib/types/datatable-options.type.d.ts +0 -77
- package/lib/types/datatable-state.type.d.ts +0 -22
- package/public-api.d.ts +0 -17
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class IsArrayPipe implements PipeTransform {
|
|
5
|
-
transform(obj: any): boolean;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IsArrayPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<IsArrayPipe, "isArray", true>;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class MergePipe implements PipeTransform {
|
|
5
|
-
transform<TObject, TSource>(obj: TObject, src?: TSource): TObject & TSource;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MergePipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<MergePipe, "merge", true>;
|
|
8
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class MomentFormatPipe implements PipeTransform {
|
|
5
|
-
transform(data: any, options: {
|
|
6
|
-
format?: string;
|
|
7
|
-
locale?: string;
|
|
8
|
-
}): string;
|
|
9
|
-
private getMoment;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MomentFormatPipe, never>;
|
|
11
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<MomentFormatPipe, "momentFormat", true>;
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OrderByPipe implements PipeTransform {
|
|
5
|
-
transform(data: any[], keys: string[] | string, dirs?: ('asc' | 'desc')[] | ('asc' | 'desc')): any[];
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OrderByPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<OrderByPipe, "orderBy", true>;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
2
|
-
import type { SafeHtml } from '@angular/platform-browser';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SafeHtmlPipe {
|
|
5
|
-
private sanitizer;
|
|
6
|
-
constructor(sanitizer: DomSanitizer);
|
|
7
|
-
transform(html: string | null | undefined): SafeHtml;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", true>;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import { DatatableSearchListOption } from '../types/datatable-column.type';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SelectOptionPipe implements PipeTransform {
|
|
6
|
-
transform(value: any, options: DatatableSearchListOption[] | null): DatatableSearchListOption | null;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectOptionPipe, never>;
|
|
8
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<SelectOptionPipe, "selectOption", true>;
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import { NgxMatDatasourceResultFacet } from '../types/datasource-service.type';
|
|
4
|
-
import { FacetOptionsOptions } from '../types/datatable-facet.type';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class SortFacetEntriesPipe implements PipeTransform {
|
|
7
|
-
transform(entries: NgxMatDatasourceResultFacet[], options: FacetOptionsOptions[]): NgxMatDatasourceResultFacet[];
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SortFacetEntriesPipe, never>;
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<SortFacetEntriesPipe, "sortFacetEntries", true>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
package/lib/pipes/sum.pipe.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SumPipe implements PipeTransform {
|
|
5
|
-
transform(obj: any[] | undefined, by?: string): number;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SumPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<SumPipe, "sum", true>;
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
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 declare class TransformPipe<Record> implements PipeTransform {
|
|
6
|
-
transform(value: any, row: Record, column: DatatableValueColumn<Record>): any;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TransformPipe<any>, never>;
|
|
8
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TransformPipe<any>, "transform", true>;
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DatatableSearchListOption } from './types/datatable-column.type';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SelectOptionsCacheService {
|
|
5
|
-
private cache;
|
|
6
|
-
resolve(source: Observable<DatatableSearchListOption[]>): Observable<DatatableSearchListOption[]>;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectOptionsCacheService, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SelectOptionsCacheService>;
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { NgxMatDatasourceRequestColumn, NgxMatDatasourceRequestOptions, NgxMatDatasourceRequestOrder } from '../types/datasource-service.type';
|
|
3
|
-
import { NgxMatDatatableOptions } from '../types/datatable-options.type';
|
|
4
|
-
export type DatatableSearchValues = {
|
|
5
|
-
[columnDef: string]: any;
|
|
6
|
-
};
|
|
7
|
-
export declare function buildDatasourceRequestColumns<Record>(options: NgxMatDatatableOptions<Record>, searchValues: DatatableSearchValues): NgxMatDatasourceRequestColumn[];
|
|
8
|
-
export declare function buildDatasourceRequestOrder<Record>(options: NgxMatDatatableOptions<Record>, columns: NgxMatDatasourceRequestColumn[]): NgxMatDatasourceRequestOrder[];
|
|
9
|
-
export declare function buildDatasourceRequestOptions<Record>(options: NgxMatDatatableOptions<Record>, searchValues: DatatableSearchValues, start: number, length: number, draw?: string): NgxMatDatasourceRequestOptions;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { DatatableSearchValues } from './datasource-request.tool';
|
|
3
|
-
import { NgxMatDatatableOptions } from '../types/datatable-options.type';
|
|
4
|
-
export interface DatatableExportContext<T> {
|
|
5
|
-
options: NgxMatDatatableOptions<T>;
|
|
6
|
-
searchValues: DatatableSearchValues;
|
|
7
|
-
recordsFiltered: number;
|
|
8
|
-
rowSize: number;
|
|
9
|
-
}
|
|
10
|
-
export interface DatatableExportChunk {
|
|
11
|
-
start: number;
|
|
12
|
-
length: number;
|
|
13
|
-
}
|
|
14
|
-
export declare function exportDatatable<T>(context: DatatableExportContext<T>): Promise<void>;
|
|
15
|
-
export declare function loadExportData<T>(context: DatatableExportContext<T>): Promise<T[]>;
|
|
16
|
-
export declare function buildExportRows<T>(options: NgxMatDatatableOptions<T>, data: T[]): Promise<{
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
}[]>;
|
|
19
|
-
export declare function getExportChunkLength(recordsFiltered: number, rowSize: number): number;
|
|
20
|
-
export declare function buildExportChunks(recordsFiltered: number, chunkLength: number): DatatableExportChunk[];
|
|
21
|
-
export declare function sanitizeExportHeaders(worksheet: import('xlsx').WorkSheet, xlsx: typeof import('xlsx')): void;
|
package/lib/tools/get.tool.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { NgxMatDatatableComponent } from '../datatable.component';
|
|
3
|
-
type BaseAction = {
|
|
4
|
-
position: 'start' | 'center' | 'end';
|
|
5
|
-
isHidden?: boolean;
|
|
6
|
-
isDisabled?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export type IconAction<Record> = BaseAction & {
|
|
9
|
-
kind: 'icon';
|
|
10
|
-
icon: string;
|
|
11
|
-
onclick: (datagrid: NgxMatDatatableComponent<Record>) => void;
|
|
12
|
-
tooltip?: string;
|
|
13
|
-
ariaLabel?: string;
|
|
14
|
-
color?: string;
|
|
15
|
-
};
|
|
16
|
-
export type TemplateAction = BaseAction & {
|
|
17
|
-
kind: 'template';
|
|
18
|
-
contentId: string;
|
|
19
|
-
};
|
|
20
|
-
export type Action<Record> = IconAction<Record> | TemplateAction;
|
|
21
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
export type NgxMatDatasourceRequestSearchOperator = '=' | '>' | '>=' | '≥' | '<' | '≤' | '<>' | '≤≥' | '><' | '≥≤' | '$in' | '$nin';
|
|
3
|
-
export type NgxMatDatasourceRequestSearch = {
|
|
4
|
-
value: any;
|
|
5
|
-
regex?: boolean;
|
|
6
|
-
operator?: NgxMatDatasourceRequestSearchOperator;
|
|
7
|
-
};
|
|
8
|
-
export type NgxMatDatasourceRequestColumnType = 'string' | 'boolean' | 'number' | 'date' | 'objectid';
|
|
9
|
-
export type NgxMatDatasourceRequestColumn = {
|
|
10
|
-
data: string;
|
|
11
|
-
projection?: any;
|
|
12
|
-
name?: string;
|
|
13
|
-
searchable?: boolean;
|
|
14
|
-
orderable?: boolean;
|
|
15
|
-
type?: NgxMatDatasourceRequestColumnType;
|
|
16
|
-
search?: NgxMatDatasourceRequestSearch;
|
|
17
|
-
};
|
|
18
|
-
export type NgxMatDatasourceRequestOrderDir = 'asc' | 'desc';
|
|
19
|
-
export type NgxMatDatasourceRequestOrder = {
|
|
20
|
-
column: number;
|
|
21
|
-
dir: NgxMatDatasourceRequestOrderDir;
|
|
22
|
-
};
|
|
23
|
-
export type NgxMatDatasourceRequestFacetOperator = 'count' | ['sum', string] | ['avg', string];
|
|
24
|
-
export type NgxMatDatasourceRequestFacet = {
|
|
25
|
-
id: string;
|
|
26
|
-
kind: 'indicator';
|
|
27
|
-
property: string;
|
|
28
|
-
operator: NgxMatDatasourceRequestFacetOperator;
|
|
29
|
-
info?: any;
|
|
30
|
-
};
|
|
31
|
-
export type NgxMatDatasourceRequestOptions = {
|
|
32
|
-
draw: string;
|
|
33
|
-
columns: NgxMatDatasourceRequestColumn[];
|
|
34
|
-
order?: NgxMatDatasourceRequestOrder[];
|
|
35
|
-
start?: number;
|
|
36
|
-
length?: number;
|
|
37
|
-
search?: NgxMatDatasourceRequestSearch;
|
|
38
|
-
enableUnfilteredInfo?: boolean;
|
|
39
|
-
facets?: NgxMatDatasourceRequestFacet[];
|
|
40
|
-
};
|
|
41
|
-
export type NgxMatDatasourceResultFacet = {
|
|
42
|
-
_id: any;
|
|
43
|
-
value: number;
|
|
44
|
-
info?: any;
|
|
45
|
-
};
|
|
46
|
-
export type NgxMatDatasourceResult<T> = {
|
|
47
|
-
draw: string;
|
|
48
|
-
recordsTotal: number;
|
|
49
|
-
recordsFiltered: number;
|
|
50
|
-
data: T[];
|
|
51
|
-
facets?: {
|
|
52
|
-
[id: string]: NgxMatDatasourceResultFacet[];
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export type NgxMatDatasourceService<Record> = (options: NgxMatDatasourceRequestOptions) => Promise<NgxMatDatasourceResult<Record>>;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { ComponentType } from '@angular/cdk/portal';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { PipeFunction } from '../pipes/suffix-function.pipe';
|
|
5
|
-
import { NgxMatDatasourceRequestColumnType, NgxMatDatasourceRequestOrderDir } from './datasource-service.type';
|
|
6
|
-
type Color<Record> = string | ((row: Record) => string | undefined);
|
|
7
|
-
type BaseColumn = {
|
|
8
|
-
type?: string;
|
|
9
|
-
columnDef: string;
|
|
10
|
-
header: string;
|
|
11
|
-
property: string;
|
|
12
|
-
projection?: any;
|
|
13
|
-
additionalProperties?: string[];
|
|
14
|
-
minWidth?: number;
|
|
15
|
-
sticky?: boolean;
|
|
16
|
-
hidden?: boolean;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
searchable?: boolean;
|
|
19
|
-
searchProperty?: string;
|
|
20
|
-
searchType?: NgxMatDatasourceRequestColumnType;
|
|
21
|
-
searchValue?: any;
|
|
22
|
-
sortable?: boolean;
|
|
23
|
-
sortProperty?: string;
|
|
24
|
-
order?: {
|
|
25
|
-
index: number;
|
|
26
|
-
dir: NgxMatDatasourceRequestOrderDir;
|
|
27
|
-
};
|
|
28
|
-
tooltip?: string;
|
|
29
|
-
align?: 'start' | 'center' | 'end';
|
|
30
|
-
/**
|
|
31
|
-
* Adds one or more values to an export row. It may resolve asynchronous data
|
|
32
|
-
* before the next column or row is processed.
|
|
33
|
-
*/
|
|
34
|
-
export?: (exportRow: any, value: any, row: any) => void | Promise<void>;
|
|
35
|
-
searchUpdated?: (value: any) => void;
|
|
36
|
-
};
|
|
37
|
-
export type DatatableComponentColumn = BaseColumn & {
|
|
38
|
-
cellComponent: ComponentType<any>;
|
|
39
|
-
};
|
|
40
|
-
export type DatatableContentColumn = BaseColumn & {
|
|
41
|
-
cellContentId: string;
|
|
42
|
-
};
|
|
43
|
-
export type DatatablePrefixColumn<Record> = {
|
|
44
|
-
prefix?: string;
|
|
45
|
-
} | {
|
|
46
|
-
prefixContentId?: string;
|
|
47
|
-
} | {
|
|
48
|
-
prefixFunction?: PipeFunction<Record>;
|
|
49
|
-
} | {
|
|
50
|
-
prefixComponent?: ComponentType<any>;
|
|
51
|
-
};
|
|
52
|
-
export type DatatableSuffixColumn<Record> = {
|
|
53
|
-
suffix?: string;
|
|
54
|
-
} | {
|
|
55
|
-
suffixContentId?: string;
|
|
56
|
-
} | {
|
|
57
|
-
suffixFunction?: PipeFunction<Record>;
|
|
58
|
-
} | {
|
|
59
|
-
suffixComponent?: ComponentType<any>;
|
|
60
|
-
};
|
|
61
|
-
export type DatatableValueColumn<Record> = BaseColumn & {
|
|
62
|
-
color?: Color<Record>;
|
|
63
|
-
backgroundColor?: Color<Record>;
|
|
64
|
-
transform?: (value: any, row: Record) => any;
|
|
65
|
-
} & DatatablePrefixColumn<Record> & DatatableSuffixColumn<Record>;
|
|
66
|
-
type Column<Record> = DatatableComponentColumn | DatatableContentColumn | DatatableValueColumn<Record>;
|
|
67
|
-
type SearchableColumn = {
|
|
68
|
-
searchable: true;
|
|
69
|
-
searchProperty?: string;
|
|
70
|
-
};
|
|
71
|
-
export type DatatableSearchListOption = {
|
|
72
|
-
value: any;
|
|
73
|
-
name: string;
|
|
74
|
-
group?: string;
|
|
75
|
-
color?: string;
|
|
76
|
-
iconSrc?: 'mat-icon' | 'svg' | string;
|
|
77
|
-
icon?: string;
|
|
78
|
-
iconColor?: string;
|
|
79
|
-
};
|
|
80
|
-
export type DatatableTextColumn<Record> = Column<Record> & {
|
|
81
|
-
type: 'text';
|
|
82
|
-
};
|
|
83
|
-
export type DatatableSearchTextColumn<Record> = DatatableTextColumn<Record> & SearchableColumn & {
|
|
84
|
-
regex?: boolean;
|
|
85
|
-
};
|
|
86
|
-
export type DatatableNumberColumn<Record> = Column<Record> & {
|
|
87
|
-
type: 'number';
|
|
88
|
-
format?: string;
|
|
89
|
-
locale?: string;
|
|
90
|
-
};
|
|
91
|
-
export type DatatableSearchNumberColumn<Record> = DatatableNumberColumn<Record> & SearchableColumn & {};
|
|
92
|
-
export type DatatableSelectColumn<Record> = Column<Record> & {
|
|
93
|
-
type: 'select';
|
|
94
|
-
isArrayValue?: boolean;
|
|
95
|
-
iconOnly?: boolean;
|
|
96
|
-
options: Observable<DatatableSearchListOption[]> | DatatableSearchListOption[];
|
|
97
|
-
};
|
|
98
|
-
export type DatatableSearchSelectColumn<Record> = DatatableSelectColumn<Record> & SearchableColumn & {
|
|
99
|
-
multiple?: boolean;
|
|
100
|
-
placeholder?: string;
|
|
101
|
-
hasGroup?: boolean;
|
|
102
|
-
};
|
|
103
|
-
export type DatatableAutocompleteColumn<Record> = Column<Record> & {
|
|
104
|
-
type: 'autocomplete';
|
|
105
|
-
};
|
|
106
|
-
export type DatatableSearchAutocompleteColumn<Record> = DatatableAutocompleteColumn<Record> & SearchableColumn & {
|
|
107
|
-
placeholder?: string;
|
|
108
|
-
limit?: number;
|
|
109
|
-
loadOnFocus?: boolean;
|
|
110
|
-
hasGroup?: boolean;
|
|
111
|
-
options: (limit: number, skip: number, search: string, filter: any) => Promise<DatatableSearchListOption[]>;
|
|
112
|
-
searchValueOptions?: DatatableSearchListOption[];
|
|
113
|
-
};
|
|
114
|
-
export type DatatableCheckboxColumn<Record> = Column<Record> & {
|
|
115
|
-
type: 'checkbox';
|
|
116
|
-
};
|
|
117
|
-
export type DatatableSearchCheckboxColumn<Record> = DatatableCheckboxColumn<Record> & SearchableColumn;
|
|
118
|
-
export type DatatableDateColumn<Record> = Column<Record> & {
|
|
119
|
-
type: 'date';
|
|
120
|
-
format?: string;
|
|
121
|
-
timezone?: string;
|
|
122
|
-
locale?: string;
|
|
123
|
-
withDuration?: boolean;
|
|
124
|
-
durationRefreshTime?: number;
|
|
125
|
-
};
|
|
126
|
-
export type DatatableSearchDateColumn<Record> = DatatableDateColumn<Record> & SearchableColumn & {
|
|
127
|
-
placeholder?: string;
|
|
128
|
-
};
|
|
129
|
-
export type DatatableDurationColumn<Record> = Column<Record> & {
|
|
130
|
-
type: 'duration';
|
|
131
|
-
locale?: string;
|
|
132
|
-
largest?: number;
|
|
133
|
-
};
|
|
134
|
-
export type DatatableSearchDurationColumn<Record> = DatatableDurationColumn<Record> & SearchableColumn & {
|
|
135
|
-
placeholder?: string;
|
|
136
|
-
};
|
|
137
|
-
export type DatatableDefaultColumn<Record> = Column<Record> & {
|
|
138
|
-
searchable?: false;
|
|
139
|
-
};
|
|
140
|
-
export type DatatableColumn<Record> = DatatableDefaultColumn<Record> | DatatableTextColumn<Record> | DatatableSearchTextColumn<Record> | DatatableNumberColumn<Record> | DatatableSearchNumberColumn<Record> | DatatableSelectColumn<Record> | DatatableSearchSelectColumn<Record> | DatatableAutocompleteColumn<Record> | DatatableSearchAutocompleteColumn<Record> | DatatableCheckboxColumn<Record> | DatatableSearchCheckboxColumn<Record> | DatatableDateColumn<Record> | DatatableSearchDateColumn<Record> | DatatableDurationColumn<Record> | DatatableSearchDurationColumn<Record>;
|
|
141
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { NgxMatDatasourceResultFacet } from './datasource-service.type';
|
|
3
|
-
export type FacetOptionsOperator = 'count' | ['sum', string] | ['avg', string];
|
|
4
|
-
type BaseFacetOptions = {
|
|
5
|
-
id: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
position: 'start' | 'center' | 'end';
|
|
8
|
-
};
|
|
9
|
-
export type FacetOptionsOptions = {
|
|
10
|
-
value: any;
|
|
11
|
-
name?: string;
|
|
12
|
-
color?: string;
|
|
13
|
-
labelColor?: string;
|
|
14
|
-
};
|
|
15
|
-
type IndicatorFacetOptions = BaseFacetOptions & {
|
|
16
|
-
kind: 'indicator';
|
|
17
|
-
property: string;
|
|
18
|
-
operator: FacetOptionsOperator;
|
|
19
|
-
info?: any;
|
|
20
|
-
columnDef?: string;
|
|
21
|
-
};
|
|
22
|
-
export type ContentIdFacetOptions = IndicatorFacetOptions & {
|
|
23
|
-
contentId?: string;
|
|
24
|
-
};
|
|
25
|
-
export type ProgressSpinnerFacetOptions = IndicatorFacetOptions & {
|
|
26
|
-
display: 'progress-spinner';
|
|
27
|
-
options?: FacetOptionsOptions[];
|
|
28
|
-
size?: number;
|
|
29
|
-
fontSize?: string;
|
|
30
|
-
option?: (res: NgxMatDatasourceResultFacet) => FacetOptionsOptions | undefined;
|
|
31
|
-
};
|
|
32
|
-
export type ChipFacetOptions = IndicatorFacetOptions & {
|
|
33
|
-
display: 'chips';
|
|
34
|
-
options?: FacetOptionsOptions[];
|
|
35
|
-
size?: number;
|
|
36
|
-
fontSize?: string;
|
|
37
|
-
option?: (res: NgxMatDatasourceResultFacet) => FacetOptionsOptions | undefined;
|
|
38
|
-
};
|
|
39
|
-
export type FacetOptions = ContentIdFacetOptions | ProgressSpinnerFacetOptions | ChipFacetOptions;
|
|
40
|
-
export {};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { Action } from './action.type';
|
|
3
|
-
import { DatatableConfig } from './config.type';
|
|
4
|
-
import { NgxMatDatasourceService } from './datasource-service.type';
|
|
5
|
-
import { DatatableColumn, DatatableValueColumn } from './datatable-column.type';
|
|
6
|
-
import { FacetOptions } from './datatable-facet.type';
|
|
7
|
-
import { NgxMatDatatableStateService } from './datatable-state.type';
|
|
8
|
-
type Opacity<Record> = number | ((column: DatatableValueColumn<Record>, row: Record) => number | undefined);
|
|
9
|
-
type Color<Record> = string | ((column: DatatableValueColumn<Record>, row: Record) => string | undefined);
|
|
10
|
-
export type NgxMatDatatableLoadMode = 'pagination' | 'incremental';
|
|
11
|
-
export type NgxMatDatatableIncrementalTrigger = 'inView' | 'button';
|
|
12
|
-
export interface NgxMatDatatableIncrementalOptions {
|
|
13
|
-
trigger?: NgxMatDatatableIncrementalTrigger;
|
|
14
|
-
pageSize?: number;
|
|
15
|
-
}
|
|
16
|
-
export type NgxMatDatatableOptions<Record> = {
|
|
17
|
-
title?: string;
|
|
18
|
-
service: NgxMatDatasourceService<Record>;
|
|
19
|
-
configService?: {
|
|
20
|
-
get?: () => Promise<DatatableConfig | undefined>;
|
|
21
|
-
set?: (config: DatatableConfig) => Promise<void>;
|
|
22
|
-
};
|
|
23
|
-
stateService?: NgxMatDatatableStateService;
|
|
24
|
-
columns: DatatableColumn<Record>[];
|
|
25
|
-
columnMinWith?: number;
|
|
26
|
-
rowMaxHeight?: number;
|
|
27
|
-
pageSizeOptions?: number[];
|
|
28
|
-
pageSizeOptionsIndex?: number;
|
|
29
|
-
pageSize?: number;
|
|
30
|
-
loadMode?: NgxMatDatatableLoadMode;
|
|
31
|
-
incremental?: NgxMatDatatableIncrementalOptions;
|
|
32
|
-
showRecordsCount?: boolean;
|
|
33
|
-
additionalProperties?: string[];
|
|
34
|
-
actions?: {
|
|
35
|
-
columns?: {
|
|
36
|
-
tooltip?: string;
|
|
37
|
-
hideAndShow?: boolean;
|
|
38
|
-
sticky?: boolean;
|
|
39
|
-
reorder?: boolean;
|
|
40
|
-
};
|
|
41
|
-
refresh?: boolean;
|
|
42
|
-
rowClick?: boolean | ((row: Record) => void);
|
|
43
|
-
export?: string | boolean;
|
|
44
|
-
user?: Action<Record>[];
|
|
45
|
-
};
|
|
46
|
-
facets?: FacetOptions[];
|
|
47
|
-
rowOpacity?: Opacity<Record>;
|
|
48
|
-
rowColor?: Color<Record>;
|
|
49
|
-
rowBackgroundColor?: Color<Record>;
|
|
50
|
-
rowDisabled?: string | ((row: Record) => boolean);
|
|
51
|
-
disableRowAnimation?: boolean;
|
|
52
|
-
expandedDetailContentId?: string;
|
|
53
|
-
};
|
|
54
|
-
export interface NgxMatDatatableDefaultOptions<Record = any> {
|
|
55
|
-
loadMode?: NgxMatDatatableLoadMode;
|
|
56
|
-
incremental?: NgxMatDatatableIncrementalOptions;
|
|
57
|
-
showRecordsCount?: boolean;
|
|
58
|
-
pageSizeOptions?: number[];
|
|
59
|
-
pageSizeOptionsIndex?: number;
|
|
60
|
-
pageSize?: number;
|
|
61
|
-
columnMinWith?: number;
|
|
62
|
-
rowMaxHeight?: number;
|
|
63
|
-
disableRowAnimation?: boolean;
|
|
64
|
-
actions?: {
|
|
65
|
-
columns?: {
|
|
66
|
-
tooltip?: string;
|
|
67
|
-
hideAndShow?: boolean;
|
|
68
|
-
sticky?: boolean;
|
|
69
|
-
reorder?: boolean;
|
|
70
|
-
};
|
|
71
|
-
refresh?: boolean;
|
|
72
|
-
rowClick?: boolean | ((row: Record) => void);
|
|
73
|
-
export?: string | boolean;
|
|
74
|
-
user?: Action<Record>[];
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
import { NgxMatDatasourceRequestOrderDir } from './datasource-service.type';
|
|
3
|
-
export type NgxMatDatatableStateOrder = {
|
|
4
|
-
columnDef: string;
|
|
5
|
-
index: number;
|
|
6
|
-
dir: NgxMatDatasourceRequestOrderDir;
|
|
7
|
-
};
|
|
8
|
-
export type NgxMatDatatableStatePage = {
|
|
9
|
-
index: number;
|
|
10
|
-
size: number;
|
|
11
|
-
};
|
|
12
|
-
export type NgxMatDatatableState = {
|
|
13
|
-
version: 1;
|
|
14
|
-
filters: Record<string, any>;
|
|
15
|
-
order: NgxMatDatatableStateOrder[];
|
|
16
|
-
page?: NgxMatDatatableStatePage;
|
|
17
|
-
};
|
|
18
|
-
export type NgxMatDatatableStateService = {
|
|
19
|
-
get?: () => Promise<NgxMatDatatableState | undefined>;
|
|
20
|
-
set?: (state: NgxMatDatatableState) => Promise<void>;
|
|
21
|
-
clear?: () => Promise<void>;
|
|
22
|
-
};
|
package/public-api.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public API Surface of @eherve/angular-material-datatable
|
|
3
|
-
*
|
|
4
|
-
* @format
|
|
5
|
-
*/
|
|
6
|
-
export * from './lib/datatable.module';
|
|
7
|
-
export * from './lib/datatable.component';
|
|
8
|
-
export * from './lib/datatable-default-options';
|
|
9
|
-
export * from './lib/directives/datatable-cell.directive';
|
|
10
|
-
export * from './lib/types/datasource-service.type';
|
|
11
|
-
export * from './lib/types/datatable-column.type';
|
|
12
|
-
export * from './lib/types/datatable-options.type';
|
|
13
|
-
export * from './lib/types/action.type';
|
|
14
|
-
export * from './lib/types/datatable-facet.type';
|
|
15
|
-
export * from './lib/types/datatable-state.type';
|
|
16
|
-
export * from './lib/types/config.type';
|
|
17
|
-
export * from './lib/datatable.intl';
|