@ptsecurity/mosaic 14.6.2 → 14.7.0

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 (212) hide show
  1. package/_theming.scss +1763 -44
  2. package/_visual.scss +341 -0
  3. package/button/button.component.d.ts +2 -0
  4. package/card/card.component.d.ts +2 -0
  5. package/checkbox/checkbox.d.ts +1 -0
  6. package/code-block/README.md +32 -0
  7. package/code-block/actionbar.component.d.ts +22 -0
  8. package/code-block/code-block.component.d.ts +74 -0
  9. package/code-block/code-block.module.d.ts +14 -0
  10. package/code-block/code-block.types.d.ts +17 -0
  11. package/code-block/index.d.ts +1 -0
  12. package/code-block/public-api.d.ts +3 -0
  13. package/core/formatters/date/formatter.d.ts +55 -1
  14. package/core/option/action.d.ts +2 -0
  15. package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +1 -0
  16. package/datepicker/calendar-body.component.d.ts +3 -11
  17. package/datepicker/calendar-header.component.d.ts +45 -0
  18. package/datepicker/calendar.component.d.ts +10 -81
  19. package/datepicker/datepicker-input.directive.d.ts +3 -3
  20. package/datepicker/datepicker-module.d.ts +8 -8
  21. package/datepicker/datepicker.component.d.ts +2 -12
  22. package/datepicker/month-view.component.d.ts +7 -26
  23. package/datepicker/public-api.d.ts +1 -2
  24. package/design-tokens/legacy-2017/tokens/components/code-block.json5 +704 -0
  25. package/design-tokens/legacy-2017/tokens.d.ts +341 -0
  26. package/design-tokens/pt-2022/tokens/components/code-block.json5 +697 -0
  27. package/design-tokens/pt-2022/tokens.d.ts +341 -0
  28. package/design-tokens/style-dictionary/configs/index.js +6 -8
  29. package/dropdown/dropdown-item.component.d.ts +1 -0
  30. package/esm2020/button/button.component.mjs +3 -3
  31. package/esm2020/card/card.component.mjs +3 -3
  32. package/esm2020/checkbox/checkbox.mjs +2 -2
  33. package/esm2020/code-block/actionbar.component.mjs +67 -0
  34. package/esm2020/code-block/code-block.component.mjs +157 -0
  35. package/esm2020/code-block/code-block.module.mjs +60 -0
  36. package/esm2020/code-block/code-block.types.mjs +2 -0
  37. package/esm2020/code-block/index.mjs +2 -0
  38. package/esm2020/code-block/ptsecurity-mosaic-code-block.mjs +5 -0
  39. package/esm2020/code-block/public-api.mjs +4 -0
  40. package/esm2020/core/formatters/date/formatter.mjs +77 -1
  41. package/esm2020/core/formatters/date/templates/en-US.mjs +56 -1
  42. package/esm2020/core/formatters/date/templates/ru-RU.mjs +92 -1
  43. package/esm2020/core/option/action.mjs +3 -2
  44. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +2 -2
  45. package/esm2020/core/version.mjs +2 -2
  46. package/esm2020/datepicker/calendar-body.component.mjs +9 -28
  47. package/esm2020/datepicker/calendar-header.component.mjs +135 -0
  48. package/esm2020/datepicker/calendar.component.mjs +25 -212
  49. package/esm2020/datepicker/datepicker-input.directive.mjs +54 -54
  50. package/esm2020/datepicker/datepicker-module.mjs +13 -17
  51. package/esm2020/datepicker/datepicker.component.mjs +10 -21
  52. package/esm2020/datepicker/month-view.component.mjs +32 -131
  53. package/esm2020/datepicker/public-api.mjs +2 -3
  54. package/esm2020/design-tokens/legacy-2017/tokens.mjs +342 -1
  55. package/esm2020/design-tokens/pt-2022/tokens.mjs +342 -1
  56. package/esm2020/dropdown/dropdown-item.component.mjs +2 -2
  57. package/esm2020/form-field/form-field.mjs +3 -2
  58. package/esm2020/form-field/hint.mjs +3 -2
  59. package/esm2020/icon/icon.component.mjs +3 -2
  60. package/esm2020/input/input-number-validators.mjs +3 -7
  61. package/esm2020/input/input.mjs +3 -2
  62. package/esm2020/link/link.component.mjs +3 -2
  63. package/esm2020/list/list-selection.component.mjs +3 -2
  64. package/esm2020/modal/modal.component.mjs +4 -3
  65. package/esm2020/progress-bar/progress-bar.component.mjs +3 -2
  66. package/esm2020/progress-spinner/progress-spinner.component.mjs +3 -2
  67. package/esm2020/radio/radio.component.mjs +3 -4
  68. package/esm2020/select/select.component.mjs +18 -6
  69. package/esm2020/select/select.module.mjs +6 -2
  70. package/esm2020/tabs/tab-group.component.mjs +2 -2
  71. package/esm2020/tabs/tab-label-wrapper.directive.mjs +2 -2
  72. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +3 -2
  73. package/esm2020/tabs/tab.component.mjs +3 -2
  74. package/esm2020/tags/tag-list.component.mjs +3 -2
  75. package/esm2020/tags/tag.component.mjs +3 -2
  76. package/esm2020/textarea/textarea.component.mjs +3 -2
  77. package/esm2020/timezone/timezone-select.component.mjs +2 -2
  78. package/esm2020/toggle/toggle.component.mjs +3 -2
  79. package/esm2020/tree/control/flat-tree-control.mjs +1 -1
  80. package/esm2020/tree/toggle.mjs +3 -2
  81. package/esm2020/tree/tree-base.mjs +1 -1
  82. package/esm2020/tree-select/tree-select.component.mjs +3 -2
  83. package/fesm2015/ptsecurity-mosaic-button.mjs +2 -2
  84. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -1
  85. package/fesm2015/ptsecurity-mosaic-card.mjs +2 -2
  86. package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -1
  87. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +1 -1
  88. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  89. package/fesm2015/ptsecurity-mosaic-code-block.mjs +280 -0
  90. package/fesm2015/ptsecurity-mosaic-code-block.mjs.map +1 -0
  91. package/fesm2015/ptsecurity-mosaic-core.mjs +226 -3
  92. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -1
  93. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +272 -906
  94. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  95. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +1024 -1
  96. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
  97. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +1 -1
  98. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  99. package/fesm2015/ptsecurity-mosaic-form-field.mjs +4 -2
  100. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
  101. package/fesm2015/ptsecurity-mosaic-icon.mjs +2 -1
  102. package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -1
  103. package/fesm2015/ptsecurity-mosaic-input.mjs +4 -7
  104. package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -1
  105. package/fesm2015/ptsecurity-mosaic-link.mjs +2 -1
  106. package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -1
  107. package/fesm2015/ptsecurity-mosaic-list.mjs +2 -1
  108. package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -1
  109. package/fesm2015/ptsecurity-mosaic-modal.mjs +3 -2
  110. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
  111. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +2 -1
  112. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -1
  113. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +2 -1
  114. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  115. package/fesm2015/ptsecurity-mosaic-radio.mjs +2 -3
  116. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -1
  117. package/fesm2015/ptsecurity-mosaic-select.mjs +22 -6
  118. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
  119. package/fesm2015/ptsecurity-mosaic-tabs.mjs +6 -4
  120. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
  121. package/fesm2015/ptsecurity-mosaic-tags.mjs +4 -2
  122. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -1
  123. package/fesm2015/ptsecurity-mosaic-textarea.mjs +2 -1
  124. package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -1
  125. package/fesm2015/ptsecurity-mosaic-timezone.mjs +2 -2
  126. package/fesm2015/ptsecurity-mosaic-timezone.mjs.map +1 -1
  127. package/fesm2015/ptsecurity-mosaic-toggle.mjs +2 -1
  128. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -1
  129. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +2 -1
  130. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  131. package/fesm2015/ptsecurity-mosaic-tree.mjs +2 -1
  132. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
  133. package/fesm2020/ptsecurity-mosaic-button.mjs +2 -2
  134. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -1
  135. package/fesm2020/ptsecurity-mosaic-card.mjs +2 -2
  136. package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -1
  137. package/fesm2020/ptsecurity-mosaic-checkbox.mjs +1 -1
  138. package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  139. package/fesm2020/ptsecurity-mosaic-code-block.mjs +278 -0
  140. package/fesm2020/ptsecurity-mosaic-code-block.mjs.map +1 -0
  141. package/fesm2020/ptsecurity-mosaic-core.mjs +226 -3
  142. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -1
  143. package/fesm2020/ptsecurity-mosaic-datepicker.mjs +270 -901
  144. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  145. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +1024 -1
  146. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
  147. package/fesm2020/ptsecurity-mosaic-dropdown.mjs +1 -1
  148. package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  149. package/fesm2020/ptsecurity-mosaic-form-field.mjs +4 -2
  150. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
  151. package/fesm2020/ptsecurity-mosaic-icon.mjs +2 -1
  152. package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -1
  153. package/fesm2020/ptsecurity-mosaic-input.mjs +4 -7
  154. package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -1
  155. package/fesm2020/ptsecurity-mosaic-link.mjs +2 -1
  156. package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -1
  157. package/fesm2020/ptsecurity-mosaic-list.mjs +2 -1
  158. package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -1
  159. package/fesm2020/ptsecurity-mosaic-modal.mjs +3 -2
  160. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
  161. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +2 -1
  162. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -1
  163. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +2 -1
  164. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  165. package/fesm2020/ptsecurity-mosaic-radio.mjs +2 -3
  166. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -1
  167. package/fesm2020/ptsecurity-mosaic-select.mjs +22 -6
  168. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
  169. package/fesm2020/ptsecurity-mosaic-tabs.mjs +6 -4
  170. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
  171. package/fesm2020/ptsecurity-mosaic-tags.mjs +4 -2
  172. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -1
  173. package/fesm2020/ptsecurity-mosaic-textarea.mjs +2 -1
  174. package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -1
  175. package/fesm2020/ptsecurity-mosaic-timezone.mjs +2 -2
  176. package/fesm2020/ptsecurity-mosaic-timezone.mjs.map +1 -1
  177. package/fesm2020/ptsecurity-mosaic-toggle.mjs +2 -1
  178. package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -1
  179. package/fesm2020/ptsecurity-mosaic-tree-select.mjs +2 -1
  180. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  181. package/fesm2020/ptsecurity-mosaic-tree.mjs +2 -1
  182. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
  183. package/form-field/form-field.d.ts +2 -0
  184. package/form-field/hint.d.ts +2 -0
  185. package/icon/icon.component.d.ts +2 -0
  186. package/input/input-number-validators.d.ts +2 -6
  187. package/input/input.d.ts +2 -0
  188. package/link/link.component.d.ts +2 -0
  189. package/list/list-selection.component.d.ts +2 -0
  190. package/package.json +12 -4
  191. package/prebuilt-themes/dark-theme.css +1 -1
  192. package/prebuilt-themes/default-theme.css +1 -1
  193. package/progress-bar/progress-bar.component.d.ts +2 -0
  194. package/progress-spinner/progress-spinner.component.d.ts +2 -0
  195. package/radio/radio.component.d.ts +2 -0
  196. package/select/select.component.d.ts +9 -2
  197. package/select/select.module.d.ts +1 -1
  198. package/tabs/tab-group.component.d.ts +1 -0
  199. package/tabs/tab-label-wrapper.directive.d.ts +1 -0
  200. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +2 -0
  201. package/tabs/tab.component.d.ts +2 -0
  202. package/tags/tag-list.component.d.ts +2 -0
  203. package/tags/tag.component.d.ts +2 -0
  204. package/textarea/textarea.component.d.ts +2 -0
  205. package/toggle/toggle.component.d.ts +2 -0
  206. package/tree/control/flat-tree-control.d.ts +4 -4
  207. package/tree/toggle.d.ts +2 -0
  208. package/tree-select/tree-select.component.d.ts +2 -0
  209. package/datepicker/multi-year-view.component.d.ts +0 -72
  210. package/datepicker/year-view.component.d.ts +0 -90
  211. package/esm2020/datepicker/multi-year-view.component.mjs +0 -218
  212. package/esm2020/datepicker/year-view.component.mjs +0 -253
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter, NgZone, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * Extra CSS classes that can be associated with a calendar cell.
@@ -13,20 +13,15 @@ export declare type McCalendarCellCssClasses = string | string[] | Set<string> |
13
13
  export declare class McCalendarCell {
14
14
  value: number;
15
15
  displayValue: string;
16
- ariaLabel: string;
17
16
  enabled: boolean;
18
17
  cssClasses?: McCalendarCellCssClasses | undefined;
19
- constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: McCalendarCellCssClasses | undefined);
18
+ constructor(value: number, displayValue: string, enabled: boolean, cssClasses?: McCalendarCellCssClasses | undefined);
20
19
  }
