@angular/cdk 7.0.0-rc.1 → 7.0.2

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 (205) hide show
  1. package/_a11y.scss +32 -0
  2. package/_overlay.scss +141 -0
  3. package/_text-field.scss +63 -0
  4. package/a11y/typings/aria-describer/aria-describer.d.ts +2 -2
  5. package/a11y/typings/focus-monitor/focus-monitor.d.ts +2 -2
  6. package/a11y/typings/index.metadata.json +1 -1
  7. package/a11y/typings/key-manager/list-key-manager.d.ts +1 -1
  8. package/a11y/typings/live-announcer/live-announcer.d.ts +2 -2
  9. package/bundles/cdk-a11y.umd.js +26 -21
  10. package/bundles/cdk-a11y.umd.js.map +1 -1
  11. package/bundles/cdk-a11y.umd.min.js +1 -1
  12. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  13. package/bundles/cdk-drag-drop.umd.js +126 -81
  14. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  15. package/bundles/cdk-drag-drop.umd.min.js +1 -1
  16. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  17. package/bundles/cdk-overlay.umd.js +22 -22
  18. package/bundles/cdk-overlay.umd.js.map +1 -1
  19. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  20. package/bundles/cdk-platform.umd.js +13 -2
  21. package/bundles/cdk-platform.umd.js.map +1 -1
  22. package/bundles/cdk-platform.umd.min.js +1 -1
  23. package/bundles/cdk-platform.umd.min.js.map +1 -1
  24. package/bundles/cdk-scrolling.umd.js +10 -6
  25. package/bundles/cdk-scrolling.umd.js.map +1 -1
  26. package/bundles/cdk-scrolling.umd.min.js +1 -1
  27. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  28. package/bundles/cdk-stepper.umd.js +1 -1
  29. package/bundles/cdk-stepper.umd.js.map +1 -1
  30. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  31. package/bundles/cdk-table.umd.js +5 -1
  32. package/bundles/cdk-table.umd.js.map +1 -1
  33. package/bundles/cdk-table.umd.min.js +1 -1
  34. package/bundles/cdk-table.umd.min.js.map +1 -1
  35. package/bundles/cdk-text-field.umd.js +10 -3
  36. package/bundles/cdk-text-field.umd.js.map +1 -1
  37. package/bundles/cdk-text-field.umd.min.js +1 -1
  38. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  39. package/bundles/cdk.umd.js +1 -1
  40. package/bundles/cdk.umd.js.map +1 -1
  41. package/bundles/cdk.umd.min.js +1 -1
  42. package/bundles/cdk.umd.min.js.map +1 -1
  43. package/drag-drop/typings/drag-events.d.ts +5 -5
  44. package/drag-drop/typings/drag-handle.d.ts +3 -1
  45. package/drag-drop/typings/drag-parent.d.ts +15 -0
  46. package/drag-drop/typings/drag-utils.d.ts +10 -0
  47. package/drag-drop/typings/drag.d.ts +6 -11
  48. package/drag-drop/typings/{drop-container.d.ts → drop-list-container.d.ts} +5 -5
  49. package/{typings/drag-drop/drop.d.ts → drag-drop/typings/drop-list.d.ts} +7 -7
  50. package/drag-drop/typings/index.d.ts +1 -0
  51. package/drag-drop/typings/index.metadata.json +1 -1
  52. package/drag-drop/typings/public-api.d.ts +2 -2
  53. package/esm2015/a11y.js +25 -20
  54. package/esm2015/a11y.js.map +1 -1
  55. package/esm2015/cdk.js +1 -1
  56. package/esm2015/cdk.js.map +1 -1
  57. package/esm2015/drag-drop.js +108 -57
  58. package/esm2015/drag-drop.js.map +1 -1
  59. package/esm2015/overlay.js +12 -12
  60. package/esm2015/overlay.js.map +1 -1
  61. package/esm2015/platform.js +13 -3
  62. package/esm2015/platform.js.map +1 -1
  63. package/esm2015/scrolling.js +10 -6
  64. package/esm2015/scrolling.js.map +1 -1
  65. package/esm2015/stepper.js +1 -1
  66. package/esm2015/stepper.js.map +1 -1
  67. package/esm2015/table.js +5 -1
  68. package/esm2015/table.js.map +1 -1
  69. package/esm2015/text-field.js +11 -4
  70. package/esm2015/text-field.js.map +1 -1
  71. package/esm5/a11y.es5.js +27 -22
  72. package/esm5/a11y.es5.js.map +1 -1
  73. package/esm5/cdk.es5.js +1 -1
  74. package/esm5/cdk.es5.js.map +1 -1
  75. package/esm5/drag-drop.es5.js +124 -81
  76. package/esm5/drag-drop.es5.js.map +1 -1
  77. package/esm5/overlay.es5.js +22 -22
  78. package/esm5/overlay.es5.js.map +1 -1
  79. package/esm5/platform.es5.js +13 -3
  80. package/esm5/platform.es5.js.map +1 -1
  81. package/esm5/scrolling.es5.js +10 -6
  82. package/esm5/scrolling.es5.js.map +1 -1
  83. package/esm5/stepper.es5.js +1 -1
  84. package/esm5/stepper.es5.js.map +1 -1
  85. package/esm5/table.es5.js +5 -1
  86. package/esm5/table.es5.js.map +1 -1
  87. package/esm5/text-field.es5.js +11 -4
  88. package/esm5/text-field.es5.js.map +1 -1
  89. package/overlay/typings/keyboard/overlay-keyboard-dispatcher.d.ts +2 -2
  90. package/overlay/typings/overlay-container.d.ts +2 -2
  91. package/overlay/typings/overlay-directives.d.ts +1 -1
  92. package/overlay/typings/overlay-module.d.ts +1 -1
  93. package/overlay/typings/position/connected-position-strategy.d.ts +1 -1
  94. package/overlay/typings/position/global-position-strategy.d.ts +2 -2
  95. package/overlay/typings/position/overlay-position-builder.d.ts +1 -1
  96. package/package.json +6 -6
  97. package/platform/typings/features/passive-listeners.d.ts +7 -0
  98. package/platform/typings/index.metadata.json +1 -1
  99. package/platform/typings/platform.d.ts +1 -1
  100. package/schematics/index.d.ts +0 -1
  101. package/schematics/index.js +0 -1
  102. package/schematics/index.js.map +1 -1
  103. package/schematics/ng-add/index.d.ts +4 -0
  104. package/schematics/ng-add/index.js +7 -3
  105. package/schematics/ng-add/index.js.map +1 -1
  106. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +4 -4
  107. package/schematics/ng-generate/drag-drop/schema.json +2 -1
  108. package/schematics/ng-update/index.js +8 -2
  109. package/schematics/ng-update/index.js.map +1 -1
  110. package/schematics/utils/build-component.d.ts +7 -0
  111. package/schematics/utils/build-component.js +4 -5
  112. package/schematics/utils/build-component.js.map +1 -1
  113. package/schematics/utils/html-head-element.d.ts +13 -0
  114. package/schematics/utils/html-head-element.js +54 -0
  115. package/schematics/utils/html-head-element.js.map +1 -0
  116. package/schematics/utils/index.d.ts +1 -0
  117. package/schematics/utils/index.js +1 -0
  118. package/schematics/utils/index.js.map +1 -1
  119. package/scrolling/typings/index.metadata.json +1 -1
  120. package/scrolling/typings/scroll-dispatcher.d.ts +2 -2
  121. package/scrolling/typings/viewport-ruler.d.ts +2 -2
  122. package/table/typings/index.metadata.json +1 -1
  123. package/text-field/typings/autosize.d.ts +7 -1
  124. package/text-field/typings/index.metadata.json +1 -1
  125. package/typings/a11y/aria-describer/aria-describer.d.ts +2 -2
  126. package/typings/a11y/focus-monitor/focus-monitor.d.ts +2 -2
  127. package/typings/a11y/index.metadata.json +1 -1
  128. package/typings/a11y/key-manager/list-key-manager.d.ts +1 -1
  129. package/typings/a11y/live-announcer/live-announcer.d.ts +2 -2
  130. package/typings/drag-drop/drag-events.d.ts +5 -5
  131. package/typings/drag-drop/drag-handle.d.ts +3 -1
  132. package/typings/drag-drop/drag-parent.d.ts +15 -0
  133. package/typings/drag-drop/drag-utils.d.ts +10 -0
  134. package/typings/drag-drop/drag.d.ts +6 -11
  135. package/typings/drag-drop/{drop-container.d.ts → drop-list-container.d.ts} +5 -5
  136. package/{drag-drop/typings/drop.d.ts → typings/drag-drop/drop-list.d.ts} +7 -7
  137. package/typings/drag-drop/index.d.ts +1 -0
  138. package/typings/drag-drop/index.metadata.json +1 -1
  139. package/typings/drag-drop/public-api.d.ts +2 -2
  140. package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +2 -2
  141. package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +2 -2
  142. package/typings/esm5/a11y/index.metadata.json +1 -1
  143. package/typings/esm5/a11y/key-manager/list-key-manager.d.ts +1 -1
  144. package/typings/esm5/a11y/live-announcer/live-announcer.d.ts +2 -2
  145. package/typings/esm5/drag-drop/drag-events.d.ts +5 -5
  146. package/typings/esm5/drag-drop/drag-handle.d.ts +3 -1
  147. package/typings/esm5/drag-drop/drag-parent.d.ts +15 -0
  148. package/typings/esm5/drag-drop/drag-utils.d.ts +10 -0
  149. package/typings/esm5/drag-drop/drag.d.ts +6 -11
  150. package/typings/esm5/drag-drop/{drop-container.d.ts → drop-list-container.d.ts} +5 -5
  151. package/typings/esm5/drag-drop/{drop.d.ts → drop-list.d.ts} +7 -7
  152. package/typings/esm5/drag-drop/index.d.ts +1 -0
  153. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  154. package/typings/esm5/drag-drop/public-api.d.ts +2 -2
  155. package/typings/esm5/index.metadata.json +1 -1
  156. package/typings/esm5/overlay/keyboard/overlay-keyboard-dispatcher.d.ts +2 -2
  157. package/typings/esm5/overlay/overlay-container.d.ts +2 -2
  158. package/typings/esm5/overlay/overlay-directives.d.ts +1 -1
  159. package/typings/esm5/overlay/overlay-module.d.ts +1 -1
  160. package/typings/esm5/overlay/position/connected-position-strategy.d.ts +1 -1
  161. package/typings/esm5/overlay/position/global-position-strategy.d.ts +2 -2
  162. package/typings/esm5/overlay/position/overlay-position-builder.d.ts +1 -1
  163. package/typings/esm5/platform/features/passive-listeners.d.ts +7 -0
  164. package/typings/esm5/platform/index.metadata.json +1 -1
  165. package/typings/esm5/platform/platform.d.ts +1 -1
  166. package/typings/esm5/scrolling/index.metadata.json +1 -1
  167. package/typings/esm5/scrolling/scroll-dispatcher.d.ts +2 -2
  168. package/typings/esm5/scrolling/viewport-ruler.d.ts +2 -2
  169. package/typings/esm5/table/index.metadata.json +1 -1
  170. package/typings/esm5/text-field/autosize.d.ts +7 -1
  171. package/typings/esm5/text-field/index.metadata.json +1 -1
  172. package/typings/index.metadata.json +1 -1
  173. package/typings/overlay/keyboard/overlay-keyboard-dispatcher.d.ts +2 -2
  174. package/typings/overlay/overlay-container.d.ts +2 -2
  175. package/typings/overlay/overlay-directives.d.ts +1 -1
  176. package/typings/overlay/overlay-module.d.ts +1 -1
  177. package/typings/overlay/position/connected-position-strategy.d.ts +1 -1
  178. package/typings/overlay/position/global-position-strategy.d.ts +2 -2
  179. package/typings/overlay/position/overlay-position-builder.d.ts +1 -1
  180. package/typings/platform/features/passive-listeners.d.ts +7 -0
  181. package/typings/platform/index.metadata.json +1 -1
  182. package/typings/platform/platform.d.ts +1 -1
  183. package/typings/schematics/index.d.ts +0 -1
  184. package/typings/schematics/ng-add/index.d.ts +4 -0
  185. package/typings/schematics/utils/build-component.d.ts +7 -0
  186. package/typings/schematics/utils/html-head-element.d.ts +13 -0
  187. package/typings/schematics/utils/index.d.ts +1 -0
  188. package/typings/scrolling/index.metadata.json +1 -1
  189. package/typings/scrolling/scroll-dispatcher.d.ts +2 -2
  190. package/typings/scrolling/viewport-ruler.d.ts +2 -2
  191. package/typings/table/index.metadata.json +1 -1
  192. package/typings/text-field/autosize.d.ts +7 -1
  193. package/typings/text-field/index.metadata.json +1 -1
  194. package/schematics/testing/index.d.ts +0 -9
  195. package/schematics/testing/index.js +0 -15
  196. package/schematics/testing/index.js.map +0 -1
  197. package/schematics/testing/post-scheduled-tasks.d.ts +0 -18
  198. package/schematics/testing/post-scheduled-tasks.js +0 -35
  199. package/schematics/testing/post-scheduled-tasks.js.map +0 -1
  200. package/schematics/testing/test-app.d.ts +0 -10
  201. package/schematics/testing/test-app.js +0 -20
  202. package/schematics/testing/test-app.js.map +0 -1
  203. package/typings/schematics/testing/index.d.ts +0 -9
  204. package/typings/schematics/testing/post-scheduled-tasks.d.ts +0 -18
  205. package/typings/schematics/testing/test-app.d.ts +0 -10
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.es5.js","sources":["../../../src/cdk/text-field/text-field-module.ts","../../../src/cdk/text-field/autosize.ts","../../../src/cdk/text-field/autofill.ts"],"sourcesContent":["/**\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 {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\n\n\n/** Directive to automatically resize a textarea to fit its content. */\n@Directive({\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {\n /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n private _previousValue: string;\n private _initialHeight: string | null;\n private readonly _destroyed = new Subject<void>();\n\n private _minRows: number;\n private _maxRows: number;\n private _enabled: boolean = true;\n\n private _textareaElement: HTMLTextAreaElement;\n\n /** Minimum amount of rows in the textarea. */\n @Input('cdkAutosizeMinRows')\n get minRows(): number { return this._minRows; }\n set minRows(value: number) {\n this._minRows = value;\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number { return this._maxRows; }\n set maxRows(value: number) {\n this._maxRows = value;\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input('cdkTextareaAutosize')\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\n value = coerceBooleanProperty(value);\n\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n\n /** Cached height of a textarea with a single row. */\n private _cachedLineHeight: number;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone) {\n this._textareaElement = this._elementRef.nativeElement as HTMLTextAreaElement;\n }\n\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight(): void {\n const minHeight = this.minRows && this._cachedLineHeight ?\n `${this.minRows * this._cachedLineHeight}px` : null;\n\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight(): void {\n const maxHeight = this.maxRows && this._cachedLineHeight ?\n `${this.maxRows * this._cachedLineHeight}px` : null;\n\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n });\n }\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n private _cacheTextareaLineHeight(): void {\n if (this._cachedLineHeight) {\n return;\n }\n\n // Use a clone element because we have to override some styles.\n let textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\n textareaClone.rows = 1;\n\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\n\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n textareaClone.style.overflow = 'hidden';\n\n this._textareaElement.parentNode!.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n this._textareaElement.parentNode!.removeChild(textareaClone);\n\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force: boolean = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n\n this._cacheTextareaLineHeight();\n\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n\n const textarea = this._elementRef.nativeElement as HTMLTextAreaElement;\n const value = textarea.value;\n\n // Only resize of the value changed since these calculations can be expensive.\n if (value === this._previousValue && !force) {\n return;\n }\n\n const placeholderText = textarea.placeholder;\n\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight\n // value. To ensure that the scrollHeight is not bigger than the content, the placeholders\n // need to be removed temporarily.\n textarea.classList.add('cdk-textarea-autosize-measuring');\n textarea.placeholder = '';\n\n // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with\n // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const height = textarea.scrollHeight - 4;\n\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n textarea.classList.remove('cdk-textarea-autosize-measuring');\n textarea.placeholder = placeholderText;\n\n // On Firefox resizing the textarea will prevent it from scrolling to the caret position.\n // We need to re-set the selection in order for it to scroll to the proper position.\n if (typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(() => requestAnimationFrame(() => {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && document.activeElement === textarea) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }));\n }\n\n this._previousValue = value;\n }\n\n /**\n * Resets the textarea to it's original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight === undefined) {\n return;\n }\n this._textareaElement.style.height = this._initialHeight;\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\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 {Platform, supportsPassiveEventListeners} from '@angular/cdk/platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport {EMPTY, Observable, Subject} from 'rxjs';\n\n\n/** An event that is emitted when the autofill state of an input changes. */\nexport type AutofillEvent = {\n /** The element whose autofill state changes. */\n target: Element;\n /** Whether the element is currently autofilled. */\n isAutofilled: boolean;\n};\n\n\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions: any = supportsPassiveEventListeners() ? {passive: true} : false;\n\n\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\n@Injectable({providedIn: 'root'})\nexport class AutofillMonitor implements OnDestroy {\n private _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(private _platform: Platform, private _ngZone: NgZone) {}\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: Element): Observable<AutofillEvent>;\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: ElementRef<Element>): Observable<AutofillEvent>;\n\n monitor(elementOrRef: Element | ElementRef<Element>): Observable<AutofillEvent> {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n\n const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject.asObservable();\n }\n\n const result = new Subject<AutofillEvent>();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = ((event: AnimationEvent) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: true}));\n } else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: false}));\n }\n }) as EventListenerOrEventListenerObject;\n\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n }\n });\n\n return result.asObservable();\n }\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: Element): void;\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<Element>): void;\n\n stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {\n const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n const info = this._monitoredElements.get(element);\n\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\n\n\n/** A directive that can be used to monitor the autofill state of an input. */\n@Directive({\n selector: '[cdkAutofill]',\n})\nexport class CdkAutofill implements OnDestroy, OnInit {\n /** Emits when the autofill state of the element changes. */\n @Output() cdkAutofill: EventEmitter<AutofillEvent> = new EventEmitter<AutofillEvent>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor) {}\n\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AEuCA,IAAM,eAAe,GAAQ,6BAA6B,EAAE,GAAG,EAAC,OAAO,EAAE,IAAI,EAAC,GAAG,KAAK,CAAC;;;;;;;IAYrF,SAAF,eAAA,CAAsB,SAAmB,EAAU,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iBACF,EAAD,EAAA;;;;QAvBA,EAAA,IAAA,EAAE,UAAU,EAAZ;QAOA,EAAA,IAAA,EAAQ,QAAQ,EAAhB;QAFA,EAAA,IAAA,EAAE,MAAM,EAAR;;;QAgCA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,IAAA,EAAA,CAAS,oBAAoB,EAA7B,EAAA,CAAA;QAQA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,IAAA,EAAA,CAAS,oBAAoB,EAA7B,EAAA,CAAA;QAQA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,IAAA,EAAA,CAAS,qBAAqB,EAA9B,EAAA,CAAA;;IAhEA,OAAA,mBAAA,CAAA;;;;;;;;;;;QDcA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,YAAY,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;oBAChD,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;iBAC5C,EAAD,EAAA;;IAlBA,OAAA,eAAA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"text-field.es5.js","sources":["../../../src/cdk/text-field/text-field-module.ts","../../../src/cdk/text-field/autosize.ts","../../../src/cdk/text-field/autofill.ts"],"sourcesContent":["/**\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 {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\n\n\n/** Directive to automatically resize a textarea to fit its content. */\n@Directive({\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {\n /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n private _previousValue?: string;\n private _initialHeight: string | null;\n private readonly _destroyed = new Subject<void>();\n\n private _minRows: number;\n private _maxRows: number;\n private _enabled: boolean = true;\n\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n private _previousMinRows: number = -1;\n\n private _textareaElement: HTMLTextAreaElement;\n\n /** Minimum amount of rows in the textarea. */\n @Input('cdkAutosizeMinRows')\n get minRows(): number { return this._minRows; }\n set minRows(value: number) {\n this._minRows = value;\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number { return this._maxRows; }\n set maxRows(value: number) {\n this._maxRows = value;\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input('cdkTextareaAutosize')\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\n value = coerceBooleanProperty(value);\n\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n\n /** Cached height of a textarea with a single row. */\n private _cachedLineHeight: number;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone) {\n this._textareaElement = this._elementRef.nativeElement as HTMLTextAreaElement;\n }\n\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight(): void {\n const minHeight = this.minRows && this._cachedLineHeight ?\n `${this.minRows * this._cachedLineHeight}px` : null;\n\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight(): void {\n const maxHeight = this.maxRows && this._cachedLineHeight ?\n `${this.maxRows * this._cachedLineHeight}px` : null;\n\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n });\n }\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n private _cacheTextareaLineHeight(): void {\n if (this._cachedLineHeight) {\n return;\n }\n\n // Use a clone element because we have to override some styles.\n let textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\n textareaClone.rows = 1;\n\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\n\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n textareaClone.style.overflow = 'hidden';\n\n this._textareaElement.parentNode!.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n this._textareaElement.parentNode!.removeChild(textareaClone);\n\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force: boolean = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n\n this._cacheTextareaLineHeight();\n\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n\n const textarea = this._elementRef.nativeElement as HTMLTextAreaElement;\n const value = textarea.value;\n\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n\n const placeholderText = textarea.placeholder;\n\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight\n // value. To ensure that the scrollHeight is not bigger than the content, the placeholders\n // need to be removed temporarily.\n textarea.classList.add('cdk-textarea-autosize-measuring');\n textarea.placeholder = '';\n\n // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with\n // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const height = textarea.scrollHeight - 4;\n\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n textarea.classList.remove('cdk-textarea-autosize-measuring');\n textarea.placeholder = placeholderText;\n\n // On Firefox resizing the textarea will prevent it from scrolling to the caret position.\n // We need to re-set the selection in order for it to scroll to the proper position.\n if (typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(() => requestAnimationFrame(() => {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && document.activeElement === textarea) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }));\n }\n\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n\n /**\n * Resets the textarea to it's original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight === undefined) {\n return;\n }\n this._textareaElement.style.height = this._initialHeight;\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\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 {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport {EMPTY, Observable, Subject} from 'rxjs';\n\n\n/** An event that is emitted when the autofill state of an input changes. */\nexport type AutofillEvent = {\n /** The element whose autofill state changes. */\n target: Element;\n /** Whether the element is currently autofilled. */\n isAutofilled: boolean;\n};\n\n\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({passive: true});\n\n\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\n@Injectable({providedIn: 'root'})\nexport class AutofillMonitor implements OnDestroy {\n private _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(private _platform: Platform, private _ngZone: NgZone) {}\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: Element): Observable<AutofillEvent>;\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: ElementRef<Element>): Observable<AutofillEvent>;\n\n monitor(elementOrRef: Element | ElementRef<Element>): Observable<AutofillEvent> {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n\n const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject.asObservable();\n }\n\n const result = new Subject<AutofillEvent>();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = ((event: AnimationEvent) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: true}));\n } else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: false}));\n }\n }) as EventListenerOrEventListenerObject;\n\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n }\n });\n\n return result.asObservable();\n }\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: Element): void;\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<Element>): void;\n\n stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {\n const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n const info = this._monitoredElements.get(element);\n\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\n\n\n/** A directive that can be used to monitor the autofill state of an input. */\n@Directive({\n selector: '[cdkAutofill]',\n})\nexport class CdkAutofill implements OnDestroy, OnInit {\n /** Emits when the autofill state of the element changes. */\n @Output() cdkAutofill: EventEmitter<AutofillEvent> = new EventEmitter<AutofillEvent>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor) {}\n\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AEuCA,IAAM,eAAe,GAAG,+BAA+B,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;;;;;;;IAYvE,SAAF,eAAA,CAAsB,SAAmB,EAAU,OAAe,EAAlE;QAAsB,IAAtB,CAAA,SAA+B,GAAT,SAAS,CAAU;QAAU,IAAnD,CAAA,OAA0D,GAAP,OAAO,C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AuB;;;wBAGhC,MAAM,EAAE,GAAG;wBACX,SAAS,EAAE,qBAAqB;qBACjC;iBACF,EAAD,EAAA;;;;QAvBA,EAAA,IAAA,EAAE,UAAU,EAAZ;QAOA,EAAA,IAAA,EAAQ,QAAQ,EAAhB;QAFA,EAAA,IAAA,EAAE,MAAM,EAAR;;;QAuCA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,IAAA,EAAA,CAAS,oBAAoB,EAA7B,EAAA,CAAA;QAQA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,IAAA,EAAA,CAAS,oBAAoB,EAA7B,EAAA,CAAA;QAQA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,IAAA,EAAA,CAAS,qBAAqB,EAA9B,EAAA,CAAA;;IAvEA,OAAA,mBAAA,CAAA;;;;;;;;;;;QDcA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,YAAY,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;oBAChD,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;iBAC5C,EAAD,EAAA;;IAlBA,OAAA,eAAA,CAAA;;;;;;;;;;;;;;;"}
@@ -28,9 +28,9 @@ export declare class OverlayKeyboardDispatcher implements OnDestroy {
28
28
  /** Keyboard event listener that will be attached to the body. */
29
29
  private _keydownListener;
30
30
  }
31
- /** @docs-private @deprecated @breaking-change 7.0.0 */
31
+ /** @docs-private @deprecated @breaking-change 8.0.0 */
32
32
  export declare function OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY(dispatcher: OverlayKeyboardDispatcher, _document: any): OverlayKeyboardDispatcher;
33
- /** @docs-private @deprecated @breaking-change 7.0.0 */
33
+ /** @docs-private @deprecated @breaking-change 8.0.0 */
34
34
  export declare const OVERLAY_KEYBOARD_DISPATCHER_PROVIDER: {
35
35
  provide: typeof OverlayKeyboardDispatcher;
36
36
  deps: (Optional[] | InjectionToken<any>)[];
@@ -25,9 +25,9 @@ export declare class OverlayContainer implements OnDestroy {
25
25
  */
26
26
  protected _createContainer(): void;
27
27
  }
28
- /** @docs-private @deprecated @breaking-change 7.0.0 */
28
+ /** @docs-private @deprecated @breaking-change 8.0.0 */
29
29
  export declare function OVERLAY_CONTAINER_PROVIDER_FACTORY(parentContainer: OverlayContainer, _document: any): OverlayContainer;
30
- /** @docs-private @deprecated @breaking-change 7.0.0 */
30
+ /** @docs-private @deprecated @breaking-change 8.0.0 */
31
31
  export declare const OVERLAY_CONTAINER_PROVIDER: {
32
32
  provide: typeof OverlayContainer;
33
33
  deps: (Optional[] | InjectionToken<any>)[];
@@ -14,7 +14,7 @@ import { ConnectedPosition } from './position/flexible-connected-position-strate
14
14
  import { RepositionScrollStrategy, ScrollStrategy } from './scroll/index';
15
15
  /** Injection token that determines the scroll handling while the connected overlay is open. */
16
16
  export declare const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
17
- /** @docs-private @deprecated @breaking-change 7.0.0 */
17
+ /** @docs-private @deprecated @breaking-change 8.0.0 */
18
18
  export declare function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
19
19
  /**
20
20
  * Directive applied to an element to make it usable as an origin for an Overlay using a
@@ -10,7 +10,7 @@ export declare class OverlayModule {
10
10
  }
11
11
  /**
12
12
  * @deprecated Use `OverlayModule` instead.
13
- * @breaking-change 7.0.0
13
+ * @breaking-change 8.0.0
14
14
  * @docs-private
15
15
  */
16
16
  export declare const OVERLAY_PROVIDERS: Provider[];
@@ -20,7 +20,7 @@ import { OverlayReference } from '../overlay-reference';
20
20
  * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner
21
21
  * of the overlay.
22
22
  * @deprecated Use `FlexibleConnectedPositionStrategy` instead.
23
- * @breaking-change 7.0.0
23
+ * @breaking-change 8.0.0
24
24
  */
25
25
  export declare class ConnectedPositionStrategy implements PositionStrategy {
26
26
  /**
@@ -51,14 +51,14 @@ export declare class GlobalPositionStrategy implements PositionStrategy {
51
51
  * Sets the overlay width and clears any previously set width.
52
52
  * @param value New width for the overlay
53
53
  * @deprecated Pass the `width` through the `OverlayConfig`.
54
- * @breaking-change 7.0.0
54
+ * @breaking-change 8.0.0
55
55
  */
56
56
  width(value?: string): this;
57
57
  /**
58
58
  * Sets the overlay height and clears any previously set height.
59
59
  * @param value New height for the overlay
60
60
  * @deprecated Pass the `height` through the `OverlayConfig`.
61
- * @breaking-change 7.0.0
61
+ * @breaking-change 8.0.0
62
62
  */
63
63
  height(value?: string): this;
64
64
  /**
@@ -30,7 +30,7 @@ export declare class OverlayPositionBuilder {
30
30
  * @param originPos
31
31
  * @param overlayPos
32
32
  * @deprecated Use `flexibleConnectedTo` instead.
33
- * @breaking-change 7.0.0
33
+ * @breaking-change 8.0.0
34
34
  */
35
35
  connectedTo(elementRef: ElementRef, originPos: OriginConnectionPosition, overlayPos: OverlayConnectionPosition): ConnectedPositionStrategy;
36
36
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cdk",
3
- "version": "7.0.0-rc.1",
3
+ "version": "7.0.2",
4
4
  "description": "Angular Material Component Development Kit",
5
5
  "main": "./bundles/cdk.umd.js",
6
6
  "module": "./esm5/cdk.es5.js",
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "homepage": "https://github.com/angular/material2#readme",
25
25
  "peerDependencies": {
26
- "@angular/core": ">=7.0.0-rc.0",
27
- "@angular/common": ">=7.0.0-rc.0"
26
+ "@angular/core": ">=7.0.0",
27
+ "@angular/common": ">=7.0.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "tslib": "^1.7.1"
@@ -37,7 +37,7 @@
37
37
  "migrations": "./schematics/migration.json"
38
38
  },
39
39
  "sideEffects": false,
40
- "releaseGitCommitSha": "2e4a51180b0074d59c1584c82fb8959f52660124",
41
- "releaseGitBranch": "master",
42
- "releaseGitUser": "Vivian Hu <vivianhu@google.com>"
40
+ "releaseGitCommitSha": "ad9cfbec29ce332b739f1de2aa044ce1c22ec56d",
41
+ "releaseGitBranch": "7.0.x",
42
+ "releaseGitUser": "Miles Malerba <mmalerba@google.com>"
43
43
  }
@@ -10,3 +10,10 @@
10
10
  * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
11
11
  */
12
12
  export declare function supportsPassiveEventListeners(): boolean;
13
+ /**
14
+ * Normalizes an `AddEventListener` object to something that can be passed
15
+ * to `addEventListener` on any browser, no matter whether it supports the
16
+ * `options` parameter.
17
+ * @param options Object to be normalized.
18
+ */
19
+ export declare function normalizePassiveListenerOptions(options: AddEventListenerOptions): AddEventListenerOptions | boolean;
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"Platform":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":72,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":72,"character":27},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":72,"character":34}]}]],"parameters":[{"__symbolic":"reference","name":"Object"}]}]},"statics":{"ngInjectableDef":{}}},"PlatformModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1}}],"members":{}},"getSupportedInputTypes":{"__symbolic":"function"},"supportsPassiveEventListeners":{"__symbolic":"function"},"RtlScrollAxisType":{"NORMAL":0,"NEGATED":1,"INVERTED":2},"supportsScrollBehavior":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"==","left":{"__symbolic":"error","message":"Expression form not supported","line":32,"character":12,"module":"./features/scrolling"},"right":"object"},"right":{"__symbolic":"binop","operator":"in","left":"scrollBehavior","right":{"__symbolic":"error","message":"Expression form not supported","line":32,"character":64,"module":"./features/scrolling"}}}}}},"getRtlScrollAxisType":{"__symbolic":"function"}},"origins":{"Platform":"./platform","PlatformModule":"./platform-module","getSupportedInputTypes":"./features/input-types","supportsPassiveEventListeners":"./features/passive-listeners","RtlScrollAxisType":"./features/scrolling","supportsScrollBehavior":"./features/scrolling","getRtlScrollAxisType":"./features/scrolling"},"importAs":"@angular/cdk/platform"}
1
+ {"__symbolic":"module","version":4,"metadata":{"Platform":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":72,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":72,"character":27},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":72,"character":34}]}]],"parameters":[{"__symbolic":"reference","name":"Object"}]}]},"statics":{"ngInjectableDef":{}}},"PlatformModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{}]}],"members":{}},"getSupportedInputTypes":{"__symbolic":"function"},"supportsPassiveEventListeners":{"__symbolic":"function"},"normalizePassiveListenerOptions":{"__symbolic":"function","parameters":["options"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"supportsPassiveEventListeners"}},"thenExpression":{"__symbolic":"reference","name":"options"},"elseExpression":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"capture"}}}}},"RtlScrollAxisType":{"NORMAL":0,"NEGATED":1,"INVERTED":2},"supportsScrollBehavior":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"==","left":{"__symbolic":"error","message":"Expression form not supported","line":32,"character":12,"module":"./features/scrolling"},"right":"object"},"right":{"__symbolic":"binop","operator":"in","left":"scrollBehavior","right":{"__symbolic":"error","message":"Expression form not supported","line":32,"character":64,"module":"./features/scrolling"}}}}}},"getRtlScrollAxisType":{"__symbolic":"function"}},"origins":{"Platform":"./platform","PlatformModule":"./platform-module","getSupportedInputTypes":"./features/input-types","supportsPassiveEventListeners":"./features/passive-listeners","normalizePassiveListenerOptions":"./features/passive-listeners","RtlScrollAxisType":"./features/scrolling","supportsScrollBehavior":"./features/scrolling","getRtlScrollAxisType":"./features/scrolling"},"importAs":"@angular/cdk/platform"}
@@ -35,7 +35,7 @@ export declare class Platform {
35
35
  /** Whether the current browser is Safari. */
36
36
  SAFARI: boolean;
37
37
  /**
38
- * @breaking-change v7.0.0 remove optional decorator
38
+ * @breaking-change 8.0.0 remove optional decorator
39
39
  */
40
40
  constructor(_platformId?: Object | undefined);
41
41
  }
