@energycap/components 0.42.0 → 0.42.1

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.
Files changed (40) hide show
  1. package/esm2022/lib/components.module.mjs +10 -5
  2. package/esm2022/lib/controls/calendar/calendar-item.component.mjs +46 -14
  3. package/esm2022/lib/controls/calendar/calendar.component.mjs +169 -121
  4. package/esm2022/lib/controls/calendar/calendar.types.mjs +2 -4
  5. package/esm2022/lib/controls/date-input/date-input-selection-strategies/date-input-selection-strategy-base.mjs +57 -0
  6. package/esm2022/lib/controls/date-input/date-input-selection-strategies/day-selection-strategy.mjs +62 -0
  7. package/esm2022/lib/controls/date-input/date-input-selection-strategies/last-28-days-selection-strategy.mjs +100 -0
  8. package/esm2022/lib/controls/date-input/date-input-selection-strategies/last-7-days-selection-strategy.mjs +101 -0
  9. package/esm2022/lib/controls/date-input/date-input-selection-strategies/month-selection-strategy.mjs +76 -0
  10. package/esm2022/lib/controls/date-input/date-input-selection-strategies/quarter-selection-strategy.mjs +79 -0
  11. package/esm2022/lib/controls/date-input/date-input-selection-strategies/range-selection-strategy.mjs +210 -0
  12. package/esm2022/lib/controls/date-input/date-input-selection-strategies/year-selection-strategy.mjs +81 -0
  13. package/esm2022/lib/controls/date-input/date-input.component.mjs +322 -113
  14. package/esm2022/lib/controls/date-input/date-input.types.mjs +44 -0
  15. package/esm2022/lib/controls/file-upload/file-upload.component.mjs +1 -1
  16. package/esm2022/lib/controls/form-control/form-control.component.mjs +6 -12
  17. package/esm2022/lib/core/date-time-helper.mjs +10 -2
  18. package/esm2022/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.mjs +100 -0
  19. package/esm2022/public-api.mjs +63 -61
  20. package/fesm2022/energycap-components.mjs +1666 -507
  21. package/fesm2022/energycap-components.mjs.map +1 -1
  22. package/lib/components.module.d.ts +9 -8
  23. package/lib/controls/calendar/calendar-item.component.d.ts +11 -6
  24. package/lib/controls/calendar/calendar.component.d.ts +21 -23
  25. package/lib/controls/calendar/calendar.types.d.ts +11 -7
  26. package/lib/controls/date-input/date-input-selection-strategies/date-input-selection-strategy-base.d.ts +42 -0
  27. package/lib/controls/date-input/date-input-selection-strategies/day-selection-strategy.d.ts +21 -0
  28. package/lib/controls/date-input/date-input-selection-strategies/last-28-days-selection-strategy.d.ts +21 -0
  29. package/lib/controls/date-input/date-input-selection-strategies/last-7-days-selection-strategy.d.ts +21 -0
  30. package/lib/controls/date-input/date-input-selection-strategies/month-selection-strategy.d.ts +18 -0
  31. package/lib/controls/date-input/date-input-selection-strategies/quarter-selection-strategy.d.ts +18 -0
  32. package/lib/controls/date-input/date-input-selection-strategies/range-selection-strategy.d.ts +21 -0
  33. package/lib/controls/date-input/date-input-selection-strategies/year-selection-strategy.d.ts +20 -0
  34. package/lib/controls/date-input/date-input.component.d.ts +63 -28
  35. package/lib/controls/date-input/date-input.types.d.ts +62 -0
  36. package/lib/controls/form-control/form-control.component.d.ts +4 -6
  37. package/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.d.ts +23 -0
  38. package/package.json +1 -1
  39. package/public-api.d.ts +62 -60
  40. package/src/assets/locales/en_US.json +9 -1
@@ -68,13 +68,14 @@ import * as i65 from "./display/tooltip-directive/tooltip.directive";
68
68
  import * as i66 from "./controls/calendar/calendar.component";
69
69
  import * as i67 from "./controls/calendar/calendar-item.component";
70
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";
71
+ import * as i69 from "./shared/directives/keyboard-nav-container/keyboard-nav-container.directive";
72
+ import * as i70 from "@angular/common";
73
+ import * as i71 from "@angular/forms";
74
+ import * as i72 from "@angular/router";
75
+ import * as i73 from "@ngx-translate/core";
76
+ import * as i74 from "@angular/cdk/a11y";
77
+ import * as i75 from "@angular/cdk/overlay";
78
+ import * as i76 from "@angular/cdk/scrolling";
78
79
  export type ComponentsModuleConfig = {
79
80
  tracker: Provider;
80
81
  };
