@angular/cdk 10.0.0-rc.3 → 10.1.0

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 (242) hide show
  1. package/a11y/aria-describer/aria-describer.d.ts +10 -1
  2. package/a11y/focus-trap/focus-trap.d.ts +4 -2
  3. package/a11y/index.metadata.json +1 -1
  4. package/a11y/interactivity-checker/interactivity-checker.d.ts +11 -1
  5. package/a11y/key-manager/list-key-manager.d.ts +6 -0
  6. package/accordion/accordion.d.ts +7 -1
  7. package/accordion/index.d.ts +1 -0
  8. package/accordion/index.metadata.json +1 -1
  9. package/bundles/cdk-a11y.umd.js +78 -15
  10. package/bundles/cdk-a11y.umd.js.map +1 -1
  11. package/bundles/cdk-a11y.umd.min.js +11 -11
  12. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  13. package/bundles/cdk-accordion.umd.js +12 -4
  14. package/bundles/cdk-accordion.umd.js.map +1 -1
  15. package/bundles/cdk-accordion.umd.min.js +2 -2
  16. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  17. package/bundles/cdk-drag-drop.umd.js +717 -641
  18. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  19. package/bundles/cdk-drag-drop.umd.min.js +8 -16
  20. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  21. package/bundles/cdk-overlay.umd.js +199 -42
  22. package/bundles/cdk-overlay.umd.js.map +1 -1
  23. package/bundles/cdk-overlay.umd.min.js +11 -18
  24. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  25. package/bundles/cdk-platform.umd.js +0 -1
  26. package/bundles/cdk-platform.umd.js.map +1 -1
  27. package/bundles/cdk-platform.umd.min.js +2 -2
  28. package/bundles/cdk-platform.umd.min.js.map +1 -1
  29. package/bundles/cdk-scrolling.umd.js +26 -4
  30. package/bundles/cdk-scrolling.umd.js.map +1 -1
  31. package/bundles/cdk-scrolling.umd.min.js +11 -4
  32. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  33. package/bundles/cdk-testing-protractor.umd.min.js +1 -1
  34. package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
  35. package/bundles/cdk-testing-testbed.umd.min.js +8 -8
  36. package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
  37. package/bundles/cdk-testing.umd.js +32 -0
  38. package/bundles/cdk-testing.umd.js.map +1 -1
  39. package/bundles/cdk-testing.umd.min.js +5 -5
  40. package/bundles/cdk-testing.umd.min.js.map +1 -1
  41. package/bundles/cdk-tree.umd.js +6 -2
  42. package/bundles/cdk-tree.umd.js.map +1 -1
  43. package/bundles/cdk-tree.umd.min.js +3 -3
  44. package/bundles/cdk-tree.umd.min.js.map +1 -1
  45. package/bundles/cdk.umd.js +1 -1
  46. package/bundles/cdk.umd.js.map +1 -1
  47. package/bundles/cdk.umd.min.js +1 -1
  48. package/bundles/cdk.umd.min.js.map +1 -1
  49. package/drag-drop/directives/drag-handle.d.ts +7 -1
  50. package/drag-drop/directives/drag-placeholder.d.ts +7 -1
  51. package/drag-drop/directives/drag-preview.d.ts +7 -1
  52. package/drag-drop/directives/drag.d.ts +4 -14
  53. package/drag-drop/directives/drop-list-group.d.ts +7 -1
  54. package/drag-drop/directives/drop-list.d.ts +7 -1
  55. package/drag-drop/drag-ref.d.ts +6 -0
  56. package/drag-drop/drop-list-ref.d.ts +3 -2
  57. package/drag-drop/index.d.ts +2 -2
  58. package/drag-drop/index.metadata.json +1 -1
  59. package/esm2015/a11y/a11y-module.js +15 -19
  60. package/esm2015/a11y/aria-describer/aria-describer.js +177 -167
  61. package/esm2015/a11y/focus-monitor/focus-monitor.js +337 -345
  62. package/esm2015/a11y/focus-trap/configurable-focus-trap-factory.js +30 -34
  63. package/esm2015/a11y/focus-trap/focus-trap-manager.js +36 -40
  64. package/esm2015/a11y/focus-trap/focus-trap.js +85 -82
  65. package/esm2015/a11y/high-contrast-mode/high-contrast-mode-detector.js +56 -60
  66. package/esm2015/a11y/interactivity-checker/interactivity-checker.js +113 -104
  67. package/esm2015/a11y/key-manager/list-key-manager.js +29 -4
  68. package/esm2015/a11y/live-announcer/live-announcer.js +138 -146
  69. package/esm2015/accordion/accordion-item.js +119 -123
  70. package/esm2015/accordion/accordion-module.js +9 -13
  71. package/esm2015/accordion/accordion.js +49 -46
  72. package/esm2015/accordion/index.js +2 -1
  73. package/esm2015/bidi/bidi-module.js +9 -13
  74. package/esm2015/bidi/dir.js +41 -45
  75. package/esm2015/bidi/directionality.js +27 -31
  76. package/esm2015/clipboard/clipboard-module.js +9 -13
  77. package/esm2015/clipboard/clipboard.js +36 -40
  78. package/esm2015/clipboard/copy-to-clipboard.js +71 -75
  79. package/esm2015/collections/unique-selection-dispatcher.js +33 -37
  80. package/esm2015/drag-drop/directives/drag-handle.js +42 -39
  81. package/esm2015/drag-drop/directives/drag-placeholder.js +24 -21
  82. package/esm2015/drag-drop/directives/drag-preview.js +29 -26
  83. package/esm2015/drag-drop/directives/drag.js +313 -319
  84. package/esm2015/drag-drop/directives/drop-list-group.js +32 -29
  85. package/esm2015/drag-drop/directives/drop-list.js +251 -250
  86. package/esm2015/drag-drop/drag-drop-module.js +27 -31
  87. package/esm2015/drag-drop/drag-drop-registry.js +139 -143
  88. package/esm2015/drag-drop/drag-drop.js +33 -37
  89. package/esm2015/drag-drop/drag-ref.js +59 -25
  90. package/esm2015/drag-drop/drop-list-ref.js +15 -9
  91. package/esm2015/drag-drop/index.js +3 -2
  92. package/esm2015/layout/breakpoints-observer.js +81 -85
  93. package/esm2015/layout/layout-module.js +6 -10
  94. package/esm2015/layout/media-matcher.js +28 -32
  95. package/esm2015/observers/observe-content.js +147 -163
  96. package/esm2015/overlay/dispatchers/base-overlay-dispatcher.js +51 -0
  97. package/esm2015/overlay/dispatchers/index.js +10 -0
  98. package/esm2015/overlay/dispatchers/overlay-keyboard-dispatcher.js +79 -0
  99. package/esm2015/overlay/dispatchers/overlay-outside-click-dispatcher.js +94 -0
  100. package/esm2015/overlay/fullscreen-overlay-container.js +70 -74
  101. package/esm2015/overlay/index.js +5 -4
  102. package/esm2015/overlay/overlay-config.js +5 -1
  103. package/esm2015/overlay/overlay-container.js +69 -73
  104. package/esm2015/overlay/overlay-directives.js +245 -243
  105. package/esm2015/overlay/overlay-module.js +15 -19
  106. package/esm2015/overlay/overlay-ref.js +24 -2
  107. package/esm2015/overlay/overlay-reference.js +1 -1
  108. package/esm2015/overlay/overlay.js +93 -92
  109. package/esm2015/overlay/position/connected-position.js +14 -18
  110. package/esm2015/overlay/position/overlay-position-builder.js +43 -47
  111. package/esm2015/overlay/public-api.js +2 -2
  112. package/esm2015/overlay/scroll/scroll-strategy-options.js +33 -37
  113. package/esm2015/platform/features/scrolling.js +1 -2
  114. package/esm2015/platform/platform-module.js +6 -10
  115. package/esm2015/platform/platform.js +48 -52
  116. package/esm2015/portal/portal-directives.js +181 -201
  117. package/esm2015/scrolling/fixed-size-virtual-scroll.js +57 -47
  118. package/esm2015/scrolling/public-api.js +2 -1
  119. package/esm2015/scrolling/scroll-dispatcher.js +139 -143
  120. package/esm2015/scrolling/scrollable.js +135 -139
  121. package/esm2015/scrolling/scrolling-module.js +32 -40
  122. package/esm2015/scrolling/viewport-ruler.js +105 -109
  123. package/esm2015/scrolling/virtual-for-of.js +264 -268
  124. package/esm2015/scrolling/virtual-scroll-repeater.js +8 -0
  125. package/esm2015/scrolling/virtual-scroll-viewport.js +318 -322
  126. package/esm2015/stepper/step-header.js +20 -24
  127. package/esm2015/stepper/step-label.js +13 -17
  128. package/esm2015/stepper/stepper-button.js +59 -67
  129. package/esm2015/stepper/stepper-module.js +24 -28
  130. package/esm2015/stepper/stepper.js +313 -321
  131. package/esm2015/table/cell.js +129 -157
  132. package/esm2015/table/row.js +183 -219
  133. package/esm2015/table/table-module.js +9 -13
  134. package/esm2015/table/table.js +765 -785
  135. package/esm2015/table/text-column.js +85 -89
  136. package/esm2015/testing/component-harness.js +19 -1
  137. package/esm2015/testing/harness-environment.js +7 -1
  138. package/esm2015/text-field/autofill.js +89 -97
  139. package/esm2015/text-field/autosize.js +225 -229
  140. package/esm2015/text-field/text-field-module.js +10 -14
  141. package/esm2015/tree/control/nested-tree-control.js +7 -3
  142. package/esm2015/tree/nested-node.js +79 -83
  143. package/esm2015/tree/node.js +17 -21
  144. package/esm2015/tree/outlet.js +15 -19
  145. package/esm2015/tree/padding.js +88 -92
  146. package/esm2015/tree/toggle.js +32 -36
  147. package/esm2015/tree/tree-module.js +10 -14
  148. package/esm2015/tree/tree.js +266 -274
  149. package/esm2015/version.js +1 -1
  150. package/fesm2015/a11y.js +1021 -996
  151. package/fesm2015/a11y.js.map +1 -1
  152. package/fesm2015/accordion.js +173 -175
  153. package/fesm2015/accordion.js.map +1 -1
  154. package/fesm2015/bidi.js +74 -83
  155. package/fesm2015/bidi.js.map +1 -1
  156. package/fesm2015/cdk.js +1 -1
  157. package/fesm2015/cdk.js.map +1 -1
  158. package/fesm2015/clipboard.js +113 -122
  159. package/fesm2015/clipboard.js.map +1 -1
  160. package/fesm2015/collections.js +32 -35
  161. package/fesm2015/collections.js.map +1 -1
  162. package/fesm2015/drag-drop.js +1005 -961
  163. package/fesm2015/drag-drop.js.map +1 -1
  164. package/fesm2015/layout.js +111 -120
  165. package/fesm2015/layout.js.map +1 -1
  166. package/fesm2015/observers.js +146 -158
  167. package/fesm2015/observers.js.map +1 -1
  168. package/fesm2015/overlay.js +793 -659
  169. package/fesm2015/overlay.js.map +1 -1
  170. package/fesm2015/platform.js +52 -59
  171. package/fesm2015/platform.js.map +1 -1
  172. package/fesm2015/portal.js +180 -195
  173. package/fesm2015/portal.js.map +1 -1
  174. package/fesm2015/scrolling.js +1058 -1060
  175. package/fesm2015/scrolling.js.map +1 -1
  176. package/fesm2015/stepper.js +424 -445
  177. package/fesm2015/stepper.js.map +1 -1
  178. package/fesm2015/table.js +1178 -1247
  179. package/fesm2015/table.js.map +1 -1
  180. package/fesm2015/testing.js +25 -1
  181. package/fesm2015/testing.js.map +1 -1
  182. package/fesm2015/text-field.js +318 -330
  183. package/fesm2015/text-field.js.map +1 -1
  184. package/fesm2015/tree.js +517 -537
  185. package/fesm2015/tree.js.map +1 -1
  186. package/overlay/dispatchers/base-overlay-dispatcher.d.ts +28 -0
  187. package/overlay/dispatchers/index.d.ts +9 -0
  188. package/overlay/{keyboard → dispatchers}/overlay-keyboard-dispatcher.d.ts +4 -10
  189. package/overlay/dispatchers/overlay-outside-click-dispatcher.d.ts +27 -0
  190. package/overlay/index.d.ts +4 -3
  191. package/overlay/index.metadata.json +1 -1
  192. package/overlay/overlay-config.d.ts +4 -0
  193. package/overlay/overlay-directives.d.ts +4 -0
  194. package/overlay/overlay-ref.d.ts +8 -2
  195. package/overlay/overlay-reference.d.ts +1 -0
  196. package/overlay/overlay.d.ts +4 -2
  197. package/overlay/public-api.d.ts +1 -1
  198. package/package.json +3 -3
  199. package/schematics/index.js +1 -1
  200. package/schematics/migration.json +5 -0
  201. package/schematics/ng-add/index.js +1 -1
  202. package/schematics/ng-update/data/index.js +1 -1
  203. package/schematics/ng-update/devkit-file-system.d.ts +5 -5
  204. package/schematics/ng-update/devkit-file-system.js +21 -16
  205. package/schematics/ng-update/devkit-migration-rule.js +13 -20
  206. package/schematics/ng-update/devkit-migration.d.ts +0 -2
  207. package/schematics/ng-update/devkit-migration.js +1 -1
  208. package/schematics/ng-update/find-stylesheets.d.ts +10 -0
  209. package/schematics/ng-update/find-stylesheets.js +31 -0
  210. package/schematics/ng-update/index.d.ts +2 -0
  211. package/schematics/ng-update/index.js +7 -2
  212. package/schematics/ng-update/migrations/attribute-selectors.js +3 -3
  213. package/schematics/ng-update/migrations/css-selectors.js +3 -3
  214. package/schematics/ng-update/migrations/element-selectors.js +3 -3
  215. package/schematics/ng-update/public-api.js +1 -1
  216. package/schematics/update-tool/component-resource-collector.d.ts +1 -1
  217. package/schematics/update-tool/component-resource-collector.js +18 -14
  218. package/schematics/update-tool/file-system.d.ts +19 -14
  219. package/schematics/update-tool/file-system.js +1 -1
  220. package/schematics/update-tool/index.d.ts +21 -3
  221. package/schematics/update-tool/index.js +29 -23
  222. package/schematics/update-tool/public-api.js +1 -1
  223. package/schematics/update-tool/target-version.d.ts +2 -1
  224. package/schematics/update-tool/target-version.js +5 -3
  225. package/schematics/update-tool/utils/parse-tsconfig.d.ts +2 -1
  226. package/schematics/update-tool/utils/parse-tsconfig.js +6 -10
  227. package/schematics/update-tool/utils/virtual-host.d.ts +34 -0
  228. package/schematics/update-tool/utils/virtual-host.js +62 -0
  229. package/schematics/update-tool/version-changes.js +4 -6
  230. package/schematics/utils/index.js +1 -1
  231. package/schematics/utils/project-tsconfig-paths.d.ts +2 -1
  232. package/schematics/utils/project-tsconfig-paths.js +1 -1
  233. package/scrolling/index.metadata.json +1 -1
  234. package/scrolling/public-api.d.ts +1 -0
  235. package/scrolling/virtual-for-of.d.ts +2 -1
  236. package/scrolling/virtual-scroll-repeater.d.ts +16 -0
  237. package/scrolling/virtual-scroll-viewport.d.ts +4 -4
  238. package/testing/component-harness.d.ts +12 -0
  239. package/testing/harness-environment.d.ts +1 -0
  240. package/tree/control/nested-tree-control.d.ts +7 -2
  241. package/tree/index.metadata.json +1 -1
  242. package/esm2015/overlay/keyboard/overlay-keyboard-dispatcher.js +0 -100
