@eherve/angular-material-datatable 19.0.8 → 19.0.10
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-BMqF1wsU.mjs} +5 -4
- package/fesm2022/eherve-angular-material-datatable-cell-checkbox-value.component-BMqF1wsU.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-C_LQOP4q.mjs → eherve-angular-material-datatable-cell-date-value.component-Cd6GgJqh.mjs} +6 -4
- package/fesm2022/eherve-angular-material-datatable-cell-date-value.component-Cd6GgJqh.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable-cell-duration-value.component-CQhFk_95.mjs +26 -0
- package/fesm2022/eherve-angular-material-datatable-cell-duration-value.component-CQhFk_95.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-dz3XviiN.mjs → eherve-angular-material-datatable-cell-number-value.component-D2Zu_4_n.mjs} +5 -4
- package/fesm2022/eherve-angular-material-datatable-cell-number-value.component-D2Zu_4_n.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-BcxFh9wY.mjs +29 -0
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-BcxFh9wY.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable-duration.pipe-J-cJbdHg.mjs +26 -0
- package/fesm2022/eherve-angular-material-datatable-duration.pipe-J-cJbdHg.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-eherve-angular-material-datatable-Cg0TK8KO.mjs → eherve-angular-material-datatable-eherve-angular-material-datatable-CqW6stzk.mjs} +131 -24
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-CqW6stzk.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-transform.pipe-BOmcXXZU.mjs +21 -0
- package/fesm2022/eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs.map +1 -0
- package/fesm2022/eherve-angular-material-datatable.mjs +1 -1
- package/lib/components/cell-checkbox-value/cell-checkbox-value.component.d.ts +4 -4
- package/lib/components/cell-date-value/cell-date-value.component.d.ts +4 -4
- package/lib/components/cell-duration-value/cell-duration-value.component.d.ts +4 -4
- package/lib/components/cell-number-value/cell-number-value.component.d.ts +4 -4
- package/lib/components/cell-select-value/cell-select-value.component.d.ts +4 -4
- package/lib/components/header-autocomplete-filter/header-autocomplete-filter.component.d.ts +4 -4
- package/lib/components/header-checkbox-filter/header-checkbox-filter.component.d.ts +4 -4
- package/lib/components/header-date-filter/header-date-filter.component.d.ts +4 -4
- package/lib/components/header-duration-filter/header-duration-filter.component.d.ts +4 -4
- package/lib/components/header-number-filter/header-number-filter.component.d.ts +4 -4
- package/lib/components/header-select-filter/header-select-filter.component.d.ts +4 -4
- package/lib/components/header-text-filter/header-text-filter.component.d.ts +4 -4
- package/lib/datatable.component.d.ts +9 -5
- package/lib/datatable.intl.d.ts +15 -0
- package/lib/pipes/color.pipe.d.ts +9 -0
- package/lib/pipes/duration.pipe.d.ts +1 -1
- package/lib/pipes/transform.pipe.d.ts +9 -0
- package/lib/types/datatable-column.type.d.ts +26 -20
- package/lib/types/datatable-options.type.d.ts +2 -1
- package/package.json +1 -1
- package/fesm2022/eherve-angular-material-datatable-cell-checkbox-value.component-BsEd3gO0.mjs.map +0 -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 +0 -39
- package/fesm2022/eherve-angular-material-datatable-cell-duration-value.component-Bev5fbig.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-cell-number-value.component-dz3XviiN.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-D4VrsZhO.mjs +0 -28
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-D4VrsZhO.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-Cg0TK8KO.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-get.pipe--ODBMh1N.mjs.map +0 -1
|
@@ -3,18 +3,19 @@ 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
|
+
import { TransformPipe } from './eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs';
|
|
7
8
|
|
|
8
9
|
/** @format */
|
|
9
10
|
class CellCheckboxValueComponent {
|
|
10
11
|
column;
|
|
11
12
|
row;
|
|
12
13
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellCheckboxValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: CellCheckboxValueComponent, isStandalone: true, selector: "lib-cell-checkbox-value", inputs: { column: "column", row: "row" }, ngImport: i0, template: "<!-- @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", styles: ["mat-icon{padding:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: GetPipe, name: "get" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: CellCheckboxValueComponent, isStandalone: true, selector: "lib-cell-checkbox-value", inputs: { column: "column", row: "row" }, ngImport: i0, template: "<!-- @format -->\n\n@let value = row | get: column.property | transform: row : column;\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", styles: ["mat-icon{padding:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: GetPipe, name: "get" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: TransformPipe, name: "transform" }] });
|
|
14
15
|
}
|
|
15
16
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellCheckboxValueComponent, decorators: [{
|
|
16
17
|
type: Component,
|
|
17
|
-
args: [{ selector: 'lib-cell-checkbox-value', imports: [CommonModule, GetPipe, MatIconModule], template: "<!-- @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", styles: ["mat-icon{padding:8px}\n"] }]
|
|
18
|
+
args: [{ selector: 'lib-cell-checkbox-value', imports: [CommonModule, GetPipe, MatIconModule, TransformPipe], template: "<!-- @format -->\n\n@let value = row | get: column.property | transform: row : column;\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", styles: ["mat-icon{padding:8px}\n"] }]
|
|
18
19
|
}], propDecorators: { column: [{
|
|
19
20
|
type: Input
|
|
20
21
|
}], row: [{
|
|
@@ -22,4 +23,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
22
23
|
}] } });
|
|
23
24
|
|
|
24
25
|
export { CellCheckboxValueComponent };
|
|
25
|
-
//# sourceMappingURL=eherve-angular-material-datatable-cell-checkbox-value.component-
|
|
26
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-checkbox-value.component-BMqF1wsU.mjs.map
|
package/fesm2022/eherve-angular-material-datatable-cell-checkbox-value.component-BMqF1wsU.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-checkbox-value.component-BMqF1wsU.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 { TransformPipe } from '../../pipes/transform.pipe';\nimport { DatatableCheckboxColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-checkbox-value',\n imports: [CommonModule, GetPipe, MatIconModule, TransformPipe],\n templateUrl: './cell-checkbox-value.component.html',\n styleUrl: './cell-checkbox-value.component.scss',\n})\nexport class CellCheckboxValueComponent<Record> {\n @Input()\n column!: DatatableCheckboxColumn<Record>;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let value = row | get: column.property | transform: row : column;\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;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,yPAQA,EDGY,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,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,MAAA,EAAA,IAAA,EAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAIlD,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBANtC,SAAS;+BACE,yBAAyB,EAAA,OAAA,EAC1B,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,yPAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA;8BAM9D,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -2,8 +2,10 @@ 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 {
|
|
5
|
+
import { D as DurationPipe } from './eherve-angular-material-datatable-duration.pipe-J-cJbdHg.mjs';
|
|
6
|
+
import { GetPipe } from './eherve-angular-material-datatable-get.pipe-CCgMUDDx.mjs';
|
|
6
7
|
import moment from 'moment';
|
|
8
|
+
import { TransformPipe } from './eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs';
|
|
7
9
|
|
|
8
10
|
/** @format */
|
|
9
11
|
class MomentFormatPipe {
|
|
@@ -43,11 +45,11 @@ class CellDateValueComponent {
|
|
|
43
45
|
column;
|
|
44
46
|
row;
|
|
45
47
|
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" }] });
|
|
48
|
+
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 | transform: row : column;\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" }, { kind: "pipe", type: TransformPipe, name: "transform" }] });
|
|
47
49
|
}
|
|
48
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellDateValueComponent, decorators: [{
|
|
49
51
|
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" }]
|
|
52
|
+
args: [{ selector: 'lib-cell-date-value', imports: [CommonModule, GetPipe, MatIconModule, MomentFormatPipe, DurationPipe, TransformPipe], template: "<!-- @format -->\n\n@let value = row | get: column.property | transform: row : column;\n@if (value) {\n {{ value | momentFormat: column }}\n @if (column.withDuration) {\n ({{ value | duration: column }})\n }\n}\n" }]
|
|
51
53
|
}], propDecorators: { column: [{
|
|
52
54
|
type: Input
|
|
53
55
|
}], row: [{
|
|
@@ -55,4 +57,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
55
57
|
}] } });
|
|
56
58
|
|
|
57
59
|
export { CellDateValueComponent };
|
|
58
|
-
//# sourceMappingURL=eherve-angular-material-datatable-cell-date-value.component-
|
|
60
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-date-value.component-Cd6GgJqh.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-date-value.component-Cd6GgJqh.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 { DurationPipe } from '../../pipes/duration.pipe';\nimport { GetPipe } from '../../pipes/get.pipe';\nimport { MomentFormatPipe } from '../../pipes/moment-format.pipe';\nimport { TransformPipe } from '../../pipes/transform.pipe';\nimport { DatatableDateColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-date-value',\n imports: [CommonModule, GetPipe, MatIconModule, MomentFormatPipe, DurationPipe, TransformPipe],\n templateUrl: './cell-date-value.component.html',\n styleUrl: './cell-date-value.component.scss',\n})\nexport class CellDateValueComponent<Record> {\n @Input()\n column!: DatatableDateColumn<Record>;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let value = row | get: column.property | transform: row : column;\n@if (value) {\n {{ value | momentFormat: column }}\n @if (column.withDuration) {\n ({{ value | duration: column }})\n }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Component, Input } from '@angular/core';
|
|
4
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
+
import { D as DurationPipe } from './eherve-angular-material-datatable-duration.pipe-J-cJbdHg.mjs';
|
|
6
|
+
import { GetPipe } from './eherve-angular-material-datatable-get.pipe-CCgMUDDx.mjs';
|
|
7
|
+
import { TransformPipe } from './eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs';
|
|
8
|
+
|
|
9
|
+
/** @format */
|
|
10
|
+
class CellDurationValueComponent {
|
|
11
|
+
column;
|
|
12
|
+
row;
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellDurationValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: CellDurationValueComponent, isStandalone: true, selector: "lib-cell-duration-value", inputs: { column: "column", row: "row" }, ngImport: i0, template: "<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | transform: row : column | duration: column }}\n}\n", styles: ["mat-icon{padding:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: GetPipe, name: "get" }, { kind: "ngmodule", type: MatIconModule }, { kind: "pipe", type: DurationPipe, name: "duration" }, { kind: "pipe", type: TransformPipe, name: "transform" }] });
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellDurationValueComponent, decorators: [{
|
|
17
|
+
type: Component,
|
|
18
|
+
args: [{ selector: 'lib-cell-duration-value', imports: [CommonModule, GetPipe, MatIconModule, DurationPipe, TransformPipe], template: "<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | transform: row : column | duration: column }}\n}\n", styles: ["mat-icon{padding:8px}\n"] }]
|
|
19
|
+
}], propDecorators: { column: [{
|
|
20
|
+
type: Input
|
|
21
|
+
}], row: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}] } });
|
|
24
|
+
|
|
25
|
+
export { CellDurationValueComponent };
|
|
26
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-duration-value.component-CQhFk_95.mjs.map
|
package/fesm2022/eherve-angular-material-datatable-cell-duration-value.component-CQhFk_95.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-duration-value.component-CQhFk_95.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 { TransformPipe } from '../../pipes/transform.pipe';\nimport { DatatableDurationColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-duration-value',\n imports: [CommonModule, GetPipe, MatIconModule, DurationPipe, TransformPipe],\n templateUrl: './cell-duration-value.component.html',\n styleUrl: './cell-duration-value.component.scss',\n})\nexport class CellDurationValueComponent<Record> {\n @Input()\n column!: DatatableDurationColumn<Record>;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let value = row | get: column.property;\n@if (value) {\n {{ value | transform: row : column | duration: column }}\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;MAgBa,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,EChBvC,8IAMA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDMY,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,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAIhE,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBANtC,SAAS;+BACE,yBAAyB,EAAA,OAAA,EAC1B,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,8IAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA;8BAM5E,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -3,18 +3,19 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Component, Input } from '@angular/core';
|
|
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
|
+
import { TransformPipe } from './eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs';
|
|
7
8
|
|
|
8
9
|
/** @format */
|
|
9
10
|
class CellNumberValueComponent {
|
|
10
11
|
column;
|
|
11
12
|
row;
|
|
12
13
|
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
|
+
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 | transform: row : column | 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 }, { kind: "pipe", type: TransformPipe, name: "transform" }] });
|
|
14
15
|
}
|
|
15
16
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CellNumberValueComponent, decorators: [{
|
|
16
17
|
type: Component,
|
|
17
|
-
args: [{ selector: 'lib-cell-number-value', imports: [CommonModule, GetPipe, MatIconModule], template: "<!-- @format -->\n\n@let value = row | get: column.property;\n
|
|
18
|
+
args: [{ selector: 'lib-cell-number-value', imports: [CommonModule, GetPipe, MatIconModule, TransformPipe], template: "<!-- @format -->\n\n@let value = row | get: column.property;\n{{ value | transform: row : column | number: column.format : column.locale }}\n", styles: ["mat-icon{padding:8px}\n"] }]
|
|
18
19
|
}], propDecorators: { column: [{
|
|
19
20
|
type: Input
|
|
20
21
|
}], row: [{
|
|
@@ -22,4 +23,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
22
23
|
}] } });
|
|
23
24
|
|
|
24
25
|
export { CellNumberValueComponent };
|
|
25
|
-
//# sourceMappingURL=eherve-angular-material-datatable-cell-number-value.component-
|
|
26
|
+
//# sourceMappingURL=eherve-angular-material-datatable-cell-number-value.component-D2Zu_4_n.mjs.map
|
package/fesm2022/eherve-angular-material-datatable-cell-number-value.component-D2Zu_4_n.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-number-value.component-D2Zu_4_n.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 { TransformPipe } from '../../pipes/transform.pipe';\nimport { DatatableNumberColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-number-value',\n imports: [CommonModule, GetPipe, MatIconModule, TransformPipe],\n templateUrl: './cell-number-value.component.html',\n styleUrl: './cell-number-value.component.scss',\n})\nexport class CellNumberValueComponent<Record> {\n @Input()\n column!: DatatableNumberColumn<Record>;\n\n @Input()\n row: any;\n}\n","<!-- @format -->\n\n@let value = row | get: column.property;\n{{ value | transform: row : column | number: column.format : column.locale }}\n"],"names":[],"mappings":";;;;;;;;AAAA;MAea,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,ECfrC,+IAIA,EDOY,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,kFAAE,OAAO,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAIlD,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;+BACE,uBAAuB,EAAA,OAAA,EACxB,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,+IAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA;8BAM9D,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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-CCgMUDDx.mjs';
|
|
9
|
+
import { S as SelectOptionPipe } from './eherve-angular-material-datatable-eherve-angular-material-datatable-CqW6stzk.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@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", styles: [".option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}:host-context(tr.has-click:hover) mat-icon,:host-context(tr.has-click:hover) mat-label{color:var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary))!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: SelectOptionPipe, name: "selectOption" }, { kind: "pipe", type: GetPipe, name: "get" }, { 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" }] });
|
|
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, MatIconModule, MatLabel, TransformPipe], template: "<!-- @format -->\n\n@let options = $any(column.options | async);\n@let value = row | get: column.property | transform: row : column;\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", styles: [".option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}:host-context(tr.has-click:hover) mat-icon,:host-context(tr.has-click:hover) mat-label{color:var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary))!important}\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-BcxFh9wY.mjs.map
|
package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-BcxFh9wY.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-cell-select-value.component-BcxFh9wY.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 { TransformPipe } from '../../pipes/transform.pipe';\nimport { DatatableSelectColumn } from '../../types/datatable-column.type';\n\n@Component({\n selector: 'lib-cell-select-value',\n imports: [CommonModule, SelectOptionPipe, GetPipe, MatIconModule, MatLabel, TransformPipe],\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@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;MAiBa,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,ECjBrC,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,EAAA,uhBAkBA,EDLY,MAAA,EAAA,CAAA,uRAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,EAAE,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,gBAAgB,EAAE,IAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,OAAO,EAAE,IAAA,EAAA,KAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,aAAa,EAAE,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,EAAA,QAAQ,iDAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAI9E,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EACxB,OAAA,EAAA,CAAC,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,uhBAAA,EAAA,MAAA,EAAA,CAAA,uRAAA,CAAA,EAAA;8BAM1F,MAAM,EAAA,CAAA;sBADL;gBAID,GAAG,EAAA,CAAA;sBADF;;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
if (typeof data === 'string')
|
|
12
|
+
duration = moment.duration(Date.now() - new Date(data).valueOf());
|
|
13
|
+
else
|
|
14
|
+
duration = moment.duration(Date.now() - data.valueOf());
|
|
15
|
+
return options?.locale ? duration.locale(options.locale).humanize() : duration.humanize();
|
|
16
|
+
}
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
18
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, isStandalone: true, name: "duration" });
|
|
19
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DurationPipe, decorators: [{
|
|
21
|
+
type: Pipe,
|
|
22
|
+
args: [{ name: 'duration' }]
|
|
23
|
+
}] });
|
|
24
|
+
|
|
25
|
+
export { DurationPipe as D };
|
|
26
|
+
//# sourceMappingURL=eherve-angular-material-datatable-duration.pipe-J-cJbdHg.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eherve-angular-material-datatable-duration.pipe-J-cJbdHg.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 | string | Date, options: { locale?: string }): string {\n let duration: moment.Duration;\n if (typeof data === 'number') duration = moment.duration(data);\n if (typeof data === 'string') duration = moment.duration(Date.now() - new Date(data).valueOf());\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,IAA4B,EAAE,OAA4B,EAAA;AAClE,QAAA,IAAI,QAAyB;QAC7B,IAAI,OAAO,IAAI,KAAK,QAAQ;AAAE,YAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC9D,IAAI,OAAO,IAAI,KAAK,QAAQ;AAAE,YAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;;AAC1F,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;;uGANhF,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;;;;;"}
|