@ni/nimble-angular 17.7.1 → 17.8.1

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.
@@ -0,0 +1,30 @@
1
+ import { Inject, LOCALE_ID, Pipe } from '@angular/core';
2
+ import { DurationFormatter } from '@ni/nimble-components/dist/esm/table-column/duration-text/models/duration-formatter';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * A pipe that transforms a number of milliseconds (string/number) into a string formatted like "1 day, 2 hr, 3 min, 4.567 sec"
6
+ */
7
+ export class DurationPipe {
8
+ constructor(locale) {
9
+ this.durationFormatter = new DurationFormatter(locale);
10
+ }
11
+ transform(timeInMilliseconds) {
12
+ const milliseconds = this.parseDuration(timeInMilliseconds);
13
+ return this.durationFormatter.format(milliseconds);
14
+ }
15
+ parseDuration(duration) {
16
+ return typeof duration === 'string' ? parseFloat(duration) : duration;
17
+ }
18
+ }
19
+ DurationPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
20
+ DurationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, name: "duration" });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, decorators: [{
22
+ type: Pipe,
23
+ args: [{
24
+ name: 'duration'
25
+ }]
26
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
27
+ type: Inject,
28
+ args: [LOCALE_ID]
29
+ }] }]; } });
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHVyYXRpb24ucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25pL25pbWJsZS1hbmd1bGFyL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YmVyIHwgbnVsbCB8IHVuZGVmaW5lZCB7XG4gICAgICAgIHJldHVybiB0eXBlb2YgZHVyYXRpb24gPT09ICdzdHJpbmcnID8gcGFyc2VGbG9hdChkdXJhdGlvbikgOiBkdXJhdGlvbjtcbiAgICB9XG59XG4iXX0=
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmktbmltYmxlLWFuZ3VsYXItcGlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uaS9uaW1ibGUtYW5ndWxhci9waXBlcy9uaS1uaW1ibGUtYW5ndWxhci1waXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
@@ -0,0 +1,2 @@
1
+ export * from './duration.pipe';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25pL25pbWJsZS1hbmd1bGFyL3BpcGVzL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxpQkFBaUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZHVyYXRpb24ucGlwZSc7Il19
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmktbmltYmxlLWFuZ3VsYXItdGFibGUtY29sdW1uLWR1cmF0aW9uLXRleHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uaS9uaW1ibGUtYW5ndWxhci90YWJsZS1jb2x1bW4vZHVyYXRpb24tdGV4dC9uaS1uaW1ibGUtYW5ndWxhci10YWJsZS1jb2x1bW4tZHVyYXRpb24tdGV4dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
@@ -0,0 +1,78 @@
1
+ import { Directive, Input } from '@angular/core';
2
+ import { tableColumnDurationTextTag } from '@ni/nimble-components/dist/esm/table-column/duration-text';
3
+ import { toBooleanProperty, toNullableNumberProperty } from '@ni/nimble-angular/internal-utilities';
4
+ import { NimbleTableColumnBaseDirective } from '@ni/nimble-angular/table-column';
5
+ import * as i0 from "@angular/core";
6
+ export { tableColumnDurationTextTag };
7
+ /**
8
+ * Directive to provide Angular integration for the table column element for duration text.
9
+ */
10
+ export class NimbleTableColumnDurationTextDirective extends NimbleTableColumnBaseDirective {
11
+ constructor(renderer, elementRef) {
12
+ super(renderer, elementRef);
13
+ }
14
+ get fieldName() {
15
+ return this.elementRef.nativeElement.fieldName;
16
+ }
17
+ // Renaming because property should have camel casing, but attribute should not
18
+ // eslint-disable-next-line @angular-eslint/no-input-rename
19
+ set fieldName(value) {
20
+ this.renderer.setProperty(this.elementRef.nativeElement, 'fieldName', value);
21
+ }
22
+ get fractionalWidth() {
23
+ return this.elementRef.nativeElement.fractionalWidth;
24
+ }
25
+ // Renaming because property should have camel casing, but attribute should not
26
+ // eslint-disable-next-line @angular-eslint/no-input-rename
27
+ set fractionalWidth(value) {
28
+ this.renderer.setProperty(this.elementRef.nativeElement, 'fractionalWidth', toNullableNumberProperty(value));
29
+ }
30
+ get minPixelWidth() {
31
+ return this.elementRef.nativeElement.minPixelWidth;
32
+ }
33
+ // Renaming because property should have camel casing, but attribute should not
34
+ // eslint-disable-next-line @angular-eslint/no-input-rename
35
+ set minPixelWidth(value) {
36
+ this.renderer.setProperty(this.elementRef.nativeElement, 'minPixelWidth', toNullableNumberProperty(value));
37
+ }
38
+ get groupIndex() {
39
+ return this.elementRef.nativeElement.groupIndex;
40
+ }
41
+ // Renaming because property should have camel casing, but attribute should not
42
+ // eslint-disable-next-line @angular-eslint/no-input-rename
43
+ set groupIndex(value) {
44
+ this.renderer.setProperty(this.elementRef.nativeElement, 'groupIndex', toNullableNumberProperty(value));
45
+ }
46
+ get groupingDisabled() {
47
+ return this.elementRef.nativeElement.groupingDisabled;
48
+ }
49
+ // Renaming because property should have camel casing, but attribute should not
50
+ // eslint-disable-next-line @angular-eslint/no-input-rename
51
+ set groupingDisabled(value) {
52
+ this.renderer.setProperty(this.elementRef.nativeElement, 'groupingDisabled', toBooleanProperty(value));
53
+ }
54
+ }
55
+ NimbleTableColumnDurationTextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
56
+ NimbleTableColumnDurationTextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NimbleTableColumnDurationTextDirective, selector: "nimble-table-column-duration-text", inputs: { fieldName: ["field-name", "fieldName"], fractionalWidth: ["fractional-width", "fractionalWidth"], minPixelWidth: ["min-pixel-width", "minPixelWidth"], groupIndex: ["group-index", "groupIndex"], groupingDisabled: ["grouping-disabled", "groupingDisabled"] }, usesInheritance: true, ngImport: i0 });
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextDirective, decorators: [{
58
+ type: Directive,
59
+ args: [{
60
+ selector: 'nimble-table-column-duration-text'
61
+ }]
62
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { fieldName: [{
63
+ type: Input,
64
+ args: ['field-name']
65
+ }], fractionalWidth: [{
66
+ type: Input,
67
+ args: ['fractional-width']
68
+ }], minPixelWidth: [{
69
+ type: Input,
70
+ args: ['min-pixel-width']
71
+ }], groupIndex: [{
72
+ type: Input,
73
+ args: ['group-index']
74
+ }], groupingDisabled: [{
75
+ type: Input,
76
+ args: ['grouping-disabled']
77
+ }] } });
78
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmltYmxlLXRhYmxlLWNvbHVtbi1kdXJhdGlvbi10ZXh0LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25pL25pbWJsZS1hbmd1bGFyL3RhYmxlLWNvbHVtbi9kdXJhdGlvbi10ZXh0L25pbWJsZS10YWJsZS1jb2x1bW4tZHVyYXRpb24tdGV4dC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBYyxLQUFLLEVBQWEsTUFBTSxlQUFlLENBQUM7QUFDeEUsT0FBTyxFQUFnQywwQkFBMEIsRUFBRSxNQUFNLDJEQUEyRCxDQUFDO0FBQ3JJLE9BQU8sRUFBbUQsaUJBQWlCLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQUNySixPQUFPLEVBQUU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YW1lXG4gICAgQElucHV0KCdncm91cGluZy1kaXNhYmxlZCcpIHB1YmxpYyBzZXQgZ3JvdXBpbmdEaXNhYmxlZCh2YWx1ZTogQm9vbGVhblZhbHVlT3JBdHRyaWJ1dGUpIHtcbiAgICAgICAgdGhpcy5yZW5kZXJlci5zZXRQcm9wZXJ0eSh0aGlzLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgJ2dyb3VwaW5nRGlzYWJsZWQnLCB0b0Jvb2xlYW5Qcm9wZXJ0eSh2YWx1ZSkpO1xuICAgIH1cblxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvcihyZW5kZXJlcjogUmVuZGVyZXIyLCBlbGVtZW50UmVmOiBFbGVtZW50UmVmPFRhYmxlQ29sdW1uRHVyYXRpb25UZXh0Pikge1xuICAgICAgICBzdXBlcihyZW5kZXJlciwgZWxlbWVudFJlZik7XG4gICAgfVxufVxuIl19
@@ -0,0 +1,19 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { NimbleTableColumnDurationTextDirective } from './nimble-table-column-duration-text.directive';
4
+ import '@ni/nimble-components/dist/esm/table-column/duration-text';
5
+ import * as i0 from "@angular/core";
6
+ export class NimbleTableColumnDurationTextModule {
7
+ }
8
+ NimbleTableColumnDurationTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9
+ NimbleTableColumnDurationTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, declarations: [NimbleTableColumnDurationTextDirective], imports: [CommonModule], exports: [NimbleTableColumnDurationTextDirective] });
10
+ NimbleTableColumnDurationTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, imports: [CommonModule] });
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, decorators: [{
12
+ type: NgModule,
13
+ args: [{
14
+ declarations: [NimbleTableColumnDurationTextDirective],
15
+ imports: [CommonModule],
16
+ exports: [NimbleTableColumnDurationTextDirective]
17
+ }]
18
+ }] });
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmltYmxlLXRhYmxlLWNvbHVtbi1kdXJhdGlvbi10ZXh0Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25pL25pbWJsZS1hbmd1bGFyL3RhYmxlLWNvbHVtbi9kdXJhdGlvbi10ZXh0L25pbWJsZS10YWJsZS1jb2x1bW4tZHVyYXRpb24tdGV4dC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLHNDQUFzQyxFQUFFLE1BQU0sK0NBQStDLENBQUM7QUFFdkcsT0FBTywyREFBMkQsQ0FBQzs7QUFPbkUsTUFBTSxPQUFPLG1DQUFtQzs7Z0lBQW5DLG1DQUFtQztpSUFBbkMsbUNBQW1DLGlCQUo3QixzQ0FBc0MsYUFDM0MsWUFBWSxhQUNaLHNDQUFzQztpSUFFdkMsbUNBQW1DLFlBSGxDLFlBQVk7MkZBR2IsbUNBQW1DO2tCQUwvQyxRQUFRO21CQUFDO29CQUNOLFlBQVksRUFBRSxDQUFDLHNDQUFzQyxDQUFDO29CQUN0RCxPQUFPLEVBQUUsQ0FBQyxZQUFZLENBQUM7b0JBQ3ZCLE9BQU8sRUFBRSxDQUFDLHNDQUFzQyxDQUFDO2lCQUNwRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuaW1wb3J0IHsgTmltYmxlVGFibGVDb2x1bW5EdXJhdGlvblRleHREaXJlY3RpdmUgfSBmcm9tICcuL25pbWJsZS10YWJsZS1jb2x1bW4tZHVyYXRpb24tdGV4dC5kaXJlY3RpdmUnO1xuXG5pbXBvcnQgJ0BuaS9uaW1ibGUtY29tcG9uZW50cy9kaXN0L2VzbS90YWJsZS1jb2x1bW4vZHVyYXRpb24tdGV4dCc7XG5cbkBOZ01vZHVsZSh7XG4gICAgZGVjbGFyYXRpb25zOiBbTmltYmxlVGFibGVDb2x1bW5EdXJhdGlvblRleHREaXJlY3RpdmVdLFxuICAgIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxuICAgIGV4cG9ydHM6IFtOaW1ibGVUYWJsZUNvbHVtbkR1cmF0aW9uVGV4dERpcmVjdGl2ZV1cbn0pXG5leHBvcnQgY2xhc3MgTmltYmxlVGFibGVDb2x1bW5EdXJhdGlvblRleHRNb2R1bGUgeyB9XG4iXX0=
@@ -0,0 +1,3 @@
1
+ export * from './nimble-table-column-duration-text.directive';
2
+ export * from './nimble-table-column-duration-text.module';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25pL25pbWJsZS1hbmd1bGFyL3RhYmxlLWNvbHVtbi9kdXJhdGlvbi10ZXh0L3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywrQ0FBK0MsQ0FBQztBQUM5RCxjQUFjLDRDQUE0QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9uaW1ibGUtdGFibGUtY29sdW1uLWR1cmF0aW9uLXRleHQuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbmltYmxlLXRhYmxlLWNvbHVtbi1kdXJhdGlvbi10ZXh0Lm1vZHVsZSc7Il19
@@ -0,0 +1,39 @@
1
+ import * as i0 from '@angular/core';
2
+ import { LOCALE_ID, Pipe, Inject } from '@angular/core';
3
+ import { DurationFormatter } from '@ni/nimble-components/dist/esm/table-column/duration-text/models/duration-formatter';
4
+
5
+ /**
6
+ * A pipe that transforms a number of milliseconds (string/number) into a string formatted like "1 day, 2 hr, 3 min, 4.567 sec"
7
+ */
8
+ class DurationPipe {
9
+ constructor(locale) {
10
+ this.durationFormatter = new DurationFormatter(locale);
11
+ }
12
+ transform(timeInMilliseconds) {
13
+ const milliseconds = this.parseDuration(timeInMilliseconds);
14
+ return this.durationFormatter.format(milliseconds);
15
+ }
16
+ parseDuration(duration) {
17
+ return typeof duration === 'string' ? parseFloat(duration) : duration;
18
+ }
19
+ }
20
+ DurationPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
21
+ DurationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, name: "duration" });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, decorators: [{
23
+ type: Pipe,
24
+ args: [{
25
+ name: 'duration'
26
+ }]
27
+ }], ctorParameters: function () {
28
+ return [{ type: undefined, decorators: [{
29
+ type: Inject,
30
+ args: [LOCALE_ID]
31
+ }] }];
32
+ } });
33
+
34
+ /**
35
+ * Generated bundle index. Do not edit.
36
+ */
37
+
38
+ export { DurationPipe };
39
+ //# sourceMappingURL=ni-nimble-angular-pipes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ni-nimble-angular-pipes.mjs","sources":["../../../../projects/ni/nimble-angular/pipes/duration.pipe.ts","../../../../projects/ni/nimble-angular/pipes/ni-nimble-angular-pipes.ts"],"sourcesContent":["import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';\nimport { DurationFormatter } from '@ni/nimble-components/dist/esm/table-column/duration-text/models/duration-formatter';\n\n/**\n * A pipe that transforms a number of milliseconds (string/number) into a string formatted like \"1 day, 2 hr, 3 min, 4.567 sec\"\n */\n@Pipe({\n name: 'duration'\n})\nexport class DurationPipe implements PipeTransform {\n private readonly durationFormatter;\n\n public constructor(@Inject(LOCALE_ID) locale: string) {\n this.durationFormatter = new DurationFormatter(locale);\n }\n\n public transform(timeInMilliseconds: string | number | null | undefined): string {\n const milliseconds = this.parseDuration(timeInMilliseconds);\n return this.durationFormatter.format(milliseconds);\n }\n\n private parseDuration(duration: string | number | null | undefined): number | null | undefined {\n return typeof duration === 'string' ? parseFloat(duration) : duration;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAGA;;AAEG;MAIU,YAAY,CAAA;AAGrB,IAAA,WAAA,CAAsC,MAAc,EAAA;QAChD,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;KAC1D;AAEM,IAAA,SAAS,CAAC,kBAAsD,EAAA;QACnE,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;KACtD;AAEO,IAAA,aAAa,CAAC,QAA4C,EAAA;AAC9D,QAAA,OAAO,OAAO,QAAQ,KAAK,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;KACzE;;AAdQ,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,kBAGM,SAAS,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;uGAH3B,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;iBACnB,CAAA;;;8BAIuB,MAAM;+BAAC,SAAS,CAAA;;;;ACZxC;;AAEG;;;;"}
@@ -0,0 +1,99 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Input, NgModule } from '@angular/core';
3
+ export { tableColumnDurationTextTag } from '@ni/nimble-components/dist/esm/table-column/duration-text';
4
+ import { toNullableNumberProperty, toBooleanProperty } from '@ni/nimble-angular/internal-utilities';
5
+ import { NimbleTableColumnBaseDirective } from '@ni/nimble-angular/table-column';
6
+ import { CommonModule } from '@angular/common';
7
+
8
+ /**
9
+ * Directive to provide Angular integration for the table column element for duration text.
10
+ */
11
+ class NimbleTableColumnDurationTextDirective extends NimbleTableColumnBaseDirective {
12
+ constructor(renderer, elementRef) {
13
+ super(renderer, elementRef);
14
+ }
15
+ get fieldName() {
16
+ return this.elementRef.nativeElement.fieldName;
17
+ }
18
+ // Renaming because property should have camel casing, but attribute should not
19
+ // eslint-disable-next-line @angular-eslint/no-input-rename
20
+ set fieldName(value) {
21
+ this.renderer.setProperty(this.elementRef.nativeElement, 'fieldName', value);
22
+ }
23
+ get fractionalWidth() {
24
+ return this.elementRef.nativeElement.fractionalWidth;
25
+ }
26
+ // Renaming because property should have camel casing, but attribute should not
27
+ // eslint-disable-next-line @angular-eslint/no-input-rename
28
+ set fractionalWidth(value) {
29
+ this.renderer.setProperty(this.elementRef.nativeElement, 'fractionalWidth', toNullableNumberProperty(value));
30
+ }
31
+ get minPixelWidth() {
32
+ return this.elementRef.nativeElement.minPixelWidth;
33
+ }
34
+ // Renaming because property should have camel casing, but attribute should not
35
+ // eslint-disable-next-line @angular-eslint/no-input-rename
36
+ set minPixelWidth(value) {
37
+ this.renderer.setProperty(this.elementRef.nativeElement, 'minPixelWidth', toNullableNumberProperty(value));
38
+ }
39
+ get groupIndex() {
40
+ return this.elementRef.nativeElement.groupIndex;
41
+ }
42
+ // Renaming because property should have camel casing, but attribute should not
43
+ // eslint-disable-next-line @angular-eslint/no-input-rename
44
+ set groupIndex(value) {
45
+ this.renderer.setProperty(this.elementRef.nativeElement, 'groupIndex', toNullableNumberProperty(value));
46
+ }
47
+ get groupingDisabled() {
48
+ return this.elementRef.nativeElement.groupingDisabled;
49
+ }
50
+ // Renaming because property should have camel casing, but attribute should not
51
+ // eslint-disable-next-line @angular-eslint/no-input-rename
52
+ set groupingDisabled(value) {
53
+ this.renderer.setProperty(this.elementRef.nativeElement, 'groupingDisabled', toBooleanProperty(value));
54
+ }
55
+ }
56
+ NimbleTableColumnDurationTextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
57
+ NimbleTableColumnDurationTextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NimbleTableColumnDurationTextDirective, selector: "nimble-table-column-duration-text", inputs: { fieldName: ["field-name", "fieldName"], fractionalWidth: ["fractional-width", "fractionalWidth"], minPixelWidth: ["min-pixel-width", "minPixelWidth"], groupIndex: ["group-index", "groupIndex"], groupingDisabled: ["grouping-disabled", "groupingDisabled"] }, usesInheritance: true, ngImport: i0 });
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextDirective, decorators: [{
59
+ type: Directive,
60
+ args: [{
61
+ selector: 'nimble-table-column-duration-text'
62
+ }]
63
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { fieldName: [{
64
+ type: Input,
65
+ args: ['field-name']
66
+ }], fractionalWidth: [{
67
+ type: Input,
68
+ args: ['fractional-width']
69
+ }], minPixelWidth: [{
70
+ type: Input,
71
+ args: ['min-pixel-width']
72
+ }], groupIndex: [{
73
+ type: Input,
74
+ args: ['group-index']
75
+ }], groupingDisabled: [{
76
+ type: Input,
77
+ args: ['grouping-disabled']
78
+ }] } });
79
+
80
+ class NimbleTableColumnDurationTextModule {
81
+ }
82
+ NimbleTableColumnDurationTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
83
+ NimbleTableColumnDurationTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, declarations: [NimbleTableColumnDurationTextDirective], imports: [CommonModule], exports: [NimbleTableColumnDurationTextDirective] });
84
+ NimbleTableColumnDurationTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, imports: [CommonModule] });
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, decorators: [{
86
+ type: NgModule,
87
+ args: [{
88
+ declarations: [NimbleTableColumnDurationTextDirective],
89
+ imports: [CommonModule],
90
+ exports: [NimbleTableColumnDurationTextDirective]
91
+ }]
92
+ }] });
93
+
94
+ /**
95
+ * Generated bundle index. Do not edit.
96
+ */
97
+
98
+ export { NimbleTableColumnDurationTextDirective, NimbleTableColumnDurationTextModule };
99
+ //# sourceMappingURL=ni-nimble-angular-table-column-duration-text.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ni-nimble-angular-table-column-duration-text.mjs","sources":["../../../../projects/ni/nimble-angular/table-column/duration-text/nimble-table-column-duration-text.directive.ts","../../../../projects/ni/nimble-angular/table-column/duration-text/nimble-table-column-duration-text.module.ts","../../../../projects/ni/nimble-angular/table-column/duration-text/ni-nimble-angular-table-column-duration-text.ts"],"sourcesContent":["import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';\nimport { type TableColumnDurationText, tableColumnDurationTextTag } from '@ni/nimble-components/dist/esm/table-column/duration-text';\nimport { BooleanValueOrAttribute, NumberValueOrAttribute, toBooleanProperty, toNullableNumberProperty } from '@ni/nimble-angular/internal-utilities';\nimport { NimbleTableColumnBaseDirective } from '@ni/nimble-angular/table-column';\n\nexport type { TableColumnDurationText };\nexport { tableColumnDurationTextTag };\n\n/**\n * Directive to provide Angular integration for the table column element for duration text.\n */\n@Directive({\n selector: 'nimble-table-column-duration-text'\n})\nexport class NimbleTableColumnDurationTextDirective extends NimbleTableColumnBaseDirective<TableColumnDurationText> {\n public get fieldName(): string | undefined {\n return this.elementRef.nativeElement.fieldName;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('field-name') public set fieldName(value: string | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'fieldName', value);\n }\n\n public get fractionalWidth(): number | null | undefined {\n return this.elementRef.nativeElement.fractionalWidth;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('fractional-width') public set fractionalWidth(value: NumberValueOrAttribute | null | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'fractionalWidth', toNullableNumberProperty(value));\n }\n\n public get minPixelWidth(): number | null | undefined {\n return this.elementRef.nativeElement.minPixelWidth;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('min-pixel-width') public set minPixelWidth(value: NumberValueOrAttribute | null | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'minPixelWidth', toNullableNumberProperty(value));\n }\n\n public get groupIndex(): number | null | undefined {\n return this.elementRef.nativeElement.groupIndex;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('group-index') public set groupIndex(value: NumberValueOrAttribute | null | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'groupIndex', toNullableNumberProperty(value));\n }\n\n public get groupingDisabled(): boolean {\n return this.elementRef.nativeElement.groupingDisabled;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('grouping-disabled') public set groupingDisabled(value: BooleanValueOrAttribute) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'groupingDisabled', toBooleanProperty(value));\n }\n\n public constructor(renderer: Renderer2, elementRef: ElementRef<TableColumnDurationText>) {\n super(renderer, elementRef);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NimbleTableColumnDurationTextDirective } from './nimble-table-column-duration-text.directive';\n\nimport '@ni/nimble-components/dist/esm/table-column/duration-text';\n\n@NgModule({\n declarations: [NimbleTableColumnDurationTextDirective],\n imports: [CommonModule],\n exports: [NimbleTableColumnDurationTextDirective]\n})\nexport class NimbleTableColumnDurationTextModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;AAIG,MAAO,sCAAuC,SAAQ,8BAAuD,CAAA;IAmD/G,WAAmB,CAAA,QAAmB,EAAE,UAA+C,EAAA;AACnF,QAAA,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;KAC/B;AApDD,IAAA,IAAW,SAAS,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,UAAU,C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A,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnC,mCAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,EAJ7B,YAAA,EAAA,CAAA,sCAAsC,CAC3C,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,sCAAsC,CAAA,EAAA,CAAA,CAAA;AAEvC,mCAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,YAHlC,YAAY,CAAA,EAAA,CAAA,CAAA;2FAGb,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAL/C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,sCAAsC,CAAC;oBACtD,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,sCAAsC,CAAC;iBACpD,CAAA;;;ACVD;;AAEG;;;;"}
@@ -0,0 +1,37 @@
1
+ import * as i0 from '@angular/core';
2
+ import { LOCALE_ID, Pipe, Inject } from '@angular/core';
3
+ import { DurationFormatter } from '@ni/nimble-components/dist/esm/table-column/duration-text/models/duration-formatter';
4
+
5
+ /**
6
+ * A pipe that transforms a number of milliseconds (string/number) into a string formatted like "1 day, 2 hr, 3 min, 4.567 sec"
7
+ */
8
+ class DurationPipe {
9
+ constructor(locale) {
10
+ this.durationFormatter = new DurationFormatter(locale);
11
+ }
12
+ transform(timeInMilliseconds) {
13
+ const milliseconds = this.parseDuration(timeInMilliseconds);
14
+ return this.durationFormatter.format(milliseconds);
15
+ }
16
+ parseDuration(duration) {
17
+ return typeof duration === 'string' ? parseFloat(duration) : duration;
18
+ }
19
+ }
20
+ DurationPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
21
+ DurationPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, name: "duration" });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DurationPipe, decorators: [{
23
+ type: Pipe,
24
+ args: [{
25
+ name: 'duration'
26
+ }]
27
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
28
+ type: Inject,
29
+ args: [LOCALE_ID]
30
+ }] }]; } });
31
+
32
+ /**
33
+ * Generated bundle index. Do not edit.
34
+ */
35
+
36
+ export { DurationPipe };
37
+ //# sourceMappingURL=ni-nimble-angular-pipes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ni-nimble-angular-pipes.mjs","sources":["../../../../projects/ni/nimble-angular/pipes/duration.pipe.ts","../../../../projects/ni/nimble-angular/pipes/ni-nimble-angular-pipes.ts"],"sourcesContent":["import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';\nimport { DurationFormatter } from '@ni/nimble-components/dist/esm/table-column/duration-text/models/duration-formatter';\n\n/**\n * A pipe that transforms a number of milliseconds (string/number) into a string formatted like \"1 day, 2 hr, 3 min, 4.567 sec\"\n */\n@Pipe({\n name: 'duration'\n})\nexport class DurationPipe implements PipeTransform {\n private readonly durationFormatter;\n\n public constructor(@Inject(LOCALE_ID) locale: string) {\n this.durationFormatter = new DurationFormatter(locale);\n }\n\n public transform(timeInMilliseconds: string | number | null | undefined): string {\n const milliseconds = this.parseDuration(timeInMilliseconds);\n return this.durationFormatter.format(milliseconds);\n }\n\n private parseDuration(duration: string | number | null | undefined): number | null | undefined {\n return typeof duration === 'string' ? parseFloat(duration) : duration;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAGA;;AAEG;MAIU,YAAY,CAAA;AAGrB,IAAA,WAAA,CAAsC,MAAc,EAAA;QAChD,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;KAC1D;AAEM,IAAA,SAAS,CAAC,kBAAsD,EAAA;QACnE,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;KACtD;AAEO,IAAA,aAAa,CAAC,QAA4C,EAAA;AAC9D,QAAA,OAAO,OAAO,QAAQ,KAAK,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;KACzE;;AAdQ,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,kBAGM,SAAS,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;uGAH3B,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;AACnB,iBAAA,CAAA;;0BAIuB,MAAM;2BAAC,SAAS,CAAA;;;ACZxC;;AAEG;;;;"}
@@ -0,0 +1,99 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Input, NgModule } from '@angular/core';
3
+ export { tableColumnDurationTextTag } from '@ni/nimble-components/dist/esm/table-column/duration-text';
4
+ import { toNullableNumberProperty, toBooleanProperty } from '@ni/nimble-angular/internal-utilities';
5
+ import { NimbleTableColumnBaseDirective } from '@ni/nimble-angular/table-column';
6
+ import { CommonModule } from '@angular/common';
7
+
8
+ /**
9
+ * Directive to provide Angular integration for the table column element for duration text.
10
+ */
11
+ class NimbleTableColumnDurationTextDirective extends NimbleTableColumnBaseDirective {
12
+ constructor(renderer, elementRef) {
13
+ super(renderer, elementRef);
14
+ }
15
+ get fieldName() {
16
+ return this.elementRef.nativeElement.fieldName;
17
+ }
18
+ // Renaming because property should have camel casing, but attribute should not
19
+ // eslint-disable-next-line @angular-eslint/no-input-rename
20
+ set fieldName(value) {
21
+ this.renderer.setProperty(this.elementRef.nativeElement, 'fieldName', value);
22
+ }
23
+ get fractionalWidth() {
24
+ return this.elementRef.nativeElement.fractionalWidth;
25
+ }
26
+ // Renaming because property should have camel casing, but attribute should not
27
+ // eslint-disable-next-line @angular-eslint/no-input-rename
28
+ set fractionalWidth(value) {
29
+ this.renderer.setProperty(this.elementRef.nativeElement, 'fractionalWidth', toNullableNumberProperty(value));
30
+ }
31
+ get minPixelWidth() {
32
+ return this.elementRef.nativeElement.minPixelWidth;
33
+ }
34
+ // Renaming because property should have camel casing, but attribute should not
35
+ // eslint-disable-next-line @angular-eslint/no-input-rename
36
+ set minPixelWidth(value) {
37
+ this.renderer.setProperty(this.elementRef.nativeElement, 'minPixelWidth', toNullableNumberProperty(value));
38
+ }
39
+ get groupIndex() {
40
+ return this.elementRef.nativeElement.groupIndex;
41
+ }
42
+ // Renaming because property should have camel casing, but attribute should not
43
+ // eslint-disable-next-line @angular-eslint/no-input-rename
44
+ set groupIndex(value) {
45
+ this.renderer.setProperty(this.elementRef.nativeElement, 'groupIndex', toNullableNumberProperty(value));
46
+ }
47
+ get groupingDisabled() {
48
+ return this.elementRef.nativeElement.groupingDisabled;
49
+ }
50
+ // Renaming because property should have camel casing, but attribute should not
51
+ // eslint-disable-next-line @angular-eslint/no-input-rename
52
+ set groupingDisabled(value) {
53
+ this.renderer.setProperty(this.elementRef.nativeElement, 'groupingDisabled', toBooleanProperty(value));
54
+ }
55
+ }
56
+ NimbleTableColumnDurationTextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
57
+ NimbleTableColumnDurationTextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NimbleTableColumnDurationTextDirective, selector: "nimble-table-column-duration-text", inputs: { fieldName: ["field-name", "fieldName"], fractionalWidth: ["fractional-width", "fractionalWidth"], minPixelWidth: ["min-pixel-width", "minPixelWidth"], groupIndex: ["group-index", "groupIndex"], groupingDisabled: ["grouping-disabled", "groupingDisabled"] }, usesInheritance: true, ngImport: i0 });
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextDirective, decorators: [{
59
+ type: Directive,
60
+ args: [{
61
+ selector: 'nimble-table-column-duration-text'
62
+ }]
63
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { fieldName: [{
64
+ type: Input,
65
+ args: ['field-name']
66
+ }], fractionalWidth: [{
67
+ type: Input,
68
+ args: ['fractional-width']
69
+ }], minPixelWidth: [{
70
+ type: Input,
71
+ args: ['min-pixel-width']
72
+ }], groupIndex: [{
73
+ type: Input,
74
+ args: ['group-index']
75
+ }], groupingDisabled: [{
76
+ type: Input,
77
+ args: ['grouping-disabled']
78
+ }] } });
79
+
80
+ class NimbleTableColumnDurationTextModule {
81
+ }
82
+ NimbleTableColumnDurationTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
83
+ NimbleTableColumnDurationTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, declarations: [NimbleTableColumnDurationTextDirective], imports: [CommonModule], exports: [NimbleTableColumnDurationTextDirective] });
84
+ NimbleTableColumnDurationTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, imports: [CommonModule] });
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NimbleTableColumnDurationTextModule, decorators: [{
86
+ type: NgModule,
87
+ args: [{
88
+ declarations: [NimbleTableColumnDurationTextDirective],
89
+ imports: [CommonModule],
90
+ exports: [NimbleTableColumnDurationTextDirective]
91
+ }]
92
+ }] });
93
+
94
+ /**
95
+ * Generated bundle index. Do not edit.
96
+ */
97
+
98
+ export { NimbleTableColumnDurationTextDirective, NimbleTableColumnDurationTextModule };
99
+ //# sourceMappingURL=ni-nimble-angular-table-column-duration-text.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ni-nimble-angular-table-column-duration-text.mjs","sources":["../../../../projects/ni/nimble-angular/table-column/duration-text/nimble-table-column-duration-text.directive.ts","../../../../projects/ni/nimble-angular/table-column/duration-text/nimble-table-column-duration-text.module.ts","../../../../projects/ni/nimble-angular/table-column/duration-text/ni-nimble-angular-table-column-duration-text.ts"],"sourcesContent":["import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';\nimport { type TableColumnDurationText, tableColumnDurationTextTag } from '@ni/nimble-components/dist/esm/table-column/duration-text';\nimport { BooleanValueOrAttribute, NumberValueOrAttribute, toBooleanProperty, toNullableNumberProperty } from '@ni/nimble-angular/internal-utilities';\nimport { NimbleTableColumnBaseDirective } from '@ni/nimble-angular/table-column';\n\nexport type { TableColumnDurationText };\nexport { tableColumnDurationTextTag };\n\n/**\n * Directive to provide Angular integration for the table column element for duration text.\n */\n@Directive({\n selector: 'nimble-table-column-duration-text'\n})\nexport class NimbleTableColumnDurationTextDirective extends NimbleTableColumnBaseDirective<TableColumnDurationText> {\n public get fieldName(): string | undefined {\n return this.elementRef.nativeElement.fieldName;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('field-name') public set fieldName(value: string | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'fieldName', value);\n }\n\n public get fractionalWidth(): number | null | undefined {\n return this.elementRef.nativeElement.fractionalWidth;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('fractional-width') public set fractionalWidth(value: NumberValueOrAttribute | null | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'fractionalWidth', toNullableNumberProperty(value));\n }\n\n public get minPixelWidth(): number | null | undefined {\n return this.elementRef.nativeElement.minPixelWidth;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('min-pixel-width') public set minPixelWidth(value: NumberValueOrAttribute | null | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'minPixelWidth', toNullableNumberProperty(value));\n }\n\n public get groupIndex(): number | null | undefined {\n return this.elementRef.nativeElement.groupIndex;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('group-index') public set groupIndex(value: NumberValueOrAttribute | null | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'groupIndex', toNullableNumberProperty(value));\n }\n\n public get groupingDisabled(): boolean {\n return this.elementRef.nativeElement.groupingDisabled;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('grouping-disabled') public set groupingDisabled(value: BooleanValueOrAttribute) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'groupingDisabled', toBooleanProperty(value));\n }\n\n public constructor(renderer: Renderer2, elementRef: ElementRef<TableColumnDurationText>) {\n super(renderer, elementRef);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NimbleTableColumnDurationTextDirective } from './nimble-table-column-duration-text.directive';\n\nimport '@ni/nimble-components/dist/esm/table-column/duration-text';\n\n@NgModule({\n declarations: [NimbleTableColumnDurationTextDirective],\n imports: [CommonModule],\n exports: [NimbleTableColumnDurationTextDirective]\n})\nexport class NimbleTableColumnDurationTextModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;AAIG,MAAO,sCAAuC,SAAQ,8BAAuD,CAAA;IAmD/G,WAAmB,CAAA,QAAmB,EAAE,UAA+C,EAAA;AACnF,QAAA,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;KAC/B;AApDD,IAAA,IAAW,SAAS,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC;KAClD;;;IAID,IAAgC,SAAS,CAAC,KAAyB,EAAA;AAC/D,QAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;KAChF;AAED,IAAA,IAAW,eAAe,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC;KACxD;;;IAID,IAAsC,eAAe,CAAC,KAAgD,EAAA;AAClG,QAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,iBAAiB,EAAE,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;KAChH;AAED,IAAA,IAAW,aAAa,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC;KACtD;;;IAID,IAAqC,aAAa,CAAC,KAAgD,EAAA;AAC/F,QAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,eAAe,EAAE,wBAAwB,CAAC,KAAK,CAAC,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package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/nimble-angular",
3
- "version": "17.7.1",
3
+ "version": "17.8.1",
4
4
  "description": "Angular components for the NI Nimble Design System",
