@energycap/components 0.43.4-esbuild.20250425-1549 → 0.43.4
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/energycap-components.min.css +1 -1
- package/esm2022/lib/components.module.mjs +14 -7
- package/esm2022/lib/core/date-time-helper.mjs +1 -5
- package/esm2022/lib/display/tags/tags.component.mjs +3 -3
- package/esm2022/lib/shared/display/pipes/date-display-2.pipe.mjs +39 -0
- package/esm2022/lib/shared/display/pipes/date-display.pipe.mjs +3 -2
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/energycap-components.mjs +49 -13
- package/fesm2022/energycap-components.mjs.map +1 -1
- package/lib/components.module.d.ts +9 -8
- package/lib/core/date-time-helper.d.ts +2 -2
- package/lib/shared/display/pipes/date-display-2.pipe.d.ts +24 -0
- package/lib/shared/display/pipes/date-display.pipe.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/schematics/utilities/typescript.d.ts +1 -1
- package/schematics/utilities/typescript.js +9 -12
- package/schematics/utilities/typescript.js.map +1 -1
- package/src/assets/images/favicon-ech.svg +12 -5
- package/src/assets/images/favicon-eum.svg +11 -4
- package/src/assets/images/favicon.svg +10 -3
- package/src/assets/images/icon-ucp.svg +10 -3
- package/src/assets/images/icon.svg +9 -2
- package/src/assets/images/logo.svg +8 -1
- package/src/styles/components/_tag.scss +18 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/mixins/_tags-base.scss +8 -3
@@ -595,8 +595,6 @@ class DateTimeHelper {
|
|
595
595
|
* Return true if @see date is equal to the @see endOfTime
|
596
596
|
*/
|
597
597
|
static isEndOfTime(date, timeZoneOffset = false) {
|
598
|
-
if (!date)
|
599
|
-
return false;
|
600
598
|
const endOfTime = timeZoneOffset ? this.endOfTimeUTC : this.endOfTime;
|
601
599
|
return this.isSameDay(date, endOfTime);
|
602
600
|
}
|
@@ -604,8 +602,6 @@ class DateTimeHelper {
|
|
604
602
|
* Compare two dates and return true if they represent the same year, month, and day (time is ignored).
|
605
603
|
*/
|
606
604
|
static isSameDay(date1, date2) {
|
607
|
-
if (!date1 || !date2)
|
608
|
-
return false;
|
609
605
|
return moment(date1).isSame(moment(date2), 'day');
|
610
606
|
}
|
611
607
|
/**
|
@@ -1445,6 +1441,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
1445
1441
|
|
1446
1442
|
/**
|
1447
1443
|
* Format a date to the user's preference for display
|
1444
|
+
* @deprecated Use DateDisplayPipe2 instead
|
1448
1445
|
*/
|
1449
1446
|
class DateDisplayPipe {
|
1450
1447
|
constructor(userPreferenceService) {
|
@@ -2390,11 +2387,11 @@ class TagsComponent {
|
|
2390
2387
|
this.tagClosed.emit(tag);
|
2391
2388
|
}
|
2392
2389
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TagsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
2393
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TagsComponent, selector: "ec-tags", inputs: { id: "id", tags: "tags", wrap: "wrap", isCondensed: "isCondensed" }, outputs: { tagClosed: "tagClosed" }, usesOnChanges: true, ngImport: i0, template: "<ul class=\"tags\"\r\n [class.is-wrapped]=\"wrap\">\r\n <li *ngFor=\"let tag of tagsArray; index as i\"\r\n id=\"{{id}}_tag_{{i}}\"\r\n class=\"tag is-{{tag.type}} {{tag.classList}} mr-1\"\r\n [
|
2390
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TagsComponent, selector: "ec-tags", inputs: { id: "id", tags: "tags", wrap: "wrap", isCondensed: "isCondensed" }, outputs: { tagClosed: "tagClosed" }, usesOnChanges: true, ngImport: i0, template: "<ul class=\"tags\"\r\n [class.is-wrapped]=\"wrap\">\r\n <li *ngFor=\"let tag of tagsArray; index as i\"\r\n id=\"{{id}}_tag_{{i}}\"\r\n class=\"tag is-{{tag.type}} {{tag.classList}} mr-1\"\r\n [class.is-condensed]=\"isCondensed\"\r\n title=\"{{tag.tooltip | translate}}\">\r\n <i *ngIf=\"tag.icon\"\r\n class=\"ec-icon {{tag.icon}} ec-icon-sm\"></i>\r\n <span *ngIf=\"!tag.url\">{{tag.label | translate}}</span>\r\n\r\n <a *ngIf=\"tag.url\"\r\n id=\"{{id}}_tag_{{i}}_link\"\r\n class=\"font-weight-bold\"\r\n href=\"{{tag.url}}\"\r\n target=\"{{tag.target}}\">{{tag.label | translate}}</a>\r\n\r\n <button id=\"{{id}}_tag_{{i}}_dismissButton\"\r\n *ngIf=\"tag.isDismissable\"\r\n (click)=\"closeTag(tag)\"\r\n class=\"tag-close-btn\">\r\n <i class=\"ec-icon ec-icon-sm icon-cancel\"></i>\r\n </button>\r\n </li>\r\n</ul>", styles: ["@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{display:block}.tags{padding:0;margin:0;list-style:none;display:flex}.tags.is-wrapped{flex-wrap:wrap;margin-top:.25rem}.tags.is-wrapped>.tag{margin-bottom:.25rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
|
2394
2391
|
}
|
2395
2392
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TagsComponent, decorators: [{
|
2396
2393
|
type: Component,
|
2397
|
-
args: [{ selector: 'ec-tags', template: "<ul class=\"tags\"\r\n [class.is-wrapped]=\"wrap\">\r\n <li *ngFor=\"let tag of tagsArray; index as i\"\r\n id=\"{{id}}_tag_{{i}}\"\r\n class=\"tag is-{{tag.type}} {{tag.classList}} mr-1\"\r\n [
|
2394
|
+
args: [{ selector: 'ec-tags', template: "<ul class=\"tags\"\r\n [class.is-wrapped]=\"wrap\">\r\n <li *ngFor=\"let tag of tagsArray; index as i\"\r\n id=\"{{id}}_tag_{{i}}\"\r\n class=\"tag is-{{tag.type}} {{tag.classList}} mr-1\"\r\n [class.is-condensed]=\"isCondensed\"\r\n title=\"{{tag.tooltip | translate}}\">\r\n <i *ngIf=\"tag.icon\"\r\n class=\"ec-icon {{tag.icon}} ec-icon-sm\"></i>\r\n <span *ngIf=\"!tag.url\">{{tag.label | translate}}</span>\r\n\r\n <a *ngIf=\"tag.url\"\r\n id=\"{{id}}_tag_{{i}}_link\"\r\n class=\"font-weight-bold\"\r\n href=\"{{tag.url}}\"\r\n target=\"{{tag.target}}\">{{tag.label | translate}}</a>\r\n\r\n <button id=\"{{id}}_tag_{{i}}_dismissButton\"\r\n *ngIf=\"tag.isDismissable\"\r\n (click)=\"closeTag(tag)\"\r\n class=\"tag-close-btn\">\r\n <i class=\"ec-icon ec-icon-sm icon-cancel\"></i>\r\n </button>\r\n </li>\r\n</ul>", styles: ["@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{display:block}.tags{padding:0;margin:0;list-style:none;display:flex}.tags.is-wrapped{flex-wrap:wrap;margin-top:.25rem}.tags.is-wrapped>.tag{margin-bottom:.25rem}\n"] }]
|
2398
2395
|
}], ctorParameters: () => [], propDecorators: { id: [{
|
2399
2396
|
type: Input
|
2400
2397
|
}], tags: [{
|
@@ -11235,6 +11232,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
11235
11232
|
args: ['ecIfViewportWidth']
|
11236
11233
|
}] } });
|
11237
11234
|
|
11235
|
+
/**
|
11236
|
+
* NOTE - This is asynchronous so it must be used in conjunction with the async pipe when in a template.
|
11237
|
+
* @example <span>{{ someDate | dateDisplay2 | async }}</span>
|
11238
|
+
*/
|
11239
|
+
class DateDisplayPipe2 {
|
11240
|
+
constructor(userPrefs) {
|
11241
|
+
this.userPrefs = userPrefs;
|
11242
|
+
}
|
11243
|
+
async transform(date, options) {
|
11244
|
+
const { showEndOfTime, showTime, showSeconds, displayInUTC } = options || {};
|
11245
|
+
if (!date || !moment(date).isValid() || (!showEndOfTime && DateTimeHelper.isEndOfTime(date))) {
|
11246
|
+
return '';
|
11247
|
+
}
|
11248
|
+
const { preference } = await lastValueFrom(this.userPrefs.getPreferences());
|
11249
|
+
let formatString = preference?.dateFormat || 'MM/DD/YYYY';
|
11250
|
+
if (showTime) {
|
11251
|
+
let timeFormat = preference.timeFormat;
|
11252
|
+
if (!showSeconds) {
|
11253
|
+
timeFormat = timeFormat.replace(':ss', '');
|
11254
|
+
}
|
11255
|
+
formatString += ` ${timeFormat}`;
|
11256
|
+
}
|
11257
|
+
// Parse and format the date using moment. If displayInUTC is true, use moment.utc() to shift the date to UTC.
|
11258
|
+
return (displayInUTC ? moment.utc(date) : moment(date)).format(formatString);
|
11259
|
+
}
|
11260
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DateDisplayPipe2, deps: [{ token: UserPreferenceService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
11261
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: DateDisplayPipe2, name: "dateDisplay2" }); }
|
11262
|
+
}
|
11263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DateDisplayPipe2, decorators: [{
|
11264
|
+
type: Pipe,
|
11265
|
+
args: [{ name: 'dateDisplay2' }]
|
11266
|
+
}], ctorParameters: () => [{ type: UserPreferenceService }] });
|
11267
|
+
|
11238
11268
|
class HighlightTextPipe {
|
11239
11269
|
transform(value, searchText) {
|
11240
11270
|
let transformedValue = '';
|
@@ -11962,7 +11992,8 @@ class ComponentsModule {
|
|
11962
11992
|
CalendarComponent,
|
11963
11993
|
CalendarItemComponent,
|
11964
11994
|
DateInputComponent,
|
11965
|
-
KeyboardNavContainerDirective
|
11995
|
+
KeyboardNavContainerDirective,
|
11996
|
+
DateDisplayPipe2], imports: [CommonModule,
|
11966
11997
|
FormsModule,
|
11967
11998
|
ReactiveFormsModule,
|
11968
11999
|
RouterModule,
|
@@ -12033,7 +12064,8 @@ class ComponentsModule {
|
|
12033
12064
|
TooltipDirective,
|
12034
12065
|
CalendarComponent,
|
12035
12066
|
DateInputComponent,
|
12036
|
-
KeyboardNavContainerDirective
|
12067
|
+
KeyboardNavContainerDirective,
|
12068
|
+
DateDisplayPipe2] }); }
|
12037
12069
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComponentsModule, providers: [
|
12038
12070
|
FormGroupHelper,
|
12039
12071
|
DialogService,
|
@@ -12042,7 +12074,8 @@ class ComponentsModule {
|
|
12042
12074
|
MockDateDisplayPipe,
|
12043
12075
|
RowCountPipe,
|
12044
12076
|
RelativeDatePipe,
|
12045
|
-
HighlightTextPipe
|
12077
|
+
HighlightTextPipe,
|
12078
|
+
DateDisplayPipe2
|
12046
12079
|
], imports: [CommonModule,
|
12047
12080
|
FormsModule,
|
12048
12081
|
ReactiveFormsModule,
|
@@ -12127,7 +12160,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
12127
12160
|
CalendarComponent,
|
12128
12161
|
CalendarItemComponent,
|
12129
12162
|
DateInputComponent,
|
12130
|
-
KeyboardNavContainerDirective
|
12163
|
+
KeyboardNavContainerDirective,
|
12164
|
+
DateDisplayPipe2
|
12131
12165
|
],
|
12132
12166
|
imports: [
|
12133
12167
|
CommonModule,
|
@@ -12147,7 +12181,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
12147
12181
|
MockDateDisplayPipe,
|
12148
12182
|
RowCountPipe,
|
12149
12183
|
RelativeDatePipe,
|
12150
|
-
HighlightTextPipe
|
12184
|
+
HighlightTextPipe,
|
12185
|
+
DateDisplayPipe2
|
12151
12186
|
],
|
12152
12187
|
exports: [
|
12153
12188
|
ButtonComponent,
|
@@ -12214,7 +12249,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
12214
12249
|
TooltipDirective,
|
12215
12250
|
CalendarComponent,
|
12216
12251
|
DateInputComponent,
|
12217
|
-
KeyboardNavContainerDirective
|
12252
|
+
KeyboardNavContainerDirective,
|
12253
|
+
DateDisplayPipe2
|
12218
12254
|
]
|
12219
12255
|
}]
|
12220
12256
|
}] });
|
@@ -13228,5 +13264,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
13228
13264
|
* Generated bundle index. Do not edit.
|
13229
13265
|
*/
|
13230
13266
|
|
13231
|
-
export { AppBarComponent, AvatarComponent, BannerComponent, ButtonComponent, CacheService, CalendarComponent, CheckboxComponent, ClickAreaForDirective, CollapsibleToggleComponent, ComboboxComponent, ComponentsModule, ConfirmComponent, ConfirmDialogContext, CopyButtonBaseTestInjectorFactory, CopyButtonDirective, CopyTableButtonDirective, CustomValidators, DateDisplayPipe, DateInput, DateInputComponent, DateTimeHelper, DialogCloseDuration, DialogCloseEvent, DialogCloseLatestEvent, DialogComponent, DialogEvent, DialogGroupComponent, DialogOpenDuration, DialogOpenEndEvent, DialogOpenStartEvent, DialogResult, DialogService, DropdownComponent, ErrorService, FileTypeExtensions, FileUploadComponent, FormControlBase, FormControlComponent, FormControlLabelComponent, FormGroupComponent, FormGroupHelper, HelpPopoverComponent, HierarchyBase, HierarchyBaseTestInjectorFactory, HierarchyItem, HierarchyMocks, HierarchyTreeComponent, HighlightTextPipe, IfViewportWidthDirective, ItemDisplayComponent, ItemPickerComponent, ItemPickerSelectableContext, JsonDisplayComponent, JsonHelper, KeyboardNavContainerDirective, LinkButtonComponent, MenuComponent, MockActivatedRoute, MockDateDisplayPipe, MockDialog, MockDialogContent, MockTranslateService, MockTranslationHelperService, NavGroup, NavItemActiveDirective, NumericboxComponent, Overlay, PageBaseComponent, PageBaseComponentTestHelper, PageBaseComponentTestInjectorFactory, PageInitResult, PageStatus, PageStatuses, PageTitleComponent, PageViewComponent, PanelCloseDuration, PanelOpenDuration, PopoverComponent, PopupContainerDirective, RadioButtonComponent, RadioButtonOption, RelativeDatePipe, ResizableBase, ResizableColumnComponent, ResizableComponent, RouterHelper, RowCountPipe, ScrollService, SearchableTableComponent, SelectComponent, SpinnerComponent, SplashComponent, SplashService, SpyFactory, TableComponent, TableLockedColumnComponent, TableMasterHeaderRowComponent, TableMasterRowComponent, TablePaginationComponent, TableSelectableRowComponent, TableSelectableRowContext, TabsComponent, Tag, TagsComponent, TelemetryService, TelemetryTrackerService, TextboxComponent, TimeDisplayPipe, ToastComponent, ToastEvent, ToastService, ToasterComponent, TooltipComponent, TooltipDirective, TooltipService, Tour, TourAnchor, TourComponent, TourEvent, TourService, TourStep, TreeComponent, UnicodeStrings, UserPreferenceService, ValidationMessageService, ViewOverlayComponent, WindowService, WizardBaseComponent, WizardButtonsComponent, WizardProgressComponent, canadianPostalCodeRegex, clickEvent, dateInputFormatRegex, domainPattern, findAllSpacesPattern, forEachFormControl, getApiError, getControlValue, getDecimalPattern, integerPattern, isApiError, menuAnimationSpeed, mockRouterFactory, mockRouterHelperFactory, numericboxValidation, orderByIgnoreCase, otherZipCodeRegex, phoneNumberValidationPattern, sortByIgnoreCase, textboxValidation, unitedStatesZipCodeRegex, urlValidationPattern, validateFormGroupValuesAreUnique };
|
13267
|
+
export { AppBarComponent, AvatarComponent, BannerComponent, ButtonComponent, CacheService, CalendarComponent, CheckboxComponent, ClickAreaForDirective, CollapsibleToggleComponent, ComboboxComponent, ComponentsModule, ConfirmComponent, ConfirmDialogContext, CopyButtonBaseTestInjectorFactory, CopyButtonDirective, CopyTableButtonDirective, CustomValidators, DateDisplayPipe, DateDisplayPipe2, DateInput, DateInputComponent, DateTimeHelper, DialogCloseDuration, DialogCloseEvent, DialogCloseLatestEvent, DialogComponent, DialogEvent, DialogGroupComponent, DialogOpenDuration, DialogOpenEndEvent, DialogOpenStartEvent, DialogResult, DialogService, DropdownComponent, ErrorService, FileTypeExtensions, FileUploadComponent, FormControlBase, FormControlComponent, FormControlLabelComponent, FormGroupComponent, FormGroupHelper, HelpPopoverComponent, HierarchyBase, HierarchyBaseTestInjectorFactory, HierarchyItem, HierarchyMocks, HierarchyTreeComponent, HighlightTextPipe, IfViewportWidthDirective, ItemDisplayComponent, ItemPickerComponent, ItemPickerSelectableContext, JsonDisplayComponent, JsonHelper, KeyboardNavContainerDirective, LinkButtonComponent, MenuComponent, MockActivatedRoute, MockDateDisplayPipe, MockDialog, MockDialogContent, MockTranslateService, MockTranslationHelperService, NavGroup, NavItemActiveDirective, NumericboxComponent, Overlay, PageBaseComponent, PageBaseComponentTestHelper, PageBaseComponentTestInjectorFactory, PageInitResult, PageStatus, PageStatuses, PageTitleComponent, PageViewComponent, PanelCloseDuration, PanelOpenDuration, PopoverComponent, PopupContainerDirective, RadioButtonComponent, RadioButtonOption, RelativeDatePipe, ResizableBase, ResizableColumnComponent, ResizableComponent, RouterHelper, RowCountPipe, ScrollService, SearchableTableComponent, SelectComponent, SpinnerComponent, SplashComponent, SplashService, SpyFactory, TableComponent, TableLockedColumnComponent, TableMasterHeaderRowComponent, TableMasterRowComponent, TablePaginationComponent, TableSelectableRowComponent, TableSelectableRowContext, TabsComponent, Tag, TagsComponent, TelemetryService, TelemetryTrackerService, TextboxComponent, TimeDisplayPipe, ToastComponent, ToastEvent, ToastService, ToasterComponent, TooltipComponent, TooltipDirective, TooltipService, Tour, TourAnchor, TourComponent, TourEvent, TourService, TourStep, TreeComponent, UnicodeStrings, UserPreferenceService, ValidationMessageService, ViewOverlayComponent, WindowService, WizardBaseComponent, WizardButtonsComponent, WizardProgressComponent, canadianPostalCodeRegex, clickEvent, dateInputFormatRegex, domainPattern, findAllSpacesPattern, forEachFormControl, getApiError, getControlValue, getDecimalPattern, integerPattern, isApiError, menuAnimationSpeed, mockRouterFactory, mockRouterHelperFactory, numericboxValidation, orderByIgnoreCase, otherZipCodeRegex, phoneNumberValidationPattern, sortByIgnoreCase, textboxValidation, unitedStatesZipCodeRegex, urlValidationPattern, validateFormGroupValuesAreUnique };
|
13232
13268
|
//# sourceMappingURL=energycap-components.mjs.map
|