21
20
  /**
22
21
  * An internal component used to display calendar data in a table.
23
22
  * @docs-private
24
23
  */
25
24
  export declare class McCalendarBody implements OnChanges {
26
- private readonly elementRef;
27
- private readonly ngZone;
28
- /** The label for the table. (e.g. "Jan 2017"). */
29
- label: string;
30
25
  /** The cells to display in the table. */
31
26
  rows: McCalendarCell[][];
32
27
  /** The value in the table that corresponds to today. */
@@ -52,12 +47,9 @@ export declare class McCalendarBody implements OnChanges {
52
47
  cellPadding: string;
53
48
  /** Width of an individual cell. */
54
49
  cellWidth: string;
55
- constructor(elementRef: ElementRef<HTMLElement>, ngZone: NgZone);
56
50
  cellClicked(cell: McCalendarCell): void;
57
51
  ngOnChanges(changes: SimpleChanges): void;
58
52
  isActiveCell(rowIndex: number, colIndex: number): boolean;
59
- /** Focuses the active cell after the microtask queue is empty. */
60
- focusActiveCell(): void;
61
53
  static ɵfac: i0.ɵɵFactoryDeclaration<McCalendarBody, never>;
62
- static ɵcmp: i0.ɵɵComponentDeclaration<McCalendarBody, "[mc-calendar-body]", ["mcCalendarBody"], { "label": "label"; "rows": "rows"; "todayValue": "todayValue"; "selectedValue": "selectedValue"; "labelMinRequiredCells": "labelMinRequiredCells"; "numCols": "numCols"; "activeCell": "activeCell"; "cellAspectRatio": "cellAspectRatio"; }, { "selectedValueChange": "selectedValueChange"; }, never, never, false>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<McCalendarBody, "[mc-calendar-body]", ["mcCalendarBody"], { "rows": "rows"; "todayValue": "todayValue"; "selectedValue": "selectedValue"; "labelMinRequiredCells": "labelMinRequiredCells"; "numCols": "numCols"; "activeCell": "activeCell"; "cellAspectRatio": "cellAspectRatio"; }, { "selectedValueChange": "selectedValueChange"; }, never, never, false>;
63
55
  }
@@ -0,0 +1,45 @@
1
+ import { AfterContentInit, EventEmitter } from '@angular/core';
2
+ import { DateAdapter } from '@ptsecurity/cdk/datetime';
3
+ import * as i0 from "@angular/core";
4
+ /** Default header for McCalendar */
5
+ export declare class McCalendarHeader<D> implements AfterContentInit {
6
+ private readonly adapter;
7
+ monthNames: {
8
+ name: string;
9
+ value: number;
10
+ }[];
11
+ selectedMonth: number;
12
+ years: number[];
13
+ selectedYear: number;
14
+ get activeDate(): D;
15
+ set activeDate(value: D);
16
+ private _activeDate;
17
+ get maxDate(): D | null;
18
+ set maxDate(value: D | null);
19
+ private _maxDate;
20
+ get minDate(): D | null;
21
+ set minDate(value: D | null);
22
+ private _minDate;
23
+ get previousDisabled(): boolean;
24
+ get nextDisabled(): boolean;
25
+ /** Emits when any date is activated. */
26
+ readonly activeDateChange: EventEmitter<D>;
27
+ readonly monthSelected: EventEmitter<D>;
28
+ readonly yearSelected: EventEmitter<D>;
29
+ constructor(adapter: DateAdapter<D>);
30
+ ngAfterContentInit(): void;
31
+ /** Handles when a new month is selected. */
32
+ onMonthSelected(month: number): void;
33
+ /** Handles when a new year is selected. */
34
+ onYearSelected(year: number): void;
35
+ selectCurrentDate(): void;
36
+ /** Handles user clicks on the previous button. */
37
+ selectPreviousMonth(): void;
38
+ /** Handles user clicks on the next button. */
39
+ selectNextMonth(): void;
40
+ private compareDate;
41
+ private updateSelectedValues;
42
+ private updateYearsArray;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<McCalendarHeader<any>, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<McCalendarHeader<any>, "mc-calendar-header", ["mcCalendarHeader"], { "activeDate": "activeDate"; "maxDate": "maxDate"; "minDate": "minDate"; }, { "activeDateChange": "activeDateChange"; "monthSelected": "monthSelected"; "yearSelected": "yearSelected"; }, never, never, false>;
45
+ }
@@ -1,57 +1,41 @@
1
- import { ComponentType, Portal } from '@angular/cdk/portal';
2
- import { AfterContentInit, AfterViewChecked, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
1
+ import { AfterContentInit, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
3
2
  import { DateAdapter, McDateFormats } from '@ptsecurity/cdk/datetime';
4
3
  import { Subject } from 'rxjs';
5
4
  import { McCalendarCellCssClasses } from './calendar-body.component';
6
5
  import { McDatepickerIntl } from './datepicker-intl';
7
6
  import { McMonthView } from './month-view.component';
8
- import { McMultiYearView } from './multi-year-view.component';
9
- import { McYearView } from './year-view.component';
10
7
  import * as i0 from "@angular/core";
11
- /**
12
- * Possible views for the calendar.
13
- * @docs-private
14
- */
15
- export declare enum McCalendarView {
16
- Month = "month",
17
- Year = "year",
18
- MultiYear = "multi-year"
19
- }
20
8
  /**
21
9
  * A calendar that is used as part of the datepicker.
22
10
  * @docs-private
23
11
  */
24
- export declare class McCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {
25
- private readonly dateAdapter;
12
+ export declare class McCalendar<D> implements AfterContentInit, OnDestroy, OnChanges {
13
+ private readonly adapter;
26
14
  private readonly dateFormats;
27
15
  private changeDetectorRef;
28
16
  /** A date representing the period (month or year) to start the calendar in. */
29
17
  get startAt(): D | null;
30
18
  set startAt(value: D | null);
19
+ private _startAt;
31
20
  /** The currently selected date. */
32
21
  get selected(): D | null;
33
22
  set selected(value: D | null);
23
+ private _selected;
34
24
  /** The minimum selectable date. */
35
25
  get minDate(): D | null;
36
26
  set minDate(value: D | null);
27
+ private _minDate;
37
28
  /** The maximum selectable date. */
38
29
  get maxDate(): D | null;
39
30
  set maxDate(value: D | null);
31
+ private _maxDate;
40
32
  /**
41
33
  * The current active date. This determines which time period is shown and which date is
42
34
  * highlighted when using keyboard navigation.
43
35
  */
44
36
  get activeDate(): D;
45
37
  set activeDate(value: D);
46
- /** Whether the calendar is in month view. */
47
- get currentView(): McCalendarView;
48
- set currentView(value: McCalendarView);
49
- /** An input indicating the type of the header component, if set. */
50
- headerComponent: ComponentType<any>;
51
- /** A portal containing the header component type for this calendar. */
52
- calendarHeaderPortal: Portal<any>;
53
- /** Whether the calendar should be started in month or year view. */
54
- startView: McCalendarView;
38
+ private _activeDate;
55
39
  /** Function used to filter which dates are selectable. */
56
40
  dateFilter: (date: D) => boolean;
57
41
  /** Function that can be used to add custom CSS classes to dates. */
@@ -72,80 +56,25 @@ export declare class McCalendar<D> implements AfterContentInit, AfterViewChecked
72
56
  readonly userSelection: EventEmitter<void>;
73
57
  /** Reference to the current month view component. */
74
58
  monthView: McMonthView<D>;
75
- /** Reference to the current year view component. */
76
- yearView: McYearView<D>;
77
- /** Reference to the current multi-year view component. */
78
- multiYearView: McMultiYearView<D>;
79
59
  /**
80
60
  * Emits whenever there is a state change that the header may need to respond to.
81
61
  */
82
62
  stateChanges: Subject<void>;
83
63
  private readonly intlChanges;
84
- /**
85
- * Used for scheduling that focus should be moved to the active cell on the next tick.
86
- * We need to schedule it, rather than do it immediately, because we have to wait
87
- * for Angular to re-evaluate the view children.
88
- */
89
- private moveFocusOnNextTick;
90
- private _startAt;
91
- private _selected;
92
- private _minDate;
93
- private _maxDate;
94
- private clampedActiveDate;
95
- private _currentView;
96
- constructor(intl: McDatepickerIntl, dateAdapter: DateAdapter<D>, dateFormats: McDateFormats, changeDetectorRef: ChangeDetectorRef);
64
+ constructor(intl: McDatepickerIntl, adapter: DateAdapter<D>, dateFormats: McDateFormats, changeDetectorRef: ChangeDetectorRef);
97
65
  ngAfterContentInit(): void;
98
- ngAfterViewChecked(): void;
99
66
  ngOnDestroy(): void;
100
67
  ngOnChanges(changes: SimpleChanges): void;
101
- focusActiveCell(): void;
102
68
  /** Updates today's date after an update of the active date */
103
69
  updateTodaysDate(): void;
104
70
  /** Handles date selection in the month view. */
105
71
  dateSelected(date: D): void;
106
- /** Handles year selection in the multiyear view. */
107
- yearSelectedInMultiYearView(normalizedYear: D): void;
108
- /** Handles month selection in the year view. */
109
- monthSelectedInYearView(normalizedMonth: D): void;
110
72
  userSelected(): void;
111
- /** Handles year/month selection in the multi-year/year views. */
112
- goToDateInView(date: D, view: McCalendarView | string): void;
113
73
  /**
114
74
  * @param obj The object to check.
115
75
  * @returns The given object if it is both a date instance and valid, otherwise null.
116
76
  */
117
77
  private getValidDateOrNull;
118
- /** Returns the component instance that corresponds to the current calendar view. */
119
- private getCurrentViewComponent;
120
78
  static ɵfac: i0.ɵɵFactoryDeclaration<McCalendar<any>, [null, { optional: true; }, { optional: true; }, null]>;
121
- static ɵcmp: i0.ɵɵComponentDeclaration<McCalendar<any>, "mc-calendar", ["mcCalendar"], { "startAt": "startAt"; "selected": "selected"; "minDate": "minDate"; "maxDate": "maxDate"; "headerComponent": "headerComponent"; "startView": "startView"; "dateFilter": "dateFilter"; "dateClass": "dateClass"; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "userSelection": "userSelection"; }, never, never, false>;
122
- }
123
- /** Default header for McCalendar */
124
- export declare class McCalendarHeader<D> {
125
- private readonly intl;
126
- calendar: McCalendar<D>;
127
- private readonly dateAdapter;
128
- private readonly dateFormats;
129
- constructor(intl: McDatepickerIntl, calendar: McCalendar<D>, dateAdapter: DateAdapter<D>, dateFormats: McDateFormats, changeDetectorRef: ChangeDetectorRef);
130
- /** The label for the current calendar view. */
131
- get periodButtonText(): string;
132
- get periodButtonLabel(): string;
133
- /** The label for the previous button. */
134
- get prevButtonLabel(): string;
135
- /** The label for the next button. */
136
- get nextButtonLabel(): string;
137
- /** Handles user clicks on the period label. */
138
- currentPeriodClicked(): void;
139
- /** Handles user clicks on the previous button. */
140
- previousClicked(): void;
141
- /** Handles user clicks on the next button. */
142
- nextClicked(): void;
143
- /** Whether the previous period button is enabled. */
144
- previousEnabled(): boolean;
145
- /** Whether the next period button is enabled. */
146
- nextEnabled(): boolean;
147
- /** Whether the two dates represent the same view in the current view mode (month or year). */
148
- private isSameView;
149
- static ɵfac: i0.ɵɵFactoryDeclaration<McCalendarHeader<any>, [null, null, { optional: true; }, { optional: true; }, null]>;
150
- static ɵcmp: i0.ɵɵComponentDeclaration<McCalendarHeader<any>, "mc-calendar-header", ["mcCalendarHeader"], {}, {}, never, never, false>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<McCalendar<any>, "mc-calendar", ["mcCalendar"], { "startAt": "startAt"; "selected": "selected"; "minDate": "minDate"; "maxDate": "maxDate"; "dateFilter": "dateFilter"; "dateClass": "dateClass"; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "userSelection": "userSelection"; }, never, never, false>;
151
80
  }
@@ -33,7 +33,7 @@ export declare class McDatepickerInputEvent<D> {
33
33
  export declare class McDatepickerInput<D> implements McFormFieldControl<D>, ControlValueAccessor, Validator, OnDestroy {
34
34
  elementRef: ElementRef<HTMLInputElement>;
35
35
  private readonly renderer;
36
- readonly dateAdapter: DateAdapter<D>;
36
+ readonly adapter: DateAdapter<D>;
37
37
  private readonly dateFormats;
38
38
  readonly stateChanges: Subject<void>;
39
39
  readonly errorState: boolean;
@@ -99,7 +99,7 @@ export declare class McDatepickerInput<D> implements McFormFieldControl<D>, Cont
99
99
  private secondDigit;
100
100
  private thirdDigit;
101
101
  private separatorPositions;
102
- constructor(elementRef: ElementRef<HTMLInputElement>, renderer: Renderer2, dateAdapter: DateAdapter<D>, dateFormats: McDateFormats);
102
+ constructor(elementRef: ElementRef<HTMLInputElement>, renderer: Renderer2, adapter: DateAdapter<D>, dateFormats: McDateFormats);
103
103
  onContainerClick(): void;
104
104
  focus(): void;
105
105
  focusChanged(isFocused: boolean): void;
@@ -159,12 +159,12 @@ export declare class McDatepickerInput<D> implements McFormFieldControl<D>, Cont
159
159
  private filterValidator;
160
160
  /** Formats a value and sets it on the input element. */
161
161
  private formatValue;
162
+ private setControl;
162
163
  /**
163
164
  * @param obj The object to check.
164
165
  * @returns The given object if it is both a date instance and valid, otherwise null.
165
166
  */
166
167
  private getValidDateOrNull;
167
- private setControl;
168
168
  private getDigitPositions;
169
169
  private createDate;
170
170
  private createDateTime;
@@ -5,16 +5,16 @@ import * as i3 from "./datepicker.component";
5
5
  import * as i4 from "./datepicker-input.directive";
6
6
  import * as i5 from "./datepicker-toggle.component";
7
7
  import * as i6 from "./month-view.component";
8
- import * as i7 from "./year-view.component";
9
- import * as i8 from "./multi-year-view.component";
10
- import * as i9 from "@angular/common";
11
- import * as i10 from "@ptsecurity/mosaic/button";
12
- import * as i11 from "@angular/cdk/overlay";
13
- import * as i12 from "@angular/cdk/a11y";
14
- import * as i13 from "@angular/cdk/portal";
8
+ import * as i7 from "./calendar-header.component";
9
+ import * as i8 from "@angular/common";
10
+ import * as i9 from "@ptsecurity/mosaic/button";
11
+ import * as i10 from "@angular/cdk/overlay";
12
+ import * as i11 from "@angular/cdk/a11y";
13
+ import * as i12 from "@angular/cdk/portal";
14
+ import * as i13 from "@ptsecurity/mosaic/select";
15
15
  import * as i14 from "@ptsecurity/mosaic/icon";
16
16
  export declare class McDatepickerModule {
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<McDatepickerModule, never>;
18
- static ɵmod: i0.ɵɵNgModuleDeclaration<McDatepickerModule, [typeof i1.McCalendar, typeof i2.McCalendarBody, typeof i3.McDatepicker, typeof i3.McDatepickerContent, typeof i4.McDatepickerInput, typeof i5.McDatepickerToggle, typeof i5.McDatepickerToggleIcon, typeof i6.McMonthView, typeof i7.McYearView, typeof i8.McMultiYearView, typeof i1.McCalendarHeader], [typeof i9.CommonModule, typeof i10.McButtonModule, typeof i11.OverlayModule, typeof i12.A11yModule, typeof i13.PortalModule, typeof i14.McIconModule], [typeof i1.McCalendar, typeof i2.McCalendarBody, typeof i3.McDatepicker, typeof i3.McDatepickerContent, typeof i4.McDatepickerInput, typeof i5.McDatepickerToggle, typeof i5.McDatepickerToggleIcon, typeof i6.McMonthView, typeof i7.McYearView, typeof i8.McMultiYearView, typeof i1.McCalendarHeader, typeof i10.McButtonModule]>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<McDatepickerModule, [typeof i1.McCalendar, typeof i2.McCalendarBody, typeof i3.McDatepicker, typeof i3.McDatepickerContent, typeof i4.McDatepickerInput, typeof i5.McDatepickerToggle, typeof i5.McDatepickerToggleIcon, typeof i6.McMonthView, typeof i7.McCalendarHeader], [typeof i8.CommonModule, typeof i9.McButtonModule, typeof i10.OverlayModule, typeof i11.A11yModule, typeof i12.PortalModule, typeof i9.McButtonModule, typeof i13.McSelectModule, typeof i14.McIconModule], [typeof i1.McCalendar, typeof i2.McCalendarBody, typeof i3.McDatepicker, typeof i3.McDatepickerContent, typeof i4.McDatepickerInput, typeof i5.McDatepickerToggle, typeof i5.McDatepickerToggleIcon, typeof i6.McMonthView, typeof i7.McCalendarHeader]>;
19
19
  static ɵinj: i0.ɵɵInjectorDeclaration<McDatepickerModule>;
20
20
  }
@@ -1,11 +1,10 @@
1
1
  import { Directionality } from '@angular/cdk/bidi';
2
2
  import { Overlay, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';
3
- import { ComponentType } from '@angular/cdk/portal';
4
3
  import { ChangeDetectorRef, EventEmitter, InjectionToken, NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
5
4
  import { DateAdapter } from '@ptsecurity/cdk/datetime';
6
5
  import { Subject } from 'rxjs';
7
6
  import { McCalendarCellCssClasses } from './calendar-body.component';
8
- import { McCalendar, McCalendarView } from './calendar.component';
7
+ import { McCalendar } from './calendar.component';
9
8
  import { McDatepickerInput } from './datepicker-input.directive';
10
9
  import * as i0 from "@angular/core";
11
10
  /** Injection token that determines the scroll handling while the calendar is open. */
@@ -75,10 +74,6 @@ export declare class McDatepicker<D> implements OnDestroy {
75
74
  minDate: D | null;
76
75
  /** The maximum selectable date. */
77
76
  maxDate: D | null;
78
- /** An input indicating the type of the custom header component for the calendar, if set. */
79
- calendarHeaderComponent: ComponentType<any>;
80
- /** The view that the calendar should start in. */
81
- startView: McCalendarView;
82
77
  /**
83
78
  * Emits selected year in multiyear view.
84
79
  * This doesn't imply a change on the selected date.
@@ -148,11 +143,6 @@ export declare class McDatepicker<D> implements OnDestroy {
148
143
  private closingActions;
149
144
  /** Create the popup PositionStrategy. */
150
145
  private createPopupPositionStrategy;
151
- /**
152
- * @param obj The object to check.
153
- * @returns The given object if it is both a date instance and valid, otherwise null.
154
- */
155
- private getValidDateOrNull;
156
146
  static ɵfac: i0.ɵɵFactoryDeclaration<McDatepicker<any>, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
157
- static ɵcmp: i0.ɵɵComponentDeclaration<McDatepicker<any>, "mc-datepicker", ["mcDatepicker"], { "hasBackdrop": "hasBackdrop"; "startAt": "startAt"; "disabled": "disabled"; "opened": "opened"; "minDate": "minDate"; "maxDate": "maxDate"; "calendarHeaderComponent": "calendarHeaderComponent"; "startView": "startView"; "panelClass": "panelClass"; "dateClass": "dateClass"; "backdropClass": "backdropClass"; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, false>;
147
+ static ɵcmp: i0.ɵɵComponentDeclaration<McDatepicker<any>, "mc-datepicker", ["mcDatepicker"], { "hasBackdrop": "hasBackdrop"; "startAt": "startAt"; "disabled": "disabled"; "opened": "opened"; "minDate": "minDate"; "maxDate": "maxDate"; "panelClass": "panelClass"; "dateClass": "dateClass"; "backdropClass": "backdropClass"; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, false>;
158
148
  }
@@ -1,4 +1,3 @@
1
- import { Directionality } from '@angular/cdk/bidi';
2
1
  import { AfterContentInit, ChangeDetectorRef, EventEmitter } from '@angular/core';
3
2
  import { DateAdapter, McDateFormats } from '@ptsecurity/cdk/datetime';
4
3
  import { McCalendarBody, McCalendarCell, McCalendarCellCssClasses } from './calendar-body.component';
@@ -10,22 +9,21 @@ import * as i0 from "@angular/core";
10
9
  export declare class McMonthView<D> implements AfterContentInit {
11
10
  private changeDetectorRef;
12
11
  private readonly dateFormats;
13
- dateAdapter: DateAdapter<D>;
14
- private dir?;
12
+ adapter: DateAdapter<D>;
15
13
  /**
16
14
  * The date to display in this month view (everything other than the month and year is ignored).
17
15
  */
18
16
  get activeDate(): D;
19
17
  set activeDate(value: D);
18
+ private _activeDate;
20
19
  /** The currently selected date. */
21
20
  get selected(): D | null;
22
21
  set selected(value: D | null);
22
+ private _selected;
23
23
  /** The minimum selectable date. */
24
- get minDate(): D | null;
25
- set minDate(value: D | null);
24
+ minDate: D | null;
26
25
  /** The maximum selectable date. */
27
- get maxDate(): D | null;
28
- set maxDate(value: D | null);
26
+ maxDate: D | null;
29
27
  /** Function used to filter which dates are selectable. */
30
28
  dateFilter: (date: D) => boolean;
31
29
  /** Function that can be used to add custom CSS classes to dates. */
@@ -38,8 +36,6 @@ export declare class McMonthView<D> implements AfterContentInit {
38
36
  readonly activeDateChange: EventEmitter<D>;
39
37
  /** The body of calendar table */
40
38
  mcCalendarBody: McCalendarBody;
41
- /** The label for this month (e.g. "January 2017"). */
42
- monthLabel: string;
43
39
  /** Grid of calendar cells representing the dates of the month. */
44
40
  weeks: McCalendarCell[][];
45
41
  /** The number of blank cells in the first row before the 1st of the month. */
@@ -56,20 +52,12 @@ export declare class McMonthView<D> implements AfterContentInit {
56
52
  long: string;
57
53
  narrow: string;
58
54
  }[];
59
- private _activeDate;
60
- private _selected;
61
- private _minDate;
62
- private _maxDate;
63
- constructor(changeDetectorRef: ChangeDetectorRef, dateFormats: McDateFormats, dateAdapter: DateAdapter<D>, dir?: Directionality | undefined);
55
+ constructor(changeDetectorRef: ChangeDetectorRef, dateFormats: McDateFormats, adapter: DateAdapter<D>);
64
56
  ngAfterContentInit(): void;
65
57
  /** Handles when a new date is selected. */
66
58
  dateSelected(date: number): void;
67
- /** Handles keydown events on the calendar body when calendar is in month view. */
68
- handleCalendarBodyKeydown(event: KeyboardEvent): void;
69
59
  /** Initializes this month view. */
70
60
  init(): void;
71
- /** Focuses the active cell after the microtask queue is empty. */
72
- focusActiveCell(): void;
73
61
  /** Creates McCalendarCells for the dates in this month. */
74
62
  private createWeekCells;
75
63
  /** Date filter for the month */
@@ -81,13 +69,6 @@ export declare class McMonthView<D> implements AfterContentInit {
81
69
  private getDateInCurrentMonth;
82
70
  /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
83
71
  private hasSameMonthAndYear;
84
- /**
85
- * @param obj The object to check.
86
- * @returns The given object if it is both a date instance and valid, otherwise null.
87
- */
88
- private getValidDateOrNull;
89
- /** Determines whether the user has the RTL layout direction. */
90
- private isRtl;
91
- static ɵfac: i0.ɵɵFactoryDeclaration<McMonthView<any>, [null, { optional: true; }, { optional: true; }, { optional: true; }]>;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<McMonthView<any>, [null, { optional: true; }, { optional: true; }]>;
92
73
  static ɵcmp: i0.ɵɵComponentDeclaration<McMonthView<any>, "mc-month-view", ["mcMonthView"], { "activeDate": "activeDate"; "selected": "selected"; "minDate": "minDate"; "maxDate": "maxDate"; "dateFilter": "dateFilter"; "dateClass": "dateClass"; }, { "selectedChange": "selectedChange"; "userSelection": "userSelection"; "activeDateChange": "activeDateChange"; }, never, never, false>;
93
74
  }
@@ -1,5 +1,6 @@
1
1
  export * from './datepicker-module';
2
2
  export * from './calendar.component';
3
+ export * from './calendar-header.component';
3
4
  export * from './calendar-body.component';
4
5
  export * from './datepicker.component';
5
6
  export * from './datepicker-animations';
@@ -7,5 +8,3 @@ export * from './datepicker-input.directive';
7
8
  export * from './datepicker-intl';
8
9
  export * from './datepicker-toggle.component';
9
10
  export * from './month-view.component';
10
- export * from './year-view.component';
11
- export * from './multi-year-view.component';