@energycap/components 0.39.35 → 0.39.36-ECAP-26840-date-input.20241118-1204

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.
@@ -65,12 +65,16 @@ import * as i62 from "./display/tooltip/tooltip.component";
65
65
  import * as i63 from "./display/tour/tour.component";
66
66
  import * as i64 from "./controls/button/copy-table-button.directive";
67
67
  import * as i65 from "./display/tooltip-directive/tooltip.directive";
68
- import * as i66 from "@angular/common";
69
- import * as i67 from "@angular/forms";
70
- import * as i68 from "@angular/router";
71
- import * as i69 from "@ngx-translate/core";
72
- import * as i70 from "@angular/cdk/a11y";
73
- import * as i71 from "@angular/cdk/overlay";
68
+ import * as i66 from "./controls/calendar/calendar.component";
69
+ import * as i67 from "./controls/calendar/calendar-item.component";
70
+ import * as i68 from "./controls/date-input/date-input.component";
71
+ import * as i69 from "@angular/common";
72
+ import * as i70 from "@angular/forms";
73
+ import * as i71 from "@angular/router";
74
+ import * as i72 from "@ngx-translate/core";
75
+ import * as i73 from "@angular/cdk/a11y";
76
+ import * as i74 from "@angular/cdk/overlay";
77
+ import * as i75 from "@angular/cdk/scrolling";
74
78
  export type ComponentsModuleConfig = {
75
79
  tracker: Provider;
76
80
  };