@@ -26,57 +26,54 @@ catch (_a) {
26
26
  * Service to detect the current platform by comparing the userAgent strings and
27
27
  * checking browser-specific global properties.
28
28
  */
29
- let Platform = /** @class */ (() => {
30
- class Platform {
31
- constructor(_platformId) {
32
- this._platformId = _platformId;
33
- // We want to use the Angular platform check because if the Document is shimmed
34
- // without the navigator, the following checks will fail. This is preferred because
35
- // sometimes the Document may be shimmed without the user's knowledge or intention
36
- /** Whether the Angular application is being rendered in the browser. */
37
- this.isBrowser = this._platformId ?
38
- isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;
39
- /** Whether the current browser is Microsoft Edge. */
40
- this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);
41
- /** Whether the current rendering engine is Microsoft Trident. */
42
- this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);
43
- // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.
44
- /** Whether the current rendering engine is Blink. */
45
- this.BLINK = this.isBrowser && (!!(window.chrome || hasV8BreakIterator) &&
46
- typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);
47
- // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to
48
- // ensure that Webkit runs standalone and is not used as another engine's base.
49
- /** Whether the current rendering engine is WebKit. */
50
- this.WEBKIT = this.isBrowser &&
51
- /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;
52
- /** Whether the current platform is Apple iOS. */
53
- this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&
54
- !('MSStream' in window);
55
- // It's difficult to detect the plain Gecko engine, because most of the browsers identify
56
- // them self as Gecko-like browsers and modify the userAgent's according to that.
57
- // Since we only cover one explicit Firefox case, we can simply check for Firefox
58
- // instead of having an unstable check for Gecko.
59
- /** Whether the current browser is Firefox. */
60
- this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);
61
- /** Whether the current platform is Android. */
62
- // Trident on mobile adds the android platform to the userAgent to trick detections.
63
- this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;
64
- // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake
65
- // this and just place the Safari keyword in the userAgent. To be more safe about Safari every
66
- // Safari browser should also use Webkit as its layout engine.
67
- /** Whether the current browser is Safari. */
68
- this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;
69
- }
29
+ class Platform {
30
+ constructor(_platformId) {
31
+ this._platformId = _platformId;
32
+ // We want to use the Angular platform check because if the Document is shimmed
33
+ // without the navigator, the following checks will fail. This is preferred because
34
+ // sometimes the Document may be shimmed without the user's knowledge or intention
35
+ /** Whether the Angular application is being rendered in the browser. */
36
+ this.isBrowser = this._platformId ?
37
+ isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;
38
+ /** Whether the current browser is Microsoft Edge. */
39
+ this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);
40
+ /** Whether the current rendering engine is Microsoft Trident. */
41
+ this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);
42
+ // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.
43
+ /** Whether the current rendering engine is Blink. */
44
+ this.BLINK = this.isBrowser && (!!(window.chrome || hasV8BreakIterator) &&
45
+ typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);
46
+ // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to
47
+ // ensure that Webkit runs standalone and is not used as another engine's base.
48
+ /** Whether the current rendering engine is WebKit. */
49
+ this.WEBKIT = this.isBrowser &&
50
+ /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;
51
+ /** Whether the current platform is Apple iOS. */
52
+ this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&
53
+ !('MSStream' in window);
54
+ // It's difficult to detect the plain Gecko engine, because most of the browsers identify
55
+ // them self as Gecko-like browsers and modify the userAgent's according to that.
56
+ // Since we only cover one explicit Firefox case, we can simply check for Firefox
57
+ // instead of having an unstable check for Gecko.
58
+ /** Whether the current browser is Firefox. */
59
+ this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);
60
+ /** Whether the current platform is Android. */
61
+ // Trident on mobile adds the android platform to the userAgent to trick detections.
62
+ this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;
63
+ // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake
64
+ // this and just place the Safari keyword in the userAgent. To be more safe about Safari every
65
+ // Safari browser should also use Webkit as its layout engine.
66
+ /** Whether the current browser is Safari. */
67
+ this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;
70
68
  }
