@energycap/components 0.27.1 → 0.27.2-ECAPID-377-Implement-Sidebar.20220118-1026
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 +218 -169
- 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.metadata.json +1 -1
- package/energycap-email.min.css +1 -1
- package/esm2015/lib/components.module.js +7 -3
- package/esm2015/lib/shared/display/pipes/relative-date.pipe.js +49 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/energycap-components.js +206 -159
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/shared/display/pipes/relative-date.pipe.d.ts +23 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/styles/email/_email-base.scss +1 -0
|
@@ -5846,121 +5846,6 @@
|
|
|
5846
5846
|
maxLength: [{ type: i0.Input }]
|
|
5847
5847
|
};
|
|
5848
5848
|
|
|
5849
|
-
/** Exposes the markup and styles that represent the spinner. No inputs or outputs defined because it is just a visual component*/
|
|
5850
|
-
var SpinnerComponent = /** @class */ (function () {
|
|
5851
|
-
function SpinnerComponent() {
|
|
5852
|
-
}
|
|
5853
|
-
return SpinnerComponent;
|
|
5854
|
-
}());
|
|
5855
|
-
SpinnerComponent.decorators = [
|
|
5856
|
-
{ type: i0.Component, args: [{
|
|
5857
|
-
selector: 'ec-spinner',
|
|
5858
|
-
template: "<div class=\"spinner\">\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n</div>",
|
|
5859
|
-
styles: ["@-webkit-keyframes sk-bouncedelay{0%,80%,to{opacity:0}40%{opacity:1}}@keyframes sk-bouncedelay{0%,80%,to{opacity:0}40%{opacity:1}}.spinner{display:flex}.spinner-dot{-webkit-animation:sk-bouncedelay 1.7s ease-in-out infinite both;animation:sk-bouncedelay 1.7s ease-in-out infinite both;background-color:#0084a9;height:.75rem;margin-right:.25rem;width:.75rem}.spinner-dot:first-child{-webkit-animation-delay:-.6s;animation-delay:-.6s}.spinner-dot:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.spinner-dot:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}:host(.spinner-small) .spinner-dot{-webkit-animation:sk-bouncedelay 1.7s ease-in-out infinite both;animation:sk-bouncedelay 1.7s ease-in-out infinite both;background-color:#0084a9;height:.5rem;margin-right:.1666666667rem;width:.5rem}:host(.spinner-small) .spinner-dot:first-child{-webkit-animation-delay:-.6s;animation-delay:-.6s}:host(.spinner-small) .spinner-dot:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}:host(.spinner-small) .spinner-dot:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}"]
|
|
5860
|
-
},] }
|
|
5861
|
-
];
|
|
5862
|
-
|
|
5863
|
-
var SplashService = /** @class */ (function () {
|
|
5864
|
-
function SplashService() {
|
|
5865
|
-
/** Used to interact with the splash component
|
|
5866
|
-
* The splash component will subscribe to this and any components
|
|
5867
|
-
* that wish to bring the splash visible can use this to communicate
|
|
5868
|
-
* with the splash component.
|
|
5869
|
-
*/
|
|
5870
|
-
this._splashVisibility = new rxjs.Subject();
|
|
5871
|
-
this.splashVisibility = this._splashVisibility;
|
|
5872
|
-
}
|
|
5873
|
-
/**
|
|
5874
|
-
* Shows the splash screen
|
|
5875
|
-
*/
|
|
5876
|
-
SplashService.prototype.showSplash = function () {
|
|
5877
|
-
this._splashVisibility.next(true);
|
|
5878
|
-
};
|
|
5879
|
-
/**
|
|
5880
|
-
* Hides the splash screen
|
|
5881
|
-
*/
|
|
5882
|
-
SplashService.prototype.hideSplash = function () {
|
|
5883
|
-
this._splashVisibility.next(false);
|
|
5884
|
-
};
|
|
5885
|
-
return SplashService;
|
|
5886
|
-
}());
|
|
5887
|
-
SplashService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SplashService_Factory() { return new SplashService(); }, token: SplashService, providedIn: "root" });
|
|
5888
|
-
SplashService.decorators = [
|
|
5889
|
-
{ type: i0.Injectable, args: [{
|
|
5890
|
-
providedIn: 'root'
|
|
5891
|
-
},] }
|
|
5892
|
-
];
|
|
5893
|
-
SplashService.ctorParameters = function () { return []; };
|
|
5894
|
-
|
|
5895
|
-
var SplashComponent = /** @class */ (function () {
|
|
5896
|
-
function SplashComponent(splashService) {
|
|
5897
|
-
this.splashService = splashService;
|
|
5898
|
-
/** Sets the visibility of the splash display */
|
|
5899
|
-
this.isVisible = true;
|
|
5900
|
-
this.stopAnimation = false;
|
|
5901
|
-
/** Emits when the service is destroyed */
|
|
5902
|
-
this.destroyed = new rxjs.Subject();
|
|
5903
|
-
}
|
|
5904
|
-
SplashComponent.prototype.ngOnInit = function () {
|
|
5905
|
-
var _this = this;
|
|
5906
|
-
this.splashService.splashVisibility.pipe(operators.takeUntil(this.destroyed), operators.tap(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
5907
|
-
var _this = this;
|
|
5908
|
-
return __generator(this, function (_a) {
|
|
5909
|
-
if (value) {
|
|
5910
|
-
this.stopAnimation = false;
|
|
5911
|
-
}
|
|
5912
|
-
else {
|
|
5913
|
-
// Prevent animation from continuing after splash screen is hidden
|
|
5914
|
-
// but if we hide it then show while the timer is running, don't stop the animation after all
|
|
5915
|
-
rxjs.timer(1000).pipe(operators.takeUntil(this.splashService.splashVisibility)).subscribe(function () {
|
|
5916
|
-
_this.stopAnimation = true;
|
|
5917
|
-
});
|
|
5918
|
-
}
|
|
5919
|
-
return [2 /*return*/];
|
|
5920
|
-
});
|
|
5921
|
-
}); })).subscribe(function (showSplash) {
|
|
5922
|
-
_this.isVisible = showSplash;
|
|
5923
|
-
});
|
|
5924
|
-
};
|
|
5925
|
-
SplashComponent.prototype.ngOnDestroy = function () {
|
|
5926
|
-
this.destroyed.next();
|
|
5927
|
-
this.destroyed.unsubscribe();
|
|
5928
|
-
};
|
|
5929
|
-
return SplashComponent;
|
|
5930
|
-
}());
|
|
5931
|
-
SplashComponent.decorators = [
|
|
5932
|
-
{ type: i0.Component, args: [{
|
|
5933
|
-
selector: 'ec-splash',
|
|
5934
|
-
template: "<div class=\"app-splash\"\r\n [class.app-loaded]=\"!isVisible\">\r\n\r\n <!-- This is the raw icon.svg file so we can animate it -->\r\n <svg [class.d-none]=\"stopAnimation\" \r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"50\"\r\n height=\"50\"\r\n viewBox=\"0 0 50 50\">\r\n <g>\r\n <g>\r\n <path fill=\"#A0AD39\"\r\n fill-rule=\"nonzero\"\r\n d=\"M34.93,32.25 L34.93,37.25 L15.21,37.25 L15.21,32.25 L34.93,32.25 Z M28.45,22.48 L28.45,27.48 L15.21,27.48 L15.21,22.48 L28.45,22.48 Z M34.93,12.71 L34.93,17.71 L15.21,17.71 L15.21,12.71 L34.93,12.71 Z\" />\r\n <path fill=\"#A0AD39\"\r\n d=\"M24.99,5 C31.1,5 36.56,7.75 40.23,12.07 L44.33,9.16 C39.75,3.57 32.78,0 24.99,0 C17.2,0 10.23,3.57 5.65,9.16 L9.75,12.07 C13.42,7.75 18.88,5 24.99,5 Z\" />\r\n </g>\r\n <path fill=\"#17303B\"\r\n d=\"M40.24,37.93 C36.57,42.25 31.11,45 25,45 C18.89,45 13.43,42.25 9.76,37.93 L9.78,37.92 C6.82,34.43 5,29.94 5,25 C5,21.86 5.74,18.91 7.03,16.26 L2.89,13.33 C1.05,16.81 0,20.78 0,25 C0,31.01 2.13,36.52 5.66,40.83 L5.66,40.83 C10.24,46.42 17.21,49.99 25,49.99 C32.79,49.99 39.76,46.42 44.34,40.83 L40.24,37.93 Z\" />\r\n </g>\r\n\r\n </svg>\r\n</div>"
|
|
5935
|
-
},] }
|
|
5936
|
-
];
|
|
5937
|
-
SplashComponent.ctorParameters = function () { return [
|
|
5938
|
-
{ type: SplashService }
|
|
5939
|
-
]; };
|
|
5940
|
-
|
|
5941
|
-
var ResizableColumnComponent = /** @class */ (function () {
|
|
5942
|
-
function ResizableColumnComponent(el) {
|
|
5943
|
-
this.el = el;
|
|
5944
|
-
this.onResize = new i0.EventEmitter();
|
|
5945
|
-
}
|
|
5946
|
-
ResizableColumnComponent.prototype.emitWidth = function (width) {
|
|
5947
|
-
this.onResize.emit(width);
|
|
5948
|
-
};
|
|
5949
|
-
return ResizableColumnComponent;
|
|
5950
|
-
}());
|
|
5951
|
-
ResizableColumnComponent.decorators = [
|
|
5952
|
-
{ type: i0.Component, args: [{
|
|
5953
|
-
selector: 'th.is-resizable',
|
|
5954
|
-
template: "<div class=\"content-wrapper\">\r\n <div class=\"content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n<div class=\"handle\"></div>\r\n"
|
|
5955
|
-
},] }
|
|
5956
|
-
];
|
|
5957
|
-
ResizableColumnComponent.ctorParameters = function () { return [
|
|
5958
|
-
{ type: i0.ElementRef }
|
|
5959
|
-
]; };
|
|
5960
|
-
ResizableColumnComponent.propDecorators = {
|
|
5961
|
-
onResize: [{ type: i0.Output }]
|
|
5962
|
-
};
|
|
5963
|
-
|
|
5964
5849
|
var CacheService = /** @class */ (function () {
|
|
5965
5850
|
function CacheService() {
|
|
5966
5851
|
this.localStorageAvailable = false;
|
|
@@ -6186,6 +6071,174 @@
|
|
|
6186
6071
|
id: [{ type: i0.Input }]
|
|
6187
6072
|
};
|
|
6188
6073
|
|
|
6074
|
+
/**
|
|
6075
|
+
* Make an element resizable horizontally by wrapping it in the ResizableComponent.
|
|
6076
|
+
* Default widths / limits are applied but you can optionally override them
|
|
6077
|
+
* with min-width and max-width with style attributes
|
|
6078
|
+
* @example
|
|
6079
|
+
* <ec-resizable [style.width.px]="200"
|
|
6080
|
+
* [style.min-width.px]="75"
|
|
6081
|
+
* [style.max-width.px]="300">
|
|
6082
|
+
* <div> ... </div>
|
|
6083
|
+
* </ec-resizable>
|
|
6084
|
+
*/
|
|
6085
|
+
var ResizableComponent = /** @class */ (function (_super) {
|
|
6086
|
+
__extends(ResizableComponent, _super);
|
|
6087
|
+
function ResizableComponent(el, renderer, cacheService, document) {
|
|
6088
|
+
var _this = _super.call(this, renderer, cacheService, document) || this;
|
|
6089
|
+
_this.el = el;
|
|
6090
|
+
//default rememberWidth to true for standard resizable, resizable tables default to false
|
|
6091
|
+
_this.rememberWidth = true;
|
|
6092
|
+
return _this;
|
|
6093
|
+
}
|
|
6094
|
+
/** Store the host element to reference later */
|
|
6095
|
+
ResizableComponent.prototype.ngOnInit = function () {
|
|
6096
|
+
this.currentEl = this.el.nativeElement;
|
|
6097
|
+
};
|
|
6098
|
+
/**
|
|
6099
|
+
* Set the new width of the element and emit the new width to subscribers
|
|
6100
|
+
*/
|
|
6101
|
+
ResizableComponent.prototype.setWidth = function (width) {
|
|
6102
|
+
this.renderer.setStyle(this.currentEl, 'width', width + 'px');
|
|
6103
|
+
this.saveWidths([width]);
|
|
6104
|
+
};
|
|
6105
|
+
/**Called from the base class when cached widths are available and restoring
|
|
6106
|
+
* width is enabled. We only care about the first one because we only have one width
|
|
6107
|
+
*/
|
|
6108
|
+
ResizableComponent.prototype.restoreWidths = function (widths) {
|
|
6109
|
+
this.setWidth(widths[0]);
|
|
6110
|
+
};
|
|
6111
|
+
return ResizableComponent;
|
|
6112
|
+
}(ResizableBase));
|
|
6113
|
+
ResizableComponent.decorators = [
|
|
6114
|
+
{ type: i0.Component, args: [{
|
|
6115
|
+
selector: 'ec-resizable',
|
|
6116
|
+
template: "<div class=\"content\">\n <ng-content></ng-content>\n </div>\n <div class=\"handle\" (mousedown)=\"startDrag($event)\"></div>",
|
|
6117
|
+
styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{border-right:1px solid #d2d7d9;display:flex;max-width:480px;min-width:100px;position:relative;width:240px}:host.is-active{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}:host.is-active .handle:after{background-color:#0084a9}.handle{height:100%;padding:0 5px;position:absolute;right:-7px;top:0;width:13px;z-index:30}.handle:after{content:\"\";display:block;height:100%;position:relative;transition:background-color .3s ease}.handle:hover{cursor:col-resize}.handle:hover:after{background-color:#0084a9}.content{display:flex;overflow:hidden}.content,.content ::ng-deep>*{flex:1 1;min-height:0;min-width:0}"]
|
|
6118
|
+
},] }
|
|
6119
|
+
];
|
|
6120
|
+
ResizableComponent.ctorParameters = function () { return [
|
|
6121
|
+
{ type: i0.ElementRef },
|
|
6122
|
+
{ type: i0.Renderer2 },
|
|
6123
|
+
{ type: CacheService },
|
|
6124
|
+
{ type: Document, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
|
|
6125
|
+
]; };
|
|
6126
|
+
|
|
6127
|
+
/** Exposes the markup and styles that represent the spinner. No inputs or outputs defined because it is just a visual component*/
|
|
6128
|
+
var SpinnerComponent = /** @class */ (function () {
|
|
6129
|
+
function SpinnerComponent() {
|
|
6130
|
+
}
|
|
6131
|
+
return SpinnerComponent;
|
|
6132
|
+
}());
|
|
6133
|
+
SpinnerComponent.decorators = [
|
|
6134
|
+
{ type: i0.Component, args: [{
|
|
6135
|
+
selector: 'ec-spinner',
|
|
6136
|
+
template: "<div class=\"spinner\">\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n <span class=\"spinner-dot\"></span>\r\n</div>",
|
|
6137
|
+
styles: ["@-webkit-keyframes sk-bouncedelay{0%,80%,to{opacity:0}40%{opacity:1}}@keyframes sk-bouncedelay{0%,80%,to{opacity:0}40%{opacity:1}}.spinner{display:flex}.spinner-dot{-webkit-animation:sk-bouncedelay 1.7s ease-in-out infinite both;animation:sk-bouncedelay 1.7s ease-in-out infinite both;background-color:#0084a9;height:.75rem;margin-right:.25rem;width:.75rem}.spinner-dot:first-child{-webkit-animation-delay:-.6s;animation-delay:-.6s}.spinner-dot:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.spinner-dot:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}:host(.spinner-small) .spinner-dot{-webkit-animation:sk-bouncedelay 1.7s ease-in-out infinite both;animation:sk-bouncedelay 1.7s ease-in-out infinite both;background-color:#0084a9;height:.5rem;margin-right:.1666666667rem;width:.5rem}:host(.spinner-small) .spinner-dot:first-child{-webkit-animation-delay:-.6s;animation-delay:-.6s}:host(.spinner-small) .spinner-dot:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}:host(.spinner-small) .spinner-dot:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}"]
|
|
6138
|
+
},] }
|
|
6139
|
+
];
|
|
6140
|
+
|
|
6141
|
+
var SplashService = /** @class */ (function () {
|
|
6142
|
+
function SplashService() {
|
|
6143
|
+
/** Used to interact with the splash component
|
|
6144
|
+
* The splash component will subscribe to this and any components
|
|
6145
|
+
* that wish to bring the splash visible can use this to communicate
|
|
6146
|
+
* with the splash component.
|
|
6147
|
+
*/
|
|
6148
|
+
this._splashVisibility = new rxjs.Subject();
|
|
6149
|
+
this.splashVisibility = this._splashVisibility;
|
|
6150
|
+
}
|
|
6151
|
+
/**
|
|
6152
|
+
* Shows the splash screen
|
|
6153
|
+
*/
|
|
6154
|
+
SplashService.prototype.showSplash = function () {
|
|
6155
|
+
this._splashVisibility.next(true);
|
|
6156
|
+
};
|
|
6157
|
+
/**
|
|
6158
|
+
* Hides the splash screen
|
|
6159
|
+
*/
|
|
6160
|
+
SplashService.prototype.hideSplash = function () {
|
|
6161
|
+
this._splashVisibility.next(false);
|
|
6162
|
+
};
|
|
6163
|
+
return SplashService;
|
|
6164
|
+
}());
|
|
6165
|
+
SplashService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SplashService_Factory() { return new SplashService(); }, token: SplashService, providedIn: "root" });
|
|
6166
|
+
SplashService.decorators = [
|
|
6167
|
+
{ type: i0.Injectable, args: [{
|
|
6168
|
+
providedIn: 'root'
|
|
6169
|
+
},] }
|
|
6170
|
+
];
|
|
6171
|
+
SplashService.ctorParameters = function () { return []; };
|
|
6172
|
+
|
|
6173
|
+
var SplashComponent = /** @class */ (function () {
|
|
6174
|
+
function SplashComponent(splashService) {
|
|
6175
|
+
this.splashService = splashService;
|
|
6176
|
+
/** Sets the visibility of the splash display */
|
|
6177
|
+
this.isVisible = true;
|
|
6178
|
+
this.stopAnimation = false;
|
|
6179
|
+
/** Emits when the service is destroyed */
|
|
6180
|
+
this.destroyed = new rxjs.Subject();
|
|
6181
|
+
}
|
|
6182
|
+
SplashComponent.prototype.ngOnInit = function () {
|
|
6183
|
+
var _this = this;
|
|
6184
|
+
this.splashService.splashVisibility.pipe(operators.takeUntil(this.destroyed), operators.tap(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
6185
|
+
var _this = this;
|
|
6186
|
+
return __generator(this, function (_a) {
|
|
6187
|
+
if (value) {
|
|
6188
|
+
this.stopAnimation = false;
|
|
6189
|
+
}
|
|
6190
|
+
else {
|
|
6191
|
+
// Prevent animation from continuing after splash screen is hidden
|
|
6192
|
+
// but if we hide it then show while the timer is running, don't stop the animation after all
|
|
6193
|
+
rxjs.timer(1000).pipe(operators.takeUntil(this.splashService.splashVisibility)).subscribe(function () {
|
|
6194
|
+
_this.stopAnimation = true;
|
|
6195
|
+
});
|
|
6196
|
+
}
|
|
6197
|
+
return [2 /*return*/];
|
|
6198
|
+
});
|
|
6199
|
+
}); })).subscribe(function (showSplash) {
|
|
6200
|
+
_this.isVisible = showSplash;
|
|
6201
|
+
});
|
|
6202
|
+
};
|
|
6203
|
+
SplashComponent.prototype.ngOnDestroy = function () {
|
|
6204
|
+
this.destroyed.next();
|
|
6205
|
+
this.destroyed.unsubscribe();
|
|
6206
|
+
};
|
|
6207
|
+
return SplashComponent;
|
|
6208
|
+
}());
|
|
6209
|
+
SplashComponent.decorators = [
|
|
6210
|
+
{ type: i0.Component, args: [{
|
|
6211
|
+
selector: 'ec-splash',
|
|
6212
|
+
template: "<div class=\"app-splash\"\r\n [class.app-loaded]=\"!isVisible\">\r\n\r\n <!-- This is the raw icon.svg file so we can animate it -->\r\n <svg [class.d-none]=\"stopAnimation\" \r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"50\"\r\n height=\"50\"\r\n viewBox=\"0 0 50 50\">\r\n <g>\r\n <g>\r\n <path fill=\"#A0AD39\"\r\n fill-rule=\"nonzero\"\r\n d=\"M34.93,32.25 L34.93,37.25 L15.21,37.25 L15.21,32.25 L34.93,32.25 Z M28.45,22.48 L28.45,27.48 L15.21,27.48 L15.21,22.48 L28.45,22.48 Z M34.93,12.71 L34.93,17.71 L15.21,17.71 L15.21,12.71 L34.93,12.71 Z\" />\r\n <path fill=\"#A0AD39\"\r\n d=\"M24.99,5 C31.1,5 36.56,7.75 40.23,12.07 L44.33,9.16 C39.75,3.57 32.78,0 24.99,0 C17.2,0 10.23,3.57 5.65,9.16 L9.75,12.07 C13.42,7.75 18.88,5 24.99,5 Z\" />\r\n </g>\r\n <path fill=\"#17303B\"\r\n d=\"M40.24,37.93 C36.57,42.25 31.11,45 25,45 C18.89,45 13.43,42.25 9.76,37.93 L9.78,37.92 C6.82,34.43 5,29.94 5,25 C5,21.86 5.74,18.91 7.03,16.26 L2.89,13.33 C1.05,16.81 0,20.78 0,25 C0,31.01 2.13,36.52 5.66,40.83 L5.66,40.83 C10.24,46.42 17.21,49.99 25,49.99 C32.79,49.99 39.76,46.42 44.34,40.83 L40.24,37.93 Z\" />\r\n </g>\r\n\r\n </svg>\r\n</div>"
|
|
6213
|
+
},] }
|
|
6214
|
+
];
|
|
6215
|
+
SplashComponent.ctorParameters = function () { return [
|
|
6216
|
+
{ type: SplashService }
|
|
6217
|
+
]; };
|
|
6218
|
+
|
|
6219
|
+
var ResizableColumnComponent = /** @class */ (function () {
|
|
6220
|
+
function ResizableColumnComponent(el) {
|
|
6221
|
+
this.el = el;
|
|
6222
|
+
this.onResize = new i0.EventEmitter();
|
|
6223
|
+
}
|
|
6224
|
+
ResizableColumnComponent.prototype.emitWidth = function (width) {
|
|
6225
|
+
this.onResize.emit(width);
|
|
6226
|
+
};
|
|
6227
|
+
return ResizableColumnComponent;
|
|
6228
|
+
}());
|
|
6229
|
+
ResizableColumnComponent.decorators = [
|
|
6230
|
+
{ type: i0.Component, args: [{
|
|
6231
|
+
selector: 'th.is-resizable',
|
|
6232
|
+
template: "<div class=\"content-wrapper\">\r\n <div class=\"content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n<div class=\"handle\"></div>\r\n"
|
|
6233
|
+
},] }
|
|
6234
|
+
];
|
|
6235
|
+
ResizableColumnComponent.ctorParameters = function () { return [
|
|
6236
|
+
{ type: i0.ElementRef }
|
|
6237
|
+
]; };
|
|
6238
|
+
ResizableColumnComponent.propDecorators = {
|
|
6239
|
+
onResize: [{ type: i0.Output }]
|
|
6240
|
+
};
|
|
6241
|
+
|
|
6189
6242
|
/**
|
|
6190
6243
|
* Add the ability to resize columns to a standard HTML table.
|
|
6191
6244
|
* Specify a column as resizable by adding the .is-resizable class to a <th>.
|
|
@@ -8132,6 +8185,51 @@
|
|
|
8132
8185
|
{ type: UserPreferenceService }
|
|
8133
8186
|
]; };
|
|
8134
8187
|
|
|
8188
|
+
var RelativeDatePipe = /** @class */ (function () {
|
|
8189
|
+
function RelativeDatePipe(dateDisplayPipe, timeDisplayPipe, translateService) {
|
|
8190
|
+
this.dateDisplayPipe = dateDisplayPipe;
|
|
8191
|
+
this.timeDisplayPipe = timeDisplayPipe;
|
|
8192
|
+
this.translateService = translateService;
|
|
8193
|
+
}
|
|
8194
|
+
/**
|
|
8195
|
+
* If dateOnly is true, returns timeSelected formatted according to the user's date preference.
|
|
8196
|
+
* If timeOnly is true, returns timeSelected formatted according to the user's time preference.
|
|
8197
|
+
* If any of todayLabel, yesterdayLabel is supplied, use the supplied label.
|
|
8198
|
+
* If dateOnly and timeOnly are both false, returns timeSelected formatted according to the user's date plus time preference.
|
|
8199
|
+
*/
|
|
8200
|
+
RelativeDatePipe.prototype.transform = function (timeSelected, options) {
|
|
8201
|
+
var selected = moment__default['default'](timeSelected);
|
|
8202
|
+
var today = moment__default['default']();
|
|
8203
|
+
var yesterday = moment__default['default']().subtract(1, 'day');
|
|
8204
|
+
var timeDisplay = (options === null || options === void 0 ? void 0 : options.dateOnly) ? "" : " " + this.timeDisplayPipe.transform(timeSelected);
|
|
8205
|
+
var displayValue = null;
|
|
8206
|
+
if (selected.isSame(today, 'day') && !(options === null || options === void 0 ? void 0 : options.showTimeForToday)) {
|
|
8207
|
+
displayValue = this.translateService.instant((options === null || options === void 0 ? void 0 : options.todayLabel) ? options === null || options === void 0 ? void 0 : options.todayLabel : 'today');
|
|
8208
|
+
}
|
|
8209
|
+
else if (selected.isSame(today, 'day') && (options === null || options === void 0 ? void 0 : options.showTimeForToday) && !timeDisplay) {
|
|
8210
|
+
displayValue = this.timeDisplayPipe.transform(timeSelected);
|
|
8211
|
+
}
|
|
8212
|
+
else if (selected.isSame(yesterday, 'day')) {
|
|
8213
|
+
displayValue = this.translateService.instant((options === null || options === void 0 ? void 0 : options.yesterdayLabel) ? options === null || options === void 0 ? void 0 : options.yesterdayLabel : 'yesterday');
|
|
8214
|
+
}
|
|
8215
|
+
else {
|
|
8216
|
+
displayValue = this.dateDisplayPipe.transform(timeSelected);
|
|
8217
|
+
}
|
|
8218
|
+
return "" + displayValue + timeDisplay;
|
|
8219
|
+
};
|
|
8220
|
+
return RelativeDatePipe;
|
|
8221
|
+
}());
|
|
8222
|
+
RelativeDatePipe.decorators = [
|
|
8223
|
+
{ type: i0.Pipe, args: [{
|
|
8224
|
+
name: 'relativeDate'
|
|
8225
|
+
},] }
|
|
8226
|
+
];
|
|
8227
|
+
RelativeDatePipe.ctorParameters = function () { return [
|
|
8228
|
+
{ type: DateDisplayPipe },
|
|
8229
|
+
{ type: TimeDisplayPipe },
|
|
8230
|
+
{ type: i1.TranslateService }
|
|
8231
|
+
]; };
|
|
8232
|
+
|
|
8135
8233
|
var PageTitleComponent = /** @class */ (function () {
|
|
8136
8234
|
function PageTitleComponent() {
|
|
8137
8235
|
}
|
|
@@ -8530,6 +8628,7 @@
|
|
|
8530
8628
|
WizardButtonsComponent,
|
|
8531
8629
|
HierarchyTreeComponent,
|
|
8532
8630
|
TreeComponent,
|
|
8631
|
+
RelativeDatePipe,
|
|
8533
8632
|
ResizableComponent
|
|
8534
8633
|
],
|
|
8535
8634
|
imports: [
|
|
@@ -8547,7 +8646,8 @@
|
|
|
8547
8646
|
DateDisplayPipe,
|
|
8548
8647
|
TimeDisplayPipe,
|
|
8549
8648
|
MockDateDisplayPipe,
|
|
8550
|
-
RowCountPipe
|
|
8649
|
+
RowCountPipe,
|
|
8650
|
+
RelativeDatePipe
|
|
8551
8651
|
],
|
|
8552
8652
|
exports: [
|
|
8553
8653
|
ButtonComponent,
|
|
@@ -8601,6 +8701,7 @@
|
|
|
8601
8701
|
WizardButtonsComponent,
|
|
8602
8702
|
HierarchyTreeComponent,
|
|
8603
8703
|
TreeComponent,
|
|
8704
|
+
RelativeDatePipe,
|
|
8604
8705
|
ResizableComponent
|
|
8605
8706
|
]
|
|
8606
8707
|
},] }
|
|
@@ -8687,59 +8788,6 @@
|
|
|
8687
8788
|
}());
|
|
8688
8789
|
;
|
|
8689
8790
|
|
|
8690
|
-
/**
|
|
8691
|
-
* Make an element resizable horizontally by wrapping it in the ResizableComponent.
|
|
8692
|
-
* Default widths / limits are applied but you can optionally override them
|
|
8693
|
-
* with min-width and max-width with style attributes
|
|
8694
|
-
* @example
|
|
8695
|
-
* <ec-resizable [style.width.px]="200"
|
|
8696
|
-
* [style.min-width.px]="75"
|
|
8697
|
-
* [style.max-width.px]="300">
|
|
8698
|
-
* <div> ... </div>
|
|
8699
|
-
* </ec-resizable>
|
|
8700
|
-
*/
|
|
8701
|
-
var ResizableComponent = /** @class */ (function (_super) {
|
|
8702
|
-
__extends(ResizableComponent, _super);
|
|
8703
|
-
function ResizableComponent(el, renderer, cacheService, document) {
|
|
8704
|
-
var _this = _super.call(this, renderer, cacheService, document) || this;
|
|
8705
|
-
_this.el = el;
|
|
8706
|
-
//default rememberWidth to true for standard resizable, resizable tables default to false
|
|
8707
|
-
_this.rememberWidth = true;
|
|
8708
|
-
return _this;
|
|
8709
|
-
}
|
|
8710
|
-
/** Store the host element to reference later */
|
|
8711
|
-
ResizableComponent.prototype.ngOnInit = function () {
|
|
8712
|
-
this.currentEl = this.el.nativeElement;
|
|
8713
|
-
};
|
|
8714
|
-
/**
|
|
8715
|
-
* Set the new width of the element and emit the new width to subscribers
|
|
8716
|
-
*/
|
|
8717
|
-
ResizableComponent.prototype.setWidth = function (width) {
|
|
8718
|
-
this.renderer.setStyle(this.currentEl, 'width', width + 'px');
|
|
8719
|
-
this.saveWidths([width]);
|
|
8720
|
-
};
|
|
8721
|
-
/**Called from the base class when cached widths are available and restoring
|
|
8722
|
-
* width is enabled. We only care about the first one because we only have one width
|
|
8723
|
-
*/
|
|
8724
|
-
ResizableComponent.prototype.restoreWidths = function (widths) {
|
|
8725
|
-
this.setWidth(widths[0]);
|
|
8726
|
-
};
|
|
8727
|
-
return ResizableComponent;
|
|
8728
|
-
}(ResizableBase));
|
|
8729
|
-
ResizableComponent.decorators = [
|
|
8730
|
-
{ type: i0.Component, args: [{
|
|
8731
|
-
selector: 'ec-resizable',
|
|
8732
|
-
template: "<div class=\"content\">\n <ng-content></ng-content>\n </div>\n <div class=\"handle\" (mousedown)=\"startDrag($event)\"></div>",
|
|
8733
|
-
styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{border-right:1px solid #d2d7d9;display:flex;max-width:480px;min-width:100px;position:relative;width:240px}:host.is-active{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}:host.is-active .handle:after{background-color:#0084a9}.handle{height:100%;padding:0 5px;position:absolute;right:-7px;top:0;width:13px;z-index:30}.handle:after{content:\"\";display:block;height:100%;position:relative;transition:background-color .3s ease}.handle:hover{cursor:col-resize}.handle:hover:after{background-color:#0084a9}.content{display:flex;overflow:hidden}.content,.content ::ng-deep>*{flex:1 1;min-height:0;min-width:0}"]
|
|
8734
|
-
},] }
|
|
8735
|
-
];
|
|
8736
|
-
ResizableComponent.ctorParameters = function () { return [
|
|
8737
|
-
{ type: i0.ElementRef },
|
|
8738
|
-
{ type: i0.Renderer2 },
|
|
8739
|
-
{ type: CacheService },
|
|
8740
|
-
{ type: Document, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
|
|
8741
|
-
]; };
|
|
8742
|
-
|
|
8743
8791
|
var CustomValidators = /** @class */ (function () {
|
|
8744
8792
|
function CustomValidators() {
|
|
8745
8793
|
}
|
|
@@ -9811,6 +9859,7 @@
|
|
|
9811
9859
|
exports.PopupContainerDirective = PopupContainerDirective;
|
|
9812
9860
|
exports.RadioButtonComponent = RadioButtonComponent;
|
|
9813
9861
|
exports.RadioButtonOption = RadioButtonOption;
|
|
9862
|
+
exports.RelativeDatePipe = RelativeDatePipe;
|
|
9814
9863
|
exports.ResizableBase = ResizableBase;
|
|
9815
9864
|
exports.ResizableColumnComponent = ResizableColumnComponent;
|
|
9816
9865
|
exports.ResizableComponent = ResizableComponent;
|