@@ -6,5 +6,4 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  export * from './utils';
9
- export * from './testing';
10
9
  export * from './ng-update/public-api';
@@ -11,6 +11,5 @@ function __export(m) {
11
11
  }
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __export(require("./utils"));
14
- __export(require("./testing"));
15
14
  __export(require("./ng-update/public-api"));
16
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cdk/schematics/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAEH,6BAAwB;AACxB,+BAA0B;AAC1B,4CAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cdk/schematics/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAEH,6BAAwB;AACxB,4CAAuC"}
@@ -11,5 +11,9 @@ export declare const cdkVersion: string | null;
11
11
  /**
12
12
  * Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
13
13
  * automatically executed if developers run `ng add @angular/cdk`.
14
+ *
15
+ * By default, the CLI already installs the package that has been specified with `ng add`.
16
+ * We just store the version in the `package.json` in case the package manager didn't. Also
17
+ * this ensures that there will be no error that says that the CDK does not support `ng add`.
14
18
  */
15
19
  export default function (): Rule;
@@ -13,12 +13,16 @@ exports.cdkVersion = loadPackageVersionGracefully('@angular/cdk');
13
13
  /**
14
14
  * Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
15
15
  * automatically executed if developers run `ng add @angular/cdk`.
16
+ *
17
+ * By default, the CLI already installs the package that has been specified with `ng add`.
18
+ * We just store the version in the `package.json` in case the package manager didn't. Also
19
+ * this ensures that there will be no error that says that the CDK does not support `ng add`.
16
20
  */
