@gipisistemas/ng-core 1.1.11 → 1.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/assets/styles/colors.scss +228 -211
  2. package/assets/styles/styles.scss +50 -5
  3. package/bundles/gipisistemas-ng-core.umd.js +3467 -122
  4. package/bundles/gipisistemas-ng-core.umd.js.map +1 -1
  5. package/bundles/gipisistemas-ng-core.umd.min.js +9 -9
  6. package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -1
  7. package/core/gipi-components/components/abstract-find.component.d.ts +1 -0
  8. package/core/gipi-components/components/abstract.component.d.ts +1 -0
  9. package/esm2015/core/gipi-components/components/abstract-find.component.js +22 -1
  10. package/esm2015/core/gipi-components/components/abstract.component.js +5 -2
  11. package/esm2015/gipi-components.js +19 -6
  12. package/esm2015/gipisistemas-ng-core.js +3 -1
  13. package/esm2015/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.js +1 -1
  14. package/esm2015/shared/gipi-components/datepicker/datepicker/datepicker.component.js +3 -3
  15. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/calendar-body.js +1 -1
  16. package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-input.js +1 -1
  17. package/esm2015/shared/gipi-components/datetime-picker/datetime-picker/datetime-picker.component.js +158 -0
  18. package/esm2015/shared/gipi-components/datetime-picker/datetime-picker.module.js +82 -0
  19. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar-body.js +116 -0
  20. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar.js +676 -0
  21. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/clock.js +306 -0
  22. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-animations.js +30 -0
  23. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-errors.js +7 -0
  24. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-filtertype.js +7 -0
  25. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-input.js +346 -0
  26. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-toggle.js +83 -0
  27. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-type.js +1 -0
  28. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker.js +451 -0
  29. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/month-view.js +151 -0
  30. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/multi-year-view.js +230 -0
  31. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/adapter.module.js +43 -0
  32. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-adapter.js +139 -0
  33. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-formats.js +3 -0
  34. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-adapter.js +138 -0
  35. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-formats.js +20 -0
  36. package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/year-view.js +141 -0
  37. package/esm2015/shared/gipi-components/dropdown-menu/dropdown-menu.component.js +1 -1
  38. package/esm2015/shared/gipi-components/form-field/form-field.component.js +1 -1
  39. package/esm2015/shared/gipi-components/input-currency/input-currency.component.js +1 -1
  40. package/esm2015/shared/gipi-components/input-monthpicker/input-monthpicker.component.js +1 -1
  41. package/esm2015/shared/gipi-components/input-select/input-select.component.js +1 -1
  42. package/esm2015/shared/gipi-components/month-year-picker/month-year-picker.component.js +1 -1
  43. package/esm2015/shared/gipi-components/radio-group/radio-group.component.js +1 -1
  44. package/esm2015/shared/gipi-components/range-page/range-page.component.js +1 -1
  45. package/esm2015/shared/gipi-components/range-slider/range-slider.component.js +1 -1
  46. package/esm2015/shared/gipi-components/select-button/select-button.component.js +1 -1
  47. package/esm2015/shared/gipi-components/textarea/textarea.component.js +1 -1
  48. package/esm2015/shared/shared.module.js +51 -3
  49. package/esm5/core/gipi-components/components/abstract-find.component.js +22 -1
  50. package/esm5/core/gipi-components/components/abstract.component.js +5 -2
  51. package/esm5/gipi-components.js +19 -6
  52. package/esm5/gipisistemas-ng-core.js +3 -1
  53. package/esm5/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.js +1 -1
  54. package/esm5/shared/gipi-components/datepicker/datepicker/datepicker.component.js +3 -3
  55. package/esm5/shared/gipi-components/datepicker/mat-datepicker/calendar-body.js +1 -1
  56. package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-input.js +1 -1
  57. package/esm5/shared/gipi-components/datetime-picker/datetime-picker/datetime-picker.component.js +176 -0
  58. package/esm5/shared/gipi-components/datetime-picker/datetime-picker.module.js +85 -0
  59. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar-body.js +119 -0
  60. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar.js +747 -0
  61. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/clock.js +332 -0
  62. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-animations.js +30 -0
  63. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-errors.js +7 -0
  64. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-filtertype.js +7 -0
  65. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-input.js +377 -0
  66. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-toggle.js +89 -0
  67. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-type.js +1 -0
  68. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker.js +495 -0
  69. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/month-view.js +160 -0
  70. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/multi-year-view.js +248 -0
  71. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/adapter.module.js +49 -0
  72. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-adapter.js +145 -0
  73. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-formats.js +3 -0
  74. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-adapter.js +141 -0
  75. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-formats.js +20 -0
  76. package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/year-view.js +151 -0
  77. package/esm5/shared/gipi-components/dropdown-menu/dropdown-menu.component.js +1 -1
  78. package/esm5/shared/gipi-components/form-field/form-field.component.js +1 -1
  79. package/esm5/shared/gipi-components/input-currency/input-currency.component.js +1 -1
  80. package/esm5/shared/gipi-components/input-monthpicker/input-monthpicker.component.js +1 -1
  81. package/esm5/shared/gipi-components/input-select/input-select.component.js +1 -1
  82. package/esm5/shared/gipi-components/month-year-picker/month-year-picker.component.js +1 -1
  83. package/esm5/shared/gipi-components/radio-group/radio-group.component.js +1 -1
  84. package/esm5/shared/gipi-components/range-page/range-page.component.js +1 -1
  85. package/esm5/shared/gipi-components/range-slider/range-slider.component.js +1 -1
  86. package/esm5/shared/gipi-components/select-button/select-button.component.js +1 -1
  87. package/esm5/shared/gipi-components/textarea/textarea.component.js +1 -1
  88. package/esm5/shared/shared.module.js +51 -3
  89. package/fesm2015/gipisistemas-ng-core.js +3234 -167
  90. package/fesm2015/gipisistemas-ng-core.js.map +1 -1
  91. package/fesm5/gipisistemas-ng-core.js +3445 -128
  92. package/fesm5/gipisistemas-ng-core.js.map +1 -1
  93. package/gipi-components.d.ts +16 -0
  94. package/gipisistemas-ng-core.d.ts +2 -0
  95. package/gipisistemas-ng-core.metadata.json +1 -1
  96. package/package.json +4 -4
  97. package/shared/gipi-components/datetime-picker/datetime-picker/datetime-picker.component.d.ts +40 -0
  98. package/shared/gipi-components/datetime-picker/datetime-picker.module.d.ts +2 -0
  99. package/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar-body.d.ts +50 -0
  100. package/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar.d.ts +140 -0
  101. package/shared/gipi-components/datetime-picker/mat-datetime-picker/clock.d.ts +66 -0
  102. package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-animations.d.ts +8 -0
  103. package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-errors.d.ts +2 -0
  104. package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-filtertype.d.ts +5 -0
  105. package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-input.d.ts +98 -0
  106. package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-toggle.d.ts +20 -0
  107. package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-type.d.ts +1 -0
  108. package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker.d.ts +133 -0
  109. package/shared/gipi-components/datetime-picker/mat-datetime-picker/month-view.d.ts +53 -0
  110. package/shared/gipi-components/datetime-picker/mat-datetime-picker/multi-year-view.d.ts +80 -0
  111. package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/adapter.module.d.ts +4 -0
  112. package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-adapter.d.ts +46 -0
  113. package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-formats.d.ts +20 -0
  114. package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-adapter.d.ts +36 -0
  115. package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-formats.d.ts +2 -0
  116. package/shared/gipi-components/datetime-picker/mat-datetime-picker/year-view.d.ts +52 -0
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@gipisistemas/ng-core",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "~8.2.3",
6
6
  "@angular/core": "~8.2.3",