5
5
  "repository": {
6
6
  "type": "git",
@@ -85,6 +85,14 @@
85
85
  "node": "./fesm2015/ni-nimble-angular-mapping-text.mjs",
86
86
  "default": "./fesm2020/ni-nimble-angular-mapping-text.mjs"
87
87
  },
88
+ "./pipes": {
89
+ "types": "./pipes/index.d.ts",
90
+ "esm2020": "./esm2020/pipes/ni-nimble-angular-pipes.mjs",
91
+ "es2020": "./fesm2020/ni-nimble-angular-pipes.mjs",
92
+ "es2015": "./fesm2015/ni-nimble-angular-pipes.mjs",
93
+ "node": "./fesm2015/ni-nimble-angular-pipes.mjs",
94
+ "default": "./fesm2020/ni-nimble-angular-pipes.mjs"
95
+ },
88
96
  "./rich-text/editor": {
89
97
  "types": "./rich-text/editor/index.d.ts",
90
98
  "esm2020": "./esm2020/rich-text/editor/ni-nimble-angular-rich-text-editor.mjs",
@@ -133,6 +141,14 @@
133
141
  "node": "./fesm2015/ni-nimble-angular-table-column-date-text.mjs",
134
142
  "default": "./fesm2020/ni-nimble-angular-table-column-date-text.mjs"
135
143
  },