17
21
  function default_1() {
18
22
  return (host) => {
19
- // By default, the CLI already installs the package that has been installed through `ng add`.
20
- // We just store the version in the `package.json` in case the package manager didn't.
21
- package_config_1.addPackageToPackageJson(host, '@angular/cdk', `^${exports.cdkVersion}`);
23
+ // In order to align the CDK version with the other Angular dependencies, we use tilde
24
+ // instead of caret. This is default for Angular dependencies in new CLI projects.
25
+ package_config_1.addPackageToPackageJson(host, '@angular/cdk', `~${exports.cdkVersion}`);
22
26
  };
23
27
  }
24
28
  exports.default = default_1;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/ng-add/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAGH,qDAAyD;AAEzD,oFAAoF;AACvE,QAAA,UAAU,GAAG,4BAA4B,CAAC,cAAc,CAAC,CAAC;AAEvE;;;GAGG;AACH;IACE,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,6FAA6F;QAC7F,sFAAsF;QACtF,wCAAuB,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,kBAAU,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC;AACJ,CAAC;AAND,4BAMC;AAED,wEAAwE;AACxE,SAAS,4BAA4B,CAAC,WAAmB;IACvD,IAAI;QACF,OAAO,OAAO,CAAC,GAAG,WAAW,eAAe,CAAC,CAAC,OAAO,CAAC;KACvD;IAAC,WAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/ng-add/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAGH,qDAAyD;AAEzD,oFAAoF;AACvE,QAAA,UAAU,GAAG,4BAA4B,CAAC,cAAc,CAAC,CAAC;AAEvE;;;;;;;GAOG;AACH;IACE,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,sFAAsF;QACtF,kFAAkF;QAClF,wCAAuB,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,kBAAU,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC;AACJ,CAAC;AAND,4BAMC;AAED,wEAAwE;AACxE,SAAS,4BAA4B,CAAC,WAAmB;IACvD,IAAI;QACF,OAAO,OAAO,CAAC,GAAG,WAAW,eAAe,CAAC,CAAC,OAAO,CAAC;KACvD;IAAC,WAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC"}