71
- Platform.ɵprov = ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(ɵɵinject(PLATFORM_ID)); }, token: Platform, providedIn: "root" });
72
- Platform.decorators = [
73
- { type: Injectable, args: [{ providedIn: 'root' },] }
74
- ];
75
- Platform.ctorParameters = () => [
76
- { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
77
- ];
78
- return Platform;
79
- })();
69
+ }
70
+ Platform.ɵprov = ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(ɵɵinject(PLATFORM_ID)); }, token: Platform, providedIn: "root" });
71
+ Platform.decorators = [
72
+ { type: Injectable, args: [{ providedIn: 'root' },] }
73
+ ];
74
+ Platform.ctorParameters = () => [
75
+ { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
76
+ ];
80
77
 
81
78
  /**
82
79
  * @license
@@ -85,14 +82,11 @@ let Platform = /** @class */ (() => {
85
82
  * Use of this source code is governed by an MIT-style license that can be
86
83
  * found in the LICENSE file at https://angular.io/license
87
84
  */
88
- let PlatformModule = /** @class */ (() => {
89
- class PlatformModule {
90
- }
91
- PlatformModule.decorators = [
92
- { type: NgModule, args: [{},] }
93
- ];
94
- return PlatformModule;
95
- })();
85
+ class PlatformModule {
86
+ }
87
+ PlatformModule.decorators = [
88
+ { type: NgModule, args: [{},] }
89
+ ];
96
90
 
97
91
  /**
98
92
  * @license
@@ -216,7 +210,6 @@ function getRtlScrollAxisType() {
216
210
  const scrollContainer = document.createElement('div');
217
211
  const containerStyle = scrollContainer.style;
218
212
  scrollContainer.dir = 'rtl';
219
- containerStyle.height = '1px';
220
213
  containerStyle.width = '1px';
221
214
  containerStyle.overflow = 'auto';
222
215
  containerStyle.visibility = 'hidden';
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sources":["../../../../../../src/cdk/platform/platform.ts","../../../../../../src/cdk/platform/platform-module.ts","../../../../../../src/cdk/platform/features/input-types.ts","../../../../../../src/cdk/platform/features/passive-listeners.ts","../../../../../../src/cdk/platform/features/scrolling.ts","../../../../../../src/cdk/platform/features/shadow-dom.ts","../../../../../../src/cdk/platform/public-api.ts","../../../../../../src/cdk/platform/index.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 {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\n} catch {\n hasV8BreakIterator = false;\n}\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable({providedIn: 'root'})\nexport class Platform {\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = this._platformId ?\n isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n\n constructor(@Inject(PLATFORM_ID) private _platformId: Object) {}\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 {NgModule} from '@angular/core';\n\n\n@NgModule({})\nexport class PlatformModule {}\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\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\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\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function normalizePassiveListenerOptions(options: AddEventListenerOptions):\n AddEventListenerOptions | boolean {\n return supportsPassiveEventListeners() ? options : !!options.capture;\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\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nexport const enum RtlScrollAxisType {\n /**\n * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n * all the way right.\n */\n NORMAL,\n /**\n * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n NEGATED,\n /**\n * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n INVERTED\n}\n\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType: RtlScrollAxisType|undefined;\n\n/** Check whether the browser supports scroll behaviors. */\nexport function supportsScrollBehavior(): boolean {\n return !!(typeof document == 'object' && 'scrollBehavior' in document.documentElement!.style);\n}\n\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nexport function getRtlScrollAxisType(): RtlScrollAxisType {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return RtlScrollAxisType.NORMAL;\n }\n\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.height = '1px';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n\n rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n }\n\n scrollContainer.parentNode!.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\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\nlet shadowDomIsSupported: boolean;\n\n/** Checks whether the user's browser support Shadow DOM. */\nexport function _supportsShadowDom(): boolean {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && ((head as any).createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n}\n\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nexport function _getShadowRoot(element: HTMLElement): Node | null {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n\n return null;\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\nexport * from './platform';\nexport * from './platform-module';\nexport * from './features/input-types';\nexport * from './features/passive-listeners';\nexport * from './features/scrolling';\nexport * from './features/shadow-dom';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\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AAGD,SAAgB,cAAc,CAAC,OAAoB;IACjD,IAAI,kBAAkB,EAAE,EAAE;QACxB,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC;;;QAIpE,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,UAAU,IAAI,QAAQ,YAAY,UAAU,EAAE;YACrF,OAAO,QAAQ,CAAC;SACjB;KACF;IAED,OAAO,IAAI,CAAC;CACb;;ACjCD;;;;;;GAMG;;ACNH;;GAEG;;;;"}
1
+ {"version":3,"file":"platform.js","sources":["../../../../../../src/cdk/platform/platform.ts","../../../../../../src/cdk/platform/platform-module.ts","../../../../../../src/cdk/platform/features/input-types.ts","../../../../../../src/cdk/platform/features/passive-listeners.ts","../../../../../../src/cdk/platform/features/scrolling.ts","../../../../../../src/cdk/platform/features/shadow-dom.ts","../../../../../../src/cdk/platform/public-api.ts","../../../../../../src/cdk/platform/index.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 {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\n} catch {\n hasV8BreakIterator = false;\n}\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable({providedIn: 'root'})\nexport class Platform {\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = this._platformId ?\n isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n\n constructor(@Inject(PLATFORM_ID) private _platformId: Object) {}\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 {NgModule} from '@angular/core';\n\n\n@NgModule({})\nexport class PlatformModule {}\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\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\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\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nexport function normalizePassiveListenerOptions(options: AddEventListenerOptions):\n AddEventListenerOptions | boolean {\n return supportsPassiveEventListeners() ? options : !!options.capture;\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\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nexport const enum RtlScrollAxisType {\n /**\n * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n * all the way right.\n */\n NORMAL,\n /**\n * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n NEGATED,\n /**\n * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n INVERTED\n}\n\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType: RtlScrollAxisType|undefined;\n\n/** Check whether the browser supports scroll behaviors. */\nexport function supportsScrollBehavior(): boolean {\n return !!(typeof document == 'object' && 'scrollBehavior' in document.documentElement!.style);\n}\n\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nexport function getRtlScrollAxisType(): RtlScrollAxisType {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return RtlScrollAxisType.NORMAL;\n }\n\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n\n rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n }\n\n scrollContainer.parentNode!.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\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\nlet shadowDomIsSupported: boolean;\n\n/** Checks whether the user's browser support Shadow DOM. */\nexport function _supportsShadowDom(): boolean {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && ((head as any).createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n}\n\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nexport function _getShadowRoot(element: HTMLElement): Node | null {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n\n return null;\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\nexport * from './platform';\nexport * from './platform-module';\nexport * from './features/input-types';\nexport * from './features/passive-listeners';\nexport * from './features/scrolling';\nexport * from './features/shadow-dom';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAAA;;;;;;;AAQA,AAGA;;AAEA,IAAI,kBAA2B,CAAC;;;;;;AAOhC,IAAI;IACF,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAK,IAAY,CAAC,eAAe,CAAC,CAAC;CACrF;AAAC,WAAM;IACN,kBAAkB,GAAG,KAAK,CAAC;CAC5B;;;;;AAOD,MAAa,QAAQ;IA8CnB,YAAyC,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;;;;;QAzC5D,cAAS,GAAY,IAAI,CAAC,WAAW;YACjC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC;;QAGrF,SAAI,GAAY,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;;QAGtE,YAAO,GAAY,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;;;QAIjF,UAAK,GAAY,IAAI,CAAC,SAAS,KAAK,CAAC,EAAG,MAAc,CAAC,MAAM,IAAI,kBAAk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