144
+ "./table-column/duration-text": {
145
+ "types": "./table-column/duration-text/index.d.ts",
146
+ "esm2020": "./esm2020/table-column/duration-text/ni-nimble-angular-table-column-duration-text.mjs",
147
+ "es2020": "./fesm2020/ni-nimble-angular-table-column-duration-text.mjs",
148
+ "es2015": "./fesm2015/ni-nimble-angular-table-column-duration-text.mjs",
149
+ "node": "./fesm2015/ni-nimble-angular-table-column-duration-text.mjs",
150
+ "default": "./fesm2020/ni-nimble-angular-table-column-duration-text.mjs"
151
+ },
136
152
  "./table-column/enum-text": {
137
153
  "types": "./table-column/enum-text/index.d.ts",
138
154
  "esm2020": "./esm2020/table-column/enum-text/ni-nimble-angular-table-column-enum-text.mjs",
@@ -196,7 +212,7 @@
196
212
  "@angular/forms": "^14.2.0",
197
213
  "@angular/localize": "^14.2.0",
198
214
  "@angular/router": "^14.2.0",
199
- "@ni/nimble-components": "^20.10.0"
215
+ "@ni/nimble-components": "^20.10.2"
200
216
  },
201
217
  "dependencies": {
202
218
  "tslib": "^2.2.0"
@@ -0,0 +1,13 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * A pipe that transforms a number of milliseconds (string/number) into a string formatted like "1 day, 2 hr, 3 min, 4.567 sec"
5
+ */
6
+ export declare class DurationPipe implements PipeTransform {
7
+ private readonly durationFormatter;
8
+ constructor(locale: string);
9
+ transform(timeInMilliseconds: string | number | null | undefined): string;
10
+ private parseDuration;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<DurationPipe, never>;
12
+ static ɵpipe: i0.ɵɵPipeDeclaration<DurationPipe, "duration", false>;
13
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ni/nimble-angular/pipes" />
5
+ export * from './public-api';
@@ -0,0 +1 @@
1
+ export * from './duration.pipe';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ni/nimble-angular/table-column/duration-text" />
5
+ export * from './public-api';
@@ -0,0 +1,25 @@
1
+ import { ElementRef, Renderer2 } from '@angular/core';
2
+ import { type TableColumnDurationText, tableColumnDurationTextTag } from '@ni/nimble-components/dist/esm/table-column/duration-text';
3
+ import { BooleanValueOrAttribute, NumberValueOrAttribute } from '@ni/nimble-angular/internal-utilities';
4
+ import { NimbleTableColumnBaseDirective } from '@ni/nimble-angular/table-column';
5
+ import * as i0 from "@angular/core";
6
+ export type { TableColumnDurationText };
7
+ export { tableColumnDurationTextTag };
8
+ /**
9
+ * Directive to provide Angular integration for the table column element for duration text.
10
+ */
11
+ export declare class NimbleTableColumnDurationTextDirective extends NimbleTableColumnBaseDirective<TableColumnDurationText> {
12
+ get fieldName(): string | undefined;
13
+ set fieldName(value: string | undefined);
14
+ get fractionalWidth(): number | null | undefined;
15
+ set fractionalWidth(value: NumberValueOrAttribute | null | undefined);
16
+ get minPixelWidth(): number | null | undefined;
17
+ set minPixelWidth(value: NumberValueOrAttribute | null | undefined);
18
+ get groupIndex(): number | null | undefined;
19
+ set groupIndex(value: NumberValueOrAttribute | null | undefined);
20
+ get groupingDisabled(): boolean;
21
+ set groupingDisabled(value: BooleanValueOrAttribute);
22
+ constructor(renderer: Renderer2, elementRef: ElementRef<TableColumnDurationText>);
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<NimbleTableColumnDurationTextDirective, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleTableColumnDurationTextDirective, "nimble-table-column-duration-text", never, { "fieldName": "field-name"; "fractionalWidth": "fractional-width"; "minPixelWidth": "min-pixel-width"; "groupIndex": "group-index"; "groupingDisabled": "grouping-disabled"; }, {}, never, never, false>;
25
+ }
@@ -0,0 +1,9 @@
1
+ import '@ni/nimble-components/dist/esm/table-column/duration-text';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./nimble-table-column-duration-text.directive";
4
+ import * as i2 from "@angular/common";
5
+ export declare class NimbleTableColumnDurationTextModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<NimbleTableColumnDurationTextModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NimbleTableColumnDurationTextModule, [typeof i1.NimbleTableColumnDurationTextDirective], [typeof i2.CommonModule], [typeof i1.NimbleTableColumnDurationTextDirective]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<NimbleTableColumnDurationTextModule>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export * from './nimble-table-column-duration-text.directive';
2
+ export * from './nimble-table-column-duration-text.module';