@@ -1,8 +1,8 @@
1
1
  <div class="container">
2
2
  <h2>To do</h2>
3
3
 
4
- <div cdkDrop #todoList="cdkDrop" [cdkDropData]="todo" [cdkDropConnectedTo]="doneList" class="list"
5
- (cdkDropDropped)="drop($event)">
4
+ <div cdkDropList #todoList="cdkDropList" [cdkDropListData]="todo"
5
+ [cdkDropListConnectedTo]="doneList" class="list" (cdkDropListDropped)="drop($event)">
6
6
  <div class="list-item" *ngFor="let item of todo" cdkDrag>{{item}}</div>
7
7
  </div>
8
8
  </div>
@@ -10,8 +10,8 @@
10
10
  <div class="container">
11
11
  <h2>Done</h2>
12
12
 
13
- <div cdkDrop #doneList="cdkDrop" [cdkDropData]="done" [cdkDropConnectedTo]="todoList" class="list"
14
- (cdkDropDropped)="drop($event)">
13
+ <div cdkDropList #doneList="cdkDropList" [cdkDropListData]="done"
14
+ [cdkDropListConnectedTo]="todoList" class="list" (cdkDropListDropped)="drop($event)">
15
15
  <div class="list-item" *ngFor="let item of done" cdkDrag>{{item}}</div>
