@sumaris-net/ngx-components 18.3.8 → 18.3.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/doc/changelog.md +6 -0
- package/esm2022/src/app/core/table/table.class.mjs +9 -1
- package/esm2022/src/app/core/table/table.utils.mjs +4 -1
- package/esm2022/src/app/shared/pipes/date-diff-duration.pipe.mjs +9 -8
- package/esm2022/src/app/shared/pipes/duration.pipe.mjs +16 -9
- package/fesm2022/sumaris-net.ngx-components.mjs +33 -14
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/table.class.d.ts +1 -0
- package/src/app/core/table/table.utils.d.ts +1 -0
- package/src/app/shared/inputs.d.ts +1 -1
- package/src/app/shared/pipes/date-diff-duration.pipe.d.ts +5 -3
- package/src/app/shared/pipes/duration.pipe.d.ts +13 -3
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -189,6 +189,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
189
189
|
get pageOffset(): number;
|
|
190
190
|
get sortActive(): string;
|
|
191
191
|
get sortDirection(): 'asc' | 'desc';
|
|
192
|
+
set sortDirection(value: 'asc' | 'desc');
|
|
192
193
|
private _paginator;
|
|
193
194
|
set paginator(value: MatPaginator);
|
|
194
195
|
get paginator(): MatPaginator;
|
|
@@ -8,4 +8,5 @@ export declare class AppTableUtils {
|
|
|
8
8
|
static getEntityId<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(row: TableElement<T> | AsyncTableElement<T>): ID;
|
|
9
9
|
static getEntityIds<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(rows: TableElement<T>[] | AsyncTableElement<T>[]): ID[];
|
|
10
10
|
static getEntities<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(rows: TableElement<T>[] | AsyncTableElement<T>[]): T[];
|
|
11
|
+
static inverseDirection(direction: 'asc' | 'desc'): "asc" | "desc";
|
|
11
12
|
}
|
|
@@ -17,7 +17,7 @@ export interface InputElement extends FocusableElement {
|
|
|
17
17
|
}
|
|
18
18
|
export declare function isInputElement(object: any): object is InputElement;
|
|
19
19
|
export declare function asInputElement<T = any>(object: ElementRef<T>): InputElement | undefined;
|
|
20
|
-
export declare function tabindexComparator(a: InputElement, b: InputElement):
|
|
20
|
+
export declare function tabindexComparator(a: InputElement, b: InputElement): 1 | 0 | -1;
|
|
21
21
|
export interface CanGainFocusOptions {
|
|
22
22
|
minTabindex?: number;
|
|
23
23
|
maxTabindex?: number;
|
|
@@ -2,20 +2,22 @@ import { PipeTransform } from '@angular/core';
|
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
3
|
import { DateAdapter } from '@angular/material/core';
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import { unitOfTime } from 'moment/moment';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class DateDiffDurationPipe implements PipeTransform {
|
|
7
8
|
private dateAdapter;
|
|
8
|
-
private translate;
|
|
9
9
|
protected dayUnit: string;
|
|
10
10
|
constructor(dateAdapter: DateAdapter<Moment>, translate: TranslateService);
|
|
11
11
|
transform(value: {
|
|
12
12
|
startValue: string | Moment;
|
|
13
13
|
endValue: string | Moment;
|
|
14
|
-
},
|
|
14
|
+
}, opts?: {
|
|
15
15
|
seconds?: boolean;
|
|
16
|
+
unit: unitOfTime.Base;
|
|
16
17
|
}): string | Promise<string>;
|
|
17
|
-
format(startDate: Moment, endDate: Moment,
|
|
18
|
+
format(startDate: Moment, endDate: Moment, opts: {
|
|
18
19
|
seconds?: boolean;
|
|
20
|
+
unit: unitOfTime.Base;
|
|
19
21
|
}): string;
|
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateDiffDurationPipe, never>;
|
|
21
23
|
static ɵpipe: i0.ɵɵPipeDeclaration<DateDiffDurationPipe, "dateDiffDuration", false>;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
2
|
import { unitOfTime } from 'moment';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class DurationPipe implements PipeTransform {
|
|
6
|
-
private translate;
|
|
7
6
|
protected dayUnit: string;
|
|
8
7
|
constructor(translate: TranslateService);
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Format a diff between two dates.
|
|
10
|
+
*
|
|
11
|
+
* @param value
|
|
12
|
+
* @param opts
|
|
13
|
+
* @param opts.unit allow to convert into a particular unit. If not defined, result will be like `x days HH:MM`
|
|
14
|
+
* @param opts.seconds Should display or ignore the seconds ?
|
|
15
|
+
**/
|
|
16
|
+
transform(value: number, opts?: unitOfTime.DurationConstructor | {
|
|
17
|
+
unit?: unitOfTime.DurationConstructor;
|
|
18
|
+
seconds?: boolean;
|
|
19
|
+
} | any): string;
|
|
10
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<DurationPipe, never>;
|
|
11
21
|
static ɵpipe: i0.ɵɵPipeDeclaration<DurationPipe, "duration", false>;
|
|
12
22
|
static ɵprov: i0.ɵɵInjectableDeclaration<DurationPipe>;
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "18.3.
|
|
5
|
+
"version": "18.3.10",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|