@energycap/components 0.40.1-ECAP-26841-date-input-features.20241125-1709 → 0.40.2-rxjs-7-upgrade.20241216-1200

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 (61) hide show
  1. package/esm2020/lib/components.module.mjs +5 -15
  2. package/esm2020/lib/controls/calendar/calendar-item.component.mjs +3 -3
  3. package/esm2020/lib/controls/calendar/calendar.component.mjs +27 -126
  4. package/esm2020/lib/controls/calendar/calendar.types.mjs +1 -4
  5. package/esm2020/lib/controls/checkbox/checkbox.component.mjs +3 -3
  6. package/esm2020/lib/controls/combobox/combobox.component.mjs +1 -1
  7. package/esm2020/lib/controls/date-input/date-input.component.mjs +5 -7
  8. package/esm2020/lib/controls/dropdown/dropdown.component.mjs +1 -1
  9. package/esm2020/lib/controls/file-upload/file-upload.component.mjs +3 -2
  10. package/esm2020/lib/controls/form-control/form-control.component.mjs +2 -2
  11. package/esm2020/lib/controls/form-control-base.mjs +2 -2
  12. package/esm2020/lib/controls/form-control-label/form-control-label.component.mjs +1 -1
  13. package/esm2020/lib/controls/form-group/form-group.component.mjs +3 -3
  14. package/esm2020/lib/controls/popover/popover.component.mjs +1 -1
  15. package/esm2020/lib/controls/select/select.component.mjs +2 -2
  16. package/esm2020/lib/controls/tabs/tabs.component.mjs +3 -3
  17. package/esm2020/lib/core/validation-message.service.mjs +3 -3
  18. package/esm2020/lib/display/dialog/dialog.component.mjs +4 -4
  19. package/esm2020/lib/display/hierarchy/hierarchy-base.mjs +1 -1
  20. package/esm2020/lib/display/table/searchable-table.component.mjs +1 -1
  21. package/esm2020/lib/display/toast/toaster/toaster.component.mjs +1 -1
  22. package/esm2020/lib/display/tooltip-directive/tooltip.directive.mjs +2 -2
  23. package/esm2020/lib/display/tour/tour.component.mjs +3 -3
  24. package/esm2020/lib/shared/page/page-base/page-base.component.mjs +3 -3
  25. package/esm2020/public-api.mjs +1 -3
  26. package/fesm2015/energycap-components.mjs +111 -332
  27. package/fesm2015/energycap-components.mjs.map +1 -1
  28. package/fesm2020/energycap-components.mjs +111 -329
  29. package/fesm2020/energycap-components.mjs.map +1 -1
  30. package/lib/components.module.d.ts +8 -10
  31. package/lib/controls/calendar/calendar-item.component.d.ts +1 -1
  32. package/lib/controls/calendar/calendar.component.d.ts +5 -17
  33. package/lib/controls/calendar/calendar.types.d.ts +2 -8
  34. package/lib/controls/checkbox/checkbox.component.d.ts +2 -2
  35. package/lib/controls/date-input/date-input.component.d.ts +2 -3
  36. package/lib/controls/form-control-base.d.ts +1 -1
  37. package/lib/controls/form-group/form-group.component.d.ts +1 -1
  38. package/lib/display/hierarchy/hierarchy-base.d.ts +1 -1
  39. package/lib/display/table/searchable-table.component.d.ts +1 -1
  40. package/lib/shared/page/page-base/page-base.component.d.ts +1 -1
  41. package/package.json +3 -2
  42. package/public-api.d.ts +0 -2
  43. package/schematics/collection.json +10 -0
  44. package/schematics/rxjs-7-upgrade/index.d.ts +3 -0
  45. package/schematics/rxjs-7-upgrade/index.js +68 -0
  46. package/schematics/rxjs-7-upgrade/index.js.map +1 -0
  47. package/schematics/rxjs-7-upgrade/schema.d.ts +4 -0
  48. package/schematics/rxjs-7-upgrade/schema.js +3 -0
  49. package/schematics/rxjs-7-upgrade/schema.js.map +1 -0
  50. package/schematics/rxjs-7-upgrade/schema.json +14 -0
  51. package/schematics/utilities/typescript.d.ts +7 -0
  52. package/schematics/utilities/typescript.js +42 -0
  53. package/schematics/utilities/typescript.js.map +1 -0
  54. package/schematics/utilities/workspace.d.ts +8 -0
  55. package/schematics/utilities/workspace.js +72 -0
  56. package/schematics/utilities/workspace.js.map +1 -0
  57. package/src/assets/locales/en_US.json +1 -8
  58. package/esm2020/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.mjs +0 -57
  59. package/esm2020/lib/shared/directives/keyboard-nav-target/keyboard-nav-target.directive.mjs +0 -58
  60. package/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.d.ts +0 -16
  61. package/lib/shared/directives/keyboard-nav-target/keyboard-nav-target.directive.d.ts +0 -14
