@eherve/angular-material-datatable 19.21.1 → 19.22.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-cell-checkbox-value.component-7ZxMfZu7.mjs → eherve-angular-material-datatable-cell-checkbox-value.component-DGIJPmh4.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-7ZxMfZu7.mjs.map → eherve-angular-material-datatable-cell-checkbox-value.component-DGIJPmh4.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-Dwi83frF.mjs → eherve-angular-material-datatable-cell-date-value.component-Kr3wElx3.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-Dwi83frF.mjs.map → eherve-angular-material-datatable-cell-date-value.component-Kr3wElx3.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-DpW6JUEn.mjs → eherve-angular-material-datatable-cell-duration-value.component-BNjDxI3P.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-DpW6JUEn.mjs.map → eherve-angular-material-datatable-cell-duration-value.component-BNjDxI3P.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-C4yo5DU0.mjs → eherve-angular-material-datatable-cell-number-value.component-JH7KenJc.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-C4yo5DU0.mjs.map → eherve-angular-material-datatable-cell-number-value.component-JH7KenJc.mjs.map} +1 -1
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-CvPnxc36.mjs +42 -0
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-CvPnxc36.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-eherve-angular-material-datatable-BjoNHUkM.mjs → eherve-angular-material-datatable-eherve-angular-material-datatable-X9HP3wfR.mjs} +38 -12
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-X9HP3wfR.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-get.pipe-CgrCIpPS.mjs → eherve-angular-material-datatable-get.pipe-BF63OgUb.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-get.pipe-CgrCIpPS.mjs.map → eherve-angular-material-datatable-get.pipe-BF63OgUb.mjs.map} +1 -1
- package/fesm2022/eherve-angular-material-datatable.mjs +1 -1
- package/lib/components/cell-select-value/cell-select-value.component.d.ts +7 -2
- package/lib/components/header-select-filter/header-select-filter.component.d.ts +7 -1
- package/lib/types/datatable-column.type.d.ts +14 -10
- package/package.json +1 -1
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-ByGK05f3.mjs +0 -29
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-ByGK05f3.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-BjoNHUkM.mjs.map +0 -1
|
@@ -16,6 +16,7 @@ type BaseColumn = {
|
|
|
16
16
|
searchable?: boolean;
|
|
17
17
|
searchProperty?: string;
|
|
18
18
|
regex?: boolean;
|
|
19
|
+
searchValue?: any;
|
|
19
20
|
sortable?: boolean;
|
|
20
21
|
sortProperty?: string;
|
|
21
22
|
order?: {
|
|
@@ -53,6 +54,15 @@ type SearchableColumn<Record> = Column<Record> & {
|
|
|
53
54
|
searchable: true;
|
|
54
55
|
searchProperty?: string;
|
|
55
56
|
};
|
|
57
|
+
export type DatatableSearchListOption = {
|
|
58
|
+
value: any;
|
|
59
|
+
name: string;
|
|
60
|
+
group?: string;
|
|
61
|
+
color?: string;
|
|
62
|
+
iconSrc?: 'mat-icon' | 'svg';
|
|
63
|
+
icon?: string;
|
|
64
|
+
iconColor?: string;
|
|
65
|
+
};
|
|
56
66
|
export type DatatableTextColumn<Record> = Column<Record> & {
|
|
57
67
|
type: 'text';
|
|
58
68
|
};
|
|
@@ -65,23 +75,15 @@ export type DatatableNumberColumn<Record> = Column<Record> & {
|
|
|
65
75
|
locale?: string;
|
|
66
76
|
};
|
|
67
77
|
export type DatatableSearchNumberColumn<Record> = DatatableNumberColumn<Record> & SearchableColumn<Record> & {};
|
|
68
|
-
export type DatatableSearchListOption = {
|
|
69
|
-
value: any;
|
|
70
|
-
name: string;
|
|
71
|
-
group?: string;
|
|
72
|
-
color?: string;
|
|
73
|
-
iconSrc?: 'mat-icon' | 'svg';
|
|
74
|
-
icon?: string;
|
|
75
|
-
iconColor?: string;
|
|
76
|
-
};
|
|
77
78
|
export type DatatableSelectColumn<Record> = Column<Record> & {
|
|
78
79
|
type: 'select';
|
|
79
80
|
isArrayValue?: boolean;
|
|
80
|
-
options: Observable<DatatableSearchListOption[]
|
|
81
|
+
options: Observable<DatatableSearchListOption[]> | DatatableSearchListOption[];
|
|
81
82
|
};
|
|
82
83
|
export type DatatableSearchSelectColumn<Record> = DatatableSelectColumn<Record> & SearchableColumn<Record> & {
|
|
83
84
|
multiple?: boolean;
|
|
84
85
|
placeholder?: string;
|
|
86
|
+
hasGroup?: boolean;
|
|
85
87
|
};
|
|
86
88
|
export type DatatableAutocompleteColumn<Record> = Column<Record> & {
|
|
87
89
|
type: 'autocomplete';
|
|
@@ -90,7 +92,9 @@ export type DatatableSearchAutocompleteColumn<Record> = DatatableAutocompleteCol
|
|
|
90
92
|
placeholder?: string;
|
|
91
93
|
limit?: number;
|
|
92
94
|
loadOnFocus?: boolean;
|
|
95
|
+
hasGroup?: boolean;
|
|
93
96
|
options: (limit: number, skip: number, search: string) => Promise<DatatableSearchListOption[]>;
|
|
97
|
+
searchValueOptions?: DatatableSearchListOption[];
|
|
94
98
|
};
|
|
95
99
|
export type DatatableCheckboxColumn<Record> = Column<Record> & {
|
|
96
100
|
type: 'checkbox';
|
package/package.json
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as i1 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Input } from '@angular/core';
|
|
5
|
-
import { MatLabel } from '@angular/material/form-field';
|
|
6
|
-
import * as i5 from '@angular/material/icon';
|
|
7
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
-
import { GetPipe } from './eherve-angular-material-datatable-get.pipe-CgrCIpPS.mjs';
|
|
9
|
-
import { S as SelectOptionPipe, I as IsArrayPipe, a as SafeHtmlPipe } from './eherve-angular-material-datatable-eherve-angular-material-datatable-BjoNHUkM.mjs';
|
|
10
|
-
import { TransformPipe } from './eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs';
|
|
11
|
-
|
|
12
|
-
/** @format */
|
|
13
|
-
class CellSelectValueComponent {
|
|
14
|
-
column;
|
|
15
|
-
row;
|
|
16
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellSelectValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: CellSelectValueComponent, isStandalone: true, selector: "lib-cell-select-value", inputs: { column: "column", row: "row" }, ngImport: i0, template: "<!-- @format -->\n\n@let options = $any(column.options | async);\n@let value = row | get: column.property | transform: row : column;\n\n@if (column.isArrayValue && value | isArray) {\n <div id=\"options\">\n @for (v of value; track v) {\n <ng-container *ngTemplateOutlet=\"optionTmpl; context: { value: v }\"></ng-container>\n }\n </div>\n} @else {\n <ng-container *ngTemplateOutlet=\"optionTmpl; context: { value }\"></ng-container>\n}\n\n<ng-template #optionTmpl let-value=\"value\">\n @let option = value | selectOption: options;\n @if (option) {\n <div class=\"option\">\n @if (option.icon) {\n <mat-icon [style.color]=\"option.iconColor\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n } @else {\n {{ value }}\n }\n</ng-template>\n", styles: [".option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;padding:4px}mat-icon,mat-label{color:currentColor}:host-context(tr.has-click:hover) mat-icon,:host-context(tr.has-click:hover) mat-label{color:var(--datatable-hover-color, var(--mat-sys-on-primary))!important}.options{display:flex;box-sizing:border-box;place-content:start start;align-items:center;flex-direction:row;flex-wrap:wrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: SelectOptionPipe, name: "selectOption" }, { kind: "pipe", type: GetPipe, name: "get" }, { kind: "pipe", type: IsArrayPipe, name: "isArray" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "pipe", type: TransformPipe, name: "transform" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
18
|
-
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellSelectValueComponent, decorators: [{
|
|
20
|
-
type: Component,
|
|
21
|
-
args: [{ selector: 'lib-cell-select-value', imports: [CommonModule, SelectOptionPipe, GetPipe, IsArrayPipe, MatIconModule, MatLabel, TransformPipe, SafeHtmlPipe], template: "<!-- @format -->\n\n@let options = $any(column.options | async);\n@let value = row | get: column.property | transform: row : column;\n\n@if (column.isArrayValue && value | isArray) {\n <div id=\"options\">\n @for (v of value; track v) {\n <ng-container *ngTemplateOutlet=\"optionTmpl; context: { value: v }\"></ng-container>\n }\n </div>\n} @else {\n <ng-container *ngTemplateOutlet=\"optionTmpl; context: { value }\"></ng-container>\n}\n\n<ng-template #optionTmpl let-value=\"value\">\n @let option = value | selectOption: options;\n @if (option) {\n <div class=\"option\">\n @if (option.icon) {\n <mat-icon [style.color]=\"option.iconColor\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n } @else {\n {{ value }}\n }\n</ng-template>\n", styles: [".option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;padding:4px}mat-icon,mat-label{color:currentColor}:host-context(tr.has-click:hover) mat-icon,:host-context(tr.has-click:hover) mat-label{color:var(--datatable-hover-color, var(--mat-sys-on-primary))!important}.options{display:flex;box-sizing:border-box;place-content:start start;align-items:center;flex-direction:row;flex-wrap:wrap}\n"] }]
|
|
22
|
-
}], propDecorators: { column: [{
|
|
23
|
-
type: Input
|
|
24
|
-
}], row: [{
|
|
25
|
-
type: Input
|
|
26
|
-
}] } });
|
|
27
|
-
|
|
28
|
-
export { CellSelectValueComponent };
|
|
29
|
-
//# sourceMappingURL=eherve-angular-material-datatable-cell-select-value.component-ByGK05f3.mjs.map
|
package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-ByGK05f3.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eherve-angular-material-datatable-cell-select-value.component-ByGK05f3.mjs","sources":["../../../projects/datatable/src/lib/components/cell-select-value/cell-select-value.component.ts","../../../projects/datatable/src/lib/components/cell-select-value/cell-select-value.component.html"],"sourcesContent":["/** @format */\n\nimport { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { MatLabel } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { GetPipe } from '../../pipes/get.pipe';\nimport { SafeHtmlPipe } from '../../pipes/safe-html.pipe';\nimport { SelectOptionPipe } from '../../pipes/select-option.pipe';\nimport { TransformPipe } from '../../pipes/transform.pipe';\nimport { DatatableSelectColumn } from '../../types/datatable-column.type';\nimport { IsArrayPipe } from '../../pipes/is-array.pipe';\n\n@Component({\n selector: 'lib-cell-select-value',\n imports: [CommonModule, SelectOptionPipe, GetPipe, IsArrayPipe, MatIconModule, MatLabel, TransformPipe, SafeHtmlPipe],\n templateUrl: './cell-select-value.component.html',\n styleUrl: './cell-select-value.component.scss',\n})\nexport class CellSelectValueComponent<Record> {\n @Input()\n column!: DatatableSelectColumn<Record>;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let options = $any(column.options | async);\n@let value = row | get: column.property | transform: row : column;\n\n@if (column.isArrayValue && value | isArray) {\n <div id=\"options\">\n @for (v of value; track v) {\n <ng-container *ngTemplateOutlet=\"optionTmpl; context: { value: v }\"></ng-container>\n }\n </div>\n} @else {\n <ng-container *ngTemplateOutlet=\"optionTmpl; context: { value }\"></ng-container>\n}\n\n<ng-template #optionTmpl let-value=\"value\">\n @let option = value | selectOption: options;\n @if (option) {\n <div class=\"option\">\n @if (option.icon) {\n <mat-icon [style.color]=\"option.iconColor\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n } @else {\n {{ value }}\n }\n</ng-template>\n"],"names":["i2"],"mappings":";;;;;;;;;;;AAAA;MAmBa,wBAAwB,CAAA;AAEnC,IAAA,MAAM;AAGN,IAAA,GAAG;uGALQ,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,2HCnBrC,o6BA8BA,EAAA,MAAA,EAAA,CAAA,4bAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDfY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA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