Changeset fa375fe for trip-planner-front/node_modules/@angular/material/bundles/material-sort.umd.js
- Timestamp:
- 10/16/21 18:10:51 (3 years ago)
- Branches:
- master
- Children:
- eed0bf8
- Parents:
- 6a3a178
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/@angular/material/bundles/material-sort.umd.js
r6a3a178 rfa375fe 1 1 (function (global, factory) { 2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/ coercion'), require('@angular/material/core'), require('@angular/cdk/a11y'), require('@angular/cdk/keycodes'), require('rxjs'), require('@angular/animations'), require('@angular/common')) :3 typeof define === 'function' && define.amd ? define('@angular/material/sort', ['exports', '@angular/core', '@angular/cdk/ coercion', '@angular/material/core', '@angular/cdk/a11y', '@angular/cdk/keycodes', 'rxjs', '@angular/animations', '@angular/common'], factory) :4 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.sort = {}), global.ng.core, global.ng.cdk. coercion, global.ng.material.core, global.ng.cdk.a11y, global.ng.cdk.keycodes, global.rxjs, global.ng.animations, global.ng.common));5 }(this, (function (exports, i0, coercion, core, a11y, keycodes, rxjs, animations, common) { 'use strict';2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/a11y'), require('@angular/cdk/coercion'), require('@angular/cdk/keycodes'), require('@angular/material/core'), require('rxjs'), require('@angular/animations'), require('@angular/common')) : 3 typeof define === 'function' && define.amd ? define('@angular/material/sort', ['exports', '@angular/core', '@angular/cdk/a11y', '@angular/cdk/coercion', '@angular/cdk/keycodes', '@angular/material/core', 'rxjs', '@angular/animations', '@angular/common'], factory) : 4 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.sort = {}), global.ng.core, global.ng.cdk.a11y, global.ng.cdk.coercion, global.ng.cdk.keycodes, global.ng.material.core, global.rxjs, global.ng.animations, global.ng.common)); 5 }(this, (function (exports, i0, a11y, coercion, keycodes, core, rxjs, animations, common) { 'use strict'; 6 6 7 7 function _interopNamespace(e) { … … 603 603 * To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and 604 604 * include it in a custom provider. 605 * @deprecated No longer being used. To be removed.606 * @breaking-change 13.0.0607 605 */ 608 606 var MatSortHeaderIntl = /** @class */ (function () { … … 658 656 // `MatSort` is not optionally injected, but just asserted manually w/ better error. 659 657 // tslint:disable-next-line: lightweight-tokens 660 _sort, _columnDef, _focusMonitor, _elementRef) { 658 _sort, _columnDef, _focusMonitor, _elementRef, 659 /** @breaking-change 14.0.0 _ariaDescriber will be required. */ 660 _ariaDescriber) { 661 661 var _this = 662 662 // Note that we use a string token for the `_columnDef`, because the value is provided both by … … 671 671 _this._focusMonitor = _focusMonitor; 672 672 _this._elementRef = _elementRef; 673 _this._ariaDescriber = _ariaDescriber; 673 674 /** 674 675 * Flag set to true when the indicator should be displayed while the sort is not active. Used to … … 690 691 /** Sets the position of the arrow that displays when sorted. */ 691 692 _this.arrowPosition = 'after'; 693 // Default the action description to "Sort" because it's better than nothing. 694 // Without a description, the button's label comes from the sort header text content, 695 // which doesn't give any indication that it performs a sorting operation. 696 _this._sortActionDescription = 'Sort'; 692 697 if (!_sort && (typeof ngDevMode === 'undefined' || ngDevMode)) { 693 698 throw getSortHeaderNotContainedWithinSortError(); … … 696 701 return _this; 697 702 } 703 Object.defineProperty(MatSortHeader.prototype, "sortActionDescription", { 704 /** 705 * Description applied to MatSortHeader's button element with aria-describedby. This text should 706 * describe the action that will occur when the user clicks the sort header. 707 */ 708 get: function () { 709 return this._sortActionDescription; 710 }, 711 set: function (value) { 712 this._updateSortActionDescription(value); 713 }, 714 enumerable: false, 715 configurable: true 716 }); 698 717 Object.defineProperty(MatSortHeader.prototype, "disableClear", { 699 718 /** Overrides the disable clear value of the containing MatSort for this MatSortable. */ … … 711 730 this._setAnimationTransitionState({ toState: this._isSorted() ? 'active' : this._arrowDirection }); 712 731 this._sort.register(this); 732 this._sortButton = this._elementRef.nativeElement.querySelector('[role="button"]'); 733 this._updateSortActionDescription(this._sortActionDescription); 713 734 }; 714 735 MatSortHeader.prototype.ngAfterViewInit = function () { … … 828 849 MatSortHeader.prototype._renderArrow = function () { 829 850 return !this._isDisabled() || this._isSorted(); 851 }; 852 MatSortHeader.prototype._updateSortActionDescription = function (newDescription) { 853 // We use AriaDescriber for the sort button instead of setting an `aria-label` because some 854 // screen readers (notably VoiceOver) will read both the column header *and* the button's label 855 // for every *cell* in the table, creating a lot of unnecessary noise. 856 var _a, _b; 857 // If _sortButton is undefined, the component hasn't been initialized yet so there's 858 // nothing to update in the DOM. 859 if (this._sortButton) { 860 // removeDescription will no-op if there is no existing message. 861 // TODO(jelbourn): remove optional chaining when AriaDescriber is required. 862 (_a = this._ariaDescriber) === null || _a === void 0 ? void 0 : _a.removeDescription(this._sortButton, this._sortActionDescription); 863 (_b = this._ariaDescriber) === null || _b === void 0 ? void 0 : _b.describe(this._sortButton, newDescription); 864 } 865 this._sortActionDescription = newDescription; 830 866 }; 831 867 /** Handles changes in the sorting state. */ … … 887 923 { type: undefined, decorators: [{ type: i0.Inject, args: ['MAT_SORT_HEADER_COLUMN_DEF',] }, { type: i0.Optional }] }, 888 924 { type: a11y.FocusMonitor }, 889 { type: i0.ElementRef } 925 { type: i0.ElementRef }, 926 { type: a11y.AriaDescriber, decorators: [{ type: i0.Inject, args: [a11y.AriaDescriber,] }, { type: i0.Optional }] } 890 927 ]; }; 891 928 MatSortHeader.propDecorators = { … … 893 930 arrowPosition: [{ type: i0.Input }], 894 931 start: [{ type: i0.Input }], 932 sortActionDescription: [{ type: i0.Input }], 895 933 disableClear: [{ type: i0.Input }] 896 934 };
Note:
See TracChangeset
for help on using the changeset viewer.