@ng-matero/extensions 14.6.0 → 14.6.2

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.
@@ -157,13 +157,15 @@ $clock-font-size: 14px !default;
157
157
  }
158
158
  }
159
159
 
160
- .mtx-time-am.mat-button,
161
- .mtx-time-pm.mat-button {
162
- color: theming.get-color-from-palette($foreground, text);
163
- border-color: theming.get-color-from-palette($foreground, hint-text);
164
-
165
- &.mtx-time-ampm-active {
166
- background-color: theming.get-color-from-palette($accent, .2);
160
+ .mtx-time-ampm {
161
+ .mtx-time-am,
162
+ .mtx-time-pm {
163
+ color: theming.get-color-from-palette($foreground, text);
164
+ border-color: theming.get-color-from-palette($foreground, hint-text);
165
+
166
+ &.mtx-time-ampm-active {
167
+ background-color: theming.get-color-from-palette($accent, .2);
168
+ }
167
169
  }
168
170
  }
169
171
  }
@@ -40,7 +40,9 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
40
40
  display: flex;
41
41
  flex-direction: column;
42
42
 
43
- .mat-button {
43
+ .mtx-calendar-header-hours,
44
+ .mtx-calendar-header-minutes,
45
+ .mtx-calendar-header-ampm {
44
46
  width: 40px;
45
47
  text-align: center;
46
48
  }
@@ -71,7 +73,11 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
71
73
  padding: 8px;
72
74
  border-radius: 4px 4px 0 0;
73
75
 
74
- .mat-button {
76
+ .mtx-calendar-header-year,
77
+ .mtx-calendar-header-date,
78
+ .mtx-calendar-header-hours,
79
+ .mtx-calendar-header-minutes,
80
+ .mtx-calendar-header-ampm {
75
81
  min-width: auto;
76
82
  padding: 0 4px;
77
83
  text-align: inherit;
@@ -81,10 +87,10 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
81
87
  white-space: normal;
82
88
  word-break: break-word;
83
89
  }
84
- }
85
90
 
86
- .mtx-calendar-header-year.mat-button {
87
- line-height: 24px;
91
+ .mtx-calendar-header-year {
92
+ line-height: 24px;
93
+ }
88
94
  }
89
95
 
90
96
  .mtx-calendar-header-date-time {
@@ -1,5 +1,5 @@
1
1
  import { BooleanInput } from '@angular/cdk/coercion';
2
- import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
2
+ import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
3
3
  import { DatetimeAdapter } from '@ng-matero/extensions/core';
4
4
  import { MtxDatetimepickerFilterType } from './datetimepicker-filtertype';
5
5
  import * as i0 from "@angular/core";
@@ -13,10 +13,11 @@ export declare type MtxClockView = 'hour' | 'minute';
13
13
  * A clock that is used as part of the datetimepicker.
14
14
  * @docs-private
15
15
  */
16
- export declare class MtxClock<D> implements AfterContentInit {
17
- private _element;
16
+ export declare class MtxClock<D> implements AfterContentInit, OnDestroy {
17
+ private _elementRef;
18
18
  private _adapter;
19
- private _cdr;
19
+ private _changeDetectorRef;
20
+ private _document;
20
21
  /** A function used to filter which dates are selectable. */
21
22
  dateFilter: (date: D, type: MtxDatetimepickerFilterType) => boolean;
22
23
  /** Step over minutes. */
@@ -29,17 +30,14 @@ export declare class MtxClock<D> implements AfterContentInit {
29
30
  activeDateChange: EventEmitter<D>;
30
31
  /** Emits when any date is selected. */
31
32
  readonly _userSelection: EventEmitter<void>;
32
- /** Hours and Minutes representing the clock view. */
33
- _hours: any[];
34
- _minutes: any[];
35
33
  /** Whether the clock is in hour view. */
36
34
  _hourView: boolean;
35
+ _hours: any[];
36
+ _minutes: any[];
37
37
  _selectedHour: number;
38
38
  _selectedMinute: number;
39
39
  private _timeChanged;
40
- private mouseMoveListener;
41
- private mouseUpListener;
42
- constructor(_element: ElementRef, _adapter: DatetimeAdapter<D>, _cdr: ChangeDetectorRef);
40
+ constructor(_elementRef: ElementRef, _adapter: DatetimeAdapter<D>, _changeDetectorRef: ChangeDetectorRef, _document: any);
43
41
  /**
44
42
  * The date to display in this clock view.
45
43
  */
@@ -60,12 +58,26 @@ export declare class MtxClock<D> implements AfterContentInit {
60
58
  private _maxDate;
61
59
  /** Whether the clock should be started in hour or minute view. */
62
60
  set startView(value: MtxClockView);
63
- get _hand(): any;
61
+ get _hand(): {
62
+ height: string;
63
+ marginTop: string;
64
+ transform: string;
65
+ };
64
66
  ngAfterContentInit(): void;
65
- /** Handles mousedown events on the clock body. */
66
- _handleMousedown(event: any): void;
67
- _handleMousemove(event: any): void;
68
- _handleMouseup(): void;
67
+ ngOnDestroy(): void;
68
+ /** Called when the user has put their pointer down on the clock. */
69
+ private _pointerDown;
70
+ /**
71
+ * Called when the user has moved their pointer after
72
+ * starting to drag. Bound on the document level.
73
+ */
74
+ private _pointerMove;
75
+ /** Called when the user has lifted their pointer. Bound on the document level. */
76
+ private _pointerUp;
77
+ /** Binds our global move and end events. */
78
+ private _bindGlobalEvents;
79
+ /** Removes any global event listeners that we may have added. */
80
+ private _removeGlobalEvents;
69
81
  /** Initializes this clock view. */
70
82
  private _init;
71
83
  /**
@@ -9,6 +9,7 @@ $clock-cell-size: 14.1666% !default;
9
9
  margin: $clock-margin;
10
10
  box-sizing: border-box;
11
11
  user-select: none;
12
+ touch-action: none;
12
13
  }
13
14
 
14
15
  .mtx-clock-wrapper {
@@ -22,7 +22,10 @@ $time-ampm-width: 40px;
22
22
  }
23
23
 
24
24
  .mtx-time-input {
25
+ box-sizing: border-box;
25
26
  width: $time-input-width;
27
+ height: 100%;
28
+ padding: 0;
26
29
  font-size: $time-font-size;
27
30
  text-align: center;
28
31
  border-radius: $time-border-radius;
@@ -49,26 +52,26 @@ $time-ampm-width: 40px;
49
52
  margin-left: auto;
50
53
  margin-right: 12px;
51
54
  }
52
- }
53
55
 
54
- .mtx-time-am.mat-button,
55
- .mtx-time-pm.mat-button {
56
- flex: 1;
57
- width: $time-ampm-width;
58
- min-width: auto;
59
- padding: 0;
60
- line-height: normal;
61
- border-width: 1px;
62
- border-style: solid;
63
- }
56
+ .mtx-time-am,
57
+ .mtx-time-pm {
58
+ flex: 1;
59
+ width: $time-ampm-width;
60
+ min-width: auto;
61
+ padding: 0;
62
+ line-height: normal;
63
+ border-width: 1px;
64
+ border-style: solid;
65
+ }
64
66
 
65
- .mtx-time-am.mat-button {
66
- border-radius: $time-border-radius $time-border-radius 0 0;
67
- }
67
+ .mtx-time-am {
68
+ border-radius: $time-border-radius $time-border-radius 0 0;
69
+ }
68
70
 
69
- .mtx-time-pm.mat-button {
70
- border-radius: 0 0 $time-border-radius $time-border-radius;
71
- border-top: none;
71
+ .mtx-time-pm {
72
+ border-radius: 0 0 $time-border-radius $time-border-radius;
73
+ border-top: none;
74
+ }
72
75
  }
73
76
 
74
77
  .mtx-time-button-wrapper {