@ng-matero/extensions 13.2.2 → 13.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/colorpicker/colorpicker-toggle.d.ts +7 -5
  2. package/core/datetime/datetime-formats.d.ts +2 -0
  3. package/datetimepicker/datetimepicker-toggle.d.ts +3 -3
  4. package/esm2020/colorpicker/colorpicker-toggle.mjs +29 -18
  5. package/esm2020/core/datetime/datetime-formats.mjs +1 -1
  6. package/esm2020/datetimepicker/datetimepicker-input.mjs +6 -1
  7. package/esm2020/datetimepicker/datetimepicker-toggle.mjs +23 -16
  8. package/esm2020/datetimepicker/datetimepicker.mjs +6 -4
  9. package/esm2020/grid/cell.component.mjs +8 -4
  10. package/esm2020/grid/column-menu.component.mjs +11 -17
  11. package/esm2020/grid/grid.component.mjs +12 -7
  12. package/esm2020/popover/popover-animations.mjs +10 -13
  13. package/esm2020/popover/popover-content.mjs +90 -0
  14. package/esm2020/popover/popover-interfaces.mjs +1 -1
  15. package/esm2020/popover/popover-module.mjs +9 -7
  16. package/esm2020/popover/popover-target.mjs +3 -3
  17. package/esm2020/popover/popover-trigger.mjs +214 -184
  18. package/esm2020/popover/popover-types.mjs +1 -1
  19. package/esm2020/popover/popover.mjs +188 -133
  20. package/esm2020/popover/public-api.mjs +2 -1
  21. package/esm2020/select/option.component.mjs +4 -6
  22. package/esm2020/select/select.component.mjs +121 -31
  23. package/fesm2015/mtxColorpicker.mjs +27 -14
  24. package/fesm2015/mtxColorpicker.mjs.map +1 -1
  25. package/fesm2015/mtxCore.mjs.map +1 -1
  26. package/fesm2015/mtxDatetimepicker.mjs +34 -18
  27. package/fesm2015/mtxDatetimepicker.mjs.map +1 -1
  28. package/fesm2015/mtxGrid.mjs +28 -25
  29. package/fesm2015/mtxGrid.mjs.map +1 -1
  30. package/fesm2015/mtxPopover.mjs +520 -352
  31. package/fesm2015/mtxPopover.mjs.map +1 -1
  32. package/fesm2015/mtxSelect.mjs +172 -83
  33. package/fesm2015/mtxSelect.mjs.map +1 -1
  34. package/fesm2020/mtxColorpicker.mjs +25 -14
  35. package/fesm2020/mtxColorpicker.mjs.map +1 -1
  36. package/fesm2020/mtxCore.mjs.map +1 -1
  37. package/fesm2020/mtxDatetimepicker.mjs +32 -18
  38. package/fesm2020/mtxDatetimepicker.mjs.map +1 -1
  39. package/fesm2020/mtxGrid.mjs +28 -25
  40. package/fesm2020/mtxGrid.mjs.map +1 -1
  41. package/fesm2020/mtxPopover.mjs +514 -350
  42. package/fesm2020/mtxPopover.mjs.map +1 -1
  43. package/fesm2020/mtxSelect.mjs +170 -83
  44. package/fesm2020/mtxSelect.mjs.map +1 -1
  45. package/grid/cell.component.d.ts +5 -3
  46. package/grid/column-menu.component.d.ts +4 -6
  47. package/grid/grid.component.d.ts +7 -5
  48. package/package.json +1 -1
  49. package/popover/popover-animations.d.ts +1 -1
  50. package/popover/popover-content.d.ts +43 -0
  51. package/popover/popover-interfaces.d.ts +37 -31
  52. package/popover/popover-module.d.ts +4 -3
  53. package/popover/popover-target.d.ts +2 -2
  54. package/popover/popover-trigger.d.ts +67 -62
  55. package/popover/popover-types.d.ts +6 -1
  56. package/popover/popover.d.ts +99 -71
  57. package/popover/popover.scss +2 -0
  58. package/popover/public-api.d.ts +1 -0
  59. package/select/option.component.d.ts +7 -6
  60. package/select/select.component.d.ts +61 -22