@@ -82,6 +86,6 @@ export declare class ComponentsModule {
82
86
  */
83
87
  static forRoot(config: ComponentsModuleConfig): ModuleWithProviders<ComponentsModule>;
84
88
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
85
- static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.ButtonComponent, typeof i2.TabsComponent, typeof i3.TextboxComponent, typeof i4.NavItemActiveDirective, typeof i5.SpinnerComponent, typeof i6.ViewOverlayComponent, typeof i7.BannerComponent, typeof i8.ResizableTableDirective, typeof i2.TabsComponent, typeof i9.TableComponent, typeof i10.SearchableTableComponent, typeof i11.ComboboxComponent, typeof i12.MenuComponent, typeof i13.PopupContainerDirective, typeof i14.DropdownComponent, typeof i15.ConfirmComponent, typeof i16.DialogComponent, typeof i17.DateDisplayPipe, typeof i18.TimeDisplayPipe, typeof i19.MockDateDisplayPipe, typeof i20.RadioButtonComponent, typeof i21.CheckboxComponent, typeof i22.NumericboxComponent, typeof i23.AvatarComponent, typeof i24.AppBarComponent, typeof i25.SplashComponent, typeof i26.IfViewportWidthDirective, typeof i27.ClickAreaForDirective, typeof i28.CollapsibleToggleComponent, typeof i29.TableMasterRowComponent, typeof i30.TableMasterHeaderRowComponent, typeof i31.TableDetailRowComponent, typeof i32.TableLockedColumnComponent, typeof i33.TableSelectableRowComponent, typeof i34.PopoverComponent, typeof i35.TablePaginationComponent, typeof i36.RowCountPipe, typeof i37.CopyButtonDirective, typeof i35.TablePaginationComponent, typeof i38.TagsComponent, typeof i39.FormControlComponent, typeof i40.SelectComponent, typeof i41.ItemDisplayComponent, typeof i33.TableSelectableRowComponent, typeof i42.ResizableColumnComponent, typeof i43.DialogGroupComponent, typeof i44.FileUploadComponent, typeof i45.FormGroupComponent, typeof i46.JsonDisplayComponent, typeof i47.ToastComponent, typeof i48.ToasterComponent, typeof i49.PageViewComponent, typeof i50.PageTitleComponent, typeof i51.WizardProgressComponent, typeof i52.WizardButtonsComponent, typeof i53.HierarchyTreeComponent, typeof i54.TreeComponent, typeof i55.RelativeDatePipe, typeof i56.ResizableComponent, typeof i57.HighlightTextPipe, typeof i58.FormControlLabelComponent, typeof i59.ItemPickerComponent, typeof i60.HelpPopoverComponent, typeof i61.LinkButtonComponent, typeof i62.TooltipComponent, typeof i63.TourComponent, typeof i64.CopyTableButtonDirective, typeof i65.TooltipDirective], [typeof i66.CommonModule, typeof i67.FormsModule, typeof i67.ReactiveFormsModule, typeof i68.RouterModule, typeof i69.TranslateModule, typeof i70.A11yModule, typeof i71.OverlayModule], [typeof i1.ButtonComponent, typeof i2.TabsComponent, typeof i3.TextboxComponent, typeof i4.NavItemActiveDirective, typeof i5.SpinnerComponent, typeof i6.ViewOverlayComponent, typeof i7.BannerComponent, typeof i2.TabsComponent, typeof i9.TableComponent, typeof i10.SearchableTableComponent, typeof i11.ComboboxComponent, typeof i12.MenuComponent, typeof i13.PopupContainerDirective, typeof i14.DropdownComponent, typeof i15.ConfirmComponent, typeof i16.DialogComponent, typeof i17.DateDisplayPipe, typeof i18.TimeDisplayPipe, typeof i20.RadioButtonComponent, typeof i21.CheckboxComponent, typeof i22.NumericboxComponent, typeof i23.AvatarComponent, typeof i24.AppBarComponent, typeof i25.SplashComponent, typeof i26.IfViewportWidthDirective, typeof i27.ClickAreaForDirective, typeof i28.CollapsibleToggleComponent, typeof i29.TableMasterRowComponent, typeof i30.TableMasterHeaderRowComponent, typeof i32.TableLockedColumnComponent, typeof i33.TableSelectableRowComponent, typeof i34.PopoverComponent, typeof i37.CopyButtonDirective, typeof i35.TablePaginationComponent, typeof i38.TagsComponent, typeof i39.FormControlComponent, typeof i40.SelectComponent, typeof i41.ItemDisplayComponent, typeof i42.ResizableColumnComponent, typeof i43.DialogGroupComponent, typeof i44.FileUploadComponent, typeof i45.FormGroupComponent, typeof i46.JsonDisplayComponent, typeof i47.ToastComponent, typeof i48.ToasterComponent, typeof i49.PageViewComponent, typeof i50.PageTitleComponent, typeof i51.WizardProgressComponent, typeof i52.WizardButtonsComponent, typeof i53.HierarchyTreeComponent, typeof i54.TreeComponent, typeof i55.RelativeDatePipe, typeof i56.ResizableComponent, typeof i57.HighlightTextPipe, typeof i58.FormControlLabelComponent, typeof i59.ItemPickerComponent, typeof i60.HelpPopoverComponent, typeof i61.LinkButtonComponent, typeof i62.TooltipComponent, typeof i63.TourComponent, typeof i64.CopyTableButtonDirective, typeof i65.TooltipDirective]>;
89
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.ButtonComponent, typeof i2.TabsComponent, typeof i3.TextboxComponent, typeof i4.NavItemActiveDirective, typeof i5.SpinnerComponent, typeof i6.ViewOverlayComponent, typeof i7.BannerComponent, typeof i8.ResizableTableDirective, typeof i2.TabsComponent, typeof i9.TableComponent, typeof i10.SearchableTableComponent, typeof i11.ComboboxComponent, typeof i12.MenuComponent, typeof i13.PopupContainerDirective, typeof i14.DropdownComponent, typeof i15.ConfirmComponent, typeof i16.DialogComponent, typeof i17.DateDisplayPipe, typeof i18.TimeDisplayPipe, typeof i19.MockDateDisplayPipe, typeof i20.RadioButtonComponent, typeof i21.CheckboxComponent, typeof i22.NumericboxComponent, typeof i23.AvatarComponent, typeof i24.AppBarComponent, typeof i25.SplashComponent, typeof i26.IfViewportWidthDirective, typeof i27.ClickAreaForDirective, typeof i28.CollapsibleToggleComponent, typeof i29.TableMasterRowComponent, typeof i30.TableMasterHeaderRowComponent, typeof i31.TableDetailRowComponent, typeof i32.TableLockedColumnComponent, typeof i33.TableSelectableRowComponent, typeof i34.PopoverComponent, typeof i35.TablePaginationComponent, typeof i36.RowCountPipe, typeof i37.CopyButtonDirective, typeof i35.TablePaginationComponent, typeof i38.TagsComponent, typeof i39.FormControlComponent, typeof i40.SelectComponent, typeof i41.ItemDisplayComponent, typeof i33.TableSelectableRowComponent, typeof i42.ResizableColumnComponent, typeof i43.DialogGroupComponent, typeof i44.FileUploadComponent, typeof i45.FormGroupComponent, typeof i46.JsonDisplayComponent, typeof i47.ToastComponent, typeof i48.ToasterComponent, typeof i49.PageViewComponent, typeof i50.PageTitleComponent, typeof i51.WizardProgressComponent, typeof i52.WizardButtonsComponent, typeof i53.HierarchyTreeComponent, typeof i54.TreeComponent, typeof i55.RelativeDatePipe, typeof i56.ResizableComponent, typeof i57.HighlightTextPipe, typeof i58.FormControlLabelComponent, typeof i59.ItemPickerComponent, typeof i60.HelpPopoverComponent, typeof i61.LinkButtonComponent, typeof i62.TooltipComponent, typeof i63.TourComponent, typeof i64.CopyTableButtonDirective, typeof i65.TooltipDirective, typeof i66.CalendarComponent, typeof i67.CalendarItemComponent, typeof i68.DateInputComponent], [typeof i69.CommonModule, typeof i70.FormsModule, typeof i70.ReactiveFormsModule, typeof i71.RouterModule, typeof i72.TranslateModule, typeof i73.A11yModule, typeof i74.OverlayModule, typeof i75.ScrollingModule], [typeof i1.ButtonComponent, typeof i2.TabsComponent, typeof i3.TextboxComponent, typeof i4.NavItemActiveDirective, typeof i5.SpinnerComponent, typeof i6.ViewOverlayComponent, typeof i7.BannerComponent, typeof i2.TabsComponent, typeof i9.TableComponent, typeof i10.SearchableTableComponent, typeof i11.ComboboxComponent, typeof i12.MenuComponent, typeof i13.PopupContainerDirective, typeof i14.DropdownComponent, typeof i15.ConfirmComponent, typeof i16.DialogComponent, typeof i17.DateDisplayPipe, typeof i18.TimeDisplayPipe, typeof i20.RadioButtonComponent, typeof i21.CheckboxComponent, typeof i22.NumericboxComponent, typeof i23.AvatarComponent, typeof i24.AppBarComponent, typeof i25.SplashComponent, typeof i26.IfViewportWidthDirective, typeof i27.ClickAreaForDirective, typeof i28.CollapsibleToggleComponent, typeof i29.TableMasterRowComponent, typeof i30.TableMasterHeaderRowComponent, typeof i32.TableLockedColumnComponent, typeof i33.TableSelectableRowComponent, typeof i34.PopoverComponent, typeof i37.CopyButtonDirective, typeof i35.TablePaginationComponent, typeof i38.TagsComponent, typeof i39.FormControlComponent, typeof i40.SelectComponent, typeof i41.ItemDisplayComponent, typeof i42.ResizableColumnComponent, typeof i43.DialogGroupComponent, typeof i44.FileUploadComponent, typeof i45.FormGroupComponent, typeof i46.JsonDisplayComponent, typeof i47.ToastComponent, typeof i48.ToasterComponent, typeof i49.PageViewComponent, typeof i50.PageTitleComponent, typeof i51.WizardProgressComponent, typeof i52.WizardButtonsComponent, typeof i53.HierarchyTreeComponent, typeof i54.TreeComponent, typeof i55.RelativeDatePipe, typeof i56.ResizableComponent, typeof i57.HighlightTextPipe, typeof i58.FormControlLabelComponent, typeof i59.ItemPickerComponent, typeof i60.HelpPopoverComponent, typeof i61.LinkButtonComponent, typeof i62.TooltipComponent, typeof i63.TourComponent, typeof i64.CopyTableButtonDirective, typeof i65.TooltipDirective, typeof i66.CalendarComponent, typeof i68.DateInputComponent]>;
86
90
  static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
