@angular/cdk 16.0.0-next.4 → 16.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/a11y/index.d.ts +2 -2
  2. package/accordion/index.d.ts +2 -2
  3. package/bidi/index.d.ts +1 -1
  4. package/clipboard/index.d.ts +1 -1
  5. package/drag-drop/index.d.ts +6 -6
  6. package/{esm2020 → esm2022}/a11y/a11y-module.mjs +5 -5
  7. package/{esm2020 → esm2022}/a11y/aria-describer/aria-describer.mjs +4 -4
  8. package/{esm2020 → esm2022}/a11y/focus-monitor/focus-monitor.mjs +7 -7
  9. package/{esm2020 → esm2022}/a11y/focus-trap/configurable-focus-trap-factory.mjs +4 -4
  10. package/{esm2020 → esm2022}/a11y/focus-trap/focus-trap-manager.mjs +4 -4
  11. package/{esm2020 → esm2022}/a11y/focus-trap/focus-trap.mjs +7 -7
  12. package/{esm2020 → esm2022}/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +4 -4
  13. package/{esm2020 → esm2022}/a11y/input-modality/input-modality-detector.mjs +4 -4
  14. package/{esm2020 → esm2022}/a11y/interactivity-checker/interactivity-checker.mjs +4 -4
  15. package/{esm2020 → esm2022}/a11y/live-announcer/live-announcer.mjs +7 -7
  16. package/{esm2020 → esm2022}/accordion/accordion-item.mjs +8 -8
  17. package/{esm2020 → esm2022}/accordion/accordion-module.mjs +5 -5
  18. package/{esm2020 → esm2022}/accordion/accordion.mjs +4 -4
  19. package/{esm2020 → esm2022}/bidi/bidi-module.mjs +5 -5
  20. package/{esm2020 → esm2022}/bidi/dir.mjs +4 -4
  21. package/{esm2020 → esm2022}/bidi/directionality.mjs +4 -4
  22. package/{esm2020 → esm2022}/clipboard/clipboard-module.mjs +5 -5
  23. package/{esm2020 → esm2022}/clipboard/clipboard.mjs +4 -4
  24. package/{esm2020 → esm2022}/clipboard/copy-to-clipboard.mjs +4 -4
  25. package/{esm2020 → esm2022}/collections/unique-selection-dispatcher.mjs +4 -4
  26. package/{esm2020 → esm2022}/dialog/dialog-container.mjs +4 -4
  27. package/{esm2020 → esm2022}/dialog/dialog-module.mjs +12 -12
  28. package/{esm2020 → esm2022}/dialog/dialog.mjs +4 -4
  29. package/{esm2020 → esm2022}/drag-drop/directives/drag-handle.mjs +4 -4
  30. package/{esm2020 → esm2022}/drag-drop/directives/drag-placeholder.mjs +4 -4
  31. package/{esm2020 → esm2022}/drag-drop/directives/drag-preview.mjs +4 -4
  32. package/esm2022/drag-drop/directives/drag.mjs +489 -0
  33. package/{esm2020 → esm2022}/drag-drop/directives/drop-list-group.mjs +4 -4
  34. package/esm2022/drag-drop/directives/drop-list.mjs +348 -0
  35. package/{esm2020 → esm2022}/drag-drop/drag-drop-module.mjs +15 -15
  36. package/{esm2020 → esm2022}/drag-drop/drag-drop-registry.mjs +4 -4
  37. package/{esm2020 → esm2022}/drag-drop/drag-drop.mjs +4 -4
  38. package/{esm2020 → esm2022}/layout/breakpoints-observer.mjs +4 -4
  39. package/{esm2020 → esm2022}/layout/layout-module.mjs +5 -5
  40. package/{esm2020 → esm2022}/layout/media-matcher.mjs +4 -4
  41. package/{esm2020 → esm2022}/listbox/listbox-module.mjs +5 -5
  42. package/{esm2020 → esm2022}/listbox/listbox.mjs +13 -13
  43. package/{esm2020 → esm2022}/menu/context-menu-trigger.mjs +10 -10
  44. package/{esm2020 → esm2022}/menu/menu-aim.mjs +7 -7
  45. package/{esm2020 → esm2022}/menu/menu-bar.mjs +8 -8
  46. package/{esm2020 → esm2022}/menu/menu-base.mjs +4 -4
  47. package/{esm2020 → esm2022}/menu/menu-group.mjs +4 -4
  48. package/{esm2020 → esm2022}/menu/menu-item-checkbox.mjs +7 -7
  49. package/{esm2020 → esm2022}/menu/menu-item-radio.mjs +7 -7
  50. package/{esm2020 → esm2022}/menu/menu-item-selectable.mjs +4 -4
  51. package/{esm2020 → esm2022}/menu/menu-item.mjs +4 -4
  52. package/{esm2020 → esm2022}/menu/menu-module.mjs +21 -21
  53. package/{esm2020 → esm2022}/menu/menu-stack.mjs +4 -4
  54. package/{esm2020 → esm2022}/menu/menu-trigger-base.mjs +4 -4
  55. package/esm2022/menu/menu-trigger.mjs +307 -0
  56. package/{esm2020 → esm2022}/menu/menu.mjs +8 -8
  57. package/{esm2020 → esm2022}/observers/observe-content.mjs +14 -14
  58. package/{esm2020 → esm2022}/overlay/dispatchers/base-overlay-dispatcher.mjs +4 -4
  59. package/{esm2020 → esm2022}/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +4 -4
  60. package/{esm2020 → esm2022}/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +4 -4
  61. package/{esm2020 → esm2022}/overlay/fullscreen-overlay-container.mjs +4 -4
  62. package/{esm2020 → esm2022}/overlay/overlay-container.mjs +4 -4
  63. package/{esm2020 → esm2022}/overlay/overlay-directives.mjs +7 -7
  64. package/{esm2020 → esm2022}/overlay/overlay-module.mjs +5 -5
  65. package/{esm2020 → esm2022}/overlay/overlay.mjs +4 -4
  66. package/{esm2020 → esm2022}/overlay/position/overlay-position-builder.mjs +4 -4
  67. package/{esm2020 → esm2022}/overlay/scroll/scroll-strategy-options.mjs +4 -4
  68. package/{esm2020 → esm2022}/platform/platform-module.mjs +5 -5
  69. package/{esm2020 → esm2022}/platform/platform.mjs +4 -4
  70. package/esm2022/portal/portal-directives.mjs +250 -0
  71. package/{esm2020 → esm2022}/scrolling/fixed-size-virtual-scroll.mjs +10 -10
  72. package/{esm2020 → esm2022}/scrolling/scroll-dispatcher.mjs +4 -4
  73. package/{esm2020 → esm2022}/scrolling/scrollable.mjs +4 -4
  74. package/{esm2020 → esm2022}/scrolling/scrolling-module.mjs +19 -19
  75. package/{esm2020 → esm2022}/scrolling/viewport-ruler.mjs +4 -4
  76. package/{esm2020 → esm2022}/scrolling/virtual-for-of.mjs +4 -4
  77. package/{esm2020 → esm2022}/scrolling/virtual-scroll-viewport.mjs +10 -10
  78. package/{esm2020 → esm2022}/scrolling/virtual-scrollable-element.mjs +4 -4
  79. package/{esm2020 → esm2022}/scrolling/virtual-scrollable-window.mjs +4 -4
  80. package/{esm2020 → esm2022}/scrolling/virtual-scrollable.mjs +4 -4
  81. package/{esm2020 → esm2022}/stepper/step-header.mjs +4 -4
  82. package/{esm2020 → esm2022}/stepper/step-label.mjs +4 -4
  83. package/{esm2020 → esm2022}/stepper/stepper-button.mjs +7 -7
  84. package/{esm2020 → esm2022}/stepper/stepper-module.mjs +10 -10
  85. package/{esm2020 → esm2022}/stepper/stepper.mjs +7 -7
  86. package/{esm2020 → esm2022}/table/cell.mjs +22 -22
  87. package/{esm2020 → esm2022}/table/coalesced-style-scheduler.mjs +4 -4
  88. package/esm2022/table/row.mjs +271 -0
  89. package/{esm2020 → esm2022}/table/table-module.mjs +47 -47
  90. package/{esm2020 → esm2022}/table/table.mjs +25 -25
  91. package/{esm2020 → esm2022}/table/text-column.mjs +6 -6
  92. package/{esm2020 → esm2022}/text-field/autofill.mjs +7 -7
  93. package/{esm2020 → esm2022}/text-field/autosize.mjs +4 -4
  94. package/{esm2020 → esm2022}/text-field/text-field-module.mjs +5 -5
  95. package/{esm2020 → esm2022}/tree/nested-node.mjs +7 -7
  96. package/{esm2020 → esm2022}/tree/node.mjs +4 -4
  97. package/{esm2020 → esm2022}/tree/outlet.mjs +4 -4
  98. package/{esm2020 → esm2022}/tree/padding.mjs +4 -4
  99. package/{esm2020 → esm2022}/tree/toggle.mjs +4 -4
  100. package/{esm2020 → esm2022}/tree/tree-module.mjs +17 -17
  101. package/esm2022/tree/tree.mjs +349 -0
  102. package/{esm2020 → esm2022}/version.mjs +1 -1
  103. package/{fesm2020 → fesm2022}/a11y.mjs +40 -197
  104. package/fesm2022/a11y.mjs.map +1 -0
  105. package/{fesm2020 → fesm2022}/accordion.mjs +14 -51
  106. package/fesm2022/accordion.mjs.map +1 -0
  107. package/{fesm2020 → fesm2022}/bidi.mjs +10 -54
  108. package/fesm2022/bidi.mjs.map +1 -0
  109. package/fesm2022/cdk.mjs +7 -0
  110. package/fesm2022/cdk.mjs.map +1 -0
  111. package/{fesm2020 → fesm2022}/clipboard.mjs +10 -54
  112. package/fesm2022/clipboard.mjs.map +1 -0
  113. package/{fesm2015 → fesm2022}/coercion.mjs +0 -58
  114. package/fesm2022/coercion.mjs.map +1 -0
  115. package/{fesm2015 → fesm2022}/collections.mjs +5 -70
  116. package/fesm2022/collections.mjs.map +1 -0
  117. package/{fesm2020 → fesm2022}/dialog.mjs +17 -75
  118. package/fesm2022/dialog.mjs.map +1 -0
  119. package/{fesm2020 → fesm2022}/drag-drop.mjs +45 -216
  120. package/fesm2022/drag-drop.mjs.map +1 -0
  121. package/{fesm2020 → fesm2022}/keycodes.mjs +0 -30
  122. package/fesm2022/keycodes.mjs.map +1 -0
  123. package/{fesm2015 → fesm2022}/layout.mjs +10 -54
  124. package/fesm2022/layout.mjs.map +1 -0
  125. package/{fesm2020 → fesm2022}/listbox.mjs +16 -46
  126. package/fesm2022/listbox.mjs.map +1 -0
  127. package/{fesm2020 → fesm2022}/menu.mjs +86 -220
  128. package/fesm2022/menu.mjs.map +1 -0
  129. package/{fesm2020 → fesm2022}/observers.mjs +13 -36
  130. package/fesm2022/observers.mjs.map +1 -0
  131. package/{fesm2020 → fesm2022}/overlay.mjs +34 -206
  132. package/fesm2022/overlay.mjs.map +1 -0
  133. package/{fesm2020 → fesm2022}/platform.mjs +7 -72
  134. package/fesm2022/platform.mjs.map +1 -0
  135. package/{fesm2020 → fesm2022}/portal.mjs +26 -77
  136. package/fesm2022/portal.mjs.map +1 -0
  137. package/{fesm2020 → fesm2022}/scrolling.mjs +57 -158
  138. package/fesm2022/scrolling.mjs.map +1 -0
  139. package/{fesm2020 → fesm2022}/stepper.mjs +27 -78
  140. package/fesm2022/stepper.mjs.map +1 -0
  141. package/{fesm2020 → fesm2022}/table.mjs +134 -227
  142. package/fesm2022/table.mjs.map +1 -0
  143. package/{fesm2020 → fesm2022}/testing/selenium-webdriver.mjs +0 -37
  144. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -0
  145. package/{fesm2020 → fesm2022}/testing/testbed.mjs +1 -72
  146. package/fesm2022/testing/testbed.mjs.map +1 -0
  147. package/{fesm2020 → fesm2022}/testing.mjs +0 -66
  148. package/fesm2022/testing.mjs.map +1 -0
  149. package/{fesm2020 → fesm2022}/text-field.mjs +13 -50
  150. package/fesm2022/text-field.mjs.map +1 -0
  151. package/{fesm2020 → fesm2022}/tree.mjs +45 -131
  152. package/fesm2022/tree.mjs.map +1 -0
  153. package/listbox/index.d.ts +2 -2
  154. package/menu/index.d.ts +5 -5
  155. package/observers/index.d.ts +1 -1
  156. package/overlay/index.d.ts +1 -1
  157. package/package.json +77 -131
  158. package/portal/index.d.ts +2 -2
  159. package/schematics/ng-add/index.js +1 -1
  160. package/schematics/ng-add/index.mjs +1 -1
  161. package/schematics/ng-update/devkit-file-system.js +3 -2
  162. package/schematics/ng-update/devkit-file-system.mjs +3 -2
  163. package/schematics/ng-update/migrations/attribute-selectors.js +5 -8
  164. package/schematics/ng-update/migrations/attribute-selectors.mjs +5 -8
  165. package/schematics/ng-update/migrations/class-inheritance.js +8 -11
  166. package/schematics/ng-update/migrations/class-inheritance.mjs +8 -11
  167. package/schematics/ng-update/migrations/class-names.js +12 -15
  168. package/schematics/ng-update/migrations/class-names.mjs +12 -15
  169. package/schematics/ng-update/migrations/constructor-signature.js +7 -10
  170. package/schematics/ng-update/migrations/constructor-signature.mjs +7 -10
  171. package/schematics/ng-update/migrations/css-selectors.js +5 -8
  172. package/schematics/ng-update/migrations/css-selectors.mjs +5 -8
  173. package/schematics/ng-update/migrations/element-selectors.js +5 -8
  174. package/schematics/ng-update/migrations/element-selectors.mjs +5 -8
  175. package/schematics/ng-update/migrations/input-names.js +5 -8
  176. package/schematics/ng-update/migrations/input-names.mjs +5 -8
  177. package/schematics/ng-update/migrations/method-call-arguments.js +5 -8
  178. package/schematics/ng-update/migrations/method-call-arguments.mjs +5 -8
  179. package/schematics/ng-update/migrations/misc-template.js +3 -6
  180. package/schematics/ng-update/migrations/misc-template.mjs +3 -6
  181. package/schematics/ng-update/migrations/output-names.js +5 -8
  182. package/schematics/ng-update/migrations/output-names.mjs +5 -8
  183. package/schematics/ng-update/migrations/property-names.js +5 -8
  184. package/schematics/ng-update/migrations/property-names.mjs +5 -8
  185. package/schematics/ng-update/migrations/symbol-removal.js +5 -8
  186. package/schematics/ng-update/migrations/symbol-removal.mjs +5 -8
  187. package/schematics/update-tool/component-resource-collector.js +5 -3
  188. package/schematics/update-tool/component-resource-collector.mjs +5 -3
  189. package/schematics/update-tool/index.js +8 -2
  190. package/schematics/update-tool/index.mjs +8 -2
  191. package/schematics/update-tool/migration.js +10 -3
  192. package/schematics/update-tool/migration.mjs +10 -3
  193. package/schematics/update-tool/utils/virtual-host.js +3 -2
  194. package/schematics/update-tool/utils/virtual-host.mjs +3 -2
  195. package/scrolling/index.d.ts +3 -3
  196. package/stepper/index.d.ts +4 -4
  197. package/table/index.d.ts +6 -6
  198. package/text-field/index.d.ts +1 -1
  199. package/tree/index.d.ts +6 -6
  200. package/esm2020/drag-drop/directives/drag.mjs +0 -489
  201. package/esm2020/drag-drop/directives/drop-list.mjs +0 -348
  202. package/esm2020/menu/menu-trigger.mjs +0 -306
  203. package/esm2020/portal/portal-directives.mjs +0 -250
  204. package/esm2020/table/row.mjs +0 -271
  205. package/esm2020/tree/tree.mjs +0 -349
  206. package/fesm2015/a11y.mjs +0 -2544
  207. package/fesm2015/a11y.mjs.map +0 -1
  208. package/fesm2015/accordion.mjs +0 -275
  209. package/fesm2015/accordion.mjs.map +0 -1
  210. package/fesm2015/bidi.mjs +0 -194
  211. package/fesm2015/bidi.mjs.map +0 -1
  212. package/fesm2015/cdk.mjs +0 -30
  213. package/fesm2015/cdk.mjs.map +0 -1
  214. package/fesm2015/clipboard.mjs +0 -263
  215. package/fesm2015/clipboard.mjs.map +0 -1
  216. package/fesm2015/coercion.mjs.map +0 -1
  217. package/fesm2015/collections.mjs.map +0 -1
  218. package/fesm2015/dialog.mjs +0 -800
  219. package/fesm2015/dialog.mjs.map +0 -1
  220. package/fesm2015/drag-drop.mjs +0 -3823
  221. package/fesm2015/drag-drop.mjs.map +0 -1
  222. package/fesm2015/keycodes.mjs +0 -167
  223. package/fesm2015/keycodes.mjs.map +0 -1
  224. package/fesm2015/layout.mjs.map +0 -1
  225. package/fesm2015/listbox.mjs +0 -918
  226. package/fesm2015/listbox.mjs.map +0 -1
  227. package/fesm2015/menu.mjs +0 -2009
  228. package/fesm2015/menu.mjs.map +0 -1
  229. package/fesm2015/observers.mjs +0 -211
  230. package/fesm2015/observers.mjs.map +0 -1
  231. package/fesm2015/overlay.mjs +0 -3142
  232. package/fesm2015/overlay.mjs.map +0 -1
  233. package/fesm2015/platform.mjs +0 -385
  234. package/fesm2015/platform.mjs.map +0 -1
  235. package/fesm2015/portal.mjs +0 -691
  236. package/fesm2015/portal.mjs.map +0 -1
  237. package/fesm2015/scrolling.mjs +0 -1566
  238. package/fesm2015/scrolling.mjs.map +0 -1
  239. package/fesm2015/stepper.mjs +0 -621
  240. package/fesm2015/stepper.mjs.map +0 -1
  241. package/fesm2015/table.mjs +0 -2357
  242. package/fesm2015/table.mjs.map +0 -1
  243. package/fesm2015/testing/selenium-webdriver.mjs +0 -419
  244. package/fesm2015/testing/selenium-webdriver.mjs.map +0 -1
  245. package/fesm2015/testing/testbed.mjs +0 -868
  246. package/fesm2015/testing/testbed.mjs.map +0 -1
  247. package/fesm2015/testing.mjs +0 -785
  248. package/fesm2015/testing.mjs.map +0 -1
  249. package/fesm2015/text-field.mjs +0 -461
  250. package/fesm2015/text-field.mjs.map +0 -1
  251. package/fesm2015/tree.mjs +0 -950
  252. package/fesm2015/tree.mjs.map +0 -1
  253. package/fesm2020/a11y.mjs.map +0 -1
  254. package/fesm2020/accordion.mjs.map +0 -1
  255. package/fesm2020/bidi.mjs.map +0 -1
  256. package/fesm2020/cdk.mjs +0 -30
  257. package/fesm2020/cdk.mjs.map +0 -1
  258. package/fesm2020/clipboard.mjs.map +0 -1
  259. package/fesm2020/coercion.mjs +0 -132
  260. package/fesm2020/coercion.mjs.map +0 -1
  261. package/fesm2020/collections.mjs +0 -543
  262. package/fesm2020/collections.mjs.map +0 -1
  263. package/fesm2020/dialog.mjs.map +0 -1
  264. package/fesm2020/drag-drop.mjs.map +0 -1
  265. package/fesm2020/keycodes.mjs.map +0 -1
  266. package/fesm2020/layout.mjs +0 -254
  267. package/fesm2020/layout.mjs.map +0 -1
  268. package/fesm2020/listbox.mjs.map +0 -1
  269. package/fesm2020/menu.mjs.map +0 -1
  270. package/fesm2020/observers.mjs.map +0 -1
  271. package/fesm2020/overlay.mjs.map +0 -1
  272. package/fesm2020/platform.mjs.map +0 -1
  273. package/fesm2020/portal.mjs.map +0 -1
  274. package/fesm2020/scrolling.mjs.map +0 -1
  275. package/fesm2020/stepper.mjs.map +0 -1
  276. package/fesm2020/table.mjs.map +0 -1
  277. package/fesm2020/testing/selenium-webdriver.mjs.map +0 -1
  278. package/fesm2020/testing/testbed.mjs.map +0 -1
  279. package/fesm2020/testing.mjs.map +0 -1
  280. package/fesm2020/text-field.mjs.map +0 -1
  281. package/fesm2020/tree.mjs.map +0 -1
  282. /package/{esm2020 → esm2022}/a11y/a11y_public_index.mjs +0 -0
  283. /package/{esm2020 → esm2022}/a11y/aria-describer/aria-reference.mjs +0 -0
  284. /package/{esm2020 → esm2022}/a11y/fake-event-detection.mjs +0 -0
  285. /package/{esm2020 → esm2022}/a11y/focus-trap/configurable-focus-trap-config.mjs +0 -0
  286. /package/{esm2020 → esm2022}/a11y/focus-trap/configurable-focus-trap.mjs +0 -0
  287. /package/{esm2020 → esm2022}/a11y/focus-trap/event-listener-inert-strategy.mjs +0 -0
  288. /package/{esm2020 → esm2022}/a11y/focus-trap/focus-trap-inert-strategy.mjs +0 -0
  289. /package/{esm2020 → esm2022}/a11y/index.mjs +0 -0
  290. /package/{esm2020 → esm2022}/a11y/key-manager/activedescendant-key-manager.mjs +0 -0
  291. /package/{esm2020 → esm2022}/a11y/key-manager/focus-key-manager.mjs +0 -0
  292. /package/{esm2020 → esm2022}/a11y/key-manager/list-key-manager.mjs +0 -0
  293. /package/{esm2020 → esm2022}/a11y/live-announcer/live-announcer-tokens.mjs +0 -0
  294. /package/{esm2020 → esm2022}/a11y/public-api.mjs +0 -0
  295. /package/{esm2020 → esm2022}/accordion/accordion_public_index.mjs +0 -0
  296. /package/{esm2020 → esm2022}/accordion/index.mjs +0 -0
  297. /package/{esm2020 → esm2022}/accordion/public-api.mjs +0 -0
  298. /package/{esm2020 → esm2022}/bidi/bidi_public_index.mjs +0 -0
  299. /package/{esm2020 → esm2022}/bidi/dir-document-token.mjs +0 -0
  300. /package/{esm2020 → esm2022}/bidi/index.mjs +0 -0
  301. /package/{esm2020 → esm2022}/bidi/public-api.mjs +0 -0
  302. /package/{esm2020 → esm2022}/clipboard/clipboard_public_index.mjs +0 -0
  303. /package/{esm2020 → esm2022}/clipboard/index.mjs +0 -0
  304. /package/{esm2020 → esm2022}/clipboard/pending-copy.mjs +0 -0
  305. /package/{esm2020 → esm2022}/clipboard/public-api.mjs +0 -0
  306. /package/{esm2020 → esm2022}/coercion/array.mjs +0 -0
  307. /package/{esm2020 → esm2022}/coercion/boolean-property.mjs +0 -0
  308. /package/{esm2020 → esm2022}/coercion/css-pixel-value.mjs +0 -0
  309. /package/{esm2020 → esm2022}/coercion/element.mjs +0 -0
  310. /package/{esm2020 → esm2022}/coercion/index.mjs +0 -0
  311. /package/{esm2020 → esm2022}/coercion/number-property.mjs +0 -0
  312. /package/{esm2020 → esm2022}/coercion/public-api.mjs +0 -0
  313. /package/{esm2020 → esm2022}/coercion/string-array.mjs +0 -0
  314. /package/{esm2020 → esm2022}/collections/array-data-source.mjs +0 -0
  315. /package/{esm2020 → esm2022}/collections/collection-viewer.mjs +0 -0
  316. /package/{esm2020 → esm2022}/collections/collections_public_index.mjs +0 -0
  317. /package/{esm2020 → esm2022}/collections/data-source.mjs +0 -0
  318. /package/{esm2020 → esm2022}/collections/dispose-view-repeater-strategy.mjs +0 -0
  319. /package/{esm2020 → esm2022}/collections/index.mjs +0 -0
  320. /package/{esm2020 → esm2022}/collections/public-api.mjs +0 -0
  321. /package/{esm2020 → esm2022}/collections/recycle-view-repeater-strategy.mjs +0 -0
  322. /package/{esm2020 → esm2022}/collections/selection-model.mjs +0 -0
  323. /package/{esm2020 → esm2022}/collections/tree-adapter.mjs +0 -0
  324. /package/{esm2020 → esm2022}/collections/view-repeater.mjs +0 -0
  325. /package/{esm2020 → esm2022}/dialog/dialog-config.mjs +0 -0
  326. /package/{esm2020 → esm2022}/dialog/dialog-injectors.mjs +0 -0
  327. /package/{esm2020 → esm2022}/dialog/dialog-ref.mjs +0 -0
  328. /package/{esm2020 → esm2022}/dialog/dialog_public_index.mjs +0 -0
  329. /package/{esm2020 → esm2022}/dialog/index.mjs +0 -0
  330. /package/{esm2020 → esm2022}/dialog/public-api.mjs +0 -0
  331. /package/{esm2020 → esm2022}/drag-drop/directives/assertions.mjs +0 -0
  332. /package/{esm2020 → esm2022}/drag-drop/directives/config.mjs +0 -0
  333. /package/{esm2020 → esm2022}/drag-drop/dom/client-rect.mjs +0 -0
  334. /package/{esm2020 → esm2022}/drag-drop/dom/clone-node.mjs +0 -0
  335. /package/{esm2020 → esm2022}/drag-drop/dom/parent-position-tracker.mjs +0 -0
  336. /package/{esm2020 → esm2022}/drag-drop/dom/styling.mjs +0 -0
  337. /package/{esm2020 → esm2022}/drag-drop/dom/transition-duration.mjs +0 -0
  338. /package/{esm2020 → esm2022}/drag-drop/drag-drop_public_index.mjs +0 -0
  339. /package/{esm2020 → esm2022}/drag-drop/drag-events.mjs +0 -0
  340. /package/{esm2020 → esm2022}/drag-drop/drag-parent.mjs +0 -0
  341. /package/{esm2020 → esm2022}/drag-drop/drag-ref.mjs +0 -0
  342. /package/{esm2020 → esm2022}/drag-drop/drag-utils.mjs +0 -0
  343. /package/{esm2020 → esm2022}/drag-drop/drop-list-ref.mjs +0 -0
  344. /package/{esm2020 → esm2022}/drag-drop/index.mjs +0 -0
  345. /package/{esm2020 → esm2022}/drag-drop/public-api.mjs +0 -0
  346. /package/{esm2020 → esm2022}/drag-drop/sorting/drop-list-sort-strategy.mjs +0 -0
  347. /package/{esm2020 → esm2022}/drag-drop/sorting/single-axis-sort-strategy.mjs +0 -0
  348. /package/{esm2020 → esm2022}/index.mjs +0 -0
  349. /package/{esm2020 → esm2022}/keycodes/index.mjs +0 -0
  350. /package/{esm2020 → esm2022}/keycodes/keycodes.mjs +0 -0
  351. /package/{esm2020 → esm2022}/keycodes/keycodes_public_index.mjs +0 -0
  352. /package/{esm2020 → esm2022}/keycodes/modifiers.mjs +0 -0
  353. /package/{esm2020 → esm2022}/keycodes/public-api.mjs +0 -0
  354. /package/{esm2020 → esm2022}/layout/breakpoints.mjs +0 -0
  355. /package/{esm2020 → esm2022}/layout/index.mjs +0 -0
  356. /package/{esm2020 → esm2022}/layout/layout_public_index.mjs +0 -0
  357. /package/{esm2020 → esm2022}/layout/public-api.mjs +0 -0
  358. /package/{esm2020 → esm2022}/listbox/index.mjs +0 -0
  359. /package/{esm2020 → esm2022}/listbox/listbox_public_index.mjs +0 -0
  360. /package/{esm2020 → esm2022}/listbox/public-api.mjs +0 -0
  361. /package/{esm2020 → esm2022}/menu/index.mjs +0 -0
  362. /package/{esm2020 → esm2022}/menu/menu-errors.mjs +0 -0
  363. /package/{esm2020 → esm2022}/menu/menu-interface.mjs +0 -0
  364. /package/{esm2020 → esm2022}/menu/menu_public_index.mjs +0 -0
  365. /package/{esm2020 → esm2022}/menu/pointer-focus-tracker.mjs +0 -0
  366. /package/{esm2020 → esm2022}/menu/public-api.mjs +0 -0
  367. /package/{esm2020 → esm2022}/observers/index.mjs +0 -0
  368. /package/{esm2020 → esm2022}/observers/observers_public_index.mjs +0 -0
  369. /package/{esm2020 → esm2022}/observers/public-api.mjs +0 -0
  370. /package/{esm2020 → esm2022}/overlay/dispatchers/index.mjs +0 -0
  371. /package/{esm2020 → esm2022}/overlay/index.mjs +0 -0
  372. /package/{esm2020 → esm2022}/overlay/overlay-config.mjs +0 -0
  373. /package/{esm2020 → esm2022}/overlay/overlay-ref.mjs +0 -0
  374. /package/{esm2020 → esm2022}/overlay/overlay-reference.mjs +0 -0
  375. /package/{esm2020 → esm2022}/overlay/overlay_public_index.mjs +0 -0
  376. /package/{esm2020 → esm2022}/overlay/position/connected-position.mjs +0 -0
  377. /package/{esm2020 → esm2022}/overlay/position/flexible-connected-position-strategy.mjs +0 -0
  378. /package/{esm2020 → esm2022}/overlay/position/global-position-strategy.mjs +0 -0
  379. /package/{esm2020 → esm2022}/overlay/position/position-strategy.mjs +0 -0
  380. /package/{esm2020 → esm2022}/overlay/position/scroll-clip.mjs +0 -0
  381. /package/{esm2020 → esm2022}/overlay/public-api.mjs +0 -0
  382. /package/{esm2020 → esm2022}/overlay/scroll/block-scroll-strategy.mjs +0 -0
  383. /package/{esm2020 → esm2022}/overlay/scroll/close-scroll-strategy.mjs +0 -0
  384. /package/{esm2020 → esm2022}/overlay/scroll/index.mjs +0 -0
  385. /package/{esm2020 → esm2022}/overlay/scroll/noop-scroll-strategy.mjs +0 -0
  386. /package/{esm2020 → esm2022}/overlay/scroll/reposition-scroll-strategy.mjs +0 -0
  387. /package/{esm2020 → esm2022}/overlay/scroll/scroll-strategy.mjs +0 -0
  388. /package/{esm2020 → esm2022}/platform/features/input-types.mjs +0 -0
  389. /package/{esm2020 → esm2022}/platform/features/passive-listeners.mjs +0 -0
  390. /package/{esm2020 → esm2022}/platform/features/scrolling.mjs +0 -0
  391. /package/{esm2020 → esm2022}/platform/features/shadow-dom.mjs +0 -0
  392. /package/{esm2020 → esm2022}/platform/features/test-environment.mjs +0 -0
  393. /package/{esm2020 → esm2022}/platform/index.mjs +0 -0
  394. /package/{esm2020 → esm2022}/platform/platform_public_index.mjs +0 -0
  395. /package/{esm2020 → esm2022}/platform/public-api.mjs +0 -0
  396. /package/{esm2020 → esm2022}/portal/dom-portal-outlet.mjs +0 -0
  397. /package/{esm2020 → esm2022}/portal/index.mjs +0 -0
  398. /package/{esm2020 → esm2022}/portal/portal-errors.mjs +0 -0
  399. /package/{esm2020 → esm2022}/portal/portal-injector.mjs +0 -0
  400. /package/{esm2020 → esm2022}/portal/portal.mjs +0 -0
  401. /package/{esm2020 → esm2022}/portal/portal_public_index.mjs +0 -0
  402. /package/{esm2020 → esm2022}/portal/public-api.mjs +0 -0
  403. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  404. /package/{esm2020 → esm2022}/scrolling/index.mjs +0 -0
  405. /package/{esm2020 → esm2022}/scrolling/public-api.mjs +0 -0
  406. /package/{esm2020 → esm2022}/scrolling/scrolling_public_index.mjs +0 -0
  407. /package/{esm2020 → esm2022}/scrolling/virtual-scroll-repeater.mjs +0 -0
  408. /package/{esm2020 → esm2022}/scrolling/virtual-scroll-strategy.mjs +0 -0
  409. /package/{esm2020 → esm2022}/stepper/index.mjs +0 -0
  410. /package/{esm2020 → esm2022}/stepper/public-api.mjs +0 -0
  411. /package/{esm2020 → esm2022}/stepper/stepper_public_index.mjs +0 -0
  412. /package/{esm2020 → esm2022}/table/can-stick.mjs +0 -0
  413. /package/{esm2020 → esm2022}/table/index.mjs +0 -0
  414. /package/{esm2020 → esm2022}/table/public-api.mjs +0 -0
  415. /package/{esm2020 → esm2022}/table/sticky-position-listener.mjs +0 -0
  416. /package/{esm2020 → esm2022}/table/sticky-styler.mjs +0 -0
  417. /package/{esm2020 → esm2022}/table/table-errors.mjs +0 -0
  418. /package/{esm2020 → esm2022}/table/table_public_index.mjs +0 -0
  419. /package/{esm2020 → esm2022}/table/tokens.mjs +0 -0
  420. /package/{esm2020 → esm2022}/testing/change-detection.mjs +0 -0
  421. /package/{esm2020 → esm2022}/testing/component-harness.mjs +0 -0
  422. /package/{esm2020 → esm2022}/testing/element-dimensions.mjs +0 -0
  423. /package/{esm2020 → esm2022}/testing/harness-environment.mjs +0 -0
  424. /package/{esm2020 → esm2022}/testing/index.mjs +0 -0
  425. /package/{esm2020 → esm2022}/testing/public-api.mjs +0 -0
  426. /package/{esm2020 → esm2022}/testing/selenium-webdriver/index.mjs +0 -0
  427. /package/{esm2020 → esm2022}/testing/selenium-webdriver/public-api.mjs +0 -0
  428. /package/{esm2020 → esm2022}/testing/selenium-webdriver/selenium-web-driver-element.mjs +0 -0
  429. /package/{esm2020 → esm2022}/testing/selenium-webdriver/selenium-web-driver-harness-environment.mjs +0 -0
  430. /package/{esm2020 → esm2022}/testing/selenium-webdriver/selenium-webdriver-keys.mjs +0 -0
  431. /package/{esm2020 → esm2022}/testing/test-element-errors.mjs +0 -0
  432. /package/{esm2020 → esm2022}/testing/test-element.mjs +0 -0
  433. /package/{esm2020 → esm2022}/testing/testbed/fake-events/dispatch-events.mjs +0 -0
  434. /package/{esm2020 → esm2022}/testing/testbed/fake-events/element-focus.mjs +0 -0
  435. /package/{esm2020 → esm2022}/testing/testbed/fake-events/event-objects.mjs +0 -0
  436. /package/{esm2020 → esm2022}/testing/testbed/fake-events/index.mjs +0 -0
  437. /package/{esm2020 → esm2022}/testing/testbed/fake-events/type-in-element.mjs +0 -0
  438. /package/{esm2020 → esm2022}/testing/testbed/index.mjs +0 -0
  439. /package/{esm2020 → esm2022}/testing/testbed/public-api.mjs +0 -0
  440. /package/{esm2020 → esm2022}/testing/testbed/task-state-zone-interceptor.mjs +0 -0
  441. /package/{esm2020 → esm2022}/testing/testbed/testbed-harness-environment.mjs +0 -0
  442. /package/{esm2020 → esm2022}/testing/testbed/unit-test-element.mjs +0 -0
  443. /package/{esm2020 → esm2022}/testing/text-filtering.mjs +0 -0
  444. /package/{esm2020 → esm2022}/text-field/index.mjs +0 -0
  445. /package/{esm2020 → esm2022}/text-field/public-api.mjs +0 -0
  446. /package/{esm2020 → esm2022}/text-field/text-field_public_index.mjs +0 -0
  447. /package/{esm2020 → esm2022}/tree/control/base-tree-control.mjs +0 -0
  448. /package/{esm2020 → esm2022}/tree/control/flat-tree-control.mjs +0 -0
  449. /package/{esm2020 → esm2022}/tree/control/nested-tree-control.mjs +0 -0
  450. /package/{esm2020 → esm2022}/tree/control/tree-control.mjs +0 -0
  451. /package/{esm2020 → esm2022}/tree/index.mjs +0 -0
  452. /package/{esm2020 → esm2022}/tree/public-api.mjs +0 -0
  453. /package/{esm2020 → esm2022}/tree/tree-errors.mjs +0 -0
  454. /package/{esm2020 → esm2022}/tree/tree_public_index.mjs +0 -0