@@ -68,15 +68,13 @@ 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 "./shared/directives/keyboard-nav-target/keyboard-nav-target.directive";
72
- import * as i70 from "./shared/directives/keyboard-nav-container/keyboard-nav-container.directive";
73
- import * as i71 from "@angular/common";
74
- import * as i72 from "@angular/forms";
75
- import * as i73 from "@angular/router";
76
- import * as i74 from "@ngx-translate/core";
77
- import * as i75 from "@angular/cdk/a11y";
78
- import * as i76 from "@angular/cdk/overlay";
79
- import * as i77 from "@angular/cdk/scrolling";
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";
80
78
  export type ComponentsModuleConfig = {
81
79
  tracker: Provider;
82
80
  };
@@ -88,6 +86,6 @@ export declare class ComponentsModule {
88
86
  */
89
87
  static forRoot(config: ComponentsModuleConfig): ModuleWithProviders<ComponentsModule>;
90
88
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
91
- 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.KeyboardNavTargetDirective, typeof i70.KeyboardNavContainerDirective], [typeof i71.CommonModule, typeof i72.FormsModule, typeof i72.ReactiveFormsModule, typeof i73.RouterModule, typeof i74.TranslateModule, typeof i75.A11yModule, typeof i76.OverlayModule, typeof i77.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.KeyboardNavTargetDirective, typeof i70.KeyboardNavContainerDirective]>;
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]>;
92
90
  static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
93
91
  }
@@ -13,5 +13,5 @@ export declare class CalendarItemComponent implements OnChanges {
13
13
  ngOnChanges(): void;
14
14
  private isSelected;
15
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, ["*"], false, 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
17
  }
@@ -1,16 +1,10 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import { TranslateService } from '@ngx-translate/core';
3
- import { MenuItem } from '../menu/menu.component';
4
- import { CalendarItem, CalendarSelection, CalendarSelectionMode, CalendarView } from './calendar.types';
2
+ import { CalendarItem, CalendarSelection, CalendarView } from './calendar.types';
5
3
  import * as i0 from "@angular/core";