16
16
  </div>
17
17
  </div>
@@ -23,7 +23,8 @@
23
23
  "$default": {
24
24
  "$source": "argv",
25
25
  "index": 0
26
- }
26
+ },
27
+ "x-prompt": "What should be the name of the component?"
27
28
  },
28
29
  "inlineStyle": {
29
30
  "description": "Specifies if the style will be in the ts file.",
@@ -7,6 +7,7 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
+ const chalk_1 = require("chalk");
10
11
  const target_version_1 = require("./target-version");
11
12
  const upgrade_data_1 = require("./upgrade-data");
12
13
  const upgrade_rules_1 = require("./upgrade-rules");
@@ -32,8 +33,13 @@ function updateToV7() {
32
33
  exports.updateToV7 = updateToV7;
33
34
  /** Post-update schematic to be called when update is finished. */
34
35
  function postUpdate() {
35
- return () => console.log('\nComplete! Please check the output above for any issues that were detected but could not' +
36
- ' be automatically fixed.');
36
+ return () => {
37
+ console.log();
38
+ console.log(chalk_1.green(' ✓ Angular CDK update complete'));
39
+ console.log();
40
+ console.log(chalk_1.yellow(' ⚠ Please check the output above for any issues that were detected ' +
41
+ 'but could not be automatically fixed.'));
42
+ };
37
43
  }
38
44
  exports.postUpdate = postUpdate;
39
45
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/ng-update/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAGH,qDAA+C;AAC/C,iDAA8C;AAC9C,mDAAkD;AAGlD,2EAA2E;AAC3E,MAAM,iBAAiB,GAAG;IACxB,mBAAmB;IACnB,qBAAqB;CACtB,CAAC;AAEF,kFAAkF;AAClF,MAAM,mBAAmB,GAAwB;IAC/C,WAAW,EAAE,6BAAc;IAC3B,iBAAiB;CAClB,CAAC;AAEF,qFAAqF;AACrF,SAAgB,UAAU;IACxB,OAAO,iCAAiB,CAAC,8BAAa,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC;AAClE,CAAC;AAFD,gCAEC;AAED,qFAAqF;AACrF,SAAgB,UAAU;IACxB,OAAO,iCAAiB,CAAC,8BAAa,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC;AAClE,CAAC;AAFD,gCAEC;AAED,kEAAkE;AAClE,SAAgB,UAAU;IACxB,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CACtB,2FAA2F;QAC3F,0BAA0B,CAAC,CAAC;AAChC,CAAC;AAJD,gCAIC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/ng-update/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAGH,iCAAoC;AACpC,qDAA+C;AAC/C,iDAA8C;AAC9C,mDAAkD;AAGlD,2EAA2E;AAC3E,MAAM,iBAAiB,GAAG;IACxB,mBAAmB;IACnB,qBAAqB;CACtB,CAAC;AAEF,kFAAkF;AAClF,MAAM,mBAAmB,GAAwB;IAC/C,WAAW,EAAE,6BAAc;IAC3B,iBAAiB;CAClB,CAAC;AAEF,qFAAqF;AACrF,SAAgB,UAAU;IACxB,OAAO,iCAAiB,CAAC,8BAAa,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC;AAClE,CAAC;AAFD,gCAEC;AAED,qFAAqF;AACrF,SAAgB,UAAU;IACxB,OAAO,iCAAiB,CAAC,8BAAa,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC;AAClE,CAAC;AAFD,gCAEC;AAED,kEAAkE;AAClE,SAAgB,UAAU;IACxB,OAAO,GAAG,EAAE;QACV,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,aAAK,CAAC,kCAAkC,CAAC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,cAAM,CAAC,uEAAuE;YACxF,uCAAuC,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC;AACJ,CAAC;AARD,gCAQC"}
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
1
8
  import { Rule } from '@angular-devkit/schematics';
2
9
  import { Schema as ComponentOptions } from '@schematics/angular/component/schema';
3
10
  /**
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- /* tslint:disable */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
2
  /**
5
3
  * @license
6
4
  * Copyright Google LLC All Rights Reserved.
@@ -8,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
11
10
  const core_1 = require("@angular-devkit/core");
12
11
  const schematics_1 = require("@angular-devkit/schematics");
13
12
  const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
@@ -35,7 +34,7 @@ function addDeclarationToNgModule(options) {
35
34
  return host;
36
35
  }
37
36
  const modulePath = options.module;
38
- const source = readIntoSourceFile(host, modulePath);
37
+ let source = readIntoSourceFile(host, modulePath);
39
38
  const componentPath = `/${options.path}/`
40
39
  + (options.flat ? '' : core_1.strings.dasherize(options.name) + '/')
41
40
  + core_1.strings.dasherize(options.name)
@@ -52,7 +51,7 @@ function addDeclarationToNgModule(options) {
52
51
  host.commitUpdate(declarationRecorder);
53
52
  if (options.export) {
54
53
  // Need to refresh the AST because we overwrote the file in the host.
55
- const source = readIntoSourceFile(host, modulePath);
54
+ source = readIntoSourceFile(host, modulePath);
56
55
  const exportRecorder = host.beginUpdate(modulePath);
57
56
  const exportChanges = ast_utils_1.addExportToModule(source, modulePath, core_1.strings.classify(`${options.name}Component`), relativePath);
58
57
  for (const change of exportChanges) {
@@ -64,7 +63,7 @@ function addDeclarationToNgModule(options) {
64
63
  }
65
64
  if (options.entryComponent) {
66
65
  // Need to refresh the AST because we overwrote the file in the host.
67
- const source = readIntoSourceFile(host, modulePath);
66
+ source = readIntoSourceFile(host, modulePath);
68
67
  const entryComponentRecorder = host.beginUpdate(modulePath);
69
68
  const entryComponentChanges = ast_utils_1.addEntryComponentToModule(source, modulePath, core_1.strings.classify(`${options.name}Component`), relativePath);
70
69
  for (const change of entryComponentChanges) {
@@ -1 +1 @@
1
- {"version":3,"file":"build-component.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/utils/build-component.ts"],"names":[],"mappings":";AAAA,oBAAoB;;AAEpB;;;;;;GAMG;AAEH,+CAA8E;AAC9E,2DAaoC;AAGpC,qEAI+C;AAC/C,+DAAgE;AAChE,+DAAgE;AAChE,yEAAiG;AACjG,uEAAiE;AACjE,iEAAqE;AACrE,uEAA0F;AAC1F,2BAA0C;AAC1C,+BAA4C;AAC5C,+CAAsD;AACtD,2DAA+D;AAC/D,+EAAiD;AAEjD,SAAS,kBAAkB,CAAC,IAAU,EAAE,UAAkB;IACxD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,IAAI,IAAI,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,gCAAmB,CAAC,QAAQ,UAAU,kBAAkB,CAAC,CAAC;KACrE;IAED,OAAO,gCAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,gCAAE,CAAC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AAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAjFD,wCAiFC"}
1
+ {"version":3,"file":"build-component.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/utils/build-component.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,+CAA8E;AAC9E,2DAaoC;AAGpC,qEAI+C;AAC/C,+DAAgE;AAChE,+DAAgE;AAChE,yEAAiG;AACjG,uEAAiE;AACjE,iEAAqE;AACrE,uEAA0F;AAC1F,2BAA0C;AAC1C,+BAA4C;AAC5C,+CAAsD;AACtD,2DAA+D;AAC/D,+EAAiD;AAEjD,SAAS,kBAAkB,CAAC,IAAU,EAAE,UAAkB;IACxD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,IAAI,IAAI,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,gCAAmB,CAAC,QAAQ,UAAU,kBAAkB,CAAC,CAAC;KACrE;IAED,OAAO,gCAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,gCAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC/F,CAAC;AAED,SAAS,wBAAwB,CAAC,OAAyB;IACzD,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,IAAI,OAAO,CAAC,UAAU,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACzC,OAAO,IAAI,CAAC;SACb;QAED,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;QAClC,IAAI,MAAM,GAAG,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAElD,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,IAAI,GAAG;cACrC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;cAC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CAAC,CAAC,CAAC,mBAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAI,EAAE;YAC9E,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,mBAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAI,EAAE;YACzE,0FAA0F;YAC1F,wFAAwF;YACxF,qBAAQ,CAAC,gBAAC,iBAAiB,EAAE,aAAa,IAAK,mBAAmB,CAAQ,CAAC;YAC3E,6EAA6E;YAC7E,0EAA0E;YAC1E,iBAAI,CAAC,IAAW,EAAE,UAAU,CAAC,IAAI,CAAC;SACnC,CAAC,CAAC;QAEH,OAAO,kBAAK,CAAC;YACX,2BAAc,CAAC,kBAAK,CAAC;gBACnB,wBAAwB,CAAC,OAAO,CAAC;gBACjC,sBAAS,CAAC,cAAc,CAAC;aAC1B,CAAC,CAAC;SACJ,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAjFD,wCAiFC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { Tree } from '@angular-devkit/schematics';
9
+ import { DefaultTreeElement } from 'parse5';
10
+ /** Appends the given element HTML fragment to the `<head>` element of the specified HTML file. */
11
+ export declare function appendHtmlElementToHead(host: Tree, htmlFilePath: string, elementHtml: string): void;
12
+ /** Parses the given HTML file and returns the head element if available. */
13
+ export declare function getHtmlHeadTagElement(htmlContent: string): DefaultTreeElement | null;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const schematics_1 = require("@angular-devkit/schematics");
11
+ const parse5_element_1 = require("./parse5-element");
12
+ const parse5_1 = require("parse5");
13
+ /** Appends the given element HTML fragment to the `<head>` element of the specified HTML file. */
14
+ function appendHtmlElementToHead(host, htmlFilePath, elementHtml) {
15
+ const htmlFileBuffer = host.read(htmlFilePath);
16
+ if (!htmlFileBuffer) {
17
+ throw new schematics_1.SchematicsException(`Could not read file for path: ${htmlFilePath}`);
18
+ }
19
+ const htmlContent = htmlFileBuffer.toString();
20
+ if (htmlContent.includes(elementHtml)) {
21
+ return;
22
+ }
23
+ const headTag = getHtmlHeadTagElement(htmlContent);
24
+ if (!headTag) {
25
+ throw `Could not find '<head>' element in HTML file: ${htmlFileBuffer}`;
26
+ }
27
+ // We always have access to the source code location here because the `getHeadTagElement`
28
+ // function explicitly has the `sourceCodeLocationInfo` option enabled.
29
+ const endTagOffset = headTag.sourceCodeLocation.endTag.startOffset;
30
+ const indentationOffset = parse5_element_1.getChildElementIndentation(headTag);
31
+ const insertion = `${' '.repeat(indentationOffset)}${elementHtml}`;
32
+ const recordedChange = host
33
+ .beginUpdate(htmlFilePath)
34
+ .insertRight(endTagOffset, `${insertion}\n`);
35
+ host.commitUpdate(recordedChange);
36
+ }
37
+ exports.appendHtmlElementToHead = appendHtmlElementToHead;
38
+ /** Parses the given HTML file and returns the head element if available. */
39
+ function getHtmlHeadTagElement(htmlContent) {
40
+ const document = parse5_1.parse(htmlContent, { sourceCodeLocationInfo: true });
41
+ const nodeQueue = [...document.childNodes];
42
+ while (nodeQueue.length) {
43
+ const node = nodeQueue.shift();
44
+ if (node.nodeName.toLowerCase() === 'head') {
45
+ return node;
46
+ }
47
+ else if (node.childNodes) {
48
+ nodeQueue.push(...node.childNodes);
49
+ }
50
+ }
51
+ return null;
52
+ }
53
+ exports.getHtmlHeadTagElement = getHtmlHeadTagElement;
54
+ //# sourceMappingURL=html-head-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-head-element.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/utils/html-head-element.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,2DAAqE;AACrE,qDAA4D;AAC5D,mCAAmF;AAEnF,kGAAkG;AAClG,SAAgB,uBAAuB,CAAC,IAAU,EAAE,YAAoB,EAAE,WAAmB;IAC3F,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAE/C,IAAI,CAAC,cAAc,EAAE;QACnB,MAAM,IAAI,gCAAmB,CAAC,iCAAiC,YAAY,EAAE,CAAC,CAAC;KAChF;IAED,MAAM,WAAW,GAAG,cAAc,CAAC,QAAQ,EAAE,CAAC;IAE9C,IAAI,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QACrC,OAAO;KACR;IAED,MAAM,OAAO,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAEnD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,iDAAiD,cAAc,EAAE,CAAC;KACzE;IAED,yFAAyF;IACzF,uEAAuE;IACvE,MAAM,YAAY,GAAG,OAAO,CAAC,kBAAmB,CAAC,MAAM,CAAC,WAAW,CAAC;IACpE,MAAM,iBAAiB,GAAG,2CAA0B,CAAC,OAAO,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,WAAW,EAAE,CAAC;IAEnE,MAAM,cAAc,GAAG,IAAI;SACxB,WAAW,CAAC,YAAY,CAAC;SACzB,WAAW,CAAC,YAAY,EAAE,GAAG,SAAS,IAAI,CAAC,CAAC;IAE/C,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;AACpC,CAAC;AA9BD,0DA8BC;AAED,4EAA4E;AAC5E,SAAgB,qBAAqB,CAAC,WAAmB;IACvD,MAAM,QAAQ,GAAG,cAAS,CAAC,WAAW,EAAE,EAAC,sBAAsB,EAAE,IAAI,EAAC,CAAwB,CAAC;IAC/F,MAAM,SAAS,GAAG,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IAE3C,OAAO,SAAS,CAAC,MAAM,EAAE;QACvB,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,EAAwB,CAAC;QAErD,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE;YAC1C,OAAO,IAAI,CAAC;SACb;aAAM,IAAI,IAAI,CAAC,UAAU,EAAE;YAC1B,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;SACpC;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAfD,sDAeC"}
@@ -9,6 +9,7 @@ export * from './ast';
9
9
  export * from './ast/ng-module-imports';
10
10
  export * from './build-component';
11
11
  export * from './get-project';
12
+ export * from './html-head-element';
12
13
  export * from './parse5-element';
13
14
  export * from './project-main-file';
14
15
  export * from './project-style-file';
@@ -14,6 +14,7 @@ __export(require("./ast"));
14
14
  __export(require("./ast/ng-module-imports"));
15
15
  __export(require("./build-component"));
16
16
  __export(require("./get-project"));
17
+ __export(require("./html-head-element"));
17
18
  __export(require("./parse5-element"));
18
19
  __export(require("./project-main-file"));
19
20
  __export(require("./project-style-file"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAEH,2BAAsB;AACtB,6CAAwC;AACxC,uCAAkC;AAClC,mCAA8B;AAC9B,sCAAiC;AACjC,yCAAoC;AACpC,0CAAqC;AACrC,uCAAkC;AAClC,yCAAoC;AACpC,mDAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAEH,2BAAsB;AACtB,6CAAwC;AACxC,uCAAkC;AAClC,mCAA8B;AAC9B,yCAAoC;AACpC,sCAAiC;AACjC,yCAAoC;AACpC,0CAAqC;AACrC,uCAAkC;AAClC,yCAAoC;AACpC,mDAA8C"}