@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
|
@@ -1159,7 +1159,7 @@
|
|
|
1159
1159
|
{ type: i0.Component, args: [{
|
|
1160
1160
|
selector: 'ec-banner',
|
|
1161
1161
|
template: "<div class=\"banner {{type}} {{bannerStyle}}\">\r\n <ec-button id=\"banner{{id}}_close\"\r\n *ngIf=\"showCloseBtn\"\r\n type=\"icon\"\r\n icon=\"ec-icon-sm icon-cancel\"\r\n (clicked)=\"close()\">\r\n </ec-button>\r\n <div class=\"banner-content d-flex text-body-1 font-color-secondary\">\r\n <i class=\"ec-icon {{icon}}\"></i>\r\n <div class=\"ml-2\">\r\n <p class=\"title mb-0\" *ngIf=\"title\">\r\n {{title}}\r\n </p>\r\n <p class=\"text mb-0\" *ngIf=\"text\">{{text}}</p>\r\n \r\n <ul class=\"list mb-0\" *ngIf=\"list?.length\">\r\n <li *ngFor=\"let item of list\">{{item}}</li>\r\n </ul>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n",
|
|
1162
|
-
styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{display:flex}:host(.border-bottom-0) .banner{border-bottom:0}.banner{display:flex;flex:1 1;flex-direction:column;min-height:2.5rem;overflow-y:auto;position:relative}.banner-content{flex:none;margin:auto 0;padding:.5rem 1rem}ec-button{position:absolute;right:.25rem;top:.25rem}ec-button+.banner-content{padding-right:2.75rem}.title{font-weight:700}.list{margin:0;padding-left:
|
|
1162
|
+
styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{display:flex}:host(.border-bottom-0) .banner{border-bottom:0}.banner{display:flex;flex:1 1;flex-direction:column;min-height:2.5rem;overflow-y:auto;position:relative}.banner-content{flex:none;margin:auto 0;padding:.5rem 1rem}.banner-content ::ng-deep p{line-height:inherit}.ec-icon{font-size:1.125rem}ec-button{position:absolute;right:.25rem;top:.25rem}ec-button+.banner-content{padding-right:2.75rem}.title{font-weight:700}.list{margin:0;padding-left:2em}.text+.list{margin-top:1em}.info{background-color:#dae4e9}.info .banner-content>.ec-icon{color:#2d9ab8}.warning{background-color:#fff8cc}.warning .banner-content>.ec-icon{color:#fa7b2e}.success{background-color:#dff0d8}.success .banner-content>.ec-icon{color:#3c763d}.error{background-color:#ecc4c5}.error .banner-content>.ec-icon{color:#cd1d20}.pinned{border-bottom:1px solid rgba(26,26,35,.08)}.toast{border:1px solid rgba(26,26,35,.08);box-shadow:0 .125rem .625rem 0 rgba(26,26,35,.18)}.toast ec-button{right:.1875rem;top:.1875rem}"]
|
|
1163
1163
|
},] }
|
|
1164
1164
|
];
|
|
1165
1165
|
BannerComponent.propDecorators = {
|
|
@@ -1244,7 +1244,7 @@
|
|
|
1244
1244
|
{ type: i0.Component, args: [{
|
|
1245
1245
|
selector: 'ec-button',
|
|
1246
1246
|
template: "<button id=\"{{id}}_button\"\r\n class=\"ec-button-{{customTemplate ? 'custom' : type}}\"\r\n [class.has-badge]=\"badge !== undefined\"\r\n tabindex=\"{{tabindex}}\"\r\n [type]=\"type === 'submit' || isSubmit ? 'submit' : 'button'\"\r\n [disabled]=\"disabled\"\r\n (click)=\"onClick($event)\"\r\n #element\r\n [attr.cdkFocusInitial]=\"autofocus || null\">\r\n <ng-container *ngIf=\"customTemplate; else defaultTemplate\">\r\n <ng-container *ngTemplateOutlet=\"customTemplate\"></ng-container>\r\n </ng-container>\r\n</button>\r\n\r\n<ng-template #defaultTemplate>\r\n <!-- Hidden when the button is not pending -->\r\n <div class=\"pending-container\" *ngIf=\"pending\">\r\n <i class=\"ec-icon {{pendingIcon}}\" id=\"{{id}}_pending\"></i>\r\n </div>\r\n\r\n <i class=\"ec-icon {{icon}}\" id=\"{{id}}_icon\" *ngIf=\"icon\"></i>\r\n\r\n <ng-container *ngIf=\"label\">\r\n <span id=\"{{id}}_label\" class=\"label\">{{label | translate}}</span>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"badge !== undefined\">\r\n <span id=\"{{id}}_badge\" class=\"badge\">{{badge}}</span>\r\n </ng-container>\r\n</ng-template>",
|
|
1247
|
-
styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{-webkit-appearance:none;color:#1a1a23;display:inline-block;font-family:Roboto,-apple-system,BlinkMacSystemFont,Segoe UI,Oxygen,Ubuntu,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.875rem;margin:0;padding:0;vertical-align:top}:host(.text-left) button{justify-content:flex-start}:host(.text-right) button{justify-content:flex-end}:host(.active) .ec-button-custom,:host(.active) .ec-button-danger-text,:host(.active) .ec-button-icon,:host(.active) .ec-button-link,:host(.active) .ec-button-secondary,:host(.active) .ec-button-text{background-color:#bfe0e9}:host(.active) button:focus{border-color:transparent;box-shadow:none}:host(.active) .ec-button-secondary:focus{border-color:#d2d7d9}:host(.d-block) button{width:100%}:host(.border-0) button:not(:focus){border-color:transparent}:host(.is-action-icon) .ec-button-icon{color:#0084a9}:host(.is-success) .ec-button-icon,:host(.is-success) .ec-button-secondary,:host(.is-success) .ec-button-text{color:#3c763d}:host(.is-error) .ec-button-icon,:host(.is-error) .ec-button-secondary,:host(.is-error) .ec-button-text{color:#cd1d20}:host-context(.btn-stack) button{height:1rem}:host-context(.btn-stack) .ec-icon{height:.625rem;width:.625rem}:host-context(.btn-group) button:focus{position:relative;z-index:1}.ec-button-primary,.ec-button-submit{background-color:#cfd856;border-color:#c1cd23;color:#1a1a23}.ec-button-primary:active:enabled,.ec-button-submit:active:enabled{background-color:#c1cd23;color:#1a1a23}.ec-button-secondary{border-color:#d2d7d9}.ec-button-secondary,.ec-button-secondary:active:enabled{background-color:#fff;color:#1a1a23}.ec-button-common{background-color:#2d9ab8;border-color:#0084a9;color:#fff}.ec-button-common .ec-icon{color:inherit}.ec-button-common:active:enabled{background-color:#0084a9;border-color:#005f7a}.ec-button-icon{background-color:transparent;color:rgba(26,26,35,.66);padding:0;width:2rem}.ec-button-icon .ec-icon{height:1.1428571429em;margin:0;padding:0}.ec-button-icon:hover{background-color:#bfe0e9}.ec-button-icon:disabled{background-color:transparent;border-color:transparent}.ec-button-icon:disabled .ec-icon{opacity:.5}.ec-button-icon.has-badge{min-width:2rem;padding-left:.375rem;padding-right:0;width:auto}.ec-button-icon .badge{margin-left:-.5rem}.ec-button-text{background-color:transparent;color:#1a1a23}.ec-button-text .ec-icon{color:rgba(26,26,35,.66)}.ec-button-text:active:enabled{background-color:transparent;color:#000}.ec-button-text:disabled{background-color:transparent;border-color:transparent}.ec-button-link{background-color:transparent;color:#0084a9}.ec-button-link .ec-icon{color:inherit}.ec-button-link:active:enabled{background-color:transparent;color:#00485d}.ec-button-link:disabled{background-color:transparent;border-color:transparent}.ec-button-danger{background-color:#e64c4d;border-color:#e33436;color:#fff}.ec-button-danger .ec-icon{color:inherit}.ec-button-danger:active:enabled{background-color:#e33436}.ec-button-danger-text{background-color:transparent;color:#e33436}.ec-button-danger-text .ec-icon{color:inherit}.ec-button-danger-text:active:enabled{background-color:transparent;color:#b2191a}.ec-button-danger-text:disabled{background-color:transparent;border-color:transparent}.ec-button-custom{background-color:transparent;height:auto;padding:0}.ec-button-custom:disabled{background-color:transparent;border:0}button{align-items:center;background-color:#fff;border:.0625rem solid transparent;border-radius:0;cursor:pointer;display:flex;font-size:.875rem;height:2rem;justify-content:center;line-height:1.25;line-height:1.25rem;padding:.3571428571em .5714285714em;position:relative}button.is-highlighted,button.is-selected{background-color:#d9edf2}button:focus{border-color:#0084a9;box-shadow:0 0 0 1px #0084a9;outline:none}button:active{background-color:#0084a9;color:#fff}button.is-disabled,button:disabled{background-color:rgba(26,26,35,.1);border-color:#d2d7d9;color:rgba(26,26,35,.66);cursor:default;opacity:.65}button .label{align-items:center;display:flex;flex:auto}button .ec-icon{flex:0 0 auto}button .ec-icon+.label{margin:0 .375rem}button .label{justify-content:center;white-space:nowrap}button .ec-icon+.label{flex:none;margin-left:.25rem}button.has-badge{padding-right:.0625rem}:host(.textbox-group-btn-right){position:relative}:host(.textbox-group-btn-right) button{border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px;padding-left:.4375rem;padding-right:.4375rem}.badge{background-color:#7e579b;border:.125rem solid #fff;border-radius:.5625rem;color:#fff;display:inline-block;font-size:.625rem;font-weight:700;line-height:.875rem;margin-left:-.25rem;margin-top:-.75rem;min-width:1rem;padding:0 .25rem;text-align:center;vertical-align:baseline;white-space:nowrap}:host(.is-tab) button{align-items:center;border:1px solid transparent;border-radius:0;color:rgba(26,26,35,.66);cursor:pointer;display:flex;font-size:.75rem;height:1.5rem;justify-content:center;min-width:1.5rem;padding-left:.5rem;padding-right:.5rem}:host(.is-tab) button:hover{color:#354751}:host(.is-tab) button.active{background-color:#d2d7d9;color:#354751}:host(.is-tab) button:focus{outline:none}:host(.is-tab) button:focus:not(.active):not(.is-disabled){border-color:#0084a9;box-shadow:0 0 0 1px #0084a9;box-shadow:none}:host(.is-tab) button.is-disabled{color:rgba(26,26,35,.38);cursor:default}:host(.is-tab) button.ec-button-icon{justify-content:center;padding:0;width:auto}:host(.is-tab) button:hover{background-color:transparent}:host(.is-tab).active button{background-color:#d2d7d9;color:#354751}.pending-container{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:1}.pending-container>.ec-icon{color:inherit;flex:none}.pending-container~.badge,.pending-container~.ec-icon,.pending-container~.label{opacity:0}"]
|
|
1247
|
+
styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{-webkit-appearance:none;color:#1a1a23;display:inline-block;font-family:Roboto,-apple-system,BlinkMacSystemFont,Segoe UI,Oxygen,Ubuntu,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.875rem;margin:0;padding:0;vertical-align:top}:host(.font-size-inherit),:host(.font-size-inherit) button{font-size:inherit}:host(.text-left) button{justify-content:flex-start}:host(.text-right) button{justify-content:flex-end}:host(.active) .ec-button-custom,:host(.active) .ec-button-danger-text,:host(.active) .ec-button-icon,:host(.active) .ec-button-link,:host(.active) .ec-button-secondary,:host(.active) .ec-button-text{background-color:#bfe0e9}:host(.active) button:focus{border-color:transparent;box-shadow:none}:host(.active) .ec-button-secondary:focus{border-color:#d2d7d9}:host(.d-block) button{width:100%}:host(.border-0) button:not(:focus){border-color:transparent}:host(.is-action-icon) .ec-button-icon{color:#0084a9}:host(.is-success) .ec-button-icon,:host(.is-success) .ec-button-secondary,:host(.is-success) .ec-button-text{color:#3c763d}:host(.is-error) .ec-button-icon,:host(.is-error) .ec-button-secondary,:host(.is-error) .ec-button-text{color:#cd1d20}:host-context(.btn-stack) button{height:1rem}:host-context(.btn-stack) .ec-icon{height:.625rem;width:.625rem}:host-context(.btn-group) button:focus{position:relative;z-index:1}.ec-button-primary,.ec-button-submit{background-color:#cfd856;border-color:#c1cd23;color:#1a1a23}.ec-button-primary:active:enabled,.ec-button-submit:active:enabled{background-color:#c1cd23;color:#1a1a23}.ec-button-secondary{border-color:#d2d7d9}.ec-button-secondary,.ec-button-secondary:active:enabled{background-color:#fff;color:#1a1a23}.ec-button-common{background-color:#2d9ab8;border-color:#0084a9;color:#fff}.ec-button-common .ec-icon{color:inherit}.ec-button-common:active:enabled{background-color:#0084a9;border-color:#005f7a}.ec-button-icon{background-color:transparent;color:rgba(26,26,35,.66);padding:0;width:2rem}.ec-button-icon .ec-icon{height:1.1428571429em;margin:0;padding:0}.ec-button-icon:hover{background-color:#bfe0e9}.ec-button-icon:disabled{background-color:transparent;border-color:transparent}.ec-button-icon:disabled .ec-icon{opacity:.5}.ec-button-icon.has-badge{min-width:2rem;padding-left:.375rem;padding-right:0;width:auto}.ec-button-icon .badge{margin-left:-.5rem}.ec-button-text{background-color:transparent;color:#1a1a23}.ec-button-text .ec-icon{color:rgba(26,26,35,.66)}.ec-button-text:active:enabled{background-color:transparent;color:#000}.ec-button-text:disabled{background-color:transparent;border-color:transparent}.ec-button-link{background-color:transparent;color:#0084a9}.ec-button-link .ec-icon{color:inherit}.ec-button-link:active:enabled{background-color:transparent;color:#00485d}.ec-button-link:disabled{background-color:transparent;border-color:transparent}.ec-button-danger{background-color:#e64c4d;border-color:#e33436;color:#fff}.ec-button-danger .ec-icon{color:inherit}.ec-button-danger:active:enabled{background-color:#e33436}.ec-button-danger-text{background-color:transparent;color:#e33436}.ec-button-danger-text .ec-icon{color:inherit}.ec-button-danger-text:active:enabled{background-color:transparent;color:#b2191a}.ec-button-danger-text:disabled{background-color:transparent;border-color:transparent}.ec-button-custom{background-color:transparent;height:auto;padding:0}.ec-button-custom:disabled{background-color:transparent;border:0}button{align-items:center;background-color:#fff;border:.0625rem solid transparent;border-radius:0;cursor:pointer;display:flex;font-size:.875rem;height:2rem;justify-content:center;line-height:1.25;line-height:1.25rem;padding:.3571428571em .5714285714em;position:relative}button.is-highlighted,button.is-selected{background-color:#d9edf2}button:focus{border-color:#0084a9;box-shadow:0 0 0 1px #0084a9;outline:none}button:active{background-color:#0084a9;color:#fff}button.is-disabled,button:disabled{background-color:rgba(26,26,35,.1);border-color:#d2d7d9;color:rgba(26,26,35,.66);cursor:default;opacity:.65}button .label{align-items:center;display:flex;flex:auto}button .ec-icon{flex:0 0 auto}button .ec-icon+.label{margin:0 .375rem}button .label{justify-content:center;white-space:nowrap}button .ec-icon+.label{flex:none;margin-left:.25rem}button.has-badge{padding-right:.0625rem}:host(.textbox-group-btn-right){position:relative}:host(.textbox-group-btn-right) button{border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px;padding-left:.4375rem;padding-right:.4375rem}.badge{background-color:#7e579b;border:.125rem solid #fff;border-radius:.5625rem;color:#fff;display:inline-block;font-size:.625rem;font-weight:700;line-height:.875rem;margin-left:-.25rem;margin-top:-.75rem;min-width:1rem;padding:0 .25rem;text-align:center;vertical-align:baseline;white-space:nowrap}:host(.is-tab) button{align-items:center;border:1px solid transparent;border-radius:0;color:rgba(26,26,35,.66);cursor:pointer;display:flex;font-size:.75rem;height:1.5rem;justify-content:center;min-width:1.5rem;padding-left:.5rem;padding-right:.5rem}:host(.is-tab) button:hover{color:#354751}:host(.is-tab) button.active{background-color:#d2d7d9;color:#354751}:host(.is-tab) button:focus{outline:none}:host(.is-tab) button:focus:not(.active):not(.is-disabled){border-color:#0084a9;box-shadow:0 0 0 1px #0084a9;box-shadow:none}:host(.is-tab) button.is-disabled{color:rgba(26,26,35,.38);cursor:default}:host(.is-tab) button.ec-button-icon{justify-content:center;padding:0;width:auto}:host(.is-tab) button:hover{background-color:transparent}:host(.is-tab).active button{background-color:#d2d7d9;color:#354751}.pending-container{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:1}.pending-container>.ec-icon{color:inherit;flex:none}.pending-container~.badge,.pending-container~.ec-icon,.pending-container~.label{opacity:0}"]
|
|
1248
1248
|
},] }
|
|
1249
1249
|
];
|
|
1250
1250
|
ButtonComponent.ctorParameters = function () { return []; };
|
|
@@ -7580,7 +7580,7 @@
|
|
|
7580
7580
|
var _this = this;
|
|
7581
7581
|
this.toastService.events.pipe(operators.takeUntil(this.destroyed)).subscribe(function (event) {
|
|
7582
7582
|
if (event.action == 'remove' && event.toast === _this.toastItem) {
|
|
7583
|
-
_this.close();
|
|
7583
|
+
_this.close(event);
|
|
7584
7584
|
}
|
|
7585
7585
|
});
|
|
7586
7586
|
};
|
|
@@ -7597,17 +7597,24 @@
|
|
|
7597
7597
|
this.destroyed.next();
|
|
7598
7598
|
this.destroyed.complete();
|
|
7599
7599
|
};
|
|
7600
|
-
ToastComponent.prototype.
|
|
7600
|
+
ToastComponent.prototype.closeClicked = function () {
|
|
7601
|
+
if (this.toastItem) {
|
|
7602
|
+
this.toastService.dismissToast(this.toastItem, 'user');
|
|
7603
|
+
}
|
|
7604
|
+
};
|
|
7605
|
+
ToastComponent.prototype.close = function (event) {
|
|
7601
7606
|
var _this = this;
|
|
7602
7607
|
this.open = false;
|
|
7603
7608
|
rxjs.timer(this.TOAST_ANIMATION_DURATION).subscribe(function () {
|
|
7604
|
-
_this.closed.emit(
|
|
7609
|
+
_this.closed.emit(event);
|
|
7605
7610
|
});
|
|
7606
7611
|
};
|
|
7607
7612
|
ToastComponent.prototype.closeAfterTimer = function () {
|
|
7608
7613
|
var _this = this;
|
|
7609
7614
|
rxjs.timer(this.TIMED_TOAST_DURATION).pipe(operators.takeUntil(rxjs.race(this.closed, this.destroyed))).subscribe(function () {
|
|
7610
|
-
_this.
|
|
7615
|
+
if (_this.toastItem) {
|
|
7616
|
+
_this.toastService.dismissToast(_this.toastItem, 'auto');
|
|
7617
|
+
}
|
|
7611
7618
|
});
|
|
7612
7619
|
};
|
|
7613
7620
|
return ToastComponent;
|
|
@@ -7615,7 +7622,7 @@
|
|
|
7615
7622
|
ToastComponent.decorators = [
|
|
7616
7623
|
{ type: i0.Component, args: [{
|
|
7617
7624
|
selector: 'ec-toast',
|
|
7618
|
-
template: "<ec-banner id=\"{{toastItem?.id}}_banner\"\r\n [type]=\"toastItem?.type\"\r\n bannerStyle=\"toast\"\r\n [customIcon]=\"toastItem?.icon\"\r\n [showCloseBtn]=\"toastItem?.dismissible\"\r\n [autoHideOnClose]=\"false\"\r\n (closed)=\"
|
|
7625
|
+
template: "<ec-banner id=\"{{toastItem?.id}}_banner\"\r\n [type]=\"toastItem?.type\"\r\n bannerStyle=\"toast\"\r\n [customIcon]=\"toastItem?.icon\"\r\n [showCloseBtn]=\"toastItem?.dismissible\"\r\n [autoHideOnClose]=\"false\"\r\n (closed)=\"closeClicked()\">\r\n <div class=\"d-flex\">\r\n <p id=\"{{toastItem?.id}}_message\"\r\n class=\"mb-0\">{{toastItem?.message}}</p>\r\n <a id=\"{{toastItem?.id}}_action\"\r\n *ngIf=\"toastItem?.action && toastItem?.actionLabel\"\r\n class=\"text-link ml-2\"\r\n (click)=\"toastItem!.action!()\">{{toastItem?.actionLabel | translate}}</a>\r\n </div>\r\n</ec-banner>",
|
|
7619
7626
|
styles: [":host{bottom:0;display:block;left:50%;position:fixed;transform:translate(-50%,150%);transition:transform var(--toast-animation-duration,.25s);transition-timing-function:ease-in;z-index:70}:host.is-open{transform:translate(-50%,calc(var(--toast-bottom, 0rem)*-1 - 1.5rem));transition-timing-function:cubic-bezier(.18,.89,.32,1.28)}"]
|
|
7620
7627
|
},] }
|
|
7621
7628
|
];
|
|
@@ -7630,9 +7637,33 @@
|
|
|
7630
7637
|
closed: [{ type: i0.Output }]
|
|
7631
7638
|
};
|
|
7632
7639
|
|
|
7640
|
+
var TelemetryBaseService = /** @class */ (function () {
|
|
7641
|
+
function TelemetryBaseService() {
|
|
7642
|
+
}
|
|
7643
|
+
return TelemetryBaseService;
|
|
7644
|
+
}());
|
|
7645
|
+
|
|
7646
|
+
/** Default No-op telemetry implementation */
|
|
7647
|
+
var TelemetryService = /** @class */ (function (_super) {
|
|
7648
|
+
__extends(TelemetryService, _super);
|
|
7649
|
+
function TelemetryService() {
|
|
7650
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
7651
|
+
}
|
|
7652
|
+
TelemetryService.prototype.trackPageView = function (pageName, url, properties) { };
|
|
7653
|
+
TelemetryService.prototype.trackEvent = function (name, properties, measurements) { };
|
|
7654
|
+
return TelemetryService;
|
|
7655
|
+
}(TelemetryBaseService));
|
|
7656
|
+
TelemetryService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TelemetryService_Factory() { return new TelemetryService(); }, token: TelemetryService, providedIn: "root" });
|
|
7657
|
+
TelemetryService.decorators = [
|
|
7658
|
+
{ type: i0.Injectable, args: [{
|
|
7659
|
+
providedIn: 'root'
|
|
7660
|
+
},] }
|
|
7661
|
+
];
|
|
7662
|
+
|
|
7633
7663
|
var ToasterComponent = /** @class */ (function () {
|
|
7634
|
-
function ToasterComponent(toastService) {
|
|
7664
|
+
function ToasterComponent(toastService, telemetryService) {
|
|
7635
7665
|
this.toastService = toastService;
|
|
7666
|
+
this.telemetryService = telemetryService;
|
|
7636
7667
|
this.dismissibleToastBottom = 0;
|
|
7637
7668
|
this.pendingToasts = [];
|
|
7638
7669
|
this.destroyed = new rxjs.Subject();
|
|
@@ -7643,9 +7674,11 @@
|
|
|
7643
7674
|
if (event.action == 'add') {
|
|
7644
7675
|
_this.addToast(event.toast);
|
|
7645
7676
|
_this.updateDismissibleToastBottom();
|
|
7677
|
+
_this.trackEvent(event);
|
|
7646
7678
|
}
|
|
7647
7679
|
else if (event.action == 'remove' && event.toast !== _this.currentDismissibleToast && event.toast !== _this.currentTimedToast) {
|
|
7648
7680
|
_this.removePendingToast(event.toast);
|
|
7681
|
+
_this.trackEvent(event);
|
|
7649
7682
|
}
|
|
7650
7683
|
});
|
|
7651
7684
|
};
|
|
@@ -7653,14 +7686,15 @@
|
|
|
7653
7686
|
this.destroyed.next();
|
|
7654
7687
|
this.destroyed.complete();
|
|
7655
7688
|
};
|
|
7656
|
-
ToasterComponent.prototype.updateVisibleToast = function (
|
|
7657
|
-
if (
|
|
7689
|
+
ToasterComponent.prototype.updateVisibleToast = function (event) {
|
|
7690
|
+
if (event.toast.dismissible) {
|
|
7658
7691
|
this.currentDismissibleToast = this.getNextToast(true);
|
|
7659
7692
|
}
|
|
7660
7693
|
else {
|
|
7661
7694
|
this.currentTimedToast = this.getNextToast(false);
|
|
7662
7695
|
}
|
|
7663
7696
|
this.updateDismissibleToastBottom();
|
|
7697
|
+
this.trackEvent(event);
|
|
7664
7698
|
};
|
|
7665
7699
|
ToasterComponent.prototype.addToast = function (toast) {
|
|
7666
7700
|
if ((toast.dismissible && this.currentDismissibleToast) || (!toast.dismissible && this.currentTimedToast)) {
|
|
@@ -7705,6 +7739,25 @@
|
|
|
7705
7739
|
this.dismissibleToastBottom = 0;
|
|
7706
7740
|
}
|
|
7707
7741
|
};
|
|
7742
|
+
ToasterComponent.prototype.trackEvent = function (event) {
|
|
7743
|
+
var _a, _b, _c;
|
|
7744
|
+
var dismissible = this.pendingToasts.filter(function (t) { return t.dismissible; });
|
|
7745
|
+
var transient = this.pendingToasts.filter(function (t) { return !t.dismissible; });
|
|
7746
|
+
this.telemetryService.trackEvent(event.action + " toast", {
|
|
7747
|
+
action: event.action,
|
|
7748
|
+
source: event.source,
|
|
7749
|
+
hasDismissiblePending: dismissible.length > 0 ? 'yes' : 'no',
|
|
7750
|
+
dismissiblePendingLength: "" + dismissible.length,
|
|
7751
|
+
hasTransientPending: transient.length > 0 ? 'yes' : 'no',
|
|
7752
|
+
transientPendingLength: "" + transient.length,
|
|
7753
|
+
toastId: (_a = event.toast.id) !== null && _a !== void 0 ? _a : '',
|
|
7754
|
+
toastType: event.toast.type,
|
|
7755
|
+
toastMessage: event.toast.message,
|
|
7756
|
+
toastDismissible: "" + event.toast.dismissible,
|
|
7757
|
+
toastIcon: (_b = event.toast.icon) !== null && _b !== void 0 ? _b : '',
|
|
7758
|
+
toastAction: (_c = event.toast.actionLabel) !== null && _c !== void 0 ? _c : '',
|
|
7759
|
+
});
|
|
7760
|
+
};
|
|
7708
7761
|
return ToasterComponent;
|
|
7709
7762
|
}());
|
|
7710
7763
|
ToasterComponent.decorators = [
|
|
@@ -7714,7 +7767,8 @@
|
|
|
7714
7767
|
},] }
|
|
7715
7768
|
];
|
|
7716
7769
|
ToasterComponent.ctorParameters = function () { return [
|
|
7717
|
-
{ type: ToastService }
|
|
7770
|
+
{ type: ToastService },
|
|
7771
|
+
{ type: TelemetryService }
|
|
7718
7772
|
]; };
|
|
7719
7773
|
ToasterComponent.propDecorators = {
|
|
7720
7774
|
timedToastEl: [{ type: i0.ViewChild, args: ['timedToast', { static: false, read: i0.ElementRef },] }]
|
|
@@ -7827,9 +7881,61 @@
|
|
|
7827
7881
|
subTitle: [{ type: i0.Input }]
|
|
7828
7882
|
};
|
|
7829
7883
|
|
|
7884
|
+
/**
|
|
7885
|
+
* Format a time to the user's preference for display
|
|
7886
|
+
*/
|
|
7887
|
+
var TimeDisplayPipe = /** @class */ (function () {
|
|
7888
|
+
function TimeDisplayPipe(userPreferenceService) {
|
|
7889
|
+
this.userPreferenceService = userPreferenceService;
|
|
7890
|
+
this.lastFormatString = 'HH:mm:ss';
|
|
7891
|
+
}
|
|
7892
|
+
/**
|
|
7893
|
+
* Format a time for display, accounting for user's display preferences.
|
|
7894
|
+
*/
|
|
7895
|
+
TimeDisplayPipe.prototype.transform = function (time, showSeconds) {
|
|
7896
|
+
var _this = this;
|
|
7897
|
+
var display = '';
|
|
7898
|
+
var formatString = '';
|
|
7899
|
+
// use user-preferred formats
|
|
7900
|
+
this.userPreferenceService.getPreferences().subscribe(function (result) {
|
|
7901
|
+
//if preferences exist then format time to users preference
|
|
7902
|
+
//otherwise use the last user preference
|
|
7903
|
+
if (result.preference) {
|
|
7904
|
+
formatString = result.preference.timeFormat;
|
|
7905
|
+
if (!showSeconds) {
|
|
7906
|
+
formatString = formatString.replace(':ss', '');
|
|
7907
|
+
}
|
|
7908
|
+
_this.lastFormatString = formatString;
|
|
7909
|
+
}
|
|
7910
|
+
});
|
|
7911
|
+
display = moment__default['default'](time).format(this.lastFormatString);
|
|
7912
|
+
return display;
|
|
7913
|
+
};
|
|
7914
|
+
return TimeDisplayPipe;
|
|
7915
|
+
}());
|
|
7916
|
+
TimeDisplayPipe.decorators = [
|
|
7917
|
+
{ type: i0.Pipe, args: [{ name: 'timeDisplay' },] }
|
|
7918
|
+
];
|
|
7919
|
+
TimeDisplayPipe.ctorParameters = function () { return [
|
|
7920
|
+
{ type: UserPreferenceService }
|
|
7921
|
+
]; };
|
|
7922
|
+
|
|
7830
7923
|
var ComponentsModule = /** @class */ (function () {
|
|
7831
7924
|
function ComponentsModule() {
|
|
7832
7925
|
}
|
|
7926
|
+
/**
|
|
7927
|
+
* Providing services through the forRoot pattern here ensures that the components module and the importing
|
|
7928
|
+
* module use the same singleton service instance.
|
|
7929
|
+
* For more info: https://angular.io/guide/singleton-services#the-forroot-pattern
|
|
7930
|
+
*/
|
|
7931
|
+
ComponentsModule.forRoot = function (config) {
|
|
7932
|
+
return {
|
|
7933
|
+
ngModule: ComponentsModule,
|
|
7934
|
+
providers: [
|
|
7935
|
+
{ provide: TelemetryService, useClass: config.telemetryService }
|
|
7936
|
+
]
|
|
7937
|
+
};
|
|
7938
|
+
};
|
|
7833
7939
|
return ComponentsModule;
|
|
7834
7940
|
}());
|
|
7835
7941
|
ComponentsModule.decorators = [
|
|
@@ -7853,6 +7959,7 @@
|
|
|
7853
7959
|
ConfirmComponent,
|
|
7854
7960
|
DialogComponent,
|
|
7855
7961
|
DateDisplayPipe,
|
|
7962
|
+
TimeDisplayPipe,
|
|
7856
7963
|
MockDateDisplayPipe,
|
|
7857
7964
|
RadioButtonComponent,
|
|
7858
7965
|
CheckboxComponent,
|
|
@@ -7900,6 +8007,7 @@
|
|
|
7900
8007
|
FormGroupHelper,
|
|
7901
8008
|
DialogService,
|
|
7902
8009
|
DateDisplayPipe,
|
|
8010
|
+
TimeDisplayPipe,
|
|
7903
8011
|
MockDateDisplayPipe,
|
|
7904
8012
|
RowCountPipe
|
|
7905
8013
|
],
|
|
@@ -7921,6 +8029,7 @@
|
|
|
7921
8029
|
ConfirmComponent,
|
|
7922
8030
|
DialogComponent,
|
|
7923
8031
|
DateDisplayPipe,
|
|
8032
|
+
TimeDisplayPipe,
|
|
7924
8033
|
RadioButtonComponent,
|
|
7925
8034
|
CheckboxComponent,
|
|
7926
8035
|
NumericboxComponent,
|
|
@@ -8635,7 +8744,9 @@
|
|
|
8635
8744
|
exports.TabsComponent = TabsComponent;
|
|
8636
8745
|
exports.Tag = Tag;
|
|
8637
8746
|
exports.TagsComponent = TagsComponent;
|
|
8747
|
+
exports.TelemetryBaseService = TelemetryBaseService;
|
|
8638
8748
|
exports.TextboxComponent = TextboxComponent;
|
|
8749
|
+
exports.TimeDisplayPipe = TimeDisplayPipe;
|
|
8639
8750
|
exports.ToastComponent = ToastComponent;
|
|
8640
8751
|
exports.ToastEvent = ToastEvent;
|
|
8641
8752
|
exports.ToastService = ToastService;
|
|
@@ -8667,6 +8778,7 @@
|
|
|
8667
8778
|
exports.ɵa = ResizableTableDirective;
|
|
8668
8779
|
exports.ɵb = ResizableBase;
|
|
8669
8780
|
exports.ɵc = TableDetailRowComponent;
|
|
8781
|
+
exports.ɵd = TelemetryService;
|
|
8670
8782
|
|
|
8671
8783
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8672
8784
|
|