7
- "@angular/cdk": "~8.2.1",
8
- "@angular/cdk-experimental": "~8.1.3",
9
- "@angular/material": "~8.1.3",
7
+ "@angular/cdk": "~8.2.3",
8
+ "@angular/cdk-experimental": "~8.2.3",
9
+ "@angular/material": "~8.2.3",
10
10
  "@angular/flex-layout": "~8.0.0-beta.27",
11
11
  "@material-extended/mde": "^2.3.1",
12
12
  "ngx-currency": "^2.3.3",
@@ -0,0 +1,40 @@
1
+ import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { GIPIDatetimepickerToggleComponent } from '../mat-datetime-picker/datetimepicker-toggle';
4
+ import { GIPIDatetimepickerType } from '../mat-datetime-picker/datetimepicker-type';
5
+ export declare type GIPIDateAndTimeType = Exclude<GIPIDatetimepickerType, 'date' | 'month' | 'year'>;
6
+ export declare class GIPIDateAndTimePickerComponent implements OnInit, ControlValueAccessor {
7
+ elementRef: ElementRef<HTMLElement>;
8
+ private _changeDetectorRef;
9
+ GIPIDatetimepickerToggleRef: GIPIDatetimepickerToggleComponent<Date>;
10
+ private _name;
11
+ id: string;
12
+ name: string;
13
+ label: string;
14
+ placeholder: string;
15
+ minDate: Date;
16
+ maxDate: Date;
17
+ timeInterval: number;
18
+ help: string;
19
+ private _required;
20
+ get required(): boolean;
21
+ set required(value: boolean);
22
+ private _disabled;
23
+ get disabled(): boolean;
24
+ set disabled(value: boolean);
25
+ private _value;
26
+ get value(): any;
27
+ set value(value: any);
28
+ private _type;
29
+ get type(): GIPIDateAndTimeType;
30
+ set type(value: GIPIDateAndTimeType);
31
+ onChange: Function;
32
+ onTouched: Function;
33
+ constructor(elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef);
34
+ ngOnInit(): void;
35
+ writeValue(value: any): void;
36
+ registerOnChange(fn: Function): void;
37
+ registerOnTouched(fn: Function): void;
38
+ setDisabledState?(isDisabled: boolean): void;
39
+ toggleDatetimePicker(event: Event): void;
40
+ }
@@ -0,0 +1,2 @@
1
+ export declare class DatetimepickerModule {
2
+ }
@@ -0,0 +1,50 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ /**
3
+ * An internal class that represents the data corresponding to a single calendar cell.
4
+ * @docs-private
5
+ */
6
+ export declare class GIPIDatetimepickerCalendarCell {
7
+ value: number;
8
+ displayValue: string;
9
+ ariaLabel: string;
10
+ enabled: boolean;
11
+ constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean);
12
+ }
13
+ /**
14
+ * An internal component used to display calendar data in a table.
15
+ * @docs-private
16
+ */
17
+ export declare class GIPIDatetimepickerCalendarBodyComponent implements OnChanges {
18
+ /** The number of blank cells to put at the beginning for the first row. */
19
+ _firstRowOffset: number;
20
+ /** Padding for the individual date cells. */
21
+ _cellPadding: string;
22
+ /** Width of an individual cell. */
23
+ _cellWidth: string;
24
+ /**
25
+ * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
26
+ * maintained even as the table resizes.
27
+ */
28
+ cellAspectRatio: number;
29
+ /** The label for the table. (e.g. "Jan 2017"). */
30
+ label: string;
31
+ /** The cells to display in the table. */
32
+ rows: GIPIDatetimepickerCalendarCell[][];
33
+ /** The value in the table that corresponds to today. */
34
+ todayValue: number;
35
+ /** The value in the table that is currently selected. */
36
+ selectedValue: number;
37
+ /** The minimum number of free cells needed to fit the label in the first row. */
38
+ labelMinRequiredCells: number;
39
+ /** The number of columns in the table. */
40
+ numCols: number;
41
+ /** Whether to allow selection of disabled cells. */
42
+ allowDisabledSelection: boolean;
43
+ /** The cell number of the active cell in the table. */
44
+ activeCell: number;
45
+ /** Emits when a new value is selected. */
46
+ selectedValueChange: EventEmitter<number>;
47
+ _cellClicked(cell: GIPIDatetimepickerCalendarCell): void;
48
+ _isActiveCell(rowIndex: number, colIndex: number): boolean;
49
+ ngOnChanges(changes: SimpleChanges): void;
50
+ }
@@ -0,0 +1,140 @@
1
+ import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
2
+ import { MatDatepickerIntl } from '@angular/material/datepicker';
3
+ import { GIPIClockView } from './clock';
4
+ import { GIPIDatetimepickerFilterType } from './datetimepicker-filtertype';
5
+ import { GIPIDatetimepickerType } from './datetimepicker-type';
6
+ import { GIPIDatetimeAdapter } from './shared/adapter/datetime-adapter';
7
+ import { GIPIDatetimeFormats } from './shared/adapter/datetime-formats';
8
+ export declare type GIPICalendarView = 'clock' | 'month' | 'year' | 'multi-year';
9
+ /**
10
+ * A calendar that is used as part of the datepicker.
11
+ * @docs-private
12
+ */
13
+ export declare class GIPIDatetimepickerCalendarComponent<D> implements AfterContentInit, OnDestroy {
14
+ private _elementRef;
15
+ private _intl;
16
+ private _ngZone;
17
+ private _adapter;
18
+ private _dateFormats;
19
+ _AMPM: string;
20
+ _clockView: GIPIClockView;
21
+ _calendarState: string;
22
+ private _intlChanges;
23
+ private _clampedActiveDate;
24
+ /** Active multi year view when click on year. */
25
+ multiYearSelector: boolean;
26
+ /** Whether the calendar should be started in month or year view. */
27
+ startView: GIPICalendarView;
28
+ twelvehour: boolean;
29
+ timeInterval: number;
30
+ /** A function used to filter which dates are selectable. */
31
+ dateFilter: (date: D, type: GIPIDatetimepickerFilterType) => boolean;
32
+ ariaLabel: string;
33
+ ariaNextMonthLabel: string;
34
+ ariaPrevMonthLabel: string;
35
+ ariaNextYearLabel: string;
36
+ ariaPrevYearLabel: string;
37
+ ariaNextMultiYearLabel: string;
38
+ ariaPrevMultiYearLabel: string;
39
+ /** Prevent user to select same date time */
40
+ preventSameDateTimeSelection: boolean;
41
+ private _type;
42
+ get type(): GIPIDatetimepickerType;
43
+ set type(value: GIPIDatetimepickerType);
44
+ /** A date representing the period (month or year) to start the calendar in. */
45
+ private _startAt;
46
+ get startAt(): D | null;
47
+ set startAt(value: D | null);
48
+ /** The currently selected date. */
49
+ private _selected;
50
+ get selected(): D | null;
51
+ set selected(value: D | null);
52
+ /** The minimum selectable date. */
53
+ private _minDate;
54
+ get minDate(): D | null;
55
+ set minDate(value: D | null);
56
+ /** The maximum selectable date. */
57
+ private _maxDate;
58
+ get maxDate(): D | null;
59
+ set maxDate(value: D | null);
60
+ /** Emits when the currently selected date changes. */
61
+ selectedChange: EventEmitter<D>;
62
+ /** Emits when the view has been changed. **/
63
+ viewChanged: EventEmitter<GIPICalendarView>;
64
+ _userSelection: EventEmitter<void>;
65
+ /** The current active date. This determines which time period is shown and which date is highlighted when using keyboard navigation. */
66
+ get _activeDate(): D;
67
+ set _activeDate(value: D);
68
+ /** Whether the calendar is in month view. */
69
+ _currentView: GIPICalendarView;
70
+ get currentView(): GIPICalendarView;
71
+ set currentView(view: GIPICalendarView);
72
+ /** The label for the current calendar view. */
73
+ get _yearLabel(): string;
74
+ get _monthYearLabel(): string;
75
+ get _dateLabel(): string;
76
+ get periodButtonLabel(): string;
77
+ /** The label for the previous button. */
78
+ get prevButtonLabel(): string;
79
+ /** The label for the next button. */
80
+ get nextButtonLabel(): string;
81
+ get _hoursLabel(): string;
82
+ get _minutesLabel(): string;
83
+ get _ariaLabelNext(): string;
84
+ get _ariaLabelPrev(): string;
85
+ constructor(_elementRef: ElementRef, _intl: MatDatepickerIntl, _ngZone: NgZone, _adapter: GIPIDatetimeAdapter<D>, _dateFormats: GIPIDatetimeFormats, changeDetectorRef: ChangeDetectorRef);
86
+ ngAfterContentInit(): void;
87
+ ngOnDestroy(): void;
88
+ /** Date filter for the month and year views. */
89
+ _dateFilterForViews: (date: D) => boolean;
90
+ _userSelected(): void;
91
+ /** Handles date selection in the month view. */
92
+ _dateSelected(date: D): void;
93
+ /** Handles month selection in the year view. */
94
+ _monthSelected(month: D): void;
95
+ /** Handles year selection in the multi year view. */
96
+ _yearSelected(year: D): void;
97
+ _timeSelected(date: D): void;
98
+ _onActiveDateChange(date: D): void;
99
+ _updateDate(date: D): D;
100
+ _selectAMPM(date: D): void;
101
+ _ampmClicked(source: string): void;
102
+ _yearClicked(): void;
103
+ _dateClicked(): void;
104
+ _hoursClicked(): void;
105
+ _minutesClicked(): void;
106
+ /** Handles user clicks on the previous button. */
107
+ _previousClicked(): void;
108
+ /** Handles user clicks on the next button. */
109
+ _nextClicked(): void;
110
+ /** Whether the previous period button is enabled. */
111
+ _previousEnabled(): boolean;
112
+ /** Whether the next period button is enabled. */
113
+ _nextEnabled(): boolean;
114
+ /** Handles keydown events on the calendar body. */
115
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
116
+ _focusActiveCell(): void;
117
+ _calendarStateDone(): void;
118
+ /** Whether the two dates represent the same view in the current view mode (month or year). */
119
+ private _isSameView;
120
+ /** Handles keydown events on the calendar body when calendar is in month view. */
121
+ private _handleCalendarBodyKeydownInMonthView;
122
+ /** Handles keydown events on the calendar body when calendar is in year view. */
123
+ private _handleCalendarBodyKeydownInYearView;
124
+ /** Handles keydown events on the calendar body when calendar is in multi-year view. */
125
+ private _handleCalendarBodyKeydownInMultiYearView;
126
+ /** Handles keydown events on the calendar body when calendar is in month view. */
127
+ private _handleCalendarBodyKeydownInClockView;
128
+ /**
129
+ * Determine the date for the month that comes before the given month in the same column in the
130
+ * calendar table.
131
+ */
132
+ private _prevMonthInSameCol;
133
+ /**
134
+ * Determine the date for the month that comes after the given month in the same column in the
135
+ * calendar table.
136
+ */
137
+ private _nextMonthInSameCol;
138
+ private calendarState;
139
+ private _2digit;
140
+ }
@@ -0,0 +1,66 @@
1
+ import { AfterContentInit, ElementRef, EventEmitter } from '@angular/core';
2
+ import { GIPIDatetimepickerFilterType } from './datetimepicker-filtertype';
3
+ import { GIPIDatetimeAdapter } from './shared/adapter/datetime-adapter';
4
+ export declare const CLOCK_RADIUS = 50;
5
+ export declare const CLOCK_INNER_RADIUS = 27.5;
6
+ export declare const CLOCK_OUTER_RADIUS = 41.25;
7
+ export declare const CLOCK_TICK_RADIUS = 7.0833;
8
+ export declare type GIPIClockView = 'hour' | 'minute';
9
+ /**
10
+ * A clock that is used as part of the datepicker.
11
+ * @docs-private
12
+ */
13
+ export declare class GIPIDatetimepickerClockComponent<D> implements AfterContentInit {
14
+ private _element;
15
+ private _adapter;
16
+ /** Hours and Minutes representing the clock view. */
17
+ _hours: Array<Object>;
18
+ _minutes: Array<Object>;
19
+ /** Whether the clock is in hour view. */
20
+ _hourView: boolean;
21
+ _selectedHour: number;
22
+ _selectedMinute: number;
23
+ private _timeChanged;
24
+ private mouseMoveListener;
25
+ private mouseUpListener;
26
+ /** A function used to filter which dates are selectable. */
27
+ dateFilter: (date: D, type: GIPIDatetimepickerFilterType) => boolean;
28
+ interval: number;
29
+ twelvehour: boolean;
30
+ /** The date to display in this clock view. */
31
+ private _activeDate;
32
+ get activeDate(): D;
33
+ set activeDate(value: D);
34
+ /** The currently selected date. */
35
+ private _selected;
36
+ get selected(): D | null;
37
+ set selected(value: D | null);
38
+ /** The minimum selectable date. */
39
+ private _minDate;
40
+ get minDate(): D | null;
41
+ set minDate(value: D | null);
42
+ /** The maximum selectable date. */
43
+ private _maxDate;
44
+ get maxDate(): D | null;
45
+ set maxDate(value: D | null);
46
+ /** Whether the clock should be started in hour or minute view. */
47
+ set startView(value: GIPIClockView);
48
+ get _hand(): any;
49
+ /** Emits when the currently selected date changes. */
50
+ selectedChange: EventEmitter<D>;
51
+ activeDateChange: EventEmitter<D>;
52
+ _userSelection: EventEmitter<void>;
53
+ constructor(_element: ElementRef, _adapter: GIPIDatetimeAdapter<D>);
54
+ ngAfterContentInit(): void;
55
+ /** Handles mousedown events on the clock body. */
56
+ _handleMousedown(event: any): void;
57
+ _handleMousemove(event: any): void;
58
+ _handleMouseup(): void;
59
+ /** Initializes this clock view. */
60
+ private _init;
61
+ /**
62
+ * Set Time
63
+ * @param event
64
+ */
65
+ private setTime;
66
+ }
@@ -0,0 +1,8 @@
1
+ import { AnimationTriggerMetadata } from '@angular/animations';
2
+ /**
3
+ * This animation fades in the background color and text content of the
4
+ * select's options. It is time delayed to occur 100ms after the overlay
5
+ * panel has transformed in.
6
+ */
7
+ export declare const fadeInContent: AnimationTriggerMetadata;
8
+ export declare const slideCalendar: AnimationTriggerMetadata;
@@ -0,0 +1,2 @@
1
+ /** @docs-private */
2
+ export declare function createMissingDateImplError(provider: string): Error;
@@ -0,0 +1,5 @@
1
+ export declare enum GIPIDatetimepickerFilterType {
2
+ DATE = 0,
3
+ HOUR = 1,
4
+ MINUTE = 2
5
+ }
@@ -0,0 +1,98 @@
1
+ import { AfterContentInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
3
+ import { MatFormField } from '@angular/material/form-field';
4
+ import { GIPIDatetimepickerComponent } from './datetimepicker';
5
+ import { GIPIDatetimepickerFilterType } from './datetimepicker-filtertype';
6
+ import { GIPIDatetimeAdapter } from './shared/adapter/datetime-adapter';
7
+ import { GIPIDatetimeFormats } from './shared/adapter/datetime-formats';
8
+ export declare const GIPI_DATETIMEPICKER_VALUE_ACCESSOR: any;
9
+ export declare const GIPI_DATETIMEPICKER_VALIDATORS: any;
10
+ /**
11
+ * An event used for datepicker input and change events. We don't always have access to a native
12
+ * input or change event because the event may have been triggered by the user clicking on the
13
+ * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
14
+ */
15
+ export declare class GIPIDatetimepickerInputEvent<D> {
16
+ target: GIPIDatetimepickerInputDirective<D>;
17
+ targetElement: HTMLElement;
18
+ /** The new value for the target datepicker input. */
19
+ value: D | null;
20
+ constructor(target: GIPIDatetimepickerInputDirective<D>, targetElement: HTMLElement);
21
+ }
22
+ /** Directive used to connect an input to a MatDatepicker. */
23
+ export declare class GIPIDatetimepickerInputDirective<D> implements AfterContentInit, ControlValueAccessor, OnDestroy, Validator {
24
+ private _elementRef;
25
+ _dateAdapter: GIPIDatetimeAdapter<D>;
26
+ private _dateFormats;
27
+ private _formField;
28
+ _datepicker: GIPIDatetimepickerComponent<D>;
29
+ _dateFilter: (date: D | null, type: GIPIDatetimepickerFilterType) => boolean;
30
+ /** Emits when the value changes (either due to user input or programmatic change). */
31
+ _valueChange: EventEmitter<D>;
32
+ /** Emits when the disabled state has changed */
33
+ _disabledChange: EventEmitter<boolean>;
34
+ private _datepickerSubscription;
35
+ private _localeSubscription;
36
+ /** Whether the last value set on the input was valid. */
37
+ private _lastValueValid;
38
+ /** The datepicker that this input is associated with. */
39
+ set gipiMatDatetimePicker(value: GIPIDatetimepickerComponent<D>);
40
+ set matDatepickerFilter(filter: (date: D | null, type: GIPIDatetimepickerFilterType) => boolean);
41
+ /** The value of the input. */
42
+ private _value;
43
+ get value(): D | null;
44
+ set value(value: D | null);
45
+ /** The minimum valid date. */
46
+ private _min;
47
+ get min(): D | null;
48
+ set min(value: D | null);
49
+ /** The maximum valid date. */
50
+ private _max;
51
+ get max(): D | null;
52
+ set max(value: D | null);
53
+ /** Whether the datepicker-input is disabled. */
54
+ private _disabled;
55
+ get disabled(): any;
56
+ set disabled(value: any);
57
+ /** Emits when a `change` event is fired on this `<input>`. */
58
+ dateChange: EventEmitter<GIPIDatetimepickerInputEvent<D>>;
59
+ /** Emits when an `input` event is fired on this `<input>`. */
60
+ dateInput: EventEmitter<GIPIDatetimepickerInputEvent<D>>;
61
+ constructor(_elementRef: ElementRef, _dateAdapter: GIPIDatetimeAdapter<D>, _dateFormats: GIPIDatetimeFormats, _formField: MatFormField);
62
+ _onTouched: () => void;
63
+ ngAfterContentInit(): void;
64
+ ngOnDestroy(): void;
65
+ registerOnValidatorChange(fn: () => void): void;
66
+ validate(c: AbstractControl): ValidationErrors | null;
67
+ /**
68
+ * Gets the element that the datepicker popup should be connected to.
69
+ * @return The element to connect the popup to.
70
+ */
71
+ getConnectedOverlayOrigin(): ElementRef;
72
+ writeValue(value: D): void;
73
+ registerOnChange(fn: (value: any) => void): void;
74
+ registerOnTouched(fn: () => void): void;
75
+ setDisabledState(disabled: boolean): void;
76
+ _onKeydown(event: KeyboardEvent): void;
77
+ _onInput(value: string): void;
78
+ _onChange(): void;
79
+ /** Handles blur events on the input. */
80
+ _onBlur(): void;
81
+ private registerDatepicker;
82
+ private getDisplayFormat;
83
+ private getParseFormat;
84
+ private _cvaOnChange;
85
+ private _validatorOnChange;
86
+ /** The form control validator for whether the input parses. */
87
+ private _parseValidator;
88
+ /** The form control validator for the min date. */
89
+ private _minValidator;
90
+ /** The form control validator for the max date. */
91
+ private _maxValidator;
92
+ /** The form control validator for the date filter. */
93
+ private _filterValidator;
94
+ /** The combined form control validator for this input. */
95
+ private _validator;
96
+ /** Formats a value and sets it on the input element. */
97
+ private _formatValue;
98
+ }
@@ -0,0 +1,20 @@
1
+ import { AfterContentInit, ChangeDetectorRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import { MatDatepickerIntl } from '@angular/material/datepicker';
3
+ import { GIPIDatetimepickerComponent } from './datetimepicker';
4
+ export declare class GIPIDatetimepickerToggleComponent<D> implements AfterContentInit, OnChanges, OnDestroy {
5
+ _intl: MatDatepickerIntl;
6
+ private _changeDetectorRef;
7
+ private _disabled;
8
+ private _stateChanges;
9
+ /** Datepicker instance that the button will toggle. */
10
+ datetimepicker: GIPIDatetimepickerComponent<D>;
11
+ /** Whether the toggle button is disabled. */
12
+ get disabled(): boolean;
13
+ set disabled(value: boolean);
14
+ constructor(_intl: MatDatepickerIntl, _changeDetectorRef: ChangeDetectorRef);
15
+ ngOnChanges(changes: SimpleChanges): void;
16
+ ngOnDestroy(): void;
17
+ ngAfterContentInit(): void;
18
+ _open(event: Event): void;
19
+ private _watchStateChanges;
20
+ }
@@ -0,0 +1 @@
1
+ export declare type GIPIDatetimepickerType = ('date' | 'time' | 'month' | 'year' | 'datetime');
@@ -0,0 +1,133 @@
1
+ import { Directionality } from '@angular/cdk/bidi';
2
+ import { Overlay } from '@angular/cdk/overlay';
3
+ import { AfterContentInit, EventEmitter, NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
4
+ import { MatDialog } from '@angular/material/dialog';
5
+ import { Subject } from 'rxjs';
6
+ import { GIPICalendarView, GIPIDatetimepickerCalendarComponent } from './calendar';
7
+ import { GIPIDatetimepickerFilterType } from './datetimepicker-filtertype';
8
+ import { GIPIDatetimepickerInputDirective } from './datetimepicker-input';
9
+ import { GIPIDatetimepickerType } from './datetimepicker-type';
10
+ import { GIPIDatetimeAdapter } from './shared/adapter/datetime-adapter';
11
+ export declare type GIPIDatetimepickerMode = 'auto' | 'portrait' | 'landscape';
12
+ /**
13
+ * Component used as the content for the datepicker dialog and popup. We use this instead of using
14
+ * MatCalendar directly as the content so we can control the initial focus. This also gives us a
15
+ * place to put additional features of the popup that are not part of the calendar itself in the
16
+ * future. (e.g. confirmation buttons).
17
+ * @docs-private
18
+ */
19
+ export declare class GIPIDatetimepickerContentComponent<D> implements AfterContentInit {
20
+ _calendar: GIPIDatetimepickerCalendarComponent<D>;
21
+ datetimepicker: GIPIDatetimepickerComponent<D>;
22
+ ngAfterContentInit(): void;
23
+ onSelectionChange(date: D): void;
24
+ /**
25
+ * Handles keydown event on datepicker content.
26
+ * @param event The event.
27
+ */
28
+ _handleKeydown(event: KeyboardEvent): void;
29
+ }
30
+ export declare class GIPIDatetimepickerComponent<D> implements OnDestroy {
31
+ private _dialog;
32
+ private _overlay;
33
+ private _ngZone;
34
+ private _viewContainerRef;
35
+ private _scrollStrategy;
36
+ private _dateAdapter;
37
+ private _dir;
38
+ private _document;
39
+ /** Whether the calendar is open. */
40
+ opened: boolean;
41
+ /** The id for the datepicker calendar. */
42
+ id: string;
43
+ /** The input element this datepicker is associated with. */
44
+ _datepickerInput: GIPIDatetimepickerInputDirective<D>;
45
+ /** Emits when the datepicker is disabled. */
46
+ _disabledChange: Subject<boolean>;
47
+ private _validSelected;
48
+ /** A reference to the overlay when the calendar is opened as a popup. */
49
+ private _popupRef;
50
+ /** A reference to the dialog when the calendar is opened as a dialog. */
51
+ private _dialogRef;
52
+ /** A portal containing the calendar for this datepicker. */
53
+ private _calendarPortal;
54
+ /** The element that was focused before the datepicker was opened. */
55
+ private _focusedElementBeforeOpen;
56
+ private _inputSubscription;
57
+ /** Active multi year view when click on year. */
58
+ multiYearSelector: boolean;
59
+ /** if true change the clock to 12 hour format. */
60
+ twelvehour: boolean;
61
+ /** The view that the calendar should start in. */
62
+ startView: GIPICalendarView;
63
+ mode: GIPIDatetimepickerMode;
64
+ timeInterval: number;
65
+ ariaNextMonthLabel: string;
66
+ ariaPrevMonthLabel: string;
67
+ ariaNextYearLabel: string;
68
+ ariaPrevYearLabel: string;
69
+ /** Prevent user to select same date time */
70
+ preventSameDateTimeSelection: boolean;
71
+ /** Classes to be passed to the date picker panel. Supports the same syntax as `ngClass`. */
72
+ panelClass: string | string[];
73
+ /** The date to open the calendar to initially. */
74
+ private _startAt;
75
+ get startAt(): D | null;
76
+ set startAt(date: D | null);
77
+ private _openOnFocus;
78
+ get openOnFocus(): boolean;
79
+ set openOnFocus(value: boolean);
80
+ private _type;
81
+ get type(): GIPIDatetimepickerType;
82
+ set type(value: GIPIDatetimepickerType);
83
+ /** Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather than a popup and elements have more padding to allow for bigger touch targets. */
84
+ private _touchUi;
85
+ get touchUi(): boolean;
86
+ set touchUi(value: boolean);
87
+ /** Whether the datepicker pop-up should be disabled. */
88
+ private _disabled;
89
+ get disabled(): boolean;
90
+ set disabled(value: boolean);
91
+ /** Emits when the datepicker has been opened. */
92
+ openedStream: EventEmitter<void>;
93
+ /** Emits when the datepicker has been closed. */
94
+ closedStream: EventEmitter<void>;
95
+ /** Emits when the view has been changed. **/
96
+ viewChanged: EventEmitter<GIPICalendarView>;
97
+ /**
98
+ * Emits new selected date when selected date changes.
99
+ * @deprecated Switch to the `dateChange` and `dateInput` binding on the input element.
100
+ */
101
+ selectedChanged: EventEmitter<D>;
102
+ /** The currently selected date. */
103
+ get _selected(): D | null;
104
+ set _selected(value: D | null);
105
+ /** The minimum selectable date. */
106
+ get _minDate(): D | null;
107
+ /** The maximum selectable date. */
108
+ get _maxDate(): D | null;
109
+ get _dateFilter(): (date: D | null, type: GIPIDatetimepickerFilterType) => boolean;
110
+ constructor(_dialog: MatDialog, _overlay: Overlay, _ngZone: NgZone, _viewContainerRef: ViewContainerRef, _scrollStrategy: any, _dateAdapter: GIPIDatetimeAdapter<D>, _dir: Directionality, _document: any);
111
+ _handleFocus(): void;
112
+ _viewChanged(type: GIPICalendarView): void;
113
+ ngOnDestroy(): void;
114
+ /** Selects the given date */
115
+ _select(date: D): void;
116
+ /**
117
+ * Register an input with this datepicker.
118
+ * @param input The datepicker input to register with this datepicker.
119
+ */
120
+ _registerInput(input: GIPIDatetimepickerInputDirective<D>): void;
121
+ /** Open the calendar. */
122
+ open(): void;
123
+ /** Close the calendar. */
124
+ close(): void;
125
+ /** Open the calendar as a dialog. */
126
+ private _openAsDialog;
127
+ /** Open the calendar as a popup. */
128
+ private _openAsPopup;
129
+ /** Create the popup. */
130
+ private _createPopup;
131
+ /** Create the popup PositionStrategy. */
132
+ private _createPopupPositionStrategy;
133
+ }
@@ -0,0 +1,53 @@
1
+ import { AfterContentInit, EventEmitter } from '@angular/core';
2
+ import { GIPIDatetimepickerCalendarCell } from './calendar-body';
3
+ import { GIPIDatetimepickerType } from './datetimepicker-type';
4
+ import { GIPIDatetimeAdapter } from './shared/adapter/datetime-adapter';
5
+ import { GIPIDatetimeFormats } from './shared/adapter/datetime-formats';
6
+ /**
7
+ * An internal component used to display a single month in the datepicker.
8
+ * @docs-private
9
+ */
10
+ export declare class GIPIDatetimepickerMonthViewComponent<D> implements AfterContentInit {
11
+ _adapter: GIPIDatetimeAdapter<D>;
12
+ private _dateFormats;
13
+ /** Grid of calendar cells representing the dates of the month. */
14
+ _weeks: GIPIDatetimepickerCalendarCell[][];
15
+ /** The number of blank cells in the first row before the 1st of the month. */
16
+ _firstWeekOffset: number;
17
+ /** The date of the month that the currently selected Date falls on. Null if the currently selected Date is in another month. */
18
+ _selectedDate: number;
19
+ /** The date of the month that today falls on. Null if today is in another month. */
20
+ _todayDate: number;
21
+ /** The names of the weekdays. */
22
+ _weekdays: {
23
+ long: string;
24
+ narrow: string;
25
+ }[];
26
+ _calendarState: string;
27
+ type: GIPIDatetimepickerType;
28
+ /** A function used to filter which dates are selectable. */
29
+ dateFilter: (date: D) => boolean;
30
+ /** The date to display in this month view (everything other than the month and year is ignored). */
31
+ private _activeDate;
32
+ get activeDate(): D;
33
+ set activeDate(value: D);
34
+ /** The currently selected date. */
35
+ private _selected;
36
+ get selected(): D;
37
+ set selected(value: D);
38
+ /** Emits when a new date is selected. */
39
+ selectedChange: EventEmitter<D>;
40
+ _userSelection: EventEmitter<void>;
41
+ constructor(_adapter: GIPIDatetimeAdapter<D>, _dateFormats: GIPIDatetimeFormats);
42
+ ngAfterContentInit(): void;
43
+ /** Handles when a new date is selected. */
44
+ _dateSelected(date: number): void;
45
+ _calendarStateDone(): void;
46
+ /** Initializes this month view. */
47
+ private _init;
48
+ /** Creates MdCalendarCells for the dates in this month. */
49
+ private _createWeekCells;
50
+ /** Gets the date in this month that the given Date falls on. Returns null if the given Date is in another month. */
51
+ private _getDateInCurrentMonth;
52
+ private calendarState;
53
+ }