@@ -1,785 +0,0 @@
1
- import { __awaiter } from 'tslib';
2
- import { BehaviorSubject } from 'rxjs';
3
-
4
- /** Subject used to dispatch and listen for changes to the auto change detection status . */
5
- const autoChangeDetectionSubject = new BehaviorSubject({
6
- isDisabled: false,
7
- });
8
- /** The current subscription to `autoChangeDetectionSubject`. */
9
- let autoChangeDetectionSubscription;
10
- /**
11
- * The default handler for auto change detection status changes. This handler will be used if the
12
- * specific environment does not install its own.
13
- * @param status The new auto change detection status.
14
- */
15
- function defaultAutoChangeDetectionHandler(status) {
16
- var _a;
17
- (_a = status.onDetectChangesNow) === null || _a === void 0 ? void 0 : _a.call(status);
18
- }
19
- /**
20
- * Allows a test `HarnessEnvironment` to install its own handler for auto change detection status
21
- * changes.
22
- * @param handler The handler for the auto change detection status.
23
- */
24
- function handleAutoChangeDetectionStatus(handler) {
25
- stopHandlingAutoChangeDetectionStatus();
26
- autoChangeDetectionSubscription = autoChangeDetectionSubject.subscribe(handler);
27
- }
28
- /** Allows a `HarnessEnvironment` to stop handling auto change detection status changes. */
29
- function stopHandlingAutoChangeDetectionStatus() {
30
- autoChangeDetectionSubscription === null || autoChangeDetectionSubscription === void 0 ? void 0 : autoChangeDetectionSubscription.unsubscribe();
31
- autoChangeDetectionSubscription = null;
32
- }
33
- /**
34
- * Batches together triggering of change detection over the duration of the given function.
35
- * @param fn The function to call with batched change detection.
36
- * @param triggerBeforeAndAfter Optionally trigger change detection once before and after the batch
37
- * operation. If false, change detection will not be triggered.
38
- * @return The result of the given function.
39
- */
40
- function batchChangeDetection(fn, triggerBeforeAndAfter) {
41
- return __awaiter(this, void 0, void 0, function* () {
42
- // If change detection batching is already in progress, just run the function.
43
- if (autoChangeDetectionSubject.getValue().isDisabled) {
44
- return yield fn();
45
- }
46
- // If nothing is handling change detection batching, install the default handler.
47
- if (!autoChangeDetectionSubscription) {
48
- handleAutoChangeDetectionStatus(defaultAutoChangeDetectionHandler);
49
- }
50
- if (triggerBeforeAndAfter) {
51
- yield new Promise(resolve => autoChangeDetectionSubject.next({
52
- isDisabled: true,
53
- onDetectChangesNow: resolve,
54
- }));
55
- // The function passed in may throw (e.g. if the user wants to make an expectation of an error
56
- // being thrown. If this happens, we need to make sure we still re-enable change detection, so
57
- // we wrap it in a `finally` block.
58
- try {
59
- return yield fn();
60
- }
61
- finally {
62
- yield new Promise(resolve => autoChangeDetectionSubject.next({
63
- isDisabled: false,
64
- onDetectChangesNow: resolve,
65
- }));
66
- }
67
- }
68
- else {
69
- autoChangeDetectionSubject.next({ isDisabled: true });
70
- // The function passed in may throw (e.g. if the user wants to make an expectation of an error
71
- // being thrown. If this happens, we need to make sure we still re-enable change detection, so
72
- // we wrap it in a `finally` block.
73
- try {
74
- return yield fn();
75
- }
76
- finally {
77
- autoChangeDetectionSubject.next({ isDisabled: false });
78
- }
79
- }
80
- });
81
- }
82
- /**
83
- * Disables the harness system's auto change detection for the duration of the given function.
84
- * @param fn The function to disable auto change detection for.
85
- * @return The result of the given function.
86
- */
87
- function manualChangeDetection(fn) {
88
- return __awaiter(this, void 0, void 0, function* () {
89
- return batchChangeDetection(fn, false);
90
- });
91
- }
92
- /**
93
- * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change
94
- * detection over the entire operation such that change detection occurs exactly once before
95
- * resolving the values and once after.
96
- * @param values A getter for the async values to resolve in parallel with batched change detection.
97
- * @return The resolved values.
98
- */
99
- function parallel(values) {
100
- return __awaiter(this, void 0, void 0, function* () {
101
- return batchChangeDetection(() => Promise.all(values()), true);
102
- });
103
- }
104
-
105
- /**
106
- * Base class for component harnesses that all component harness authors should extend. This base
107
- * component harness provides the basic ability to locate element and sub-component harness. It
108
- * should be inherited when defining user's own harness.
109
- */
110
- class ComponentHarness {
111
- constructor(locatorFactory) {
112
- this.locatorFactory = locatorFactory;
113
- }
114
- /** Gets a `Promise` for the `TestElement` representing the host element of the component. */
115
- host() {
116
- return __awaiter(this, void 0, void 0, function* () {
117
- return this.locatorFactory.rootElement;
118
- });
119
- }
120
- /**
121
- * Gets a `LocatorFactory` for the document root element. This factory can be used to create
122
- * locators for elements that a component creates outside of its own root element. (e.g. by
123
- * appending to document.body).
124
- */
125
- documentRootLocatorFactory() {
126
- return this.locatorFactory.documentRootLocatorFactory();
127
- }
128
- /**
129
- * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance
130
- * or element under the host element of this `ComponentHarness`.
131
- * @param queries A list of queries specifying which harnesses and elements to search for:
132
- * - A `string` searches for elements matching the CSS selector specified by the string.
133
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
134
- * given class.
135
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
136
- * predicate.
137
- * @return An asynchronous locator function that searches for and returns a `Promise` for the
138
- * first element or harness matching the given search criteria. Matches are ordered first by
139
- * order in the DOM, and second by order in the queries list. If no matches are found, the
140
- * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for
141
- * each query.
142
- *
143
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
144
- * `DivHarness.hostSelector === 'div'`:
145
- * - `await ch.locatorFor(DivHarness, 'div')()` gets a `DivHarness` instance for `#d1`
146
- * - `await ch.locatorFor('div', DivHarness)()` gets a `TestElement` instance for `#d1`
147
- * - `await ch.locatorFor('span')()` throws because the `Promise` rejects.
148
- */
149
- locatorFor(...queries) {
150
- return this.locatorFactory.locatorFor(...queries);
151
- }
152
- /**
153
- * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance
154
- * or element under the host element of this `ComponentHarness`.
155
- * @param queries A list of queries specifying which harnesses and elements to search for:
156
- * - A `string` searches for elements matching the CSS selector specified by the string.
157
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
158
- * given class.
159
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
160
- * predicate.
161
- * @return An asynchronous locator function that searches for and returns a `Promise` for the
162
- * first element or harness matching the given search criteria. Matches are ordered first by
163
- * order in the DOM, and second by order in the queries list. If no matches are found, the
164
- * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all
165
- * result types for each query or null.
166
- *
167
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
168
- * `DivHarness.hostSelector === 'div'`:
169
- * - `await ch.locatorForOptional(DivHarness, 'div')()` gets a `DivHarness` instance for `#d1`
170
- * - `await ch.locatorForOptional('div', DivHarness)()` gets a `TestElement` instance for `#d1`
171
- * - `await ch.locatorForOptional('span')()` gets `null`.
172
- */
173
- locatorForOptional(...queries) {
174
- return this.locatorFactory.locatorForOptional(...queries);
175
- }
176
- /**
177
- * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances
178
- * or elements under the host element of this `ComponentHarness`.
179
- * @param queries A list of queries specifying which harnesses and elements to search for:
180
- * - A `string` searches for elements matching the CSS selector specified by the string.
181
- * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the
182
- * given class.
183
- * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given
184
- * predicate.
185
- * @return An asynchronous locator function that searches for and returns a `Promise` for all
186
- * elements and harnesses matching the given search criteria. Matches are ordered first by
187
- * order in the DOM, and second by order in the queries list. If an element matches more than
188
- * one `ComponentHarness` class, the locator gets an instance of each for the same element. If
189
- * an element matches multiple `string` selectors, only one `TestElement` instance is returned
190
- * for that element. The type that the `Promise` resolves to is an array where each element is
191
- * the union of all result types for each query.
192
- *
193
- * e.g. Given the following DOM: `<div id="d1" /><div id="d2" />`, and assuming
194
- * `DivHarness.hostSelector === 'div'` and `IdIsD1Harness.hostSelector === '#d1'`:
195
- * - `await ch.locatorForAll(DivHarness, 'div')()` gets `[
196
- * DivHarness, // for #d1
197
- * TestElement, // for #d1
198
- * DivHarness, // for #d2
199
- * TestElement // for #d2
200
- * ]`
201
- * - `await ch.locatorForAll('div', '#d1')()` gets `[
202
- * TestElement, // for #d1
203
- * TestElement // for #d2
204
- * ]`
205
- * - `await ch.locatorForAll(DivHarness, IdIsD1Harness)()` gets `[
206
- * DivHarness, // for #d1
207
- * IdIsD1Harness, // for #d1
208
- * DivHarness // for #d2
209
- * ]`
210
- * - `await ch.locatorForAll('span')()` gets `[]`.
211
- */
212
- locatorForAll(...queries) {
213
- return this.locatorFactory.locatorForAll(...queries);
214
- }
215
- /**
216
- * Flushes change detection and async tasks in the Angular zone.
217
- * In most cases it should not be necessary to call this manually. However, there may be some edge
218
- * cases where it is needed to fully flush animation events.
219
- */
220
- forceStabilize() {
221
- return __awaiter(this, void 0, void 0, function* () {
222
- return this.locatorFactory.forceStabilize();
223
- });
224
- }
225
- /**
226
- * Waits for all scheduled or running async tasks to complete. This allows harness
227
- * authors to wait for async tasks outside of the Angular zone.
228
- */
229
- waitForTasksOutsideAngular() {
230
- return __awaiter(this, void 0, void 0, function* () {
231
- return this.locatorFactory.waitForTasksOutsideAngular();
232
- });
233
- }
234
- }
235
- /**
236
- * Base class for component harnesses that authors should extend if they anticipate that consumers
237
- * of the harness may want to access other harnesses within the `<ng-content>` of the component.
238
- */
239
- class ContentContainerComponentHarness extends ComponentHarness {
240
- getChildLoader(selector) {
241
- return __awaiter(this, void 0, void 0, function* () {
242
- return (yield this.getRootHarnessLoader()).getChildLoader(selector);
243
- });
244
- }
245
- getAllChildLoaders(selector) {
246
- return __awaiter(this, void 0, void 0, function* () {
247
- return (yield this.getRootHarnessLoader()).getAllChildLoaders(selector);
248
- });
249
- }
250
- getHarness(query) {
251
- return __awaiter(this, void 0, void 0, function* () {
252
- return (yield this.getRootHarnessLoader()).getHarness(query);
253
- });
254
- }
255
- getHarnessOrNull(query) {
256
- return __awaiter(this, void 0, void 0, function* () {
257
- return (yield this.getRootHarnessLoader()).getHarnessOrNull(query);
258
- });
259
- }
260
- getAllHarnesses(query) {
261
- return __awaiter(this, void 0, void 0, function* () {
262
- return (yield this.getRootHarnessLoader()).getAllHarnesses(query);
263
- });
264
- }
265
- hasHarness(query) {
266
- return __awaiter(this, void 0, void 0, function* () {
267
- return (yield this.getRootHarnessLoader()).hasHarness(query);
268
- });
269
- }
270
- /**
271
- * Gets the root harness loader from which to start
272
- * searching for content contained by this harness.
273
- */
274
- getRootHarnessLoader() {
275
- return __awaiter(this, void 0, void 0, function* () {
276
- return this.locatorFactory.rootHarnessLoader();
277
- });
278
- }
279
- }
280
- /**
281
- * A class used to associate a ComponentHarness class with predicates functions that can be used to
282
- * filter instances of the class.
283
- */
284
- class HarnessPredicate {
285
- constructor(harnessType, options) {
286
- this.harnessType = harnessType;
287
- this._predicates = [];
288
- this._descriptions = [];
289
- this._addBaseOptions(options);
290
- }
291
- /**
292
- * Checks if the specified nullable string value matches the given pattern.
293
- * @param value The nullable string value to check, or a Promise resolving to the
294
- * nullable string value.
295
- * @param pattern The pattern the value is expected to match. If `pattern` is a string,
296
- * `value` is expected to match exactly. If `pattern` is a regex, a partial match is
297
- * allowed. If `pattern` is `null`, the value is expected to be `null`.
298
- * @return Whether the value matches the pattern.
299
- */
300
- static stringMatches(value, pattern) {
301
- return __awaiter(this, void 0, void 0, function* () {
302
- value = yield value;
303
- if (pattern === null) {
304
- return value === null;
305
- }
306
- else if (value === null) {
307
- return false;
308
- }
309
- return typeof pattern === 'string' ? value === pattern : pattern.test(value);
310
- });
311
- }
312
- /**
313
- * Adds a predicate function to be run against candidate harnesses.
314
- * @param description A description of this predicate that may be used in error messages.
315
- * @param predicate An async predicate function.
316
- * @return this (for method chaining).
317
- */
318
- add(description, predicate) {
319
- this._descriptions.push(description);
320
- this._predicates.push(predicate);
321
- return this;
322
- }
323
- /**
324
- * Adds a predicate function that depends on an option value to be run against candidate
325
- * harnesses. If the option value is undefined, the predicate will be ignored.
326
- * @param name The name of the option (may be used in error messages).
327
- * @param option The option value.
328
- * @param predicate The predicate function to run if the option value is not undefined.
329
- * @return this (for method chaining).
330
- */
331
- addOption(name, option, predicate) {
332
- if (option !== undefined) {
333
- this.add(`${name} = ${_valueAsString(option)}`, item => predicate(item, option));
334
- }
335
- return this;
336
- }
337
- /**
338
- * Filters a list of harnesses on this predicate.
339
- * @param harnesses The list of harnesses to filter.
340
- * @return A list of harnesses that satisfy this predicate.
341
- */
342
- filter(harnesses) {
343
- return __awaiter(this, void 0, void 0, function* () {
344
- if (harnesses.length === 0) {
345
- return [];
346
- }
347
- const results = yield parallel(() => harnesses.map(h => this.evaluate(h)));
348
- return harnesses.filter((_, i) => results[i]);
349
- });
350
- }
351
- /**
352
- * Evaluates whether the given harness satisfies this predicate.
353
- * @param harness The harness to check
354
- * @return A promise that resolves to true if the harness satisfies this predicate,
355
- * and resolves to false otherwise.
356
- */
357
- evaluate(harness) {
358
- return __awaiter(this, void 0, void 0, function* () {
359
- const results = yield parallel(() => this._predicates.map(p => p(harness)));
360
- return results.reduce((combined, current) => combined && current, true);
361
- });
362
- }
363
- /** Gets a description of this predicate for use in error messages. */
364
- getDescription() {
365
- return this._descriptions.join(', ');
366
- }
367
- /** Gets the selector used to find candidate elements. */
368
- getSelector() {
369
- // We don't have to go through the extra trouble if there are no ancestors.
370
- if (!this._ancestor) {
371
- return (this.harnessType.hostSelector || '').trim();
372
- }
373
- const [ancestors, ancestorPlaceholders] = _splitAndEscapeSelector(this._ancestor);
374
- const [selectors, selectorPlaceholders] = _splitAndEscapeSelector(this.harnessType.hostSelector || '');
375
- const result = [];
376
- // We have to add the ancestor to each part of the host compound selector, otherwise we can get
377
- // incorrect results. E.g. `.ancestor .a, .ancestor .b` vs `.ancestor .a, .b`.
378
- ancestors.forEach(escapedAncestor => {
379
- const ancestor = _restoreSelector(escapedAncestor, ancestorPlaceholders);
380
- return selectors.forEach(escapedSelector => result.push(`${ancestor} ${_restoreSelector(escapedSelector, selectorPlaceholders)}`));
381
- });
382
- return result.join(', ');
383
- }
384
- /** Adds base options common to all harness types. */
385
- _addBaseOptions(options) {
386
- this._ancestor = options.ancestor || '';
387
- if (this._ancestor) {
388
- this._descriptions.push(`has ancestor matching selector "${this._ancestor}"`);
389
- }
390
- const selector = options.selector;
391
- if (selector !== undefined) {
392
- this.add(`host matches selector "${selector}"`, (item) => __awaiter(this, void 0, void 0, function* () {
393
- return (yield item.host()).matchesSelector(selector);
394
- }));
395
- }
396
- }
397
- }
398
- /** Represent a value as a string for the purpose of logging. */
399
- function _valueAsString(value) {
400
- if (value === undefined) {
401
- return 'undefined';
402
- }
403
- try {
404
- // `JSON.stringify` doesn't handle RegExp properly, so we need a custom replacer.
405
- // Use a character that is unlikely to appear in real strings to denote the start and end of
406
- // the regex. This allows us to strip out the extra quotes around the value added by
407
- // `JSON.stringify`. Also do custom escaping on `"` characters to prevent `JSON.stringify`
408
- // from escaping them as if they were part of a string.
409
- const stringifiedValue = JSON.stringify(value, (_, v) => v instanceof RegExp
410
- ? `◬MAT_RE_ESCAPE◬${v.toString().replace(/"/g, '◬MAT_RE_ESCAPE◬')}◬MAT_RE_ESCAPE◬`
411
- : v);
412
- // Strip out the extra quotes around regexes and put back the manually escaped `"` characters.
413
- return stringifiedValue
414
- .replace(/"◬MAT_RE_ESCAPE◬|◬MAT_RE_ESCAPE◬"/g, '')
415
- .replace(/◬MAT_RE_ESCAPE◬/g, '"');
416
- }
417
- catch (_a) {
418
- // `JSON.stringify` will throw if the object is cyclical,
419
- // in this case the best we can do is report the value as `{...}`.
420
- return '{...}';
421
- }
422
- }
423
- /**
424
- * Splits up a compound selector into its parts and escapes any quoted content. The quoted content
425
- * has to be escaped, because it can contain commas which will throw throw us off when trying to
426
- * split it.
427
- * @param selector Selector to be split.
428
- * @returns The escaped string where any quoted content is replaced with a placeholder. E.g.
429
- * `[foo="bar"]` turns into `[foo=__cdkPlaceholder-0__]`. Use `_restoreSelector` to restore
430
- * the placeholders.
431
- */
432
- function _splitAndEscapeSelector(selector) {
433
- const placeholders = [];
434
- // Note that the regex doesn't account for nested quotes so something like `"ab'cd'e"` will be
435
- // considered as two blocks. It's a bit of an edge case, but if we find that it's a problem,
436
- // we can make it a bit smarter using a loop. Use this for now since it's more readable and
437
- // compact. More complete implementation:
438
- // https://github.com/angular/angular/blob/bd34bc9e89f18a/packages/compiler/src/shadow_css.ts#L655
439
- const result = selector.replace(/(["'][^["']*["'])/g, (_, keep) => {
440
- const replaceBy = `__cdkPlaceholder-${placeholders.length}__`;
441
- placeholders.push(keep);
442
- return replaceBy;
443
- });
444
- return [result.split(',').map(part => part.trim()), placeholders];
445
- }
446
- /** Restores a selector whose content was escaped in `_splitAndEscapeSelector`. */
447
- function _restoreSelector(selector, placeholders) {
448
- return selector.replace(/__cdkPlaceholder-(\d+)__/g, (_, index) => placeholders[+index]);
449
- }
450
-
451
- /**
452
- * Base harness environment class that can be extended to allow `ComponentHarness`es to be used in
453
- * different test environments (e.g. testbed, protractor, etc.). This class implements the
454
- * functionality of both a `HarnessLoader` and `LocatorFactory`. This class is generic on the raw
455
- * element type, `E`, used by the particular test environment.
456
- */
457
- class HarnessEnvironment {
458
- // Implemented as part of the `LocatorFactory` interface.
459
- get rootElement() {
460
- this._rootElement = this._rootElement || this.createTestElement(this.rawRootElement);
461
- return this._rootElement;
462
- }
463
- set rootElement(element) {
464
- this._rootElement = element;
465
- }
466
- constructor(rawRootElement) {
467
- this.rawRootElement = rawRootElement;
468
- }
469
- // Implemented as part of the `LocatorFactory` interface.
470
- documentRootLocatorFactory() {
471
- return this.createEnvironment(this.getDocumentRoot());
472
- }
473
- // Implemented as part of the `LocatorFactory` interface.
474
- locatorFor(...queries) {
475
- return () => _assertResultFound(this._getAllHarnessesAndTestElements(queries), _getDescriptionForLocatorForQueries(queries));
476
- }
477
- // Implemented as part of the `LocatorFactory` interface.
478
- locatorForOptional(...queries) {
479
- return () => __awaiter(this, void 0, void 0, function* () { return (yield this._getAllHarnessesAndTestElements(queries))[0] || null; });
480
- }
481
- // Implemented as part of the `LocatorFactory` interface.
482
- locatorForAll(...queries) {
483
- return () => this._getAllHarnessesAndTestElements(queries);
484
- }
485
- // Implemented as part of the `LocatorFactory` interface.
486
- rootHarnessLoader() {
487
- return __awaiter(this, void 0, void 0, function* () {
488
- return this;
489
- });
490
- }
491
- // Implemented as part of the `LocatorFactory` interface.
492
- harnessLoaderFor(selector) {
493
- return __awaiter(this, void 0, void 0, function* () {
494
- return this.createEnvironment(yield _assertResultFound(this.getAllRawElements(selector), [
495
- _getDescriptionForHarnessLoaderQuery(selector),
496
- ]));
497
- });
498
- }
499
- // Implemented as part of the `LocatorFactory` interface.
500
- harnessLoaderForOptional(selector) {
501
- return __awaiter(this, void 0, void 0, function* () {
502
- const elements = yield this.getAllRawElements(selector);
503
- return elements[0] ? this.createEnvironment(elements[0]) : null;
504
- });
505
- }
506
- // Implemented as part of the `LocatorFactory` interface.
507
- harnessLoaderForAll(selector) {
508
- return __awaiter(this, void 0, void 0, function* () {
509
- const elements = yield this.getAllRawElements(selector);
510
- return elements.map(element => this.createEnvironment(element));
511
- });
512
- }
513
- // Implemented as part of the `HarnessLoader` interface.
514
- getHarness(query) {
515
- return this.locatorFor(query)();
516
- }
517
- // Implemented as part of the `HarnessLoader` interface.
518
- getHarnessOrNull(query) {
519
- return this.locatorForOptional(query)();
520
- }
521
- // Implemented as part of the `HarnessLoader` interface.
522
- getAllHarnesses(query) {
523
- return this.locatorForAll(query)();
524
- }
525
- // Implemented as part of the `HarnessLoader` interface.
526
- hasHarness(query) {
527
- return __awaiter(this, void 0, void 0, function* () {
528
- return (yield this.locatorForOptional(query)()) !== null;
529
- });
530
- }
531
- // Implemented as part of the `HarnessLoader` interface.
532
- getChildLoader(selector) {
533
- return __awaiter(this, void 0, void 0, function* () {
534
- return this.createEnvironment(yield _assertResultFound(this.getAllRawElements(selector), [
535
- _getDescriptionForHarnessLoaderQuery(selector),
536
- ]));
537
- });
538
- }
539
- // Implemented as part of the `HarnessLoader` interface.
540
- getAllChildLoaders(selector) {
541
- return __awaiter(this, void 0, void 0, function* () {
542
- return (yield this.getAllRawElements(selector)).map(e => this.createEnvironment(e));
543
- });
544
- }
545
- /** Creates a `ComponentHarness` for the given harness type with the given raw host element. */
546
- createComponentHarness(harnessType, element) {
547
- return new harnessType(this.createEnvironment(element));
548
- }
549
- /**
550
- * Matches the given raw elements with the given list of element and harness queries to produce a
551
- * list of matched harnesses and test elements.
552
- */
553
- _getAllHarnessesAndTestElements(queries) {
554
- return __awaiter(this, void 0, void 0, function* () {
555
- if (!queries.length) {
556
- throw Error('CDK Component harness query must contain at least one element.');
557
- }
558
- const { allQueries, harnessQueries, elementQueries, harnessTypes } = _parseQueries(queries);
559
- // Combine all of the queries into one large comma-delimited selector and use it to get all raw
560
- // elements matching any of the individual queries.
561
- const rawElements = yield this.getAllRawElements([...elementQueries, ...harnessQueries.map(predicate => predicate.getSelector())].join(','));
562
- // If every query is searching for the same harness subclass, we know every result corresponds
563
- // to an instance of that subclass. Likewise, if every query is for a `TestElement`, we know
564
- // every result corresponds to a `TestElement`. Otherwise we need to verify which result was
565
- // found by which selector so it can be matched to the appropriate instance.
566
- const skipSelectorCheck = (elementQueries.length === 0 && harnessTypes.size === 1) || harnessQueries.length === 0;
567
- const perElementMatches = yield parallel(() => rawElements.map((rawElement) => __awaiter(this, void 0, void 0, function* () {
568
- const testElement = this.createTestElement(rawElement);
569
- const allResultsForElement = yield parallel(
570
- // For each query, get `null` if it doesn't match, or a `TestElement` or
571
- // `ComponentHarness` as appropriate if it does match. This gives us everything that
572
- // matches the current raw element, but it may contain duplicate entries (e.g.
573
- // multiple `TestElement` or multiple `ComponentHarness` of the same type).
574
- () => allQueries.map(query => this._getQueryResultForElement(query, rawElement, testElement, skipSelectorCheck)));
575
- return _removeDuplicateQueryResults(allResultsForElement);
576
- })));
577
- return [].concat(...perElementMatches);
578
- });
579
- }
580
- /**
581
- * Check whether the given query matches the given element, if it does return the matched
582
- * `TestElement` or `ComponentHarness`, if it does not, return null. In cases where the caller
583
- * knows for sure that the query matches the element's selector, `skipSelectorCheck` can be used
584
- * to skip verification and optimize performance.
585
- */
586
- _getQueryResultForElement(query, rawElement, testElement, skipSelectorCheck = false) {
587
- return __awaiter(this, void 0, void 0, function* () {
588
- if (typeof query === 'string') {
589
- return skipSelectorCheck || (yield testElement.matchesSelector(query)) ? testElement : null;
590
- }
591
- if (skipSelectorCheck || (yield testElement.matchesSelector(query.getSelector()))) {
592
- const harness = this.createComponentHarness(query.harnessType, rawElement);
593
- return (yield query.evaluate(harness)) ? harness : null;
594
- }
595
- return null;
596
- });
597
- }
598
- }
599
- /**
600
- * Parses a list of queries in the format accepted by the `locatorFor*` methods into an easier to
601
- * work with format.
602
- */
603
- function _parseQueries(queries) {
604
- const allQueries = [];
605
- const harnessQueries = [];
606
- const elementQueries = [];
607
- const harnessTypes = new Set();
608
- for (const query of queries) {
609
- if (typeof query === 'string') {
610
- allQueries.push(query);
611
- elementQueries.push(query);
612
- }
613
- else {
614
- const predicate = query instanceof HarnessPredicate ? query : new HarnessPredicate(query, {});
615
- allQueries.push(predicate);
616
- harnessQueries.push(predicate);
617
- harnessTypes.add(predicate.harnessType);
618
- }
619
- }
620
- return { allQueries, harnessQueries, elementQueries, harnessTypes };
621
- }
622
- /**
623
- * Removes duplicate query results for a particular element. (e.g. multiple `TestElement`
624
- * instances or multiple instances of the same `ComponentHarness` class.
625
- */
626
- function _removeDuplicateQueryResults(results) {
627
- return __awaiter(this, void 0, void 0, function* () {
628
- let testElementMatched = false;
629
- let matchedHarnessTypes = new Set();
630
- const dedupedMatches = [];
631
- for (const result of results) {
632
- if (!result) {
633
- continue;
634
- }
635
- if (result instanceof ComponentHarness) {
636
- if (!matchedHarnessTypes.has(result.constructor)) {
637
- matchedHarnessTypes.add(result.constructor);
638
- dedupedMatches.push(result);
639
- }
640
- }
641
- else if (!testElementMatched) {
642
- testElementMatched = true;
643
- dedupedMatches.push(result);
644
- }
645
- }
646
- return dedupedMatches;
647
- });
648
- }
649
- /** Verifies that there is at least one result in an array. */
650
- function _assertResultFound(results, queryDescriptions) {
651
- return __awaiter(this, void 0, void 0, function* () {
652
- const result = (yield results)[0];
653
- if (result == undefined) {
654
- throw Error(`Failed to find element matching one of the following queries:\n` +
655
- queryDescriptions.map(desc => `(${desc})`).join(',\n'));
656
- }
657
- return result;
658
- });
659
- }
660
- /** Gets a list of description strings from a list of queries. */
661
- function _getDescriptionForLocatorForQueries(queries) {
662
- return queries.map(query => typeof query === 'string'
663
- ? _getDescriptionForTestElementQuery(query)
664
- : _getDescriptionForComponentHarnessQuery(query));
665
- }
666
- /** Gets a description string for a `ComponentHarness` query. */
667
- function _getDescriptionForComponentHarnessQuery(query) {
668
- const harnessPredicate = query instanceof HarnessPredicate ? query : new HarnessPredicate(query, {});
669
- const { name, hostSelector } = harnessPredicate.harnessType;
670
- const description = `${name} with host element matching selector: "${hostSelector}"`;
671
- const constraints = harnessPredicate.getDescription();
672
- return (description +
673
- (constraints ? ` satisfying the constraints: ${harnessPredicate.getDescription()}` : ''));
674
- }
675
- /** Gets a description string for a `TestElement` query. */
676
- function _getDescriptionForTestElementQuery(selector) {
677
- return `TestElement for element matching selector: "${selector}"`;
678
- }
679
- /** Gets a description string for a `HarnessLoader` query. */
680
- function _getDescriptionForHarnessLoaderQuery(selector) {
681
- return `HarnessLoader for element matching selector: "${selector}"`;
682
- }
683
-
684
- /**
685
- * @license
686
- * Copyright Google LLC All Rights Reserved.
687
- *
688
- * Use of this source code is governed by an MIT-style license that can be
689
- * found in the LICENSE file at https://angular.io/license
690
- */
691
- /** An enum of non-text keys that can be used with the `sendKeys` method. */
692
- // NOTE: This is a separate enum from `@angular/cdk/keycodes` because we don't necessarily want to
693
- // support every possible keyCode. We also can't rely on Protractor's `Key` because we don't want a
694
- // dependency on any particular testing framework here. Instead we'll just maintain this supported
695
- // list of keys and let individual concrete `HarnessEnvironment` classes map them to whatever key
696
- // representation is used in its respective testing framework.
697
- // tslint:disable-next-line:prefer-const-enum Seems like this causes some issues with System.js
698
- var TestKey;
699
- (function (TestKey) {
700
- TestKey[TestKey["BACKSPACE"] = 0] = "BACKSPACE";
701
- TestKey[TestKey["TAB"] = 1] = "TAB";
702
- TestKey[TestKey["ENTER"] = 2] = "ENTER";
703
- TestKey[TestKey["SHIFT"] = 3] = "SHIFT";
704
- TestKey[TestKey["CONTROL"] = 4] = "CONTROL";
705
- TestKey[TestKey["ALT"] = 5] = "ALT";
706
- TestKey[TestKey["ESCAPE"] = 6] = "ESCAPE";
707
- TestKey[TestKey["PAGE_UP"] = 7] = "PAGE_UP";
708
- TestKey[TestKey["PAGE_DOWN"] = 8] = "PAGE_DOWN";
709
- TestKey[TestKey["END"] = 9] = "END";
710
- TestKey[TestKey["HOME"] = 10] = "HOME";
711
- TestKey[TestKey["LEFT_ARROW"] = 11] = "LEFT_ARROW";
712
- TestKey[TestKey["UP_ARROW"] = 12] = "UP_ARROW";
713
- TestKey[TestKey["RIGHT_ARROW"] = 13] = "RIGHT_ARROW";
714
- TestKey[TestKey["DOWN_ARROW"] = 14] = "DOWN_ARROW";
715
- TestKey[TestKey["INSERT"] = 15] = "INSERT";
716
- TestKey[TestKey["DELETE"] = 16] = "DELETE";
717
- TestKey[TestKey["F1"] = 17] = "F1";
718
- TestKey[TestKey["F2"] = 18] = "F2";
719
- TestKey[TestKey["F3"] = 19] = "F3";
720
- TestKey[TestKey["F4"] = 20] = "F4";
721
- TestKey[TestKey["F5"] = 21] = "F5";
722
- TestKey[TestKey["F6"] = 22] = "F6";
723
- TestKey[TestKey["F7"] = 23] = "F7";
724
- TestKey[TestKey["F8"] = 24] = "F8";
725
- TestKey[TestKey["F9"] = 25] = "F9";
726
- TestKey[TestKey["F10"] = 26] = "F10";
727
- TestKey[TestKey["F11"] = 27] = "F11";
728
- TestKey[TestKey["F12"] = 28] = "F12";
729
- TestKey[TestKey["META"] = 29] = "META";
730
- })(TestKey || (TestKey = {}));
731
-
732
- /**
733
- * @license
734
- * Copyright Google LLC All Rights Reserved.
735
- *
736
- * Use of this source code is governed by an MIT-style license that can be
737
- * found in the LICENSE file at https://angular.io/license
738
- */
739
- /**
740
- * Returns an error which reports that no keys have been specified.
741
- * @docs-private
742
- */
743
- function getNoKeysSpecifiedError() {
744
- return Error('No keys have been specified.');
745
- }
746
-
747
- /**
748
- * @license
749
- * Copyright Google LLC All Rights Reserved.
750
- *
751
- * Use of this source code is governed by an MIT-style license that can be
752
- * found in the LICENSE file at https://angular.io/license
753
- */
754
- /**
755
- * Gets text of element excluding certain selectors within the element.
756
- * @param element Element to get text from,
757
- * @param excludeSelector Selector identifying which elements to exclude,
758
- */
759
- function _getTextWithExcludedElements(element, excludeSelector) {
760
- const clone = element.cloneNode(true);
761
- const exclusions = clone.querySelectorAll(excludeSelector);
762
- for (let i = 0; i < exclusions.length; i++) {
763
- exclusions[i].remove();
764
- }
765
- return (clone.textContent || '').trim();
766
- }
767
-
768
- /**
769
- * @license
770
- * Copyright Google LLC All Rights Reserved.
771
- *
772
- * Use of this source code is governed by an MIT-style license that can be
773
- * found in the LICENSE file at https://angular.io/license
774
- */
775
-
776
- /**
777
- * @license
778
- * Copyright Google LLC All Rights Reserved.
779
- *
780
- * Use of this source code is governed by an MIT-style license that can be
781
- * found in the LICENSE file at https://angular.io/license
782
- */
783
-
784
- export { ComponentHarness, ContentContainerComponentHarness, HarnessEnvironment, HarnessPredicate, TestKey, _getTextWithExcludedElements, getNoKeysSpecifiedError, handleAutoChangeDetectionStatus, manualChangeDetection, parallel, stopHandlingAutoChangeDetectionStatus };
785
- //# sourceMappingURL=testing.mjs.map