87
91
  }
@@ -0,0 +1,17 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import { CalendarItem, CalendarSelection, CalendarView } from './calendar.types';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CalendarItemComponent implements OnChanges {
5
+ item?: CalendarItem;
6
+ activeDate?: Date;
7
+ selection?: CalendarSelection;
8
+ view: CalendarView;
9
+ today: boolean;
10
+ selected: boolean;
11
+ outsideActiveMonth: boolean;
12
+ constructor();
13
+ ngOnChanges(changes: SimpleChanges): void;
14
+ private isSelected;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarItemComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarItemComponent, "button[ec-calendar-item]", never, { "item": "item"; "activeDate": "activeDate"; "selection": "selection"; "view": "view"; }, {}, never, never, false, never>;
17
+ }
@@ -0,0 +1,54 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { CalendarItem, CalendarSelection, CalendarView } from './calendar.types';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CalendarComponent implements OnChanges, OnInit {
5
+ id: string;
6
+ selection: CalendarSelection | null;
7
+ selectionChange: EventEmitter<CalendarSelection | null>;
8
+ minDate: Date;
9
+ maxDate: Date;
10
+ focusOutStart: EventEmitter<void>;
11
+ focusOutEnd: EventEmitter<void>;
12
+ /** Month of the active date displayed in the header buttons. */
13
+ month?: string;
14
+ /** Year of the active date displayed in the header buttons. */
15
+ year?: string;
16
+ /** Range of years to display in the year view. */
17
+ yearRange?: string;
18
+ /** Array of calendar items to display in the calendar grid. */
19
+ calendarItems: CalendarItem[];
20
+ /** Weekday labels to show at the top of the calendar in day view. */
21
+ weekDays: string[];
22
+ /** Determines the current view mode of the calendar. */
23
+ view: CalendarView;
24
+ /**
25
+ * Tracks the month and year being viewed in the calendar.
26
+ * This is separate from the selection, which may be out of view.
27
+ */
28
+ activeDate: Date;
29
+ /** TrackBy function for the calendar items. This avoids re-drawing calendar items if a date is shared between view updates */
30
+ calendarItemTrackByDate: (index: number, item: CalendarItem) => string;
31
+ disablePreviousButton: boolean;
32
+ disableNextButton: boolean;
33
+ constructor();
34
+ ngOnChanges(changes: SimpleChanges): void;
35
+ ngOnInit(): void;
36
+ onItemSelected(item: CalendarItem): void;
37
+ onNextClick(): void;
38
+ onPreviousClick(): void;
39
+ /** Switches the calendar to month view. */
40
+ onMonthClick(): void;
41
+ /** Switches the calendar to year view. */
42
+ onYearClick(): void;
43
+ onFirstItemKeydown(event: KeyboardEvent): void;
44
+ onLastItemKeydown(event: KeyboardEvent): void;
45
+ private drawCalendar;
46
+ private getCalendarItems;
47
+ private getDayViewItems;
48
+ private getMonthViewItems;
49
+ private getYearViewItems;
50
+ /** Returns true if the date is within the current calendar view */
51
+ private isDateInView;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
53
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "ec-calendar", never, { "id": "id"; "selection": "selection"; "minDate": "minDate"; "maxDate": "maxDate"; }, { "selectionChange": "selectionChange"; "focusOutStart": "focusOutStart"; "focusOutEnd": "focusOutEnd"; }, never, never, false, never>;
54
+ }
@@ -0,0 +1,7 @@
1
+ export type CalendarItem = {
2
+ label: string;
3
+ date: Date;
4
+ };
5
+ export type CalendarSelection = Date | [Date, Date];
6
+ export type CalendarView = 'day' | 'month' | 'year';
7
+ export declare function isCalendarSelectionSingleDate(selection?: CalendarSelection | null): selection is Date;
@@ -0,0 +1,79 @@
1
+ import { CdkConnectedOverlay, Overlay } from '@angular/cdk/overlay';
2
+ import { ElementRef, OnInit } from '@angular/core';
3
+ import { FormControl } from '@angular/forms';
4
+ import { ValidationMessageService } from '../../core/validation-message.service';
5
+ import { DateDisplayPipe } from '../../shared/display/pipes/date-display.pipe';
6
+ import { FormGroupHelper } from '../../shared/form-group.helper';
7
+ import { UserPreferenceService } from '../../shared/user-preference.service';
8
+ import { CalendarSelection } from '../calendar/calendar.types';
9
+ import { FormControlBase } from '../form-control-base';
10
+ import * as i0 from "@angular/core";
11
+ export type DateInputFormControl = FormControl<Date | null>;
12
+ export declare class DateInputComponent extends FormControlBase implements OnInit {
13
+ protected validationMessageService: ValidationMessageService;
14
+ protected formGroupHelper: FormGroupHelper;
15
+ private userPreferenceService;
16
+ private dateDisplayPipe;
17
+ private el;
18
+ private overlayService;
19
+ id: string;
20
+ /** The form control provided by the hosting form. */
21
+ formModel: DateInputFormControl;
22
+ minDate: Date;
23
+ maxDate: Date;
24
+ /** The internal textbox's form control. */
25
+ textboxControl: FormControl<string | null>;
26
+ /**
27
+ * The current calendar selection.
28
+ * Updated when the user clicks on a calendar item or when the date entered into the textbox is parsed.
29
+ */
30
+ calendarSelection: CalendarSelection | null;
31
+ /** Controls whether the calendar overlay is open or not. */
32
+ isCalendarOpen: boolean;
33
+ /** Placeholder for the textbox. Updated to reflect the user's date display preference. */
34
+ placeholder: string;
35
+ /** Overlay scroll strategy for the calendar overlay. Closes the calendar on scroll. */
36
+ overlayScrollStrategy: import("@angular/cdk/overlay").CloseScrollStrategy;
37
+ /**
38
+ * Date parsing formats for user-entered dates. Defaults to month-first formats, but is updated in onInit
39
+ * to use the user's preferred date format.
40
+ */
41
+ private parseFormats;
42
+ /** Reference to the overlay directive (see template). Used to access the overlay's host element to control focus. */
43
+ overlay?: CdkConnectedOverlay;
44
+ constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper, userPreferenceService: UserPreferenceService, dateDisplayPipe: DateDisplayPipe, el: ElementRef, overlayService: Overlay);
45
+ openCalendar(): void;
46
+ closeCalendar(): void;
47
+ onCalendarClose(): void;
48
+ /** Close the calendar if the user clicks outside of the calendar and date input. */
49
+ onOverlayOutsideClick(event: MouseEvent): void;
50
+ /** Focuses the date input. */
51
+ focusInput(): void;
52
+ /** If the user tabs out of the form control's action button and the calendar is open, focus the first item in the calendar overlay */
53
+ onActionKeydown(event: KeyboardEvent): void;
54
+ onTextboxKeydown(event: KeyboardEvent): void;
55
+ /** Whenever the user selects a date from the calendar, update the formModel with the selection */
56
+ onSelectionChange(selection: CalendarSelection | null): void;
57
+ onTextboxBlur(): void;
58
+ ngOnInit(): void;
59
+ private onFormModelStatusChanges;
60
+ private onFormModelValueChanges;
61
+ private onTextboxValueChanges;
62
+ private syncTextboxControlDisabledStatus;
63
+ /**
64
+ * Updates the date parsing formats and placeholder based on the user's display preference.
65
+ * NOTE: This is async because we're retrieving the user's preferences. We're not awaiting the result
66
+ * because the only logic that depends on this is the text box date parsing logic and placeholder.
67
+ * Our forms should always be behind a pending overlay, so the user won't be able to interact with the
68
+ * form until the user is loaded anyway.
69
+ */
70
+ private setDateFormats;
71
+ /**
72
+ * Validator that checks if the date is within the min and max date range.
73
+ * If the date is outside of the range, the validator returns an error that
74
+ * triggers the validation message service to show the error in the label.
75
+ */
76
+ private dateValidator;
77
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, never>;
78
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "ec-date-input", never, { "id": "id"; "formModel": "formModel"; "minDate": "minDate"; "maxDate": "maxDate"; }, {}, never, never, false, never>;
79
+ }
@@ -1,25 +1,30 @@
1
- import { ElementRef, EventEmitter, AfterViewInit } from '@angular/core';
1
+ import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { AbstractControl } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
- export declare class FormControlComponent implements AfterViewInit {
4
+ export declare class FormControlComponent implements OnChanges, AfterViewInit {
5
5
  private el;
6
- formModel?: AbstractControl;
6
+ formControlDirective?: AbstractControl;
7
7
  id: string;
8
8
  icon?: string;
9
9
  actionIcon?: string;
10
10
  showClear: boolean;
11
+ formModelInput?: AbstractControl;
12
+ autofocus: boolean;
11
13
  pending: boolean;
12
14
  required: boolean;
13
15
  readonly: boolean;
14
16
  get empty(): boolean;
15
17
  get invalid(): boolean;
16
18
  get disabled(): boolean;
17
- actionClicked: EventEmitter<void>;
19
+ actionClicked: EventEmitter<Event>;
20
+ actionKeydown: EventEmitter<KeyboardEvent>;
21
+ private _formModel?;
18
22
  constructor(el: ElementRef);
23
+ ngOnChanges(changes: SimpleChanges): void;
19
24
  ngAfterViewInit(): void;
20
25
  onClick(): void;
21
26
  focus(): void;
22
27
  clear(): void;
23
28
  static ɵfac: i0.ɵɵFactoryDeclaration<FormControlComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<FormControlComponent, "ec-form-control", never, { "id": "id"; "icon": "icon"; "actionIcon": "actionIcon"; "showClear": "showClear"; "pending": "pending"; "required": "required"; "readonly": "readonly"; }, { "actionClicked": "actionClicked"; }, ["formModel"], ["*"], false, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormControlComponent, "ec-form-control", never, { "id": "id"; "icon": "icon"; "actionIcon": "actionIcon"; "showClear": "showClear"; "formModelInput": "formModel"; "autofocus": "autofocus"; "pending": "pending"; "required": "required"; "readonly": "readonly"; }, { "actionClicked": "actionClicked"; "actionKeydown": "actionKeydown"; }, ["formControlDirective"], ["*"], false, never>;
25
30
  }
@@ -32,11 +32,32 @@ export declare class DateTimeHelper {
32
32
  * when the users date format preference has month before day
33
33
  */
34
34
  static monthFirstParseFormats: string[];
35
+ /**
36
+ * User input formats that we will parse into a date
37
+ * when the users date format preference has month before day.
38
+ * To be used with moment.js. Moment ignores non-alphanumeric characters
39
+ * so dates like 2020/09/10 will be parsed the same as 2020-09-10
40
+ */
41
+ static momentMonthFirstParseFormats: string[];
35
42
  /**
36
43
  * User input formats that we will parse into a date
37
44
  * when the users date format preference has day before month
38
45
  */
39
46
  static dateFirstParseFormats: string[];
47
+ /**
48
+ * User input formats that we will parse into a date
49
+ * when the users date format preference has day before month.
50
+ * To be used with moment.js. Moment ignores non-alphanumeric characters
51
+ * so dates like 2020/09/10 will be parsed the same as 2020-09-10
52
+ */
53
+ static momentDateFirstParseFormats: string[];
54
+ /**
55
+ * Formats used to parse dates that are in the medium or long format by moment js.
56
+ * These are shared by date-first and month-first date formats. The date can't be
57
+ * parsed differently based on the date preference since the month is not numeric.
58
+ * This is not an exhaustive list of formats, but it should cover most common formats.
59
+ */
60
+ static momentMedAndLongDateFormats: string[];
40
61
  /**
41
62
  * Format to display the time portion of a datetime
42
63
  */
@@ -55,6 +76,11 @@ export declare class DateTimeHelper {
55
76
  *
56
77
  */
57
78
  static getParseFormats(dateFormat?: string | null): string[];
79
+ /**
80
+ * Get the moment parse formats based on the given date format. If no date format is
81
+ * given, or we don't recognize the format, return the month first parse formats.
82
+ */
83
+ static getMomentParseFormats(dateFormat?: string | null): string[];
58
84
  /**
59
85
  * Get relationship start date (favoring date in partialFormState if exists)
60
86
  * * return default account-meter effective date if no start date found
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.39.35",
3
+ "version": "0.39.36-ECAP-26840-date-input.20241118-1204",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
package/public-api.d.ts CHANGED
@@ -106,3 +106,6 @@ export * from './lib/display/tour/tour.service';
106
106
  export * from './lib/display/tour/tour.component';
107
107
  export * from './lib/controls/button/copy-table-button.directive';
108
108
  export * from './lib/shared/testing/copy-button-base-test-injector-factory.spec';
109
+ export * from './lib/controls/calendar/calendar.component';
110
+ export * from './lib/controls/calendar/calendar.types';
111
+ export * from './lib/controls/date-input/date-input.component';