@energycap/components 0.26.1 → 0.26.3-ECAPID-313-Button-Font-Inherit.20211103-1319
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/bundles/energycap-components.umd.js +123 -11
- package/bundles/energycap-components.umd.js.map +1 -1
- package/bundles/energycap-components.umd.min.js +1 -1
- package/bundles/energycap-components.umd.min.js.map +1 -1
- package/energycap-components.d.ts +1 -0
- package/energycap-components.metadata.json +1 -1
- package/esm2015/energycap-components.js +2 -1
- package/esm2015/lib/components.module.js +19 -1
- package/esm2015/lib/controls/banner/banner.component.js +1 -1
- package/esm2015/lib/controls/button/button.component.js +1 -1
- package/esm2015/lib/core/telemetry-base.service.js +3 -0
- package/esm2015/lib/core/telemetry.service.js +15 -0
- package/esm2015/lib/display/toast/toast/toast.component.js +13 -6
- package/esm2015/lib/display/toast/toaster/toaster.component.js +30 -5
- package/esm2015/lib/shared/display/pipes/time-display.pipe.js +40 -0
- package/esm2015/public-api.js +3 -1
- package/fesm2015/energycap-components.js +111 -12
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/components.module.d.ts +11 -0
- package/lib/core/telemetry-base.service.d.ts +25 -0
- package/lib/core/telemetry.service.d.ts +11 -0
- package/lib/display/toast/toast/toast.component.d.ts +4 -3
- package/lib/display/toast/toaster/toaster.component.d.ts +6 -3
- package/lib/shared/display/pipes/time-display.pipe.d.ts +15 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,2 +1,13 @@
|
|
|
1
|
+
import { ModuleWithProviders, Type } from '@angular/core';
|
|
2
|
+
import { TelemetryBaseService } from './core/telemetry-base.service';
|
|
3
|
+
export declare type ComponentsModuleConfig = {
|
|
4
|
+
telemetryService: Type<TelemetryBaseService>;
|
|
5
|
+
};
|
|
1
6
|
export declare class ComponentsModule {
|
|
7
|
+
/**
|
|
8
|
+
* Providing services through the forRoot pattern here ensures that the components module and the importing
|
|
9
|
+
* module use the same singleton service instance.
|
|
10
|
+
* For more info: https://angular.io/guide/singleton-services#the-forroot-pattern
|
|
11
|
+
*/
|
|
12
|
+
static forRoot(config: ComponentsModuleConfig): ModuleWithProviders<ComponentsModule>;
|
|
2
13
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare abstract class TelemetryBaseService {
|
|
2
|
+
/**
|
|
3
|
+
* Tracks a Page View / State change
|
|
4
|
+
*
|
|
5
|
+
* @param {string} pageName
|
|
6
|
+
* @param {string} url
|
|
7
|
+
* @memberof TelemetryService
|
|
8
|
+
*/
|
|
9
|
+
abstract trackPageView(pageName: string, url: string, properties?: {
|
|
10
|
+
[key: string]: string | number;
|
|
11
|
+
}): void;
|
|
12
|
+
/**
|
|
13
|
+
* Tracks a generic event
|
|
14
|
+
*
|
|
15
|
+
* @param {string} name
|
|
16
|
+
* @param {{[key: string]:string}} [properties]
|
|
17
|
+
* @param {{[val:string]:number}} [measurements]
|
|
18
|
+
* @memberof TelemetryService
|
|
19
|
+
*/
|
|
20
|
+
abstract trackEvent(name: string, properties?: {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
}, measurements?: {
|
|
23
|
+
[val: string]: number;
|
|
24
|
+
}): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TelemetryBaseService } from './telemetry-base.service';
|
|
2
|
+
export declare class TelemetryService extends TelemetryBaseService {
|
|
3
|
+
trackPageView(pageName: string, url: string, properties?: {
|
|
4
|
+
[key: string]: string | number;
|
|
5
|
+
}): void;
|
|
6
|
+
trackEvent(name: string, properties?: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
}, measurements?: {
|
|
9
|
+
[val: string]: number;
|
|
10
|
+
}): void;
|
|
11
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { ToastItem } from '../toast-types';
|
|
2
|
+
import { ToastEvent, ToastItem } from '../toast-types';
|
|
3
3
|
import { ToastService } from '../toast.service';
|
|
4
4
|
export declare class ToastComponent implements OnChanges, OnInit, OnDestroy {
|
|
5
5
|
private toastService;
|
|
@@ -7,13 +7,14 @@ export declare class ToastComponent implements OnChanges, OnInit, OnDestroy {
|
|
|
7
7
|
id?: string;
|
|
8
8
|
open: boolean;
|
|
9
9
|
TOAST_ANIMATION_DURATION: number;
|
|
10
|
-
closed: EventEmitter<
|
|
10
|
+
closed: EventEmitter<ToastEvent>;
|
|
11
11
|
private readonly TIMED_TOAST_DURATION;
|
|
12
12
|
private destroyed;
|
|
13
13
|
constructor(toastService: ToastService);
|
|
14
14
|
ngOnInit(): void;
|
|
15
15
|
ngOnChanges(changes: SimpleChanges): void;
|
|
16
16
|
ngOnDestroy(): void;
|
|
17
|
-
|
|
17
|
+
closeClicked(): void;
|
|
18
|
+
private close;
|
|
18
19
|
private closeAfterTimer;
|
|
19
20
|
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { TelemetryService } from '../../../core/telemetry.service';
|
|
3
|
+
import { ToastEvent, ToastItem } from '../toast-types';
|
|
3
4
|
import { ToastService } from '../toast.service';
|
|
4
5
|
export declare class ToasterComponent implements OnInit, OnDestroy {
|
|
5
6
|
private toastService;
|
|
7
|
+
private telemetryService;
|
|
6
8
|
currentTimedToast?: ToastItem;
|
|
7
9
|
currentDismissibleToast?: ToastItem;
|
|
8
10
|
dismissibleToastBottom: number;
|
|
9
11
|
timedToastEl?: ElementRef<HTMLElement>;
|
|
10
12
|
private pendingToasts;
|
|
11
13
|
private destroyed;
|
|
12
|
-
constructor(toastService: ToastService);
|
|
14
|
+
constructor(toastService: ToastService, telemetryService: TelemetryService);
|
|
13
15
|
ngOnInit(): void;
|
|
14
16
|
ngOnDestroy(): void;
|
|
15
|
-
updateVisibleToast(
|
|
17
|
+
updateVisibleToast(event: ToastEvent): void;
|
|
16
18
|
private addToast;
|
|
17
19
|
/** Returns the next pending toast of the specified type and removes it from the list of pending toasts. */
|
|
18
20
|
private getNextToast;
|
|
@@ -26,4 +28,5 @@ export declare class ToasterComponent implements OnInit, OnDestroy {
|
|
|
26
28
|
* Returns 0 if there isn't a visible timed toast.
|
|
27
29
|
*/
|
|
28
30
|
private updateDismissibleToastBottom;
|
|
31
|
+
private trackEvent;
|
|
29
32
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { UserPreferenceService } from '../../user-preference.service';
|
|
3
|
+
import { DateDisplay } from './date-display.pipe';
|
|
4
|
+
/**
|
|
5
|
+
* Format a time to the user's preference for display
|
|
6
|
+
*/
|
|
7
|
+
export declare class TimeDisplayPipe implements PipeTransform {
|
|
8
|
+
private userPreferenceService;
|
|
9
|
+
constructor(userPreferenceService: UserPreferenceService);
|
|
10
|
+
private lastFormatString;
|
|
11
|
+
/**
|
|
12
|
+
* Format a time for display, accounting for user's display preferences.
|
|
13
|
+
*/
|
|
14
|
+
transform(time?: DateDisplay, showSeconds?: boolean): string;
|
|
15
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export * from './lib/shared/display';
|
|
|
49
49
|
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
|
+
export * from './lib/shared/display/pipes/time-display.pipe';
|
|
52
53
|
export * from './lib/shared/user-preference.service';
|
|
53
54
|
export * from './lib/core/date-time-helper';
|
|
54
55
|
export * from './lib/shared/lodash-helper';
|
|
@@ -69,6 +70,7 @@ export * from './lib/display/toast/toast-types';
|
|
|
69
70
|
export * from './lib/display/toast/toast.service';
|
|
70
71
|
export * from './lib/display/toast/toaster/toaster.component';
|
|
71
72
|
export * from './lib/display/toast/toast/toast.component';
|
|
73
|
+
export * from './lib/core/telemetry-base.service';
|
|
72
74
|
export * from './lib/shared/page/page-base/page-base.component';
|
|
73
75
|
export * from './lib/shared/page/page-title/page-title.component';
|
|
74
76
|
export * from './lib/shared/page/page-view/page-view.component';
|