@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,621 +0,0 @@
1
- import { FocusKeyManager } from '@angular/cdk/a11y';
2
- import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
3
- import { hasModifierKey, SPACE, ENTER } from '@angular/cdk/keycodes';
4
- import * as i0 from '@angular/core';
5
- import { Directive, InjectionToken, EventEmitter, forwardRef, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Optional, ContentChild, ViewChild, Input, Output, QueryList, ContentChildren, NgModule } from '@angular/core';
6
- import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
7
- import { Subject, of } from 'rxjs';
8
- import { startWith, takeUntil } from 'rxjs/operators';
9
- import * as i1 from '@angular/cdk/bidi';
10
- import { BidiModule } from '@angular/cdk/bidi';
11
-
12
- /**
13
- * @license
14
- * Copyright Google LLC All Rights Reserved.
15
- *
16
- * Use of this source code is governed by an MIT-style license that can be
17
- * found in the LICENSE file at https://angular.io/license
18
- */
19
- class CdkStepHeader {
20
- constructor(_elementRef) {
21
- this._elementRef = _elementRef;
22
- }
23
- /** Focuses the step header. */
24
- focus() {
25
- this._elementRef.nativeElement.focus();
26
- }
27
- }
28
- CdkStepHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepHeader, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
29
- CdkStepHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: CdkStepHeader, selector: "[cdkStepHeader]", host: { attributes: { "role": "tab" } }, ngImport: i0 });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepHeader, decorators: [{
31
- type: Directive,
32
- args: [{
33
- selector: '[cdkStepHeader]',
34
- host: {
35
- 'role': 'tab',
36
- },
37
- }]
38
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
39
-
40
- /**
41
- * @license
42
- * Copyright Google LLC All Rights Reserved.
43
- *
44
- * Use of this source code is governed by an MIT-style license that can be
45
- * found in the LICENSE file at https://angular.io/license
46
- */
47
- class CdkStepLabel {
48
- constructor(/** @docs-private */ template) {
49
- this.template = template;
50
- }
51
- }
52
- CdkStepLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepLabel, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
53
- CdkStepLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: CdkStepLabel, selector: "[cdkStepLabel]", ngImport: i0 });
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepLabel, decorators: [{
55
- type: Directive,
56
- args: [{
57
- selector: '[cdkStepLabel]',
58
- }]
59
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
60
-
61
- /**
62
- * @license
63
- * Copyright Google LLC All Rights Reserved.
64
- *
65
- * Use of this source code is governed by an MIT-style license that can be
66
- * found in the LICENSE file at https://angular.io/license
67
- */
68
- /** Used to generate unique ID for each stepper component. */
69
- let nextId = 0;
70
- /** Change event emitted on selection changes. */
71
- class StepperSelectionEvent {
72
- }
73
- /** Enum to represent the different states of the steps. */
74
- const STEP_STATE = {
75
- NUMBER: 'number',
76
- EDIT: 'edit',
77
- DONE: 'done',
78
- ERROR: 'error',
79
- };
80
- /** InjectionToken that can be used to specify the global stepper options. */
81
- const STEPPER_GLOBAL_OPTIONS = new InjectionToken('STEPPER_GLOBAL_OPTIONS');
82
- class CdkStep {
83
- /** Whether the user can return to this step once it has been marked as completed. */
84
- get editable() {
85
- return this._editable;
86
- }
87
- set editable(value) {
88
- this._editable = coerceBooleanProperty(value);
89
- }
90
- /** Whether the completion of step is optional. */
91
- get optional() {
92
- return this._optional;
93
- }
94
- set optional(value) {
95
- this._optional = coerceBooleanProperty(value);
96
- }
97
- /** Whether step is marked as completed. */
98
- get completed() {
99
- return this._completedOverride == null ? this._getDefaultCompleted() : this._completedOverride;
100
- }
101
- set completed(value) {
102
- this._completedOverride = coerceBooleanProperty(value);
103
- }
104
- _getDefaultCompleted() {
105
- return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;
106
- }
107
- /** Whether step has an error. */
108
- get hasError() {
109
- return this._customError == null ? this._getDefaultError() : this._customError;
110
- }
111
- set hasError(value) {
112
- this._customError = coerceBooleanProperty(value);
113
- }
114
- _getDefaultError() {
115
- return this.stepControl && this.stepControl.invalid && this.interacted;
116
- }
117
- constructor(_stepper, stepperOptions) {
118
- this._stepper = _stepper;
119
- /** Whether user has attempted to move away from the step. */
120
- this.interacted = false;
121
- /** Emits when the user has attempted to move away from the step. */
122
- this.interactedStream = new EventEmitter();
123
- this._editable = true;
124
- this._optional = false;
125
- this._completedOverride = null;
126
- this._customError = null;
127
- this._stepperOptions = stepperOptions ? stepperOptions : {};
128
- this._displayDefaultIndicatorType = this._stepperOptions.displayDefaultIndicatorType !== false;
129
- }
130
- /** Selects this step component. */
131
- select() {
132
- this._stepper.selected = this;
133
- }
134
- /** Resets the step to its initial state. Note that this includes resetting form data. */
135
- reset() {
136
- this.interacted = false;
137
- if (this._completedOverride != null) {
138
- this._completedOverride = false;
139
- }
140
- if (this._customError != null) {
141
- this._customError = false;
142
- }
143
- if (this.stepControl) {
144
- this.stepControl.reset();
145
- }
146
- }
147
- ngOnChanges() {
148
- // Since basically all inputs of the MatStep get proxied through the view down to the
149
- // underlying MatStepHeader, we have to make sure that change detection runs correctly.
150
- this._stepper._stateChanged();
151
- }
152
- _markAsInteracted() {
153
- if (!this.interacted) {
154
- this.interacted = true;
155
- this.interactedStream.emit(this);
156
- }
157
- }
158
- /** Determines whether the error state can be shown. */
159
- _showError() {
160
- var _a;
161
- // We want to show the error state either if the user opted into/out of it using the
162
- // global options, or if they've explicitly set it through the `hasError` input.
163
- return (_a = this._stepperOptions.showError) !== null && _a !== void 0 ? _a : this._customError != null;
164
- }
165
- }
166
- CdkStep.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStep, deps: [{ token: forwardRef(() => CdkStepper) }, { token: STEPPER_GLOBAL_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
167
- CdkStep.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.2", type: CdkStep, selector: "cdk-step", inputs: { stepControl: "stepControl", label: "label", errorMessage: "errorMessage", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], state: "state", editable: "editable", optional: "optional", completed: "completed", hasError: "hasError" }, outputs: { interactedStream: "interacted" }, queries: [{ propertyName: "stepLabel", first: true, predicate: CdkStepLabel, descendants: true }], viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["cdkStep"], usesOnChanges: true, ngImport: i0, template: '<ng-template><ng-content></ng-content></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStep, decorators: [{
169
- type: Component,
170
- args: [{
171
- selector: 'cdk-step',
172
- exportAs: 'cdkStep',
173
- template: '<ng-template><ng-content></ng-content></ng-template>',
174
- encapsulation: ViewEncapsulation.None,
175
- changeDetection: ChangeDetectionStrategy.OnPush,
176
- }]
177
- }], ctorParameters: function () {
178
- return [{ type: CdkStepper, decorators: [{
179
- type: Inject,
180
- args: [forwardRef(() => CdkStepper)]
181
- }] }, { type: undefined, decorators: [{
182
- type: Optional
183
- }, {
184
- type: Inject,
185
- args: [STEPPER_GLOBAL_OPTIONS]
186
- }] }];
187
- }, propDecorators: { stepLabel: [{
188
- type: ContentChild,
189
- args: [CdkStepLabel]
190
- }], content: [{
191
- type: ViewChild,
192
- args: [TemplateRef, { static: true }]
193
- }], stepControl: [{
194
- type: Input
195
- }], interactedStream: [{
196
- type: Output,
197
- args: ['interacted']
198
- }], label: [{
199
- type: Input
200
- }], errorMessage: [{
201
- type: Input
202
- }], ariaLabel: [{
203
- type: Input,
204
- args: ['aria-label']
205
- }], ariaLabelledby: [{
206
- type: Input,
207
- args: ['aria-labelledby']
208
- }], state: [{
209
- type: Input
210
- }], editable: [{
211
- type: Input
212
- }], optional: [{
213
- type: Input
214
- }], completed: [{
215
- type: Input
216
- }], hasError: [{
217
- type: Input
218
- }] } });
219
- class CdkStepper {
220
- /** Whether the validity of previous steps should be checked or not. */
221
- get linear() {
222
- return this._linear;
223
- }
224
- set linear(value) {
225
- this._linear = coerceBooleanProperty(value);
226
- }
227
- /** The index of the selected step. */
228
- get selectedIndex() {
229
- return this._selectedIndex;
230
- }
231
- set selectedIndex(index) {
232
- var _a;
233
- const newIndex = coerceNumberProperty(index);
234
- if (this.steps && this._steps) {
235
- // Ensure that the index can't be out of bounds.
236
- if (!this._isValidIndex(newIndex) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
237
- throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');
238
- }
239
- (_a = this.selected) === null || _a === void 0 ? void 0 : _a._markAsInteracted();
240
- if (this._selectedIndex !== newIndex &&
241
- !this._anyControlsInvalidOrPending(newIndex) &&
242
- (newIndex >= this._selectedIndex || this.steps.toArray()[newIndex].editable)) {
243
- this._updateSelectedItemIndex(newIndex);
244
- }
245
- }
246
- else {
247
- this._selectedIndex = newIndex;
248
- }
249
- }
250
- /** The step that is selected. */
251
- get selected() {
252
- return this.steps ? this.steps.toArray()[this.selectedIndex] : undefined;
253
- }
254
- set selected(step) {
255
- this.selectedIndex = step && this.steps ? this.steps.toArray().indexOf(step) : -1;
256
- }
257
- /** Orientation of the stepper. */
258
- get orientation() {
259
- return this._orientation;
260
- }
261
- set orientation(value) {
262
- // This is a protected method so that `MatStepper` can hook into it.
263
- this._orientation = value;
264
- if (this._keyManager) {
265
- this._keyManager.withVerticalOrientation(value === 'vertical');
266
- }
267
- }
268
- constructor(_dir, _changeDetectorRef, _elementRef) {
269
- this._dir = _dir;
270
- this._changeDetectorRef = _changeDetectorRef;
271
- this._elementRef = _elementRef;
272
- /** Emits when the component is destroyed. */
273
- this._destroyed = new Subject();
274
- /** Steps that belong to the current stepper, excluding ones from nested steppers. */
275
- this.steps = new QueryList();
276
- /** List of step headers sorted based on their DOM order. */
277
- this._sortedHeaders = new QueryList();
278
- this._linear = false;
279
- this._selectedIndex = 0;
280
- /** Event emitted when the selected step has changed. */
281
- this.selectionChange = new EventEmitter();
282
- this._orientation = 'horizontal';
283
- this._groupId = nextId++;
284
- }
285
- ngAfterContentInit() {
286
- this._steps.changes
287
- .pipe(startWith(this._steps), takeUntil(this._destroyed))
288
- .subscribe((steps) => {
289
- this.steps.reset(steps.filter(step => step._stepper === this));
290
- this.steps.notifyOnChanges();
291
- });
292
- }
293
- ngAfterViewInit() {
294
- // If the step headers are defined outside of the `ngFor` that renders the steps, like in the
295
- // Material stepper, they won't appear in the `QueryList` in the same order as they're
296
- // rendered in the DOM which will lead to incorrect keyboard navigation. We need to sort
297
- // them manually to ensure that they're correct. Alternatively, we can change the Material
298
- // template to inline the headers in the `ngFor`, but that'll result in a lot of
299
- // code duplication. See #23539.
300
- this._stepHeader.changes
301
- .pipe(startWith(this._stepHeader), takeUntil(this._destroyed))
302
- .subscribe((headers) => {
303
- this._sortedHeaders.reset(headers.toArray().sort((a, b) => {
304
- const documentPosition = a._elementRef.nativeElement.compareDocumentPosition(b._elementRef.nativeElement);
305
- // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.
306
- // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
307
- // tslint:disable-next-line:no-bitwise
308
- return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
309
- }));
310
- this._sortedHeaders.notifyOnChanges();
311
- });
312
- // Note that while the step headers are content children by default, any components that
313
- // extend this one might have them as view children. We initialize the keyboard handling in
314
- // AfterViewInit so we're guaranteed for both view and content children to be defined.
315
- this._keyManager = new FocusKeyManager(this._sortedHeaders)
316
- .withWrap()
317
- .withHomeAndEnd()
318
- .withVerticalOrientation(this._orientation === 'vertical');
319
- (this._dir ? this._dir.change : of())
320
- .pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed))
321
- .subscribe(direction => this._keyManager.withHorizontalOrientation(direction));
322
- this._keyManager.updateActiveItem(this._selectedIndex);
323
- // No need to `takeUntil` here, because we're the ones destroying `steps`.
324
- this.steps.changes.subscribe(() => {
325
- if (!this.selected) {
326
- this._selectedIndex = Math.max(this._selectedIndex - 1, 0);
327
- }
328
- });
329
- // The logic which asserts that the selected index is within bounds doesn't run before the
330
- // steps are initialized, because we don't how many steps there are yet so we may have an
331
- // invalid index on init. If that's the case, auto-correct to the default so we don't throw.
332
- if (!this._isValidIndex(this._selectedIndex)) {
333
- this._selectedIndex = 0;
334
- }
335
- }
336
- ngOnDestroy() {
337
- var _a;
338
- (_a = this._keyManager) === null || _a === void 0 ? void 0 : _a.destroy();
339
- this.steps.destroy();
340
- this._sortedHeaders.destroy();
341
- this._destroyed.next();
342
- this._destroyed.complete();
343
- }
344
- /** Selects and focuses the next step in list. */
345
- next() {
346
- this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);
347
- }
348
- /** Selects and focuses the previous step in list. */
349
- previous() {
350
- this.selectedIndex = Math.max(this._selectedIndex - 1, 0);
351
- }
352
- /** Resets the stepper to its initial state. Note that this includes clearing form data. */
353
- reset() {
354
- this._updateSelectedItemIndex(0);
355
- this.steps.forEach(step => step.reset());
356
- this._stateChanged();
357
- }
358
- /** Returns a unique id for each step label element. */
359
- _getStepLabelId(i) {
360
- return `cdk-step-label-${this._groupId}-${i}`;
361
- }
362
- /** Returns unique id for each step content element. */
363
- _getStepContentId(i) {
364
- return `cdk-step-content-${this._groupId}-${i}`;
365
- }
366
- /** Marks the component to be change detected. */
367
- _stateChanged() {
368
- this._changeDetectorRef.markForCheck();
369
- }
370
- /** Returns position state of the step with the given index. */
371
- _getAnimationDirection(index) {
372
- const position = index - this._selectedIndex;
373
- if (position < 0) {
374
- return this._layoutDirection() === 'rtl' ? 'next' : 'previous';
375
- }
376
- else if (position > 0) {
377
- return this._layoutDirection() === 'rtl' ? 'previous' : 'next';
378
- }
379
- return 'current';
380
- }
381
- /** Returns the type of icon to be displayed. */
382
- _getIndicatorType(index, state = STEP_STATE.NUMBER) {
383
- const step = this.steps.toArray()[index];
384
- const isCurrentStep = this._isCurrentStep(index);
385
- return step._displayDefaultIndicatorType
386
- ? this._getDefaultIndicatorLogic(step, isCurrentStep)
387
- : this._getGuidelineLogic(step, isCurrentStep, state);
388
- }
389
- _getDefaultIndicatorLogic(step, isCurrentStep) {
390
- if (step._showError() && step.hasError && !isCurrentStep) {
391
- return STEP_STATE.ERROR;
392
- }
393
- else if (!step.completed || isCurrentStep) {
394
- return STEP_STATE.NUMBER;
395
- }
396
- else {
397
- return step.editable ? STEP_STATE.EDIT : STEP_STATE.DONE;
398
- }
399
- }
400
- _getGuidelineLogic(step, isCurrentStep, state = STEP_STATE.NUMBER) {
401
- if (step._showError() && step.hasError && !isCurrentStep) {
402
- return STEP_STATE.ERROR;
403
- }
404
- else if (step.completed && !isCurrentStep) {
405
- return STEP_STATE.DONE;
406
- }
407
- else if (step.completed && isCurrentStep) {
408
- return state;
409
- }
410
- else if (step.editable && isCurrentStep) {
411
- return STEP_STATE.EDIT;
412
- }
413
- else {
414
- return state;
415
- }
416
- }
417
- _isCurrentStep(index) {
418
- return this._selectedIndex === index;
419
- }
420
- /** Returns the index of the currently-focused step header. */
421
- _getFocusIndex() {
422
- return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;
423
- }
424
- _updateSelectedItemIndex(newIndex) {
425
- const stepsArray = this.steps.toArray();
426
- this.selectionChange.emit({
427
- selectedIndex: newIndex,
428
- previouslySelectedIndex: this._selectedIndex,
429
- selectedStep: stepsArray[newIndex],
430
- previouslySelectedStep: stepsArray[this._selectedIndex],
431
- });
432
- // If focus is inside the stepper, move it to the next header, otherwise it may become
433
- // lost when the active step content is hidden. We can't be more granular with the check
434
- // (e.g. checking whether focus is inside the active step), because we don't have a
435
- // reference to the elements that are rendering out the content.
436
- this._containsFocus()
437
- ? this._keyManager.setActiveItem(newIndex)
438
- : this._keyManager.updateActiveItem(newIndex);
439
- this._selectedIndex = newIndex;
440
- this._stateChanged();
441
- }
442
- _onKeydown(event) {
443
- const hasModifier = hasModifierKey(event);
444
- const keyCode = event.keyCode;
445
- const manager = this._keyManager;
446
- if (manager.activeItemIndex != null &&
447
- !hasModifier &&
448
- (keyCode === SPACE || keyCode === ENTER)) {
449
- this.selectedIndex = manager.activeItemIndex;
450
- event.preventDefault();
451
- }
452
- else {
453
- manager.setFocusOrigin('keyboard').onKeydown(event);
454
- }
455
- }
456
- _anyControlsInvalidOrPending(index) {
457
- if (this._linear && index >= 0) {
458
- return this.steps
459
- .toArray()
460
- .slice(0, index)
461
- .some(step => {
462
- const control = step.stepControl;
463
- const isIncomplete = control
464
- ? control.invalid || control.pending || !step.interacted
465
- : !step.completed;
466
- return isIncomplete && !step.optional && !step._completedOverride;
467
- });
468
- }
469
- return false;
470
- }
471
- _layoutDirection() {
472
- return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
473
- }
474
- /** Checks whether the stepper contains the focused element. */
475
- _containsFocus() {
476
- const stepperElement = this._elementRef.nativeElement;
477
- const focusedElement = _getFocusedElementPierceShadowDom();
478
- return stepperElement === focusedElement || stepperElement.contains(focusedElement);
479
- }
480
- /** Checks whether the passed-in index is a valid step index. */
481
- _isValidIndex(index) {
482
- return index > -1 && (!this.steps || index < this.steps.length);
483
- }
484
- }
485
- CdkStepper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepper, deps: [{ token: i1.Directionality, optional: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
486
- CdkStepper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: CdkStepper, selector: "[cdkStepper]", inputs: { linear: "linear", selectedIndex: "selectedIndex", selected: "selected", orientation: "orientation" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "_steps", predicate: CdkStep, descendants: true }, { propertyName: "_stepHeader", predicate: CdkStepHeader, descendants: true }], exportAs: ["cdkStepper"], ngImport: i0 });
487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepper, decorators: [{
488
- type: Directive,
489
- args: [{
490
- selector: '[cdkStepper]',
491
- exportAs: 'cdkStepper',
492
- }]
493
- }], ctorParameters: function () {
494
- return [{ type: i1.Directionality, decorators: [{
495
- type: Optional
496
- }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }];
497
- }, propDecorators: { _steps: [{
498
- type: ContentChildren,
499
- args: [CdkStep, { descendants: true }]
500
- }], _stepHeader: [{
501
- type: ContentChildren,
502
- args: [CdkStepHeader, { descendants: true }]
503
- }], linear: [{
504
- type: Input
505
- }], selectedIndex: [{
506
- type: Input
507
- }], selected: [{
508
- type: Input
509
- }], selectionChange: [{
510
- type: Output
511
- }], orientation: [{
512
- type: Input
513
- }] } });
514
-
515
- /**
516
- * @license
517
- * Copyright Google LLC All Rights Reserved.
518
- *
519
- * Use of this source code is governed by an MIT-style license that can be
520
- * found in the LICENSE file at https://angular.io/license
521
- */
522
- /** Button that moves to the next step in a stepper workflow. */
523
- class CdkStepperNext {
524
- constructor(_stepper) {
525
- this._stepper = _stepper;
526
- /** Type of the next button. Defaults to "submit" if not specified. */
527
- this.type = 'submit';
528
- }
529
- }
530
- CdkStepperNext.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepperNext, deps: [{ token: CdkStepper }], target: i0.ɵɵFactoryTarget.Directive });
531
- CdkStepperNext.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: CdkStepperNext, selector: "button[cdkStepperNext]", inputs: { type: "type" }, host: { listeners: { "click": "_stepper.next()" }, properties: { "type": "type" } }, ngImport: i0 });
532
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepperNext, decorators: [{
533
- type: Directive,
534
- args: [{
535
- selector: 'button[cdkStepperNext]',
536
- host: {
537
- '[type]': 'type',
538
- '(click)': '_stepper.next()',
539
- },
540
- }]
541
- }], ctorParameters: function () { return [{ type: CdkStepper }]; }, propDecorators: { type: [{
542
- type: Input
543
- }] } });
544
- /** Button that moves to the previous step in a stepper workflow. */
545
- class CdkStepperPrevious {
546
- constructor(_stepper) {
547
- this._stepper = _stepper;
548
- /** Type of the previous button. Defaults to "button" if not specified. */
549
- this.type = 'button';
550
- }
551
- }
552
- CdkStepperPrevious.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepperPrevious, deps: [{ token: CdkStepper }], target: i0.ɵɵFactoryTarget.Directive });
553
- CdkStepperPrevious.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: CdkStepperPrevious, selector: "button[cdkStepperPrevious]", inputs: { type: "type" }, host: { listeners: { "click": "_stepper.previous()" }, properties: { "type": "type" } }, ngImport: i0 });
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepperPrevious, decorators: [{
555
- type: Directive,
556
- args: [{
557
- selector: 'button[cdkStepperPrevious]',
558
- host: {
559
- '[type]': 'type',
560
- '(click)': '_stepper.previous()',
561
- },
562
- }]
563
- }], ctorParameters: function () { return [{ type: CdkStepper }]; }, propDecorators: { type: [{
564
- type: Input
565
- }] } });
566
-
567
- /**
568
- * @license
569
- * Copyright Google LLC All Rights Reserved.
570
- *
571
- * Use of this source code is governed by an MIT-style license that can be
572
- * found in the LICENSE file at https://angular.io/license
573
- */
574
- class CdkStepperModule {
575
- }
576
- CdkStepperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
577
- CdkStepperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepperModule, declarations: [CdkStep,
578
- CdkStepper,
579
- CdkStepHeader,
580
- CdkStepLabel,
581
- CdkStepperNext,
582
- CdkStepperPrevious], imports: [BidiModule], exports: [CdkStep, CdkStepper, CdkStepHeader, CdkStepLabel, CdkStepperNext, CdkStepperPrevious] });
583
- CdkStepperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepperModule, imports: [BidiModule] });
584
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: CdkStepperModule, decorators: [{
585
- type: NgModule,
586
- args: [{
587
- imports: [BidiModule],
588
- exports: [CdkStep, CdkStepper, CdkStepHeader, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],
589
- declarations: [
590
- CdkStep,
591
- CdkStepper,
592
- CdkStepHeader,
593
- CdkStepLabel,
594
- CdkStepperNext,
595
- CdkStepperPrevious,
596
- ],
597
- }]
598
- }] });
599
-
600
- /**
601
- * @license
602
- * Copyright Google LLC All Rights Reserved.
603
- *
604
- * Use of this source code is governed by an MIT-style license that can be
605
- * found in the LICENSE file at https://angular.io/license
606
- */
607
-
608
- /**
609
- * @license
610
- * Copyright Google LLC All Rights Reserved.
611
- *
612
- * Use of this source code is governed by an MIT-style license that can be
613
- * found in the LICENSE file at https://angular.io/license
614
- */
615
-
616
- /**
617
- * Generated bundle index. Do not edit.
618
- */
619
-
620
- export { CdkStep, CdkStepHeader, CdkStepLabel, CdkStepper, CdkStepperModule, CdkStepperNext, CdkStepperPrevious, STEPPER_GLOBAL_OPTIONS, STEP_STATE, StepperSelectionEvent };
621
- //# sourceMappingURL=stepper.mjs.map