@angular/cdk 13.0.0-next.6 → 13.0.0-rc.1

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 (796) hide show
  1. package/a11y/a11y-module.d.ts +9 -7
  2. package/a11y/aria-describer/aria-describer.d.ts +3 -7
  3. package/a11y/focus-monitor/focus-monitor.d.ts +5 -0
  4. package/a11y/focus-trap/configurable-focus-trap-factory.d.ts +3 -7
  5. package/a11y/focus-trap/focus-trap-manager.d.ts +3 -7
  6. package/a11y/focus-trap/focus-trap.d.ts +5 -0
  7. package/a11y/high-contrast-mode/high-contrast-mode-detector.d.ts +3 -0
  8. package/a11y/index.d.ts +0 -1
  9. package/a11y/input-modality/input-modality-detector.d.ts +3 -7
  10. package/a11y/interactivity-checker/interactivity-checker.d.ts +3 -0
  11. package/a11y/live-announcer/live-announcer.d.ts +6 -1
  12. package/a11y/package.json +5 -5
  13. package/accordion/accordion-item.d.ts +3 -0
  14. package/accordion/accordion-module.d.ts +6 -7
  15. package/accordion/accordion.d.ts +3 -0
  16. package/accordion/index.d.ts +0 -1
  17. package/accordion/package.json +5 -5
  18. package/bidi/bidi-module.d.ts +5 -7
  19. package/bidi/dir.d.ts +3 -0
  20. package/bidi/directionality.d.ts +3 -0
  21. package/bidi/index.d.ts +0 -1
  22. package/bidi/package.json +5 -5
  23. package/clipboard/clipboard-module.d.ts +5 -7
  24. package/clipboard/clipboard.d.ts +3 -7
  25. package/clipboard/copy-to-clipboard.d.ts +3 -0
  26. package/clipboard/package.json +5 -5
  27. package/coercion/package.json +5 -5
  28. package/collections/package.json +5 -5
  29. package/collections/unique-selection-dispatcher.d.ts +3 -0
  30. package/drag-drop/client-rect.d.ts +8 -1
  31. package/drag-drop/directives/drag-handle.d.ts +3 -0
  32. package/drag-drop/directives/drag-placeholder.d.ts +3 -0
  33. package/drag-drop/directives/drag-preview.d.ts +3 -0
  34. package/drag-drop/directives/drag.d.ts +3 -0
  35. package/drag-drop/directives/drop-list-group.d.ts +3 -0
  36. package/drag-drop/directives/drop-list.d.ts +3 -0
  37. package/drag-drop/drag-drop-module.d.ts +11 -7
  38. package/drag-drop/drag-drop-registry.d.ts +3 -0
  39. package/drag-drop/drag-drop.d.ts +3 -0
  40. package/drag-drop/index.d.ts +0 -1
  41. package/drag-drop/package.json +5 -5
  42. package/esm2020/a11y/a11y-module.mjs +33 -0
  43. package/esm2020/a11y/aria-describer/aria-describer.mjs +208 -0
  44. package/{esm2015/a11y/aria-describer/aria-reference.js → esm2020/a11y/aria-describer/aria-reference.mjs} +1 -1
  45. package/esm2020/a11y/fake-event-detection.mjs +29 -0
  46. package/esm2020/a11y/focus-monitor/focus-monitor.mjs +400 -0
  47. package/{esm2015/a11y/focus-trap/configurable-focus-trap-config.js → esm2020/a11y/focus-trap/configurable-focus-trap-config.mjs} +0 -0
  48. package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +53 -0
  49. package/esm2020/a11y/focus-trap/configurable-focus-trap.mjs +51 -0
  50. package/esm2020/a11y/focus-trap/event-listener-inert-strategy.mjs +61 -0
  51. package/esm2020/a11y/focus-trap/focus-trap-inert-strategy.mjs +11 -0
  52. package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +53 -0
  53. package/esm2020/a11y/focus-trap/focus-trap.mjs +399 -0
  54. package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +95 -0
  55. package/esm2020/a11y/index.mjs +5 -0
  56. package/esm2020/a11y/input-modality/input-modality-detector.mjs +176 -0
  57. package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +238 -0
  58. package/{esm2015/a11y/key-manager/activedescendant-key-manager.js → esm2020/a11y/key-manager/activedescendant-key-manager.mjs} +1 -1
  59. package/{esm2015/a11y/key-manager/focus-key-manager.js → esm2020/a11y/key-manager/focus-key-manager.mjs} +0 -0
  60. package/esm2020/a11y/key-manager/list-key-manager.mjs +321 -0
  61. package/esm2020/a11y/live-announcer/live-announcer-tokens.mjs +19 -0
  62. package/esm2020/a11y/live-announcer/live-announcer.mjs +170 -0
  63. package/{esm2015/a11y/public-api.js → esm2020/a11y/public-api.mjs} +0 -0
  64. package/esm2020/accordion/accordion-item.mjs +167 -0
  65. package/esm2020/accordion/accordion-module.mjs +24 -0
  66. package/esm2020/accordion/accordion.mjs +70 -0
  67. package/esm2020/accordion/index.mjs +5 -0
  68. package/{esm2015/accordion/public-api.js → esm2020/accordion/public-api.mjs} +0 -0
  69. package/esm2020/bidi/bidi-module.mjs +23 -0
  70. package/{esm2015/bidi/dir-document-token.js → esm2020/bidi/dir-document-token.mjs} +1 -1
  71. package/esm2020/bidi/dir.mjs +67 -0
  72. package/esm2020/bidi/directionality.mjs +47 -0
  73. package/esm2020/bidi/index.mjs +5 -0
  74. package/{esm2015/bidi/public-api.js → esm2020/bidi/public-api.mjs} +1 -1
  75. package/esm2020/clipboard/clipboard-module.mjs +23 -0
  76. package/esm2020/clipboard/clipboard.mjs +53 -0
  77. package/esm2020/clipboard/copy-to-clipboard.mjs +99 -0
  78. package/{esm2015/clipboard/index.js → esm2020/clipboard/index.mjs} +0 -0
  79. package/esm2020/clipboard/pending-copy.mjs +67 -0
  80. package/{esm2015/clipboard/public-api.js → esm2020/clipboard/public-api.mjs} +0 -0
  81. package/{esm2015/coercion/array.js → esm2020/coercion/array.mjs} +0 -0
  82. package/{esm2015/coercion/boolean-property.js → esm2020/coercion/boolean-property.mjs} +0 -0
  83. package/{esm2015/coercion/css-pixel-value.js → esm2020/coercion/css-pixel-value.mjs} +0 -0
  84. package/{esm2015/coercion/element.js → esm2020/coercion/element.mjs} +0 -0
  85. package/{esm2015/coercion/index.js → esm2020/coercion/index.mjs} +0 -0
  86. package/{esm2015/coercion/number-property.js → esm2020/coercion/number-property.mjs} +0 -0
  87. package/{esm2015/coercion/public-api.js → esm2020/coercion/public-api.mjs} +0 -0
  88. package/{esm2015/coercion/string-array.js → esm2020/coercion/string-array.mjs} +0 -0
  89. package/{esm2015/collections/array-data-source.js → esm2020/collections/array-data-source.mjs} +1 -1
  90. package/esm2020/collections/collection-viewer.mjs +9 -0
  91. package/{esm2015/collections/data-source.js → esm2020/collections/data-source.mjs} +0 -0
  92. package/esm2020/collections/dispose-view-repeater-strategy.mjs +47 -0
  93. package/{esm2015/collections/index.js → esm2020/collections/index.mjs} +0 -0
  94. package/{esm2015/collections/public-api.js → esm2020/collections/public-api.mjs} +0 -0
  95. package/esm2020/collections/recycle-view-repeater-strategy.mjs +128 -0
  96. package/{esm2015/collections/selection-model.js → esm2020/collections/selection-model.mjs} +2 -2
  97. package/esm2020/collections/tree-adapter.mjs +9 -0
  98. package/esm2020/collections/unique-selection-dispatcher.mjs +55 -0
  99. package/esm2020/collections/view-repeater.mjs +14 -0
  100. package/esm2020/drag-drop/client-rect.mjs +64 -0
  101. package/esm2020/drag-drop/clone-node.mjs +65 -0
  102. package/esm2020/drag-drop/directives/assertions.mjs +18 -0
  103. package/{esm2015/drag-drop/directives/config.js → esm2020/drag-drop/directives/config.mjs} +1 -1
  104. package/esm2020/drag-drop/directives/drag-handle.mjs +66 -0
  105. package/esm2020/drag-drop/directives/drag-placeholder.mjs +36 -0
  106. package/esm2020/drag-drop/directives/drag-preview.mjs +47 -0
  107. package/esm2020/drag-drop/directives/drag.mjs +483 -0
  108. package/esm2020/drag-drop/directives/drop-list-group.mjs +53 -0
  109. package/esm2020/drag-drop/directives/drop-list.mjs +344 -0
  110. package/esm2020/drag-drop/drag-drop-module.mjs +57 -0
  111. package/esm2020/drag-drop/drag-drop-registry.mjs +231 -0
  112. package/esm2020/drag-drop/drag-drop.mjs +57 -0
  113. package/esm2020/drag-drop/drag-events.mjs +9 -0
  114. package/{esm2015/drag-drop/drag-parent.js → esm2020/drag-drop/drag-parent.mjs} +0 -0
  115. package/esm2020/drag-drop/drag-ref.mjs +1108 -0
  116. package/esm2020/drag-drop/drag-styling.mjs +69 -0
  117. package/esm2020/drag-drop/drag-utils.mjs +60 -0
  118. package/esm2020/drag-drop/drop-list-ref.mjs +830 -0
  119. package/{esm2015/drag-drop/index.js → esm2020/drag-drop/index.mjs} +1 -1
  120. package/{esm2015/drag-drop/parent-position-tracker.js → esm2020/drag-drop/parent-position-tracker.mjs} +2 -2
  121. package/{esm2015/drag-drop/public-api.js → esm2020/drag-drop/public-api.mjs} +0 -0
  122. package/esm2020/drag-drop/transition-duration.mjs +36 -0
  123. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  124. package/{esm2015/keycodes/index.js → esm2020/keycodes/index.mjs} +0 -0
  125. package/{esm2015/keycodes/keycodes.js → esm2020/keycodes/keycodes.mjs} +1 -1
  126. package/{esm2015/keycodes/modifiers.js → esm2020/keycodes/modifiers.mjs} +0 -0
  127. package/{esm2015/keycodes/public-api.js → esm2020/keycodes/public-api.mjs} +0 -0
  128. package/esm2020/layout/breakpoints-observer.mjs +105 -0
  129. package/{esm2015/layout/breakpoints.js → esm2020/layout/breakpoints.mjs} +1 -1
  130. package/{esm2015/layout/index.js → esm2020/layout/index.mjs} +0 -0
  131. package/esm2020/layout/layout-module.mjs +19 -0
  132. package/esm2020/layout/media-matcher.mjs +85 -0
  133. package/{esm2015/layout/public-api.js → esm2020/layout/public-api.mjs} +0 -0
  134. package/{esm2015/observers/index.js → esm2020/observers/index.mjs} +0 -0
  135. package/esm2020/observers/observe-content.mjs +187 -0
  136. package/{esm2015/observers/public-api.js → esm2020/observers/public-api.mjs} +0 -0
  137. package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +52 -0
  138. package/{esm2015/overlay/dispatchers/index.js → esm2020/overlay/dispatchers/index.mjs} +0 -0
  139. package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +63 -0
  140. package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +116 -0
  141. package/esm2020/overlay/fullscreen-overlay-container.mjs +94 -0
  142. package/esm2020/overlay/index.mjs +5 -0
  143. package/esm2020/overlay/overlay-config.mjs +45 -0
  144. package/esm2020/overlay/overlay-container.mjs +81 -0
  145. package/esm2020/overlay/overlay-directives.mjs +427 -0
  146. package/esm2020/overlay/overlay-module.mjs +29 -0
  147. package/esm2020/overlay/overlay-ref.mjs +402 -0
  148. package/{esm2015/overlay/overlay-reference.js → esm2020/overlay/overlay-reference.mjs} +0 -0
  149. package/esm2020/overlay/overlay.mjs +119 -0
  150. package/esm2020/overlay/position/connected-position.mjs +97 -0
  151. package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +959 -0
  152. package/esm2020/overlay/position/global-position-strategy.mjs +203 -0
  153. package/esm2020/overlay/position/overlay-position-builder.mjs +50 -0
  154. package/{esm2015/overlay/position/position-strategy.js → esm2020/overlay/position/position-strategy.mjs} +0 -0
  155. package/esm2020/overlay/position/scroll-clip.mjs +40 -0
  156. package/{esm2015/overlay/public-api.js → esm2020/overlay/public-api.mjs} +0 -0
  157. package/{esm2015/overlay/scroll/block-scroll-strategy.js → esm2020/overlay/scroll/block-scroll-strategy.mjs} +1 -1
  158. package/esm2020/overlay/scroll/close-scroll-strategy.mjs +61 -0
  159. package/{esm2015/overlay/scroll/index.js → esm2020/overlay/scroll/index.mjs} +2 -2
  160. package/{esm2015/overlay/scroll/noop-scroll-strategy.js → esm2020/overlay/scroll/noop-scroll-strategy.mjs} +1 -1
  161. package/{esm2015/overlay/scroll/reposition-scroll-strategy.js → esm2020/overlay/scroll/reposition-scroll-strategy.mjs} +1 -1
  162. package/esm2020/overlay/scroll/scroll-strategy-options.mjs +55 -0
  163. package/{esm2015/overlay/scroll/scroll-strategy.js → esm2020/overlay/scroll/scroll-strategy.mjs} +0 -0
  164. package/{esm2015/platform/features/input-types.js → esm2020/platform/features/input-types.mjs} +1 -1
  165. package/esm2020/platform/features/passive-listeners.mjs +36 -0
  166. package/esm2020/platform/features/scrolling.mjs +85 -0
  167. package/{esm2015/platform/features/shadow-dom.js → esm2020/platform/features/shadow-dom.mjs} +4 -3
  168. package/esm2020/platform/features/test-environment.mjs +27 -0
  169. package/{esm2015/platform/index.js → esm2020/platform/index.mjs} +0 -0
  170. package/esm2020/platform/platform-module.mjs +19 -0
  171. package/esm2020/platform/platform.mjs +85 -0
  172. package/{esm2015/platform/public-api.js → esm2020/platform/public-api.mjs} +0 -0
  173. package/esm2020/portal/dom-portal-outlet.mjs +134 -0
  174. package/{esm2015/portal/index.js → esm2020/portal/index.mjs} +0 -0
  175. package/esm2020/portal/portal-directives.mjs +244 -0
  176. package/{esm2015/portal/portal-errors.js → esm2020/portal/portal-errors.mjs} +1 -1
  177. package/esm2020/portal/portal-injector.mjs +28 -0
  178. package/esm2020/portal/portal.mjs +179 -0
  179. package/{esm2015/portal/public-api.js → esm2020/portal/public-api.mjs} +0 -0
  180. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  181. package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +217 -0
  182. package/{esm2015/scrolling/index.js → esm2020/scrolling/index.mjs} +0 -0
  183. package/{esm2015/scrolling/public-api.js → esm2020/scrolling/public-api.mjs} +0 -0
  184. package/esm2020/scrolling/scroll-dispatcher.mjs +163 -0
  185. package/esm2020/scrolling/scrollable.mjs +176 -0
  186. package/esm2020/scrolling/scrolling-module.mjs +52 -0
  187. package/esm2020/scrolling/viewport-ruler.mjs +146 -0
  188. package/esm2020/scrolling/virtual-for-of.mjs +296 -0
  189. package/{esm2015/scrolling/virtual-scroll-repeater.js → esm2020/scrolling/virtual-scroll-repeater.mjs} +0 -0
  190. package/esm2020/scrolling/virtual-scroll-strategy.mjs +11 -0
  191. package/esm2020/scrolling/virtual-scroll-viewport.mjs +378 -0
  192. package/{esm2015/stepper/index.js → esm2020/stepper/index.mjs} +0 -0
  193. package/{esm2015/stepper/public-api.js → esm2020/stepper/public-api.mjs} +0 -0
  194. package/esm2020/stepper/step-header.mjs +30 -0
  195. package/esm2020/stepper/step-label.mjs +23 -0
  196. package/esm2020/stepper/stepper-button.mjs +76 -0
  197. package/esm2020/stepper/stepper-module.mjs +40 -0
  198. package/esm2020/stepper/stepper.mjs +471 -0
  199. package/esm2020/table/can-stick.mjs +44 -0
  200. package/esm2020/table/cell.mjs +222 -0
  201. package/esm2020/table/coalesced-style-scheduler.mjs +91 -0
  202. package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
  203. package/{esm2015/table/public-api.js → esm2020/table/public-api.mjs} +0 -0
  204. package/esm2020/table/row.mjs +254 -0
  205. package/esm2020/table/sticky-position-listener.mjs +11 -0
  206. package/esm2020/table/sticky-styler.mjs +345 -0
  207. package/{esm2015/table/table-errors.js → esm2020/table/table-errors.mjs} +1 -1
  208. package/esm2020/table/table-module.mjs +94 -0
  209. package/esm2020/table/table.mjs +1023 -0
  210. package/esm2020/table/text-column.mjs +153 -0
  211. package/{esm2015/table/tokens.js → esm2020/table/tokens.mjs} +1 -1
  212. package/esm2020/testing/change-detection.mjs +102 -0
  213. package/esm2020/testing/component-harness.mjs +322 -0
  214. package/{esm2015/testing/element-dimensions.js → esm2020/testing/element-dimensions.mjs} +1 -1
  215. package/esm2020/testing/harness-environment.mjs +202 -0
  216. package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
  217. package/{esm2015/testing/protractor/index.js → esm2020/testing/protractor/index.mjs} +0 -0
  218. package/esm2020/testing/protractor/protractor-element.mjs +234 -0
  219. package/esm2020/testing/protractor/protractor-harness-environment.mjs +72 -0
  220. package/{esm2015/testing/protractor/public-api.js → esm2020/testing/protractor/public-api.mjs} +0 -0
  221. package/{esm2015/testing/public-api.js → esm2020/testing/public-api.mjs} +0 -0
  222. package/{esm2015/testing/selenium-webdriver/index.js → esm2020/testing/selenium-webdriver/index.mjs} +0 -0
  223. package/{esm2015/testing/selenium-webdriver/public-api.js → esm2020/testing/selenium-webdriver/public-api.mjs} +0 -0
  224. package/esm2020/testing/selenium-webdriver/selenium-web-driver-element.mjs +199 -0
  225. package/esm2020/testing/selenium-webdriver/selenium-web-driver-harness-environment.mjs +87 -0
  226. package/{esm2015/testing/selenium-webdriver/selenium-webdriver-keys.js → esm2020/testing/selenium-webdriver/selenium-webdriver-keys.mjs} +2 -2
  227. package/esm2020/testing/test-element.mjs +48 -0
  228. package/esm2020/testing/testbed/fake-events/dispatch-events.mjs +53 -0
  229. package/esm2020/testing/testbed/fake-events/element-focus.mjs +39 -0
  230. package/esm2020/testing/testbed/fake-events/event-objects.mjs +113 -0
  231. package/{esm2015/testing/testbed/fake-events/index.js → esm2020/testing/testbed/fake-events/index.mjs} +0 -0
  232. package/esm2020/testing/testbed/fake-events/type-in-element.mjs +88 -0
  233. package/{esm2015/testing/testbed/index.js → esm2020/testing/testbed/index.mjs} +0 -0
  234. package/{esm2015/testing/testbed/public-api.js → esm2020/testing/testbed/public-api.mjs} +0 -0
  235. package/esm2020/testing/testbed/task-state-zone-interceptor.mjs +82 -0
  236. package/esm2020/testing/testbed/testbed-harness-environment.mjs +162 -0
  237. package/esm2020/testing/testbed/unit-test-element.mjs +224 -0
  238. package/esm2020/testing/text-filtering.mjs +21 -0
  239. package/esm2020/text-field/autofill.mjs +113 -0
  240. package/esm2020/text-field/autosize.mjs +310 -0
  241. package/{esm2015/text-field/index.js → esm2020/text-field/index.mjs} +0 -0
  242. package/{esm2015/text-field/public-api.js → esm2020/text-field/public-api.mjs} +0 -0
  243. package/esm2020/text-field/text-field-module.mjs +26 -0
  244. package/{esm2015/tree/control/base-tree-control.js → esm2020/tree/control/base-tree-control.mjs} +4 -4
  245. package/{esm2015/tree/control/flat-tree-control.js → esm2020/tree/control/flat-tree-control.mjs} +1 -1
  246. package/esm2020/tree/control/nested-tree-control.mjs +58 -0
  247. package/{esm2015/tree/control/tree-control.js → esm2020/tree/control/tree-control.mjs} +0 -0
  248. package/{esm2015/tree/index.js → esm2020/tree/index.mjs} +0 -0
  249. package/esm2020/tree/nested-node.mjs +117 -0
  250. package/esm2020/tree/node.mjs +35 -0
  251. package/esm2020/tree/outlet.mjs +39 -0
  252. package/esm2020/tree/padding.mjs +131 -0
  253. package/{esm2015/tree/public-api.js → esm2020/tree/public-api.mjs} +0 -0
  254. package/esm2020/tree/toggle.mjs +53 -0
  255. package/{esm2015/tree/tree-errors.js → esm2020/tree/tree-errors.mjs} +0 -0
  256. package/esm2020/tree/tree-module.mjs +49 -0
  257. package/esm2020/tree/tree.mjs +361 -0
  258. package/{esm2015/version.js → esm2020/version.mjs} +1 -1
  259. package/fesm2015/a11y.mjs +2356 -0
  260. package/fesm2015/a11y.mjs.map +1 -0
  261. package/fesm2015/accordion.mjs +267 -0
  262. package/fesm2015/accordion.mjs.map +1 -0
  263. package/fesm2015/bidi.mjs +179 -0
  264. package/fesm2015/bidi.mjs.map +1 -0
  265. package/fesm2015/{cdk.js → cdk.mjs} +2 -2
  266. package/fesm2015/cdk.mjs.map +1 -0
  267. package/fesm2015/clipboard.mjs +253 -0
  268. package/fesm2015/clipboard.mjs.map +1 -0
  269. package/fesm2015/{coercion.js → coercion.mjs} +1 -1
  270. package/fesm2015/coercion.mjs.map +1 -0
  271. package/fesm2015/{collections.js → collections.mjs} +15 -27
  272. package/fesm2015/collections.mjs.map +1 -0
  273. package/fesm2015/drag-drop.mjs +3667 -0
  274. package/fesm2015/drag-drop.mjs.map +1 -0
  275. package/fesm2015/{keycodes.js → keycodes.mjs} +1 -1
  276. package/fesm2015/keycodes.mjs.map +1 -0
  277. package/fesm2015/{layout.js → layout.mjs} +30 -28
  278. package/fesm2015/layout.mjs.map +1 -0
  279. package/fesm2015/{observers.js → observers.mjs} +50 -41
  280. package/fesm2015/observers.mjs.map +1 -0
  281. package/fesm2015/overlay.mjs +3004 -0
  282. package/fesm2015/overlay.mjs.map +1 -0
  283. package/fesm2015/platform.mjs +380 -0
  284. package/fesm2015/platform.mjs.map +1 -0
  285. package/fesm2015/portal.mjs +649 -0
  286. package/fesm2015/portal.mjs.map +1 -0
  287. package/fesm2015/scrolling.mjs +1394 -0
  288. package/fesm2015/scrolling.mjs.map +1 -0
  289. package/fesm2015/{stepper.js → stepper.mjs} +186 -133
  290. package/fesm2015/stepper.mjs.map +1 -0
  291. package/fesm2015/{table.js → table.mjs} +500 -359
  292. package/fesm2015/table.mjs.map +1 -0
  293. package/fesm2015/testing/{protractor.js → protractor.mjs} +12 -25
  294. package/fesm2015/testing/protractor.mjs.map +1 -0
  295. package/fesm2015/testing/{selenium-webdriver.js → selenium-webdriver.mjs} +14 -28
  296. package/fesm2015/testing/selenium-webdriver.mjs.map +1 -0
  297. package/fesm2015/testing/{testbed.js → testbed.mjs} +23 -29
  298. package/fesm2015/testing/testbed.mjs.map +1 -0
  299. package/fesm2015/{testing.js → testing.mjs} +19 -45
  300. package/fesm2015/testing.mjs.map +1 -0
  301. package/fesm2015/text-field.mjs +455 -0
  302. package/fesm2015/text-field.mjs.map +1 -0
  303. package/fesm2015/{tree.js → tree.mjs} +198 -152
  304. package/fesm2015/tree.mjs.map +1 -0
  305. package/{fesm2015/a11y.js → fesm2020/a11y.mjs} +272 -233
  306. package/fesm2020/a11y.mjs.map +1 -0
  307. package/{fesm2015/accordion.js → fesm2020/accordion.mjs} +87 -57
  308. package/fesm2020/accordion.mjs.map +1 -0
  309. package/{fesm2015/bidi.js → fesm2020/bidi.mjs} +47 -31
  310. package/fesm2020/bidi.mjs.map +1 -0
  311. package/fesm2020/cdk.mjs +30 -0
  312. package/fesm2020/cdk.mjs.map +1 -0
  313. package/{fesm2015/clipboard.js → fesm2020/clipboard.mjs} +51 -40
  314. package/fesm2020/clipboard.mjs.map +1 -0
  315. package/fesm2020/coercion.mjs +132 -0
  316. package/fesm2020/coercion.mjs.map +1 -0
  317. package/fesm2020/collections.mjs +472 -0
  318. package/fesm2020/collections.mjs.map +1 -0
  319. package/{fesm2015/drag-drop.js → fesm2020/drag-drop.mjs} +523 -366
  320. package/fesm2020/drag-drop.mjs.map +1 -0
  321. package/fesm2020/keycodes.mjs +159 -0
  322. package/fesm2020/keycodes.mjs.map +1 -0
  323. package/fesm2020/layout.mjs +246 -0
  324. package/fesm2020/layout.mjs.map +1 -0
  325. package/fesm2020/observers.mjs +202 -0
  326. package/fesm2020/observers.mjs.map +1 -0
  327. package/{fesm2015/overlay.js → fesm2020/overlay.mjs} +312 -228
  328. package/fesm2020/overlay.mjs.map +1 -0
  329. package/{fesm2015/platform.js → fesm2020/platform.mjs} +52 -28
  330. package/fesm2020/platform.mjs.map +1 -0
  331. package/{fesm2015/portal.js → fesm2020/portal.mjs} +85 -64
  332. package/fesm2020/portal.mjs.map +1 -0
  333. package/{fesm2015/scrolling.js → fesm2020/scrolling.mjs} +213 -170
  334. package/fesm2020/scrolling.mjs.map +1 -0
  335. package/fesm2020/stepper.mjs +638 -0
  336. package/fesm2020/stepper.mjs.map +1 -0
  337. package/fesm2020/table.mjs +2295 -0
  338. package/fesm2020/table.mjs.map +1 -0
  339. package/fesm2020/testing/protractor.mjs +322 -0
  340. package/fesm2020/testing/protractor.mjs.map +1 -0
  341. package/fesm2020/testing/selenium-webdriver.mjs +362 -0
  342. package/fesm2020/testing/selenium-webdriver.mjs.map +1 -0
  343. package/fesm2020/testing/testbed.mjs +780 -0
  344. package/fesm2020/testing/testbed.mjs.map +1 -0
  345. package/fesm2020/testing.mjs +719 -0
  346. package/fesm2020/testing.mjs.map +1 -0
  347. package/{fesm2015/text-field.js → fesm2020/text-field.mjs} +83 -68
  348. package/fesm2020/text-field.mjs.map +1 -0
  349. package/fesm2020/tree.mjs +967 -0
  350. package/fesm2020/tree.mjs.map +1 -0
  351. package/keycodes/package.json +5 -5
  352. package/layout/breakpoints-observer.d.ts +3 -7
  353. package/layout/layout-module.d.ts +4 -0
  354. package/layout/media-matcher.d.ts +3 -0
  355. package/layout/package.json +5 -5
  356. package/observers/observe-content.d.ts +10 -0
  357. package/observers/package.json +5 -5
  358. package/overlay/dispatchers/base-overlay-dispatcher.d.ts +3 -7
  359. package/overlay/dispatchers/overlay-keyboard-dispatcher.d.ts +3 -7
  360. package/overlay/dispatchers/overlay-outside-click-dispatcher.d.ts +6 -7
  361. package/overlay/fullscreen-overlay-container.d.ts +3 -0
  362. package/overlay/index.d.ts +0 -2
  363. package/overlay/overlay-container.d.ts +3 -7
  364. package/overlay/overlay-directives.d.ts +5 -0
  365. package/overlay/overlay-module.d.ts +8 -7
  366. package/overlay/overlay.d.ts +3 -0
  367. package/overlay/package.json +5 -5
  368. package/overlay/position/flexible-connected-position-strategy.d.ts +2 -2
  369. package/overlay/position/overlay-position-builder.d.ts +3 -0
  370. package/overlay/position/scroll-clip.d.ts +5 -2
  371. package/overlay/scroll/index.d.ts +1 -1
  372. package/overlay/scroll/scroll-strategy-options.d.ts +3 -0
  373. package/package.json +219 -7
  374. package/platform/package.json +5 -5
  375. package/platform/platform-module.d.ts +4 -7
  376. package/platform/platform.d.ts +3 -7
  377. package/portal/package.json +5 -5
  378. package/portal/portal-directives.d.ts +12 -0
  379. package/schematics/ng-add/index.js +3 -3
  380. package/schematics/ng-add/index.mjs +3 -3
  381. package/schematics/ng-add/package-config.js +4 -2
  382. package/schematics/ng-add/package-config.mjs +4 -2
  383. package/schematics/ng-add/schema.js +1 -1
  384. package/schematics/ng-add/schema.mjs +1 -1
  385. package/schematics/ng-generate/drag-drop/index.js +6 -6
  386. package/schematics/ng-generate/drag-drop/index.mjs +6 -6
  387. package/schematics/ng-update/data/attribute-selectors.js +7 -5
  388. package/schematics/ng-update/data/attribute-selectors.mjs +7 -5
  389. package/schematics/ng-update/data/class-names.js +13 -11
  390. package/schematics/ng-update/data/class-names.mjs +13 -11
  391. package/schematics/ng-update/data/constructor-checks.js +28 -20
  392. package/schematics/ng-update/data/constructor-checks.mjs +28 -20
  393. package/schematics/ng-update/data/css-selectors.js +2 -2
  394. package/schematics/ng-update/data/css-selectors.mjs +2 -2
  395. package/schematics/ng-update/data/element-selectors.js +2 -2
  396. package/schematics/ng-update/data/element-selectors.mjs +2 -2
  397. package/schematics/ng-update/data/input-names.js +40 -16
  398. package/schematics/ng-update/data/input-names.mjs +40 -16
  399. package/schematics/ng-update/data/method-call-checks.js +32 -18
  400. package/schematics/ng-update/data/method-call-checks.mjs +32 -18
  401. package/schematics/ng-update/data/output-names.js +8 -6
  402. package/schematics/ng-update/data/output-names.mjs +8 -6
  403. package/schematics/ng-update/data/property-names.js +40 -32
  404. package/schematics/ng-update/data/property-names.mjs +40 -32
  405. package/schematics/ng-update/devkit-file-system.js +2 -2
  406. package/schematics/ng-update/devkit-file-system.mjs +2 -2
  407. package/schematics/ng-update/devkit-migration-rule.js +8 -7
  408. package/schematics/ng-update/devkit-migration-rule.mjs +8 -7
  409. package/schematics/ng-update/devkit-migration.d.ts +1 -1
  410. package/schematics/ng-update/devkit-migration.js +1 -1
  411. package/schematics/ng-update/devkit-migration.mjs +1 -1
  412. package/schematics/ng-update/find-stylesheets.js +3 -3
  413. package/schematics/ng-update/find-stylesheets.mjs +3 -3
  414. package/schematics/ng-update/html-parsing/angular.js +7 -7
  415. package/schematics/ng-update/html-parsing/angular.mjs +7 -7
  416. package/schematics/ng-update/html-parsing/elements.js +2 -2
  417. package/schematics/ng-update/html-parsing/elements.mjs +2 -2
  418. package/schematics/ng-update/index.js +11 -9
  419. package/schematics/ng-update/index.mjs +11 -9
  420. package/schematics/ng-update/migrations/attribute-selectors.js +11 -7
  421. package/schematics/ng-update/migrations/attribute-selectors.mjs +11 -7
  422. package/schematics/ng-update/migrations/class-inheritance.js +3 -3
  423. package/schematics/ng-update/migrations/class-inheritance.mjs +3 -3
  424. package/schematics/ng-update/migrations/class-names.js +7 -6
  425. package/schematics/ng-update/migrations/class-names.mjs +7 -6
  426. package/schematics/ng-update/migrations/constructor-signature.js +16 -13
  427. package/schematics/ng-update/migrations/constructor-signature.mjs +16 -13
  428. package/schematics/ng-update/migrations/css-selectors.js +7 -6
  429. package/schematics/ng-update/migrations/css-selectors.mjs +7 -6
  430. package/schematics/ng-update/migrations/element-selectors.js +7 -6
  431. package/schematics/ng-update/migrations/element-selectors.mjs +7 -6
  432. package/schematics/ng-update/migrations/input-names.js +8 -9
  433. package/schematics/ng-update/migrations/input-names.mjs +8 -9
  434. package/schematics/ng-update/migrations/method-call-arguments.js +4 -3
  435. package/schematics/ng-update/migrations/method-call-arguments.mjs +4 -3
  436. package/schematics/ng-update/migrations/misc-template.js +3 -3
  437. package/schematics/ng-update/migrations/misc-template.mjs +3 -3
  438. package/schematics/ng-update/migrations/output-names.js +7 -8
  439. package/schematics/ng-update/migrations/output-names.mjs +7 -8
  440. package/schematics/ng-update/migrations/property-names.js +4 -3
  441. package/schematics/ng-update/migrations/property-names.mjs +4 -3
  442. package/schematics/ng-update/migrations/symbol-removal.js +2 -2
  443. package/schematics/ng-update/migrations/symbol-removal.mjs +2 -2
  444. package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.d.ts +14 -0
  445. package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.js +38 -0
  446. package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.mjs +38 -0
  447. package/schematics/ng-update/typescript/base-types.js +1 -1
  448. package/schematics/ng-update/typescript/base-types.mjs +1 -1
  449. package/schematics/ng-update/typescript/literal.d.ts +1 -1
  450. package/schematics/ng-update/typescript/literal.js +1 -1
  451. package/schematics/ng-update/typescript/literal.mjs +1 -1
  452. package/schematics/ng-update/typescript/module-specifiers.js +5 -5
  453. package/schematics/ng-update/typescript/module-specifiers.mjs +5 -5
  454. package/schematics/ng-update/upgrade-data.js +2 -2
  455. package/schematics/ng-update/upgrade-data.mjs +2 -2
  456. package/schematics/package.json +3 -0
  457. package/schematics/paths.js +3 -3
  458. package/schematics/paths.mjs +3 -3
  459. package/schematics/update-tool/component-resource-collector.js +10 -10
  460. package/schematics/update-tool/component-resource-collector.mjs +10 -10
  461. package/schematics/update-tool/file-system.js +1 -1
  462. package/schematics/update-tool/file-system.mjs +1 -1
  463. package/schematics/update-tool/index.d.ts +4 -1
  464. package/schematics/update-tool/index.js +9 -5
  465. package/schematics/update-tool/index.mjs +9 -5
  466. package/schematics/update-tool/migration.d.ts +1 -1
  467. package/schematics/update-tool/migration.js +1 -1
  468. package/schematics/update-tool/migration.mjs +1 -1
  469. package/schematics/update-tool/target-version.js +1 -1
  470. package/schematics/update-tool/target-version.mjs +1 -1
  471. package/schematics/update-tool/utils/decorators.js +8 -4
  472. package/schematics/update-tool/utils/decorators.mjs +8 -4
  473. package/schematics/update-tool/utils/functions.js +1 -1
  474. package/schematics/update-tool/utils/functions.mjs +1 -1
  475. package/schematics/update-tool/utils/imports.js +2 -2
  476. package/schematics/update-tool/utils/imports.mjs +2 -2
  477. package/schematics/update-tool/utils/line-mappings.js +1 -1
  478. package/schematics/update-tool/utils/line-mappings.mjs +1 -1
  479. package/schematics/update-tool/utils/parse-tsconfig.js +2 -2
  480. package/schematics/update-tool/utils/parse-tsconfig.mjs +2 -2
  481. package/schematics/update-tool/utils/property-name.js +1 -1
  482. package/schematics/update-tool/utils/property-name.mjs +1 -1
  483. package/schematics/update-tool/utils/virtual-host.d.ts +1 -1
  484. package/schematics/update-tool/utils/virtual-host.js +3 -3
  485. package/schematics/update-tool/utils/virtual-host.mjs +3 -3
  486. package/schematics/update-tool/version-changes.js +1 -1
  487. package/schematics/update-tool/version-changes.mjs +1 -1
  488. package/schematics/utils/ast/ng-module-imports.js +5 -3
  489. package/schematics/utils/ast/ng-module-imports.mjs +5 -3
  490. package/schematics/utils/ast.js +5 -5
  491. package/schematics/utils/ast.mjs +5 -5
  492. package/schematics/utils/build-component.js +32 -38
  493. package/schematics/utils/build-component.mjs +32 -38
  494. package/schematics/utils/get-project.js +1 -1
  495. package/schematics/utils/get-project.mjs +1 -1
  496. package/schematics/utils/html-manipulation.js +8 -7
  497. package/schematics/utils/html-manipulation.mjs +8 -7
  498. package/schematics/utils/parse5-element.js +9 -10
  499. package/schematics/utils/parse5-element.mjs +9 -10
  500. package/schematics/utils/project-index-file.js +2 -2
  501. package/schematics/utils/project-index-file.mjs +2 -2
  502. package/schematics/utils/project-main-file.js +2 -2
  503. package/schematics/utils/project-main-file.mjs +2 -2
  504. package/schematics/utils/project-style-file.js +7 -9
  505. package/schematics/utils/project-style-file.mjs +7 -9
  506. package/schematics/utils/project-targets.js +1 -1
  507. package/schematics/utils/project-targets.mjs +1 -1
  508. package/schematics/utils/project-tsconfig-paths.js +4 -4
  509. package/schematics/utils/project-tsconfig-paths.mjs +4 -4
  510. package/schematics/utils/schematic-options.js +7 -5
  511. package/schematics/utils/schematic-options.mjs +7 -5
  512. package/schematics/utils/vendored-ast-utils/index.js +17 -18
  513. package/schematics/utils/vendored-ast-utils/index.mjs +17 -18
  514. package/scrolling/fixed-size-virtual-scroll.d.ts +3 -0
  515. package/scrolling/package.json +5 -5
  516. package/scrolling/scroll-dispatcher.d.ts +3 -7
  517. package/scrolling/scrollable.d.ts +3 -0
  518. package/scrolling/scrolling-module.d.ts +13 -7
  519. package/scrolling/viewport-ruler.d.ts +11 -1
  520. package/scrolling/virtual-for-of.d.ts +3 -0
  521. package/scrolling/virtual-scroll-viewport.d.ts +3 -0
  522. package/stepper/package.json +5 -5
  523. package/stepper/step-header.d.ts +3 -0
  524. package/stepper/step-label.d.ts +3 -0
  525. package/stepper/stepper-button.d.ts +5 -7
  526. package/stepper/stepper-module.d.ts +9 -7
  527. package/stepper/stepper.d.ts +5 -7
  528. package/table/cell.d.ts +15 -0
  529. package/table/coalesced-style-scheduler.d.ts +3 -0
  530. package/table/package.json +5 -5
  531. package/table/row.d.ts +19 -0
  532. package/table/table-module.d.ts +9 -7
  533. package/table/table.d.ts +13 -0
  534. package/table/text-column.d.ts +3 -0
  535. package/testing/package.json +5 -5
  536. package/testing/protractor/package.json +5 -5
  537. package/testing/selenium-webdriver/package.json +5 -5
  538. package/testing/testbed/package.json +5 -5
  539. package/testing/testbed/proxy-zone-types.d.ts +1 -1
  540. package/testing/testbed/zone-types.d.ts +1 -1
  541. package/text-field/autofill.d.ts +5 -0
  542. package/text-field/autosize.d.ts +3 -0
  543. package/text-field/package.json +5 -5
  544. package/text-field/text-field-module.d.ts +7 -7
  545. package/tree/control/base-tree-control.d.ts +1 -1
  546. package/tree/control/nested-tree-control.d.ts +2 -2
  547. package/tree/nested-node.d.ts +3 -0
  548. package/tree/node.d.ts +3 -0
  549. package/tree/outlet.d.ts +3 -0
  550. package/tree/package.json +5 -5
  551. package/tree/padding.d.ts +3 -0
  552. package/tree/toggle.d.ts +3 -0
  553. package/tree/tree-module.d.ts +10 -7
  554. package/tree/tree.d.ts +5 -0
  555. package/a11y/index.metadata.json +0 -1
  556. package/accordion/index.metadata.json +0 -1
  557. package/bidi/index.metadata.json +0 -1
  558. package/bundles/cdk-a11y.umd.js +0 -2752
  559. package/bundles/cdk-a11y.umd.js.map +0 -1
  560. package/bundles/cdk-accordion.umd.js +0 -262
  561. package/bundles/cdk-accordion.umd.js.map +0 -1
  562. package/bundles/cdk-bidi.umd.js +0 -206
  563. package/bundles/cdk-bidi.umd.js.map +0 -1
  564. package/bundles/cdk-clipboard.umd.js +0 -278
  565. package/bundles/cdk-clipboard.umd.js.map +0 -1
  566. package/bundles/cdk-coercion.umd.js +0 -477
  567. package/bundles/cdk-coercion.umd.js.map +0 -1
  568. package/bundles/cdk-collections.umd.js +0 -846
  569. package/bundles/cdk-collections.umd.js.map +0 -1
  570. package/bundles/cdk-drag-drop.umd.js +0 -3915
  571. package/bundles/cdk-drag-drop.umd.js.map +0 -1
  572. package/bundles/cdk-keycodes.umd.js +0 -292
  573. package/bundles/cdk-keycodes.umd.js.map +0 -1
  574. package/bundles/cdk-layout.umd.js +0 -284
  575. package/bundles/cdk-layout.umd.js.map +0 -1
  576. package/bundles/cdk-observers.umd.js +0 -242
  577. package/bundles/cdk-observers.umd.js.map +0 -1
  578. package/bundles/cdk-overlay.umd.js +0 -3417
  579. package/bundles/cdk-overlay.umd.js.map +0 -1
  580. package/bundles/cdk-platform.umd.js +0 -397
  581. package/bundles/cdk-platform.umd.js.map +0 -1
  582. package/bundles/cdk-portal.umd.js +0 -1008
  583. package/bundles/cdk-portal.umd.js.map +0 -1
  584. package/bundles/cdk-scrolling.umd.js +0 -1787
  585. package/bundles/cdk-scrolling.umd.js.map +0 -1
  586. package/bundles/cdk-stepper.umd.js +0 -648
  587. package/bundles/cdk-stepper.umd.js.map +0 -1
  588. package/bundles/cdk-table.umd.js +0 -2730
  589. package/bundles/cdk-table.umd.js.map +0 -1
  590. package/bundles/cdk-testing-protractor.umd.js +0 -833
  591. package/bundles/cdk-testing-protractor.umd.js.map +0 -1
  592. package/bundles/cdk-testing-selenium-webdriver.umd.js +0 -1002
  593. package/bundles/cdk-testing-selenium-webdriver.umd.js.map +0 -1
  594. package/bundles/cdk-testing-testbed.umd.js +0 -1396
  595. package/bundles/cdk-testing-testbed.umd.js.map +0 -1
  596. package/bundles/cdk-testing.umd.js +0 -1285
  597. package/bundles/cdk-testing.umd.js.map +0 -1
  598. package/bundles/cdk-text-field.umd.js +0 -494
  599. package/bundles/cdk-text-field.umd.js.map +0 -1
  600. package/bundles/cdk-tree.umd.js +0 -1308
  601. package/bundles/cdk-tree.umd.js.map +0 -1
  602. package/bundles/cdk.umd.js +0 -38
  603. package/bundles/cdk.umd.js.map +0 -1
  604. package/clipboard/index.metadata.json +0 -1
  605. package/collections/index.metadata.json +0 -1
  606. package/drag-drop/index.metadata.json +0 -1
  607. package/esm2015/a11y/a11y-module.js +0 -30
  608. package/esm2015/a11y/a11y.externs.js +0 -6
  609. package/esm2015/a11y/aria-describer/aria-describer.js +0 -213
  610. package/esm2015/a11y/fake-event-detection.js +0 -28
  611. package/esm2015/a11y/focus-monitor/focus-monitor.js +0 -394
  612. package/esm2015/a11y/focus-trap/configurable-focus-trap-factory.js +0 -52
  613. package/esm2015/a11y/focus-trap/configurable-focus-trap.js +0 -49
  614. package/esm2015/a11y/focus-trap/event-listener-inert-strategy.js +0 -62
  615. package/esm2015/a11y/focus-trap/focus-trap-inert-strategy.js +0 -11
  616. package/esm2015/a11y/focus-trap/focus-trap-manager.js +0 -51
  617. package/esm2015/a11y/focus-trap/focus-trap.js +0 -391
  618. package/esm2015/a11y/high-contrast-mode/high-contrast-mode-detector.js +0 -92
  619. package/esm2015/a11y/index.js +0 -6
  620. package/esm2015/a11y/input-modality/input-modality-detector.js +0 -171
  621. package/esm2015/a11y/interactivity-checker/interactivity-checker.js +0 -237
  622. package/esm2015/a11y/key-manager/list-key-manager.js +0 -317
  623. package/esm2015/a11y/live-announcer/live-announcer-tokens.js +0 -19
  624. package/esm2015/a11y/live-announcer/live-announcer.js +0 -167
  625. package/esm2015/accordion/accordion-item.js +0 -146
  626. package/esm2015/accordion/accordion-module.js +0 -19
  627. package/esm2015/accordion/accordion.externs.js +0 -6
  628. package/esm2015/accordion/accordion.js +0 -63
  629. package/esm2015/accordion/index.js +0 -6
  630. package/esm2015/bidi/bidi-module.js +0 -18
  631. package/esm2015/bidi/bidi.externs.js +0 -6
  632. package/esm2015/bidi/dir.js +0 -58
  633. package/esm2015/bidi/directionality.js +0 -44
  634. package/esm2015/bidi/index.js +0 -6
  635. package/esm2015/cdk.externs.js +0 -0
  636. package/esm2015/clipboard/clipboard-module.js +0 -18
  637. package/esm2015/clipboard/clipboard.externs.js +0 -6
  638. package/esm2015/clipboard/clipboard.js +0 -52
  639. package/esm2015/clipboard/copy-to-clipboard.js +0 -90
  640. package/esm2015/clipboard/pending-copy.js +0 -68
  641. package/esm2015/coercion/coercion.externs.js +0 -0
  642. package/esm2015/collections/collection-viewer.js +0 -9
  643. package/esm2015/collections/collections.externs.js +0 -6
  644. package/esm2015/collections/dispose-view-repeater-strategy.js +0 -48
  645. package/esm2015/collections/recycle-view-repeater-strategy.js +0 -125
  646. package/esm2015/collections/tree-adapter.js +0 -9
  647. package/esm2015/collections/unique-selection-dispatcher.js +0 -53
  648. package/esm2015/collections/view-repeater.js +0 -14
  649. package/esm2015/drag-drop/client-rect.js +0 -60
  650. package/esm2015/drag-drop/clone-node.js +0 -65
  651. package/esm2015/drag-drop/directives/assertions.js +0 -19
  652. package/esm2015/drag-drop/directives/drag-handle.js +0 -57
  653. package/esm2015/drag-drop/directives/drag-placeholder.js +0 -36
  654. package/esm2015/drag-drop/directives/drag-preview.js +0 -42
  655. package/esm2015/drag-drop/directives/drag.js +0 -407
  656. package/esm2015/drag-drop/directives/drop-list-group.js +0 -47
  657. package/esm2015/drag-drop/directives/drop-list.js +0 -301
  658. package/esm2015/drag-drop/drag-drop-module.js +0 -43
  659. package/esm2015/drag-drop/drag-drop-registry.js +0 -231
  660. package/esm2015/drag-drop/drag-drop.externs.js +0 -6
  661. package/esm2015/drag-drop/drag-drop.js +0 -59
  662. package/esm2015/drag-drop/drag-events.js +0 -9
  663. package/esm2015/drag-drop/drag-ref.js +0 -1110
  664. package/esm2015/drag-drop/drag-styling.js +0 -69
  665. package/esm2015/drag-drop/drag-utils.js +0 -60
  666. package/esm2015/drag-drop/drop-list-ref.js +0 -813
  667. package/esm2015/drag-drop/transition-duration.js +0 -36
  668. package/esm2015/keycodes/keycodes.externs.js +0 -6
  669. package/esm2015/layout/breakpoints-observer.js +0 -106
  670. package/esm2015/layout/layout-module.js +0 -14
  671. package/esm2015/layout/layout.externs.js +0 -6
  672. package/esm2015/layout/media-matcher.js +0 -85
  673. package/esm2015/observers/observe-content.js +0 -179
  674. package/esm2015/observers/observers.externs.js +0 -6
  675. package/esm2015/overlay/dispatchers/base-overlay-dispatcher.js +0 -51
  676. package/esm2015/overlay/dispatchers/overlay-keyboard-dispatcher.js +0 -62
  677. package/esm2015/overlay/dispatchers/overlay-outside-click-dispatcher.js +0 -97
  678. package/esm2015/overlay/fullscreen-overlay-container.js +0 -94
  679. package/esm2015/overlay/index.js +0 -7
  680. package/esm2015/overlay/overlay-config.js +0 -45
  681. package/esm2015/overlay/overlay-container.js +0 -85
  682. package/esm2015/overlay/overlay-directives.js +0 -352
  683. package/esm2015/overlay/overlay-module.js +0 -27
  684. package/esm2015/overlay/overlay-ref.js +0 -409
  685. package/esm2015/overlay/overlay.externs.js +0 -6
  686. package/esm2015/overlay/overlay.js +0 -119
  687. package/esm2015/overlay/position/connected-position.js +0 -94
  688. package/esm2015/overlay/position/flexible-connected-position-strategy.js +0 -960
  689. package/esm2015/overlay/position/global-position-strategy.js +0 -197
  690. package/esm2015/overlay/position/overlay-position-builder.js +0 -52
  691. package/esm2015/overlay/position/scroll-clip.js +0 -42
  692. package/esm2015/overlay/scroll/close-scroll-strategy.js +0 -61
  693. package/esm2015/overlay/scroll/scroll-strategy-options.js +0 -57
  694. package/esm2015/platform/features/passive-listeners.js +0 -36
  695. package/esm2015/platform/features/scrolling.js +0 -85
  696. package/esm2015/platform/features/test-environment.js +0 -16
  697. package/esm2015/platform/platform-module.js +0 -14
  698. package/esm2015/platform/platform.externs.js +0 -6
  699. package/esm2015/platform/platform.js +0 -77
  700. package/esm2015/portal/dom-portal-outlet.js +0 -136
  701. package/esm2015/portal/portal-directives.js +0 -221
  702. package/esm2015/portal/portal-injector.js +0 -28
  703. package/esm2015/portal/portal.externs.js +0 -6
  704. package/esm2015/portal/portal.js +0 -179
  705. package/esm2015/scrolling/fixed-size-virtual-scroll.js +0 -188
  706. package/esm2015/scrolling/scroll-dispatcher.js +0 -163
  707. package/esm2015/scrolling/scrollable.js +0 -173
  708. package/esm2015/scrolling/scrolling-module.js +0 -49
  709. package/esm2015/scrolling/scrolling.externs.js +0 -6
  710. package/esm2015/scrolling/viewport-ruler.js +0 -139
  711. package/esm2015/scrolling/virtual-for-of.js +0 -293
  712. package/esm2015/scrolling/virtual-scroll-strategy.js +0 -11
  713. package/esm2015/scrolling/virtual-scroll-viewport.js +0 -371
  714. package/esm2015/stepper/step-header.js +0 -29
  715. package/esm2015/stepper/step-label.js +0 -22
  716. package/esm2015/stepper/stepper-button.js +0 -72
  717. package/esm2015/stepper/stepper-module.js +0 -37
  718. package/esm2015/stepper/stepper.externs.js +0 -6
  719. package/esm2015/stepper/stepper.js +0 -428
  720. package/esm2015/table/can-stick.js +0 -42
  721. package/esm2015/table/cell.js +0 -211
  722. package/esm2015/table/coalesced-style-scheduler.js +0 -89
  723. package/esm2015/table/row.js +0 -244
  724. package/esm2015/table/sticky-position-listener.js +0 -11
  725. package/esm2015/table/sticky-styler.js +0 -336
  726. package/esm2015/table/table-module.js +0 -47
  727. package/esm2015/table/table.externs.js +0 -6
  728. package/esm2015/table/table.js +0 -987
  729. package/esm2015/table/text-column.js +0 -127
  730. package/esm2015/testing/change-detection.js +0 -110
  731. package/esm2015/testing/component-harness.js +0 -344
  732. package/esm2015/testing/harness-environment.js +0 -219
  733. package/esm2015/testing/protractor/protractor-element.js +0 -274
  734. package/esm2015/testing/protractor/protractor-harness-environment.js +0 -79
  735. package/esm2015/testing/protractor/protractor.externs.js +0 -0
  736. package/esm2015/testing/selenium-webdriver/selenium-web-driver-element.js +0 -241
  737. package/esm2015/testing/selenium-webdriver/selenium-web-driver-harness-environment.js +0 -97
  738. package/esm2015/testing/selenium-webdriver/selenium-webdriver.externs.js +0 -0
  739. package/esm2015/testing/test-element.js +0 -48
  740. package/esm2015/testing/testbed/fake-events/dispatch-events.js +0 -53
  741. package/esm2015/testing/testbed/fake-events/element-focus.js +0 -39
  742. package/esm2015/testing/testbed/fake-events/event-objects.js +0 -107
  743. package/esm2015/testing/testbed/fake-events/type-in-element.js +0 -79
  744. package/esm2015/testing/testbed/task-state-zone-interceptor.js +0 -82
  745. package/esm2015/testing/testbed/testbed-harness-environment.js +0 -173
  746. package/esm2015/testing/testbed/testbed.externs.js +0 -0
  747. package/esm2015/testing/testbed/unit-test-element.js +0 -266
  748. package/esm2015/testing/testing.externs.js +0 -0
  749. package/esm2015/testing/text-filtering.js +0 -23
  750. package/esm2015/text-field/autofill.js +0 -117
  751. package/esm2015/text-field/autosize.js +0 -293
  752. package/esm2015/text-field/text-field-module.js +0 -21
  753. package/esm2015/text-field/text-field.externs.js +0 -6
  754. package/esm2015/tree/control/nested-tree-control.js +0 -59
  755. package/esm2015/tree/nested-node.js +0 -112
  756. package/esm2015/tree/node.js +0 -36
  757. package/esm2015/tree/outlet.js +0 -34
  758. package/esm2015/tree/padding.js +0 -119
  759. package/esm2015/tree/toggle.js +0 -46
  760. package/esm2015/tree/tree-module.js +0 -32
  761. package/esm2015/tree/tree.externs.js +0 -6
  762. package/esm2015/tree/tree.js +0 -345
  763. package/fesm2015/a11y.js.map +0 -1
  764. package/fesm2015/accordion.js.map +0 -1
  765. package/fesm2015/bidi.js.map +0 -1
  766. package/fesm2015/cdk.js.map +0 -1
  767. package/fesm2015/clipboard.js.map +0 -1
  768. package/fesm2015/coercion.js.map +0 -1
  769. package/fesm2015/collections.js.map +0 -1
  770. package/fesm2015/drag-drop.js.map +0 -1
  771. package/fesm2015/keycodes.js.map +0 -1
  772. package/fesm2015/layout.js.map +0 -1
  773. package/fesm2015/observers.js.map +0 -1
  774. package/fesm2015/overlay.js.map +0 -1
  775. package/fesm2015/platform.js.map +0 -1
  776. package/fesm2015/portal.js.map +0 -1
  777. package/fesm2015/scrolling.js.map +0 -1
  778. package/fesm2015/stepper.js.map +0 -1
  779. package/fesm2015/table.js.map +0 -1
  780. package/fesm2015/testing/protractor.js.map +0 -1
  781. package/fesm2015/testing/selenium-webdriver.js.map +0 -1
  782. package/fesm2015/testing/testbed.js.map +0 -1
  783. package/fesm2015/testing.js.map +0 -1
  784. package/fesm2015/text-field.js.map +0 -1
  785. package/fesm2015/tree.js.map +0 -1
  786. package/keycodes/index.metadata.json +0 -1
  787. package/layout/index.metadata.json +0 -1
  788. package/observers/index.metadata.json +0 -1
  789. package/overlay/index.metadata.json +0 -1
  790. package/platform/index.metadata.json +0 -1
  791. package/portal/index.metadata.json +0 -1
  792. package/scrolling/index.metadata.json +0 -1
  793. package/stepper/index.metadata.json +0 -1
  794. package/table/index.metadata.json +0 -1
  795. package/text-field/index.metadata.json +0 -1
  796. package/tree/index.metadata.json +0 -1
