@angular/material 10.1.2 → 10.1.3
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.
- package/_theming.scss +5 -0
- package/bundles/material-autocomplete-testing.umd.js +316 -248
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -9
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +421 -355
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +2 -24
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge-testing.umd.js +301 -235
- package/bundles/material-badge-testing.umd.js.map +1 -1
- package/bundles/material-badge-testing.umd.min.js +2 -9
- package/bundles/material-badge-testing.umd.min.js.map +1 -1
- package/bundles/material-badge.umd.js +344 -278
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-badge.umd.min.js +3 -3
- package/bundles/material-badge.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.js +302 -236
- package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js +2 -9
- package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +361 -288
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +17 -2
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-testing.umd.js +310 -244
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.min.js +2 -9
- package/bundles/material-button-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +304 -245
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js +3 -17
- package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +387 -321
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +2 -10
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +375 -309
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +2 -10
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card-testing.umd.js +306 -242
- package/bundles/material-card-testing.umd.js.map +1 -1
- package/bundles/material-card-testing.umd.min.js +2 -9
- package/bundles/material-card-testing.umd.min.js.map +1 -1
- package/bundles/material-card.umd.js +139 -139
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js +2 -2
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.js +302 -236
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +2 -9
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +370 -311
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +2 -9
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips.umd.js +598 -539
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +18 -3
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core-testing.umd.js +304 -245
- package/bundles/material-core-testing.umd.js.map +1 -1
- package/bundles/material-core-testing.umd.min.js +3 -17
- package/bundles/material-core-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +509 -492
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +37 -12
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +868 -837
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +42 -8
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog-testing.umd.js +303 -237
- package/bundles/material-dialog-testing.umd.js.map +1 -1
- package/bundles/material-dialog-testing.umd.min.js +2 -9
- package/bundles/material-dialog-testing.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +431 -365
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +15 -14
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider-testing.umd.js +300 -234
- package/bundles/material-divider-testing.umd.js.map +1 -1
- package/bundles/material-divider-testing.umd.min.js +2 -9
- package/bundles/material-divider-testing.umd.min.js.map +1 -1
- package/bundles/material-divider.umd.js +28 -28
- package/bundles/material-divider.umd.js.map +1 -1
- package/bundles/material-divider.umd.min.js +2 -9
- package/bundles/material-divider.umd.min.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +303 -246
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.min.js +2 -10
- package/bundles/material-expansion-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion.umd.js +459 -400
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +11 -3
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.js +299 -233
- package/bundles/material-form-field-testing-control.umd.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +301 -235
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +3 -10
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +452 -386
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +34 -3
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.js +311 -252
- package/bundles/material-grid-list-testing.umd.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.min.js +2 -17
- package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +409 -336
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +19 -4
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-icon-testing.umd.js +8 -8
- package/bundles/material-icon-testing.umd.js.map +1 -1
- package/bundles/material-icon-testing.umd.min.js +2 -2
- package/bundles/material-icon-testing.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +349 -283
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +2 -9
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-input-testing.umd.js +303 -237
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.min.js +2 -9
- package/bundles/material-input-testing.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +387 -328
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +4 -18
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +333 -303
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +2 -2
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +492 -433
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -10
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +305 -239
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -10
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +458 -406
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +5 -4
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.js +302 -236
- package/bundles/material-paginator-testing.umd.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +2 -9
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +345 -279
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +2 -9
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.js +301 -235
- package/bundles/material-progress-bar-testing.umd.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js +2 -9
- package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +339 -266
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.min.js +4 -3
- package/bundles/material-progress-bar.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +301 -235
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js +2 -9
- package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +380 -314
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +2 -10
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +304 -238
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +2 -10
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +405 -339
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +2 -10
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +315 -247
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -9
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +408 -342
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +5 -12
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.js +303 -244
- package/bundles/material-sidenav-testing.umd.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.min.js +2 -16
- package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +512 -448
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +3 -3
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +302 -236
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +2 -9
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +373 -314
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +2 -9
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +302 -236
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.min.js +2 -9
- package/bundles/material-slider-testing.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +374 -308
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +4 -3
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.js +304 -238
- package/bundles/material-snack-bar-testing.umd.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js +2 -9
- package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +379 -306
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +26 -2
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +302 -243
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.min.js +2 -17
- package/bundles/material-sort-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +369 -310
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +3 -18
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper.umd.js +490 -445
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +5 -12
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-table-testing.umd.js +317 -265
- package/bundles/material-table-testing.umd.js.map +1 -1
- package/bundles/material-table-testing.umd.min.js +2 -24
- package/bundles/material-table-testing.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +494 -462
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +3 -10
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs-testing.umd.js +303 -244
- package/bundles/material-tabs-testing.umd.js.map +1 -1
- package/bundles/material-tabs-testing.umd.min.js +1 -16
- package/bundles/material-tabs-testing.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +661 -630
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +29 -4
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +301 -235
- package/bundles/material-toolbar-testing.umd.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.min.js +2 -9
- package/bundles/material-toolbar-testing.umd.min.js.map +1 -1
- package/bundles/material-toolbar.umd.js +337 -271
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js +4 -3
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.js +301 -235
- package/bundles/material-tooltip-testing.umd.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.min.js +2 -9
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +367 -294
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +3 -3
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +421 -383
- package/bundles/material-tree.umd.js.map +1 -1
- package/bundles/material-tree.umd.min.js +3 -3
- package/bundles/material-tree.umd.min.js.map +1 -1
- package/core/index.metadata.json +1 -1
- package/core/style/_vendor-prefixes.scss +5 -0
- package/esm2015/bottom-sheet/bottom-sheet.js +1 -1
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/stepper/stepper.js +3 -3
- package/esm2015/table/cell.js +12 -26
- package/esm2015/table/table.js +4 -2
- package/esm2015/tree/node.js +2 -2
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/stepper.js +2 -2
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table.js +14 -26
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tree.js +1 -1
- package/fesm2015/tree.js.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/stepper/index.metadata.json +1 -1
- package/table/cell.d.ts +7 -4
- package/table/index.metadata.json +1 -1
- package/table/table.d.ts +2 -0
- package/tree/index.metadata.json +1 -1
|
@@ -12,14 +12,15 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license that can be
|
|
14
14
|
* found in the LICENSE file at https://angular.io/license
|
|
15
|
-
*/var b=function(){function t(){this.changes=new c.Subject,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return t.prototype.formatYearRange=function(t,e){return t+" – "+e},t.ɵprov=i.ɵɵdefineInjectable({factory:function e(){return new t},token:t,providedIn:"root"}),t.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],t}(),D=function D(t,e,a,n,r,i,o){void 0===r&&(r={}),void 0===i&&(i=t),this.value=t,this.displayValue=e,this.ariaLabel=a,this.enabled=n,this.cssClasses=r,this.compareValue=i,this.rawValue=o},C=function(){function t(t,e){var a=this;this._elementRef=t,this._ngZone=e,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new i.EventEmitter,this.previewChange=new i.EventEmitter,this._enterHandler=function(t){if(a._skipNextFocus&&"focus"===t.type)a._skipNextFocus=!1;else if(t.target&&a.isRange){var e=a._getCellFromElement(t.target);e&&a._ngZone.run((function(){return a.previewChange.emit({value:e.enabled?e:null,event:t})}))}},this._leaveHandler=function(t){null!==a.previewEnd&&a.isRange&&t.target&&A(t.target)&&a._ngZone.run((function(){return a.previewChange.emit({value:null,event:t})}))},e.runOutsideAngular((function(){var e=t.nativeElement;e.addEventListener("mouseenter",a._enterHandler,!0),e.addEventListener("focus",a._enterHandler,!0),e.addEventListener("mouseleave",a._leaveHandler,!0),e.addEventListener("blur",a._leaveHandler,!0)}))}return t.prototype._cellClicked=function(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})},t.prototype._isSelected=function(t){return this.startValue===t.compareValue||this.endValue===t.compareValue},t.prototype.ngOnChanges=function(t){var e=t.numCols,a=this.rows,n=this.numCols;(t.rows||e)&&(this._firstRowOffset=a&&a.length&&a[0].length?n-a[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/n+"%"),!e&&this._cellWidth||(this._cellWidth=100/n+"%")},t.prototype.ngOnDestroy=function(){var t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)},t.prototype._isActiveCell=function(t,e){var a=t*this.numCols+e;return t&&(a-=this._firstRowOffset),a==this.activeCell},t.prototype._focusActiveCell=function(t){var e=this;void 0===t&&(t=!0),this._ngZone.runOutsideAngular((function(){e._ngZone.onStable.asObservable().pipe(h.take(1)).subscribe((function(){var a=e._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(t||(e._skipNextFocus=!0),a.focus())}))}))},t.prototype._isRangeStart=function(t){return w(t,this.startValue,this.endValue)},t.prototype._isRangeEnd=function(t){return k(t,this.startValue,this.endValue)},t.prototype._isInRange=function(t){return I(t,this.startValue,this.endValue,this.isRange)},t.prototype._isComparisonStart=function(t){return w(t,this.comparisonStart,this.comparisonEnd)},t.prototype._isComparisonBridgeStart=function(t,e,a){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;var n=this.rows[e][a-1];if(!n){var r=this.rows[e-1];n=r&&r[r.length-1]}return n&&!this._isRangeEnd(n.compareValue)},t.prototype._isComparisonBridgeEnd=function(t,e,a){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;var n=this.rows[e][a+1];if(!n){var r=this.rows[e+1];n=r&&r[0]}return n&&!this._isRangeStart(n.compareValue)},t.prototype._isComparisonEnd=function(t){return k(t,this.comparisonStart,this.comparisonEnd)},t.prototype._isInComparisonRange=function(t){return I(t,this.comparisonStart,this.comparisonEnd,this.isRange)},t.prototype._isPreviewStart=function(t){return w(t,this.previewStart,this.previewEnd)},t.prototype._isPreviewEnd=function(t){return k(t,this.previewStart,this.previewEnd)},t.prototype._isInPreview=function(t){return I(t,this.previewStart,this.previewEnd,this.isRange)},t.prototype._getCellFromElement=function(t){var e;if(A(t)?e=t:A(t.parentNode)&&(e=t.parentNode),e){var a=e.getAttribute("data-mat-row"),n=e.getAttribute("data-mat-col");if(a&&n)return this.rows[parseInt(a)][parseInt(n)]}return null},t.decorators=[{type:i.Component,args:[{selector:"[mat-calendar-body]",template:'\x3c!--\n If there\'s not enough space in the first row, create a separate label row. We mark this row as\n aria-hidden because we don\'t want it to be read out as one of the weeks in the month.\n--\x3e\n<tr *ngIf="_firstRowOffset < labelMinRequiredCells" aria-hidden="true">\n <td class="mat-calendar-body-label"\n [attr.colspan]="numCols"\n [style.paddingTop]="_cellPadding"\n [style.paddingBottom]="_cellPadding">\n {{label}}\n </td>\n</tr>\n\n\x3c!-- Create the first row separately so we can include a special spacer cell. --\x3e\n<tr *ngFor="let row of rows; let rowIndex = index" role="row">\n \x3c!--\n We mark this cell as aria-hidden so it doesn\'t get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\n --\x3e\n <td *ngIf="rowIndex === 0 && _firstRowOffset"\n aria-hidden="true"\n class="mat-calendar-body-label"\n [attr.colspan]="_firstRowOffset"\n [style.paddingTop]="_cellPadding"\n [style.paddingBottom]="_cellPadding">\n {{_firstRowOffset >= labelMinRequiredCells ? label : \'\'}}\n </td>\n <td *ngFor="let item of row; let colIndex = index"\n role="gridcell"\n class="mat-calendar-body-cell"\n [ngClass]="item.cssClasses"\n [tabindex]="_isActiveCell(rowIndex, colIndex) ? 0 : -1"\n [attr.data-mat-row]="rowIndex"\n [attr.data-mat-col]="colIndex"\n [class.mat-calendar-body-disabled]="!item.enabled"\n [class.mat-calendar-body-active]="_isActiveCell(rowIndex, colIndex)"\n [class.mat-calendar-body-range-start]="_isRangeStart(item.compareValue)"\n [class.mat-calendar-body-range-end]="_isRangeEnd(item.compareValue)"\n [class.mat-calendar-body-in-range]="_isInRange(item.compareValue)"\n [class.mat-calendar-body-comparison-bridge-start]="_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)"\n [class.mat-calendar-body-comparison-bridge-end]="_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)"\n [class.mat-calendar-body-comparison-start]="_isComparisonStart(item.compareValue)"\n [class.mat-calendar-body-comparison-end]="_isComparisonEnd(item.compareValue)"\n [class.mat-calendar-body-in-comparison-range]="_isInComparisonRange(item.compareValue)"\n [class.mat-calendar-body-preview-start]="_isPreviewStart(item.compareValue)"\n [class.mat-calendar-body-preview-end]="_isPreviewEnd(item.compareValue)"\n [class.mat-calendar-body-in-preview]="_isInPreview(item.compareValue)"\n [attr.aria-label]="item.ariaLabel"\n [attr.aria-disabled]="!item.enabled || null"\n [attr.aria-selected]="_isSelected(item)"\n (click)="_cellClicked(item, $event)"\n [style.width]="_cellWidth"\n [style.paddingTop]="_cellPadding"\n [style.paddingBottom]="_cellPadding">\n <div class="mat-calendar-body-cell-content mat-focus-indicator"\n [class.mat-calendar-body-selected]="_isSelected(item)"\n [class.mat-calendar-body-today]="todayValue === item.compareValue">\n {{item.displayValue}}\n </div>\n <div class="mat-calendar-body-cell-preview"></div>\n </td>\n</tr>\n',host:{class:"mat-calendar-body",role:"grid","aria-readonly":"true"},exportAs:"matCalendarBody",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n']}]}],t.ctorParameters=function(){return[{type:i.ElementRef},{type:i.NgZone}]},t.propDecorators={label:[{type:i.Input}],rows:[{type:i.Input}],todayValue:[{type:i.Input}],startValue:[{type:i.Input}],endValue:[{type:i.Input}],labelMinRequiredCells:[{type:i.Input}],numCols:[{type:i.Input}],activeCell:[{type:i.Input}],isRange:[{type:i.Input}],cellAspectRatio:[{type:i.Input}],comparisonStart:[{type:i.Input}],comparisonEnd:[{type:i.Input}],previewStart:[{type:i.Input}],previewEnd:[{type:i.Input}],selectedValueChange:[{type:i.Output}],previewChange:[{type:i.Output}]},t}();
|
|
15
|
+
*/var b=function(){function t(){this.changes=new c.Subject,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return t.prototype.formatYearRange=function(t,e){return t+" – "+e},t}();b.ɵprov=i.ɵɵdefineInjectable({factory:function t(){return new b},token:b,providedIn:"root"}),b.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright Google LLC All Rights Reserved.
|
|
19
19
|
*
|
|
20
20
|
* Use of this source code is governed by an MIT-style license that can be
|
|
21
21
|
* found in the LICENSE file at https://angular.io/license
|
|
22
|
-
*/
|
|
22
|
+
*/
|
|
23
|
+
var D=function D(t,e,a,n,r,i,o){void 0===r&&(r={}),void 0===i&&(i=t),this.value=t,this.displayValue=e,this.ariaLabel=a,this.enabled=n,this.cssClasses=r,this.compareValue=i,this.rawValue=o},C=function(){function t(t,e){var a=this;this._elementRef=t,this._ngZone=e,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new i.EventEmitter,this.previewChange=new i.EventEmitter,this._enterHandler=function(t){if(a._skipNextFocus&&"focus"===t.type)a._skipNextFocus=!1;else if(t.target&&a.isRange){var e=a._getCellFromElement(t.target);e&&a._ngZone.run((function(){return a.previewChange.emit({value:e.enabled?e:null,event:t})}))}},this._leaveHandler=function(t){null!==a.previewEnd&&a.isRange&&t.target&&A(t.target)&&a._ngZone.run((function(){return a.previewChange.emit({value:null,event:t})}))},e.runOutsideAngular((function(){var e=t.nativeElement;e.addEventListener("mouseenter",a._enterHandler,!0),e.addEventListener("focus",a._enterHandler,!0),e.addEventListener("mouseleave",a._leaveHandler,!0),e.addEventListener("blur",a._leaveHandler,!0)}))}return t.prototype._cellClicked=function(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})},t.prototype._isSelected=function(t){return this.startValue===t.compareValue||this.endValue===t.compareValue},t.prototype.ngOnChanges=function(t){var e=t.numCols,a=this.rows,n=this.numCols;(t.rows||e)&&(this._firstRowOffset=a&&a.length&&a[0].length?n-a[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/n+"%"),!e&&this._cellWidth||(this._cellWidth=100/n+"%")},t.prototype.ngOnDestroy=function(){var t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)},t.prototype._isActiveCell=function(t,e){var a=t*this.numCols+e;return t&&(a-=this._firstRowOffset),a==this.activeCell},t.prototype._focusActiveCell=function(t){var e=this;void 0===t&&(t=!0),this._ngZone.runOutsideAngular((function(){e._ngZone.onStable.asObservable().pipe(h.take(1)).subscribe((function(){var a=e._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(t||(e._skipNextFocus=!0),a.focus())}))}))},t.prototype._isRangeStart=function(t){return w(t,this.startValue,this.endValue)},t.prototype._isRangeEnd=function(t){return k(t,this.startValue,this.endValue)},t.prototype._isInRange=function(t){return I(t,this.startValue,this.endValue,this.isRange)},t.prototype._isComparisonStart=function(t){return w(t,this.comparisonStart,this.comparisonEnd)},t.prototype._isComparisonBridgeStart=function(t,e,a){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;var n=this.rows[e][a-1];if(!n){var r=this.rows[e-1];n=r&&r[r.length-1]}return n&&!this._isRangeEnd(n.compareValue)},t.prototype._isComparisonBridgeEnd=function(t,e,a){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;var n=this.rows[e][a+1];if(!n){var r=this.rows[e+1];n=r&&r[0]}return n&&!this._isRangeStart(n.compareValue)},t.prototype._isComparisonEnd=function(t){return k(t,this.comparisonStart,this.comparisonEnd)},t.prototype._isInComparisonRange=function(t){return I(t,this.comparisonStart,this.comparisonEnd,this.isRange)},t.prototype._isPreviewStart=function(t){return w(t,this.previewStart,this.previewEnd)},t.prototype._isPreviewEnd=function(t){return k(t,this.previewStart,this.previewEnd)},t.prototype._isInPreview=function(t){return I(t,this.previewStart,this.previewEnd,this.isRange)},t.prototype._getCellFromElement=function(t){var e;if(A(t)?e=t:A(t.parentNode)&&(e=t.parentNode),e){var a=e.getAttribute("data-mat-row"),n=e.getAttribute("data-mat-col");if(a&&n)return this.rows[parseInt(a)][parseInt(n)]}return null},t}();function A(t){return"TD"===t.nodeName}function w(t,e,a){return null!==a&&e!==a&&t<a&&t===e}function k(t,e,a){return null!==e&&e!==a&&t>=e&&t===a}function I(t,e,a,n){return n&&null!==e&&null!==a&&e!==a&&t>=e&&t<=a}
|
|
23
24
|
/*! *****************************************************************************
|
|
24
25
|
Copyright (c) Microsoft Corporation.
|
|
25
26
|
|
|
@@ -33,7 +34,37 @@
|
|
|
33
34
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
34
35
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
35
36
|
PERFORMANCE OF THIS SOFTWARE.
|
|
36
|
-
***************************************************************************** */var O=function(t,e){return(O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(t,e)};function E(t,e){function a(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}function V(t,e){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var n,r,i=a.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function x(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(V(arguments[e]));return t}
|
|
37
|
+
***************************************************************************** */C.decorators=[{type:i.Component,args:[{selector:"[mat-calendar-body]",template:'\x3c!--\n If there\'s not enough space in the first row, create a separate label row. We mark this row as\n aria-hidden because we don\'t want it to be read out as one of the weeks in the month.\n--\x3e\n<tr *ngIf="_firstRowOffset < labelMinRequiredCells" aria-hidden="true">\n <td class="mat-calendar-body-label"\n [attr.colspan]="numCols"\n [style.paddingTop]="_cellPadding"\n [style.paddingBottom]="_cellPadding">\n {{label}}\n </td>\n</tr>\n\n\x3c!-- Create the first row separately so we can include a special spacer cell. --\x3e\n<tr *ngFor="let row of rows; let rowIndex = index" role="row">\n \x3c!--\n We mark this cell as aria-hidden so it doesn\'t get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\n --\x3e\n <td *ngIf="rowIndex === 0 && _firstRowOffset"\n aria-hidden="true"\n class="mat-calendar-body-label"\n [attr.colspan]="_firstRowOffset"\n [style.paddingTop]="_cellPadding"\n [style.paddingBottom]="_cellPadding">\n {{_firstRowOffset >= labelMinRequiredCells ? label : \'\'}}\n </td>\n <td *ngFor="let item of row; let colIndex = index"\n role="gridcell"\n class="mat-calendar-body-cell"\n [ngClass]="item.cssClasses"\n [tabindex]="_isActiveCell(rowIndex, colIndex) ? 0 : -1"\n [attr.data-mat-row]="rowIndex"\n [attr.data-mat-col]="colIndex"\n [class.mat-calendar-body-disabled]="!item.enabled"\n [class.mat-calendar-body-active]="_isActiveCell(rowIndex, colIndex)"\n [class.mat-calendar-body-range-start]="_isRangeStart(item.compareValue)"\n [class.mat-calendar-body-range-end]="_isRangeEnd(item.compareValue)"\n [class.mat-calendar-body-in-range]="_isInRange(item.compareValue)"\n [class.mat-calendar-body-comparison-bridge-start]="_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)"\n [class.mat-calendar-body-comparison-bridge-end]="_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)"\n [class.mat-calendar-body-comparison-start]="_isComparisonStart(item.compareValue)"\n [class.mat-calendar-body-comparison-end]="_isComparisonEnd(item.compareValue)"\n [class.mat-calendar-body-in-comparison-range]="_isInComparisonRange(item.compareValue)"\n [class.mat-calendar-body-preview-start]="_isPreviewStart(item.compareValue)"\n [class.mat-calendar-body-preview-end]="_isPreviewEnd(item.compareValue)"\n [class.mat-calendar-body-in-preview]="_isInPreview(item.compareValue)"\n [attr.aria-label]="item.ariaLabel"\n [attr.aria-disabled]="!item.enabled || null"\n [attr.aria-selected]="_isSelected(item)"\n (click)="_cellClicked(item, $event)"\n [style.width]="_cellWidth"\n [style.paddingTop]="_cellPadding"\n [style.paddingBottom]="_cellPadding">\n <div class="mat-calendar-body-cell-content mat-focus-indicator"\n [class.mat-calendar-body-selected]="_isSelected(item)"\n [class.mat-calendar-body-today]="todayValue === item.compareValue">\n {{item.displayValue}}\n </div>\n <div class="mat-calendar-body-cell-preview"></div>\n </td>\n</tr>\n',host:{class:"mat-calendar-body",role:"grid","aria-readonly":"true"},exportAs:"matCalendarBody",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n']}]}],C.ctorParameters=function(){return[{type:i.ElementRef},{type:i.NgZone}]},C.propDecorators={label:[{type:i.Input}],rows:[{type:i.Input}],todayValue:[{type:i.Input}],startValue:[{type:i.Input}],endValue:[{type:i.Input}],labelMinRequiredCells:[{type:i.Input}],numCols:[{type:i.Input}],activeCell:[{type:i.Input}],isRange:[{type:i.Input}],cellAspectRatio:[{type:i.Input}],comparisonStart:[{type:i.Input}],comparisonEnd:[{type:i.Input}],previewStart:[{type:i.Input}],previewEnd:[{type:i.Input}],selectedValueChange:[{type:i.Output}],previewChange:[{type:i.Output}]};var O=function(t,e){return(O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(t,e)};function E(t,e){function a(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}function V(t,e){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var n,r,i=a.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function x(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(V(arguments[e]));return t}var S=function S(t,e){this.start=t,this.end=e},M=function(){function t(t,e){this.selection=t,this._adapter=e,this._selectionChanged=new c.Subject,this.selectionChanged=this._selectionChanged.asObservable(),this.selection=t}return t.prototype.updateSelection=function(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})},t.prototype.ngOnDestroy=function(){this._selectionChanged.complete()},t.prototype._isValidDateInstance=function(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)},t}();M.decorators=[{type:i.Directive}],M.ctorParameters=function(){return[{type:void 0},{type:l.DateAdapter}]};var R=function(t){function e(e){return t.call(this,null,e)||this}return E(e,t),e.prototype.add=function(e){t.prototype.updateSelection.call(this,e,this)},e.prototype.isValid=function(){return null!=this.selection&&this._isValidDateInstance(this.selection)},e.prototype.isComplete=function(){return null!=this.selection},e}(M);R.decorators=[{type:i.Injectable}],R.ctorParameters=function(){return[{type:l.DateAdapter}]};var P=function(t){function e(e){return t.call(this,new S(null,null),e)||this}return E(e,t),e.prototype.add=function(e){var a=this.selection,n=a.start,r=a.end;null==n?n=e:null==r?r=e:(n=e,r=null),t.prototype.updateSelection.call(this,new S(n,r),this)},e.prototype.isValid=function(){var t=this.selection,e=t.start,a=t.end;return null==e&&null==a||(null!=e&&null!=a?this._isValidDateInstance(e)&&this._isValidDateInstance(a)&&this._adapter.compareDate(e,a)<=0:(null==e||this._isValidDateInstance(e))&&(null==a||this._isValidDateInstance(a)))},e.prototype.isComplete=function(){return null!=this.selection.start&&null!=this.selection.end},e}(M);function T(t,e){return t||new R(e)}P.decorators=[{type:i.Injectable}],P.ctorParameters=function(){return[{type:l.DateAdapter}]};var F={provide:M,deps:[[new i.Optional,new i.SkipSelf,M],l.DateAdapter],useFactory:T};function Y(t,e){return t||new P(e)}var N={provide:M,deps:[[new i.Optional,new i.SkipSelf,M],l.DateAdapter],useFactory:Y},j=new i.InjectionToken("MAT_DATE_RANGE_SELECTION_STRATEGY"),L=function(){function t(t){this._dateAdapter=t}return t.prototype.selectionFinished=function(t,e){var a=e.start,n=e.end;return null==a?a=t:null==n&&t&&this._dateAdapter.compareDate(t,a)>=0?n=t:(a=t,n=null),new S(a,n)},t.prototype.createPreview=function(t,e){var a=null,n=null;return e.start&&!e.end&&t&&(a=e.start,n=t),new S(a,n)},t}();
|
|
38
|
+
/**
|
|
39
|
+
* @license
|
|
40
|
+
* Copyright Google LLC All Rights Reserved.
|
|
41
|
+
*
|
|
42
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
43
|
+
* found in the LICENSE file at https://angular.io/license
|
|
44
|
+
*/L.decorators=[{type:i.Injectable}],L.ctorParameters=function(){return[{type:l.DateAdapter}]};
|
|
45
|
+
/**
|
|
46
|
+
* @license
|
|
47
|
+
* Copyright Google LLC All Rights Reserved.
|
|
48
|
+
*
|
|
49
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
50
|
+
* found in the LICENSE file at https://angular.io/license
|
|
51
|
+
*/
|
|
52
|
+
var B=function(){function t(t,e,a,n,r){if(this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=a,this._dir=n,this._rangeStrategy=r,this._rerenderSubscription=c.Subscription.EMPTY,this.selectedChange=new i.EventEmitter,this._userSelection=new i.EventEmitter,this.activeDateChange=new i.EventEmitter,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate,a=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof S?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(h.startWith(null)).subscribe((function(){return t._init()}))},t.prototype.ngOnDestroy=function(){this._rerenderSubscription.unsubscribe()},t.prototype._dateSelected=function(t){var e,a,n=t.value,r=this._dateAdapter.getYear(this.activeDate),i=this._dateAdapter.getMonth(this.activeDate),o=this._dateAdapter.createDate(r,i,n);this._selected instanceof S?(e=this._getDateInCurrentMonth(this._selected.start),a=this._getDateInCurrentMonth(this._selected.end)):e=a=this._getDateInCurrentMonth(this._selected),e===n&&a===n||this.selectedChange.emit(o),this._userSelection.emit({value:o,event:t.event})},t.prototype._handleCalendarBodyKeydown=function(t){var e=this._activeDate,a=this._isRtl();switch(t.keyCode){case p.LEFT_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?1:-1);break;case p.RIGHT_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?-1:1);break;case p.UP_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case p.DOWN_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case p.HOME:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case p.END:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case p.PAGE_UP:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case p.PAGE_DOWN:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case p.ENTER:case p.SPACE:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case p.ESCAPE:return void(null!=this._previewEnd&&(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()},t.prototype._init=function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()},t.prototype._focusActiveCell=function(t){this._matCalendarBody._focusActiveCell(t)},t.prototype._previewChanged=function(t){var e=t.value;if(this._rangeStrategy){var a=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t.event);this._previewStart=this._getCellCompareValue(a.start),this._previewEnd=this._getCellCompareValue(a.end),this._changeDetectorRef.detectChanges()}},t.prototype._initWeekdays=function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),a=this._dateAdapter.getDayOfWeekNames("long").map((function(t,a){return{long:t,narrow:e[a]}}));this._weekdays=a.slice(t).concat(a.slice(0,t))},t.prototype._createWeekCells=function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var a=0,n=this._firstWeekOffset;a<t;a++,n++){7==n&&(this._weeks.push([]),n=0);var r=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),a+1),i=this._shouldEnableDate(r),o=this._dateAdapter.format(r,this._dateFormats.display.dateA11yLabel),s=this.dateClass?this.dateClass(r):void 0;this._weeks[this._weeks.length-1].push(new D(a+1,e[a],o,i,s,this._getCellCompareValue(r),r))}},t.prototype._shouldEnableDate=function(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))},t.prototype._getDateInCurrentMonth=function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null},t.prototype._hasSameMonthAndYear=function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))},t.prototype._getCellCompareValue=function(t){if(t){var e=this._dateAdapter.getYear(t),a=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,a,n).getTime()}return null},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.prototype._setRanges=function(t){t instanceof S?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)},t}();B.decorators=[{type:i.Component,args:[{selector:"mat-month-view",template:'<table class="mat-calendar-table" role="presentation">\n <thead class="mat-calendar-table-header">\n <tr>\n <th scope="col" *ngFor="let day of _weekdays" [attr.aria-label]="day.long">{{day.narrow}}</th>\n </tr>\n <tr><th class="mat-calendar-table-header-divider" colspan="7" aria-hidden="true"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]="_monthLabel"\n [rows]="_weeks"\n [todayValue]="_todayDate!"\n [startValue]="_rangeStart!"\n [endValue]="_rangeEnd!"\n [comparisonStart]="_comparisonRangeStart"\n [comparisonEnd]="_comparisonRangeEnd"\n [previewStart]="_previewStart"\n [previewEnd]="_previewEnd"\n [isRange]="_isRange"\n [labelMinRequiredCells]="3"\n [activeCell]="_dateAdapter.getDate(activeDate) - 1"\n (selectedValueChange)="_dateSelected($event)"\n (previewChange)="_previewChanged($event)"\n (keydown)="_handleCalendarBodyKeydown($event)">\n </tbody>\n</table>\n',exportAs:"matMonthView",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],B.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:u.Directionality,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Inject,args:[j]},{type:i.Optional}]}]},B.propDecorators={activeDate:[{type:i.Input}],selected:[{type:i.Input}],minDate:[{type:i.Input}],maxDate:[{type:i.Input}],dateFilter:[{type:i.Input}],dateClass:[{type:i.Input}],comparisonStart:[{type:i.Input}],comparisonEnd:[{type:i.Input}],selectedChange:[{type:i.Output}],_userSelection:[{type:i.Output}],activeDateChange:[{type:i.Output}],_matCalendarBody:[{type:i.ViewChild,args:[C]}]};
|
|
53
|
+
/**
|
|
54
|
+
* @license
|
|
55
|
+
* Copyright Google LLC All Rights Reserved.
|
|
56
|
+
*
|
|
57
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
58
|
+
* found in the LICENSE file at https://angular.io/license
|
|
59
|
+
*/
|
|
60
|
+
var z=function(){function t(t,e,a){if(this._changeDetectorRef=t,this._dateAdapter=e,this._dir=a,this._rerenderSubscription=c.Subscription.EMPTY,this.selectedChange=new i.EventEmitter,this.yearSelected=new i.EventEmitter,this.activeDateChange=new i.EventEmitter,!this._dateAdapter)throw v("DateAdapter");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate,a=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),W(this._dateAdapter,e,this._activeDate,this.minDate,this.maxDate)||this._init()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof S?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(h.startWith(null)).subscribe((function(){return t._init()}))},t.prototype.ngOnDestroy=function(){this._rerenderSubscription.unsubscribe()},t.prototype._init=function(){var t=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var e=this._dateAdapter.getYear(this._activeDate)-H(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(var a=0,n=[];a<24;a++)n.push(e+a),4==n.length&&(this._years.push(n.map((function(e){return t._createCellForYear(e)}))),n=[]);this._changeDetectorRef.markForCheck()},t.prototype._yearSelected=function(t){var e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));var a=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,a,1));this.selectedChange.emit(this._dateAdapter.createDate(e,a,Math.min(this._dateAdapter.getDate(this.activeDate),n)))},t.prototype._handleCalendarBodyKeydown=function(t){var e=this._activeDate,a=this._isRtl();switch(t.keyCode){case p.LEFT_ARROW:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,a?1:-1);break;case p.RIGHT_ARROW:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,a?-1:1);break;case p.UP_ARROW:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case p.DOWN_ARROW:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case p.HOME:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-H(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case p.END:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-H(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case p.PAGE_UP:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case p.PAGE_DOWN:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case p.ENTER:case p.SPACE:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()},t.prototype._getActiveCell=function(){return H(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)},t.prototype._focusActiveCell=function(){this._matCalendarBody._focusActiveCell()},t.prototype._createCellForYear=function(t){var e=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return new D(t,e,e,this._shouldEnableYear(t))},t.prototype._shouldEnableYear=function(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(var e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.prototype._setSelectedYear=function(t){if(this._selectedYear=null,t instanceof S){var e=t.start||t.end;e&&(this._selectedYear=this._dateAdapter.getYear(e))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))},t}();function W(t,e,a,n,r){var i=t.getYear(e),o=t.getYear(a),s=G(t,n,r);return Math.floor((i-s)/24)===Math.floor((o-s)/24)}function H(t,e,a,n){return function r(t,e){return(t%e+e)%e}
|
|
61
|
+
/**
|
|
62
|
+
* @license
|
|
63
|
+
* Copyright Google LLC All Rights Reserved.
|
|
64
|
+
*
|
|
65
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
66
|
+
* found in the LICENSE file at https://angular.io/license
|
|
67
|
+
*/(t.getYear(e)-G(t,a,n),24)}function G(t,e,a){var n=0;return a?n=t.getYear(a)-24+1:e&&(n=t.getYear(e)),n}z.decorators=[{type:i.Component,args:[{selector:"mat-multi-year-view",template:'<table class="mat-calendar-table" role="presentation">\n <thead class="mat-calendar-table-header">\n <tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [rows]="_years"\n [todayValue]="_todayYear"\n [startValue]="_selectedYear!"\n [endValue]="_selectedYear!"\n [numCols]="4"\n [cellAspectRatio]="4 / 7"\n [activeCell]="_getActiveCell()"\n (selectedValueChange)="_yearSelected($event)"\n (keydown)="_handleCalendarBodyKeydown($event)">\n </tbody>\n</table>\n',exportAs:"matMultiYearView",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],z.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:u.Directionality,decorators:[{type:i.Optional}]}]},z.propDecorators={activeDate:[{type:i.Input}],selected:[{type:i.Input}],minDate:[{type:i.Input}],maxDate:[{type:i.Input}],dateFilter:[{type:i.Input}],selectedChange:[{type:i.Output}],yearSelected:[{type:i.Output}],activeDateChange:[{type:i.Output}],_matCalendarBody:[{type:i.ViewChild,args:[C]}]};var q=function(){function t(t,e,a,n){if(this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=a,this._dir=n,this._rerenderSubscription=c.Subscription.EMPTY,this.selectedChange=new i.EventEmitter,this.monthSelected=new i.EventEmitter,this.activeDateChange=new i.EventEmitter,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate,a=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),this._dateAdapter.getYear(e)!==this._dateAdapter.getYear(this._activeDate)&&this._init()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof S?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(h.startWith(null)).subscribe((function(){return t._init()}))},t.prototype.ngOnDestroy=function(){this._rerenderSubscription.unsubscribe()},t.prototype._monthSelected=function(t){var e=t.value,a=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(a);var n=this._dateAdapter.getNumDaysInMonth(a);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))},t.prototype._handleCalendarBodyKeydown=function(t){var e=this._activeDate,a=this._isRtl();switch(t.keyCode){case p.LEFT_ARROW:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,a?1:-1);break;case p.RIGHT_ARROW:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,a?-1:1);break;case p.UP_ARROW:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case p.DOWN_ARROW:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case p.HOME:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case p.END:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case p.PAGE_UP:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case p.PAGE_DOWN:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case p.ENTER:case p.SPACE:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()},t.prototype._init=function(){var t=this;this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);var e=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map((function(a){return a.map((function(a){return t._createCellForMonth(a,e[a])}))})),this._changeDetectorRef.markForCheck()},t.prototype._focusActiveCell=function(){this._matCalendarBody._focusActiveCell()},t.prototype._getMonthInCurrentYear=function(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null},t.prototype._createCellForMonth=function(t,e){var a=this._dateAdapter.format(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),this._dateFormats.display.monthYearA11yLabel);return new D(t,e.toLocaleUpperCase(),a,this._shouldEnableMonth(t))},t.prototype._shouldEnableMonth=function(t){var e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(var a=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(a)==t;a=this._dateAdapter.addCalendarDays(a,1))if(this.dateFilter(a))return!0;return!1},t.prototype._isYearAndMonthAfterMaxDate=function(t,e){if(this.maxDate){var a=this._dateAdapter.getYear(this.maxDate),n=this._dateAdapter.getMonth(this.maxDate);return t>a||t===a&&e>n}return!1},t.prototype._isYearAndMonthBeforeMinDate=function(t,e){if(this.minDate){var a=this._dateAdapter.getYear(this.minDate),n=this._dateAdapter.getMonth(this.minDate);return t<a||t===a&&e<n}return!1},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.prototype._setSelectedMonth=function(t){this._selectedMonth=t instanceof S?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)},t}();q.decorators=[{type:i.Component,args:[{selector:"mat-year-view",template:'<table class="mat-calendar-table" role="presentation">\n <thead class="mat-calendar-table-header">\n <tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]="_yearLabel"\n [rows]="_months"\n [todayValue]="_todayMonth!"\n [startValue]="_selectedMonth!"\n [endValue]="_selectedMonth!"\n [labelMinRequiredCells]="2"\n [numCols]="4"\n [cellAspectRatio]="4 / 7"\n [activeCell]="_dateAdapter.getMonth(activeDate)"\n (selectedValueChange)="_monthSelected($event)"\n (keydown)="_handleCalendarBodyKeydown($event)">\n </tbody>\n</table>\n',exportAs:"matYearView",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],q.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:u.Directionality,decorators:[{type:i.Optional}]}]},q.propDecorators={activeDate:[{type:i.Input}],selected:[{type:i.Input}],minDate:[{type:i.Input}],maxDate:[{type:i.Input}],dateFilter:[{type:i.Input}],selectedChange:[{type:i.Output}],monthSelected:[{type:i.Output}],activeDateChange:[{type:i.Output}],_matCalendarBody:[{type:i.ViewChild,args:[C]}]};
|
|
37
68
|
/**
|
|
38
69
|
* @license
|
|
39
70
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -41,28 +72,31 @@
|
|
|
41
72
|
* Use of this source code is governed by an MIT-style license that can be
|
|
42
73
|
* found in the LICENSE file at https://angular.io/license
|
|
43
74
|
*/
|
|
44
|
-
var S=function S(t,e){this.start=t,this.end=e},M=function(){function t(t,e){this.selection=t,this._adapter=e,this._selectionChanged=new c.Subject,this.selectionChanged=this._selectionChanged.asObservable(),this.selection=t}return t.prototype.updateSelection=function(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})},t.prototype.ngOnDestroy=function(){this._selectionChanged.complete()},t.prototype._isValidDateInstance=function(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)},t.decorators=[{type:i.Directive}],t.ctorParameters=function(){return[{type:void 0},{type:l.DateAdapter}]},t}(),R=function(t){function e(e){return t.call(this,null,e)||this}return E(e,t),e.prototype.add=function(e){t.prototype.updateSelection.call(this,e,this)},e.prototype.isValid=function(){return null!=this.selection&&this._isValidDateInstance(this.selection)},e.prototype.isComplete=function(){return null!=this.selection},e.decorators=[{type:i.Injectable}],e.ctorParameters=function(){return[{type:l.DateAdapter}]},e}(M),P=function(t){function e(e){return t.call(this,new S(null,null),e)||this}return E(e,t),e.prototype.add=function(e){var a=this.selection,n=a.start,r=a.end;null==n?n=e:null==r?r=e:(n=e,r=null),t.prototype.updateSelection.call(this,new S(n,r),this)},e.prototype.isValid=function(){var t=this.selection,e=t.start,a=t.end;return null==e&&null==a||(null!=e&&null!=a?this._isValidDateInstance(e)&&this._isValidDateInstance(a)&&this._adapter.compareDate(e,a)<=0:(null==e||this._isValidDateInstance(e))&&(null==a||this._isValidDateInstance(a)))},e.prototype.isComplete=function(){return null!=this.selection.start&&null!=this.selection.end},e.decorators=[{type:i.Injectable}],e.ctorParameters=function(){return[{type:l.DateAdapter}]},e}(M);function T(t,e){return t||new R(e)}var F={provide:M,deps:[[new i.Optional,new i.SkipSelf,M],l.DateAdapter],useFactory:T};function Y(t,e){return t||new P(e)}var N={provide:M,deps:[[new i.Optional,new i.SkipSelf,M],l.DateAdapter],useFactory:Y},j=new i.InjectionToken("MAT_DATE_RANGE_SELECTION_STRATEGY"),L=function(){function t(t){this._dateAdapter=t}return t.prototype.selectionFinished=function(t,e){var a=e.start,n=e.end;return null==a?a=t:null==n&&t&&this._dateAdapter.compareDate(t,a)>=0?n=t:(a=t,n=null),new S(a,n)},t.prototype.createPreview=function(t,e){var a=null,n=null;return e.start&&!e.end&&t&&(a=e.start,n=t),new S(a,n)},t.decorators=[{type:i.Injectable}],t.ctorParameters=function(){return[{type:l.DateAdapter}]},t}(),B=function(){function t(t,e,a,n,r){if(this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=a,this._dir=n,this._rangeStrategy=r,this._rerenderSubscription=c.Subscription.EMPTY,this.selectedChange=new i.EventEmitter,this._userSelection=new i.EventEmitter,this.activeDateChange=new i.EventEmitter,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate,a=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof S?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(h.startWith(null)).subscribe((function(){return t._init()}))},t.prototype.ngOnDestroy=function(){this._rerenderSubscription.unsubscribe()},t.prototype._dateSelected=function(t){var e,a,n=t.value,r=this._dateAdapter.getYear(this.activeDate),i=this._dateAdapter.getMonth(this.activeDate),o=this._dateAdapter.createDate(r,i,n);this._selected instanceof S?(e=this._getDateInCurrentMonth(this._selected.start),a=this._getDateInCurrentMonth(this._selected.end)):e=a=this._getDateInCurrentMonth(this._selected),e===n&&a===n||this.selectedChange.emit(o),this._userSelection.emit({value:o,event:t.event})},t.prototype._handleCalendarBodyKeydown=function(t){var e=this._activeDate,a=this._isRtl();switch(t.keyCode){case p.LEFT_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?1:-1);break;case p.RIGHT_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?-1:1);break;case p.UP_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case p.DOWN_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case p.HOME:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case p.END:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case p.PAGE_UP:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case p.PAGE_DOWN:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case p.ENTER:case p.SPACE:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case p.ESCAPE:return void(null!=this._previewEnd&&(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()},t.prototype._init=function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()},t.prototype._focusActiveCell=function(t){this._matCalendarBody._focusActiveCell(t)},t.prototype._previewChanged=function(t){var e=t.value;if(this._rangeStrategy){var a=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t.event);this._previewStart=this._getCellCompareValue(a.start),this._previewEnd=this._getCellCompareValue(a.end),this._changeDetectorRef.detectChanges()}},t.prototype._initWeekdays=function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),a=this._dateAdapter.getDayOfWeekNames("long").map((function(t,a){return{long:t,narrow:e[a]}}));this._weekdays=a.slice(t).concat(a.slice(0,t))},t.prototype._createWeekCells=function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var a=0,n=this._firstWeekOffset;a<t;a++,n++){7==n&&(this._weeks.push([]),n=0);var r=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),a+1),i=this._shouldEnableDate(r),o=this._dateAdapter.format(r,this._dateFormats.display.dateA11yLabel),s=this.dateClass?this.dateClass(r):void 0;this._weeks[this._weeks.length-1].push(new D(a+1,e[a],o,i,s,this._getCellCompareValue(r),r))}},t.prototype._shouldEnableDate=function(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))},t.prototype._getDateInCurrentMonth=function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null},t.prototype._hasSameMonthAndYear=function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))},t.prototype._getCellCompareValue=function(t){if(t){var e=this._dateAdapter.getYear(t),a=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,a,n).getTime()}return null},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.prototype._setRanges=function(t){t instanceof S?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)},t.decorators=[{type:i.Component,args:[{selector:"mat-month-view",template:'<table class="mat-calendar-table" role="presentation">\n <thead class="mat-calendar-table-header">\n <tr>\n <th scope="col" *ngFor="let day of _weekdays" [attr.aria-label]="day.long">{{day.narrow}}</th>\n </tr>\n <tr><th class="mat-calendar-table-header-divider" colspan="7" aria-hidden="true"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]="_monthLabel"\n [rows]="_weeks"\n [todayValue]="_todayDate!"\n [startValue]="_rangeStart!"\n [endValue]="_rangeEnd!"\n [comparisonStart]="_comparisonRangeStart"\n [comparisonEnd]="_comparisonRangeEnd"\n [previewStart]="_previewStart"\n [previewEnd]="_previewEnd"\n [isRange]="_isRange"\n [labelMinRequiredCells]="3"\n [activeCell]="_dateAdapter.getDate(activeDate) - 1"\n (selectedValueChange)="_dateSelected($event)"\n (previewChange)="_previewChanged($event)"\n (keydown)="_handleCalendarBodyKeydown($event)">\n </tbody>\n</table>\n',exportAs:"matMonthView",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:u.Directionality,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Inject,args:[j]},{type:i.Optional}]}]},t.propDecorators={activeDate:[{type:i.Input}],selected:[{type:i.Input}],minDate:[{type:i.Input}],maxDate:[{type:i.Input}],dateFilter:[{type:i.Input}],dateClass:[{type:i.Input}],comparisonStart:[{type:i.Input}],comparisonEnd:[{type:i.Input}],selectedChange:[{type:i.Output}],_userSelection:[{type:i.Output}],activeDateChange:[{type:i.Output}],_matCalendarBody:[{type:i.ViewChild,args:[C]}]},t}(),z=function(){function t(t,e,a){if(this._changeDetectorRef=t,this._dateAdapter=e,this._dir=a,this._rerenderSubscription=c.Subscription.EMPTY,this.selectedChange=new i.EventEmitter,this.yearSelected=new i.EventEmitter,this.activeDateChange=new i.EventEmitter,!this._dateAdapter)throw v("DateAdapter");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate,a=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),W(this._dateAdapter,e,this._activeDate,this.minDate,this.maxDate)||this._init()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof S?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(h.startWith(null)).subscribe((function(){return t._init()}))},t.prototype.ngOnDestroy=function(){this._rerenderSubscription.unsubscribe()},t.prototype._init=function(){var t=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var e=this._dateAdapter.getYear(this._activeDate)-H(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(var a=0,n=[];a<24;a++)n.push(e+a),4==n.length&&(this._years.push(n.map((function(e){return t._createCellForYear(e)}))),n=[]);this._changeDetectorRef.markForCheck()},t.prototype._yearSelected=function(t){var e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));var a=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,a,1));this.selectedChange.emit(this._dateAdapter.createDate(e,a,Math.min(this._dateAdapter.getDate(this.activeDate),n)))},t.prototype._handleCalendarBodyKeydown=function(t){var e=this._activeDate,a=this._isRtl();switch(t.keyCode){case p.LEFT_ARROW:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,a?1:-1);break;case p.RIGHT_ARROW:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,a?-1:1);break;case p.UP_ARROW:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case p.DOWN_ARROW:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case p.HOME:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-H(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case p.END:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-H(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case p.PAGE_UP:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case p.PAGE_DOWN:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case p.ENTER:case p.SPACE:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()},t.prototype._getActiveCell=function(){return H(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)},t.prototype._focusActiveCell=function(){this._matCalendarBody._focusActiveCell()},t.prototype._createCellForYear=function(t){var e=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return new D(t,e,e,this._shouldEnableYear(t))},t.prototype._shouldEnableYear=function(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(var e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.prototype._setSelectedYear=function(t){if(this._selectedYear=null,t instanceof S){var e=t.start||t.end;e&&(this._selectedYear=this._dateAdapter.getYear(e))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))},t.decorators=[{type:i.Component,args:[{selector:"mat-multi-year-view",template:'<table class="mat-calendar-table" role="presentation">\n <thead class="mat-calendar-table-header">\n <tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [rows]="_years"\n [todayValue]="_todayYear"\n [startValue]="_selectedYear!"\n [endValue]="_selectedYear!"\n [numCols]="4"\n [cellAspectRatio]="4 / 7"\n [activeCell]="_getActiveCell()"\n (selectedValueChange)="_yearSelected($event)"\n (keydown)="_handleCalendarBodyKeydown($event)">\n </tbody>\n</table>\n',exportAs:"matMultiYearView",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:u.Directionality,decorators:[{type:i.Optional}]}]},t.propDecorators={activeDate:[{type:i.Input}],selected:[{type:i.Input}],minDate:[{type:i.Input}],maxDate:[{type:i.Input}],dateFilter:[{type:i.Input}],selectedChange:[{type:i.Output}],yearSelected:[{type:i.Output}],activeDateChange:[{type:i.Output}],_matCalendarBody:[{type:i.ViewChild,args:[C]}]},t}();
|
|
75
|
+
var U=function(){function t(t,e,a,n,r){this._intl=t,this.calendar=e,this._dateAdapter=a,this._dateFormats=n,this.calendar.stateChanges.subscribe((function(){return r.markForCheck()}))}return Object.defineProperty(t.prototype,"periodButtonText",{get:function(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);var t=this._dateAdapter.getYear(this.calendar.activeDate)-H(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),e=t+24-1,a=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1)),n=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1));return this._intl.formatYearRange(a,n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"periodButtonLabel",{get:function(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prevButtonLabel",{get:function(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextButtonLabel",{get:function(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]},enumerable:!1,configurable:!0}),t.prototype.currentPeriodClicked=function(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"},t.prototype.previousClicked=function(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)},t.prototype.nextClicked=function(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)},t.prototype.previousEnabled=function(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)},t.prototype.nextEnabled=function(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)},t.prototype._isSameView=function(t,e){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):W(this._dateAdapter,t,e,this.calendar.minDate,this.calendar.maxDate)},t}();U.decorators=[{type:i.Component,args:[{selector:"mat-calendar-header",template:'<div class="mat-calendar-header">\n <div class="mat-calendar-controls">\n <button mat-button type="button" class="mat-calendar-period-button"\n (click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel"\n cdkAriaLive="polite">\n {{periodButtonText}}\n <div class="mat-calendar-arrow"\n [class.mat-calendar-invert]="calendar.currentView != \'month\'"></div>\n </button>\n\n <div class="mat-calendar-spacer"></div>\n\n <ng-content></ng-content>\n\n <button mat-icon-button type="button" class="mat-calendar-previous-button"\n [disabled]="!previousEnabled()" (click)="previousClicked()"\n [attr.aria-label]="prevButtonLabel">\n </button>\n\n <button mat-icon-button type="button" class="mat-calendar-next-button"\n [disabled]="!nextEnabled()" (click)="nextClicked()"\n [attr.aria-label]="nextButtonLabel">\n </button>\n </div>\n</div>\n',exportAs:"matCalendarHeader",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],U.ctorParameters=function(){return[{type:b},{type:K,decorators:[{type:i.Inject,args:[i.forwardRef((function(){return K}))]}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:i.ChangeDetectorRef}]};var K=function(){function t(t,e,a,n){var r=this;if(this._dateAdapter=e,this._dateFormats=a,this._changeDetectorRef=n,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new i.EventEmitter,this.yearSelected=new i.EventEmitter,this.monthSelected=new i.EventEmitter,this._userSelection=new i.EventEmitter,this.stateChanges=new c.Subject,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._intlChanges=t.changes.subscribe((function(){n.markForCheck(),r.stateChanges.next()}))}return Object.defineProperty(t.prototype,"startAt",{get:function(){return this._startAt},set:function(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof S?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._clampedActiveDate},set:function(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentView",{get:function(){return this._currentView},set:function(t){this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck()},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._calendarHeaderPortal=new n.ComponentPortal(this.headerComponent||U),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView},t.prototype.ngAfterViewChecked=function(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())},t.prototype.ngOnDestroy=function(){this._intlChanges.unsubscribe(),this.stateChanges.complete()},t.prototype.ngOnChanges=function(t){var e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){var a=this._getCurrentViewComponent();a&&(this._changeDetectorRef.detectChanges(),a._init())}this.stateChanges.next()},t.prototype.focusActiveCell=function(){this._getCurrentViewComponent()._focusActiveCell(!1)},t.prototype.updateTodaysDate=function(){var t=this.currentView;("month"===t?this.monthView:"year"===t?this.yearView:this.multiYearView)._init()},t.prototype._dateSelected=function(t){var e=t.value;(this.selected instanceof S||e&&!this._dateAdapter.sameDate(e,this.selected))&&this.selectedChange.emit(e),this._userSelection.emit(t)},t.prototype._yearSelectedInMultiYearView=function(t){this.yearSelected.emit(t)},t.prototype._monthSelectedInYearView=function(t){this.monthSelected.emit(t)},t.prototype._goToDateInView=function(t,e){this.activeDate=t,this.currentView=e},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._getCurrentViewComponent=function(){return this.monthView||this.yearView||this.multiYearView},t}();K.decorators=[{type:i.Component,args:[{selector:"mat-calendar",template:'<ng-template [cdkPortalOutlet]="_calendarHeaderPortal"></ng-template>\n\n<div class="mat-calendar-content" [ngSwitch]="currentView" cdkMonitorSubtreeFocus tabindex="-1">\n <mat-month-view\n *ngSwitchCase="\'month\'"\n [(activeDate)]="activeDate"\n [selected]="selected"\n [dateFilter]="dateFilter"\n [maxDate]="maxDate"\n [minDate]="minDate"\n [dateClass]="dateClass"\n [comparisonStart]="comparisonStart"\n [comparisonEnd]="comparisonEnd"\n (_userSelection)="_dateSelected($event)">\n </mat-month-view>\n\n <mat-year-view\n *ngSwitchCase="\'year\'"\n [(activeDate)]="activeDate"\n [selected]="selected"\n [dateFilter]="dateFilter"\n [maxDate]="maxDate"\n [minDate]="minDate"\n (monthSelected)="_monthSelectedInYearView($event)"\n (selectedChange)="_goToDateInView($event, \'month\')">\n </mat-year-view>\n\n <mat-multi-year-view\n *ngSwitchCase="\'multi-year\'"\n [(activeDate)]="activeDate"\n [selected]="selected"\n [dateFilter]="dateFilter"\n [maxDate]="maxDate"\n [minDate]="minDate"\n (yearSelected)="_yearSelectedInMultiYearView($event)"\n (selectedChange)="_goToDateInView($event, \'year\')">\n </mat-multi-year-view>\n</div>\n',host:{class:"mat-calendar"},exportAs:"matCalendar",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,providers:[F],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n']}]}],K.ctorParameters=function(){return[{type:b},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:i.ChangeDetectorRef}]},K.propDecorators={headerComponent:[{type:i.Input}],startAt:[{type:i.Input}],startView:[{type:i.Input}],selected:[{type:i.Input}],minDate:[{type:i.Input}],maxDate:[{type:i.Input}],dateFilter:[{type:i.Input}],dateClass:[{type:i.Input}],comparisonStart:[{type:i.Input}],comparisonEnd:[{type:i.Input}],selectedChange:[{type:i.Output}],yearSelected:[{type:i.Output}],monthSelected:[{type:i.Output}],_userSelection:[{type:i.Output}],monthView:[{type:i.ViewChild,args:[B]}],yearView:[{type:i.ViewChild,args:[q]}],multiYearView:[{type:i.ViewChild,args:[z]}]};
|
|
45
76
|
/**
|
|
46
77
|
* @license
|
|
47
78
|
* Copyright Google LLC All Rights Reserved.
|
|
48
79
|
*
|
|
49
80
|
* Use of this source code is governed by an MIT-style license that can be
|
|
50
81
|
* found in the LICENSE file at https://angular.io/license
|
|
51
|
-
*/
|
|
82
|
+
*/
|
|
83
|
+
var $={transformPanel:m.trigger("transformPanel",[m.state("void",m.style({opacity:0,transform:"scale(1, 0.8)"})),m.transition("void => enter",m.animate("120ms cubic-bezier(0, 0, 0.2, 1)",m.style({opacity:1,transform:"scale(1, 1)"}))),m.transition("* => void",m.animate("100ms linear",m.style({opacity:0})))]),fadeInCalendar:m.trigger("fadeInCalendar",[m.state("void",m.style({opacity:0})),m.state("enter",m.style({opacity:1})),m.transition("void => *",m.animate("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},X=0,Z=new i.InjectionToken("mat-datepicker-scroll-strategy");function J(t){return function(){return t.scrollStrategies.reposition()}}var Q={provide:Z,deps:[a.Overlay],useFactory:J},tt=function(t){function e(e,a,n,r,i){var o=t.call(this,e)||this;return o._changeDetectorRef=a,o._model=n,o._dateAdapter=r,o._rangeSelectionStrategy=i,o._subscriptions=new c.Subscription,o._animationState="enter",o._animationDone=new c.Subject,o}return E(e,t),e.prototype.ngAfterViewInit=function(){var t=this;this._changeDetectorRef&&this._subscriptions.add(this.datepicker._stateChanges.subscribe((function(){t._changeDetectorRef.markForCheck()}))),this._calendar.focusActiveCell()},e.prototype.ngOnDestroy=function(){this._subscriptions.unsubscribe(),this._animationDone.complete()},e.prototype._handleUserSelection=function(t){if(this._model&&this._dateAdapter){var e=this._model.selection,a=t.value,n=e instanceof S;if(n&&this._rangeSelectionStrategy){var r=this._rangeSelectionStrategy.selectionFinished(a,e,t.event);this._model.updateSelection(r,this)}else!a||!n&&this._dateAdapter.sameDate(a,e)||this._model.add(a)}this._model&&!this._model.isComplete()||this.datepicker.close()},e.prototype._startExitAnimation=function(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()},e.prototype._getSelected=function(){return this._model?this._model.selection:null},e}(l.mixinColor((function et(t){this._elementRef=t})));tt.decorators=[{type:i.Component,args:[{selector:"mat-datepicker-content",template:'<mat-calendar cdkTrapFocus\n [id]="datepicker.id"\n [ngClass]="datepicker.panelClass"\n [startAt]="datepicker.startAt"\n [startView]="datepicker.startView"\n [minDate]="datepicker._getMinDate()"\n [maxDate]="datepicker._getMaxDate()"\n [dateFilter]="datepicker._getDateFilter()"\n [headerComponent]="datepicker.calendarHeaderComponent"\n [selected]="_getSelected()"\n [dateClass]="datepicker.dateClass"\n [comparisonStart]="comparisonStart"\n [comparisonEnd]="comparisonEnd"\n [@fadeInCalendar]="\'enter\'"\n (yearSelected)="datepicker._selectYear($event)"\n (monthSelected)="datepicker._selectMonth($event)"\n (_userSelection)="_handleUserSelection($event)">\n</mat-calendar>\n',host:{class:"mat-datepicker-content","[@transformPanel]":"_animationState","(@transformPanel.done)":"_animationDone.next()","[class.mat-datepicker-content-touch]":"datepicker.touchUi"},animations:[$.transformPanel,$.fadeInCalendar],exportAs:"matDatepickerContent",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,inputs:["color"],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"]}]}],tt.ctorParameters=function(){return[{type:i.ElementRef},{type:i.ChangeDetectorRef},{type:M},{type:l.DateAdapter},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[j]}]}]},tt.propDecorators={_calendar:[{type:i.ViewChild,args:[K]}]};var at=function(){function t(t,e,a,n,r,o,s,d,l){if(this._dialog=t,this._overlay=e,this._ngZone=a,this._viewContainerRef=n,this._dateAdapter=o,this._dir=s,this._document=d,this._model=l,this._inputStateChanges=c.Subscription.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new i.EventEmitter,this.monthSelected=new i.EventEmitter,this.openedStream=new i.EventEmitter,this.closedStream=new i.EventEmitter,this._opened=!1,this.id="mat-datepicker-"+X++,this._focusedElementBeforeOpen=null,this._stateChanges=new c.Subject,!this._dateAdapter)throw v("DateAdapter");this._scrollStrategy=r}return Object.defineProperty(t.prototype,"startAt",{get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)},set:function(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color||(this._datepickerInput?this._datepickerInput.getThemePalette():void 0)},set:function(t){this._color=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"touchUi",{get:function(){return this._touchUi},set:function(t){this._touchUi=_.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled},set:function(t){var e=_.coerceBooleanProperty(t);e!==this._disabled&&(this._disabled=e,this._stateChanges.next(void 0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"opened",{get:function(){return this._opened},set:function(t){t?this.open():this.close()},enumerable:!1,configurable:!0}),t.prototype._getMinDate=function(){return this._datepickerInput&&this._datepickerInput.min},t.prototype._getMaxDate=function(){return this._datepickerInput&&this._datepickerInput.max},t.prototype._getDateFilter=function(){return this._datepickerInput&&this._datepickerInput.dateFilter},t.prototype.ngOnChanges=function(t){var e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)},t.prototype.ngOnDestroy=function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()},t.prototype.select=function(t){this._model.add(t)},t.prototype._selectYear=function(t){this.yearSelected.emit(t)},t.prototype._selectMonth=function(t){this.monthSelected.emit(t)},t.prototype._registerInput=function(t){var e=this;if(this._datepickerInput)throw Error("A MatDatepicker can only be associated with a single input.");return this._inputStateChanges.unsubscribe(),this._datepickerInput=t,this._inputStateChanges=t._stateChanges.subscribe((function(){return e._stateChanges.next(void 0)})),this._model},t.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this._datepickerInput)throw Error("Attempted to open an MatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}},t.prototype.close=function(){var t=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var e=this._popupComponentRef.instance;e._startExitAnimation(),e._animationDone.pipe(h.take(1)).subscribe((function(){return t._destroyPopup()}))}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var a=function(){t._opened&&(t._opened=!1,t.closedStream.emit(),t._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(a)):a()}},t.prototype._openAsDialog=function(){var t=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(tt,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe((function(){return t.close()})),this._forwardContentValues(this._dialogRef.componentInstance)},t.prototype._openAsPopup=function(){var t=this,e=new n.ComponentPortal(tt,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(e),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.asObservable().pipe(h.take(1)).subscribe((function(){t._popupRef.updatePosition()}))},t.prototype._forwardContentValues=function(t){t.datepicker=this,t.color=this.color},t.prototype._createPopup=function(){var t=this,e=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new a.OverlayConfig({positionStrategy:this._setConnectedPositions(e),hasBackdrop:!0,backdropClass:"mat-overlay-transparent-backdrop",direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),c.merge(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(h.filter((function(e){return e.keyCode===p.ESCAPE||t._datepickerInput&&e.altKey&&e.keyCode===p.UP_ARROW})))).subscribe((function(e){e&&e.preventDefault(),t.close()}))},t.prototype._destroyPopup=function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)},t.prototype._setConnectedPositions=function(t){var e="end"===this.xPosition?"end":"start",a="start"===e?"end":"start",n="above"===this.yPosition?"bottom":"top",r="top"===n?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:n},{originX:e,originY:n,overlayX:e,overlayY:r},{originX:a,originY:r,overlayX:a,overlayY:n},{originX:a,originY:n,overlayX:a,overlayY:r}])},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t}();at.decorators=[{type:i.Directive}],at.ctorParameters=function(){return[{type:s.MatDialog},{type:a.Overlay},{type:i.NgZone},{type:i.ViewContainerRef},{type:void 0,decorators:[{type:i.Inject,args:[Z]}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:u.Directionality,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[r.DOCUMENT]}]},{type:M}]},at.propDecorators={calendarHeaderComponent:[{type:i.Input}],startAt:[{type:i.Input}],startView:[{type:i.Input}],color:[{type:i.Input}],touchUi:[{type:i.Input}],disabled:[{type:i.Input}],xPosition:[{type:i.Input}],yPosition:[{type:i.Input}],yearSelected:[{type:i.Output}],monthSelected:[{type:i.Output}],panelClass:[{type:i.Input}],dateClass:[{type:i.Input}],openedStream:[{type:i.Output,args:["opened"]}],closedStream:[{type:i.Output,args:["closed"]}],opened:[{type:i.Input}]};var nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return E(e,t),e}(at);nt.decorators=[{type:i.Component,args:[{selector:"mat-datepicker",template:"",exportAs:"matDatepicker",changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,providers:[F]}]}];
|
|
52
84
|
/**
|
|
53
85
|
* @license
|
|
54
86
|
* Copyright Google LLC All Rights Reserved.
|
|
55
87
|
*
|
|
56
88
|
* Use of this source code is governed by an MIT-style license that can be
|
|
57
89
|
* found in the LICENSE file at https://angular.io/license
|
|
58
|
-
*/(t.getYear(e)-G(t,a,n),24)}function G(t,e,a){var n=0;return a?n=t.getYear(a)-24+1:e&&(n=t.getYear(e)),n}var q=function(){function t(t,e,a,n){if(this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=a,this._dir=n,this._rerenderSubscription=c.Subscription.EMPTY,this.selectedChange=new i.EventEmitter,this.monthSelected=new i.EventEmitter,this.activeDateChange=new i.EventEmitter,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate,a=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),this._dateAdapter.getYear(e)!==this._dateAdapter.getYear(this._activeDate)&&this._init()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof S?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(h.startWith(null)).subscribe((function(){return t._init()}))},t.prototype.ngOnDestroy=function(){this._rerenderSubscription.unsubscribe()},t.prototype._monthSelected=function(t){var e=t.value,a=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(a);var n=this._dateAdapter.getNumDaysInMonth(a);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))},t.prototype._handleCalendarBodyKeydown=function(t){var e=this._activeDate,a=this._isRtl();switch(t.keyCode){case p.LEFT_ARROW:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,a?1:-1);break;case p.RIGHT_ARROW:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,a?-1:1);break;case p.UP_ARROW:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case p.DOWN_ARROW:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case p.HOME:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case p.END:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case p.PAGE_UP:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case p.PAGE_DOWN:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case p.ENTER:case p.SPACE:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()},t.prototype._init=function(){var t=this;this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);var e=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map((function(a){return a.map((function(a){return t._createCellForMonth(a,e[a])}))})),this._changeDetectorRef.markForCheck()},t.prototype._focusActiveCell=function(){this._matCalendarBody._focusActiveCell()},t.prototype._getMonthInCurrentYear=function(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null},t.prototype._createCellForMonth=function(t,e){var a=this._dateAdapter.format(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),this._dateFormats.display.monthYearA11yLabel);return new D(t,e.toLocaleUpperCase(),a,this._shouldEnableMonth(t))},t.prototype._shouldEnableMonth=function(t){var e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(var a=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(a)==t;a=this._dateAdapter.addCalendarDays(a,1))if(this.dateFilter(a))return!0;return!1},t.prototype._isYearAndMonthAfterMaxDate=function(t,e){if(this.maxDate){var a=this._dateAdapter.getYear(this.maxDate),n=this._dateAdapter.getMonth(this.maxDate);return t>a||t===a&&e>n}return!1},t.prototype._isYearAndMonthBeforeMinDate=function(t,e){if(this.minDate){var a=this._dateAdapter.getYear(this.minDate),n=this._dateAdapter.getMonth(this.minDate);return t<a||t===a&&e<n}return!1},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.prototype._setSelectedMonth=function(t){this._selectedMonth=t instanceof S?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)},t.decorators=[{type:i.Component,args:[{selector:"mat-year-view",template:'<table class="mat-calendar-table" role="presentation">\n <thead class="mat-calendar-table-header">\n <tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]="_yearLabel"\n [rows]="_months"\n [todayValue]="_todayMonth!"\n [startValue]="_selectedMonth!"\n [endValue]="_selectedMonth!"\n [labelMinRequiredCells]="2"\n [numCols]="4"\n [cellAspectRatio]="4 / 7"\n [activeCell]="_dateAdapter.getMonth(activeDate)"\n (selectedValueChange)="_monthSelected($event)"\n (keydown)="_handleCalendarBodyKeydown($event)">\n </tbody>\n</table>\n',exportAs:"matYearView",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:u.Directionality,decorators:[{type:i.Optional}]}]},t.propDecorators={activeDate:[{type:i.Input}],selected:[{type:i.Input}],minDate:[{type:i.Input}],maxDate:[{type:i.Input}],dateFilter:[{type:i.Input}],selectedChange:[{type:i.Output}],monthSelected:[{type:i.Output}],activeDateChange:[{type:i.Output}],_matCalendarBody:[{type:i.ViewChild,args:[C]}]},t}(),U=function(){function t(t,e,a,n,r){this._intl=t,this.calendar=e,this._dateAdapter=a,this._dateFormats=n,this.calendar.stateChanges.subscribe((function(){return r.markForCheck()}))}return Object.defineProperty(t.prototype,"periodButtonText",{get:function(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);var t=this._dateAdapter.getYear(this.calendar.activeDate)-H(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),e=t+24-1,a=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1)),n=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1));return this._intl.formatYearRange(a,n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"periodButtonLabel",{get:function(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prevButtonLabel",{get:function(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextButtonLabel",{get:function(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]},enumerable:!1,configurable:!0}),t.prototype.currentPeriodClicked=function(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"},t.prototype.previousClicked=function(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)},t.prototype.nextClicked=function(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)},t.prototype.previousEnabled=function(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)},t.prototype.nextEnabled=function(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)},t.prototype._isSameView=function(t,e){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):W(this._dateAdapter,t,e,this.calendar.minDate,this.calendar.maxDate)},t.decorators=[{type:i.Component,args:[{selector:"mat-calendar-header",template:'<div class="mat-calendar-header">\n <div class="mat-calendar-controls">\n <button mat-button type="button" class="mat-calendar-period-button"\n (click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel"\n cdkAriaLive="polite">\n {{periodButtonText}}\n <div class="mat-calendar-arrow"\n [class.mat-calendar-invert]="calendar.currentView != \'month\'"></div>\n </button>\n\n <div class="mat-calendar-spacer"></div>\n\n <ng-content></ng-content>\n\n <button mat-icon-button type="button" class="mat-calendar-previous-button"\n [disabled]="!previousEnabled()" (click)="previousClicked()"\n [attr.aria-label]="prevButtonLabel">\n </button>\n\n <button mat-icon-button type="button" class="mat-calendar-next-button"\n [disabled]="!nextEnabled()" (click)="nextClicked()"\n [attr.aria-label]="nextButtonLabel">\n </button>\n </div>\n</div>\n',exportAs:"matCalendarHeader",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:b},{type:K,decorators:[{type:i.Inject,args:[i.forwardRef((function(){return K}))]}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:i.ChangeDetectorRef}]},t}(),K=function(){function t(t,e,a,n){var r=this;if(this._dateAdapter=e,this._dateFormats=a,this._changeDetectorRef=n,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new i.EventEmitter,this.yearSelected=new i.EventEmitter,this.monthSelected=new i.EventEmitter,this._userSelection=new i.EventEmitter,this.stateChanges=new c.Subject,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._intlChanges=t.changes.subscribe((function(){n.markForCheck(),r.stateChanges.next()}))}return Object.defineProperty(t.prototype,"startAt",{get:function(){return this._startAt},set:function(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof S?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._clampedActiveDate},set:function(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentView",{get:function(){return this._currentView},set:function(t){this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck()},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._calendarHeaderPortal=new n.ComponentPortal(this.headerComponent||U),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView},t.prototype.ngAfterViewChecked=function(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())},t.prototype.ngOnDestroy=function(){this._intlChanges.unsubscribe(),this.stateChanges.complete()},t.prototype.ngOnChanges=function(t){var e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){var a=this._getCurrentViewComponent();a&&(this._changeDetectorRef.detectChanges(),a._init())}this.stateChanges.next()},t.prototype.focusActiveCell=function(){this._getCurrentViewComponent()._focusActiveCell(!1)},t.prototype.updateTodaysDate=function(){var t=this.currentView;("month"===t?this.monthView:"year"===t?this.yearView:this.multiYearView)._init()},t.prototype._dateSelected=function(t){var e=t.value;(this.selected instanceof S||e&&!this._dateAdapter.sameDate(e,this.selected))&&this.selectedChange.emit(e),this._userSelection.emit(t)},t.prototype._yearSelectedInMultiYearView=function(t){this.yearSelected.emit(t)},t.prototype._monthSelectedInYearView=function(t){this.monthSelected.emit(t)},t.prototype._goToDateInView=function(t,e){this.activeDate=t,this.currentView=e},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._getCurrentViewComponent=function(){return this.monthView||this.yearView||this.multiYearView},t.decorators=[{type:i.Component,args:[{selector:"mat-calendar",template:'<ng-template [cdkPortalOutlet]="_calendarHeaderPortal"></ng-template>\n\n<div class="mat-calendar-content" [ngSwitch]="currentView" cdkMonitorSubtreeFocus tabindex="-1">\n <mat-month-view\n *ngSwitchCase="\'month\'"\n [(activeDate)]="activeDate"\n [selected]="selected"\n [dateFilter]="dateFilter"\n [maxDate]="maxDate"\n [minDate]="minDate"\n [dateClass]="dateClass"\n [comparisonStart]="comparisonStart"\n [comparisonEnd]="comparisonEnd"\n (_userSelection)="_dateSelected($event)">\n </mat-month-view>\n\n <mat-year-view\n *ngSwitchCase="\'year\'"\n [(activeDate)]="activeDate"\n [selected]="selected"\n [dateFilter]="dateFilter"\n [maxDate]="maxDate"\n [minDate]="minDate"\n (monthSelected)="_monthSelectedInYearView($event)"\n (selectedChange)="_goToDateInView($event, \'month\')">\n </mat-year-view>\n\n <mat-multi-year-view\n *ngSwitchCase="\'multi-year\'"\n [(activeDate)]="activeDate"\n [selected]="selected"\n [dateFilter]="dateFilter"\n [maxDate]="maxDate"\n [minDate]="minDate"\n (yearSelected)="_yearSelectedInMultiYearView($event)"\n (selectedChange)="_goToDateInView($event, \'year\')">\n </mat-multi-year-view>\n</div>\n',host:{class:"mat-calendar"},exportAs:"matCalendar",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,providers:[F],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n']}]}],t.ctorParameters=function(){return[{type:b},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:i.ChangeDetectorRef}]},t.propDecorators={headerComponent:[{type:i.Input}],startAt:[{type:i.Input}],startView:[{type:i.Input}],selected:[{type:i.Input}],minDate:[{type:i.Input}],maxDate:[{type:i.Input}],dateFilter:[{type:i.Input}],dateClass:[{type:i.Input}],comparisonStart:[{type:i.Input}],comparisonEnd:[{type:i.Input}],selectedChange:[{type:i.Output}],yearSelected:[{type:i.Output}],monthSelected:[{type:i.Output}],_userSelection:[{type:i.Output}],monthView:[{type:i.ViewChild,args:[B]}],yearView:[{type:i.ViewChild,args:[q]}],multiYearView:[{type:i.ViewChild,args:[z]}]},t}(),$={transformPanel:m.trigger("transformPanel",[m.state("void",m.style({opacity:0,transform:"scale(1, 0.8)"})),m.transition("void => enter",m.animate("120ms cubic-bezier(0, 0, 0.2, 1)",m.style({opacity:1,transform:"scale(1, 1)"}))),m.transition("* => void",m.animate("100ms linear",m.style({opacity:0})))]),fadeInCalendar:m.trigger("fadeInCalendar",[m.state("void",m.style({opacity:0})),m.state("enter",m.style({opacity:1})),m.transition("void => *",m.animate("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},X=0,Z=new i.InjectionToken("mat-datepicker-scroll-strategy");
|
|
90
|
+
*/
|
|
91
|
+
var rt=function rt(t,e){this.target=t,this.targetElement=e,this.value=this.target.value},it=function(){function t(t,e,a){var n=this;if(this._elementRef=t,this._dateAdapter=e,this._dateFormats=a,this.dateChange=new i.EventEmitter,this.dateInput=new i.EventEmitter,this._valueChange=new i.EventEmitter,this._stateChanges=new c.Subject,this._onTouched=function(){},this._validatorOnChange=function(){},this._cvaOnChange=function(){},this._valueChangesSubscription=c.Subscription.EMPTY,this._localeSubscription=c.Subscription.EMPTY,this._parseValidator=function(){return n._lastValueValid?null:{matDatepickerParse:{text:n._elementRef.nativeElement.value}}},this._filterValidator=function(t){var e=n._getValidDateOrNull(n._dateAdapter.deserialize(t.value)),a=n._getDateFilter();return a&&e&&!a(e)?{matDatepickerFilter:!0}:null},this._minValidator=function(t){var e=n._getValidDateOrNull(n._dateAdapter.deserialize(t.value)),a=n._getMinDate();return!a||!e||n._dateAdapter.compareDate(a,e)<=0?null:{matDatepickerMin:{min:a,actual:e}}},this._maxValidator=function(t){var e=n._getValidDateOrNull(n._dateAdapter.deserialize(t.value)),a=n._getMaxDate();return!a||!e||n._dateAdapter.compareDate(a,e)>=0?null:{matDatepickerMax:{max:a,actual:e}}},this._lastValueValid=!1,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._localeSubscription=e.localeChanges.subscribe((function(){n.value=n.value}))}return Object.defineProperty(t.prototype,"value",{get:function(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue},set:function(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._getValidDateOrNull(t);var e=this.value;this._assignValue(t),this._formatValue(t),this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return!!this._disabled||this._parentDisabled()},set:function(t){var e=_.coerceBooleanProperty(t),a=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this._stateChanges.next(void 0)),e&&this._isInitialized&&a.blur&&a.blur()},enumerable:!1,configurable:!0}),t.prototype._getValidators=function(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]},t.prototype._registerModel=function(t){var e=this;this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe((function(t){if(t.source!==e){var a=e._getValueFromModel(t.selection);e._lastValueValid=e._isValidValue(a),e._cvaOnChange(a),e._onTouched(),e._formatValue(a),e._canEmitChangeEvent(t)&&(e.dateInput.emit(new rt(e,e._elementRef.nativeElement)),e.dateChange.emit(new rt(e,e._elementRef.nativeElement))),e._outsideValueChanged&&e._outsideValueChanged()}}))},t.prototype.ngAfterViewInit=function(){this._isInitialized=!0},t.prototype.ngOnChanges=function(){this._stateChanges.next(void 0)},t.prototype.ngOnDestroy=function(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this._stateChanges.complete()},t.prototype.registerOnValidatorChange=function(t){this._validatorOnChange=t},t.prototype.validate=function(t){return this._validator?this._validator(t):null},t.prototype.writeValue=function(t){this.value=t},t.prototype.registerOnChange=function(t){this._cvaOnChange=t},t.prototype.registerOnTouched=function(t){this._onTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype._onKeydown=function(t){t.altKey&&t.keyCode===p.DOWN_ARROW&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())},t.prototype._onInput=function(t){var e=this._lastValueValid,a=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(a),a=this._getValidDateOrNull(a),this._dateAdapter.sameDate(a,this.value)?(t&&!this.value&&this._cvaOnChange(a),e!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(a),this._cvaOnChange(a),this._valueChange.emit(a),this.dateInput.emit(new rt(this,this._elementRef.nativeElement)))},t.prototype._onChange=function(){this.dateChange.emit(new rt(this,this._elementRef.nativeElement))},t.prototype._onBlur=function(){this.value&&this._formatValue(this.value),this._onTouched()},t.prototype._formatValue=function(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._assignValue=function(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t},t.prototype._isValidValue=function(t){return!t||this._dateAdapter.isValid(t)},t.prototype._parentDisabled=function(){return!1},t}();it.decorators=[{type:i.Directive}],it.ctorParameters=function(){return[{type:i.ElementRef},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]}]},it.propDecorators={value:[{type:i.Input}],disabled:[{type:i.Input}],dateChange:[{type:i.Output}],dateInput:[{type:i.Output}]};var ot,st={provide:g.NG_VALUE_ACCESSOR,useExisting:i.forwardRef((function(){return lt})),multi:!0},dt={provide:g.NG_VALIDATORS,useExisting:i.forwardRef((function(){return lt})),multi:!0},lt=function(t){function e(e,a,n,r){var i=t.call(this,e,a,n)||this;return i._formField=r,i._validator=g.Validators.compose(t.prototype._getValidators.call(i)),i}return E(e,t),Object.defineProperty(e.prototype,"matDatepicker",{set:function(t){t&&(this._datepicker=t,this._registerModel(t._registerInput(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(t){this._min=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(t){this._max=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(t){this._dateFilter=t,this._validatorOnChange()},enumerable:!1,configurable:!0}),e.prototype.getConnectedOverlayOrigin=function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef},e.prototype.getThemePalette=function(){return this._formField?this._formField.color:void 0},e.prototype.getStartValue=function(){return this.value},e.prototype.getPopupConnectionElementRef=function(){return this.getConnectedOverlayOrigin()},e.prototype._openPopup=function(){this._datepicker&&this._datepicker.open()},e.prototype._getValueFromModel=function(t){return t},e.prototype._assignValueToModel=function(t){this._model&&this._model.updateSelection(t,this)},e.prototype._getMinDate=function(){return this._min},e.prototype._getMaxDate=function(){return this._max},e.prototype._getDateFilter=function(){return this._dateFilter},e.prototype._canEmitChangeEvent=function(){return!0},e}(it);lt.decorators=[{type:i.Directive,args:[{selector:"input[matDatepicker]",providers:[st,dt,{provide:f.MAT_INPUT_VALUE_ACCESSOR,useExisting:lt}],host:{"[attr.aria-haspopup]":'_datepicker ? "dialog" : null',"[attr.aria-owns]":"(_datepicker?.opened && _datepicker.id) || null","[attr.min]":"min ? _dateAdapter.toIso8601(min) : null","[attr.max]":"max ? _dateAdapter.toIso8601(max) : null","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(blur)":"_onBlur()","(keydown)":"_onKeydown($event)"},exportAs:"matDatepickerInput"}]}],lt.ctorParameters=function(){return[{type:i.ElementRef},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:y.MatFormField,decorators:[{type:i.Optional},{type:i.Inject,args:[y.MAT_FORM_FIELD]}]}]},lt.propDecorators={matDatepicker:[{type:i.Input}],min:[{type:i.Input}],max:[{type:i.Input}],dateFilter:[{type:i.Input,args:["matDatepickerFilter"]}]},(ot=function ot(){}).decorators=[{type:i.Directive,args:[{selector:"[matDatepickerToggleIcon]"}]}];var ct=function(){function t(t,e,a){this._intl=t,this._changeDetectorRef=e,this._stateChanges=c.Subscription.EMPTY;var n=Number(a);this.tabIndex=n||0===n?n:null}return Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled},set:function(t){this._disabled=_.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){t.datepicker&&this._watchStateChanges()},t.prototype.ngOnDestroy=function(){this._stateChanges.unsubscribe()},t.prototype.ngAfterContentInit=function(){this._watchStateChanges()},t.prototype._open=function(t){this.datepicker&&!this.disabled&&(this.datepicker.open(),t.stopPropagation())},t.prototype._watchStateChanges=function(){var t=this,e=this.datepicker?this.datepicker._stateChanges:c.of(),a=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput._stateChanges:c.of(),n=this.datepicker?c.merge(this.datepicker.openedStream,this.datepicker.closedStream):c.of();this._stateChanges.unsubscribe(),this._stateChanges=c.merge(this._intl.changes,e,a,n).subscribe((function(){return t._changeDetectorRef.markForCheck()}))},t}();ct.decorators=[{type:i.Component,args:[{selector:"mat-datepicker-toggle",template:'<button\n #button\n mat-icon-button\n type="button"\n [attr.aria-haspopup]="datepicker ? \'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 <svg\n *ngIf="!_customIcon"\n class="mat-datepicker-toggle-default-icon"\n viewBox="0 0 24 24"\n width="24px"\n height="24px"\n fill="currentColor"\n focusable="false">\n <path 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\n <ng-content select="[matDatepickerToggleIcon]"></ng-content>\n</button>\n',host:{class:"mat-datepicker-toggle","[attr.tabindex]":"disabled ? null : -1","[class.mat-datepicker-toggle-active]":"datepicker && datepicker.opened","[class.mat-accent]":'datepicker && datepicker.color === "accent"',"[class.mat-warn]":'datepicker && datepicker.color === "warn"',"(focus)":"_button.focus()"},exportAs:"matDatepickerToggle",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-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 .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"]}]}],ct.ctorParameters=function(){return[{type:b},{type:i.ChangeDetectorRef},{type:String,decorators:[{type:i.Attribute,args:["tabindex"]}]}]},ct.propDecorators={datepicker:[{type:i.Input,args:["for"]}],tabIndex:[{type:i.Input}],disabled:[{type:i.Input}],disableRipple:[{type:i.Input}],_customIcon:[{type:i.ContentChild,args:[ot]}],_button:[{type:i.ViewChild,args:["button"]}]};var pt=new i.InjectionToken("MAT_DATE_RANGE_INPUT_PARENT"),ut=function(t){function e(e,a,n,r,i,o,s,d){var l=t.call(this,a,s,d)||this;return l._rangeInput=e,l._defaultErrorStateMatcher=n,l._injector=r,l._parentForm=i,l._parentFormGroup=o,l._outsideValueChanged=function(){l._validatorOnChange()},l}return E(e,t),e.prototype.ngOnInit=function(){var t=this._injector.get(g.NgControl,null,i.InjectFlags.Self);t&&(this.ngControl=t)},e.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},e.prototype.isEmpty=function(){return 0===this._elementRef.nativeElement.value.length},e.prototype._getPlaceholder=function(){return this._elementRef.nativeElement.placeholder},e.prototype.focus=function(){this._elementRef.nativeElement.focus()},e.prototype._onInput=function(e){t.prototype._onInput.call(this,e),this._rangeInput._handleChildValueChange()},e.prototype._openPopup=function(){this._rangeInput._openDatepicker()},e.prototype._getMinDate=function(){return this._rangeInput.min},e.prototype._getMaxDate=function(){return this._rangeInput.max},e.prototype._getDateFilter=function(){return this._rangeInput.dateFilter},e.prototype._parentDisabled=function(){return this._rangeInput._groupDisabled},e}(it);ut.decorators=[{type:i.Directive}],ut.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.Inject,args:[pt]}]},{type:i.ElementRef},{type:l.ErrorStateMatcher},{type:i.Injector},{type:g.NgForm,decorators:[{type:i.Optional}]},{type:g.FormGroupDirective,decorators:[{type:i.Optional}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]}]};var ht=l.mixinErrorState(ut),_t=function(t){function e(e,a,n,r,i,o,s,d){var l=t.call(this,e,a,n,r,i,o,s,d)||this;return l._startValidator=function(t){var e=l._getValidDateOrNull(l._dateAdapter.deserialize(t.value)),a=l._model?l._model.selection.end:null;return!e||!a||l._dateAdapter.compareDate(e,a)<=0?null:{matStartDateInvalid:{end:a,actual:e}}},l._validator=g.Validators.compose(x(t.prototype._getValidators.call(l),[l._startValidator])),l._canEmitChangeEvent=function(t){return t.source!==l._rangeInput._endInput},l}return E(e,t),e.prototype._getValueFromModel=function(t){return t.start},e.prototype._assignValueToModel=function(t){if(this._model){var e=new S(t,this._model.selection.end);this._model.updateSelection(e,this),this._cvaOnChange(t)}},e.prototype._formatValue=function(e){t.prototype._formatValue.call(this,e),this._rangeInput._handleChildValueChange()},e.prototype.getMirrorValue=function(){var t=this._elementRef.nativeElement,e=t.value;return e.length>0?e:t.placeholder},e}(ht);_t.decorators=[{type:i.Directive,args:[{selector:"input[matStartDate]",host:{class:"mat-date-range-input-inner","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(keydown)":"_onKeydown($event)","[attr.id]":"_rangeInput.id","[attr.aria-haspopup]":'_rangeInput.rangePicker ? "dialog" : null',"[attr.aria-owns]":"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null","[attr.min]":"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null","[attr.max]":"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null","(blur)":"_onBlur()",type:"text"},providers:[{provide:g.NG_VALUE_ACCESSOR,useExisting:_t,multi:!0},{provide:g.NG_VALIDATORS,useExisting:_t,multi:!0}]}]}],_t.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.Inject,args:[pt]}]},{type:i.ElementRef},{type:l.ErrorStateMatcher},{type:i.Injector},{type:g.NgForm,decorators:[{type:i.Optional}]},{type:g.FormGroupDirective,decorators:[{type:i.Optional}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]}]};var mt=function(t){function e(e,a,n,r,i,o,s,d){var l=t.call(this,e,a,n,r,i,o,s,d)||this;return l._endValidator=function(t){var e=l._getValidDateOrNull(l._dateAdapter.deserialize(t.value)),a=l._model?l._model.selection.start:null;return!e||!a||l._dateAdapter.compareDate(e,a)>=0?null:{matEndDateInvalid:{start:a,actual:e}}},l._validator=g.Validators.compose(x(t.prototype._getValidators.call(l),[l._endValidator])),l._canEmitChangeEvent=function(t){return t.source!==l._rangeInput._startInput},l}return E(e,t),e.prototype._getValueFromModel=function(t){return t.end},e.prototype._assignValueToModel=function(t){if(this._model){var e=new S(this._model.selection.start,t);this._model.updateSelection(e,this),this._cvaOnChange(t)}},e.prototype._onKeydown=function(e){e.keyCode!==p.BACKSPACE||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),t.prototype._onKeydown.call(this,e)},e}(ht);mt.decorators=[{type:i.Directive,args:[{selector:"input[matEndDate]",host:{class:"mat-date-range-input-inner","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(keydown)":"_onKeydown($event)","[attr.aria-haspopup]":'_rangeInput.rangePicker ? "dialog" : null',"[attr.aria-owns]":"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null","[attr.min]":"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null","[attr.max]":"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null","(blur)":"_onBlur()",type:"text"},providers:[{provide:g.NG_VALUE_ACCESSOR,useExisting:mt,multi:!0},{provide:g.NG_VALIDATORS,useExisting:mt,multi:!0}]}]}],mt.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.Inject,args:[pt]}]},{type:i.ElementRef},{type:l.ErrorStateMatcher},{type:i.Injector},{type:g.NgForm,decorators:[{type:i.Optional}]},{type:g.FormGroupDirective,decorators:[{type:i.Optional}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]}]};
|
|
59
92
|
/**
|
|
60
93
|
* @license
|
|
61
94
|
* Copyright Google LLC All Rights Reserved.
|
|
62
95
|
*
|
|
63
96
|
* Use of this source code is governed by an MIT-style license that can be
|
|
64
97
|
* found in the LICENSE file at https://angular.io/license
|
|
65
|
-
*/function J(t){return function(){return t.scrollStrategies.reposition()}}var Q={provide:Z,deps:[a.Overlay],useFactory:J},tt=function(t){function e(e,a,n,r,i){var o=t.call(this,e)||this;return o._changeDetectorRef=a,o._model=n,o._dateAdapter=r,o._rangeSelectionStrategy=i,o._subscriptions=new c.Subscription,o._animationState="enter",o._animationDone=new c.Subject,o}return E(e,t),e.prototype.ngAfterViewInit=function(){var t=this;this._changeDetectorRef&&this._subscriptions.add(this.datepicker._stateChanges.subscribe((function(){t._changeDetectorRef.markForCheck()}))),this._calendar.focusActiveCell()},e.prototype.ngOnDestroy=function(){this._subscriptions.unsubscribe(),this._animationDone.complete()},e.prototype._handleUserSelection=function(t){if(this._model&&this._dateAdapter){var e=this._model.selection,a=t.value,n=e instanceof S;if(n&&this._rangeSelectionStrategy){var r=this._rangeSelectionStrategy.selectionFinished(a,e,t.event);this._model.updateSelection(r,this)}else!a||!n&&this._dateAdapter.sameDate(a,e)||this._model.add(a)}this._model&&!this._model.isComplete()||this.datepicker.close()},e.prototype._startExitAnimation=function(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()},e.prototype._getSelected=function(){return this._model?this._model.selection:null},e.decorators=[{type:i.Component,args:[{selector:"mat-datepicker-content",template:'<mat-calendar cdkTrapFocus\n [id]="datepicker.id"\n [ngClass]="datepicker.panelClass"\n [startAt]="datepicker.startAt"\n [startView]="datepicker.startView"\n [minDate]="datepicker._getMinDate()"\n [maxDate]="datepicker._getMaxDate()"\n [dateFilter]="datepicker._getDateFilter()"\n [headerComponent]="datepicker.calendarHeaderComponent"\n [selected]="_getSelected()"\n [dateClass]="datepicker.dateClass"\n [comparisonStart]="comparisonStart"\n [comparisonEnd]="comparisonEnd"\n [@fadeInCalendar]="\'enter\'"\n (yearSelected)="datepicker._selectYear($event)"\n (monthSelected)="datepicker._selectMonth($event)"\n (_userSelection)="_handleUserSelection($event)">\n</mat-calendar>\n',host:{class:"mat-datepicker-content","[@transformPanel]":"_animationState","(@transformPanel.done)":"_animationDone.next()","[class.mat-datepicker-content-touch]":"datepicker.touchUi"},animations:[$.transformPanel,$.fadeInCalendar],exportAs:"matDatepickerContent",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,inputs:["color"],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"]}]}],e.ctorParameters=function(){return[{type:i.ElementRef},{type:i.ChangeDetectorRef},{type:M},{type:l.DateAdapter},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[j]}]}]},e.propDecorators={_calendar:[{type:i.ViewChild,args:[K]}]},e}(l.mixinColor((function et(t){this._elementRef=t}))),at=function(){function t(t,e,a,n,r,o,s,d,l){if(this._dialog=t,this._overlay=e,this._ngZone=a,this._viewContainerRef=n,this._dateAdapter=o,this._dir=s,this._document=d,this._model=l,this._inputStateChanges=c.Subscription.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new i.EventEmitter,this.monthSelected=new i.EventEmitter,this.openedStream=new i.EventEmitter,this.closedStream=new i.EventEmitter,this._opened=!1,this.id="mat-datepicker-"+X++,this._focusedElementBeforeOpen=null,this._stateChanges=new c.Subject,!this._dateAdapter)throw v("DateAdapter");this._scrollStrategy=r}return Object.defineProperty(t.prototype,"startAt",{get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)},set:function(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color||(this._datepickerInput?this._datepickerInput.getThemePalette():void 0)},set:function(t){this._color=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"touchUi",{get:function(){return this._touchUi},set:function(t){this._touchUi=_.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled},set:function(t){var e=_.coerceBooleanProperty(t);e!==this._disabled&&(this._disabled=e,this._stateChanges.next(void 0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"opened",{get:function(){return this._opened},set:function(t){t?this.open():this.close()},enumerable:!1,configurable:!0}),t.prototype._getMinDate=function(){return this._datepickerInput&&this._datepickerInput.min},t.prototype._getMaxDate=function(){return this._datepickerInput&&this._datepickerInput.max},t.prototype._getDateFilter=function(){return this._datepickerInput&&this._datepickerInput.dateFilter},t.prototype.ngOnChanges=function(t){var e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)},t.prototype.ngOnDestroy=function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()},t.prototype.select=function(t){this._model.add(t)},t.prototype._selectYear=function(t){this.yearSelected.emit(t)},t.prototype._selectMonth=function(t){this.monthSelected.emit(t)},t.prototype._registerInput=function(t){var e=this;if(this._datepickerInput)throw Error("A MatDatepicker can only be associated with a single input.");return this._inputStateChanges.unsubscribe(),this._datepickerInput=t,this._inputStateChanges=t._stateChanges.subscribe((function(){return e._stateChanges.next(void 0)})),this._model},t.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this._datepickerInput)throw Error("Attempted to open an MatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}},t.prototype.close=function(){var t=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var e=this._popupComponentRef.instance;e._startExitAnimation(),e._animationDone.pipe(h.take(1)).subscribe((function(){return t._destroyPopup()}))}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var a=function(){t._opened&&(t._opened=!1,t.closedStream.emit(),t._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(a)):a()}},t.prototype._openAsDialog=function(){var t=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(tt,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe((function(){return t.close()})),this._forwardContentValues(this._dialogRef.componentInstance)},t.prototype._openAsPopup=function(){var t=this,e=new n.ComponentPortal(tt,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(e),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.asObservable().pipe(h.take(1)).subscribe((function(){t._popupRef.updatePosition()}))},t.prototype._forwardContentValues=function(t){t.datepicker=this,t.color=this.color},t.prototype._createPopup=function(){var t=this,e=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new a.OverlayConfig({positionStrategy:this._setConnectedPositions(e),hasBackdrop:!0,backdropClass:"mat-overlay-transparent-backdrop",direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),c.merge(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(h.filter((function(e){return e.keyCode===p.ESCAPE||t._datepickerInput&&e.altKey&&e.keyCode===p.UP_ARROW})))).subscribe((function(e){e&&e.preventDefault(),t.close()}))},t.prototype._destroyPopup=function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)},t.prototype._setConnectedPositions=function(t){var e="end"===this.xPosition?"end":"start",a="start"===e?"end":"start",n="above"===this.yPosition?"bottom":"top",r="top"===n?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:n},{originX:e,originY:n,overlayX:e,overlayY:r},{originX:a,originY:r,overlayX:a,overlayY:n},{originX:a,originY:n,overlayX:a,overlayY:r}])},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.decorators=[{type:i.Directive}],t.ctorParameters=function(){return[{type:s.MatDialog},{type:a.Overlay},{type:i.NgZone},{type:i.ViewContainerRef},{type:void 0,decorators:[{type:i.Inject,args:[Z]}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:u.Directionality,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[r.DOCUMENT]}]},{type:M}]},t.propDecorators={calendarHeaderComponent:[{type:i.Input}],startAt:[{type:i.Input}],startView:[{type:i.Input}],color:[{type:i.Input}],touchUi:[{type:i.Input}],disabled:[{type:i.Input}],xPosition:[{type:i.Input}],yPosition:[{type:i.Input}],yearSelected:[{type:i.Output}],monthSelected:[{type:i.Output}],panelClass:[{type:i.Input}],dateClass:[{type:i.Input}],openedStream:[{type:i.Output,args:["opened"]}],closedStream:[{type:i.Output,args:["closed"]}],opened:[{type:i.Input}]},t}(),nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return E(e,t),e.decorators=[{type:i.Component,args:[{selector:"mat-datepicker",template:"",exportAs:"matDatepicker",changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,providers:[F]}]}],e}(at),rt=function rt(t,e){this.target=t,this.targetElement=e,this.value=this.target.value},it=function(){function t(t,e,a){var n=this;if(this._elementRef=t,this._dateAdapter=e,this._dateFormats=a,this.dateChange=new i.EventEmitter,this.dateInput=new i.EventEmitter,this._valueChange=new i.EventEmitter,this._stateChanges=new c.Subject,this._onTouched=function(){},this._validatorOnChange=function(){},this._cvaOnChange=function(){},this._valueChangesSubscription=c.Subscription.EMPTY,this._localeSubscription=c.Subscription.EMPTY,this._parseValidator=function(){return n._lastValueValid?null:{matDatepickerParse:{text:n._elementRef.nativeElement.value}}},this._filterValidator=function(t){var e=n._getValidDateOrNull(n._dateAdapter.deserialize(t.value)),a=n._getDateFilter();return a&&e&&!a(e)?{matDatepickerFilter:!0}:null},this._minValidator=function(t){var e=n._getValidDateOrNull(n._dateAdapter.deserialize(t.value)),a=n._getMinDate();return!a||!e||n._dateAdapter.compareDate(a,e)<=0?null:{matDatepickerMin:{min:a,actual:e}}},this._maxValidator=function(t){var e=n._getValidDateOrNull(n._dateAdapter.deserialize(t.value)),a=n._getMaxDate();return!a||!e||n._dateAdapter.compareDate(a,e)>=0?null:{matDatepickerMax:{max:a,actual:e}}},this._lastValueValid=!1,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._localeSubscription=e.localeChanges.subscribe((function(){n.value=n.value}))}return Object.defineProperty(t.prototype,"value",{get:function(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue},set:function(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._getValidDateOrNull(t);var e=this.value;this._assignValue(t),this._formatValue(t),this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return!!this._disabled||this._parentDisabled()},set:function(t){var e=_.coerceBooleanProperty(t),a=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this._stateChanges.next(void 0)),e&&this._isInitialized&&a.blur&&a.blur()},enumerable:!1,configurable:!0}),t.prototype._getValidators=function(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]},t.prototype._registerModel=function(t){var e=this;this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe((function(t){if(t.source!==e){var a=e._getValueFromModel(t.selection);e._lastValueValid=e._isValidValue(a),e._cvaOnChange(a),e._onTouched(),e._formatValue(a),e._canEmitChangeEvent(t)&&(e.dateInput.emit(new rt(e,e._elementRef.nativeElement)),e.dateChange.emit(new rt(e,e._elementRef.nativeElement))),e._outsideValueChanged&&e._outsideValueChanged()}}))},t.prototype.ngAfterViewInit=function(){this._isInitialized=!0},t.prototype.ngOnChanges=function(){this._stateChanges.next(void 0)},t.prototype.ngOnDestroy=function(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this._stateChanges.complete()},t.prototype.registerOnValidatorChange=function(t){this._validatorOnChange=t},t.prototype.validate=function(t){return this._validator?this._validator(t):null},t.prototype.writeValue=function(t){this.value=t},t.prototype.registerOnChange=function(t){this._cvaOnChange=t},t.prototype.registerOnTouched=function(t){this._onTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype._onKeydown=function(t){t.altKey&&t.keyCode===p.DOWN_ARROW&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())},t.prototype._onInput=function(t){var e=this._lastValueValid,a=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(a),a=this._getValidDateOrNull(a),this._dateAdapter.sameDate(a,this.value)?(t&&!this.value&&this._cvaOnChange(a),e!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(a),this._cvaOnChange(a),this._valueChange.emit(a),this.dateInput.emit(new rt(this,this._elementRef.nativeElement)))},t.prototype._onChange=function(){this.dateChange.emit(new rt(this,this._elementRef.nativeElement))},t.prototype._onBlur=function(){this.value&&this._formatValue(this.value),this._onTouched()},t.prototype._formatValue=function(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._assignValue=function(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t},t.prototype._isValidValue=function(t){return!t||this._dateAdapter.isValid(t)},t.prototype._parentDisabled=function(){return!1},t.decorators=[{type:i.Directive}],t.ctorParameters=function(){return[{type:i.ElementRef},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]}]},t.propDecorators={value:[{type:i.Input}],disabled:[{type:i.Input}],dateChange:[{type:i.Output}],dateInput:[{type:i.Output}]},t}(),ot={provide:g.NG_VALUE_ACCESSOR,useExisting:i.forwardRef((function(){return dt})),multi:!0},st={provide:g.NG_VALIDATORS,useExisting:i.forwardRef((function(){return dt})),multi:!0},dt=function(t){function e(e,a,n,r){var i=t.call(this,e,a,n)||this;return i._formField=r,i._validator=g.Validators.compose(t.prototype._getValidators.call(i)),i}return E(e,t),Object.defineProperty(e.prototype,"matDatepicker",{set:function(t){t&&(this._datepicker=t,this._registerModel(t._registerInput(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(t){this._min=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(t){this._max=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(t){this._dateFilter=t,this._validatorOnChange()},enumerable:!1,configurable:!0}),e.prototype.getConnectedOverlayOrigin=function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef},e.prototype.getThemePalette=function(){return this._formField?this._formField.color:void 0},e.prototype.getStartValue=function(){return this.value},e.prototype.getPopupConnectionElementRef=function(){return this.getConnectedOverlayOrigin()},e.prototype._openPopup=function(){this._datepicker&&this._datepicker.open()},e.prototype._getValueFromModel=function(t){return t},e.prototype._assignValueToModel=function(t){this._model&&this._model.updateSelection(t,this)},e.prototype._getMinDate=function(){return this._min},e.prototype._getMaxDate=function(){return this._max},e.prototype._getDateFilter=function(){return this._dateFilter},e.prototype._canEmitChangeEvent=function(){return!0},e.decorators=[{type:i.Directive,args:[{selector:"input[matDatepicker]",providers:[ot,st,{provide:f.MAT_INPUT_VALUE_ACCESSOR,useExisting:e}],host:{"[attr.aria-haspopup]":'_datepicker ? "dialog" : null',"[attr.aria-owns]":"(_datepicker?.opened && _datepicker.id) || null","[attr.min]":"min ? _dateAdapter.toIso8601(min) : null","[attr.max]":"max ? _dateAdapter.toIso8601(max) : null","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(blur)":"_onBlur()","(keydown)":"_onKeydown($event)"},exportAs:"matDatepickerInput"}]}],e.ctorParameters=function(){return[{type:i.ElementRef},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]},{type:y.MatFormField,decorators:[{type:i.Optional},{type:i.Inject,args:[y.MAT_FORM_FIELD]}]}]},e.propDecorators={matDatepicker:[{type:i.Input}],min:[{type:i.Input}],max:[{type:i.Input}],dateFilter:[{type:i.Input,args:["matDatepickerFilter"]}]},e}(it),lt=function(){function t(){}return t.decorators=[{type:i.Directive,args:[{selector:"[matDatepickerToggleIcon]"}]}],t}(),ct=function(){function t(t,e,a){this._intl=t,this._changeDetectorRef=e,this._stateChanges=c.Subscription.EMPTY;var n=Number(a);this.tabIndex=n||0===n?n:null}return Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled},set:function(t){this._disabled=_.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){t.datepicker&&this._watchStateChanges()},t.prototype.ngOnDestroy=function(){this._stateChanges.unsubscribe()},t.prototype.ngAfterContentInit=function(){this._watchStateChanges()},t.prototype._open=function(t){this.datepicker&&!this.disabled&&(this.datepicker.open(),t.stopPropagation())},t.prototype._watchStateChanges=function(){var t=this,e=this.datepicker?this.datepicker._stateChanges:c.of(),a=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput._stateChanges:c.of(),n=this.datepicker?c.merge(this.datepicker.openedStream,this.datepicker.closedStream):c.of();this._stateChanges.unsubscribe(),this._stateChanges=c.merge(this._intl.changes,e,a,n).subscribe((function(){return t._changeDetectorRef.markForCheck()}))},t.decorators=[{type:i.Component,args:[{selector:"mat-datepicker-toggle",template:'<button\n #button\n mat-icon-button\n type="button"\n [attr.aria-haspopup]="datepicker ? \'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 <svg\n *ngIf="!_customIcon"\n class="mat-datepicker-toggle-default-icon"\n viewBox="0 0 24 24"\n width="24px"\n height="24px"\n fill="currentColor"\n focusable="false">\n <path 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\n <ng-content select="[matDatepickerToggleIcon]"></ng-content>\n</button>\n',host:{class:"mat-datepicker-toggle","[attr.tabindex]":"disabled ? null : -1","[class.mat-datepicker-toggle-active]":"datepicker && datepicker.opened","[class.mat-accent]":'datepicker && datepicker.color === "accent"',"[class.mat-warn]":'datepicker && datepicker.color === "warn"',"(focus)":"_button.focus()"},exportAs:"matDatepickerToggle",encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-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 .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"]}]}],t.ctorParameters=function(){return[{type:b},{type:i.ChangeDetectorRef},{type:String,decorators:[{type:i.Attribute,args:["tabindex"]}]}]},t.propDecorators={datepicker:[{type:i.Input,args:["for"]}],tabIndex:[{type:i.Input}],disabled:[{type:i.Input}],disableRipple:[{type:i.Input}],_customIcon:[{type:i.ContentChild,args:[lt]}],_button:[{type:i.ViewChild,args:["button"]}]},t}(),pt=new i.InjectionToken("MAT_DATE_RANGE_INPUT_PARENT"),ut=function(t){function e(e,a,n,r,i,o,s,d){var l=t.call(this,a,s,d)||this;return l._rangeInput=e,l._defaultErrorStateMatcher=n,l._injector=r,l._parentForm=i,l._parentFormGroup=o,l._outsideValueChanged=function(){l._validatorOnChange()},l}return E(e,t),e.prototype.ngOnInit=function(){var t=this._injector.get(g.NgControl,null,i.InjectFlags.Self);t&&(this.ngControl=t)},e.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},e.prototype.isEmpty=function(){return 0===this._elementRef.nativeElement.value.length},e.prototype._getPlaceholder=function(){return this._elementRef.nativeElement.placeholder},e.prototype.focus=function(){this._elementRef.nativeElement.focus()},e.prototype._onInput=function(e){t.prototype._onInput.call(this,e),this._rangeInput._handleChildValueChange()},e.prototype._openPopup=function(){this._rangeInput._openDatepicker()},e.prototype._getMinDate=function(){return this._rangeInput.min},e.prototype._getMaxDate=function(){return this._rangeInput.max},e.prototype._getDateFilter=function(){return this._rangeInput.dateFilter},e.prototype._parentDisabled=function(){return this._rangeInput._groupDisabled},e.decorators=[{type:i.Directive}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.Inject,args:[pt]}]},{type:i.ElementRef},{type:l.ErrorStateMatcher},{type:i.Injector},{type:g.NgForm,decorators:[{type:i.Optional}]},{type:g.FormGroupDirective,decorators:[{type:i.Optional}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]}]},e}(it),ht=l.mixinErrorState(ut),_t=function(t){function e(e,a,n,r,i,o,s,d){var l=t.call(this,e,a,n,r,i,o,s,d)||this;return l._startValidator=function(t){var e=l._getValidDateOrNull(l._dateAdapter.deserialize(t.value)),a=l._model?l._model.selection.end:null;return!e||!a||l._dateAdapter.compareDate(e,a)<=0?null:{matStartDateInvalid:{end:a,actual:e}}},l._validator=g.Validators.compose(x(t.prototype._getValidators.call(l),[l._startValidator])),l._canEmitChangeEvent=function(t){return t.source!==l._rangeInput._endInput},l}return E(e,t),e.prototype._getValueFromModel=function(t){return t.start},e.prototype._assignValueToModel=function(t){if(this._model){var e=new S(t,this._model.selection.end);this._model.updateSelection(e,this),this._cvaOnChange(t)}},e.prototype._formatValue=function(e){t.prototype._formatValue.call(this,e),this._rangeInput._handleChildValueChange()},e.prototype.getMirrorValue=function(){var t=this._elementRef.nativeElement,e=t.value;return e.length>0?e:t.placeholder},e.decorators=[{type:i.Directive,args:[{selector:"input[matStartDate]",host:{class:"mat-date-range-input-inner","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(keydown)":"_onKeydown($event)","[attr.id]":"_rangeInput.id","[attr.aria-haspopup]":'_rangeInput.rangePicker ? "dialog" : null',"[attr.aria-owns]":"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null","[attr.min]":"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null","[attr.max]":"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null","(blur)":"_onBlur()",type:"text"},providers:[{provide:g.NG_VALUE_ACCESSOR,useExisting:e,multi:!0},{provide:g.NG_VALIDATORS,useExisting:e,multi:!0}]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.Inject,args:[pt]}]},{type:i.ElementRef},{type:l.ErrorStateMatcher},{type:i.Injector},{type:g.NgForm,decorators:[{type:i.Optional}]},{type:g.FormGroupDirective,decorators:[{type:i.Optional}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]}]},e}(ht),mt=function(t){function e(e,a,n,r,i,o,s,d){var l=t.call(this,e,a,n,r,i,o,s,d)||this;return l._endValidator=function(t){var e=l._getValidDateOrNull(l._dateAdapter.deserialize(t.value)),a=l._model?l._model.selection.start:null;return!e||!a||l._dateAdapter.compareDate(e,a)>=0?null:{matEndDateInvalid:{start:a,actual:e}}},l._validator=g.Validators.compose(x(t.prototype._getValidators.call(l),[l._endValidator])),l._canEmitChangeEvent=function(t){return t.source!==l._rangeInput._startInput},l}return E(e,t),e.prototype._getValueFromModel=function(t){return t.end},e.prototype._assignValueToModel=function(t){if(this._model){var e=new S(this._model.selection.start,t);this._model.updateSelection(e,this),this._cvaOnChange(t)}},e.prototype._onKeydown=function(e){e.keyCode!==p.BACKSPACE||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),t.prototype._onKeydown.call(this,e)},e.decorators=[{type:i.Directive,args:[{selector:"input[matEndDate]",host:{class:"mat-date-range-input-inner","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(keydown)":"_onKeydown($event)","[attr.aria-haspopup]":'_rangeInput.rangePicker ? "dialog" : null',"[attr.aria-owns]":"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null","[attr.min]":"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null","[attr.max]":"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null","(blur)":"_onBlur()",type:"text"},providers:[{provide:g.NG_VALUE_ACCESSOR,useExisting:e,multi:!0},{provide:g.NG_VALIDATORS,useExisting:e,multi:!0}]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.Inject,args:[pt]}]},{type:i.ElementRef},{type:l.ErrorStateMatcher},{type:i.Injector},{type:g.NgForm,decorators:[{type:i.Optional}]},{type:g.FormGroupDirective,decorators:[{type:i.Optional}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:void 0,decorators:[{type:i.Optional},{type:i.Inject,args:[l.MAT_DATE_FORMATS]}]}]},e}(ht),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return E(e,t),e.prototype._forwardContentValues=function(e){t.prototype._forwardContentValues.call(this,e);var a=this._datepickerInput;a&&(e.comparisonStart=a.comparisonStart,e.comparisonEnd=a.comparisonEnd)},e.decorators=[{type:i.Component,args:[{selector:"mat-date-range-picker",template:"",exportAs:"matDateRangePicker",changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,providers:[N]}]}],e}(at),yt=0,ft=function(){function t(t,e,a,n,r){if(this._changeDetectorRef=t,this._elementRef=e,this._dateAdapter=n,this._formField=r,this.stateChanges=new c.Subject,this.id="mat-date-range-input-"+yt++,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="–",this.comparisonStart=null,this.comparisonEnd=null,this._stateChanges=new c.Subject,!n)throw v("DateAdapter");this.ngControl=a}return Object.defineProperty(t.prototype,"value",{get:function(){return this._model?this._model.selection:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){var t,e,a=(null===(t=this._startInput)||void 0===t?void 0:t._getPlaceholder())||"",n=(null===(e=this._endInput)||void 0===e?void 0:e._getPlaceholder())||"";return a||n?a+" "+this.separator+" "+n:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rangePicker",{get:function(){return this._rangePicker},set:function(t){t&&(this._model=t._registerInput(this),this._rangePicker=t,this._registerModel(this._model))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return!!this._required},set:function(t){this._required=_.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(t){this._dateFilter=t,this._revalidate()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},set:function(t){this._min=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._revalidate()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},set:function(t){this._max=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._revalidate()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled},set:function(t){var e=_.coerceBooleanProperty(t);e!==this._groupDisabled&&(this._groupDisabled=e,this._stateChanges.next(void 0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errorState",{get:function(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){var t=!!this._startInput&&this._startInput.isEmpty(),e=!!this._endInput&&this._endInput.isEmpty();return t&&e},enumerable:!1,configurable:!0}),t.prototype.setDescribedByIds=function(t){this._ariaDescribedBy=t.length?t.join(" "):null},t.prototype.onContainerClick=function(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())},t.prototype.ngAfterContentInit=function(){var t=this;if(!this._startInput)throw Error("mat-date-range-input must contain a matStartDate input");if(!this._endInput)throw Error("mat-date-range-input must contain a matEndDate input");this._model&&this._registerModel(this._model),c.merge(this._startInput.stateChanges,this._endInput.stateChanges).subscribe((function(){t._stateChanges.next(void 0)}))},t.prototype.ngOnChanges=function(){this._stateChanges.next(void 0)},t.prototype.ngOnDestroy=function(){this.stateChanges.complete(),this._stateChanges.unsubscribe()},t.prototype.getStartValue=function(){return this.value?this.value.start:null},t.prototype.getThemePalette=function(){return this._formField?this._formField.color:void 0},t.prototype.getConnectedOverlayOrigin=function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef},t.prototype._getInputMirrorValue=function(){return this._startInput?this._startInput.getMirrorValue():""},t.prototype._shouldHidePlaceholders=function(){return!!this._startInput&&!this._startInput.isEmpty()},t.prototype._handleChildValueChange=function(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()},t.prototype._openDatepicker=function(){this._rangePicker&&this._rangePicker.open()},t.prototype._shouldHideSeparator=function(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty},t.prototype._getAriaLabelledby=function(){var t=this._formField;return t&&t._hasFloatingLabel()?t._labelId:null},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._revalidate=function(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()},t.prototype._registerModel=function(t){this._startInput&&this._startInput._registerModel(t),this._endInput&&this._endInput._registerModel(t)},t.decorators=[{type:i.Component,args:[{selector:"mat-date-range-input",template:'<div\n class="mat-date-range-input-container"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)="focused = $event !== null">\n <div class="mat-date-range-input-start-wrapper">\n <ng-content select="input[matStartDate]"></ng-content>\n <span\n class="mat-date-range-input-mirror"\n aria-hidden="true">{{_getInputMirrorValue()}}</span>\n </div>\n\n <span\n class="mat-date-range-input-separator"\n [class.mat-date-range-input-separator-hidden]="_shouldHideSeparator()">{{separator}}</span>\n\n <div class="mat-date-range-input-end-wrapper">\n <ng-content select="input[matEndDate]"></ng-content>\n </div>\n</div>\n\n',exportAs:"matDateRangeInput",host:{class:"mat-date-range-input","[class.mat-date-range-input-hide-placeholders]":"_shouldHidePlaceholders()","[attr.id]":"null",role:"group","[attr.aria-labelledby]":"_getAriaLabelledby()","[attr.aria-describedby]":"_ariaDescribedBy"},changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,providers:[{provide:y.MatFormFieldControl,useExisting:t},{provide:pt,useExisting:t}],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"]}]}],t.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:i.ElementRef},{type:g.ControlContainer,decorators:[{type:i.Optional},{type:i.Self}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:y.MatFormField,decorators:[{type:i.Optional},{type:i.Inject,args:[y.MAT_FORM_FIELD]}]}]},t.propDecorators={rangePicker:[{type:i.Input}],required:[{type:i.Input}],dateFilter:[{type:i.Input}],min:[{type:i.Input}],max:[{type:i.Input}],disabled:[{type:i.Input}],separator:[{type:i.Input}],comparisonStart:[{type:i.Input}],comparisonEnd:[{type:i.Input}],_startInput:[{type:i.ContentChild,args:[_t]}],_endInput:[{type:i.ContentChild,args:[mt]}]},t}(),vt=function(){function t(){}return t.decorators=[{type:i.NgModule,args:[{imports:[r.CommonModule,o.MatButtonModule,s.MatDialogModule,a.OverlayModule,e.A11yModule,n.PortalModule],exports:[d.CdkScrollableModule,K,C,nt,tt,dt,ct,lt,B,q,z,U,ft,_t,mt,gt],declarations:[K,C,nt,tt,dt,ct,lt,B,q,z,U,ft,_t,mt,gt],providers:[b,Q,{provide:j,useClass:L}],entryComponents:[tt,U]}]}],t}();
|
|
98
|
+
*/
|
|
99
|
+
var gt=0,yt=function(){function t(t,e,a,n,r){if(this._changeDetectorRef=t,this._elementRef=e,this._dateAdapter=n,this._formField=r,this.stateChanges=new c.Subject,this.id="mat-date-range-input-"+gt++,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="–",this.comparisonStart=null,this.comparisonEnd=null,this._stateChanges=new c.Subject,!n)throw v("DateAdapter");this.ngControl=a}return Object.defineProperty(t.prototype,"value",{get:function(){return this._model?this._model.selection:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){var t,e,a=(null===(t=this._startInput)||void 0===t?void 0:t._getPlaceholder())||"",n=(null===(e=this._endInput)||void 0===e?void 0:e._getPlaceholder())||"";return a||n?a+" "+this.separator+" "+n:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rangePicker",{get:function(){return this._rangePicker},set:function(t){t&&(this._model=t._registerInput(this),this._rangePicker=t,this._registerModel(this._model))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return!!this._required},set:function(t){this._required=_.coerceBooleanProperty(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(t){this._dateFilter=t,this._revalidate()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},set:function(t){this._min=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._revalidate()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},set:function(t){this._max=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._revalidate()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled},set:function(t){var e=_.coerceBooleanProperty(t);e!==this._groupDisabled&&(this._groupDisabled=e,this._stateChanges.next(void 0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errorState",{get:function(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){var t=!!this._startInput&&this._startInput.isEmpty(),e=!!this._endInput&&this._endInput.isEmpty();return t&&e},enumerable:!1,configurable:!0}),t.prototype.setDescribedByIds=function(t){this._ariaDescribedBy=t.length?t.join(" "):null},t.prototype.onContainerClick=function(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())},t.prototype.ngAfterContentInit=function(){var t=this;if(!this._startInput)throw Error("mat-date-range-input must contain a matStartDate input");if(!this._endInput)throw Error("mat-date-range-input must contain a matEndDate input");this._model&&this._registerModel(this._model),c.merge(this._startInput.stateChanges,this._endInput.stateChanges).subscribe((function(){t._stateChanges.next(void 0)}))},t.prototype.ngOnChanges=function(){this._stateChanges.next(void 0)},t.prototype.ngOnDestroy=function(){this.stateChanges.complete(),this._stateChanges.unsubscribe()},t.prototype.getStartValue=function(){return this.value?this.value.start:null},t.prototype.getThemePalette=function(){return this._formField?this._formField.color:void 0},t.prototype.getConnectedOverlayOrigin=function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef},t.prototype._getInputMirrorValue=function(){return this._startInput?this._startInput.getMirrorValue():""},t.prototype._shouldHidePlaceholders=function(){return!!this._startInput&&!this._startInput.isEmpty()},t.prototype._handleChildValueChange=function(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()},t.prototype._openDatepicker=function(){this._rangePicker&&this._rangePicker.open()},t.prototype._shouldHideSeparator=function(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty},t.prototype._getAriaLabelledby=function(){var t=this._formField;return t&&t._hasFloatingLabel()?t._labelId:null},t.prototype._getValidDateOrNull=function(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null},t.prototype._revalidate=function(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()},t.prototype._registerModel=function(t){this._startInput&&this._startInput._registerModel(t),this._endInput&&this._endInput._registerModel(t)},t}();yt.decorators=[{type:i.Component,args:[{selector:"mat-date-range-input",template:'<div\n class="mat-date-range-input-container"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)="focused = $event !== null">\n <div class="mat-date-range-input-start-wrapper">\n <ng-content select="input[matStartDate]"></ng-content>\n <span\n class="mat-date-range-input-mirror"\n aria-hidden="true">{{_getInputMirrorValue()}}</span>\n </div>\n\n <span\n class="mat-date-range-input-separator"\n [class.mat-date-range-input-separator-hidden]="_shouldHideSeparator()">{{separator}}</span>\n\n <div class="mat-date-range-input-end-wrapper">\n <ng-content select="input[matEndDate]"></ng-content>\n </div>\n</div>\n\n',exportAs:"matDateRangeInput",host:{class:"mat-date-range-input","[class.mat-date-range-input-hide-placeholders]":"_shouldHidePlaceholders()","[attr.id]":"null",role:"group","[attr.aria-labelledby]":"_getAriaLabelledby()","[attr.aria-describedby]":"_ariaDescribedBy"},changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,providers:[{provide:y.MatFormFieldControl,useExisting:yt},{provide:pt,useExisting:yt}],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"]}]}],yt.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:i.ElementRef},{type:g.ControlContainer,decorators:[{type:i.Optional},{type:i.Self}]},{type:l.DateAdapter,decorators:[{type:i.Optional}]},{type:y.MatFormField,decorators:[{type:i.Optional},{type:i.Inject,args:[y.MAT_FORM_FIELD]}]}]},yt.propDecorators={rangePicker:[{type:i.Input}],required:[{type:i.Input}],dateFilter:[{type:i.Input}],min:[{type:i.Input}],max:[{type:i.Input}],disabled:[{type:i.Input}],separator:[{type:i.Input}],comparisonStart:[{type:i.Input}],comparisonEnd:[{type:i.Input}],_startInput:[{type:i.ContentChild,args:[_t]}],_endInput:[{type:i.ContentChild,args:[mt]}]};var ft,vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return E(e,t),e.prototype._forwardContentValues=function(e){t.prototype._forwardContentValues.call(this,e);var a=this._datepickerInput;a&&(e.comparisonStart=a.comparisonStart,e.comparisonEnd=a.comparisonEnd)},e}(at);vt.decorators=[{type:i.Component,args:[{selector:"mat-date-range-picker",template:"",exportAs:"matDateRangePicker",changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,providers:[N]}]}],(ft=function ft(){}).decorators=[{type:i.NgModule,args:[{imports:[r.CommonModule,o.MatButtonModule,s.MatDialogModule,a.OverlayModule,e.A11yModule,n.PortalModule],exports:[d.CdkScrollableModule,K,C,nt,tt,lt,ct,ot,B,q,z,U,yt,_t,mt,vt],declarations:[K,C,nt,tt,lt,ct,ot,B,q,z,U,yt,_t,mt,vt],providers:[b,Q,{provide:j,useClass:L}],entryComponents:[tt,U]}]}],
|
|
66
100
|
/**
|
|
67
101
|
* @license
|
|
68
102
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -70,4 +104,4 @@ var S=function S(t,e){this.start=t,this.end=e},M=function(){function t(t,e){this
|
|
|
70
104
|
* Use of this source code is governed by an MIT-style license that can be
|
|
71
105
|
* found in the LICENSE file at https://angular.io/license
|
|
72
106
|
*/
|
|
73
|
-
t.DateRange=S,t.DefaultMatCalendarRangeStrategy=L,t.MAT_DATEPICKER_SCROLL_STRATEGY=Z,t.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY=J,t.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER=Q,t.MAT_DATEPICKER_VALIDATORS=
|
|
107
|
+
t.DateRange=S,t.DefaultMatCalendarRangeStrategy=L,t.MAT_DATEPICKER_SCROLL_STRATEGY=Z,t.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY=J,t.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER=Q,t.MAT_DATEPICKER_VALIDATORS=dt,t.MAT_DATEPICKER_VALUE_ACCESSOR=st,t.MAT_DATE_RANGE_SELECTION_STRATEGY=j,t.MAT_RANGE_DATE_SELECTION_MODEL_FACTORY=Y,t.MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER=N,t.MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY=T,t.MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER=F,t.MatCalendar=K,t.MatCalendarBody=C,t.MatCalendarCell=D,t.MatCalendarHeader=U,t.MatDateRangeInput=yt,t.MatDateRangePicker=vt,t.MatDateSelectionModel=M,t.MatDatepicker=nt,t.MatDatepickerContent=tt,t.MatDatepickerInput=lt,t.MatDatepickerInputEvent=rt,t.MatDatepickerIntl=b,t.MatDatepickerModule=ft,t.MatDatepickerToggle=ct,t.MatDatepickerToggleIcon=ot,t.MatEndDate=mt,t.MatMonthView=B,t.MatMultiYearView=z,t.MatRangeDateSelectionModel=P,t.MatSingleDateSelectionModel=R,t.MatStartDate=_t,t.MatYearView=q,t.matDatepickerAnimations=$,t.yearsPerPage=24,t.yearsPerRow=4,t.ɵangular_material_src_material_datepicker_datepicker_a=at,t.ɵangular_material_src_material_datepicker_datepicker_b=it,t.ɵangular_material_src_material_datepicker_datepicker_c=pt,Object.defineProperty(t,"__esModule",{value:!0})}));
|