6
4
  export declare class CalendarComponent implements OnChanges, OnInit {
7
- private translateService;
8
5
  id: string;
9
6
  selection: CalendarSelection | null;
10
7
  selectionChange: EventEmitter<CalendarSelection | null>;
11
- selectionModeOptions: CalendarSelectionMode[];
12
- selectionMode: CalendarSelectionMode;
13
- selectionModeChange: EventEmitter<CalendarSelectionMode>;
14
8
  minDate: Date;
15
9
  maxDate: Date;
16
10
  focusOutStart: EventEmitter<KeyboardEvent>;
@@ -36,8 +30,7 @@ export declare class CalendarComponent implements OnChanges, OnInit {
36
30
  calendarItemTrackByDate: (index: number, item: CalendarItem) => string;
37
31
  disablePreviousButton: boolean;
38
32
  disableNextButton: boolean;
39
- selectionModeItems: MenuItem<CalendarSelectionMode>[];
40
- constructor(translateService: TranslateService);
33
+ constructor();
41
34
  ngOnChanges(changes: SimpleChanges): void;
42
35
  ngOnInit(): void;
43
36
  onItemSelected(item: CalendarItem): void;
@@ -47,20 +40,15 @@ export declare class CalendarComponent implements OnChanges, OnInit {
47
40
  onMonthClick(): void;
48
41
  /** Switches the calendar to year view. */
49
42
  onYearClick(): void;
50
- private updateSelectionModes;
51
- private onDaySelected;
52
- private onMonthSelected;
53
- private onQuarterSelected;
54
- private onYearSelected;
55
- private updateSelection;
43
+ onFirstItemKeydown(event: KeyboardEvent): void;
44
+ onLastItemKeydown(event: KeyboardEvent): void;
56
45
  private drawCalendar;
57
46
  private getCalendarItems;
58
47
  private getDayViewItems;
59
48
  private getMonthViewItems;
60
- private getQuarterViewItems;
61
49
  private getYearViewItems;
62
50
  /** Returns true if the date is within the current calendar view */
63
51
  private isDateInView;
64
52
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
65
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "ec-calendar", never, { "id": "id"; "selection": "selection"; "selectionModeOptions": "selectionModeOptions"; "selectionMode": "selectionMode"; "minDate": "minDate"; "maxDate": "maxDate"; }, { "selectionChange": "selectionChange"; "selectionModeChange": "selectionModeChange"; "focusOutStart": "focusOutStart"; "focusOutEnd": "focusOutEnd"; }, never, never, false, 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>;
66
54
  }
@@ -2,12 +2,6 @@ export type CalendarItem = {
2
2
  label: string;
3
3
  date: Date;
4
4
  };
5
- export type CalendarRange = {
6
- start: Date;
7
- end: Date;
8
- };
9
- export type CalendarSelection = Date | CalendarRange;
10
- export type CalendarSelectionMode = 'day' | 'last7days' | 'last28days' | 'month' | 'quarter' | 'year' | 'range';
11
- export type CalendarView = 'day' | 'month' | 'quarter' | 'year';
5
+ export type CalendarSelection = Date | [Date, Date];
6
+ export type CalendarView = 'day' | 'month' | 'year';
12
7
  export declare function isCalendarSelectionSingleDate(selection?: CalendarSelection | null): selection is Date;
13
- export declare function isCalendarSelectionRange(selection?: CalendarSelection | null): selection is CalendarRange;
@@ -1,9 +1,9 @@
1
1
  import { AfterViewInit, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { AbstractControl } from '@angular/forms';
2
3
  import { ValidationMessageService } from '../../core/validation-message.service';
4
+ import { ClickableElement } from '../../shared/directives/click-area-for/click-area-for.directive';
3
5
  import { FormGroupHelper } from '../../shared/form-group.helper';
4
6
  import { FormControlBase } from "../form-control-base";
5
- import { AbstractControl } from '@angular/forms';
6
- import { ClickableElement } from '../../shared/directives/click-area-for/click-area-for.directive';
7
7
  import * as i0 from "@angular/core";
8
8
  export type CheckboxState = 'unchecked' | 'indeterminate' | 'checked';
9
9
  export declare class CheckboxComponent extends FormControlBase implements AfterViewInit, ClickableElement, OnChanges {
@@ -5,7 +5,7 @@ import { ValidationMessageService } from '../../core/validation-message.service'
5
5
  import { DateDisplayPipe } from '../../shared/display/pipes/date-display.pipe';
6
6
  import { FormGroupHelper } from '../../shared/form-group.helper';
7
7
  import { UserPreferenceService } from '../../shared/user-preference.service';
8
- import { CalendarSelection, CalendarSelectionMode } from '../calendar/calendar.types';
8
+ import { CalendarSelection } from '../calendar/calendar.types';
9
9
  import { FormControlBase } from '../form-control-base';
10
10
  import * as i0 from "@angular/core";
11
11
  export type DateInputFormControl = FormControl<Date | null>;
@@ -21,7 +21,6 @@ export declare class DateInputComponent extends FormControlBase implements OnIni
21
21
  formModel: DateInputFormControl;
22
22
  minDate: Date;
23
23
  maxDate: Date;
24
- selectionModeOptions: CalendarSelectionMode[];
25
24
  /** The internal textbox's form control. */
26
25
  textboxControl: FormControl<string | null>;
27
26
  /**
@@ -77,5 +76,5 @@ export declare class DateInputComponent extends FormControlBase implements OnIni
77
76
  /** Focuses the date input. */
78
77
  private focusInput;
79
78
  static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, never>;
80
- static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "ec-date-input", never, { "id": "id"; "formModel": "formModel"; "minDate": "minDate"; "maxDate": "maxDate"; "selectionModeOptions": "selectionModeOptions"; }, {}, never, never, false, never>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "ec-date-input", never, { "id": "id"; "formModel": "formModel"; "minDate": "minDate"; "maxDate": "maxDate"; }, {}, never, never, false, never>;
81
80
  }
@@ -82,7 +82,7 @@ export declare abstract class FormControlBase implements OnInit, OnDestroy, OnCh
82
82
  * [and this]{@link https://netbasal.com/when-to-unsubscribe-in-angular-d61c6b21bad3}
83
83
  * [and this]{@link http://brianflove.com/2016/12/11/anguar-2-unsubscribe-observables/}
84
84
  */
85
- protected componentDestroyed: Subject<any>;
85
+ protected componentDestroyed: Subject<void>;
86
86
  /**
87
87
  * Creates an instance of FormControlBase.
88
88
  */
@@ -1,5 +1,5 @@
1
1
  import { OnInit } from "@angular/core";
2
- import { UntypedFormGroup, UntypedFormArray, AbstractControl } from "@angular/forms";
2
+ import { AbstractControl, UntypedFormArray, UntypedFormGroup } from "@angular/forms";
3
3
  import { TranslateService } from "@ngx-translate/core";
4
4
  import { ValidationMessageService } from "../../core/validation-message.service";
5
5
  import { ControlLabelPosition } from "../form-control-base";
@@ -75,7 +75,7 @@ export declare abstract class HierarchyBase implements OnChanges, OnDestroy {
75
75
  * Used to unsubscribe from observables
76
76
  */
77
77
  private _destroyed;
78
- get destroyed(): Subject<any>;
78
+ get destroyed(): Subject<void>;
79
79
  protected telemetryService: TelemetryService;
80
80
  constructor(injector: Injector);
81
81
  ngOnChanges(changes: SimpleChanges): void;
@@ -80,7 +80,7 @@ export declare class SearchableTableComponent implements OnInit, OnDestroy, OnCh
80
80
  */
81
81
  getItems: (search?: string, pageChangeInfo?: PagingInfo) => Observable<TableSearchResults>;
82
82
  /** Observable that will force the getItems function to get called again */
83
- refresh?: Observable<SearchableTableRefreshOptions | undefined>;
83
+ refresh?: Observable<SearchableTableRefreshOptions | void>;
84
84
  /** Allow the host component to supply an overlay to control the pending state of the table */
85
85
  status: Overlay;
86
86
  /**
@@ -77,7 +77,7 @@ export declare abstract class PageBaseComponent implements OnInit, AfterViewInit
77
77
  /**
78
78
  * Used to unsubscribe from observables
79
79
  */
80
- destroyed: Subject<any>;
80
+ destroyed: Subject<void>;
81
81
  /**
82
82
  * Used to know when the page has been loaded, this will be completed
83
83
  * after onAfterViewInit
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.40.1-ECAP-26841-date-input-features.20241125-1709",
3
+ "version": "0.40.2-rxjs-7-upgrade.20241216-1200",
4
+ "schematics": "./schematics/collection.json",
4
5
  "dependencies": {
5
6
  "tslib": "^2.0.0"
6
7
  },
@@ -11,7 +12,7 @@
11
12
  "@angular/router": ">=15.2.0",
12
13
  "@angular/cdk": ">=15.2.0",
13
14
  "@ngx-translate/core": "^14.0.0",
14
- "popper.js": "~1.11.1",
15
+ "popper.js": "^1.14.7",
15
16
  "lodash": "^4.17.21",
16
17
  "moment": "^2.29.0",
17
18
  "ngx-clipboard": "^12.0.0"
package/public-api.d.ts CHANGED
@@ -109,5 +109,3 @@ export * from './lib/shared/testing/copy-button-base-test-injector-factory.spec'
109
109
  export * from './lib/controls/calendar/calendar.component';
110
110
  export * from './lib/controls/calendar/calendar.types';
111
111
  export * from './lib/controls/date-input/date-input.component';
112
- export * from './lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive';
113
- export * from './lib/shared/directives/keyboard-nav-target/keyboard-nav-target.directive';
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "rxjs-7-upgrade": {
5
+ "description": "Upgrade your project to RxJS 7",
6
+ "factory": "./rxjs-7-upgrade/index#rxjs7Upgrade",
7
+ "schema": "./rxjs-7-upgrade/schema.json"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,3 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import { RxJSUpgradeSchema } from './schema';
3
+ export declare function rxjs7Upgrade(options: RxJSUpgradeSchema): Rule;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.rxjs7Upgrade = void 0;
13
+ const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
14
+ const change_1 = require("@schematics/angular/utility/change");
15
+ const path_1 = require("path");
16
+ const ts = require("typescript");
17
+ const typescript_1 = require("../utilities/typescript");
18
+ const workspace_1 = require("../utilities/workspace");
19
+ function rxjs7Upgrade(options) {
20
+ return (tree) => __awaiter(this, void 0, void 0, function* () {
21
+ const path = options.path || '/';
22
+ const workspace = yield (0, workspace_1.getWorkspace)(path, tree);
23
+ // Get all tsconfig paths from the workspace, including test tsconfigs
24
+ const tsConfigPaths = (0, workspace_1.getTsConfigPaths)(workspace, tree);
25
+ // The base path in the file system for the path argument, replacing all backslashes with forward slashes (for cross-system compatibility).
26
+ // The absolute file system path is needed for the typescript compiler to resolve files correctly.
27
+ const basePath = process.cwd().replace(/\\/g, path);
28
+ tsConfigPaths.forEach(tsConfigPath => {
29
+ const program = (0, typescript_1.createTsProgram)(tree, tsConfigPath, basePath);
30
+ const checker = program.getTypeChecker();
31
+ for (const sourceFile of program.getSourceFiles()) {
32
+ // Skip declaration files and external library files
33
+ if (sourceFile.isDeclarationFile || program.isSourceFileFromExternalLibrary(sourceFile)) {
34
+ continue;
35
+ }
36
+ const observableSymbols = ['Observable', 'Subject', 'BehaviorSubject', 'ReplaySubject', 'AsyncSubject'];
37
+ const toPromiseCalls = (0, ast_utils_1.findNodes)(sourceFile, ts.isCallExpression, undefined, true).filter(node => {
38
+ if (ts.isPropertyAccessExpression(node.expression) && node.expression.name.text === 'toPromise') {
39
+ const symbol = checker.getTypeAtLocation(node.expression.expression).symbol;
40
+ return symbol && observableSymbols.includes(symbol.name);
41
+ }
42
+ return false;
43
+ });
44
+ if (toPromiseCalls.length) {
45
+ const fileToEdit = (0, path_1.relative)(basePath, sourceFile.fileName);
46
+ const recorder = tree.beginUpdate(fileToEdit);
47
+ const changes = [];
48
+ const printer = ts.createPrinter();
49
+ // Add import for lastValueFrom
50
+ changes.push((0, ast_utils_1.insertImport)(sourceFile, fileToEdit, 'lastValueFrom', 'rxjs'));
51
+ // Replace toPromise calls with lastValueFrom
52
+ toPromiseCalls.forEach(node => {
53
+ if (ts.isPropertyAccessExpression(node.expression)) {
54
+ const newCallExpression = ts.factory.createCallExpression(ts.factory.createIdentifier('lastValueFrom'), undefined, [node.expression.expression]);
55
+ const newNodeText = printer.printNode(ts.EmitHint.Unspecified, newCallExpression, sourceFile);
56
+ const change = new change_1.ReplaceChange(fileToEdit, node.getStart(), node.getText(), newNodeText);
57
+ changes.push(change);
58
+ }
59
+ });
60
+ (0, change_1.applyToUpdateRecorder)(recorder, changes);
61
+ tree.commitUpdate(recorder);
62
+ }
63
+ }
64
+ });
65
+ });
66
+ }
67
+ exports.rxjs7Upgrade = rxjs7Upgrade;
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1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UAAU,CAAC,CAAC;4BAC9F,MAAM,MAAM,GAAG,IAAI,sBAAa,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;4BAC3F,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;yBACtB;oBACH,CAAC,CAAC,CAAC;oBAEH,IAAA,8BAAqB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;oBACzC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;iBAC7B;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAA,CAAA;AACH,CAAC;AA7DD,oCA6DC"}
@@ -0,0 +1,4 @@
1
+ export interface RxJSUpgradeSchema {
2
+ /** Path to the angular workspace. */
3
+ path?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../projects/components/schematics/rxjs-7-upgrade/schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "EnergyCAP.RxJS7UpgradeSchema",
4
+ "title": "RxJS 7 Upgrade Schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "path": {
8
+ "type": "string",
9
+ "format": "path",
10
+ "description": "The path to complete the upgrade.",
11
+ "visible": false
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ import { Tree } from '@angular-devkit/schematics';
2
+ import * as ts from 'typescript';
3
+ /** Parses the TSConfig file to be used in the TS Compiler Program. */
4
+ export declare function parseTsConfig(absoluteTsConfigPath: string): ts.ParsedCommandLine;
5
+ /** Creates a file host to be used with with a TS Compiler program. */
6
+ export declare function createTsCompilerHost(tree: Tree, options: ts.CompilerOptions, basePath: string): ts.CompilerHost;
7
+ export declare function createTsProgram(tree: Tree, tsConfigPath: string, basePath: string): ts.Program;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTsProgram = exports.createTsCompilerHost = exports.parseTsConfig = void 0;
4
+ const path_1 = require("path");
5
+ const ts = require("typescript");
6
+ /** Parses the TSConfig file to be used in the TS Compiler Program. */
7
+ function parseTsConfig(absoluteTsConfigPath) {
8
+ const { config } = ts.readConfigFile(absoluteTsConfigPath, ts.sys.readFile);
9
+ const parseHost = {
10
+ useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
11
+ fileExists: ts.sys.fileExists,
12
+ readFile: ts.sys.readFile,
13
+ readDirectory: ts.sys.readDirectory
14
+ };
15
+ return ts.parseJsonConfigFileContent(config, parseHost, (0, path_1.dirname)(absoluteTsConfigPath), {});
16
+ }
17
+ exports.parseTsConfig = parseTsConfig;
18
+ /** Creates a file host to be used with with a TS Compiler program. */
19
+ function createTsCompilerHost(tree, options, basePath) {
20
+ const host = ts.createCompilerHost(options);
21
+ // Read files from the virtual tree to prevent conflicting changes between project migrations
22
+ host.readFile = (fileName) => {
23
+ var _a;
24
+ // The angular schematic tree reads files using paths relative to the project root
25
+ const filePath = (0, path_1.relative)(basePath, fileName);
26
+ const result = (_a = tree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
27
+ // Remove BOM header to prevent TSC parsing errors
28
+ return result === null || result === void 0 ? void 0 : result.replace(/^\uFEFF/, '');
29
+ };
30
+ return host;
31
+ }
32
+ exports.createTsCompilerHost = createTsCompilerHost;
33
+ function createTsProgram(tree, tsConfigPath, basePath) {
34
+ // Resolve the absolute file system path to the TSConfig file. This is needed for the TS Compiler to resolve files correctly.
35
+ const absoluteTsConfigPath = (0, path_1.resolve)(basePath, tsConfigPath);
36
+ const parsed = parseTsConfig(absoluteTsConfigPath);
37
+ const options = Object.assign(Object.assign({}, parsed.options), { skipLibCheck: true, skipDefaultLibCheck: true });
38
+ const host = createTsCompilerHost(tree, options, basePath);
39
+ return ts.createProgram(parsed.fileNames, options, host);
40
+ }
41
+ exports.createTsProgram = createTsProgram;
42
+ //# sourceMappingURL=typescript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../../projects/components/schematics/utilities/typescript.ts"],"names":[],"mappings":";;;AACA,+BAAkD;AAClD,iCAAiC;AAEjC,sEAAsE;AACtE,SAAgB,aAAa,CAAC,oBAA4B;IACxD,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,oBAAoB,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5E,MAAM,SAAS,GAAG;QAChB,yBAAyB,EAAE,EAAE,CAAC,GAAG,CAAC,yBAAyB;QAC3D,UAAU,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU;QAC7B,QAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ;QACzB,aAAa,EAAE,EAAE,CAAC,GAAG,CAAC,aAAa;KACpC,CAAC;IAEF,OAAO,EAAE,CAAC,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,IAAA,cAAO,EAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7F,CAAC;AAVD,sCAUC;AAED,sEAAsE;AACtE,SAAgB,oBAAoB,CAAC,IAAU,EAAE,OAA2B,EAAE,QAAgB;IAC5F,MAAM,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC5C,6FAA6F;IAC7F,IAAI,CAAC,QAAQ,GAAG,CAAC,QAAgB,EAAE,EAAE;;QACnC,kFAAkF;QAClF,MAAM,QAAQ,GAAG,IAAA,eAAQ,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,MAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,0CAAE,QAAQ,EAAE,CAAC;QAC/C,kDAAkD;QAClD,OAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACxC,CAAC,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,oDAWC;AAGD,SAAgB,eAAe,CAAC,IAAU,EAAE,YAAoB,EAAE,QAAgB;IAChF,6HAA6H;IAC7H,MAAM,oBAAoB,GAAG,IAAA,cAAO,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACnD,MAAM,OAAO,mCAAQ,MAAM,CAAC,OAAO,KAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,GAAE,CAAC;IACrF,MAAM,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC3D,OAAO,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAC3D,CAAC;AAPD,0CAOC"}
@@ -0,0 +1,8 @@
1
+ import { workspaces } from '@angular-devkit/core';
2
+ import { Tree } from '@angular-devkit/schematics';
3
+ /** Creates a file host to be used with Angular-Devkit's workspace utilities */
4
+ export declare function createWorkspaceHost(tree: Tree): workspaces.WorkspaceHost;
5
+ /** Returns the Angular workspace definition for the given path. The path must be a directory containing an angular.json or .angular.json file. */
6
+ export declare function getWorkspace(path: string, tree: Tree): Promise<workspaces.WorkspaceDefinition>;
7
+ /** Returns all tsconfig paths from the angular workspace, including testing tsconfigs. */
8
+ export declare function getTsConfigPaths(workspace: workspaces.WorkspaceDefinition, tree: Tree): string[];
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getTsConfigPaths = exports.getWorkspace = exports.createWorkspaceHost = void 0;
13
+ const core_1 = require("@angular-devkit/core");
14
+ const workspace_1 = require("@schematics/angular/utility/workspace");
15
+ /** Creates a file host to be used with Angular-Devkit's workspace utilities */
16
+ function createWorkspaceHost(tree) {
17
+ return {
18
+ readFile(path) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ const data = tree.read(path);
21
+ if (!data) {
22
+ throw new Error(`File not found: ${path}`);
23
+ }
24
+ return core_1.virtualFs.fileBufferToString(data);
25
+ });
26
+ },
27
+ writeFile(path, data) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return tree.overwrite(path, data);
30
+ });
31
+ },
32
+ isDirectory(path) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return !tree.exists(path) && tree.getDir(path).subfiles.length > 0;
35
+ });
36
+ },
37
+ isFile(path) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return tree.exists(path);
40
+ });
41
+ }
42
+ };
43
+ }
44
+ exports.createWorkspaceHost = createWorkspaceHost;
45
+ /** Returns the Angular workspace definition for the given path. The path must be a directory containing an angular.json or .angular.json file. */
46
+ function getWorkspace(path, tree) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ const host = createWorkspaceHost(tree);
49
+ const { workspace } = yield core_1.workspaces.readWorkspace(path, host);
50
+ return workspace;
51
+ });
52
+ }
53
+ exports.getWorkspace = getWorkspace;
54
+ /** Returns all tsconfig paths from the angular workspace, including testing tsconfigs. */
55
+ function getTsConfigPaths(workspace, tree) {
56
+ const buildPaths = new Set();
57
+ const testPaths = new Set();
58
+ for (const [name, target] of (0, workspace_1.allWorkspaceTargets)(workspace)) {
59
+ if (name !== 'build' && name !== 'test') {
60
+ continue;
61
+ }
62
+ for (const [, options] of (0, workspace_1.allTargetOptions)(target)) {
63
+ if (options.tsConfig && typeof options.tsConfig === 'string' && tree.exists(options.tsConfig)) {
64
+ const normalizedPath = (0, core_1.normalize)(options.tsConfig);
65
+ name === 'build' ? buildPaths.add(normalizedPath) : testPaths.add(normalizedPath);
66
+ }
67
+ }
68
+ }
69
+ return [...buildPaths, ...testPaths];
70
+ }
71
+ exports.getTsConfigPaths = getTsConfigPaths;
72
+ //# sourceMappingURL=workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../projects/components/schematics/utilities/workspace.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwE;AAExE,qEAA8F;AAE9F,+EAA+E;AAC/E,SAAgB,mBAAmB,CAAC,IAAU;IAC5C,OAAO;QACC,QAAQ,CAAC,IAAY;;gBACzB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC7B,IAAI,CAAC,IAAI,EAAE;oBACT,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;iBAC5C;gBACD,OAAO,gBAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAC5C,CAAC;SAAA;QACK,SAAS,CAAC,IAAY,EAAE,IAAY;;gBACxC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;SAAA;QACK,WAAW,CAAC,IAAY;;gBAC5B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;YACrE,CAAC;SAAA;QACK,MAAM,CAAC,IAAY;;gBACvB,OAAO,IAAI,CAAC,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 -47,12 +47,5 @@
47
47
  "is invalid": "is invalid",
