@sumaris-net/ngx-components 18.3.7 → 18.3.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "18.3.7",
4
+ "version": "18.3.9",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -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
- }, args?: {
14
+ }, opts?: {
15
15
  seconds?: boolean;
16
+ unit: unitOfTime.Base;
16
17
  }): string | Promise<string>;
17
- format(startDate: Moment, endDate: Moment, args: {
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
- transform(value: number, args?: unitOfTime.DurationConstructor | any): string;
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>;
@@ -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.7",
5
+ "version": "18.3.9",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{