@eherve/angular-material-datatable 19.0.7 → 19.0.9
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-BsEd3gO0.mjs → eherve-angular-material-datatable-cell-checkbox-value.component-xQEp_EJL.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-BsEd3gO0.mjs.map → eherve-angular-material-datatable-cell-checkbox-value.component-xQEp_EJL.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-C_LQOP4q.mjs → eherve-angular-material-datatable-cell-date-value.component-CfQSWZTu.mjs} +5 -4
- package/fesm2022/eherve-angular-material-datatable-cell-date-value.component-CfQSWZTu.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-Bev5fbig.mjs → eherve-angular-material-datatable-cell-duration-value.component-CvZSXAJn.mjs} +4 -18
- package/fesm2022/eherve-angular-material-datatable-cell-duration-value.component-CvZSXAJn.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable-cell-number-value.component-i4BYCWFQ.mjs +25 -0
- package/fesm2022/eherve-angular-material-datatable-cell-number-value.component-i4BYCWFQ.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-cell-select-value.component-Q34AwSgQ.mjs → eherve-angular-material-datatable-cell-select-value.component-DW9CGEAB.mjs} +3 -3
- package/fesm2022/{eherve-angular-material-datatable-cell-select-value.component-Q34AwSgQ.mjs.map → eherve-angular-material-datatable-cell-select-value.component-DW9CGEAB.mjs.map} +1 -1
- package/fesm2022/eherve-angular-material-datatable-color.pipe-CSakeiTF.mjs +21 -0
- package/fesm2022/eherve-angular-material-datatable-color.pipe-CSakeiTF.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable-duration.pipe-DGcTUICF.mjs +24 -0
- package/fesm2022/eherve-angular-material-datatable-duration.pipe-DGcTUICF.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-eherve-angular-material-datatable-TOsr7FTn.mjs → eherve-angular-material-datatable-eherve-angular-material-datatable-DPrnvS5p.mjs} +109 -30
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-DPrnvS5p.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-get.pipe--ODBMh1N.mjs → eherve-angular-material-datatable-get.pipe-CCgMUDDx.mjs} +3 -1
- package/fesm2022/eherve-angular-material-datatable-get.pipe-CCgMUDDx.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/datatable.component.d.ts +5 -3
- package/lib/datatable.intl.d.ts +15 -0
- package/lib/datatable.module.d.ts +1 -1
- package/lib/directives/datatable-cell.directive.d.ts +4 -4
- package/lib/pipes/color.pipe.d.ts +9 -0
- package/lib/pipes/duration.pipe.d.ts +1 -1
- package/lib/pipes/find-cell-content.pipe.d.ts +5 -6
- package/lib/types/datatable-column.type.d.ts +10 -4
- package/package.json +1 -1
- package/fesm2022/eherve-angular-material-datatable-cell-date-value.component-C_LQOP4q.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-cell-duration-value.component-Bev5fbig.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-TOsr7FTn.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
- package/fesm2022/eherve-angular-material-datatable-get.pipe--ODBMh1N.mjs.map +0 -1
|
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { Component, Input } from '@angular/core';
|
|
4
4
|
import * as i5 from '@angular/material/icon';
|
|
5
5
|
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
-
import { GetPipe } from './eherve-angular-material-datatable-get.pipe
|
|
6
|
+
import { GetPipe } from './eherve-angular-material-datatable-get.pipe-CCgMUDDx.mjs';
|
|
7
7
|
|
|
8
8
|
/** @format */
|
|
9
9
|
class CellCheckboxValueComponent {
|
|
@@ -22,4 +22,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
22
22
|
}] } });
|
|
23
23
|
|
|
24
24
|
export { CellCheckboxValueComponent };
|
|
25
|
-
//# sourceMappingURL=eherve-angular-material-datatable-cell-checkbox-value.component-
|
|
25
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-checkbox-value.component-xQEp_EJL.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eherve-angular-material-datatable-cell-checkbox-value.component-
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-checkbox-value.component-xQEp_EJL.mjs","sources":["../../../projects/datatable/src/lib/components/cell-checkbox-value/cell-checkbox-value.component.ts","../../../projects/datatable/src/lib/components/cell-checkbox-value/cell-checkbox-value.component.html"],"sourcesContent":["/** @format */\n\nimport { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { GetPipe } from '../../pipes/get.pipe';\nimport { DatatableCheckboxColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-checkbox-value',\n imports: [CommonModule, GetPipe, MatIconModule],\n templateUrl: './cell-checkbox-value.component.html',\n styleUrl: './cell-checkbox-value.component.scss',\n})\nexport class CellCheckboxValueComponent {\n @Input()\n column!: DatatableCheckboxColumn;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value === false) {\n <mat-icon>check_box_outline_blank</mat-icon>\n} @else if (value === true) {\n <mat-icon color=\"primary\">check_box</mat-icon>\n}\n"],"names":["i1"],"mappings":";;;;;;;AAAA;MAca,0BAA0B,CAAA;AAErC,IAAA,MAAM;AAGN,IAAA,GAAG;uGALQ,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,6HCdvC,+NAQA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDEY,YAAY,EAAE,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,OAAO,2CAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAInC,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBANtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,WAC1B,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,+NAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA;8BAM/C,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -2,8 +2,9 @@ import { CommonModule } from '@angular/common';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Pipe, Component, Input } from '@angular/core';
|
|
4
4
|
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
-
import { GetPipe } from './eherve-angular-material-datatable-get.pipe
|
|
5
|
+
import { GetPipe } from './eherve-angular-material-datatable-get.pipe-CCgMUDDx.mjs';
|
|
6
6
|
import moment from 'moment';
|
|
7
|
+
import { D as DurationPipe } from './eherve-angular-material-datatable-duration.pipe-DGcTUICF.mjs';
|
|
7
8
|
|
|
8
9
|
/** @format */
|
|
9
10
|
class MomentFormatPipe {
|
|
@@ -43,11 +44,11 @@ class CellDateValueComponent {
|
|
|
43
44
|
column;
|
|
44
45
|
row;
|
|
45
46
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellDateValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: CellDateValueComponent, isStandalone: true, selector: "lib-cell-date-value", inputs: { column: "column", row: "row" }, ngImport: i0, template: "<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | momentFormat:column}}\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: GetPipe, name: "get" }, { kind: "ngmodule", type: MatIconModule }, { kind: "pipe", type: MomentFormatPipe, name: "momentFormat" }] });
|
|
47
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: CellDateValueComponent, isStandalone: true, selector: "lib-cell-date-value", inputs: { column: "column", row: "row" }, ngImport: i0, template: "<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | momentFormat: column }}\n @if (column.withDuration) {\n ({{ value | duration: column }})\n }\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: GetPipe, name: "get" }, { kind: "ngmodule", type: MatIconModule }, { kind: "pipe", type: MomentFormatPipe, name: "momentFormat" }, { kind: "pipe", type: DurationPipe, name: "duration" }] });
|
|
47
48
|
}
|
|
48
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellDateValueComponent, decorators: [{
|
|
49
50
|
type: Component,
|
|
50
|
-
args: [{ selector: 'lib-cell-date-value', imports: [CommonModule, GetPipe, MatIconModule, MomentFormatPipe], template: "<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | momentFormat:column}}\n}\n" }]
|
|
51
|
+
args: [{ selector: 'lib-cell-date-value', imports: [CommonModule, GetPipe, MatIconModule, MomentFormatPipe, DurationPipe], template: "<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | momentFormat: column }}\n @if (column.withDuration) {\n ({{ value | duration: column }})\n }\n}\n" }]
|
|
51
52
|
}], propDecorators: { column: [{
|
|
52
53
|
type: Input
|
|
53
54
|
}], row: [{
|
|
@@ -55,4 +56,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
55
56
|
}] } });
|
|
56
57
|
|
|
57
58
|
export { CellDateValueComponent };
|
|
58
|
-
//# sourceMappingURL=eherve-angular-material-datatable-cell-date-value.component-
|
|
59
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-date-value.component-CfQSWZTu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-date-value.component-CfQSWZTu.mjs","sources":["../../../projects/datatable/src/lib/pipes/moment-format.pipe.ts","../../../projects/datatable/src/lib/components/cell-date-value/cell-date-value.component.ts","../../../projects/datatable/src/lib/components/cell-date-value/cell-date-value.component.html"],"sourcesContent":["/** @format */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport moment, { Moment } from 'moment';\n\n@Pipe({ name: 'momentFormat' })\nexport class MomentFormatPipe implements PipeTransform {\n transform(data: any, options: { format?: string; locale?: string }): string {\n const date = this.getMoment(data);\n if (!date) return '';\n const format = options?.format || 'LLL';\n return options?.locale ? date.locale(options.locale).format(format) : date.format(format);\n }\n\n private getMoment(data: any): Moment | null {\n if (typeof data === 'string') return moment(data);\n if (typeof data === 'number') return moment(data);\n if (data instanceof Date) return moment(data);\n if (moment.isMoment(data)) return data.clone();\n if (typeof data?.valueOf === 'function') {\n const value = data.valueOf();\n if (typeof value === 'number') return moment(data);\n }\n return null;\n }\n}\n","/** @format */\n\nimport { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { GetPipe } from '../../pipes/get.pipe';\nimport { MomentFormatPipe } from '../../pipes/moment-format.pipe';\nimport { DatatableDateColumn } from '../../types/datatable-column.type';\nimport { DurationPipe } from '../../pipes/duration.pipe';\n\n@Component({\n selector: 'lib-cell-date-value',\n imports: [CommonModule, GetPipe, MatIconModule, MomentFormatPipe, DurationPipe],\n templateUrl: './cell-date-value.component.html',\n styleUrl: './cell-date-value.component.scss',\n})\nexport class CellDateValueComponent {\n @Input()\n column!: DatatableDateColumn;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | momentFormat: column }}\n @if (column.withDuration) {\n ({{ value | duration: column }})\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;MAMa,gBAAgB,CAAA;IAC3B,SAAS,CAAC,IAAS,EAAE,OAA6C,EAAA;QAChE,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;AACjC,QAAA,IAAI,CAAC,IAAI;AAAE,YAAA,OAAO,EAAE;AACpB,QAAA,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,KAAK;AACvC,QAAA,OAAO,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;;AAGnF,IAAA,SAAS,CAAC,IAAS,EAAA;QACzB,IAAI,OAAO,IAAI,KAAK,QAAQ;AAAE,YAAA,OAAO,MAAM,CAAC,IAAI,CAAC;QACjD,IAAI,OAAO,IAAI,KAAK,QAAQ;AAAE,YAAA,OAAO,MAAM,CAAC,IAAI,CAAC;QACjD,IAAI,IAAI,YAAY,IAAI;AAAE,YAAA,OAAO,MAAM,CAAC,IAAI,CAAC;AAC7C,QAAA,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;AAAE,YAAA,OAAO,IAAI,CAAC,KAAK,EAAE;AAC9C,QAAA,IAAI,OAAO,IAAI,EAAE,OAAO,KAAK,UAAU,EAAE;AACvC,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE;YAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ;AAAE,gBAAA,OAAO,MAAM,CAAC,IAAI,CAAC;;AAEpD,QAAA,OAAO,IAAI;;uGAjBF,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,IAAI;mBAAC,EAAE,IAAI,EAAE,cAAc,EAAE;;;ACL9B;MAgBa,sBAAsB,CAAA;AAEjC,IAAA,MAAM;AAGN,IAAA,GAAG;uGALQ,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,GAAA,EAAA,KAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBnC,kMASA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDGY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,OAAO,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,IAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,CAAA;;2FAInE,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;+BACE,qBAAqB,EAAA,OAAA,EACtB,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,CAAC,EAAA,QAAA,EAAA,kMAAA,EAAA;8BAM/E,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Component, Input } from '@angular/core';
|
|
4
4
|
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
-
import
|
|
6
|
-
import { GetPipe } from './eherve-angular-material-datatable-get.pipe
|
|
7
|
-
|
|
8
|
-
/** @format */
|
|
9
|
-
class DurationPipe {
|
|
10
|
-
transform(data, options) {
|
|
11
|
-
const duration = moment.duration(data);
|
|
12
|
-
return options?.locale ? duration.locale(options.locale).humanize() : duration.humanize();
|
|
13
|
-
}
|
|
14
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
15
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, isStandalone: true, name: "duration" });
|
|
16
|
-
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, decorators: [{
|
|
18
|
-
type: Pipe,
|
|
19
|
-
args: [{ name: 'duration' }]
|
|
20
|
-
}] });
|
|
5
|
+
import { D as DurationPipe } from './eherve-angular-material-datatable-duration.pipe-DGcTUICF.mjs';
|
|
6
|
+
import { GetPipe } from './eherve-angular-material-datatable-get.pipe-CCgMUDDx.mjs';
|
|
21
7
|
|
|
22
8
|
/** @format */
|
|
23
9
|
class CellDurationValueComponent {
|
|
@@ -36,4 +22,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
36
22
|
}] } });
|
|
37
23
|
|
|
38
24
|
export { CellDurationValueComponent };
|
|
39
|
-
//# sourceMappingURL=eherve-angular-material-datatable-cell-duration-value.component-
|
|
25
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-duration-value.component-CvZSXAJn.mjs.map
|
package/fesm2022/eherve-angular-material-datatable-cell-duration-value.component-CvZSXAJn.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-duration-value.component-CvZSXAJn.mjs","sources":["../../../projects/datatable/src/lib/components/cell-duration-value/cell-duration-value.component.ts","../../../projects/datatable/src/lib/components/cell-duration-value/cell-duration-value.component.html"],"sourcesContent":["/** @format */\n\nimport { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { DurationPipe } from '../../pipes/duration.pipe';\nimport { GetPipe } from '../../pipes/get.pipe';\nimport { DatatableDurationColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-duration-value',\n imports: [CommonModule, GetPipe, MatIconModule, DurationPipe],\n templateUrl: './cell-duration-value.component.html',\n styleUrl: './cell-duration-value.component.scss',\n})\nexport class CellDurationValueComponent {\n @Input()\n column!: DatatableDurationColumn;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | duration: column }}\n}\n"],"names":[],"mappings":";;;;;;;AAAA;MAea,0BAA0B,CAAA;AAErC,IAAA,MAAM;AAGN,IAAA,GAAG;uGALQ,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,GAAA,EAAA,KAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECfvC,oHAMA,EDKY,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,0BAAE,OAAO,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,CAAA;;2FAIjD,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBANtC,SAAS;+BACE,yBAAyB,EAAA,OAAA,EAC1B,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,EAAA,QAAA,EAAA,oHAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA;8BAM7D,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { MatIconModule } from '@angular/material/icon';
|
|
6
|
+
import { GetPipe } from './eherve-angular-material-datatable-get.pipe-CCgMUDDx.mjs';
|
|
7
|
+
|
|
8
|
+
/** @format */
|
|
9
|
+
class CellNumberValueComponent {
|
|
10
|
+
column;
|
|
11
|
+
row;
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellNumberValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: CellNumberValueComponent, isStandalone: true, selector: "lib-cell-number-value", inputs: { column: "column", row: "row" }, ngImport: i0, template: "<!-- @format -->\n\n@let value = row | get: column.property;\n{{ value | number: column.format : column.locale }}\n", styles: ["mat-icon{padding:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: GetPipe, name: "get" }, { kind: "ngmodule", type: MatIconModule }] });
|
|
14
|
+
}
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellNumberValueComponent, decorators: [{
|
|
16
|
+
type: Component,
|
|
17
|
+
args: [{ selector: 'lib-cell-number-value', imports: [CommonModule, GetPipe, MatIconModule], template: "<!-- @format -->\n\n@let value = row | get: column.property;\n{{ value | number: column.format : column.locale }}\n", styles: ["mat-icon{padding:8px}\n"] }]
|
|
18
|
+
}], propDecorators: { column: [{
|
|
19
|
+
type: Input
|
|
20
|
+
}], row: [{
|
|
21
|
+
type: Input
|
|
22
|
+
}] } });
|
|
23
|
+
|
|
24
|
+
export { CellNumberValueComponent };
|
|
25
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-number-value.component-i4BYCWFQ.mjs.map
|
package/fesm2022/eherve-angular-material-datatable-cell-number-value.component-i4BYCWFQ.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-number-value.component-i4BYCWFQ.mjs","sources":["../../../projects/datatable/src/lib/components/cell-number-value/cell-number-value.component.ts","../../../projects/datatable/src/lib/components/cell-number-value/cell-number-value.component.html"],"sourcesContent":["/** @format */\n\nimport { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { GetPipe } from '../../pipes/get.pipe';\nimport { DatatableNumberColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-number-value',\n imports: [CommonModule, GetPipe, MatIconModule],\n templateUrl: './cell-number-value.component.html',\n styleUrl: './cell-number-value.component.scss',\n})\nexport class CellNumberValueComponent {\n @Input()\n column!: DatatableNumberColumn;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let value = row | get: column.property;\n{{ value | number: column.format : column.locale }}\n"],"names":[],"mappings":";;;;;;;AAAA;MAca,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,2HCdrC,qHAIA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDMY,YAAY,EAAE,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,OAAO,2CAAE,aAAa,EAAA,CAAA,EAAA,CAAA;;2FAInC,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,WACxB,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,qHAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA;8BAM/C,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -5,8 +5,8 @@ import { Component, Input } from '@angular/core';
|
|
|
5
5
|
import { MatLabel } from '@angular/material/form-field';
|
|
6
6
|
import * as i5 from '@angular/material/icon';
|
|
7
7
|
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
-
import { GetPipe } from './eherve-angular-material-datatable-get.pipe
|
|
9
|
-
import { S as SelectOptionPipe } from './eherve-angular-material-datatable-eherve-angular-material-datatable-
|
|
8
|
+
import { GetPipe } from './eherve-angular-material-datatable-get.pipe-CCgMUDDx.mjs';
|
|
9
|
+
import { S as SelectOptionPipe } from './eherve-angular-material-datatable-eherve-angular-material-datatable-DPrnvS5p.mjs';
|
|
10
10
|
|
|
11
11
|
/** @format */
|
|
12
12
|
class CellSelectValueComponent {
|
|
@@ -25,4 +25,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
25
25
|
}] } });
|
|
26
26
|
|
|
27
27
|
export { CellSelectValueComponent };
|
|
28
|
-
//# sourceMappingURL=eherve-angular-material-datatable-cell-select-value.component-
|
|
28
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-select-value.component-DW9CGEAB.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eherve-angular-material-datatable-cell-select-value.component-
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-select-value.component-DW9CGEAB.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 { SelectOptionPipe } from '../../pipes/select-option.pipe';\nimport { DatatableSelectColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-select-value',\n imports: [CommonModule, SelectOptionPipe, GetPipe, MatIconModule, MatLabel],\n templateUrl: './cell-select-value.component.html',\n styleUrl: './cell-select-value.component.scss',\n})\nexport class CellSelectValueComponent {\n @Input()\n column!: DatatableSelectColumn;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let options = $any(column.options | async);\n@let value = row | get: column.property;\n@let option = row | get: column.property | selectOption: options;\n\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\"></mat-label>\n </div>\n} @else {\n {{ value }}\n}\n"],"names":["i2"],"mappings":";;;;;;;;;;AAAA;MAgBa,wBAAwB,CAAA;AAEnC,IAAA,MAAM;AAGN,IAAA,GAAG;uGALQ,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,GAAA,EAAA,KAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBrC,6fAkBA,EAAA,MAAA,EAAA,CAAA,gHAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDNY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,IAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,OAAO,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,QAAQ,EAAA,QAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAI/D,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;+BACE,uBAAuB,EAAA,OAAA,EACxB,CAAC,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAA,QAAA,EAAA,6fAAA,EAAA,MAAA,EAAA,CAAA,gHAAA,CAAA,EAAA;8BAM3E,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Pipe } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/** @format */
|
|
5
|
+
class ColorPipe {
|
|
6
|
+
transform(row, column) {
|
|
7
|
+
if (typeof column.color === 'string')
|
|
8
|
+
return column.color;
|
|
9
|
+
if (typeof column.color === 'function')
|
|
10
|
+
return column.color(row);
|
|
11
|
+
}
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
13
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: ColorPipe, isStandalone: true, name: "color" });
|
|
14
|
+
}
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColorPipe, decorators: [{
|
|
16
|
+
type: Pipe,
|
|
17
|
+
args: [{ name: 'color' }]
|
|
18
|
+
}] });
|
|
19
|
+
|
|
20
|
+
export { ColorPipe };
|
|
21
|
+
//# sourceMappingURL=eherve-angular-material-datatable-color.pipe-CSakeiTF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-color.pipe-CSakeiTF.mjs","sources":["../../../projects/datatable/src/lib/pipes/color.pipe.ts"],"sourcesContent":["/** @format */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport { DatatableValueColumn } from '../types/datatable-column.type';\n\n@Pipe({ name: 'color' })\nexport class ColorPipe implements PipeTransform {\n transform(row: any, column: DatatableValueColumn): string | void {\n if (typeof column.color === 'string') return column.color;\n if (typeof column.color === 'function') return column.color(row);\n }\n}\n"],"names":[],"mappings":";;;AAAA;MAMa,SAAS,CAAA;IACpB,SAAS,CAAC,GAAQ,EAAE,MAA4B,EAAA;AAC9C,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;YAAE,OAAO,MAAM,CAAC,KAAK;AACzD,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,UAAU;AAAE,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;;uGAHvD,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBADrB,IAAI;mBAAC,EAAE,IAAI,EAAE,OAAO,EAAE;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Pipe } from '@angular/core';
|
|
3
|
+
import moment from 'moment';
|
|
4
|
+
|
|
5
|
+
/** @format */
|
|
6
|
+
class DurationPipe {
|
|
7
|
+
transform(data, options) {
|
|
8
|
+
let duration;
|
|
9
|
+
if (typeof data === 'number')
|
|
10
|
+
duration = moment.duration(data);
|
|
11
|
+
else
|
|
12
|
+
duration = moment.duration(Date.now() - data.valueOf());
|
|
13
|
+
return options?.locale ? duration.locale(options.locale).humanize() : duration.humanize();
|
|
14
|
+
}
|
|
15
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
16
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, isStandalone: true, name: "duration" });
|
|
17
|
+
}
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, decorators: [{
|
|
19
|
+
type: Pipe,
|
|
20
|
+
args: [{ name: 'duration' }]
|
|
21
|
+
}] });
|
|
22
|
+
|
|
23
|
+
export { DurationPipe as D };
|
|
24
|
+
//# sourceMappingURL=eherve-angular-material-datatable-duration.pipe-DGcTUICF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-duration.pipe-DGcTUICF.mjs","sources":["../../../projects/datatable/src/lib/pipes/duration.pipe.ts"],"sourcesContent":["/** @format */\n\nimport { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'duration' })\nexport class DurationPipe implements PipeTransform {\n transform(data: number | Date, options: { locale?: string }): string {\n let duration: moment.Duration;\n if (typeof data === 'number') duration = moment.duration(data);\n else duration = moment.duration(Date.now() - data.valueOf());\n return options?.locale ? duration.locale(options.locale).humanize() : duration.humanize();\n }\n}\n"],"names":[],"mappings":";;;;AAAA;MAMa,YAAY,CAAA;IACvB,SAAS,CAAC,IAAmB,EAAE,OAA4B,EAAA;AACzD,QAAA,IAAI,QAAyB;QAC7B,IAAI,OAAO,IAAI,KAAK,QAAQ;AAAE,YAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;;AACzD,YAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5D,OAAO,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE;;uGALhF,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,IAAI;mBAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;;;;"}
|