@eherve/angular-material-datatable 19.23.1 → 19.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-Cs6iRiE5.mjs → eherve-angular-material-datatable-cell-checkbox-value.component-B1xA4rcx.mjs} +2 -2
  2. package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-Cs6iRiE5.mjs.map → eherve-angular-material-datatable-cell-checkbox-value.component-B1xA4rcx.mjs.map} +1 -1
  3. package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-PC25jsQl.mjs → eherve-angular-material-datatable-cell-date-value.component-SmZolfO2.mjs} +2 -2
  4. package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-PC25jsQl.mjs.map → eherve-angular-material-datatable-cell-date-value.component-SmZolfO2.mjs.map} +1 -1
  5. package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-mCnxk3fO.mjs → eherve-angular-material-datatable-cell-duration-value.component-CCoKwOCi.mjs} +2 -2
  6. package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-mCnxk3fO.mjs.map → eherve-angular-material-datatable-cell-duration-value.component-CCoKwOCi.mjs.map} +1 -1
  7. package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-4yOYghkn.mjs → eherve-angular-material-datatable-cell-number-value.component-CVh45vmC.mjs} +2 -2
  8. package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-4yOYghkn.mjs.map → eherve-angular-material-datatable-cell-number-value.component-CVh45vmC.mjs.map} +1 -1
  9. package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-omrgKZsE.mjs +44 -0
  10. package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-omrgKZsE.mjs.map +1 -0
  11. package/fesm2022/{eherve-angular-material-datatable-eherve-angular-material-datatable-naAMdiRT.mjs → eherve-angular-material-datatable-eherve-angular-material-datatable-DEVM6I6-.mjs} +48 -18
  12. package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-DEVM6I6-.mjs.map +1 -0
  13. package/fesm2022/{eherve-angular-material-datatable-get.pipe-DiH4sy4z.mjs → eherve-angular-material-datatable-get.pipe-DLd8yb47.mjs} +2 -2
  14. package/fesm2022/{eherve-angular-material-datatable-get.pipe-DiH4sy4z.mjs.map → eherve-angular-material-datatable-get.pipe-DLd8yb47.mjs.map} +1 -1
  15. package/fesm2022/eherve-angular-material-datatable.mjs +1 -1
  16. package/lib/components/cell-select-value/cell-select-value.component.d.ts +3 -1
  17. package/lib/components/header-text-filter/header-text-filter.component.d.ts +1 -0
  18. package/lib/datatable.component.d.ts +1 -0
  19. package/lib/types/datasource-service.type.d.ts +2 -0
  20. package/lib/types/datatable-column.type.d.ts +2 -3
  21. package/lib/types/datatable-facet.type.d.ts +1 -0
  22. package/lib/types/datatable-options.type.d.ts +1 -0
  23. package/package.json +1 -1
  24. package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-hRxBNr9K.mjs +0 -42
  25. package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-hRxBNr9K.mjs.map +0 -1
  26. package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-naAMdiRT.mjs.map +0 -1
@@ -24,6 +24,7 @@ export type NgxMatDatasourceRequestFacet = {
24
24
  kind: 'indicator';
25
25
  property: string;
26
26
  operator: NgxMatDatasourceRequestFacetOperator;
27
+ info?: any;
27
28
  };
28
29
  export type NgxMatDatasourceRequestOptions = {
29
30
  draw: string;
@@ -37,6 +38,7 @@ export type NgxMatDatasourceRequestOptions = {
37
38
  export type NgxMatDatasourceResultFacet = {
38
39
  _id: any;
39
40
  value: number;
41
+ info?: any;
40
42
  };
41
43
  export type NgxMatDatasourceResult<T> = {
42
44
  draw: string;
@@ -17,7 +17,6 @@ type BaseColumn = {
17
17
  disabled?: boolean;
18
18
  searchable?: boolean;
19
19
  searchProperty?: string;
20
- regex?: boolean;
21
20
  searchValue?: any;
22
21
  sortable?: boolean;
23
22
  sortProperty?: string;
@@ -69,7 +68,7 @@ export type DatatableSearchListOption = {
69
68
  name: string;
70
69
  group?: string;
71
70
  color?: string;
72
- iconSrc?: 'mat-icon' | 'svg';
71
+ iconSrc?: 'mat-icon' | 'svg' | string;
73
72
  icon?: string;
74
73
  iconColor?: string;
75
74
  };
@@ -77,7 +76,7 @@ export type DatatableTextColumn<Record> = Column<Record> & {
77
76
  type: 'text';
78
77
  };
79
78
  export type DatatableSearchTextColumn<Record> = DatatableTextColumn<Record> & SearchableColumn & {
80
- regexp?: boolean;
79
+ regex?: boolean;
81
80
  };
82
81
  export type DatatableNumberColumn<Record> = Column<Record> & {
83
82
  type: 'number';
@@ -16,6 +16,7 @@ type IndicatorFacetOptions = BaseFacetOptions & {
16
16
  kind: 'indicator';
17
17
  property: string;
18
18
  operator: FacetOptionsOperator;
19
+ info?: any;
19
20
  columnDef?: string;
20
21
  };
21
22
  export type ContentIdFacetOptions = IndicatorFacetOptions & {
@@ -37,5 +37,6 @@ export type NgxMatDatatableOptions<Record> = {
37
37
  rowBackgroundColor?: Color<Record>;
38
38
  rowDisabled?: string | ((row: Record) => boolean);
39
39
  disableRowAnimation?: boolean;
40
+ expandedDetailContentId?: string;
40
41
  };
41
42
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eherve/angular-material-datatable",
3
- "version": "19.23.1",
3
+ "version": "19.23.3",
4
4
  "author": "Eric Herve <eric.herve.95@gmail.com>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,42 +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-DiH4sy4z.mjs';
9
- import { S as SelectOptionPipe, I as IsArrayPipe, a as SafeHtmlPipe } from './eherve-angular-material-datatable-eherve-angular-material-datatable-naAMdiRT.mjs';
10
- import { TransformPipe } from './eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs';
11
- import { Subscription } from 'rxjs';
12
-
13
- /** @format */
14
- class CellSelectValueComponent {
15
- column;
16
- row;
17
- options = [];
18
- subsink = new Subscription();
19
- ngOnInit() {
20
- if (Array.isArray(this.column.options))
21
- this.options = this.column.options;
22
- else {
23
- this.subsink.add(this.column.options.subscribe(options => (this.options = options)));
24
- }
25
- }
26
- ngOnDestroy() {
27
- this.subsink.unsubscribe();
28
- }
29
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellSelectValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
- 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 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 *ngIf=\"!column.iconOnly\" [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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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" }] });
31
- }
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellSelectValueComponent, decorators: [{
33
- type: Component,
34
- args: [{ selector: 'lib-cell-select-value', imports: [CommonModule, SelectOptionPipe, GetPipe, IsArrayPipe, MatIconModule, MatLabel, TransformPipe, SafeHtmlPipe], template: "<!-- @format -->\n\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 *ngIf=\"!column.iconOnly\" [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"] }]
35
- }], propDecorators: { column: [{
36
- type: Input
37
- }], row: [{
38
- type: Input
39
- }] } });
40
-
41
- export { CellSelectValueComponent };
42
- //# sourceMappingURL=eherve-angular-material-datatable-cell-select-value.component-hRxBNr9K.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eherve-angular-material-datatable-cell-select-value.component-hRxBNr9K.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, OnDestroy, OnInit } 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 { DatatableSearchListOption, DatatableSelectColumn } from '../../types/datatable-column.type';\nimport { IsArrayPipe } from '../../pipes/is-array.pipe';\nimport { Subscription } from 'rxjs';\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> implements OnInit, OnDestroy {\n @Input()\n column!: DatatableSelectColumn<Record>;\n\n @Input()\n row: any;\n\n options: DatatableSearchListOption[] = [];\n\n private subsink = new Subscription();\n\n ngOnInit(): void {\n if (Array.isArray(this.column.options)) this.options = this.column.options;\n else {\n this.subsink.add(this.column.options.subscribe(options => (this.options = options)));\n }\n }\n\n ngOnDestroy(): void {\n this.subsink.unsubscribe();\n }\n}\n","<!-- @format -->\n\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 *ngIf=\"!column.iconOnly\" [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;MAoBa,wBAAwB,CAAA;AAEnC,IAAA,MAAM;AAGN,IAAA,GAAG;IAEH,OAAO,GAAgC,EAAE;AAEjC,IAAA,OAAO,GAAG,IAAI,YAAY,EAAE;IAEpC,QAAQ,GAAA;QACN,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO;aACrE;YACH,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,GAA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