@@ -6,7 +6,7 @@ import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
6
6
  import * as i3 from '@angular/common';
7
7
  import { CommonModule } from '@angular/common';
8
8
  import * as i0 from '@angular/core';
9
- import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, Inject, InjectionToken, ViewChild, forwardRef, Directive, ContentChild, NgModule } from '@angular/core';
9
+ import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, Inject, InjectionToken, ViewChild, forwardRef, Directive, Attribute, ContentChild, NgModule } from '@angular/core';
10
10
  import * as i3$1 from '@angular/material/button';
11
11
  import { MatButtonModule } from '@angular/material/button';
12
12
  import { ENTER, PAGE_DOWN, PAGE_UP, END, HOME, DOWN_ARROW, UP_ARROW, RIGHT_ARROW, LEFT_ARROW, ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
@@ -1617,7 +1617,7 @@ class MtxDatetimepicker {
1617
1617
  /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
1618
1618
  this._backdropHarnessClass = `${this.id}-backdrop`;
1619
1619
  this._inputStateChanges = Subscription.EMPTY;
1620
- this._type = 'date';
1620
+ this._type = 'datetime';
1621
1621
  this._touchUi = false;
1622
1622
  /** Preferred position of the datetimepicker in the X axis. */
1623
1623
  this.xPosition = 'start';
@@ -1680,7 +1680,7 @@ class MtxDatetimepicker {
1680
1680
  return this._type;
1681
1681
  }
1682
1682
  set type(value) {
1683
- this._type = value || 'date';
1683
+ this._type = value || 'datetime';
1684
1684
  }
1685
1685
  /**
1686
1686
  * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather
@@ -1781,7 +1781,9 @@ class MtxDatetimepicker {
1781
1781
  return;
1782
1782
  }
1783
1783
  if (this._componentRef) {
1784
- this._destroyOverlay();
1784
+ const instance = this._componentRef.instance;
1785
+ instance._startExitAnimation();
1786
+ instance._animationDone.pipe(take(1)).subscribe(() => this._destroyOverlay());
1785
1787
  }
1786
1788
  const completeClose = () => {
1787
1789
  // The `_opened` could've been reset already if
@@ -2229,6 +2231,8 @@ class MtxDatetimepickerInput {
2229
2231
  return this._dateFormats.display.timeInput;
2230
2232
  case 'month':
2231
2233
  return this._dateFormats.display.monthInput;
2234
+ case 'year':
2235
+ return this._dateFormats.display.yearInput;
2232
2236
  }
2233
2237
  }
2234
2238
  getParseFormat() {
@@ -2246,6 +2250,9 @@ class MtxDatetimepickerInput {
2246
2250
  case 'month':
2247
2251
  parseFormat = this._dateFormats.parse.monthInput;
2248
2252
  break;
2253
+ case 'year':
2254
+ parseFormat = this._dateFormats.parse.yearInput;
2255
+ break;
2249
2256
  }
2250
2257
  if (!parseFormat) {
2251
2258
  parseFormat = this._dateFormats.parse.dateInput;
@@ -2332,10 +2339,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
2332
2339
  }]
2333
2340
  }] });
2334
2341
  class MtxDatetimepickerToggle {
2335
- constructor(_intl, _changeDetectorRef) {
2342
+ constructor(_intl, _changeDetectorRef, defaultTabIndex) {
2336
2343
  this._intl = _intl;
2337
2344
  this._changeDetectorRef = _changeDetectorRef;
2338
2345
  this._stateChanges = Subscription.EMPTY;
2346
+ const parsedTabIndex = Number(defaultTabIndex);
2347
+ this.tabIndex = parsedTabIndex || parsedTabIndex === 0 ? parsedTabIndex : null;
2339
2348
  }
2340
2349
  /** Whether the toggle button is disabled. */
2341
2350
  get disabled() {
@@ -2368,29 +2377,36 @@ class MtxDatetimepickerToggle {
2368
2377
  const inputDisabled = this.datetimepicker && this.datetimepicker.datetimepickerInput
2369
2378
  ? this.datetimepicker.datetimepickerInput._disabledChange
2370
2379
  : of();
2380
+ const datetimepickerToggled = this.datetimepicker
2381
+ ? merge(this.datetimepicker.openedStream, this.datetimepicker.closedStream)
2382
+ : of();
2371
2383
  this._stateChanges.unsubscribe();
2372
- this._stateChanges = merge([
2373
- this._intl.changes,
2374
- datetimepickerDisabled,
2375
- inputDisabled,
2376
- ]).subscribe(() => this._changeDetectorRef.markForCheck());
2384
+ this._stateChanges = merge(this._intl.changes, datetimepickerDisabled, inputDisabled, datetimepickerToggled).subscribe(() => this._changeDetectorRef.markForCheck());
2377
2385
  }
2378
2386
  }
2379
- /** @nocollapse */ MtxDatetimepickerToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxDatetimepickerToggle, deps: [{ token: i1$1.MatDatepickerIntl }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2380
- /** @nocollapse */ MtxDatetimepickerToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: MtxDatetimepickerToggle, selector: "mtx-datetimepicker-toggle", inputs: { datetimepicker: ["for", "datetimepicker"], tabIndex: "tabIndex", disabled: "disabled", disableRipple: "disableRipple" }, host: { listeners: { "focus": "_button.focus()" }, properties: { "attr.tabindex": "disabled ? null : -1", "class.mtx-datetimepicker-toggle-active": "datetimepicker && datetimepicker.opened", "class.mat-accent": "datetimepicker && datetimepicker.color === \"accent\"", "class.mat-warn": "datetimepicker && datetimepicker.color === \"warn\"" }, classAttribute: "mtx-datetimepicker-toggle" }, queries: [{ propertyName: "_customIcon", first: true, predicate: MtxDatetimepickerToggleIcon, descendants: true }], viewQueries: [{ propertyName: "_button", first: true, predicate: ["button"], descendants: true }], exportAs: ["mtxDatetimepickerToggle"], usesOnChanges: true, ngImport: i0, template: "<button #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\"\n [attr.aria-label]=\"_intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n (click)=\"_open($event)\">\n\n <ng-container *ngIf=\"!_customIcon\" [ngSwitch]=\"datetimepicker.type\">\n <svg *ngSwitchCase=\"'time'\"\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\n </path>\n </svg>\n <svg *ngSwitchCase=\"'datetime'\"\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\n </path>\n </svg>\n <svg *ngSwitchDefault\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\n </svg>\n </ng-container>\n\n <ng-content select=\"[mtxDatetimepickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mtx-datetimepicker-toggle-default-icon{margin:auto}\n"], components: [{ type: i3$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2387
+ /** @nocollapse */ MtxDatetimepickerToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxDatetimepickerToggle, deps: [{ token: i1$1.MatDatepickerIntl }, { token: i0.ChangeDetectorRef }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
2388
+ /** @nocollapse */ MtxDatetimepickerToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: MtxDatetimepickerToggle, selector: "mtx-datetimepicker-toggle", inputs: { datetimepicker: ["for", "datetimepicker"], tabIndex: "tabIndex", disabled: "disabled", disableRipple: "disableRipple" }, host: { listeners: { "click": "_open($event)" }, properties: { "attr.tabindex": "null", "class.mtx-datetimepicker-toggle-active": "datetimepicker && datetimepicker.opened", "class.mat-accent": "datetimepicker && datetimepicker.color === \"accent\"", "class.mat-warn": "datetimepicker && datetimepicker.color === \"warn\"", "attr.data-mtx-calendar": "datetimepicker ? datetimepicker.id : null" }, classAttribute: "mtx-datetimepicker-toggle" }, queries: [{ propertyName: "_customIcon", first: true, predicate: MtxDatetimepickerToggleIcon, descendants: true }], viewQueries: [{ propertyName: "_button", first: true, predicate: ["button"], descendants: true }], exportAs: ["mtxDatetimepickerToggle"], usesOnChanges: true, ngImport: i0, template: "<button #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\"\n [attr.aria-label]=\"_intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\">\n\n <ng-container *ngIf=\"!_customIcon\" [ngSwitch]=\"datetimepicker.type\">\n <svg *ngSwitchCase=\"'time'\"\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\n </path>\n </svg>\n <svg *ngSwitchCase=\"'datetime'\"\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\n </path>\n </svg>\n <svg *ngSwitchDefault\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\n </svg>\n </ng-container>\n\n <ng-content select=\"[mtxDatetimepickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mtx-datetimepicker-toggle-default-icon{margin:auto}\n"], components: [{ type: i3$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2381
2389
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: MtxDatetimepickerToggle, decorators: [{
2382
2390
  type: Component,
2383
2391
  args: [{ selector: 'mtx-datetimepicker-toggle', host: {
2384
2392
  'class': 'mtx-datetimepicker-toggle',
2385
- // Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the
2386
- // consumer may have provided, while still being able to receive focus.
2387
- '[attr.tabindex]': 'disabled ? null : -1',
2393
+ '[attr.tabindex]': 'null',
2388
2394
  '[class.mtx-datetimepicker-toggle-active]': 'datetimepicker && datetimepicker.opened',
2389
2395
  '[class.mat-accent]': 'datetimepicker && datetimepicker.color === "accent"',
2390
2396
  '[class.mat-warn]': 'datetimepicker && datetimepicker.color === "warn"',
2391
- '(focus)': '_button.focus()',
2392
- }, exportAs: 'mtxDatetimepickerToggle', encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\"\n [attr.aria-label]=\"_intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n (click)=\"_open($event)\">\n\n <ng-container *ngIf=\"!_customIcon\" [ngSwitch]=\"datetimepicker.type\">\n <svg *ngSwitchCase=\"'time'\"\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\n </path>\n </svg>\n <svg *ngSwitchCase=\"'datetime'\"\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\n </path>\n </svg>\n <svg *ngSwitchDefault\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\n </svg>\n </ng-container>\n\n <ng-content select=\"[mtxDatetimepickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mtx-datetimepicker-toggle-default-icon{margin:auto}\n"] }]
2393
- }], ctorParameters: function () { return [{ type: i1$1.MatDatepickerIntl }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { datetimepicker: [{
2397
+ // Used by the test harness to tie this toggle to its datetimepicker.
2398
+ '[attr.data-mtx-calendar]': 'datetimepicker ? datetimepicker.id : null',
2399
+ // Bind the `click` on the host, rather than the inner `button`, so that we can call
2400
+ // `stopPropagation` on it without affecting the user's `click` handlers. We need to stop
2401
+ // it so that the input doesn't get focused automatically by the form field (See #21836).
2402
+ '(click)': '_open($event)',
2403
+ }, exportAs: 'mtxDatetimepickerToggle', encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\"\n [attr.aria-label]=\"_intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\">\n\n <ng-container *ngIf=\"!_customIcon\" [ngSwitch]=\"datetimepicker.type\">\n <svg *ngSwitchCase=\"'time'\"\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\n </path>\n </svg>\n <svg *ngSwitchCase=\"'datetime'\"\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\n </path>\n </svg>\n <svg *ngSwitchDefault\n class=\"mtx-datetimepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\n </svg>\n </ng-container>\n\n <ng-content select=\"[mtxDatetimepickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mtx-datetimepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mtx-datetimepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mtx-datetimepicker-toggle-default-icon{margin:auto}\n"] }]
2404
+ }], ctorParameters: function () {
2405
+ return [{ type: i1$1.MatDatepickerIntl }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
2406
+ type: Attribute,
2407
+ args: ['tabindex']
2408
+ }] }];
2409
+ }, propDecorators: { datetimepicker: [{
2394
2410
  type: Input,
2395
2411
  args: ['for']
2396
2412
  }], tabIndex: [{