@energycap/components 0.27.1 → 0.27.2

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,23 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { DateDisplayPipe } from './date-display.pipe';
4
+ import { TimeDisplayPipe } from './time-display.pipe';
5
+ export declare type RelativeDateOptions = {
6
+ dateOnly?: boolean;
7
+ showTimeForToday?: boolean;
8
+ todayLabel?: string;
9
+ yesterdayLabel?: string;
10
+ };
11
+ export declare class RelativeDatePipe implements PipeTransform {
12
+ private dateDisplayPipe;
13
+ private timeDisplayPipe;
14
+ private translateService;
15
+ constructor(dateDisplayPipe: DateDisplayPipe, timeDisplayPipe: TimeDisplayPipe, translateService: TranslateService);
16
+ /**
17
+ * If dateOnly is true, returns timeSelected formatted according to the user's date preference.
18
+ * If timeOnly is true, returns timeSelected formatted according to the user's time preference.
19
+ * If any of todayLabel, yesterdayLabel is supplied, use the supplied label.
20
+ * If dateOnly and timeOnly are both false, returns timeSelected formatted according to the user's date plus time preference.
21
+ */
22
+ transform(timeSelected: string, options?: RelativeDateOptions): string;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.27.1",
3
+ "version": "0.27.2",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
package/public-api.d.ts CHANGED
@@ -50,6 +50,7 @@ export * from './lib/shared/form-group.helper';
50
50
  export * from './lib/shared/display/pipes/date-display.pipe';
51
51
  export * from './lib/shared/display/pipes/row-count.pipe';
52
52
  export * from './lib/shared/display/pipes/time-display.pipe';
53
+ export * from './lib/shared/display/pipes/relative-date.pipe';
53
54
  export * from './lib/shared/user-preference.service';
54
55
  export * from './lib/shared/lodash-helper';
55
56
  export * from './lib/core/cache.service';
@@ -111,6 +111,7 @@ $email-bg: $ec-color-bg-content;
111
111
 
112
112
  img {
113
113
  max-width: 100%;
114
+ height: auto;
114
115
  }
115
116
 
116
117
  hr {