@@ -86,6 +87,6 @@ export declare class ComponentsModule {
86
87
  */
87
88
  static forRoot(config: ComponentsModuleConfig): ModuleWithProviders<ComponentsModule>;
88
89
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
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]>;
90
+ 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.KeyboardNavContainerDirective], [typeof i70.CommonModule, typeof i71.FormsModule, typeof i71.ReactiveFormsModule, typeof i72.RouterModule, typeof i73.TranslateModule, typeof i74.A11yModule, typeof i75.OverlayModule, typeof i76.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, typeof i69.KeyboardNavContainerDirective]>;
90
91
  static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
91
92
  }
@@ -1,17 +1,22 @@
1
1
  import { OnChanges } from '@angular/core';
2
- import { CalendarItem, CalendarSelection, CalendarView } from './calendar.types';
2
+ import { DateInput } from '../date-input/date-input.types';
3
+ import { Calendar } from './calendar.types';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class CalendarItemComponent implements OnChanges {
5
- item?: CalendarItem;
6
- activeDate?: Date;
7
- selection?: CalendarSelection;
8
- view: CalendarView;
6
+ item?: Calendar.Item;
7
+ selection?: DateInput.Selection;
8
+ view: Calendar.View;
9
+ minDate: Date;
10
+ maxDate: Date;
9
11
  today: boolean;
10
12
  selected: boolean;
11
13
  outsideActiveMonth: boolean;
14
+ hidden: boolean;
15
+ get disabled(): true | undefined;
12
16
  constructor();
13
17
  ngOnChanges(): void;
14
18
  private isSelected;
19
+ private isHidden;
15
20
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarItemComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarItemComponent, "button[ec-calendar-item]", never, { "item": { "alias": "item"; "required": false; }; "activeDate": { "alias": "activeDate"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "view": { "alias": "view"; "required": false; }; }, {}, never, never, false, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarItemComponent, "button[ec-calendar-item]", never, { "item": { "alias": "item"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "view": { "alias": "view"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, {}, never, ["*"], false, never>;
17
22
  }
@@ -1,54 +1,52 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import { CalendarItem, CalendarSelection, CalendarView } from './calendar.types';
2
+ import { DateInput } from '../date-input/date-input.types';
3
+ import { Calendar } from './calendar.types';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class CalendarComponent implements OnChanges, OnInit {
5
6
  id: string;
6
- selection: CalendarSelection | null;
7
- selectionChange: EventEmitter<CalendarSelection | null>;
7
+ selection: DateInput.Selection | null;
8
+ selectionMode: DateInput.SelectionMode;
8
9
  minDate: Date;
9
10
  maxDate: Date;
10
- focusOutStart: EventEmitter<KeyboardEvent>;
11
- focusOutEnd: EventEmitter<KeyboardEvent>;
11
+ dateSelected: EventEmitter<Date>;
12
+ /** Determines the current view of the calendar. */
13
+ view: Calendar.View;
14
+ viewChange: EventEmitter<Calendar.View>;
12
15
  /** Month of the active date displayed in the header buttons. */
13
16
  month?: string;
14
17
  /** Year of the active date displayed in the header buttons. */
15
18
  year?: string;
16
19
  /** Range of years to display in the year view. */
17
20
  yearRange?: string;
18
- /** Array of calendar items to display in the calendar grid. */
19
- calendarItems: CalendarItem[];
21
+ /** Array of calendar item rows to display in the calendar. */
22
+ calendarItems: Calendar.Item[][];
20
23
  /** Weekday labels to show at the top of the calendar in day view. */
21
24
  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
25
  disablePreviousButton: boolean;
32
26
  disableNextButton: boolean;
33
- constructor();
27
+ trackByDateRow: (index: number, row: Calendar.Item[]) => string;
28
+ trackByDate: (index: number, item: Calendar.Item) => string;
34
29
  ngOnChanges(changes: SimpleChanges): void;
35
30
  ngOnInit(): void;
36
- onItemSelected(item: CalendarItem): void;
37
31
  onNextClick(): void;
38
32
  onPreviousClick(): void;
39
33
  /** Switches the calendar to month view. */
40
34
  onMonthClick(): void;
41
35
  /** Switches the calendar to year view. */
42
36
  onYearClick(): void;
43
- onFirstItemKeydown(event: KeyboardEvent): void;
44
- onLastItemKeydown(event: KeyboardEvent): void;
37
+ onItemSelected(item: Calendar.Item): void;
38
+ private onYearSelected;
39
+ private onQuarterSelected;
40
+ private onMonthSelected;
41
+ private onDaySelected;
45
42
  private drawCalendar;
46
43
  private getCalendarItems;
47
44
  private getDayViewItems;
48
45
  private getMonthViewItems;
46
+ private getQuarterViewItems;
49
47
  private getYearViewItems;
50
- /** Returns true if the date is within the current calendar view */
51
- private isDateInView;
48
+ private updateNextPreviousStates;
49
+ private getLastItem;
52
50
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
53
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "ec-calendar", never, { "id": { "alias": "id"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "selectionChange": "selectionChange"; "focusOutStart": "focusOutStart"; "focusOutEnd": "focusOutEnd"; }, never, never, false, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "ec-calendar", never, { "id": { "alias": "id"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "view": { "alias": "view"; "required": false; }; }, { "dateSelected": "dateSelected"; "viewChange": "viewChange"; }, never, never, false, never>;
54
52
  }
@@ -1,7 +1,11 @@
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;
1
+ export declare namespace Calendar {
2
+ type ViewMode = 'day' | 'month' | 'quarter' | 'year';
3
+ type View = {
4
+ mode: ViewMode;
5
+ date: Date;
6
+ };
7
+ type Item = {
8
+ label: string;
9
+ date: Date;
10
+ };
11
+ }
@@ -0,0 +1,42 @@
1
+ import { Calendar } from "../../calendar/calendar.types";
2
+ import { DateInput } from "../date-input.types";
3
+ /**
4
+ * Contains the logic for selecting, formatting, and parsing date dates for a specific selection mode.
5
+ */
6
+ export declare abstract class DateInputSelectionStrategyBase {
7
+ /** The calendar view mode where selections occur for this mode. This is used to zoom the calendar into the selection */
8
+ abstract readonly selectionViewMode: Calendar.ViewMode;
9
+ /** The list of view modes that are accessible by this selection mode. Used to determine whether the calendar view needs to be changed or not on selection change. */
10
+ abstract readonly validViewModes: Calendar.ViewMode[];
11
+ /** Whether the secondary textbox should be shown for this selection mode */
12
+ abstract readonly showSecondaryTextbox: boolean;
13
+ /** Whether the secondary calendar should be shown for this selection mode */
14
+ abstract readonly showSecondaryCalendar: boolean;
15
+ /** Parses the string into a date using the provided parse formats. */
16
+ parseString(value: string | null | undefined, parseFormats: string[], opts?: DateInput.ParsingOptions): Date | null;
17
+ /** Formats a date input selection into values to be displayed in the date input's textboxes. */
18
+ abstract formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'];
19
+ /**
20
+ * Parses the date input's values into a date selection to display in the calendars.
21
+ * `parseFromEnd` controls whether the fixed range modes (last7days, last28days) will key off the end date instead of the start date.
22
+ * This is used when the user is typing in the end date textbox.
23
+ */
24
+ abstract parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;
25
+ /** Returns a selection given a date and an existing selection (in the case of date ranges). Called when a date is clicked in the calendars. */
26
+ abstract getSelectionFromDate(date: Date, existingSelection?: DateInput.Selection | null): DateInput.Selection | null;
27
+ /** Returns a new selection that best matches the given previous selection from a different selection mode */
28
+ abstract getNewSelectionFromExisting(previousSelection?: DateInput.Selection | null): DateInput.Selection | null;
29
+ /** Returns a new selection for the provided date. */
30
+ getSelectionForQuickSelectDate(date: Date, existingSelection?: DateInput.Selection | null): DateInput.Selection | null;
31
+ /** Returns the next selection. Called by the date input steppers to move the range. */
32
+ abstract getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
33
+ /** Returns the previous selection. Called by the date input steppers to move the range. */
34
+ abstract getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
35
+ /** Returns the view for the primary calendar for the selection and selection mode */
36
+ getPrimaryCalendarView(selection: DateInput.Selection | null, minDate: Date, maxDate: Date, currentView: Calendar.View): Calendar.View;
37
+ /**
38
+ * Returns the view for the secondary calendar for the selection and selection mode.
39
+ * This is is only used by the range selection strategy. All others just return the current date.
40
+ */
41
+ getSecondaryCalendarView(selection: DateInput.Selection | null, minDate: Date, maxDate: Date, currentView: Calendar.View): Calendar.View;
42
+ }
@@ -0,0 +1,21 @@
1
+ import { DateDisplayPipe } from "../../../shared/display/pipes/date-display.pipe";
2
+ import { Calendar } from "../../calendar/calendar.types";
3
+ import { DateInput } from "../date-input.types";
4
+ import { DateInputSelectionStrategyBase } from "./date-input-selection-strategy-base";
5
+ /**
6
+ * Selection strategy for the 'day' selection mode.
7
+ */
8
+ export declare class DaySelectionStrategy extends DateInputSelectionStrategyBase {
9
+ private dateDisplayPipe;
10
+ readonly selectionViewMode: Calendar.ViewMode;
11
+ readonly validViewModes: Calendar.ViewMode[];
12
+ readonly showSecondaryTextbox = false;
13
+ readonly showSecondaryCalendar = false;
14
+ constructor(dateDisplayPipe: DateDisplayPipe);
15
+ formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'];
16
+ parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;
17
+ getSelectionFromDate(date: Date): DateInput.Selection | null;
18
+ getNewSelectionFromExisting(previousSelection?: DateInput.Selection | null): DateInput.Selection | null;
19
+ getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
20
+ getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
21
+ }
@@ -0,0 +1,21 @@
1
+ import { Calendar } from "../../calendar/calendar.types";
2
+ import { DateInput } from "../date-input.types";
3
+ import { DateInputSelectionStrategyBase } from "./date-input-selection-strategy-base";
4
+ import { RangeSelectionStrategy } from "./range-selection-strategy";
5
+ /**
6
+ * Selection strategy for the 'last 28 days' selection mode.
7
+ */
8
+ export declare class Last28DaysSelectionStrategy extends DateInputSelectionStrategyBase {
9
+ private rangeStrategy;
10
+ readonly selectionViewMode: Calendar.ViewMode;
11
+ readonly validViewModes: Calendar.ViewMode[];
12
+ readonly showSecondaryTextbox = true;
13
+ readonly showSecondaryCalendar = false;
14
+ constructor(rangeStrategy: RangeSelectionStrategy);
15
+ formatSelection(value?: DateInput.Selection | null): DateInput.TextboxGroup['value'];
16
+ parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;
17
+ getSelectionFromDate(date: Date): DateInput.Selection | null;
18
+ getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null;
19
+ getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
20
+ getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
21
+ }
@@ -0,0 +1,21 @@
1
+ import { Calendar } from "../../calendar/calendar.types";
2
+ import { DateInput } from "../date-input.types";
3
+ import { DateInputSelectionStrategyBase } from "./date-input-selection-strategy-base";
4
+ import { RangeSelectionStrategy } from "./range-selection-strategy";
5
+ /**
6
+ * Selection strategy for the 'last 7 days' selection mode.
7
+ */
8
+ export declare class Last7DaysSelectionStrategy extends DateInputSelectionStrategyBase {
9
+ private rangeStrategy;
10
+ readonly selectionViewMode: Calendar.ViewMode;
11
+ readonly validViewModes: Calendar.ViewMode[];
12
+ readonly showSecondaryTextbox = true;
13
+ readonly showSecondaryCalendar = false;
14
+ constructor(rangeStrategy: RangeSelectionStrategy);
15
+ formatSelection(value?: DateInput.Selection | null): DateInput.TextboxGroup['value'];
16
+ parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;
17
+ getSelectionFromDate(date: Date): DateInput.Selection | null;
18
+ getNewSelectionFromExisting(previousSelection?: DateInput.Selection | null): DateInput.Selection | null;
19
+ getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
20
+ getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
21
+ }
@@ -0,0 +1,18 @@
1
+ import { Calendar } from "../../calendar/calendar.types";
2
+ import { DateInput } from "../date-input.types";
3
+ import { DateInputSelectionStrategyBase } from "./date-input-selection-strategy-base";
4
+ /**
5
+ * Selection strategy for the 'month' selection mode.
6
+ */
7
+ export declare class MonthSelectionStrategy extends DateInputSelectionStrategyBase {
8
+ readonly selectionViewMode: Calendar.ViewMode;
9
+ readonly validViewModes: Calendar.ViewMode[];
10
+ readonly showSecondaryTextbox = false;
11
+ readonly showSecondaryCalendar = false;
12
+ formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'];
13
+ parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;
14
+ getSelectionFromDate(date: Date): DateInput.Selection | null;
15
+ getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null;
16
+ getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
17
+ getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
18
+ }
@@ -0,0 +1,18 @@
1
+ import { Calendar } from "../../calendar/calendar.types";
2
+ import { DateInput } from "../date-input.types";
3
+ import { DateInputSelectionStrategyBase } from "./date-input-selection-strategy-base";
4
+ /**
5
+ * Selection strategy for the 'month' selection mode.
6
+ */
7
+ export declare class QuarterSelectionStrategy extends DateInputSelectionStrategyBase {
8
+ readonly selectionViewMode: Calendar.ViewMode;
9
+ readonly validViewModes: Calendar.ViewMode[];
10
+ readonly showSecondaryTextbox = false;
11
+ readonly showSecondaryCalendar = false;
12
+ formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'];
13
+ parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;
14
+ getSelectionFromDate(date: Date): DateInput.Selection | null;
15
+ getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null;
16
+ getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
17
+ getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
18
+ }
@@ -0,0 +1,21 @@
1
+ import { Calendar } from "../../calendar/calendar.types";
2
+ import { DateInput } from "../date-input.types";
3
+ import { DateInputSelectionStrategyBase } from "./date-input-selection-strategy-base";
4
+ /**
5
+ * Selection strategy for the 'range' selection mode.
6
+ */
7
+ export declare class RangeSelectionStrategy extends DateInputSelectionStrategyBase {
8
+ readonly selectionViewMode: Calendar.ViewMode;
9
+ readonly validViewModes: Calendar.ViewMode[];
10
+ readonly showSecondaryTextbox = true;
11
+ readonly showSecondaryCalendar = true;
12
+ formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'];
13
+ parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;
14
+ getSelectionFromDate(date: Date, existingSelection: DateInput.Selection | null): DateInput.Selection | null;
15
+ getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null;
16
+ getSelectionForQuickSelectDate(date: Date, existingSelection?: DateInput.Selection | null): DateInput.Selection | null;
17
+ getNextSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
18
+ getPreviousSelection(selection: DateInput.Selection | null): DateInput.Selection | null;
19
+ getPrimaryCalendarView(selection: DateInput.Selection | null, minDate: Date, maxDate: Date, currentView: Calendar.View): Calendar.View;
20
+ getSecondaryCalendarView(selection: DateInput.Selection | null, minDate: Date, maxDate: Date, currentView: Calendar.View): Calendar.View;
21
+ }
@@ -0,0 +1,20 @@
1
+ import { Calendar } from "../../calendar/calendar.types";
2
+ import { DateInput } from "../date-input.types";
3
+ import { DateInputSelectionStrategyBase } from "./date-input-selection-strategy-base";
4
+ /**
5
+ * Selection strategy for the 'year' selection mode.
6
+ */
7
+ export declare class YearSelectionStrategy extends DateInputSelectionStrategyBase {
8
+ readonly selectionViewMode: Calendar.ViewMode;
9
+ readonly validViewModes: Calendar.ViewMode[];
10
+ readonly showSecondaryTextbox = false;
11
+ readonly showSecondaryCalendar = false;
12
+ formatSelection(selection?: DateInput.Selection | null): DateInput.TextboxGroup['value'];
13
+ parseString(value: string | null | undefined, parseFormats: string[], opts?: DateInput.ParsingOptions): Date | null;
14
+ parseTextboxValues(value: DateInput.TextboxGroup['value'], parseFormats: string[], opts?: DateInput.ParsingOptions): DateInput.Selection | null;
15
+ getSelectionFromDate(date: Date): DateInput.Selection | null;
16
+ getNewSelectionFromExisting(previousSelection?: DateInput.Selection): DateInput.Selection | null;
17
+ getSelectionForQuickSelectDate(date: Date): DateInput.Selection | null;
18
+ getNextSelection(selection: DateInput.Selection): DateInput.Selection | null;
19
+ getPreviousSelection(selection: DateInput.Selection): DateInput.Selection | null;
20
+ }
@@ -1,64 +1,93 @@
1
1
  import { CdkConnectedOverlay, Overlay } from '@angular/cdk/overlay';
2
- import { ElementRef, OnInit } from '@angular/core';
3
- import { FormControl } from '@angular/forms';
2
+ import { ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
3
+ import { KeyboardNavContainerDirective } from '../../../public-api';
4
4
  import { ValidationMessageService } from '../../core/validation-message.service';
5
- import { DateDisplayPipe } from '../../shared/display/pipes/date-display.pipe';
6
5
  import { FormGroupHelper } from '../../shared/form-group.helper';
7
6
  import { UserPreferenceService } from '../../shared/user-preference.service';
8
- import { CalendarSelection } from '../calendar/calendar.types';
7
+ import { Calendar } from '../calendar/calendar.types';
9
8
  import { FormControlBase } from '../form-control-base';
9
+ import { DateInputSelectionStrategyBase } from './date-input-selection-strategies/date-input-selection-strategy-base';
10
+ import { DateInput } from './date-input.types';
10
11
  import * as i0 from "@angular/core";
11
- export type DateInputFormControl = FormControl<Date | null>;
12
- export declare class DateInputComponent extends FormControlBase implements OnInit {
12
+ export declare class DateInputComponent extends FormControlBase implements OnInit, OnChanges {
13
13
  protected validationMessageService: ValidationMessageService;
14
14
  protected formGroupHelper: FormGroupHelper;
15
15
  private userPreferenceService;
16
- private dateDisplayPipe;
17
16
  private el;
18
17
  private overlayService;
18
+ private selectionStrategies;
19
19
  id: string;
20
20
  /** The form control provided by the hosting form. */
21
- formModel: DateInputFormControl;
21
+ formModel: DateInput.FormModel;
22
22
  minDate: Date;
23
23
  maxDate: Date;
24
- /** The internal textbox's form control. */
25
- textboxControl: FormControl<string | null>;
24
+ /** The initial selection mode for the calendar. Defaults to day if not provided */
25
+ selectionMode: DateInput.SelectionMode;
26
+ /** The available selection modes for the calendar. Defaults to only the initial selection mode if not provided. */
27
+ selectionModeOptions: DateInput.SelectionMode[];
28
+ /**
29
+ * When a date is provided, enables the 'quick select' button.
30
+ * Clicking the button will shift the selected date range to the provided date.
31
+ */
32
+ quickSelectDate?: Date;
33
+ /** Enables the next/previous selection buttons. */
34
+ enableSteppers: boolean;
35
+ /** The form group for the internal textboxes. Textbox2 is only used for ranges. */
36
+ textboxGroup: DateInput.TextboxGroup;
26
37
  /**
27
38
  * The current calendar selection.
28
39
  * Updated when the user clicks on a calendar item or when the date entered into the textbox is parsed.
29
40
  */
30
- calendarSelection: CalendarSelection | null;
41
+ calendarSelection: DateInput.Selection | null;
31
42
  /** Controls whether the calendar overlay is open or not. */
32
43
  isCalendarOpen: boolean;
33
44
  /** Placeholder for the textbox. Updated to reflect the user's date display preference. */
34
45
  placeholder: string;
35
46
  /** Overlay scroll strategy for the calendar overlay. Closes the calendar on scroll. */
36
47
  overlayScrollStrategy: import("@angular/cdk/overlay").CloseScrollStrategy;
48
+ primaryCalendarView: Calendar.View;
49
+ secondaryCalendarView: Calendar.View;
50
+ primaryCalendarMaxDate: Date;
51
+ secondaryCalendarMinDate: Date;
52
+ disableSteppers: boolean;
53
+ selectionStrategy: DateInputSelectionStrategyBase;
37
54
  /**
38
55
  * Date parsing formats for user-entered dates. Defaults to month-first formats, but is updated in onInit
39
56
  * to use the user's preferred date format.
40
57
  */
41
58
  private parseFormats;
42
- /** Reference to the overlay directive (see template). Used to access the overlay's host element to control focus. */
59
+ calendar?: KeyboardNavContainerDirective;
60
+ controls?: KeyboardNavContainerDirective;
61
+ /** Reference to the overlay directive (see template). Used to update the overlay position on validation changes. */
43
62
  overlay?: CdkConnectedOverlay;
44
- constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper, userPreferenceService: UserPreferenceService, dateDisplayPipe: DateDisplayPipe, el: ElementRef, overlayService: Overlay);
63
+ constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper, userPreferenceService: UserPreferenceService, el: ElementRef, overlayService: Overlay, selectionStrategies: DateInput.SelectionStrategies);
64
+ ngOnChanges(changes: SimpleChanges): void;
65
+ ngOnInit(): void;
45
66
  /** Focuses the input whenever the calendar is shift-tabbed out of. */
46
- onCalendarFocusOutStart(event: KeyboardEvent): void;
67
+ onCalendarFocusOutStart(): void;
47
68
  /** Closes the calendar and focuses the input whenever the calendar is tabbed out of. */
48
- onCalendarFocusOutEnd(event: KeyboardEvent): void;
49
- /** Close the calendar if the user clicks outside of the calendar and date input. */
69
+ onCalendarFocusOutEnd(): void;
70
+ /** Closes the calendar if the user clicks outside of the calendar and date input. */
50
71
  onOverlayOutsideClick(event: MouseEvent): void;
51
72
  /** 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 */
52
- onActionKeydown(event: KeyboardEvent): void;
53
- onTextboxKeydown(event: KeyboardEvent): void;
54
- /** Whenever the user selects a date from the calendar, update the formModel with the selection */
55
- onSelectionChange(selection: CalendarSelection | null): void;
73
+ onControlsFocusOutEnd(): void;
56
74
  onTextboxBlur(): void;
57
- ngOnInit(): void;
75
+ onTextbox2Blur(): void;
76
+ onSelectionModeChange(mode: DateInput.SelectionMode): void;
77
+ onCalendarDateSelected(date: Date): void;
78
+ onPrimaryCalendarViewChange(view: Calendar.View): void;
79
+ onSecondaryCalendarViewChange(view: Calendar.View): void;
80
+ /** Shifts the calendar views to display today. Does not update the calendar selection. */
81
+ goToToday(): void;
82
+ goToQuickSelectDate(): void;
83
+ nextSelection(): void;
84
+ previousSelection(): void;
85
+ private updateFormModel;
58
86
  private onFormModelStatusChanges;
59
87
  private onFormModelValueChanges;
60
88
  private onTextboxValueChanges;
61
89
  private syncTextboxControlDisabledStatus;
90
+ private syncFormErrors;
62
91
  /**
63
92
  * Updates the date parsing formats and placeholder based on the user's display preference.
64
93
  * NOTE: This is async because we're retrieving the user's preferences. We're not awaiting the result
@@ -67,14 +96,20 @@ export declare class DateInputComponent extends FormControlBase implements OnIni
67
96
  * form until the user is loaded anyway.
68
97
  */
69
98
  private setDateFormats;
70
- /**
71
- * Validator that checks if the date is within the min and max date range.
72
- * If the date is outside of the range, the validator returns an error that
73
- * triggers the validation message service to show the error in the label.
74
- */
75
- private dateValidator;
76
99
  /** Focuses the date input. */
77
100
  private focusInput;
101
+ private setSelectionMode;
102
+ /**
103
+ * Sets the max date for the primary calendar and the min date for the secondary calendar based
104
+ * on the current views in each. This prevents the user from moving the calendars out of order.
105
+ */
106
+ private updateCalendarMinMaxDates;
107
+ private updateCalendars;
108
+ private updatePrimaryCalendar;
109
+ private updateSecondaryCalendar;
110
+ private updateSteppers;
111
+ private validateTextboxes;
112
+ private validateDateString;
78
113
  static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, never>;
79
- static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "ec-date-input", never, { "id": { "alias": "id"; "required": false; }; "formModel": { "alias": "formModel"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, {}, never, never, false, never>;
114
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "ec-date-input", never, { "id": { "alias": "id"; "required": false; }; "formModel": { "alias": "formModel"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectionModeOptions": { "alias": "selectionModeOptions"; "required": false; }; "quickSelectDate": { "alias": "quickSelectDate"; "required": false; }; "enableSteppers": { "alias": "enableSteppers"; "required": false; }; }, {}, never, never, false, never>;
80
115
  }
@@ -0,0 +1,62 @@
1
+ import { FormControl, FormGroup } from "@angular/forms";
2
+ import { DateDisplayPipe } from "../../shared/display/pipes/date-display.pipe";
3
+ import { DateInputSelectionStrategyBase } from "./date-input-selection-strategies/date-input-selection-strategy-base";
4
+ import { DaySelectionStrategy } from "./date-input-selection-strategies/day-selection-strategy";
5
+ import { Last28DaysSelectionStrategy } from "./date-input-selection-strategies/last-28-days-selection-strategy";
6
+ import { Last7DaysSelectionStrategy } from "./date-input-selection-strategies/last-7-days-selection-strategy";
7
+ import { MonthSelectionStrategy } from "./date-input-selection-strategies/month-selection-strategy";
8
+ import { QuarterSelectionStrategy } from "./date-input-selection-strategies/quarter-selection-strategy";
9
+ import { RangeSelectionStrategy } from "./date-input-selection-strategies/range-selection-strategy";
10
+ import { YearSelectionStrategy } from "./date-input-selection-strategies/year-selection-strategy";
11
+ import * as i0 from "@angular/core";
12
+ export declare namespace DateInput {
13
+ type FormModel = FormControl<Selection | null>;
14
+ type TextboxGroup = FormGroup<{
15
+ textbox: FormControl<string | null>;
16
+ textbox2: FormControl<string | null>;
17
+ }>;
18
+ type Range = {
19
+ start: Date | null;
20
+ end: Date | null;
21
+ };
22
+ type Selection = Date | Range;
23
+ type SelectionMode = 'day' | 'last7Days' | 'last28Days' | 'month' | 'quarter' | 'year' | 'range';
24
+ function isSelectionSingleDate(selection?: Selection | null): selection is Date;
25
+ function isSelectionRange(selection?: Selection | null): selection is Range;
26
+ type ParsingOptions = {
27
+ /**
28
+ * When configured, the parser will shift the parsed date to the current year if the date is below this date.
29
+ * This is used to prevent the calendars from showing unhelpful dates in the distant past before the user finishes typing in the date.
30
+ */
31
+ shiftToCurrentYearIfBelow?: Date;
32
+ /**
33
+ * When true, the range selection modes (range, last7Days, last28Days) will key off of the end date string to determine the selection range.
34
+ */
35
+ parseFromEnd?: boolean;
36
+ /**
37
+ * Stops the parser from automatically completing the date range when there is only a start or an end date.
38
+ * Only applicable to the fixed length range selection modes (last7Days, last28Days).
39
+ */
40
+ preventAutoComplete?: boolean;
41
+ };
42
+ class SelectionStrategies implements Record<SelectionMode, DateInputSelectionStrategyBase> {
43
+ private dateDisplayPipe;
44
+ constructor(dateDisplayPipe: DateDisplayPipe);
45
+ private _range;
46
+ get range(): RangeSelectionStrategy;
47
+ private _day;
48
+ get day(): DaySelectionStrategy;
49
+ private _last7Days;
50
+ get last7Days(): Last7DaysSelectionStrategy;
51
+ private _last28Days;
52
+ get last28Days(): Last28DaysSelectionStrategy;
53
+ private _month;
54
+ get month(): MonthSelectionStrategy;
55
+ private _quarter;
56
+ get quarter(): QuarterSelectionStrategy;
57
+ _year: YearSelectionStrategy;
58
+ get year(): YearSelectionStrategy;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectionStrategies, never>;
60
+ static ɵprov: i0.ɵɵInjectableDeclaration<SelectionStrategies>;
61
+ }
62
+ }
@@ -1,7 +1,7 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
2
2
  import { AbstractControl } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
- export declare class FormControlComponent implements OnChanges, AfterViewInit {
4
+ export declare class FormControlComponent implements AfterViewInit {
5
5
  private el;
6
6
  formControlDirective?: AbstractControl;
7
7
  id: string;
@@ -17,14 +17,12 @@ export declare class FormControlComponent implements OnChanges, AfterViewInit {
17
17
  get invalid(): boolean;
18
18
  get disabled(): boolean;
19
19
  actionClicked: EventEmitter<Event>;
20
- actionKeydown: EventEmitter<KeyboardEvent>;
21
- private _formModel?;
20
+ private get _formModel();
22
21
  constructor(el: ElementRef);
23
- ngOnChanges(changes: SimpleChanges): void;
24
22
  ngAfterViewInit(): void;
25
23
  onClick(): void;
26
24
  focus(): void;
27
25
  clear(): void;
28
26
  static ɵfac: i0.ɵɵFactoryDeclaration<FormControlComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<FormControlComponent, "ec-form-control", never, { "id": { "alias": "id"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "actionIcon": { "alias": "actionIcon"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "formModelInput": { "alias": "formModel"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "pending": { "alias": "pending"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "actionClicked": "actionClicked"; "actionKeydown": "actionKeydown"; }, ["formControlDirective"], ["*"], false, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormControlComponent, "ec-form-control", never, { "id": { "alias": "id"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "actionIcon": { "alias": "actionIcon"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "formModelInput": { "alias": "formModel"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "pending": { "alias": "pending"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "actionClicked": "actionClicked"; }, ["formControlDirective"], ["*"], false, never>;
30
28
  }