@@ -1,1787 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/coercion'), require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/cdk/bidi'), require('@angular/cdk/collections')) :
3
- typeof define === 'function' && define.amd ? define('@angular/cdk/scrolling', ['exports', '@angular/cdk/coercion', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/cdk/platform', '@angular/common', '@angular/cdk/bidi', '@angular/cdk/collections'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.scrolling = {}), global.ng.cdk.coercion, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.cdk.platform, global.ng.common, global.ng.cdk.bidi, global.ng.cdk.collections));
5
- }(this, (function (exports, coercion, i0, rxjs, operators, i1, i2, bidi, collections) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
19
- });
20
- }
21
- });
22
- }
23
- n['default'] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
30
-
31
- /**
32
- * @license
33
- * Copyright Google LLC All Rights Reserved.
34
- *
35
- * Use of this source code is governed by an MIT-style license that can be
36
- * found in the LICENSE file at https://angular.io/license
37
- */
38
- /** The injection token used to specify the virtual scrolling strategy. */
39
- var VIRTUAL_SCROLL_STRATEGY = new i0.InjectionToken('VIRTUAL_SCROLL_STRATEGY');
40
-
41
- /**
42
- * @license
43
- * Copyright Google LLC All Rights Reserved.
44
- *
45
- * Use of this source code is governed by an MIT-style license that can be
46
- * found in the LICENSE file at https://angular.io/license
47
- */
48
- /** Virtual scrolling strategy for lists with items of known fixed size. */
49
- var FixedSizeVirtualScrollStrategy = /** @class */ (function () {
50
- /**
51
- * @param itemSize The size of the items in the virtually scrolling list.
52
- * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more
53
- * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.
54
- */
55
- function FixedSizeVirtualScrollStrategy(itemSize, minBufferPx, maxBufferPx) {
56
- this._scrolledIndexChange = new rxjs.Subject();
57
- /** @docs-private Implemented as part of VirtualScrollStrategy. */
58
- this.scrolledIndexChange = this._scrolledIndexChange.pipe(operators.distinctUntilChanged());
59
- /** The attached viewport. */
60
- this._viewport = null;
61
- this._itemSize = itemSize;
62
- this._minBufferPx = minBufferPx;
63
- this._maxBufferPx = maxBufferPx;
64
- }
65
- /**
66
- * Attaches this scroll strategy to a viewport.
67
- * @param viewport The viewport to attach this strategy to.
68
- */
69
- FixedSizeVirtualScrollStrategy.prototype.attach = function (viewport) {
70
- this._viewport = viewport;
71
- this._updateTotalContentSize();
72
- this._updateRenderedRange();
73
- };
74
- /** Detaches this scroll strategy from the currently attached viewport. */
75
- FixedSizeVirtualScrollStrategy.prototype.detach = function () {
76
- this._scrolledIndexChange.complete();
77
- this._viewport = null;
78
- };
79
- /**
80
- * Update the item size and buffer size.
81
- * @param itemSize The size of the items in the virtually scrolling list.
82
- * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more
83
- * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.
84
- */
85
- FixedSizeVirtualScrollStrategy.prototype.updateItemAndBufferSize = function (itemSize, minBufferPx, maxBufferPx) {
86
- if (maxBufferPx < minBufferPx && (typeof ngDevMode === 'undefined' || ngDevMode)) {
87
- throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');
88
- }
89
- this._itemSize = itemSize;
90
- this._minBufferPx = minBufferPx;
91
- this._maxBufferPx = maxBufferPx;
92
- this._updateTotalContentSize();
93
- this._updateRenderedRange();
94
- };
95
- /** @docs-private Implemented as part of VirtualScrollStrategy. */
96
- FixedSizeVirtualScrollStrategy.prototype.onContentScrolled = function () {
97
- this._updateRenderedRange();
98
- };
99
- /** @docs-private Implemented as part of VirtualScrollStrategy. */
100
- FixedSizeVirtualScrollStrategy.prototype.onDataLengthChanged = function () {
101
- this._updateTotalContentSize();
102
- this._updateRenderedRange();
103
- };
104
- /** @docs-private Implemented as part of VirtualScrollStrategy. */
105
- FixedSizeVirtualScrollStrategy.prototype.onContentRendered = function () { };
106
- /** @docs-private Implemented as part of VirtualScrollStrategy. */
107
- FixedSizeVirtualScrollStrategy.prototype.onRenderedOffsetChanged = function () { };
108
- /**
109
- * Scroll to the offset for the given index.
110
- * @param index The index of the element to scroll to.
111
- * @param behavior The ScrollBehavior to use when scrolling.
112
- */
113
- FixedSizeVirtualScrollStrategy.prototype.scrollToIndex = function (index, behavior) {
114
- if (this._viewport) {
115
- this._viewport.scrollToOffset(index * this._itemSize, behavior);
116
- }
117
- };
118
- /** Update the viewport's total content size. */
119
- FixedSizeVirtualScrollStrategy.prototype._updateTotalContentSize = function () {
120
- if (!this._viewport) {
121
- return;
122
- }
123
- this._viewport.setTotalContentSize(this._viewport.getDataLength() * this._itemSize);
124
- };
125
- /** Update the viewport's rendered range. */
126
- FixedSizeVirtualScrollStrategy.prototype._updateRenderedRange = function () {
127
- if (!this._viewport) {
128
- return;
129
- }
130
- var renderedRange = this._viewport.getRenderedRange();
131
- var newRange = { start: renderedRange.start, end: renderedRange.end };
132
- var viewportSize = this._viewport.getViewportSize();
133
- var dataLength = this._viewport.getDataLength();
134
- var scrollOffset = this._viewport.measureScrollOffset();
135
- // Prevent NaN as result when dividing by zero.
136
- var firstVisibleIndex = (this._itemSize > 0) ? scrollOffset / this._itemSize : 0;
137
- // If user scrolls to the bottom of the list and data changes to a smaller list
138
- if (newRange.end > dataLength) {
139
- // We have to recalculate the first visible index based on new data length and viewport size.
140
- var maxVisibleItems = Math.ceil(viewportSize / this._itemSize);
141
- var newVisibleIndex = Math.max(0, Math.min(firstVisibleIndex, dataLength - maxVisibleItems));
142
- // If first visible index changed we must update scroll offset to handle start/end buffers
143
- // Current range must also be adjusted to cover the new position (bottom of new list).
144
- if (firstVisibleIndex != newVisibleIndex) {
145
- firstVisibleIndex = newVisibleIndex;
146
- scrollOffset = newVisibleIndex * this._itemSize;
147
- newRange.start = Math.floor(firstVisibleIndex);
148
- }
149
- newRange.end = Math.max(0, Math.min(dataLength, newRange.start + maxVisibleItems));
150
- }
151
- var startBuffer = scrollOffset - newRange.start * this._itemSize;
152
- if (startBuffer < this._minBufferPx && newRange.start != 0) {
153
- var expandStart = Math.ceil((this._maxBufferPx - startBuffer) / this._itemSize);
154
- newRange.start = Math.max(0, newRange.start - expandStart);
155
- newRange.end = Math.min(dataLength, Math.ceil(firstVisibleIndex + (viewportSize + this._minBufferPx) / this._itemSize));
156
- }
157
- else {
158
- var endBuffer = newRange.end * this._itemSize - (scrollOffset + viewportSize);
159
- if (endBuffer < this._minBufferPx && newRange.end != dataLength) {
160
- var expandEnd = Math.ceil((this._maxBufferPx - endBuffer) / this._itemSize);
161
- if (expandEnd > 0) {
162
- newRange.end = Math.min(dataLength, newRange.end + expandEnd);
163
- newRange.start = Math.max(0, Math.floor(firstVisibleIndex - this._minBufferPx / this._itemSize));
164
- }
165
- }
166
- }
167
- this._viewport.setRenderedRange(newRange);
168
- this._viewport.setRenderedContentOffset(this._itemSize * newRange.start);
169
- this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));
170
- };
171
- return FixedSizeVirtualScrollStrategy;
172
- }());
173
- /**
174
- * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created
175
- * `FixedSizeVirtualScrollStrategy` from the given directive.
176
- * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the
177
- * `FixedSizeVirtualScrollStrategy` from.
178
- */
179
- function _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {
180
- return fixedSizeDir._scrollStrategy;
181
- }
182
- /** A virtual scroll strategy that supports fixed-size items. */
183
- var CdkFixedSizeVirtualScroll = /** @class */ (function () {
184
- function CdkFixedSizeVirtualScroll() {
185
- this._itemSize = 20;
186
- this._minBufferPx = 100;
187
- this._maxBufferPx = 200;
188
- /** The scroll strategy used by this directive. */
189
- this._scrollStrategy = new FixedSizeVirtualScrollStrategy(this.itemSize, this.minBufferPx, this.maxBufferPx);
190
- }
191
- Object.defineProperty(CdkFixedSizeVirtualScroll.prototype, "itemSize", {
192
- /** The size of the items in the list (in pixels). */
193
- get: function () { return this._itemSize; },
194
- set: function (value) { this._itemSize = coercion.coerceNumberProperty(value); },
195
- enumerable: false,
196
- configurable: true
197
- });
198
- Object.defineProperty(CdkFixedSizeVirtualScroll.prototype, "minBufferPx", {
199
- /**
200
- * The minimum amount of buffer rendered beyond the viewport (in pixels).
201
- * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.
202
- */
203
- get: function () { return this._minBufferPx; },
204
- set: function (value) { this._minBufferPx = coercion.coerceNumberProperty(value); },
205
- enumerable: false,
206
- configurable: true
207
- });
208
- Object.defineProperty(CdkFixedSizeVirtualScroll.prototype, "maxBufferPx", {
209
- /**
210
- * The number of pixels worth of buffer to render for when rendering new items. Defaults to 200px.
211
- */
212
- get: function () { return this._maxBufferPx; },
213
- set: function (value) { this._maxBufferPx = coercion.coerceNumberProperty(value); },
214
- enumerable: false,
215
- configurable: true
216
- });
217
- CdkFixedSizeVirtualScroll.prototype.ngOnChanges = function () {
218
- this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);
219
- };
220
- return CdkFixedSizeVirtualScroll;
221
- }());
222
- CdkFixedSizeVirtualScroll.decorators = [
223
- { type: i0.Directive, args: [{
224
- selector: 'cdk-virtual-scroll-viewport[itemSize]',
225
- providers: [{
226
- provide: VIRTUAL_SCROLL_STRATEGY,
227
- useFactory: _fixedSizeVirtualScrollStrategyFactory,
228
- deps: [i0.forwardRef(function () { return CdkFixedSizeVirtualScroll; })],
229
- }],
230
- },] }
231
- ];
232
- CdkFixedSizeVirtualScroll.propDecorators = {
233
- itemSize: [{ type: i0.Input }],
234
- minBufferPx: [{ type: i0.Input }],
235
- maxBufferPx: [{ type: i0.Input }]
236
- };
237
-
238
- /**
239
- * @license
240
- * Copyright Google LLC All Rights Reserved.
241
- *
242
- * Use of this source code is governed by an MIT-style license that can be
243
- * found in the LICENSE file at https://angular.io/license
244
- */
245
- /** Time in ms to throttle the scrolling events by default. */
246
- var DEFAULT_SCROLL_TIME = 20;
247
- /**
248
- * Service contained all registered Scrollable references and emits an event when any one of the
249
- * Scrollable references emit a scrolled event.
250
- */
251
- var ScrollDispatcher = /** @class */ (function () {
252
- function ScrollDispatcher(_ngZone, _platform, document) {
253
- this._ngZone = _ngZone;
254
- this._platform = _platform;
255
- /** Subject for notifying that a registered scrollable reference element has been scrolled. */
256
- this._scrolled = new rxjs.Subject();
257
- /** Keeps track of the global `scroll` and `resize` subscriptions. */
258
- this._globalSubscription = null;
259
- /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */
260
- this._scrolledCount = 0;
261
- /**
262
- * Map of all the scrollable references that are registered with the service and their
263
- * scroll event subscriptions.
264
- */
265
- this.scrollContainers = new Map();
266
- this._document = document;
267
- }
268
- /**
269
- * Registers a scrollable instance with the service and listens for its scrolled events. When the
270
- * scrollable is scrolled, the service emits the event to its scrolled observable.
271
- * @param scrollable Scrollable instance to be registered.
272
- */
273
- ScrollDispatcher.prototype.register = function (scrollable) {
274
- var _this = this;
275
- if (!this.scrollContainers.has(scrollable)) {
276
- this.scrollContainers.set(scrollable, scrollable.elementScrolled()
277
- .subscribe(function () { return _this._scrolled.next(scrollable); }));
278
- }
279
- };
280
- /**
281
- * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.
282
- * @param scrollable Scrollable instance to be deregistered.
283
- */
284
- ScrollDispatcher.prototype.deregister = function (scrollable) {
285
- var scrollableReference = this.scrollContainers.get(scrollable);
286
- if (scrollableReference) {
287
- scrollableReference.unsubscribe();
288
- this.scrollContainers.delete(scrollable);
289
- }
290
- };
291
- /**
292
- * Returns an observable that emits an event whenever any of the registered Scrollable
293
- * references (or window, document, or body) fire a scrolled event. Can provide a time in ms
294
- * to override the default "throttle" time.
295
- *
296
- * **Note:** in order to avoid hitting change detection for every scroll event,
297
- * all of the events emitted from this stream will be run outside the Angular zone.
298
- * If you need to update any data bindings as a result of a scroll event, you have
299
- * to run the callback using `NgZone.run`.
300
- */
301
- ScrollDispatcher.prototype.scrolled = function (auditTimeInMs) {
302
- var _this = this;
303
- if (auditTimeInMs === void 0) { auditTimeInMs = DEFAULT_SCROLL_TIME; }
304
- if (!this._platform.isBrowser) {
305
- return rxjs.of();
306
- }
307
- return new rxjs.Observable(function (observer) {
308
- if (!_this._globalSubscription) {
309
- _this._addGlobalListener();
310
- }
311
- // In the case of a 0ms delay, use an observable without auditTime
312
- // since it does add a perceptible delay in processing overhead.
313
- var subscription = auditTimeInMs > 0 ?
314
- _this._scrolled.pipe(operators.auditTime(auditTimeInMs)).subscribe(observer) :
315
- _this._scrolled.subscribe(observer);
316
- _this._scrolledCount++;
317
- return function () {
318
- subscription.unsubscribe();
319
- _this._scrolledCount--;
320
- if (!_this._scrolledCount) {
321
- _this._removeGlobalListener();
322
- }
323
- };
324
- });
325
- };
326
- ScrollDispatcher.prototype.ngOnDestroy = function () {
327
- var _this = this;
328
- this._removeGlobalListener();
329
- this.scrollContainers.forEach(function (_, container) { return _this.deregister(container); });
330
- this._scrolled.complete();
331
- };
332
- /**
333
- * Returns an observable that emits whenever any of the
334
- * scrollable ancestors of an element are scrolled.
335
- * @param elementOrElementRef Element whose ancestors to listen for.
336
- * @param auditTimeInMs Time to throttle the scroll events.
337
- */
338
- ScrollDispatcher.prototype.ancestorScrolled = function (elementOrElementRef, auditTimeInMs) {
339
- var ancestors = this.getAncestorScrollContainers(elementOrElementRef);
340
- return this.scrolled(auditTimeInMs).pipe(operators.filter(function (target) {
341
- return !target || ancestors.indexOf(target) > -1;
342
- }));
343
- };
344
- /** Returns all registered Scrollables that contain the provided element. */
345
- ScrollDispatcher.prototype.getAncestorScrollContainers = function (elementOrElementRef) {
346
- var _this = this;
347
- var scrollingContainers = [];
348
- this.scrollContainers.forEach(function (_subscription, scrollable) {
349
- if (_this._scrollableContainsElement(scrollable, elementOrElementRef)) {
350
- scrollingContainers.push(scrollable);
351
- }
352
- });
353
- return scrollingContainers;
354
- };
355
- /** Use defaultView of injected document if available or fallback to global window reference */
356
- ScrollDispatcher.prototype._getWindow = function () {
357
- return this._document.defaultView || window;
358
- };
359
- /** Returns true if the element is contained within the provided Scrollable. */
360
- ScrollDispatcher.prototype._scrollableContainsElement = function (scrollable, elementOrElementRef) {
361
- var element = coercion.coerceElement(elementOrElementRef);
362
- var scrollableElement = scrollable.getElementRef().nativeElement;
363
- // Traverse through the element parents until we reach null, checking if any of the elements
364
- // are the scrollable's element.
365
- do {
366
- if (element == scrollableElement) {
367
- return true;
368
- }
369
- } while (element = element.parentElement);
370
- return false;
371
- };
372
- /** Sets up the global scroll listeners. */
373
- ScrollDispatcher.prototype._addGlobalListener = function () {
374
- var _this = this;
375
- this._globalSubscription = this._ngZone.runOutsideAngular(function () {
376
- var window = _this._getWindow();
377
- return rxjs.fromEvent(window.document, 'scroll').subscribe(function () { return _this._scrolled.next(); });
378
- });
379
- };
380
- /** Cleans up the global scroll listener. */
381
- ScrollDispatcher.prototype._removeGlobalListener = function () {
382
- if (this._globalSubscription) {
383
- this._globalSubscription.unsubscribe();
384
- this._globalSubscription = null;
385
- }
386
- };
387
- return ScrollDispatcher;
388
- }());
389
- ScrollDispatcher.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(i0__namespace.ɵɵinject(i0__namespace.NgZone), i0__namespace.ɵɵinject(i1__namespace.Platform), i0__namespace.ɵɵinject(i2__namespace.DOCUMENT, 8)); }, token: ScrollDispatcher, providedIn: "root" });
390
- ScrollDispatcher.decorators = [
391
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
392
- ];
393
- ScrollDispatcher.ctorParameters = function () { return [
394
- { type: i0.NgZone },
395
- { type: i1.Platform },
396
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
397
- ]; };
398
-
399
- /**
400
- * @license
401
- * Copyright Google LLC All Rights Reserved.
402
- *
403
- * Use of this source code is governed by an MIT-style license that can be
404
- * found in the LICENSE file at https://angular.io/license
405
- */
406
- /**
407
- * Sends an event when the directive's element is scrolled. Registers itself with the
408
- * ScrollDispatcher service to include itself as part of its collection of scrolling events that it
409
- * can be listened to through the service.
410
- */
411
- var CdkScrollable = /** @class */ (function () {
412
- function CdkScrollable(elementRef, scrollDispatcher, ngZone, dir) {
413
- var _this = this;
414
- this.elementRef = elementRef;
415
- this.scrollDispatcher = scrollDispatcher;
416
- this.ngZone = ngZone;
417
- this.dir = dir;
418
- this._destroyed = new rxjs.Subject();
419
- this._elementScrolled = new rxjs.Observable(function (observer) { return _this.ngZone.runOutsideAngular(function () { return rxjs.fromEvent(_this.elementRef.nativeElement, 'scroll').pipe(operators.takeUntil(_this._destroyed))
420
- .subscribe(observer); }); });
421
- }
422
- CdkScrollable.prototype.ngOnInit = function () {
423
- this.scrollDispatcher.register(this);
424
- };
425
- CdkScrollable.prototype.ngOnDestroy = function () {
426
- this.scrollDispatcher.deregister(this);
427
- this._destroyed.next();
428
- this._destroyed.complete();
429
- };
430
- /** Returns observable that emits when a scroll event is fired on the host element. */
431
- CdkScrollable.prototype.elementScrolled = function () {
432
- return this._elementScrolled;
433
- };
434
- /** Gets the ElementRef for the viewport. */
435
- CdkScrollable.prototype.getElementRef = function () {
436
- return this.elementRef;
437
- };
438
- /**
439
- * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo
440
- * method, since browsers are not consistent about what scrollLeft means in RTL. For this method
441
- * left and right always refer to the left and right side of the scrolling container irrespective
442
- * of the layout direction. start and end refer to left and right in an LTR context and vice-versa
443
- * in an RTL context.
444
- * @param options specified the offsets to scroll to.
445
- */
446
- CdkScrollable.prototype.scrollTo = function (options) {
447
- var el = this.elementRef.nativeElement;
448
- var isRtl = this.dir && this.dir.value == 'rtl';
449
- // Rewrite start & end offsets as right or left offsets.
450
- if (options.left == null) {
451
- options.left = isRtl ? options.end : options.start;
452
- }
453
- if (options.right == null) {
454
- options.right = isRtl ? options.start : options.end;
455
- }
456
- // Rewrite the bottom offset as a top offset.
457
- if (options.bottom != null) {
458
- options.top =
459
- el.scrollHeight - el.clientHeight - options.bottom;
460
- }
461
- // Rewrite the right offset as a left offset.
462
- if (isRtl && i1.getRtlScrollAxisType() != 0 /* NORMAL */) {
463
- if (options.left != null) {
464
- options.right =
465
- el.scrollWidth - el.clientWidth - options.left;
466
- }
467
- if (i1.getRtlScrollAxisType() == 2 /* INVERTED */) {
468
- options.left = options.right;
469
- }
470
- else if (i1.getRtlScrollAxisType() == 1 /* NEGATED */) {
471
- options.left = options.right ? -options.right : options.right;
472
- }
473
- }
474
- else {
475
- if (options.right != null) {
476
- options.left =
477
- el.scrollWidth - el.clientWidth - options.right;
478
- }
479
- }
480
- this._applyScrollToOptions(options);
481
- };
482
- CdkScrollable.prototype._applyScrollToOptions = function (options) {
483
- var el = this.elementRef.nativeElement;
484
- if (i1.supportsScrollBehavior()) {
485
- el.scrollTo(options);
486
- }
487
- else {
488
- if (options.top != null) {
489
- el.scrollTop = options.top;
490
- }
491
- if (options.left != null) {
492
- el.scrollLeft = options.left;
493
- }
494
- }
495
- };
496
- /**
497
- * Measures the scroll offset relative to the specified edge of the viewport. This method can be
498
- * used instead of directly checking scrollLeft or scrollTop, since browsers are not consistent
499
- * about what scrollLeft means in RTL. The values returned by this method are normalized such that
500
- * left and right always refer to the left and right side of the scrolling container irrespective
501
- * of the layout direction. start and end refer to left and right in an LTR context and vice-versa
502
- * in an RTL context.
503
- * @param from The edge to measure from.
504
- */
505
- CdkScrollable.prototype.measureScrollOffset = function (from) {
506
- var LEFT = 'left';
507
- var RIGHT = 'right';
508
- var el = this.elementRef.nativeElement;
509
- if (from == 'top') {
510
- return el.scrollTop;
511
- }
512
- if (from == 'bottom') {
513
- return el.scrollHeight - el.clientHeight - el.scrollTop;
514
- }
515
- // Rewrite start & end as left or right offsets.
516
- var isRtl = this.dir && this.dir.value == 'rtl';
517
- if (from == 'start') {
518
- from = isRtl ? RIGHT : LEFT;
519
- }
520
- else if (from == 'end') {
521
- from = isRtl ? LEFT : RIGHT;
522
- }
523
- if (isRtl && i1.getRtlScrollAxisType() == 2 /* INVERTED */) {
524
- // For INVERTED, scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and
525
- // 0 when scrolled all the way right.
526
- if (from == LEFT) {
527
- return el.scrollWidth - el.clientWidth - el.scrollLeft;
528
- }
529
- else {
530
- return el.scrollLeft;
531
- }
532
- }
533
- else if (isRtl && i1.getRtlScrollAxisType() == 1 /* NEGATED */) {
534
- // For NEGATED, scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and
535
- // 0 when scrolled all the way right.
536
- if (from == LEFT) {
537
- return el.scrollLeft + el.scrollWidth - el.clientWidth;
538
- }
539
- else {
540
- return -el.scrollLeft;
541
- }
542
- }
543
- else {
544
- // For NORMAL, as well as non-RTL contexts, scrollLeft is 0 when scrolled all the way left and
545
- // (scrollWidth - clientWidth) when scrolled all the way right.
546
- if (from == LEFT) {
547
- return el.scrollLeft;
548
- }
549
- else {
550
- return el.scrollWidth - el.clientWidth - el.scrollLeft;
551
- }
552
- }
553
- };
554
- return CdkScrollable;
555
- }());
556
- CdkScrollable.decorators = [
557
- { type: i0.Directive, args: [{
558
- selector: '[cdk-scrollable], [cdkScrollable]'
559
- },] }
560
- ];
561
- CdkScrollable.ctorParameters = function () { return [
562
- { type: i0.ElementRef },
563
- { type: ScrollDispatcher },
564
- { type: i0.NgZone },
565
- { type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
566
- ]; };
567
-
568
- /*! *****************************************************************************
569
- Copyright (c) Microsoft Corporation.
570
-
571
- Permission to use, copy, modify, and/or distribute this software for any
572
- purpose with or without fee is hereby granted.
573
-
574
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
575
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
576
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
577
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
578
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
579
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
580
- PERFORMANCE OF THIS SOFTWARE.
581
- ***************************************************************************** */
582
- /* global Reflect, Promise */
583
- var extendStatics = function (d, b) {
584
- extendStatics = Object.setPrototypeOf ||
585
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
586
- function (d, b) { for (var p in b)
587
- if (Object.prototype.hasOwnProperty.call(b, p))
588
- d[p] = b[p]; };
589
- return extendStatics(d, b);
590
- };
591
- function __extends(d, b) {
592
- if (typeof b !== "function" && b !== null)
593
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
594
- extendStatics(d, b);
595
- function __() { this.constructor = d; }
596
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
597
- }
598
- var __assign = function () {
599
- __assign = Object.assign || function __assign(t) {
600
- for (var s, i = 1, n = arguments.length; i < n; i++) {
601
- s = arguments[i];
602
- for (var p in s)
603
- if (Object.prototype.hasOwnProperty.call(s, p))
604
- t[p] = s[p];
605
- }
606
- return t;
607
- };
608
- return __assign.apply(this, arguments);
609
- };
610
- function __rest(s, e) {
611
- var t = {};
612
- for (var p in s)
613
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
614
- t[p] = s[p];
615
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
616
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
617
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
618
- t[p[i]] = s[p[i]];
619
- }
620
- return t;
621
- }
622
- function __decorate(decorators, target, key, desc) {
623
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
624
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
625
- r = Reflect.decorate(decorators, target, key, desc);
626
- else
627
- for (var i = decorators.length - 1; i >= 0; i--)
628
- if (d = decorators[i])
629
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
630
- return c > 3 && r && Object.defineProperty(target, key, r), r;
631
- }
632
- function __param(paramIndex, decorator) {
633
- return function (target, key) { decorator(target, key, paramIndex); };
634
- }
635
- function __metadata(metadataKey, metadataValue) {
636
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
637
- return Reflect.metadata(metadataKey, metadataValue);
638
- }
639
- function __awaiter(thisArg, _arguments, P, generator) {
640
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
641
- return new (P || (P = Promise))(function (resolve, reject) {
642
- function fulfilled(value) { try {
643
- step(generator.next(value));
644
- }
645
- catch (e) {
646
- reject(e);
647
- } }
648
- function rejected(value) { try {
649
- step(generator["throw"](value));
650
- }
651
- catch (e) {
652
- reject(e);
653
- } }
654
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
655
- step((generator = generator.apply(thisArg, _arguments || [])).next());
656
- });
657
- }
658
- function __generator(thisArg, body) {
659
- var _ = { label: 0, sent: function () { if (t[0] & 1)
660
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
661
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
662
- function verb(n) { return function (v) { return step([n, v]); }; }
663
- function step(op) {
664
- if (f)
665
- throw new TypeError("Generator is already executing.");
666
- while (_)
667
- try {
668
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
669
- return t;
670
- if (y = 0, t)
671
- op = [op[0] & 2, t.value];
672
- switch (op[0]) {
673
- case 0:
674
- case 1:
675
- t = op;
676
- break;
677
- case 4:
678
- _.label++;
679
- return { value: op[1], done: false };
680
- case 5:
681
- _.label++;
682
- y = op[1];
683
- op = [0];
684
- continue;
685
- case 7:
686
- op = _.ops.pop();
687
- _.trys.pop();
688
- continue;
689
- default:
690
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
691
- _ = 0;
692
- continue;
693
- }
694
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
695
- _.label = op[1];
696
- break;
697
- }
698
- if (op[0] === 6 && _.label < t[1]) {
699
- _.label = t[1];
700
- t = op;
701
- break;
702
- }
703
- if (t && _.label < t[2]) {
704
- _.label = t[2];
705
- _.ops.push(op);
706
- break;
707
- }
708
- if (t[2])
709
- _.ops.pop();
710
- _.trys.pop();
711
- continue;
712
- }
713
- op = body.call(thisArg, _);
714
- }
715
- catch (e) {
716
- op = [6, e];
717
- y = 0;
718
- }
719
- finally {
720
- f = t = 0;
721
- }
722
- if (op[0] & 5)
723
- throw op[1];
724
- return { value: op[0] ? op[1] : void 0, done: true };
725
- }
726
- }
727
- var __createBinding = Object.create ? (function (o, m, k, k2) {
728
- if (k2 === undefined)
729
- k2 = k;
730
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
731
- }) : (function (o, m, k, k2) {
732
- if (k2 === undefined)
733
- k2 = k;
734
- o[k2] = m[k];
735
- });
736
- function __exportStar(m, o) {
737
- for (var p in m)
738
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
739
- __createBinding(o, m, p);
740
- }
741
- function __values(o) {
742
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
743
- if (m)
744
- return m.call(o);
745
- if (o && typeof o.length === "number")
746
- return {
747
- next: function () {
748
- if (o && i >= o.length)
749
- o = void 0;
750
- return { value: o && o[i++], done: !o };
751
- }
752
- };
753
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
754
- }
755
- function __read(o, n) {
756
- var m = typeof Symbol === "function" && o[Symbol.iterator];
757
- if (!m)
758
- return o;
759
- var i = m.call(o), r, ar = [], e;
760
- try {
761
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
762
- ar.push(r.value);
763
- }
764
- catch (error) {
765
- e = { error: error };
766
- }
767
- finally {
768
- try {
769
- if (r && !r.done && (m = i["return"]))
770
- m.call(i);
771
- }
772
- finally {
773
- if (e)
774
- throw e.error;
775
- }
776
- }
777
- return ar;
778
- }
779
- /** @deprecated */
780
- function __spread() {
781
- for (var ar = [], i = 0; i < arguments.length; i++)
782
- ar = ar.concat(__read(arguments[i]));
783
- return ar;
784
- }
785
- /** @deprecated */
786
- function __spreadArrays() {
787
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
788
- s += arguments[i].length;
789
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
790
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
791
- r[k] = a[j];
792
- return r;
793
- }
794
- function __spreadArray(to, from, pack) {
795
- if (pack || arguments.length === 2)
796
- for (var i = 0, l = from.length, ar; i < l; i++) {
797
- if (ar || !(i in from)) {
798
- if (!ar)
799
- ar = Array.prototype.slice.call(from, 0, i);
800
- ar[i] = from[i];
801
- }
802
- }
803
- return to.concat(ar || Array.prototype.slice.call(from));
804
- }
805
- function __await(v) {
806
- return this instanceof __await ? (this.v = v, this) : new __await(v);
807
- }
808
- function __asyncGenerator(thisArg, _arguments, generator) {
809
- if (!Symbol.asyncIterator)
810
- throw new TypeError("Symbol.asyncIterator is not defined.");
811
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
812
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
813
- function verb(n) { if (g[n])
814
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
815
- function resume(n, v) { try {
816
- step(g[n](v));
817
- }
818
- catch (e) {
819
- settle(q[0][3], e);
820
- } }
821
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
822
- function fulfill(value) { resume("next", value); }
823
- function reject(value) { resume("throw", value); }
824
- function settle(f, v) { if (f(v), q.shift(), q.length)
825
- resume(q[0][0], q[0][1]); }
826
- }
827
- function __asyncDelegator(o) {
828
- var i, p;
829
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
830
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
831
- }
832
- function __asyncValues(o) {
833
- if (!Symbol.asyncIterator)
834
- throw new TypeError("Symbol.asyncIterator is not defined.");
835
- var m = o[Symbol.asyncIterator], i;
836
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
837
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
838
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
839
- }
840
- function __makeTemplateObject(cooked, raw) {
841
- if (Object.defineProperty) {
842
- Object.defineProperty(cooked, "raw", { value: raw });
843
- }
844
- else {
845
- cooked.raw = raw;
846
- }
847
- return cooked;
848
- }
849
- ;
850
- var __setModuleDefault = Object.create ? (function (o, v) {
851
- Object.defineProperty(o, "default", { enumerable: true, value: v });
852
- }) : function (o, v) {
853
- o["default"] = v;
854
- };
855
- function __importStar(mod) {
856
- if (mod && mod.__esModule)
857
- return mod;
858
- var result = {};
859
- if (mod != null)
860
- for (var k in mod)
861
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
862
- __createBinding(result, mod, k);
863
- __setModuleDefault(result, mod);
864
- return result;
865
- }
866
- function __importDefault(mod) {
867
- return (mod && mod.__esModule) ? mod : { default: mod };
868
- }
869
- function __classPrivateFieldGet(receiver, state, kind, f) {
870
- if (kind === "a" && !f)
871
- throw new TypeError("Private accessor was defined without a getter");
872
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
873
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
874
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
875
- }
876
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
877
- if (kind === "m")
878
- throw new TypeError("Private method is not writable");
879
- if (kind === "a" && !f)
880
- throw new TypeError("Private accessor was defined without a setter");
881
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
882
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
883
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
884
- }
885
-
886
- /**
887
- * @license
888
- * Copyright Google LLC All Rights Reserved.
889
- *
890
- * Use of this source code is governed by an MIT-style license that can be
891
- * found in the LICENSE file at https://angular.io/license
892
- */
893
- /** Time in ms to throttle the resize events by default. */
894
- var DEFAULT_RESIZE_TIME = 20;
895
- /**
896
- * Simple utility for getting the bounds of the browser viewport.
897
- * @docs-private
898
- */
899
- var ViewportRuler = /** @class */ (function () {
900
- function ViewportRuler(_platform, ngZone, document) {
901
- var _this = this;
902
- this._platform = _platform;
903
- /** Stream of viewport change events. */
904
- this._change = new rxjs.Subject();
905
- /** Event listener that will be used to handle the viewport change events. */
906
- this._changeListener = function (event) {
907
- _this._change.next(event);
908
- };
909
- this._document = document;
910
- ngZone.runOutsideAngular(function () {
911
- if (_platform.isBrowser) {
912
- var window = _this._getWindow();
913
- // Note that bind the events ourselves, rather than going through something like RxJS's
914
- // `fromEvent` so that we can ensure that they're bound outside of the NgZone.
915
- window.addEventListener('resize', _this._changeListener);
916
- window.addEventListener('orientationchange', _this._changeListener);
917
- }
918
- // Clear the cached position so that the viewport is re-measured next time it is required.
919
- // We don't need to keep track of the subscription, because it is completed on destroy.
920
- _this.change().subscribe(function () { return _this._viewportSize = null; });
921
- });
922
- }
923
- ViewportRuler.prototype.ngOnDestroy = function () {
924
- if (this._platform.isBrowser) {
925
- var window = this._getWindow();
926
- window.removeEventListener('resize', this._changeListener);
927
- window.removeEventListener('orientationchange', this._changeListener);
928
- }
929
- this._change.complete();
930
- };
931
- /** Returns the viewport's width and height. */
932
- ViewportRuler.prototype.getViewportSize = function () {
933
- if (!this._viewportSize) {
934
- this._updateViewportSize();
935
- }
936
- var output = { width: this._viewportSize.width, height: this._viewportSize.height };
937
- // If we're not on a browser, don't cache the size since it'll be mocked out anyway.
938
- if (!this._platform.isBrowser) {
939
- this._viewportSize = null;
940
- }
941
- return output;
942
- };
943
- /** Gets a ClientRect for the viewport's bounds. */
944
- ViewportRuler.prototype.getViewportRect = function () {
945
- // Use the document element's bounding rect rather than the window scroll properties
946
- // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll
947
- // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different
948
- // conceptual viewports. Under most circumstances these viewports are equivalent, but they
949
- // can disagree when the page is pinch-zoomed (on devices that support touch).
950
- // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4
951
- // We use the documentElement instead of the body because, by default (without a css reset)
952
- // browsers typically give the document body an 8px margin, which is not included in
953
- // getBoundingClientRect().
954
- var scrollPosition = this.getViewportScrollPosition();
955
- var _a = this.getViewportSize(), width = _a.width, height = _a.height;
956
- return {
957
- top: scrollPosition.top,
958
- left: scrollPosition.left,
959
- bottom: scrollPosition.top + height,
960
- right: scrollPosition.left + width,
961
- height: height,
962
- width: width,
963
- };
964
- };
965
- /** Gets the (top, left) scroll position of the viewport. */
966
- ViewportRuler.prototype.getViewportScrollPosition = function () {
967
- // While we can get a reference to the fake document
968
- // during SSR, it doesn't have getBoundingClientRect.
969
- if (!this._platform.isBrowser) {
970
- return { top: 0, left: 0 };
971
- }
972
- // The top-left-corner of the viewport is determined by the scroll position of the document
973
- // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about
974
- // whether `document.body` or `document.documentElement` is the scrolled element, so reading
975
- // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of
976
- // `document.documentElement` works consistently, where the `top` and `left` values will
977
- // equal negative the scroll position.
978
- var document = this._document;
979
- var window = this._getWindow();
980
- var documentElement = document.documentElement;
981
- var documentRect = documentElement.getBoundingClientRect();
982
- var top = -documentRect.top || document.body.scrollTop || window.scrollY ||
983
- documentElement.scrollTop || 0;
984
- var left = -documentRect.left || document.body.scrollLeft || window.scrollX ||
985
- documentElement.scrollLeft || 0;
986
- return { top: top, left: left };
987
- };
988
- /**
989
- * Returns a stream that emits whenever the size of the viewport changes.
990
- * This stream emits outside of the Angular zone.
991
- * @param throttleTime Time in milliseconds to throttle the stream.
992
- */
993
- ViewportRuler.prototype.change = function (throttleTime) {
994
- if (throttleTime === void 0) { throttleTime = DEFAULT_RESIZE_TIME; }
995
- return throttleTime > 0 ? this._change.pipe(operators.auditTime(throttleTime)) : this._change;
996
- };
997
- /** Use defaultView of injected document if available or fallback to global window reference */
998
- ViewportRuler.prototype._getWindow = function () {
999
- return this._document.defaultView || window;
1000
- };
1001
- /** Updates the cached viewport size. */
1002
- ViewportRuler.prototype._updateViewportSize = function () {
1003
- var window = this._getWindow();
1004
- this._viewportSize = this._platform.isBrowser ?
1005
- { width: window.innerWidth, height: window.innerHeight } :
1006
- { width: 0, height: 0 };
1007
- };
1008
- return ViewportRuler;
1009
- }());
1010
- ViewportRuler.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(i0__namespace.ɵɵinject(i1__namespace.Platform), i0__namespace.ɵɵinject(i0__namespace.NgZone), i0__namespace.ɵɵinject(i2__namespace.DOCUMENT, 8)); }, token: ViewportRuler, providedIn: "root" });
1011
- ViewportRuler.decorators = [
1012
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1013
- ];
1014
- ViewportRuler.ctorParameters = function () { return [
1015
- { type: i1.Platform },
1016
- { type: i0.NgZone },
1017
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
1018
- ]; };
1019
-
1020
- /** Checks if the given ranges are equal. */
1021
- function rangesEqual(r1, r2) {
1022
- return r1.start == r2.start && r1.end == r2.end;
1023
- }
1024
- /**
1025
- * Scheduler to be used for scroll events. Needs to fall back to
1026
- * something that doesn't rely on requestAnimationFrame on environments
1027
- * that don't support it (e.g. server-side rendering).
1028
- */
1029
- var SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? rxjs.animationFrameScheduler : rxjs.asapScheduler;
1030
- /** A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`. */
1031
- var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1032
- __extends(CdkVirtualScrollViewport, _super);
1033
- function CdkVirtualScrollViewport(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler) {
1034
- var _this = _super.call(this, elementRef, scrollDispatcher, ngZone, dir) || this;
1035
- _this.elementRef = elementRef;
1036
- _this._changeDetectorRef = _changeDetectorRef;
1037
- _this._scrollStrategy = _scrollStrategy;
1038
- /** Emits when the viewport is detached from a CdkVirtualForOf. */
1039
- _this._detachedSubject = new rxjs.Subject();
1040
- /** Emits when the rendered range changes. */
1041
- _this._renderedRangeSubject = new rxjs.Subject();
1042
- _this._orientation = 'vertical';
1043
- _this._appendOnly = false;
1044
- // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
1045
- // strategy lazily (i.e. only if the user is actually listening to the events). We do this because
1046
- // depending on how the strategy calculates the scrolled index, it may come at a cost to
1047
- // performance.
1048
- /** Emits when the index of the first element visible in the viewport changes. */
1049
- _this.scrolledIndexChange = new rxjs.Observable(function (observer) { return _this._scrollStrategy.scrolledIndexChange.subscribe(function (index) { return Promise.resolve().then(function () { return _this.ngZone.run(function () { return observer.next(index); }); }); }); });
1050
- /** A stream that emits whenever the rendered range changes. */
1051
- _this.renderedRangeStream = _this._renderedRangeSubject;
1052
- /**
1053
- * The total size of all content (in pixels), including content that is not currently rendered.
1054
- */
1055
- _this._totalContentSize = 0;
1056
- /** A string representing the `style.width` property value to be used for the spacer element. */
1057
- _this._totalContentWidth = '';
1058
- /** A string representing the `style.height` property value to be used for the spacer element. */
1059
- _this._totalContentHeight = '';
1060
- /** The currently rendered range of indices. */
1061
- _this._renderedRange = { start: 0, end: 0 };
1062
- /** The length of the data bound to this viewport (in number of items). */
1063
- _this._dataLength = 0;
1064
- /** The size of the viewport (in pixels). */
1065
- _this._viewportSize = 0;
1066
- /** The last rendered content offset that was set. */
1067
- _this._renderedContentOffset = 0;
1068
- /**
1069
- * Whether the last rendered content offset was to the end of the content (and therefore needs to
1070
- * be rewritten as an offset to the start of the content).
1071
- */
1072
- _this._renderedContentOffsetNeedsRewrite = false;
1073
- /** Whether there is a pending change detection cycle. */
1074
- _this._isChangeDetectionPending = false;
1075
- /** A list of functions to run after the next change detection cycle. */
1076
- _this._runAfterChangeDetection = [];
1077
- /** Subscription to changes in the viewport size. */
1078
- _this._viewportChanges = rxjs.Subscription.EMPTY;
1079
- if (!_scrollStrategy && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1080
- throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
1081
- }
1082
- _this._viewportChanges = viewportRuler.change().subscribe(function () {
1083
- _this.checkViewportSize();
1084
- });
1085
- return _this;
1086
- }
1087
- Object.defineProperty(CdkVirtualScrollViewport.prototype, "orientation", {
1088
- /** The direction the viewport scrolls. */
1089
- get: function () {
1090
- return this._orientation;
1091
- },
1092
- set: function (orientation) {
1093
- if (this._orientation !== orientation) {
1094
- this._orientation = orientation;
1095
- this._calculateSpacerSize();
1096
- }
1097
- },
1098
- enumerable: false,
1099
- configurable: true
1100
- });
1101
- Object.defineProperty(CdkVirtualScrollViewport.prototype, "appendOnly", {
1102
- /**
1103
- * Whether rendered items should persist in the DOM after scrolling out of view. By default, items
1104
- * will be removed.
1105
- */
1106
- get: function () {
1107
- return this._appendOnly;
1108
- },
1109
- set: function (value) {
1110
- this._appendOnly = coercion.coerceBooleanProperty(value);
1111
- },
1112
- enumerable: false,
1113
- configurable: true
1114
- });
1115
- CdkVirtualScrollViewport.prototype.ngOnInit = function () {
1116
- var _this = this;
1117
- _super.prototype.ngOnInit.call(this);
1118
- // It's still too early to measure the viewport at this point. Deferring with a promise allows
1119
- // the Viewport to be rendered with the correct size before we measure. We run this outside the
1120
- // zone to avoid causing more change detection cycles. We handle the change detection loop
1121
- // ourselves instead.
1122
- this.ngZone.runOutsideAngular(function () { return Promise.resolve().then(function () {
1123
- _this._measureViewportSize();
1124
- _this._scrollStrategy.attach(_this);
1125
- _this.elementScrolled()
1126
- .pipe(
1127
- // Start off with a fake scroll event so we properly detect our initial position.
1128
- operators.startWith(null),
1129
- // Collect multiple events into one until the next animation frame. This way if
1130
- // there are multiple scroll events in the same frame we only need to recheck
1131
- // our layout once.
1132
- operators.auditTime(0, SCROLL_SCHEDULER))
1133
- .subscribe(function () { return _this._scrollStrategy.onContentScrolled(); });
1134
- _this._markChangeDetectionNeeded();
1135
- }); });
1136
- };
1137
- CdkVirtualScrollViewport.prototype.ngOnDestroy = function () {
1138
- this.detach();
1139
- this._scrollStrategy.detach();
1140
- // Complete all subjects
1141
- this._renderedRangeSubject.complete();
1142
- this._detachedSubject.complete();
1143
- this._viewportChanges.unsubscribe();
1144
- _super.prototype.ngOnDestroy.call(this);
1145
- };
1146
- /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */
1147
- CdkVirtualScrollViewport.prototype.attach = function (forOf) {
1148
- var _this = this;
1149
- if (this._forOf && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1150
- throw Error('CdkVirtualScrollViewport is already attached.');
1151
- }
1152
- // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
1153
- // changes. Run outside the zone to avoid triggering change detection, since we're managing the
1154
- // change detection loop ourselves.
1155
- this.ngZone.runOutsideAngular(function () {
1156
- _this._forOf = forOf;
1157
- _this._forOf.dataStream.pipe(operators.takeUntil(_this._detachedSubject)).subscribe(function (data) {
1158
- var newLength = data.length;
1159
- if (newLength !== _this._dataLength) {
1160
- _this._dataLength = newLength;
1161
- _this._scrollStrategy.onDataLengthChanged();
1162
- }
1163
- _this._doChangeDetection();
1164
- });
1165
- });
1166
- };
1167
- /** Detaches the current `CdkVirtualForOf`. */
1168
- CdkVirtualScrollViewport.prototype.detach = function () {
1169
- this._forOf = null;
1170
- this._detachedSubject.next();
1171
- };
1172
- /** Gets the length of the data bound to this viewport (in number of items). */
1173
- CdkVirtualScrollViewport.prototype.getDataLength = function () {
1174
- return this._dataLength;
1175
- };
1176
- /** Gets the size of the viewport (in pixels). */
1177
- CdkVirtualScrollViewport.prototype.getViewportSize = function () {
1178
- return this._viewportSize;
1179
- };
1180
- // TODO(mmalerba): This is technically out of sync with what's really rendered until a render
1181
- // cycle happens. I'm being careful to only call it after the render cycle is complete and before
1182
- // setting it to something else, but its error prone and should probably be split into
1183
- // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
1184
- /** Get the current rendered range of items. */
1185
- CdkVirtualScrollViewport.prototype.getRenderedRange = function () {
1186
- return this._renderedRange;
1187
- };
1188
- /**
1189
- * Sets the total size of all content (in pixels), including content that is not currently
1190
- * rendered.
1191
- */
1192
- CdkVirtualScrollViewport.prototype.setTotalContentSize = function (size) {
1193
- if (this._totalContentSize !== size) {
1194
- this._totalContentSize = size;
1195
- this._calculateSpacerSize();
1196
- this._markChangeDetectionNeeded();
1197
- }
1198
- };
1199
- /** Sets the currently rendered range of indices. */
1200
- CdkVirtualScrollViewport.prototype.setRenderedRange = function (range) {
1201
- var _this = this;
1202
- if (!rangesEqual(this._renderedRange, range)) {
1203
- if (this.appendOnly) {
1204
- range = { start: 0, end: Math.max(this._renderedRange.end, range.end) };
1205
- }
1206
- this._renderedRangeSubject.next(this._renderedRange = range);
1207
- this._markChangeDetectionNeeded(function () { return _this._scrollStrategy.onContentRendered(); });
1208
- }
1209
- };
1210
- /**
1211
- * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).
1212
- */
1213
- CdkVirtualScrollViewport.prototype.getOffsetToRenderedContentStart = function () {
1214
- return this._renderedContentOffsetNeedsRewrite ? null : this._renderedContentOffset;
1215
- };
1216
- /**
1217
- * Sets the offset from the start of the viewport to either the start or end of the rendered data
1218
- * (in pixels).
1219
- */
1220
- CdkVirtualScrollViewport.prototype.setRenderedContentOffset = function (offset, to) {
1221
- var _this = this;
1222
- if (to === void 0) { to = 'to-start'; }
1223
- // For a horizontal viewport in a right-to-left language we need to translate along the x-axis
1224
- // in the negative direction.
1225
- var isRtl = this.dir && this.dir.value == 'rtl';
1226
- var isHorizontal = this.orientation == 'horizontal';
1227
- var axis = isHorizontal ? 'X' : 'Y';
1228
- var axisDirection = isHorizontal && isRtl ? -1 : 1;
1229
- var transform = "translate" + axis + "(" + Number(axisDirection * offset) + "px)";
1230
- this._renderedContentOffset = offset;
1231
- if (to === 'to-end') {
1232
- transform += " translate" + axis + "(-100%)";
1233
- // The viewport should rewrite this as a `to-start` offset on the next render cycle. Otherwise
1234
- // elements will appear to expand in the wrong direction (e.g. `mat-expansion-panel` would
1235
- // expand upward).
1236
- this._renderedContentOffsetNeedsRewrite = true;
1237
- }
1238
- if (this._renderedContentTransform != transform) {
1239
- // We know this value is safe because we parse `offset` with `Number()` before passing it
1240
- // into the string.
1241
- this._renderedContentTransform = transform;
1242
- this._markChangeDetectionNeeded(function () {
1243
- if (_this._renderedContentOffsetNeedsRewrite) {
1244
- _this._renderedContentOffset -= _this.measureRenderedContentSize();
1245
- _this._renderedContentOffsetNeedsRewrite = false;
1246
- _this.setRenderedContentOffset(_this._renderedContentOffset);
1247
- }
1248
- else {
1249
- _this._scrollStrategy.onRenderedOffsetChanged();
1250
- }
1251
- });
1252
- }
1253
- };
1254
- /**
1255
- * Scrolls to the given offset from the start of the viewport. Please note that this is not always
1256
- * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left
1257
- * direction, this would be the equivalent of setting a fictional `scrollRight` property.
1258
- * @param offset The offset to scroll to.
1259
- * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
1260
- */
1261
- CdkVirtualScrollViewport.prototype.scrollToOffset = function (offset, behavior) {
1262
- if (behavior === void 0) { behavior = 'auto'; }
1263
- var options = { behavior: behavior };
1264
- if (this.orientation === 'horizontal') {
1265
- options.start = offset;
1266
- }
1267
- else {
1268
- options.top = offset;
1269
- }
1270
- this.scrollTo(options);
1271
- };
1272
- /**
1273
- * Scrolls to the offset for the given index.
1274
- * @param index The index of the element to scroll to.
1275
- * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
1276
- */
1277
- CdkVirtualScrollViewport.prototype.scrollToIndex = function (index, behavior) {
1278
- if (behavior === void 0) { behavior = 'auto'; }
1279
- this._scrollStrategy.scrollToIndex(index, behavior);
1280
- };
1281
- /**
1282
- * Gets the current scroll offset from the start of the viewport (in pixels).
1283
- * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'
1284
- * in horizontal mode.
1285
- */
1286
- CdkVirtualScrollViewport.prototype.measureScrollOffset = function (from) {
1287
- return from ?
1288
- _super.prototype.measureScrollOffset.call(this, from) :
1289
- _super.prototype.measureScrollOffset.call(this, this.orientation === 'horizontal' ? 'start' : 'top');
1290
- };
1291
- /** Measure the combined size of all of the rendered items. */
1292
- CdkVirtualScrollViewport.prototype.measureRenderedContentSize = function () {
1293
- var contentEl = this._contentWrapper.nativeElement;
1294
- return this.orientation === 'horizontal' ? contentEl.offsetWidth : contentEl.offsetHeight;
1295
- };
1296
- /**
1297
- * Measure the total combined size of the given range. Throws if the range includes items that are
1298
- * not rendered.
1299
- */
1300
- CdkVirtualScrollViewport.prototype.measureRangeSize = function (range) {
1301
- if (!this._forOf) {
1302
- return 0;
1303
- }
1304
- return this._forOf.measureRangeSize(range, this.orientation);
1305
- };
1306
- /** Update the viewport dimensions and re-render. */
1307
- CdkVirtualScrollViewport.prototype.checkViewportSize = function () {
1308
- // TODO: Cleanup later when add logic for handling content resize
1309
- this._measureViewportSize();
1310
- this._scrollStrategy.onDataLengthChanged();
1311
- };
1312
- /** Measure the viewport size. */
1313
- CdkVirtualScrollViewport.prototype._measureViewportSize = function () {
1314
- var viewportEl = this.elementRef.nativeElement;
1315
- this._viewportSize = this.orientation === 'horizontal' ?
1316
- viewportEl.clientWidth : viewportEl.clientHeight;
1317
- };
1318
- /** Queue up change detection to run. */
1319
- CdkVirtualScrollViewport.prototype._markChangeDetectionNeeded = function (runAfter) {
1320
- var _this = this;
1321
- if (runAfter) {
1322
- this._runAfterChangeDetection.push(runAfter);
1323
- }
1324
- // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of
1325
- // properties sequentially we only have to run `_doChangeDetection` once at the end.
1326
- if (!this._isChangeDetectionPending) {
1327
- this._isChangeDetectionPending = true;
1328
- this.ngZone.runOutsideAngular(function () { return Promise.resolve().then(function () {
1329
- _this._doChangeDetection();
1330
- }); });
1331
- }
1332
- };
1333
- /** Run change detection. */
1334
- CdkVirtualScrollViewport.prototype._doChangeDetection = function () {
1335
- var e_1, _a;
1336
- var _this = this;
1337
- this._isChangeDetectionPending = false;
1338
- // Apply the content transform. The transform can't be set via an Angular binding because
1339
- // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of
1340
- // string literals, a variable that can only be 'X' or 'Y', and user input that is run through
1341
- // the `Number` function first to coerce it to a numeric value.
1342
- this._contentWrapper.nativeElement.style.transform = this._renderedContentTransform;
1343
- // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
1344
- // from the root, since the repeated items are content projected in. Calling `detectChanges`
1345
- // instead does not properly check the projected content.
1346
- this.ngZone.run(function () { return _this._changeDetectorRef.markForCheck(); });
1347
- var runAfterChangeDetection = this._runAfterChangeDetection;
1348
- this._runAfterChangeDetection = [];
1349
- try {
1350
- for (var runAfterChangeDetection_1 = __values(runAfterChangeDetection), runAfterChangeDetection_1_1 = runAfterChangeDetection_1.next(); !runAfterChangeDetection_1_1.done; runAfterChangeDetection_1_1 = runAfterChangeDetection_1.next()) {
1351
- var fn = runAfterChangeDetection_1_1.value;
1352
- fn();
1353
- }
1354
- }
1355
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1356
- finally {
1357
- try {
1358
- if (runAfterChangeDetection_1_1 && !runAfterChangeDetection_1_1.done && (_a = runAfterChangeDetection_1.return)) _a.call(runAfterChangeDetection_1);
1359
- }
1360
- finally { if (e_1) throw e_1.error; }
1361
- }
1362
- };
1363
- /** Calculates the `style.width` and `style.height` for the spacer element. */
1364
- CdkVirtualScrollViewport.prototype._calculateSpacerSize = function () {
1365
- this._totalContentHeight =
1366
- this.orientation === 'horizontal' ? '' : this._totalContentSize + "px";
1367
- this._totalContentWidth =
1368
- this.orientation === 'horizontal' ? this._totalContentSize + "px" : '';
1369
- };
1370
- return CdkVirtualScrollViewport;
1371
- }(CdkScrollable));
1372
- CdkVirtualScrollViewport.decorators = [
1373
- { type: i0.Component, args: [{
1374
- selector: 'cdk-virtual-scroll-viewport',
1375
- template: "<!--\n Wrap the rendered content in an element that will be used to offset it based on the scroll\n position.\n-->\n<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\">\n <ng-content></ng-content>\n</div>\n<!--\n Spacer used to force the scrolling container to the correct size for the *total* number of items\n so that the scrollbar captures the size of the entire data set.\n-->\n<div class=\"cdk-virtual-scroll-spacer\"\n [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>\n",
1376
- host: {
1377
- 'class': 'cdk-virtual-scroll-viewport',
1378
- '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"',
1379
- '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"',
1380
- },
1381
- encapsulation: i0.ViewEncapsulation.None,
1382
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1383
- providers: [{
1384
- provide: CdkScrollable,
1385
- useExisting: CdkVirtualScrollViewport,
1386
- }],
1387
- styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"]
1388
- },] }
1389
- ];
1390
- CdkVirtualScrollViewport.ctorParameters = function () { return [
1391
- { type: i0.ElementRef },
1392
- { type: i0.ChangeDetectorRef },
1393
- { type: i0.NgZone },
1394
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [VIRTUAL_SCROLL_STRATEGY,] }] },
1395
- { type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
1396
- { type: ScrollDispatcher },
1397
- { type: ViewportRuler }
1398
- ]; };
1399
- CdkVirtualScrollViewport.propDecorators = {
1400
- orientation: [{ type: i0.Input }],
1401
- appendOnly: [{ type: i0.Input }],
1402
- scrolledIndexChange: [{ type: i0.Output }],
1403
- _contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { static: true },] }]
1404
- };
1405
-
1406
- /** Helper to extract the offset of a DOM Node in a certain direction. */
1407
- function getOffset(orientation, direction, node) {
1408
- var el = node;
1409
- if (!el.getBoundingClientRect) {
1410
- return 0;
1411
- }
1412
- var rect = el.getBoundingClientRect();
1413
- if (orientation === 'horizontal') {
1414
- return direction === 'start' ? rect.left : rect.right;
1415
- }
1416
- return direction === 'start' ? rect.top : rect.bottom;
1417
- }
1418
- /**
1419
- * A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling
1420
- * container.
1421
- */
1422
- var CdkVirtualForOf = /** @class */ (function () {
1423
- function CdkVirtualForOf(
1424
- /** The view container to add items to. */
1425
- _viewContainerRef,
1426
- /** The template to use when stamping out new items. */
1427
- _template,
1428
- /** The set of available differs. */
1429
- _differs,
1430
- /** The strategy used to render items in the virtual scroll viewport. */
1431
- _viewRepeater,
1432
- /** The virtual scrolling viewport that these items are being rendered in. */
1433
- _viewport, ngZone) {
1434
- var _this = this;
1435
- this._viewContainerRef = _viewContainerRef;
1436
- this._template = _template;
1437
- this._differs = _differs;
1438
- this._viewRepeater = _viewRepeater;
1439
- this._viewport = _viewport;
1440
- /** Emits when the rendered view of the data changes. */
1441
- this.viewChange = new rxjs.Subject();
1442
- /** Subject that emits when a new DataSource instance is given. */
1443
- this._dataSourceChanges = new rxjs.Subject();
1444
- /** Emits whenever the data in the current DataSource changes. */
1445
- this.dataStream = this._dataSourceChanges
1446
- .pipe(
1447
- // Start off with null `DataSource`.
1448
- operators.startWith(null),
1449
- // Bundle up the previous and current data sources so we can work with both.
1450
- operators.pairwise(),
1451
- // Use `_changeDataSource` to disconnect from the previous data source and connect to the
1452
- // new one, passing back a stream of data changes which we run through `switchMap` to give
1453
- // us a data stream that emits the latest data from whatever the current `DataSource` is.
1454
- operators.switchMap(function (_a) {
1455
- var _b = __read(_a, 2), prev = _b[0], cur = _b[1];
1456
- return _this._changeDataSource(prev, cur);
1457
- }),
1458
- // Replay the last emitted data when someone subscribes.
1459
- operators.shareReplay(1));
1460
- /** The differ used to calculate changes to the data. */
1461
- this._differ = null;
1462
- /** Whether the rendered data should be updated during the next ngDoCheck cycle. */
1463
- this._needsUpdate = false;
1464
- this._destroyed = new rxjs.Subject();
1465
- this.dataStream.subscribe(function (data) {
1466
- _this._data = data;
1467
- _this._onRenderedDataChange();
1468
- });
1469
- this._viewport.renderedRangeStream.pipe(operators.takeUntil(this._destroyed)).subscribe(function (range) {
1470
- _this._renderedRange = range;
1471
- ngZone.run(function () { return _this.viewChange.next(_this._renderedRange); });
1472
- _this._onRenderedDataChange();
1473
- });
1474
- this._viewport.attach(this);
1475
- }
1476
- Object.defineProperty(CdkVirtualForOf.prototype, "cdkVirtualForOf", {
1477
- /** The DataSource to display. */
1478
- get: function () {
1479
- return this._cdkVirtualForOf;
1480
- },
1481
- set: function (value) {
1482
- this._cdkVirtualForOf = value;
1483
- if (collections.isDataSource(value)) {
1484
- this._dataSourceChanges.next(value);
1485
- }
1486
- else {
1487
- // If value is an an NgIterable, convert it to an array.
1488
- this._dataSourceChanges.next(new collections.ArrayDataSource(rxjs.isObservable(value) ? value : Array.from(value || [])));
1489
- }
1490
- },
1491
- enumerable: false,
1492
- configurable: true
1493
- });
1494
- Object.defineProperty(CdkVirtualForOf.prototype, "cdkVirtualForTrackBy", {
1495
- /**
1496
- * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and
1497
- * the item and produces a value to be used as the item's identity when tracking changes.
1498
- */
1499
- get: function () {
1500
- return this._cdkVirtualForTrackBy;
1501
- },
1502
- set: function (fn) {
1503
- var _this = this;
1504
- this._needsUpdate = true;
1505
- this._cdkVirtualForTrackBy = fn ?
1506
- function (index, item) { return fn(index + (_this._renderedRange ? _this._renderedRange.start : 0), item); } :
1507
- undefined;
1508
- },
1509
- enumerable: false,
1510
- configurable: true
1511
- });
1512
- Object.defineProperty(CdkVirtualForOf.prototype, "cdkVirtualForTemplate", {
1513
- /** The template used to stamp out new elements. */
1514
- set: function (value) {
1515
- if (value) {
1516
- this._needsUpdate = true;
1517
- this._template = value;
1518
- }
1519
- },
1520
- enumerable: false,
1521
- configurable: true
1522
- });
1523
- Object.defineProperty(CdkVirtualForOf.prototype, "cdkVirtualForTemplateCacheSize", {
1524
- /**
1525
- * The size of the cache used to store templates that are not being used for re-use later.
1526
- * Setting the cache size to `0` will disable caching. Defaults to 20 templates.
1527
- */
1528
- get: function () {
1529
- return this._viewRepeater.viewCacheSize;
1530
- },
1531
- set: function (size) {
1532
- this._viewRepeater.viewCacheSize = coercion.coerceNumberProperty(size);
1533
- },
1534
- enumerable: false,
1535
- configurable: true
1536
- });
1537
- /**
1538
- * Measures the combined size (width for horizontal orientation, height for vertical) of all items
1539
- * in the specified range. Throws an error if the range includes items that are not currently
1540
- * rendered.
1541
- */
1542
- CdkVirtualForOf.prototype.measureRangeSize = function (range, orientation) {
1543
- if (range.start >= range.end) {
1544
- return 0;
1545
- }
1546
- if ((range.start < this._renderedRange.start || range.end > this._renderedRange.end) &&
1547
- (typeof ngDevMode === 'undefined' || ngDevMode)) {
1548
- throw Error("Error: attempted to measure an item that isn't rendered.");
1549
- }
1550
- // The index into the list of rendered views for the first item in the range.
1551
- var renderedStartIndex = range.start - this._renderedRange.start;
1552
- // The length of the range we're measuring.
1553
- var rangeLen = range.end - range.start;
1554
- // Loop over all the views, find the first and land node and compute the size by subtracting
1555
- // the top of the first node from the bottom of the last one.
1556
- var firstNode;
1557
- var lastNode;
1558
- // Find the first node by starting from the beginning and going forwards.
1559
- for (var i = 0; i < rangeLen; i++) {
1560
- var view = this._viewContainerRef.get(i + renderedStartIndex);
1561
- if (view && view.rootNodes.length) {
1562
- firstNode = lastNode = view.rootNodes[0];
1563
- break;
1564
- }
1565
- }
1566
- // Find the last node by starting from the end and going backwards.
1567
- for (var i = rangeLen - 1; i > -1; i--) {
1568
- var view = this._viewContainerRef.get(i + renderedStartIndex);
1569
- if (view && view.rootNodes.length) {
1570
- lastNode = view.rootNodes[view.rootNodes.length - 1];
1571
- break;
1572
- }
1573
- }
1574
- return firstNode && lastNode ?
1575
- getOffset(orientation, 'end', lastNode) - getOffset(orientation, 'start', firstNode) : 0;
1576
- };
1577
- CdkVirtualForOf.prototype.ngDoCheck = function () {
1578
- if (this._differ && this._needsUpdate) {
1579
- // TODO(mmalerba): We should differentiate needs update due to scrolling and a new portion of
1580
- // this list being rendered (can use simpler algorithm) vs needs update due to data actually
1581
- // changing (need to do this diff).
1582
- var changes = this._differ.diff(this._renderedItems);
1583
- if (!changes) {
1584
- this._updateContext();
1585
- }
1586
- else {
1587
- this._applyChanges(changes);
1588
- }
1589
- this._needsUpdate = false;
1590
- }
1591
- };
1592
- CdkVirtualForOf.prototype.ngOnDestroy = function () {
1593
- this._viewport.detach();
1594
- this._dataSourceChanges.next(undefined);
1595
- this._dataSourceChanges.complete();
1596
- this.viewChange.complete();
1597
- this._destroyed.next();
1598
- this._destroyed.complete();
1599
- this._viewRepeater.detach();
1600
- };
1601
- /** React to scroll state changes in the viewport. */
1602
- CdkVirtualForOf.prototype._onRenderedDataChange = function () {
1603
- var _this = this;
1604
- if (!this._renderedRange) {
1605
- return;
1606
- }
1607
- this._renderedItems = this._data.slice(this._renderedRange.start, this._renderedRange.end);
1608
- if (!this._differ) {
1609
- // Use a wrapper function for the `trackBy` so any new values are
1610
- // picked up automatically without having to recreate the differ.
1611
- this._differ = this._differs.find(this._renderedItems).create(function (index, item) {
1612
- return _this.cdkVirtualForTrackBy ? _this.cdkVirtualForTrackBy(index, item) : item;
1613
- });
1614
- }
1615
- this._needsUpdate = true;
1616
- };
1617
- /** Swap out one `DataSource` for another. */
1618
- CdkVirtualForOf.prototype._changeDataSource = function (oldDs, newDs) {
1619
- if (oldDs) {
1620
- oldDs.disconnect(this);
1621
- }
1622
- this._needsUpdate = true;
1623
- return newDs ? newDs.connect(this) : rxjs.of();
1624
- };
1625
- /** Update the `CdkVirtualForOfContext` for all views. */
1626
- CdkVirtualForOf.prototype._updateContext = function () {
1627
- var count = this._data.length;
1628
- var i = this._viewContainerRef.length;
1629
- while (i--) {
1630
- var view = this._viewContainerRef.get(i);
1631
- view.context.index = this._renderedRange.start + i;
1632
- view.context.count = count;
1633
- this._updateComputedContextProperties(view.context);
1634
- view.detectChanges();
1635
- }
1636
- };
1637
- /** Apply changes to the DOM. */
1638
- CdkVirtualForOf.prototype._applyChanges = function (changes) {
1639
- var _this = this;
1640
- this._viewRepeater.applyChanges(changes, this._viewContainerRef, function (record, _adjustedPreviousIndex, currentIndex) { return _this._getEmbeddedViewArgs(record, currentIndex); }, function (record) { return record.item; });
1641
- // Update $implicit for any items that had an identity change.
1642
- changes.forEachIdentityChange(function (record) {
1643
- var view = _this._viewContainerRef.get(record.currentIndex);
1644
- view.context.$implicit = record.item;
1645
- });
1646
- // Update the context variables on all items.
1647
- var count = this._data.length;
1648
- var i = this._viewContainerRef.length;
1649
- while (i--) {
1650
- var view = this._viewContainerRef.get(i);
1651
- view.context.index = this._renderedRange.start + i;
1652
- view.context.count = count;
1653
- this._updateComputedContextProperties(view.context);
1654
- }
1655
- };
1656
- /** Update the computed properties on the `CdkVirtualForOfContext`. */
1657
- CdkVirtualForOf.prototype._updateComputedContextProperties = function (context) {
1658
- context.first = context.index === 0;
1659
- context.last = context.index === context.count - 1;
1660
- context.even = context.index % 2 === 0;
1661
- context.odd = !context.even;
1662
- };
1663
- CdkVirtualForOf.prototype._getEmbeddedViewArgs = function (record, index) {
1664
- // Note that it's important that we insert the item directly at the proper index,
1665
- // rather than inserting it and the moving it in place, because if there's a directive
1666
- // on the same node that injects the `ViewContainerRef`, Angular will insert another
1667
- // comment node which can throw off the move when it's being repeated for all items.
1668
- return {
1669
- templateRef: this._template,
1670
- context: {
1671
- $implicit: record.item,
1672
- // It's guaranteed that the iterable is not "undefined" or "null" because we only
1673
- // generate views for elements if the "cdkVirtualForOf" iterable has elements.
1674
- cdkVirtualForOf: this._cdkVirtualForOf,
1675
- index: -1,
1676
- count: -1,
1677
- first: false,
1678
- last: false,
1679
- odd: false,
1680
- even: false
1681
- },
1682
- index: index,
1683
- };
1684
- };
1685
- return CdkVirtualForOf;
1686
- }());
1687
- CdkVirtualForOf.decorators = [
1688
- { type: i0.Directive, args: [{
1689
- selector: '[cdkVirtualFor][cdkVirtualForOf]',
1690
- providers: [
1691
- { provide: collections._VIEW_REPEATER_STRATEGY, useClass: collections._RecycleViewRepeaterStrategy },
1692
- ]
1693
- },] }
1694
- ];
1695
- CdkVirtualForOf.ctorParameters = function () { return [
1696
- { type: i0.ViewContainerRef },
1697
- { type: i0.TemplateRef },
1698
- { type: i0.IterableDiffers },
1699
- { type: collections._RecycleViewRepeaterStrategy, decorators: [{ type: i0.Inject, args: [collections._VIEW_REPEATER_STRATEGY,] }] },
1700
- { type: CdkVirtualScrollViewport, decorators: [{ type: i0.SkipSelf }] },
1701
- { type: i0.NgZone }
1702
- ]; };
1703
- CdkVirtualForOf.propDecorators = {
1704
- cdkVirtualForOf: [{ type: i0.Input }],
1705
- cdkVirtualForTrackBy: [{ type: i0.Input }],
1706
- cdkVirtualForTemplate: [{ type: i0.Input }],
1707
- cdkVirtualForTemplateCacheSize: [{ type: i0.Input }]
1708
- };
1709
-
1710
- /**
1711
- * @license
1712
- * Copyright Google LLC All Rights Reserved.
1713
- *
1714
- * Use of this source code is governed by an MIT-style license that can be
1715
- * found in the LICENSE file at https://angular.io/license
1716
- */
1717
- var CdkScrollableModule = /** @class */ (function () {
1718
- function CdkScrollableModule() {
1719
- }
1720
- return CdkScrollableModule;
1721
- }());
1722
- CdkScrollableModule.decorators = [
1723
- { type: i0.NgModule, args: [{
1724
- exports: [CdkScrollable],
1725
- declarations: [CdkScrollable]
1726
- },] }
1727
- ];
1728
- /**
1729
- * @docs-primary-export
1730
- */
1731
- var ScrollingModule = /** @class */ (function () {
1732
- function ScrollingModule() {
1733
- }
1734
- return ScrollingModule;
1735
- }());
1736
- ScrollingModule.decorators = [
1737
- { type: i0.NgModule, args: [{
1738
- imports: [
1739
- bidi.BidiModule,
1740
- i1.PlatformModule,
1741
- CdkScrollableModule
1742
- ],
1743
- exports: [
1744
- bidi.BidiModule,
1745
- CdkScrollableModule,
1746
- CdkFixedSizeVirtualScroll,
1747
- CdkVirtualForOf,
1748
- CdkVirtualScrollViewport,
1749
- ],
1750
- declarations: [
1751
- CdkFixedSizeVirtualScroll,
1752
- CdkVirtualForOf,
1753
- CdkVirtualScrollViewport,
1754
- ],
1755
- },] }
1756
- ];
1757
-
1758
- /**
1759
- * @license
1760
- * Copyright Google LLC All Rights Reserved.
1761
- *
1762
- * Use of this source code is governed by an MIT-style license that can be
1763
- * found in the LICENSE file at https://angular.io/license
1764
- */
1765
-
1766
- /**
1767
- * Generated bundle index. Do not edit.
1768
- */
1769
-
1770
- exports.CdkFixedSizeVirtualScroll = CdkFixedSizeVirtualScroll;
1771
- exports.CdkScrollable = CdkScrollable;
1772
- exports.CdkScrollableModule = CdkScrollableModule;
1773
- exports.CdkVirtualForOf = CdkVirtualForOf;
1774
- exports.CdkVirtualScrollViewport = CdkVirtualScrollViewport;
1775
- exports.DEFAULT_RESIZE_TIME = DEFAULT_RESIZE_TIME;
1776
- exports.DEFAULT_SCROLL_TIME = DEFAULT_SCROLL_TIME;
1777
- exports.FixedSizeVirtualScrollStrategy = FixedSizeVirtualScrollStrategy;
1778
- exports.ScrollDispatcher = ScrollDispatcher;
1779
- exports.ScrollingModule = ScrollingModule;
1780
- exports.VIRTUAL_SCROLL_STRATEGY = VIRTUAL_SCROLL_STRATEGY;
1781
- exports.ViewportRuler = ViewportRuler;
1782
- exports._fixedSizeVirtualScrollStrategyFactory = _fixedSizeVirtualScrollStrategyFactory;
1783
-
1784
- Object.defineProperty(exports, '__esModule', { value: true });
1785
-
1786
- })));
1787
- //# sourceMappingURL=cdk-scrolling.umd.js.map