@energycap/components 0.32.12 → 0.32.13

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.
@@ -8,6 +8,14 @@ export declare type RelativeDateOptions = {
8
8
  showTimeForToday?: boolean;
9
9
  todayLabel?: string;
10
10
  yesterdayLabel?: string;
11
+ /** Prefix for when showing today as time for the value */
12
+ todayTimePrefix?: string;
13
+ /** Prefix for when displaying "today" as the value */
14
+ todayPrefix?: string;
15
+ /** Prefix for when displaying "yesterday" as the value */
16
+ yesterdayPrefix?: string;
17
+ /** Default prefix. Will be applied to all display options if defined and others are not */
18
+ defaultPrefix?: string;
11
19
  };
12
20
  export declare class RelativeDatePipe implements PipeTransform {
13
21
  private dateDisplayPipe;
@@ -16,9 +24,11 @@ export declare class RelativeDatePipe implements PipeTransform {
16
24
  constructor(dateDisplayPipe: DateDisplayPipe, timeDisplayPipe: TimeDisplayPipe, translateService: TranslateService);
17
25
  /**
18
26
  * If dateOnly is true, returns timeSelected formatted according to the user's date preference.
19
- * If timeOnly is true, returns timeSelected formatted according to the user's time preference.
27
+ * If dateOnly is true and showTimeForToday is false and timeSelected is today, returns 'today' or todayLabel
28
+ * If dateOnly and showTimeForToday is true and timeSelected is today, returns timeSelected formatted according to the user's time preference.
29
+ * If dateOnly is false, returns timeSelected formatted according to the user's time preference.
30
+ * If dateOnly is false and timeSelected is not today/yesterday, returns timeSelected formatted according to the user's date plus time preference.
20
31
  * If any of todayLabel, yesterdayLabel is supplied, use the supplied label.
21
- * If dateOnly and timeOnly are both false, returns timeSelected formatted according to the user's date plus time preference.
22
32
  */
23
33
  transform(timeSelected: string, options?: RelativeDateOptions): string;
24
34
  static ɵfac: i0.ɵɵFactoryDeclaration<RelativeDatePipe, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.32.12",
3
+ "version": "0.32.13",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },