@angular/material 5.2.1 → 5.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/_theming.scss +13 -10
  2. package/autocomplete/typings/index.metadata.json +1 -1
  3. package/bundles/material-autocomplete.umd.js +1 -1
  4. package/bundles/material-autocomplete.umd.js.map +1 -1
  5. package/bundles/material-autocomplete.umd.min.js +1 -1
  6. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  7. package/bundles/material-button.umd.js +2 -2
  8. package/bundles/material-button.umd.js.map +1 -1
  9. package/bundles/material-button.umd.min.js +1 -1
  10. package/bundles/material-button.umd.min.js.map +1 -1
  11. package/bundles/material-chips.umd.js +4 -0
  12. package/bundles/material-chips.umd.js.map +1 -1
  13. package/bundles/material-chips.umd.min.js +1 -1
  14. package/bundles/material-chips.umd.min.js.map +1 -1
  15. package/bundles/material-core.umd.js +64 -33
  16. package/bundles/material-core.umd.js.map +1 -1
  17. package/bundles/material-core.umd.min.js +1 -1
  18. package/bundles/material-core.umd.min.js.map +1 -1
  19. package/bundles/material-dialog.umd.js +12 -9
  20. package/bundles/material-dialog.umd.js.map +1 -1
  21. package/bundles/material-dialog.umd.min.js +1 -1
  22. package/bundles/material-dialog.umd.min.js.map +1 -1
  23. package/bundles/material-expansion.umd.js +1 -1
  24. package/bundles/material-expansion.umd.js.map +1 -1
  25. package/bundles/material-expansion.umd.min.js +1 -1
  26. package/bundles/material-expansion.umd.min.js.map +1 -1
  27. package/bundles/material-grid-list.umd.js +7 -7
  28. package/bundles/material-grid-list.umd.js.map +1 -1
  29. package/bundles/material-grid-list.umd.min.js +1 -1
  30. package/bundles/material-grid-list.umd.min.js.map +1 -1
  31. package/bundles/material-list.umd.js +46 -41
  32. package/bundles/material-list.umd.js.map +1 -1
  33. package/bundles/material-list.umd.min.js +3 -3
  34. package/bundles/material-list.umd.min.js.map +1 -1
  35. package/bundles/material-menu.umd.js +5 -5
  36. package/bundles/material-menu.umd.js.map +1 -1
  37. package/bundles/material-menu.umd.min.js +1 -1
  38. package/bundles/material-menu.umd.min.js.map +1 -1
  39. package/bundles/material-paginator.umd.js +2 -2
  40. package/bundles/material-paginator.umd.js.map +1 -1
  41. package/bundles/material-paginator.umd.min.js +1 -1
  42. package/bundles/material-paginator.umd.min.js.map +1 -1
  43. package/bundles/material-progress-spinner.umd.js +7 -3
  44. package/bundles/material-progress-spinner.umd.js.map +1 -1
  45. package/bundles/material-progress-spinner.umd.min.js +1 -1
  46. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  47. package/bundles/material-select.umd.js +3 -3
  48. package/bundles/material-select.umd.js.map +1 -1
  49. package/bundles/material-select.umd.min.js +1 -1
  50. package/bundles/material-select.umd.min.js.map +1 -1
  51. package/bundles/material-sidenav.umd.js +22 -31
  52. package/bundles/material-sidenav.umd.js.map +1 -1
  53. package/bundles/material-sidenav.umd.min.js +1 -1
  54. package/bundles/material-sidenav.umd.min.js.map +1 -1
  55. package/bundles/material-tabs.umd.js +13 -13
  56. package/bundles/material-tabs.umd.js.map +1 -1
  57. package/bundles/material-tabs.umd.min.js +1 -1
  58. package/bundles/material-tabs.umd.min.js.map +1 -1
  59. package/bundles/material.umd.js +186 -148
  60. package/bundles/material.umd.js.map +1 -1
  61. package/bundles/material.umd.min.js +17 -17
  62. package/bundles/material.umd.min.js.map +1 -1
  63. package/button/typings/index.metadata.json +1 -1
  64. package/core/typings/datetime/native-date-adapter.d.ts +17 -0
  65. package/core/typings/index.metadata.json +1 -1
  66. package/core/typings/ripple/ripple-renderer.d.ts +4 -1
  67. package/core/typings/ripple/ripple.d.ts +12 -2
  68. package/dialog/typings/index.metadata.json +1 -1
  69. package/esm2015/autocomplete.js +1 -1
  70. package/esm2015/autocomplete.js.map +1 -1
  71. package/esm2015/button.js +2 -2
  72. package/esm2015/button.js.map +1 -1
  73. package/esm2015/chips.js +4 -0
  74. package/esm2015/chips.js.map +1 -1
  75. package/esm2015/core.js +43 -26
  76. package/esm2015/core.js.map +1 -1
  77. package/esm2015/dialog.js +12 -9
  78. package/esm2015/dialog.js.map +1 -1
  79. package/esm2015/expansion.js +1 -1
  80. package/esm2015/expansion.js.map +1 -1
  81. package/esm2015/grid-list.js +7 -7
  82. package/esm2015/grid-list.js.map +1 -1
  83. package/esm2015/list.js +45 -36
  84. package/esm2015/list.js.map +1 -1
  85. package/esm2015/material.js +4 -4
  86. package/esm2015/material.js.map +1 -1
  87. package/esm2015/menu.js +2 -2
  88. package/esm2015/menu.js.map +1 -1
  89. package/esm2015/paginator.js +2 -2
  90. package/esm2015/paginator.js.map +1 -1
  91. package/esm2015/progress-spinner.js +13 -9
  92. package/esm2015/progress-spinner.js.map +1 -1
  93. package/esm2015/select.js +3 -3
  94. package/esm2015/select.js.map +1 -1
  95. package/esm2015/sidenav.js +18 -17
  96. package/esm2015/sidenav.js.map +1 -1
  97. package/esm2015/tabs.js +4 -4
  98. package/esm2015/tabs.js.map +1 -1
  99. package/esm5/autocomplete.es5.js +1 -1
  100. package/esm5/autocomplete.es5.js.map +1 -1
  101. package/esm5/button.es5.js +2 -2
  102. package/esm5/button.es5.js.map +1 -1
  103. package/esm5/chips.es5.js +4 -0
  104. package/esm5/chips.es5.js.map +1 -1
  105. package/esm5/core.es5.js +64 -33
  106. package/esm5/core.es5.js.map +1 -1
  107. package/esm5/dialog.es5.js +12 -9
  108. package/esm5/dialog.es5.js.map +1 -1
  109. package/esm5/expansion.es5.js +1 -1
  110. package/esm5/expansion.es5.js.map +1 -1
  111. package/esm5/grid-list.es5.js +7 -7
  112. package/esm5/grid-list.es5.js.map +1 -1
  113. package/esm5/list.es5.js +47 -42
  114. package/esm5/list.es5.js.map +1 -1
  115. package/esm5/material.es5.js +4 -4
  116. package/esm5/material.es5.js.map +1 -1
  117. package/esm5/menu.es5.js +2 -2
  118. package/esm5/menu.es5.js.map +1 -1
  119. package/esm5/paginator.es5.js +2 -2
  120. package/esm5/paginator.es5.js.map +1 -1
  121. package/esm5/progress-spinner.es5.js +7 -3
  122. package/esm5/progress-spinner.es5.js.map +1 -1
  123. package/esm5/select.es5.js +3 -3
  124. package/esm5/select.es5.js.map +1 -1
  125. package/esm5/sidenav.es5.js +19 -27
  126. package/esm5/sidenav.es5.js.map +1 -1
  127. package/esm5/tabs.es5.js +4 -4
  128. package/esm5/tabs.es5.js.map +1 -1
  129. package/expansion/typings/index.metadata.json +1 -1
  130. package/list/typings/index.metadata.json +1 -1
  131. package/list/typings/list.d.ts +1 -2
  132. package/list/typings/selection-list.d.ts +10 -7
  133. package/menu/typings/index.d.ts +2 -2
  134. package/menu/typings/index.metadata.json +1 -1
  135. package/package.json +4 -4
  136. package/paginator/typings/index.metadata.json +1 -1
  137. package/prebuilt-themes/deeppurple-amber.css +1 -1
  138. package/prebuilt-themes/indigo-pink.css +1 -1
  139. package/prebuilt-themes/pink-bluegrey.css +1 -1
  140. package/prebuilt-themes/purple-green.css +1 -1
  141. package/progress-spinner/typings/index.metadata.json +1 -1
  142. package/select/typings/index.metadata.json +1 -1
  143. package/select/typings/select.d.ts +1 -1
  144. package/sidenav/typings/drawer.d.ts +2 -6
  145. package/sidenav/typings/index.metadata.json +1 -1
  146. package/tabs/typings/index.d.ts +4 -4
  147. package/tabs/typings/index.metadata.json +1 -1
  148. package/typings/autocomplete/index.metadata.json +1 -1
  149. package/typings/button/index.metadata.json +1 -1
  150. package/typings/core/datetime/native-date-adapter.d.ts +17 -0
  151. package/typings/core/index.metadata.json +1 -1
  152. package/typings/core/ripple/ripple-renderer.d.ts +4 -1
  153. package/typings/core/ripple/ripple.d.ts +12 -2
  154. package/typings/dialog/index.metadata.json +1 -1
  155. package/typings/esm5/autocomplete/index.metadata.json +1 -1
  156. package/typings/esm5/button/index.metadata.json +1 -1
  157. package/typings/esm5/core/datetime/native-date-adapter.d.ts +17 -0
  158. package/typings/esm5/core/index.metadata.json +1 -1
  159. package/typings/esm5/core/ripple/ripple-renderer.d.ts +4 -1
  160. package/typings/esm5/core/ripple/ripple.d.ts +12 -2
  161. package/typings/esm5/dialog/index.metadata.json +1 -1
  162. package/typings/esm5/expansion/index.metadata.json +1 -1
  163. package/typings/esm5/index.metadata.json +1 -1
  164. package/typings/esm5/list/index.metadata.json +1 -1
  165. package/typings/esm5/list/list.d.ts +1 -2
  166. package/typings/esm5/list/selection-list.d.ts +10 -7
  167. package/typings/esm5/menu/index.d.ts +2 -2
  168. package/typings/esm5/menu/index.metadata.json +1 -1
  169. package/typings/esm5/paginator/index.metadata.json +1 -1
  170. package/typings/esm5/progress-spinner/index.metadata.json +1 -1
  171. package/typings/esm5/select/index.metadata.json +1 -1
  172. package/typings/esm5/select/select.d.ts +1 -1
  173. package/typings/esm5/sidenav/drawer.d.ts +2 -6
  174. package/typings/esm5/sidenav/index.metadata.json +1 -1
  175. package/typings/esm5/tabs/index.d.ts +4 -4
  176. package/typings/esm5/tabs/index.metadata.json +1 -1
  177. package/typings/expansion/index.metadata.json +1 -1
  178. package/typings/index.metadata.json +1 -1
  179. package/typings/list/index.metadata.json +1 -1
  180. package/typings/list/list.d.ts +1 -2
  181. package/typings/list/selection-list.d.ts +10 -7
  182. package/typings/menu/index.d.ts +2 -2
  183. package/typings/menu/index.metadata.json +1 -1
  184. package/typings/paginator/index.metadata.json +1 -1
  185. package/typings/progress-spinner/index.metadata.json +1 -1
  186. package/typings/select/index.metadata.json +1 -1
  187. package/typings/select/select.d.ts +1 -1
  188. package/typings/sidenav/drawer.d.ts +2 -6
  189. package/typings/sidenav/index.metadata.json +1 -1
  190. package/typings/tabs/index.d.ts +4 -4
  191. package/typings/tabs/index.metadata.json +1 -1
@@ -341,8 +341,8 @@ class MatPaginator {
341
341
  MatPaginator.decorators = [
342
342
  { type: Component, args: [{selector: 'mat-paginator',
343
343
  exportAs: 'matPaginator',
344
- template: "<div class=\"mat-paginator-container\"><div class=\"mat-paginator-page-size\" *ngIf=\"!hidePageSize\"><div class=\"mat-paginator-page-size-label\">{{_intl.itemsPerPageLabel}}</div><mat-form-field *ngIf=\"_displayedPageSizeOptions.length > 1\" class=\"mat-paginator-page-size-select\"><mat-select [value]=\"pageSize\" [aria-label]=\"_intl.itemsPerPageLabel\" (change)=\"_changePageSize($event.value)\"><mat-option *ngFor=\"let pageSizeOption of _displayedPageSizeOptions\" [value]=\"pageSizeOption\">{{pageSizeOption}}</mat-option></mat-select></mat-form-field><div *ngIf=\"_displayedPageSizeOptions.length <= 1\">{{pageSize}}</div></div><div class=\"mat-paginator-range-actions\"><div class=\"mat-paginator-range-label\">{{_intl.getRangeLabel(pageIndex, pageSize, length)}}</div><button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-first\" (click)=\"firstPage()\" [attr.aria-label]=\"_intl.firstPageLabel\" [matTooltip]=\"_intl.firstPageLabel\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasPreviousPage()\" *ngIf=\"showFirstLastButtons\"><div class=\"mat-paginator-first\"></div><div class=\"mat-paginator-decrement\"></div></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-previous\" (click)=\"previousPage()\" [attr.aria-label]=\"_intl.previousPageLabel\" [matTooltip]=\"_intl.previousPageLabel\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasPreviousPage()\"><div class=\"mat-paginator-decrement\"></div></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-next\" (click)=\"nextPage()\" [attr.aria-label]=\"_intl.nextPageLabel\" [matTooltip]=\"_intl.nextPageLabel\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasNextPage()\"><div class=\"mat-paginator-increment\"></div></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-last\" (click)=\"lastPage()\" [attr.aria-label]=\"_intl.lastPageLabel\" [matTooltip]=\"_intl.lastPageLabel\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasNextPage()\" *ngIf=\"showFirstLastButtons\"><div class=\"mat-paginator-increment\"></div><div class=\"mat-paginator-last\"></div></button></div></div>",
345
- styles: [".mat-paginator{display:block}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;min-height:56px;padding:0 8px;flex-wrap:wrap-reverse}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-decrement-button+.mat-paginator-decrement-button{margin:0 0 0 8px}[dir=rtl] .mat-paginator-decrement-button+.mat-paginator-decrement-button{margin:0 8px 0 0}.mat-paginator-decrement,.mat-paginator-increment{width:8px;height:8px}.mat-paginator-increment,[dir=rtl] .mat-paginator-decrement{transform:rotate(45deg)}.mat-paginator-decrement,[dir=rtl] .mat-paginator-increment{transform:rotate(225deg)}.mat-paginator-increment{margin-left:12px}[dir=rtl] .mat-paginator-increment{margin-right:12px}.mat-paginator-decrement{margin-left:16px}[dir=rtl] .mat-paginator-decrement{margin-right:16px}.mat-paginator-first{transform:rotate(90deg);width:14px;height:8px;float:left;margin-left:3px}.mat-paginator-navigation-first .mat-paginator-decrement{margin-left:21px}.mat-paginator-navigation-last .mat-paginator-increment{float:left;margin-left:9px}.mat-paginator-last{transform:rotate(90deg);width:14px;height:8px;margin-left:15px}.mat-paginator-range-actions{display:flex;align-items:center;min-height:48px}"],
344
+ template: "<div class=\"mat-paginator-container\"><div class=\"mat-paginator-page-size\" *ngIf=\"!hidePageSize\"><div class=\"mat-paginator-page-size-label\">{{_intl.itemsPerPageLabel}}</div><mat-form-field *ngIf=\"_displayedPageSizeOptions.length > 1\" class=\"mat-paginator-page-size-select\"><mat-select [value]=\"pageSize\" [aria-label]=\"_intl.itemsPerPageLabel\" (change)=\"_changePageSize($event.value)\"><mat-option *ngFor=\"let pageSizeOption of _displayedPageSizeOptions\" [value]=\"pageSizeOption\">{{pageSizeOption}}</mat-option></mat-select></mat-form-field><div *ngIf=\"_displayedPageSizeOptions.length <= 1\">{{pageSize}}</div></div><div class=\"mat-paginator-range-actions\"><div class=\"mat-paginator-range-label\">{{_intl.getRangeLabel(pageIndex, pageSize, length)}}</div><button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-first\" (click)=\"firstPage()\" [attr.aria-label]=\"_intl.firstPageLabel\" [matTooltip]=\"_intl.firstPageLabel\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasPreviousPage()\" *ngIf=\"showFirstLastButtons\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-previous\" (click)=\"previousPage()\" [attr.aria-label]=\"_intl.previousPageLabel\" [matTooltip]=\"_intl.previousPageLabel\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasPreviousPage()\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-next\" (click)=\"nextPage()\" [attr.aria-label]=\"_intl.nextPageLabel\" [matTooltip]=\"_intl.nextPageLabel\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasNextPage()\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-last\" (click)=\"lastPage()\" [attr.aria-label]=\"_intl.lastPageLabel\" [matTooltip]=\"_intl.lastPageLabel\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasNextPage()\" *ngIf=\"showFirstLastButtons\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/></svg></button></div></div>",
345
+ styles: [".mat-paginator{display:block}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;min-height:56px;padding:0 8px;flex-wrap:wrap-reverse}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center;min-height:48px}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}"],
346
346
  host: {
347
347
  'class': 'mat-paginator',
348
348
  },
@@ -1 +1 @@
1
- {"version":3,"file":"paginator.js","sources":["../../../src/lib/paginator/index.ts","../../../src/lib/paginator/public-api.ts","../../../src/lib/paginator/paginator-module.ts","../../../src/lib/paginator/paginator.ts","../../../src/lib/paginator/paginator-intl.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './paginator-module';\nexport * from './paginator';\nexport * from './paginator-intl';\n\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatSelectModule} from '@angular/material/select';\nimport {MatTooltipModule} from '@angular/material/tooltip';\nimport {MatPaginator} from './paginator';\nimport {MAT_PAGINATOR_INTL_PROVIDER} from './paginator-intl';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatSelectModule,\n MatTooltipModule,\n ],\n exports: [MatPaginator],\n declarations: [MatPaginator],\n providers: [MAT_PAGINATOR_INTL_PROVIDER],\n})\nexport class MatPaginatorModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport {Subscription} from 'rxjs/Subscription';\nimport {MatPaginatorIntl} from './paginator-intl';\n\n/** The default page size if there is no page size and there are no provided page size options. */\nconst DEFAULT_PAGE_SIZE = 50;\n\n/**\n * Change event object that is emitted when the user selects a\n * different page size or navigates to another page.\n */\nexport class PageEvent {\n /** The current page index. */\n pageIndex: number;\n\n /** The current page size */\n pageSize: number;\n\n /** The current total number of items being paged */\n length: number;\n}\n\n/**\n * Component to provide navigation between paged information. Displays the size of the current\n * page, user-selectable options to change that size, what items are being shown, and\n * navigational button to go to the previous or next page.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-paginator',\n exportAs: 'matPaginator',\n templateUrl: 'paginator.html',\n styleUrls: ['paginator.css'],\n host: {\n 'class': 'mat-paginator',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n})\nexport class MatPaginator implements OnInit, OnDestroy {\n private _initialized: boolean;\n private _intlChanges: Subscription;\n\n /** The zero-based page index of the displayed list of items. Defaulted to 0. */\n @Input()\n get pageIndex(): number { return this._pageIndex; }\n set pageIndex(value: number) {\n this._pageIndex = coerceNumberProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n _pageIndex: number = 0;\n\n /** The length of the total number of items that are being paginated. Defaulted to 0. */\n @Input()\n get length(): number { return this._length; }\n set length(value: number) {\n this._length = coerceNumberProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n _length: number = 0;\n\n /** Number of items to display on a page. By default set to 50. */\n @Input()\n get pageSize(): number { return this._pageSize; }\n set pageSize(value: number) {\n this._pageSize = coerceNumberProperty(value);\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSize: number;\n\n /** The set of provided page size options to display to the user. */\n @Input()\n get pageSizeOptions(): number[] { return this._pageSizeOptions; }\n set pageSizeOptions(value: number[]) {\n this._pageSizeOptions = (value || []).map(p => coerceNumberProperty(p));\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSizeOptions: number[] = [];\n\n /** Whether to hide the page size selection UI from the user. */\n @Input()\n get hidePageSize(): boolean { return this._hidePageSize; }\n set hidePageSize(value: boolean) {\n this._hidePageSize = coerceBooleanProperty(value);\n }\n private _hidePageSize = false;\n\n\n /** Whether to show the first/last buttons UI to the user. */\n @Input()\n get showFirstLastButtons(): boolean { return this._showFirstLastButtons; }\n set showFirstLastButtons(value: boolean) {\n this._showFirstLastButtons = coerceBooleanProperty(value);\n }\n private _showFirstLastButtons = false;\n\n /** Event emitted when the paginator changes the page size or page index. */\n @Output() readonly page: EventEmitter<PageEvent> = new EventEmitter<PageEvent>();\n\n /** Displayed set of page size options. Will be sorted and include current page size. */\n _displayedPageSizeOptions: number[];\n\n constructor(public _intl: MatPaginatorIntl,\n private _changeDetectorRef: ChangeDetectorRef) {\n this._intlChanges = _intl.changes.subscribe(() => this._changeDetectorRef.markForCheck());\n }\n\n ngOnInit() {\n this._initialized = true;\n this._updateDisplayedPageSizeOptions();\n }\n\n ngOnDestroy() {\n this._intlChanges.unsubscribe();\n }\n\n /** Advances to the next page if it exists. */\n nextPage(): void {\n if (!this.hasNextPage()) { return; }\n this.pageIndex++;\n this._emitPageEvent();\n }\n\n /** Move back to the previous page if it exists. */\n previousPage(): void {\n if (!this.hasPreviousPage()) { return; }\n this.pageIndex--;\n this._emitPageEvent();\n }\n\n /** Move to the first page if not already there. */\n firstPage(): void {\n // hasPreviousPage being false implies at the start\n if (!this.hasPreviousPage()) { return; }\n this.pageIndex = 0;\n this._emitPageEvent();\n }\n\n /** Move to the last page if not already there. */\n lastPage(): void {\n // hasNextPage being false implies at the end\n if (!this.hasNextPage()) { return; }\n this.pageIndex = this.getNumberOfPages();\n this._emitPageEvent();\n }\n\n /** Whether there is a previous page. */\n hasPreviousPage(): boolean {\n return this.pageIndex >= 1 && this.pageSize != 0;\n }\n\n /** Whether there is a next page. */\n hasNextPage(): boolean {\n const numberOfPages = this.getNumberOfPages();\n return this.pageIndex < numberOfPages && this.pageSize != 0;\n }\n\n /** Calculate the number of pages */\n getNumberOfPages(): number {\n return Math.ceil(this.length / this.pageSize) - 1;\n }\n\n\n /**\n * Changes the page size so that the first item displayed on the page will still be\n * displayed using the new page size.\n *\n * For example, if the page size is 10 and on the second page (items indexed 10-19) then\n * switching so that the page size is 5 will set the third page as the current page so\n * that the 10th item will still be displayed.\n */\n _changePageSize(pageSize: number) {\n // Current page needs to be updated to reflect the new page size. Navigate to the page\n // containing the previous page's first item.\n const startIndex = this.pageIndex * this.pageSize;\n this.pageIndex = Math.floor(startIndex / pageSize) || 0;\n\n this.pageSize = pageSize;\n this._emitPageEvent();\n }\n\n /**\n * Updates the list of page size options to display to the user. Includes making sure that\n * the page size is an option and that the list is sorted.\n */\n private _updateDisplayedPageSizeOptions() {\n if (!this._initialized) { return; }\n\n // If no page size is provided, use the first page size option or the default page size.\n if (!this.pageSize) {\n this._pageSize = this.pageSizeOptions.length != 0 ?\n this.pageSizeOptions[0] :\n DEFAULT_PAGE_SIZE;\n }\n\n this._displayedPageSizeOptions = this.pageSizeOptions.slice();\n if (this._displayedPageSizeOptions.indexOf(this.pageSize) == -1) {\n this._displayedPageSizeOptions.push(this.pageSize);\n }\n\n // Sort the numbers using a number-specific sort function.\n this._displayedPageSizeOptions.sort((a, b) => a - b);\n\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits an event notifying that a change of the paginator's properties has been triggered. */\n private _emitPageEvent() {\n this.page.emit({\n pageIndex: this.pageIndex,\n pageSize: this.pageSize,\n length: this.length\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, SkipSelf, Optional } from '@angular/core';\nimport {Subject} from 'rxjs/Subject';\n\n/**\n * To modify the labels and text displayed, create a new instance of MatPaginatorIntl and\n * include it in a custom provider\n */\n@Injectable()\nexport class MatPaginatorIntl {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the page size selector. */\n itemsPerPageLabel: string = 'Items per page:';\n\n /** A label for the button that increments the current page. */\n nextPageLabel: string = 'Next page';\n\n /** A label for the button that decrements the current page. */\n previousPageLabel: string = 'Previous page';\n\n /** A label for the button that moves to the first page. */\n firstPageLabel: string = 'First page';\n\n /** A label for the button that moves to the last page. */\n lastPageLabel: string = 'Last page';\n\n /** A label for the range of items within the current page and the length of the whole list. */\n getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length == 0 || pageSize == 0) { return `0 of ${length}`; }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex = startIndex < length ?\n Math.min(startIndex + pageSize, length) :\n startIndex + pageSize;\n\n return `${startIndex + 1} - ${endIndex} of ${length}`;\n }\n}\n\n/** @docs-private */\nexport function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl) {\n return parentIntl || new MatPaginatorIntl();\n}\n\n/** @docs-private */\nexport const MAT_PAGINATOR_INTL_PROVIDER = {\n // If there is already an MatPaginatorIntl available, use that. Otherwise, provide a new one.\n provide: MatPaginatorIntl,\n deps: [[new Optional(), new SkipSelf(), MatPaginatorIntl]],\n useFactory: MAT_PAGINATOR_INTL_PROVIDER_FACTORY\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AIQA,AACA;;;;AAOA,AAAA,MAAA,gBAAA,CAAA;;;;;;QAKA,IAAA,CAAA,OAAA,GAAoC,IAAI,OAAO,EAAQ,CAAvD;;;;QAGA,IAAA,CAAA,iBAAA,GAA8B,i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A,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA;IASA,iBAAA,EAAG,CAAH,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA;IASA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA;IASA,sBAAA,EAAA,CAAA,EAAA,IAAA,EAAQ,KAAR,EAAA,EAAA;IASA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAG,EAAH;CASA,CAAA,AAQA;;;;;;;AD7GA,AACA,AACA,AACA,AACA,AACA,AACA,AAcA,AAAA,MAAA,kBAAA,CAAA;;;IAXA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,eAAe;oBACf,eAAe;oBACf,gBAAgB;iBACjB;gBACD,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,SAAS,EAAE,CAAC,2BAA2B,CAAC;aACzC,EAAD,EAAA;;;;;;;;GDnBA,AACA,AACA,AAAiC;;;;;;;;GDNjC,AAA6B;;"}
1
+ {"version":3,"file":"paginator.js","sources":["../../../src/lib/paginator/index.ts","../../../src/lib/paginator/public-api.ts","../../../src/lib/paginator/paginator-module.ts","../../../src/lib/paginator/paginator.ts","../../../src/lib/paginator/paginator-intl.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './paginator-module';\nexport * from './paginator';\nexport * from './paginator-intl';\n\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatSelectModule} from '@angular/material/select';\nimport {MatTooltipModule} from '@angular/material/tooltip';\nimport {MatPaginator} from './paginator';\nimport {MAT_PAGINATOR_INTL_PROVIDER} from './paginator-intl';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatSelectModule,\n MatTooltipModule,\n ],\n exports: [MatPaginator],\n declarations: [MatPaginator],\n providers: [MAT_PAGINATOR_INTL_PROVIDER],\n})\nexport class MatPaginatorModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport {Subscription} from 'rxjs/Subscription';\nimport {MatPaginatorIntl} from './paginator-intl';\n\n/** The default page size if there is no page size and there are no provided page size options. */\nconst DEFAULT_PAGE_SIZE = 50;\n\n/**\n * Change event object that is emitted when the user selects a\n * different page size or navigates to another page.\n */\nexport class PageEvent {\n /** The current page index. */\n pageIndex: number;\n\n /** The current page size */\n pageSize: number;\n\n /** The current total number of items being paged */\n length: number;\n}\n\n/**\n * Component to provide navigation between paged information. Displays the size of the current\n * page, user-selectable options to change that size, what items are being shown, and\n * navigational button to go to the previous or next page.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-paginator',\n exportAs: 'matPaginator',\n templateUrl: 'paginator.html',\n styleUrls: ['paginator.css'],\n host: {\n 'class': 'mat-paginator',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n})\nexport class MatPaginator implements OnInit, OnDestroy {\n private _initialized: boolean;\n private _intlChanges: Subscription;\n\n /** The zero-based page index of the displayed list of items. Defaulted to 0. */\n @Input()\n get pageIndex(): number { return this._pageIndex; }\n set pageIndex(value: number) {\n this._pageIndex = coerceNumberProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n _pageIndex: number = 0;\n\n /** The length of the total number of items that are being paginated. Defaulted to 0. */\n @Input()\n get length(): number { return this._length; }\n set length(value: number) {\n this._length = coerceNumberProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n _length: number = 0;\n\n /** Number of items to display on a page. By default set to 50. */\n @Input()\n get pageSize(): number { return this._pageSize; }\n set pageSize(value: number) {\n this._pageSize = coerceNumberProperty(value);\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSize: number;\n\n /** The set of provided page size options to display to the user. */\n @Input()\n get pageSizeOptions(): number[] { return this._pageSizeOptions; }\n set pageSizeOptions(value: number[]) {\n this._pageSizeOptions = (value || []).map(p => coerceNumberProperty(p));\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSizeOptions: number[] = [];\n\n /** Whether to hide the page size selection UI from the user. */\n @Input()\n get hidePageSize(): boolean { return this._hidePageSize; }\n set hidePageSize(value: boolean) {\n this._hidePageSize = coerceBooleanProperty(value);\n }\n private _hidePageSize = false;\n\n\n /** Whether to show the first/last buttons UI to the user. */\n @Input()\n get showFirstLastButtons(): boolean { return this._showFirstLastButtons; }\n set showFirstLastButtons(value: boolean) {\n this._showFirstLastButtons = coerceBooleanProperty(value);\n }\n private _showFirstLastButtons = false;\n\n /** Event emitted when the paginator changes the page size or page index. */\n @Output() readonly page: EventEmitter<PageEvent> = new EventEmitter<PageEvent>();\n\n /** Displayed set of page size options. Will be sorted and include current page size. */\n _displayedPageSizeOptions: number[];\n\n constructor(public _intl: MatPaginatorIntl,\n private _changeDetectorRef: ChangeDetectorRef) {\n this._intlChanges = _intl.changes.subscribe(() => this._changeDetectorRef.markForCheck());\n }\n\n ngOnInit() {\n this._initialized = true;\n this._updateDisplayedPageSizeOptions();\n }\n\n ngOnDestroy() {\n this._intlChanges.unsubscribe();\n }\n\n /** Advances to the next page if it exists. */\n nextPage(): void {\n if (!this.hasNextPage()) { return; }\n this.pageIndex++;\n this._emitPageEvent();\n }\n\n /** Move back to the previous page if it exists. */\n previousPage(): void {\n if (!this.hasPreviousPage()) { return; }\n this.pageIndex--;\n this._emitPageEvent();\n }\n\n /** Move to the first page if not already there. */\n firstPage(): void {\n // hasPreviousPage being false implies at the start\n if (!this.hasPreviousPage()) { return; }\n this.pageIndex = 0;\n this._emitPageEvent();\n }\n\n /** Move to the last page if not already there. */\n lastPage(): void {\n // hasNextPage being false implies at the end\n if (!this.hasNextPage()) { return; }\n this.pageIndex = this.getNumberOfPages();\n this._emitPageEvent();\n }\n\n /** Whether there is a previous page. */\n hasPreviousPage(): boolean {\n return this.pageIndex >= 1 && this.pageSize != 0;\n }\n\n /** Whether there is a next page. */\n hasNextPage(): boolean {\n const numberOfPages = this.getNumberOfPages();\n return this.pageIndex < numberOfPages && this.pageSize != 0;\n }\n\n /** Calculate the number of pages */\n getNumberOfPages(): number {\n return Math.ceil(this.length / this.pageSize) - 1;\n }\n\n\n /**\n * Changes the page size so that the first item displayed on the page will still be\n * displayed using the new page size.\n *\n * For example, if the page size is 10 and on the second page (items indexed 10-19) then\n * switching so that the page size is 5 will set the third page as the current page so\n * that the 10th item will still be displayed.\n */\n _changePageSize(pageSize: number) {\n // Current page needs to be updated to reflect the new page size. Navigate to the page\n // containing the previous page's first item.\n const startIndex = this.pageIndex * this.pageSize;\n this.pageIndex = Math.floor(startIndex / pageSize) || 0;\n\n this.pageSize = pageSize;\n this._emitPageEvent();\n }\n\n /**\n * Updates the list of page size options to display to the user. Includes making sure that\n * the page size is an option and that the list is sorted.\n */\n private _updateDisplayedPageSizeOptions() {\n if (!this._initialized) { return; }\n\n // If no page size is provided, use the first page size option or the default page size.\n if (!this.pageSize) {\n this._pageSize = this.pageSizeOptions.length != 0 ?\n this.pageSizeOptions[0] :\n DEFAULT_PAGE_SIZE;\n }\n\n this._displayedPageSizeOptions = this.pageSizeOptions.slice();\n if (this._displayedPageSizeOptions.indexOf(this.pageSize) == -1) {\n this._displayedPageSizeOptions.push(this.pageSize);\n }\n\n // Sort the numbers using a number-specific sort function.\n this._displayedPageSizeOptions.sort((a, b) => a - b);\n\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits an event notifying that a change of the paginator's properties has been triggered. */\n private _emitPageEvent() {\n this.page.emit({\n pageIndex: this.pageIndex,\n pageSize: this.pageSize,\n length: this.length\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, SkipSelf, Optional } from '@angular/core';\nimport {Subject} from 'rxjs/Subject';\n\n/**\n * To modify the labels and text displayed, create a new instance of MatPaginatorIntl and\n * include it in a custom provider\n */\n@Injectable()\nexport class MatPaginatorIntl {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the page size selector. */\n itemsPerPageLabel: string = 'Items per page:';\n\n /** A label for the button that increments the current page. */\n nextPageLabel: string = 'Next page';\n\n /** A label for the button that decrements the current page. */\n previousPageLabel: string = 'Previous page';\n\n /** A label for the button that moves to the first page. */\n firstPageLabel: string = 'First page';\n\n /** A label for the button that moves to the last page. */\n lastPageLabel: string = 'Last page';\n\n /** A label for the range of items within the current page and the length of the whole list. */\n getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length == 0 || pageSize == 0) { return `0 of ${length}`; }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex = startIndex < length ?\n Math.min(startIndex + pageSize, length) :\n startIndex + pageSize;\n\n return `${startIndex + 1} - ${endIndex} of ${length}`;\n }\n}\n\n/** @docs-private */\nexport function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl) {\n return parentIntl || new MatPaginatorIntl();\n}\n\n/** @docs-private */\nexport const MAT_PAGINATOR_INTL_PROVIDER = {\n // If there is already an MatPaginatorIntl available, use that. Otherwise, provide a new one.\n provide: MatPaginatorIntl,\n deps: [[new Optional(), new SkipSelf(), MatPaginatorIntl]],\n useFactory: MAT_PAGINATOR_INTL_PROVIDER_FACTORY\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AIQA,AACA;;;;AAOA,AAAA,MAAA,gBAAA,CAAA;;;;;;QAKA,IAAA,CAAA,OAAA,GAAoC,IAAI,OAAO,EAAQ,CAAvD;;;;QAGA,IAAA,CAAA,iBAAA,GAA8B,iBAAiB,CAA/C;;;;QAGA,IAAA,CAAA,aAAA,GAA0B,WAAW,CAArC;;;;QAGA,IAAA,CAAA,iBAAA,GAA8B,eAAe,CAA7C;;;;QAGA,IAAA,CAAA,cAAA,GAA2B,YAAY,CAAvC;;;;QAGA,IAAA,CAAA,aAAA,GAA0B,WAAW,CAArC;;;;QAGA,IAAA,CAAA,aAAA,GAAkB,CAAC,IAAY,EAAE,QAAgB,EAAE,MAAc,KAAjE;YACI,IAAI,MAAM,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,EAAE;gBAAE,OAAO,CAA/C,KAAA,EAAuD,MAAM,CAA7D,CAA+D,CAAC;aAAE;YAE9D,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YAE7B,uBAAM,UAAU,GAAG,IAAI,GAAG,QAAQ,CAAC;;YAGnC,uBAAM,QAAQ,GAAG,UAAU,GAAG,MAAM;gBAChC,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,QAAQ,EAAE,MAAM,CAAC;gBACvC,UAAU,GAAG,QAAQ,CAAC;YAE1B,OAAO,CAAX,EAAc,UAAU,GAAG,CAAC,CAA5B,GAAA,EAAkC,QAAQ,CAA1C,IAAA,EAAiD,MAAM,CAAvD,CAAyD,CAAC;SACvD,CAAH;;;;IArCA,EAAA,IAAA,EAAC,UAAU,EAAX;;;;;;;;;AAyCA,AAAA,SAAA,mCAAA,CAA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AAQ,EAAE,cAAZ;gBACE,QAAQ,EAAE,67EAAZ;gBACE,MAAF,EAAU,CAAV,mkBAAA,CAAA;gBACE,IAAF,EAAA;oBACA,OAAa,EAAb,eAA8B;iBAC9B;gBACA,eAAA,EAAA,uBAAA,CAAA,MAAA;gBACA,aAAA,EAAA,iBAAA,CAAA,IAAA;gBACE,mBAAF,EAAA,KAAA;aACA,EAAA,EAAA;CACA,CAAA;;;;;CApCA,CAAA;AAVA,YAAE,CAAF,cAAA,GAAA;;;IAqDA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA;IASA,iBAAA,EAAG,CAAH,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA;IASA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA;IASA,sBAAA,EAAA,CAAA,EAAA,IAAA,EAAQ,KAAR,EAAA,EAAA;IASA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAG,EAAH;CASA,CAAA,AAQA;;;;;;;AD7GA,AACA,AACA,AACA,AACA,AACA,AACA,AAcA,AAAA,MAAA,kBAAA,CAAA;;;IAXA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,eAAe;oBACf,eAAe;oBACf,gBAAgB;iBACjB;gBACD,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,SAAS,EAAE,CAAC,2BAA2B,CAAC;aACzC,EAAD,EAAA;;;;;;;;GDnBA,AACA,AACA,AAAiC;;;;;;;;GDNjC,AAA6B;;"}
@@ -38,26 +38,30 @@ class MatProgressSpinnerBase {
38
38
  }
39
39
  }
40
40
  const _MatProgressSpinnerMixinBase = mixinColor(MatProgressSpinnerBase, 'primary');
41
+ // .0001 percentage difference is necessary in order to avoid unwanted animation frames
42
+ // for example because the animation duration is 4 seconds, .1% accounts to 4ms
43
+ // which are enough to see the flicker described in
44
+ // https://github.com/angular/material2/issues/8984
41
45
  const INDETERMINATE_ANIMATION_TEMPLATE = `
42
46
  @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {
43
47
  0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }
44
48
  12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }
45
- 12.51% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }
49
+ 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }
46
50
  25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }
47
51
 
48
- 25.1% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }
52
+ 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }
49
53
  37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }
50
- 37.51% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }
54
+ 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }
51
55
  50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }
52
56
 
53
- 50.01% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }
57
+ 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }
54
58
  62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }
55
- 62.51% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }
59
+ 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }
56
60
  75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }
57
61
 
58
- 75.01% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }
62
+ 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }
59
63
  87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }
60
- 87.51% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }
64
+ 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }
61
65
  100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }
62
66
  }
63
67
  `;
@@ -245,7 +249,7 @@ MatProgressSpinner.decorators = [
245
249
  },
246
250
  inputs: ['color'],
247
251
  template: "<svg [style.width.px]=\"_elementSize\" [style.height.px]=\"_elementSize\" [attr.viewBox]=\"_viewBox\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\"><circle cx=\"50%\" cy=\"50%\" [attr.r]=\"_circleRadius\" [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + diameter\" [style.stroke-dashoffset.px]=\"_strokeDashOffset\" [style.stroke-dasharray.px]=\"_strokeCircumference\" [style.stroke-width.%]=\"_circleStrokeWidth\"></circle></svg>",
248
- styles: [".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.51%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.1%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.51%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.01%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.51%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.01%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.51%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],
252
+ styles: [".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],
249
253
  changeDetection: ChangeDetectionStrategy.OnPush,
250
254
  encapsulation: ViewEncapsulation.None,
251
255
  preserveWhitespaces: false,
@@ -291,7 +295,7 @@ MatSpinner.decorators = [
291
295
  },
292
296
  inputs: ['color'],
293
297
  template: "<svg [style.width.px]=\"_elementSize\" [style.height.px]=\"_elementSize\" [attr.viewBox]=\"_viewBox\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\"><circle cx=\"50%\" cy=\"50%\" [attr.r]=\"_circleRadius\" [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + diameter\" [style.stroke-dashoffset.px]=\"_strokeDashOffset\" [style.stroke-dasharray.px]=\"_strokeCircumference\" [style.stroke-width.%]=\"_circleStrokeWidth\"></circle></svg>",
294
- styles: [".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.51%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.1%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.51%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.01%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.51%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.01%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.51%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],
298
+ styles: [".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],
295
299
  changeDetection: ChangeDetectionStrategy.OnPush,
296
300
  encapsulation: ViewEncapsulation.None,
297
301
  preserveWhitespaces: false,
@@ -1 +1 @@
1
- {"version":3,"file":"progress-spinner.js","sources":["../../../src/lib/progress-spinner/index.ts","../../../src/lib/progress-spinner/public-api.ts","../../../src/lib/progress-spinner/progress-spinner-module.ts","../../../src/lib/progress-spinner/progress-spinner.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './progress-spinner-module';\nexport * from './progress-spinner';\n\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatCommonModule, PlatformModule],\n exports: [\n MatProgressSpinner,\n MatSpinner,\n MatCommonModule\n ],\n declarations: [\n MatProgressSpinner,\n MatSpinner\n ],\n})\nclass MatProgressSpinnerModule {}\n\nexport {MatProgressSpinnerModule};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Component,\n ChangeDetectionStrategy,\n Input,\n ElementRef,\n SimpleChanges,\n OnChanges,\n ViewEncapsulation,\n Optional,\n Inject,\n} from '@angular/core';\nimport {CanColor, mixinColor} from '@angular/material/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/**\n * Base reference size of the spinner.\n * @docs-private\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n * @docs-private\n */\nconst BASE_STROKE_WIDTH = 10;\n\n// Boilerplate for applying mixins to MatProgressSpinner.\n/** @docs-private */\nexport class MatProgressSpinnerBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatProgressSpinnerMixinBase = mixinColor(MatProgressSpinnerBase, 'primary');\n\nconst INDETERMINATE_ANIMATION_TEMPLATE = `\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.51% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.1% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.51% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.01% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.51% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.01% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.51% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n`;\n\n/**\n * `<mat-progress-spinner>` component.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-progress-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-progress-spinner',\n '[style.width.px]': '_elementSize',\n '[style.height.px]': '_elementSize',\n '[attr.aria-valuemin]': 'mode === \"determinate\" ? 0 : null',\n '[attr.aria-valuemax]': 'mode === \"determinate\" ? 100 : null',\n '[attr.aria-valuenow]': 'value',\n '[attr.mode]': 'mode',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n})\nexport class MatProgressSpinner extends _MatProgressSpinnerMixinBase implements CanColor,\n OnChanges {\n\n private _value = 0;\n private _strokeWidth: number;\n private _fallbackAnimation = false;\n\n /** The width and height of the host element. Will grow with stroke width. */\n _elementSize = BASE_SIZE;\n\n /** Tracks diameters of existing instances to de-dupe generated styles (default d = 100) */\n private static diameters = new Set<number>([BASE_SIZE]);\n\n /**\n * Used for storing all of the generated keyframe animations.\n * @dynamic\n */\n private static styleTag: HTMLStyleElement|null = null;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input()\n get diameter(): number { return this._diameter; }\n set diameter(size: number) {\n this._diameter = coerceNumberProperty(size);\n\n if (!this._fallbackAnimation && !MatProgressSpinner.diameters.has(this._diameter)) {\n this._attachStyleNode();\n }\n this._updateElementSize();\n }\n private _diameter = BASE_SIZE;\n\n /** Stroke width of the progress spinner. */\n @Input()\n get strokeWidth(): number {\n return this._strokeWidth || this.diameter / 10;\n }\n set strokeWidth(value: number) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n\n\n /** Mode of the progress circle */\n @Input() mode: ProgressSpinnerMode = 'determinate';\n\n /** Value of the progress circle. */\n @Input()\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(newValue: number) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));\n }\n\n constructor(public _elementRef: ElementRef,\n platform: Platform,\n @Optional() @Inject(DOCUMENT) private _document: any) {\n\n super(_elementRef);\n this._fallbackAnimation = platform.EDGE || platform.TRIDENT;\n\n // On IE and Edge, we can't animate the `stroke-dashoffset`\n // reliably so we fall back to a non-spec animation.\n const animationClass =\n `mat-progress-spinner-indeterminate${this._fallbackAnimation ? '-fallback' : ''}-animation`;\n\n _elementRef.nativeElement.classList.add(animationClass);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.strokeWidth || changes.diameter) {\n this._updateElementSize();\n }\n }\n\n /** The radius of the spinner, adjusted for stroke width. */\n get _circleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n get _viewBox() {\n const viewBox = this._circleRadius * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n get _strokeCircumference(): number {\n return 2 * Math.PI * this._circleRadius;\n }\n\n /** The dash offset of the svg circle. */\n get _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return this._strokeCircumference * (100 - this._value) / 100;\n }\n\n // In fallback mode set the circle to 80% and rotate it with CSS.\n if (this._fallbackAnimation && this.mode === 'indeterminate') {\n return this._strokeCircumference * 0.2;\n }\n\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n get _circleStrokeWidth() {\n return this.strokeWidth / this._elementSize * 100;\n }\n\n /** Dynamically generates a style tag containing the correct animation for this diameter. */\n private _attachStyleNode(): void {\n let styleTag = MatProgressSpinner.styleTag;\n\n if (!styleTag) {\n styleTag = this._document.createElement('style');\n this._document.head.appendChild(styleTag);\n MatProgressSpinner.styleTag = styleTag;\n }\n\n if (styleTag && styleTag.sheet) {\n (styleTag.sheet as CSSStyleSheet).insertRule(this._getAnimationText(), 0);\n }\n\n MatProgressSpinner.diameters.add(this.diameter);\n }\n\n /** Generates animation styles adjusted for the spinner's diameter. */\n private _getAnimationText(): string {\n return INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * this._strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * this._strokeCircumference}`)\n .replace(/DIAMETER/g, `${this.diameter}`);\n }\n\n /** Updates the spinner element size based on its diameter. */\n private _updateElementSize() {\n this._elementSize = this._diameter + Math.max(this.strokeWidth - BASE_STROKE_WIDTH, 0);\n }\n}\n\n\n/**\n * `<mat-spinner>` component.\n *\n * This is a component definition to be used as a convenience reference to create an\n * indeterminate `<mat-progress-spinner>` instance.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-spinner',\n host: {\n 'role': 'progressbar',\n 'mode': 'indeterminate',\n 'class': 'mat-spinner mat-progress-spinner',\n '[style.width.px]': '_elementSize',\n '[style.height.px]': '_elementSize',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n})\nexport class MatSpinner extends MatProgressSpinner {\n constructor(elementRef: ElementRef, platform: Platform,\n @Optional() @Inject(DOCUMENT) document: any) {\n super(elementRef, platform, document);\n this.mode = 'indeterminate';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AGQA,AAWA,AACA,AACA,AACA;;;;AASA,MAAM,SAAS,GAAG,GAAG,CAAC;;;;;AAMtB,MAAM,iBAAiB,GAAG,EAAE,CAAC;;;;AAI7B,AAAA,MAAA,sBAAA,CAAA;;;;IACE,WAAF,CAAqB,WAAuB,EAA5C;QAAqB,IAArB,CAAA,WAAgC,GAAX,WAAW,CAAY;KAAI;CAC/C;AACD,AAAO,MAAM,4BAA4B,GAAG,UAAU,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;AAE1F,MAAM,gCAAgC,GAAG,CAAzC;;;;;;;;;;;;;;;;;;;;;;AAsBA,CAAC,CAAC;;;;AA0BF,AAAA,MAAA,kBAAgC,SAAQ,4BAA4B,CAApE;;;;;;IAsDE,WAAF,CAAqB,WAAuB,EAC9B,QAAkB,EACoB,SAFpD,EAAA;QAII,KAAK,CAAC,WAAW,CAAC,CAAC;QAJF,IAArB,CAAA,WAAgC,GAAX,WAAW,CAAY;QAEQ,IAApD,CAAA,SAA6D,GAAT,SAAS,CAA7D;QArDA,IAAA,CAAA,MAAA,GAAmB,CAAC,CAApB;QAEA,IAAA,CAAA,kBAAA,GAA+B,KAAK,CAApC;;;;QAGA,IAAA,CAAA,YAAA,GAAiB,SAAS,CAA1B;QAsBA,IAAA,CAAA,SAAA,GAAsB,SAAS,CAA/B;;;;QAaA,IAAA,CAAA,IAAA,GAAuC,aAAa,CAApD;QAgBI,IAAI,CAAC,kBAAk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AA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC;gBAC1C,OAAO,EAAE;oBACP,kBAAkB;oBAClB,UAAU;oBACV,eAAe;iBAChB;gBACD,YAAY,EAAE;oBACZ,kBAAkB;oBAClB,UAAU;iBACX;aACF,EAAD,EAAA;;;mDAGA,AAAkC;;;;;GDlBlC,AACA,AAAmC;;;;;;;;GDLnC,AAA6B;;"}
1
+ {"version":3,"file":"progress-spinner.js","sources":["../../../src/lib/progress-spinner/index.ts","../../../src/lib/progress-spinner/public-api.ts","../../../src/lib/progress-spinner/progress-spinner-module.ts","../../../src/lib/progress-spinner/progress-spinner.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './progress-spinner-module';\nexport * from './progress-spinner';\n\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatCommonModule, PlatformModule],\n exports: [\n MatProgressSpinner,\n MatSpinner,\n MatCommonModule\n ],\n declarations: [\n MatProgressSpinner,\n MatSpinner\n ],\n})\nclass MatProgressSpinnerModule {}\n\nexport {MatProgressSpinnerModule};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Component,\n ChangeDetectionStrategy,\n Input,\n ElementRef,\n SimpleChanges,\n OnChanges,\n ViewEncapsulation,\n Optional,\n Inject,\n} from '@angular/core';\nimport {CanColor, mixinColor} from '@angular/material/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/**\n * Base reference size of the spinner.\n * @docs-private\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n * @docs-private\n */\nconst BASE_STROKE_WIDTH = 10;\n\n// Boilerplate for applying mixins to MatProgressSpinner.\n/** @docs-private */\nexport class MatProgressSpinnerBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatProgressSpinnerMixinBase = mixinColor(MatProgressSpinnerBase, 'primary');\n\n// .0001 percentage difference is necessary in order to avoid unwanted animation frames\n// for example because the animation duration is 4 seconds, .1% accounts to 4ms\n// which are enough to see the flicker described in\n// https://github.com/angular/material2/issues/8984\nconst INDETERMINATE_ANIMATION_TEMPLATE = `\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n`;\n\n/**\n * `<mat-progress-spinner>` component.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-progress-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-progress-spinner',\n '[style.width.px]': '_elementSize',\n '[style.height.px]': '_elementSize',\n '[attr.aria-valuemin]': 'mode === \"determinate\" ? 0 : null',\n '[attr.aria-valuemax]': 'mode === \"determinate\" ? 100 : null',\n '[attr.aria-valuenow]': 'value',\n '[attr.mode]': 'mode',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n})\nexport class MatProgressSpinner extends _MatProgressSpinnerMixinBase implements CanColor,\n OnChanges {\n\n private _value = 0;\n private _strokeWidth: number;\n private _fallbackAnimation = false;\n\n /** The width and height of the host element. Will grow with stroke width. */\n _elementSize = BASE_SIZE;\n\n /** Tracks diameters of existing instances to de-dupe generated styles (default d = 100) */\n private static diameters = new Set<number>([BASE_SIZE]);\n\n /**\n * Used for storing all of the generated keyframe animations.\n * @dynamic\n */\n private static styleTag: HTMLStyleElement|null = null;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input()\n get diameter(): number { return this._diameter; }\n set diameter(size: number) {\n this._diameter = coerceNumberProperty(size);\n\n if (!this._fallbackAnimation && !MatProgressSpinner.diameters.has(this._diameter)) {\n this._attachStyleNode();\n }\n this._updateElementSize();\n }\n private _diameter = BASE_SIZE;\n\n /** Stroke width of the progress spinner. */\n @Input()\n get strokeWidth(): number {\n return this._strokeWidth || this.diameter / 10;\n }\n set strokeWidth(value: number) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n\n\n /** Mode of the progress circle */\n @Input() mode: ProgressSpinnerMode = 'determinate';\n\n /** Value of the progress circle. */\n @Input()\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(newValue: number) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));\n }\n\n constructor(public _elementRef: ElementRef,\n platform: Platform,\n @Optional() @Inject(DOCUMENT) private _document: any) {\n\n super(_elementRef);\n this._fallbackAnimation = platform.EDGE || platform.TRIDENT;\n\n // On IE and Edge, we can't animate the `stroke-dashoffset`\n // reliably so we fall back to a non-spec animation.\n const animationClass =\n `mat-progress-spinner-indeterminate${this._fallbackAnimation ? '-fallback' : ''}-animation`;\n\n _elementRef.nativeElement.classList.add(animationClass);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.strokeWidth || changes.diameter) {\n this._updateElementSize();\n }\n }\n\n /** The radius of the spinner, adjusted for stroke width. */\n get _circleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n get _viewBox() {\n const viewBox = this._circleRadius * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n get _strokeCircumference(): number {\n return 2 * Math.PI * this._circleRadius;\n }\n\n /** The dash offset of the svg circle. */\n get _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return this._strokeCircumference * (100 - this._value) / 100;\n }\n\n // In fallback mode set the circle to 80% and rotate it with CSS.\n if (this._fallbackAnimation && this.mode === 'indeterminate') {\n return this._strokeCircumference * 0.2;\n }\n\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n get _circleStrokeWidth() {\n return this.strokeWidth / this._elementSize * 100;\n }\n\n /** Dynamically generates a style tag containing the correct animation for this diameter. */\n private _attachStyleNode(): void {\n let styleTag = MatProgressSpinner.styleTag;\n\n if (!styleTag) {\n styleTag = this._document.createElement('style');\n this._document.head.appendChild(styleTag);\n MatProgressSpinner.styleTag = styleTag;\n }\n\n if (styleTag && styleTag.sheet) {\n (styleTag.sheet as CSSStyleSheet).insertRule(this._getAnimationText(), 0);\n }\n\n MatProgressSpinner.diameters.add(this.diameter);\n }\n\n /** Generates animation styles adjusted for the spinner's diameter. */\n private _getAnimationText(): string {\n return INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * this._strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * this._strokeCircumference}`)\n .replace(/DIAMETER/g, `${this.diameter}`);\n }\n\n /** Updates the spinner element size based on its diameter. */\n private _updateElementSize() {\n this._elementSize = this._diameter + Math.max(this.strokeWidth - BASE_STROKE_WIDTH, 0);\n }\n}\n\n\n/**\n * `<mat-spinner>` component.\n *\n * This is a component definition to be used as a convenience reference to create an\n * indeterminate `<mat-progress-spinner>` instance.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-spinner',\n host: {\n 'role': 'progressbar',\n 'mode': 'indeterminate',\n 'class': 'mat-spinner mat-progress-spinner',\n '[style.width.px]': '_elementSize',\n '[style.height.px]': '_elementSize',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n})\nexport class MatSpinner extends MatProgressSpinner {\n constructor(elementRef: ElementRef, platform: Platform,\n @Optional() @Inject(DOCUMENT) document: any) {\n super(elementRef, platform, document);\n this.mode = 'indeterminate';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AGQA,AAWA,AACA,AACA,AACA;;;;AASA,MAAM,SAAS,GAAG,GAAG,CAAC;;;;;AAMtB,MAAM,iBAAiB,GAAG,EAAE,CAAC;;;;AAI7B,AAAA,MAAA,sB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A,cAAA,GAAA;;;IApCA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,EAAQ;IAaR,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,EAAA;CAUA,CAAA;AAGA;;;;;;;;;;;;;;QAyHA,IAAA,CAAA,IAAA,GAAA,eAAA,CAAwD;KAExD;CACA;AACA,UAAA,CAAA,UAAA,GAAA;;;oBAtBA,MAAA,EAAA,aAAA;oBACA,MAAY,EAAZ,eAAA;oBACA,OAAA,EAAA,kCAAA;oBACM,kBAAN,EAAA,cAAA;oBACI,mBAAJ,EAAyB,cAAzB;iBACA;gBACA,MAAA,EAAA,CAAA,OAAA,CAAA;gBACA,QAAA,EAAA,4cAAA;gBACA,MAAA,EAAA,CAAA,q5EAAA,CAAA;gBACA,eAAA,EAAA,uBAAA,CAAA,MAAA;gBACE,aAAF,EAAA,iBAAA,CAAA,IAAA;gBACE,mBAAF,EAAA,KAAA;aACA,EAAA,EAAA;CACA,CAAA;;AAEA,UAAA,CAAA,cAAA,GAAA,MAAA;IACA,EAAA,IAAA,EAAA,UAAA,GAAA;;;EA3PA;;;;;;ADLA,AACA,AACA,AACA,AAEA,MAAA,wBAAA,CAAA;;;IAAA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC;gBAC1C,OAAO,EAAE;oBACP,kBAAkB;oBAClB,UAAU;oBACV,eAAe;iBAChB;gBACD,YAAY,EAAE;oBACZ,kBAAkB;oBAClB,UAAU;iBACX;aACF,EAAD,EAAA;;;mDAGA,AAAkC;;;;;GDlBlC,AACA,AAAmC;;;;;;;;GDLnC,AAA6B;;"}
package/esm2015/select.js CHANGED
@@ -362,7 +362,7 @@ class MatSelect extends _MatSelectMixinBase {
362
362
  .pipe(take(1), switchMap(() => this.optionSelectionChanges));
363
363
  });
364
364
  /**
365
- * Event emitted when the select has been opened.
365
+ * Event emitted when the select panel has been toggled.
366
366
  */
367
367
  this.openedChange = new EventEmitter();
368
368
  /**
@@ -1319,8 +1319,8 @@ class MatSelect extends _MatSelectMixinBase {
1319
1319
  MatSelect.decorators = [
1320
1320
  { type: Component, args: [{selector: 'mat-select',
1321
1321
  exportAs: 'matSelect',
1322
- template: "<div cdk-overlay-origin class=\"mat-select-trigger\" aria-hidden=\"true\" (click)=\"toggle()\" #origin=\"cdkOverlayOrigin\" #trigger><div class=\"mat-select-value\" [ngSwitch]=\"empty\"><span class=\"mat-select-placeholder\" *ngSwitchCase=\"true\">{{placeholder || '\u00A0'}}</span> <span class=\"mat-select-value-text\" *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\"><span *ngSwitchDefault>{{triggerValue}}</span><ng-content select=\"mat-select-trigger\" *ngSwitchCase=\"true\"></ng-content></span></div><div class=\"mat-select-arrow-wrapper\"><div class=\"mat-select-arrow\"></div></div></div><ng-template cdk-connected-overlay hasBackdrop backdropClass=\"cdk-overlay-transparent-backdrop\" [scrollStrategy]=\"_scrollStrategy\" [origin]=\"origin\" [open]=\"panelOpen\" [positions]=\"_positions\" [minWidth]=\"_triggerRect?.width\" [offsetY]=\"_offsetY\" (backdropClick)=\"close()\" (attach)=\"_onAttached()\" (detach)=\"close()\"><div #panel class=\"mat-select-panel {{ _getPanelTheme() }}\" [ngClass]=\"panelClass\" [@transformPanel]=\"multiple ? 'showing-multiple' : 'showing'\" (@transformPanel.done)=\"_onPanelDone()\" [style.transformOrigin]=\"_transformOrigin\" [class.mat-select-panel-done-animating]=\"_panelDoneAnimating\" [style.font-size.px]=\"_triggerFontSize\" (keydown)=\"_handleKeydown($event)\"><div class=\"mat-select-content\" [@fadeInContent]=\"'showing'\" (@fadeInContent.done)=\"_onFadeInDone()\"><ng-content></ng-content></div></div></ng-template>",
1323
- styles: [".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel{-webkit-backface-visibility:hidden;backface-visibility:hidden;min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%}.mat-select-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;transition:none}"],
1322
+ template: "<div cdk-overlay-origin class=\"mat-select-trigger\" aria-hidden=\"true\" (click)=\"toggle()\" #origin=\"cdkOverlayOrigin\" #trigger><div class=\"mat-select-value\" [ngSwitch]=\"empty\"><span class=\"mat-select-placeholder\" *ngSwitchCase=\"true\">{{placeholder || '\u00A0'}}</span> <span class=\"mat-select-value-text\" *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\"><span *ngSwitchDefault>{{triggerValue}}</span><ng-content select=\"mat-select-trigger\" *ngSwitchCase=\"true\"></ng-content></span></div><div class=\"mat-select-arrow-wrapper\"><div class=\"mat-select-arrow\"></div></div></div><ng-template cdk-connected-overlay hasBackdrop cdkConnectedOverlayLockPosition backdropClass=\"cdk-overlay-transparent-backdrop\" [scrollStrategy]=\"_scrollStrategy\" [origin]=\"origin\" [open]=\"panelOpen\" [positions]=\"_positions\" [minWidth]=\"_triggerRect?.width\" [offsetY]=\"_offsetY\" (backdropClick)=\"close()\" (attach)=\"_onAttached()\" (detach)=\"close()\"><div #panel class=\"mat-select-panel {{ _getPanelTheme() }}\" [ngClass]=\"panelClass\" [@transformPanel]=\"multiple ? 'showing-multiple' : 'showing'\" (@transformPanel.done)=\"_onPanelDone()\" [style.transformOrigin]=\"_transformOrigin\" [class.mat-select-panel-done-animating]=\"_panelDoneAnimating\" [style.font-size.px]=\"_triggerFontSize\" (keydown)=\"_handleKeydown($event)\"><div class=\"mat-select-content\" [@fadeInContent]=\"'showing'\" (@fadeInContent.done)=\"_onFadeInDone()\"><ng-content></ng-content></div></div></ng-template>",
1323
+ styles: [".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%}.mat-select-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;transition:none}"],
1324
1324
  inputs: ['disabled', 'disableRipple', 'tabIndex'],
1325
1325
  encapsulation: ViewEncapsulation.None,
1326
1326
  preserveWhitespaces: false,