48
48
  "AllItemPickerItemsSelected_SC": "All {{count}} {{itemName}} selected",
49
49
  "SelectAllItemPickerItems_TC": "Select all {{count}} {{itemName}}",
50
- "CountSelected_TC": "{{count}} selected",
51
- "CalendarSelectionMode_day": "Day",
52
- "CalendarSelectionMode_last7days": "Last 7 days",
53
- "CalendarSelectionMode_last28days": "Last 28 days",
54
- "CalendarSelectionMode_month": "Month",
55
- "CalendarSelectionMode_quarter": "Quarter",
56
- "CalendarSelectionMode_year": "Year",
57
- "CalendarSelectionMode_range": "Range"
50
+ "CountSelected_TC": "{{count}} selected"
58
51
  }
@@ -1,57 +0,0 @@
1
- import { ContentChildren, Directive, EventEmitter, Output } from '@angular/core';
2
- import { race, Subject } from 'rxjs';
3
- import { startWith, take, takeUntil } from 'rxjs/operators';
4
- import { KeyboardNavTargetDirective } from '../keyboard-nav-target/keyboard-nav-target.directive';
5
- import * as i0 from "@angular/core";
6
- export class KeyboardNavContainerDirective {
7
- constructor() {
8
- this.focusOutStart = new EventEmitter();
9
- this.focusOutEnd = new EventEmitter();
10
- this.destroyed = new Subject();
11
- }
12
- ngAfterContentInit() {
13
- this.keyboardNavTargets?.changes.pipe(takeUntil(this.destroyed), startWith(this.keyboardNavTargets)).subscribe(() => {
14
- const first = this.getFirstTarget();
15
- first?.focusOutPrevious.pipe(takeUntil(race(this.destroyed, this.keyboardNavTargets.changes.pipe(take(1))))).subscribe(event => {
16
- this.focusOutStart.emit(event);
17
- });
18
- const last = this.getLastTarget();
19
- last?.focusOutNext.pipe(takeUntil(race(this.destroyed, this.keyboardNavTargets.changes.pipe(take(1))))).subscribe(event => {
20
- this.focusOutEnd.emit(event);
21
- });
22
- });
23
- }
24
- ngOnDestroy() {
25
- this.destroyed.next();
26
- this.destroyed.complete();
27
- }
28
- getFirstTarget() {
29
- return this.keyboardNavTargets?.find(target => target.isFocusable);
30
- }
31
- getLastTarget() {
32
- if (this.keyboardNavTargets) {
33
- for (let i = this.keyboardNavTargets.length - 1; i >= 0; i--) {
34
- const target = this.keyboardNavTargets?.get(i);
35
- if (target && target.isFocusable) {
36
- return target;
37
- }
38
- }
39
- }
40
- }
41
- }
42
- KeyboardNavContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: KeyboardNavContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
43
- KeyboardNavContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: KeyboardNavContainerDirective, selector: "[ecKeyboardNavContainer]", outputs: { focusOutStart: "focusOutStart", focusOutEnd: "focusOutEnd" }, queries: [{ propertyName: "keyboardNavTargets", predicate: KeyboardNavTargetDirective, descendants: true }], ngImport: i0 });
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: KeyboardNavContainerDirective, decorators: [{
45
- type: Directive,
46
- args: [{
47
- selector: '[ecKeyboardNavContainer]'
48
- }]
49
- }], ctorParameters: function () { return []; }, propDecorators: { keyboardNavTargets: [{
50
- type: ContentChildren,
51
- args: [KeyboardNavTargetDirective, { descendants: true }]
52
- }], focusOutStart: [{
53
- type: Output
54
- }], focusOutEnd: [{
55
- type: Output
56
- }] } });
57
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5Ym9hcmQtbmF2LWNvbnRhaW5lci5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL3NyYy9saWIvc2hhcmVkL2RpcmVjdGl2ZXMva2V5Ym9hcmQtbmF2LWNvbnRhaW5lci9rZXlib2FyZC1uYXYtY29udGFpbmVyLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQW9CLGVBQW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