@kato-lee/cdk 14.2.7 → 20.2.14

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 (735) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +8 -8
  3. package/_adev_assets/cdk_drag_drop.json +7215 -0
  4. package/_adev_assets/cdk_testing.json +7605 -0
  5. package/_adev_assets/cdk_testing_protractor.json +1747 -0
  6. package/_adev_assets/cdk_testing_selenium_webdriver.json +1801 -0
  7. package/_adev_assets/cdk_testing_testbed.json +1903 -0
  8. package/_index.scss +8 -8
  9. package/a11y/_index.scss +60 -102
  10. package/a11y/index.d.ts +550 -1212
  11. package/a11y-module.d.d.ts +314 -0
  12. package/a11y-prebuilt.css +1 -1
  13. package/accordion/index.d.ts +92 -140
  14. package/activedescendant-key-manager.d.d.ts +39 -0
  15. package/bidi/index.d.ts +21 -80
  16. package/bidi-module.d.d.ts +57 -0
  17. package/clipboard/index.d.ts +101 -115
  18. package/coercion/index.d.ts +45 -67
  19. package/coercion/private/index.d.ts +9 -0
  20. package/collections/index.d.ts +99 -374
  21. package/data-source.d.d.ts +43 -0
  22. package/dialog/index.d.ts +412 -469
  23. package/drag-drop/index.d.ts +1410 -1614
  24. package/fesm2022/a11y-module.mjs +951 -0
  25. package/fesm2022/a11y-module.mjs.map +1 -0
  26. package/fesm2022/a11y.mjs +538 -0
  27. package/fesm2022/a11y.mjs.map +1 -0
  28. package/fesm2022/accordion.mjs +216 -0
  29. package/fesm2022/accordion.mjs.map +1 -0
  30. package/fesm2022/activedescendant-key-manager.mjs +16 -0
  31. package/fesm2022/activedescendant-key-manager.mjs.map +1 -0
  32. package/fesm2022/array.mjs +6 -0
  33. package/fesm2022/array.mjs.map +1 -0
  34. package/fesm2022/bidi.mjs +78 -0
  35. package/fesm2022/bidi.mjs.map +1 -0
  36. package/fesm2022/breakpoints-observer.mjs +179 -0
  37. package/fesm2022/breakpoints-observer.mjs.map +1 -0
  38. package/fesm2022/cdk.mjs +7 -0
  39. package/fesm2022/cdk.mjs.map +1 -0
  40. package/{fesm2020 → fesm2022}/clipboard.mjs +210 -259
  41. package/fesm2022/clipboard.mjs.map +1 -0
  42. package/fesm2022/coercion/private.mjs +15 -0
  43. package/fesm2022/coercion/private.mjs.map +1 -0
  44. package/fesm2022/coercion.mjs +43 -0
  45. package/fesm2022/coercion.mjs.map +1 -0
  46. package/fesm2022/collections.mjs +8 -0
  47. package/fesm2022/collections.mjs.map +1 -0
  48. package/fesm2022/css-pixel-value.mjs +10 -0
  49. package/fesm2022/css-pixel-value.mjs.map +1 -0
  50. package/fesm2022/data-source.mjs +15 -0
  51. package/fesm2022/data-source.mjs.map +1 -0
  52. package/{fesm2020 → fesm2022}/dialog.mjs +874 -787
  53. package/fesm2022/dialog.mjs.map +1 -0
  54. package/fesm2022/directionality.mjs +77 -0
  55. package/fesm2022/directionality.mjs.map +1 -0
  56. package/fesm2022/dispose-view-repeater-strategy.mjs +44 -0
  57. package/fesm2022/dispose-view-repeater-strategy.mjs.map +1 -0
  58. package/{fesm2020 → fesm2022}/drag-drop.mjs +4477 -3808
  59. package/fesm2022/drag-drop.mjs.map +1 -0
  60. package/fesm2022/element.mjs +29 -0
  61. package/fesm2022/element.mjs.map +1 -0
  62. package/fesm2022/fake-event-detection.mjs +24 -0
  63. package/fesm2022/fake-event-detection.mjs.map +1 -0
  64. package/fesm2022/focus-key-manager.mjs +22 -0
  65. package/fesm2022/focus-key-manager.mjs.map +1 -0
  66. package/fesm2022/focus-monitor.mjs +622 -0
  67. package/fesm2022/focus-monitor.mjs.map +1 -0
  68. package/fesm2022/id-generator.mjs +37 -0
  69. package/fesm2022/id-generator.mjs.map +1 -0
  70. package/fesm2022/keycodes.mjs +15 -0
  71. package/fesm2022/keycodes.mjs.map +1 -0
  72. package/{fesm2015/keycodes.mjs → fesm2022/keycodes2.mjs} +122 -167
  73. package/fesm2022/keycodes2.mjs.map +1 -0
  74. package/fesm2022/layout.mjs +43 -0
  75. package/fesm2022/layout.mjs.map +1 -0
  76. package/fesm2022/list-key-manager.mjs +360 -0
  77. package/fesm2022/list-key-manager.mjs.map +1 -0
  78. package/fesm2022/listbox.mjs +928 -0
  79. package/fesm2022/listbox.mjs.map +1 -0
  80. package/fesm2022/menu.mjs +2001 -0
  81. package/fesm2022/menu.mjs.map +1 -0
  82. package/fesm2022/observers/private.mjs +124 -0
  83. package/fesm2022/observers/private.mjs.map +1 -0
  84. package/fesm2022/observers.mjs +210 -0
  85. package/fesm2022/observers.mjs.map +1 -0
  86. package/{fesm2020/overlay.mjs → fesm2022/overlay-module.mjs} +3062 -3145
  87. package/fesm2022/overlay-module.mjs.map +1 -0
  88. package/fesm2022/overlay.mjs +101 -0
  89. package/fesm2022/overlay.mjs.map +1 -0
  90. package/fesm2022/passive-listeners.mjs +31 -0
  91. package/fesm2022/passive-listeners.mjs.map +1 -0
  92. package/fesm2022/platform.mjs +73 -0
  93. package/fesm2022/platform.mjs.map +1 -0
  94. package/fesm2022/platform2.mjs +77 -0
  95. package/fesm2022/platform2.mjs.map +1 -0
  96. package/{fesm2020 → fesm2022}/portal.mjs +614 -689
  97. package/fesm2022/portal.mjs.map +1 -0
  98. package/fesm2022/private.mjs +19 -0
  99. package/fesm2022/private.mjs.map +1 -0
  100. package/fesm2022/recycle-view-repeater-strategy.mjs +156 -0
  101. package/fesm2022/recycle-view-repeater-strategy.mjs.map +1 -0
  102. package/{fesm2015 → fesm2022}/scrolling.mjs +1472 -1558
  103. package/fesm2022/scrolling.mjs.map +1 -0
  104. package/fesm2022/scrolling2.mjs +99 -0
  105. package/fesm2022/scrolling2.mjs.map +1 -0
  106. package/fesm2022/selection-model.mjs +221 -0
  107. package/fesm2022/selection-model.mjs.map +1 -0
  108. package/fesm2022/shadow-dom.mjs +49 -0
  109. package/fesm2022/shadow-dom.mjs.map +1 -0
  110. package/fesm2022/stepper.mjs +632 -0
  111. package/fesm2022/stepper.mjs.map +1 -0
  112. package/fesm2022/style-loader.mjs +47 -0
  113. package/fesm2022/style-loader.mjs.map +1 -0
  114. package/{fesm2020 → fesm2022}/table.mjs +2511 -2348
  115. package/fesm2022/table.mjs.map +1 -0
  116. package/fesm2022/test-environment.mjs +19 -0
  117. package/fesm2022/test-environment.mjs.map +1 -0
  118. package/fesm2022/testing/selenium-webdriver.mjs +353 -0
  119. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -0
  120. package/fesm2022/testing/testbed.mjs +782 -0
  121. package/fesm2022/testing/testbed.mjs.map +1 -0
  122. package/fesm2022/testing.mjs +950 -0
  123. package/fesm2022/testing.mjs.map +1 -0
  124. package/{fesm2020 → fesm2022}/text-field.mjs +432 -459
  125. package/fesm2022/text-field.mjs.map +1 -0
  126. package/fesm2022/tree-key-manager.mjs +360 -0
  127. package/fesm2022/tree-key-manager.mjs.map +1 -0
  128. package/fesm2022/tree.mjs +1800 -0
  129. package/fesm2022/tree.mjs.map +1 -0
  130. package/fesm2022/typeahead.mjs +88 -0
  131. package/fesm2022/typeahead.mjs.map +1 -0
  132. package/fesm2022/unique-selection-dispatcher.mjs +49 -0
  133. package/fesm2022/unique-selection-dispatcher.mjs.map +1 -0
  134. package/focus-key-manager.d.d.ts +39 -0
  135. package/focus-monitor.d.d.ts +208 -0
  136. package/harness-environment.d.d.ts +944 -0
  137. package/index.d.ts +6 -6
  138. package/keycodes/index.d.ts +129 -249
  139. package/layout/index.d.ts +89 -90
  140. package/list-key-manager.d.d.ts +170 -0
  141. package/listbox/index.d.ts +354 -419
  142. package/menu/index.d.ts +834 -1013
  143. package/number-property.d.d.ts +16 -0
  144. package/observers/index.d.ts +84 -109
  145. package/observers/private/index.d.ts +34 -0
  146. package/overlay/_index-deprecated.scss +13 -13
  147. package/overlay/_index.scss +193 -152
  148. package/overlay/index.d.ts +328 -1343
  149. package/overlay-module.d.d.ts +801 -0
  150. package/overlay-prebuilt.css +1 -1
  151. package/package.json +177 -232
  152. package/platform/index.d.ts +67 -106
  153. package/platform.d.d.ts +33 -0
  154. package/portal/index.d.ts +51 -328
  155. package/portal-directives.d.d.ts +211 -0
  156. package/private/index.d.ts +13 -0
  157. package/schematics/collection.json +18 -0
  158. package/schematics/index.d.ts +14 -0
  159. package/schematics/index.js +37 -0
  160. package/schematics/index.js.map +1 -0
  161. package/schematics/migration.json +15 -0
  162. package/schematics/ng-add/index.d.ts +17 -0
  163. package/schematics/ng-add/index.js +31 -0
  164. package/schematics/ng-add/index.js.map +1 -0
  165. package/schematics/ng-add/schema.d.ts +11 -0
  166. package/schematics/ng-add/schema.js +10 -0
  167. package/schematics/ng-add/schema.js.map +1 -0
  168. package/schematics/ng-add/schema.json +16 -0
  169. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +53 -0
  170. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +21 -0
  171. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +25 -0
  172. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +45 -0
  173. package/schematics/ng-generate/drag-drop/index.d.ts +11 -0
  174. package/schematics/ng-generate/drag-drop/index.js +42 -0
  175. package/schematics/ng-generate/drag-drop/index.js.map +1 -0
  176. package/schematics/ng-generate/drag-drop/schema.d.ts +10 -0
  177. package/schematics/ng-generate/drag-drop/schema.js +10 -0
  178. package/schematics/ng-generate/drag-drop/schema.js.map +1 -0
  179. package/schematics/ng-generate/drag-drop/schema.json +100 -0
  180. package/schematics/ng-update/data/attribute-selectors.d.ts +15 -0
  181. package/schematics/ng-update/data/attribute-selectors.js +12 -0
  182. package/schematics/ng-update/data/attribute-selectors.js.map +1 -0
  183. package/schematics/ng-update/data/class-names.d.ts +15 -0
  184. package/schematics/ng-update/data/class-names.js +12 -0
  185. package/schematics/ng-update/data/class-names.js.map +1 -0
  186. package/schematics/ng-update/data/constructor-checks.d.ts +15 -0
  187. package/schematics/ng-update/data/constructor-checks.js +17 -0
  188. package/schematics/ng-update/data/constructor-checks.js.map +1 -0
  189. package/schematics/ng-update/data/css-selectors.d.ts +27 -0
  190. package/schematics/ng-update/data/css-selectors.js +12 -0
  191. package/schematics/ng-update/data/css-selectors.js.map +1 -0
  192. package/schematics/ng-update/data/css-tokens.d.ts +27 -0
  193. package/schematics/ng-update/data/css-tokens.js +12 -0
  194. package/schematics/ng-update/data/css-tokens.js.map +1 -0
  195. package/schematics/ng-update/data/element-selectors.d.ts +15 -0
  196. package/schematics/ng-update/data/element-selectors.js +12 -0
  197. package/schematics/ng-update/data/element-selectors.js.map +1 -0
  198. package/schematics/ng-update/data/index.d.ts +18 -0
  199. package/schematics/ng-update/data/index.js +35 -0
  200. package/schematics/ng-update/data/index.js.map +1 -0
  201. package/schematics/ng-update/data/input-names.d.ts +22 -0
  202. package/schematics/ng-update/data/input-names.js +12 -0
  203. package/schematics/ng-update/data/input-names.js.map +1 -0
  204. package/schematics/ng-update/data/method-call-checks.d.ts +17 -0
  205. package/schematics/ng-update/data/method-call-checks.js +12 -0
  206. package/schematics/ng-update/data/method-call-checks.js.map +1 -0
  207. package/schematics/ng-update/data/output-names.d.ts +22 -0
  208. package/schematics/ng-update/data/output-names.js +12 -0
  209. package/schematics/ng-update/data/output-names.js.map +1 -0
  210. package/schematics/ng-update/data/property-names.d.ts +20 -0
  211. package/schematics/ng-update/data/property-names.js +12 -0
  212. package/schematics/ng-update/data/property-names.js.map +1 -0
  213. package/schematics/ng-update/data/symbol-removal.d.ts +17 -0
  214. package/schematics/ng-update/data/symbol-removal.js +12 -0
  215. package/schematics/ng-update/data/symbol-removal.js.map +1 -0
  216. package/schematics/ng-update/devkit-file-system.d.ts +30 -0
  217. package/schematics/ng-update/devkit-file-system.js +83 -0
  218. package/schematics/ng-update/devkit-file-system.js.map +1 -0
  219. package/schematics/ng-update/devkit-migration-rule.d.ts +24 -0
  220. package/schematics/ng-update/devkit-migration-rule.js +142 -0
  221. package/schematics/ng-update/devkit-migration-rule.js.map +1 -0
  222. package/schematics/ng-update/devkit-migration.d.ts +35 -0
  223. package/schematics/ng-update/devkit-migration.js +20 -0
  224. package/schematics/ng-update/devkit-migration.js.map +1 -0
  225. package/schematics/ng-update/find-stylesheets.d.ts +16 -0
  226. package/schematics/ng-update/find-stylesheets.js +41 -0
  227. package/schematics/ng-update/find-stylesheets.js.map +1 -0
  228. package/schematics/ng-update/html-parsing/angular.d.ts +15 -0
  229. package/schematics/ng-update/html-parsing/angular.js +51 -0
  230. package/schematics/ng-update/html-parsing/angular.js.map +1 -0
  231. package/schematics/ng-update/html-parsing/elements.d.ts +24 -0
  232. package/schematics/ng-update/html-parsing/elements.js +63 -0
  233. package/schematics/ng-update/html-parsing/elements.js.map +1 -0
  234. package/schematics/ng-update/index.d.ts +10 -0
  235. package/schematics/ng-update/index.js +29 -0
  236. package/schematics/ng-update/index.js.map +1 -0
  237. package/schematics/ng-update/migrations/attribute-selectors.d.ts +26 -0
  238. package/schematics/ng-update/migrations/attribute-selectors.js +71 -0
  239. package/schematics/ng-update/migrations/attribute-selectors.js.map +1 -0
  240. package/schematics/ng-update/migrations/class-inheritance.d.ts +26 -0
  241. package/schematics/ng-update/migrations/class-inheritance.js +58 -0
  242. package/schematics/ng-update/migrations/class-inheritance.js.map +1 -0
  243. package/schematics/ng-update/migrations/class-names.d.ts +32 -0
  244. package/schematics/ng-update/migrations/class-names.js +91 -0
  245. package/schematics/ng-update/migrations/class-names.js.map +1 -0
  246. package/schematics/ng-update/migrations/constructor-signature.d.ts +29 -0
  247. package/schematics/ng-update/migrations/constructor-signature.js +139 -0
  248. package/schematics/ng-update/migrations/constructor-signature.js.map +1 -0
  249. package/schematics/ng-update/migrations/css-selectors.d.ts +26 -0
  250. package/schematics/ng-update/migrations/css-selectors.js +75 -0
  251. package/schematics/ng-update/migrations/css-selectors.js.map +1 -0
  252. package/schematics/ng-update/migrations/css-tokens.d.ts +26 -0
  253. package/schematics/ng-update/migrations/css-tokens.js +83 -0
  254. package/schematics/ng-update/migrations/css-tokens.js.map +1 -0
  255. package/schematics/ng-update/migrations/element-selectors.d.ts +26 -0
  256. package/schematics/ng-update/migrations/element-selectors.js +66 -0
  257. package/schematics/ng-update/migrations/element-selectors.js.map +1 -0
  258. package/schematics/ng-update/migrations/input-names.d.ts +26 -0
  259. package/schematics/ng-update/migrations/input-names.js +59 -0
  260. package/schematics/ng-update/migrations/input-names.js.map +1 -0
  261. package/schematics/ng-update/migrations/method-call-arguments.d.ts +22 -0
  262. package/schematics/ng-update/migrations/method-call-arguments.js +62 -0
  263. package/schematics/ng-update/migrations/method-call-arguments.js.map +1 -0
  264. package/schematics/ng-update/migrations/misc-template.d.ts +18 -0
  265. package/schematics/ng-update/migrations/misc-template.js +25 -0
  266. package/schematics/ng-update/migrations/misc-template.js.map +1 -0
  267. package/schematics/ng-update/migrations/output-names.d.ts +22 -0
  268. package/schematics/ng-update/migrations/output-names.js +46 -0
  269. package/schematics/ng-update/migrations/output-names.js.map +1 -0
  270. package/schematics/ng-update/migrations/property-names.d.ts +22 -0
  271. package/schematics/ng-update/migrations/property-names.js +60 -0
  272. package/schematics/ng-update/migrations/property-names.js.map +1 -0
  273. package/schematics/ng-update/migrations/symbol-removal.d.ts +18 -0
  274. package/schematics/ng-update/migrations/symbol-removal.js +47 -0
  275. package/schematics/ng-update/migrations/symbol-removal.js.map +1 -0
  276. package/schematics/ng-update/public-api.d.ts +19 -0
  277. package/schematics/ng-update/public-api.js +36 -0
  278. package/schematics/ng-update/public-api.js.map +1 -0
  279. package/schematics/ng-update/typescript/base-types.d.ts +10 -0
  280. package/schematics/ng-update/typescript/base-types.js +23 -0
  281. package/schematics/ng-update/typescript/base-types.js.map +1 -0
  282. package/schematics/ng-update/typescript/imports.d.ts +18 -0
  283. package/schematics/ng-update/typescript/imports.js +53 -0
  284. package/schematics/ng-update/typescript/imports.js.map +1 -0
  285. package/schematics/ng-update/typescript/literal.d.ts +18 -0
  286. package/schematics/ng-update/typescript/literal.js +32 -0
  287. package/schematics/ng-update/typescript/literal.js.map +1 -0
  288. package/schematics/ng-update/typescript/module-specifiers.d.ts +16 -0
  289. package/schematics/ng-update/typescript/module-specifiers.js +35 -0
  290. package/schematics/ng-update/typescript/module-specifiers.js.map +1 -0
  291. package/schematics/ng-update/upgrade-data.d.ts +35 -0
  292. package/schematics/ng-update/upgrade-data.js +40 -0
  293. package/schematics/ng-update/upgrade-data.js.map +1 -0
  294. package/schematics/package.json +3 -0
  295. package/schematics/paths.d.ts +11 -0
  296. package/schematics/paths.js +16 -0
  297. package/schematics/paths.js.map +1 -0
  298. package/schematics/update-tool/component-resource-collector.d.ts +44 -0
  299. package/schematics/update-tool/component-resource-collector.js +164 -0
  300. package/schematics/update-tool/component-resource-collector.js.map +1 -0
  301. package/schematics/update-tool/file-system.d.ts +72 -0
  302. package/schematics/update-tool/file-system.js +18 -0
  303. package/schematics/update-tool/file-system.js.map +1 -0
  304. package/schematics/update-tool/index.d.ts +74 -0
  305. package/schematics/update-tool/index.js +172 -0
  306. package/schematics/update-tool/index.js.map +1 -0
  307. package/schematics/update-tool/logger.d.ts +15 -0
  308. package/schematics/update-tool/logger.js +18 -0
  309. package/schematics/update-tool/logger.js.map +1 -0
  310. package/schematics/update-tool/migration.d.ts +87 -0
  311. package/schematics/update-tool/migration.js +70 -0
  312. package/schematics/update-tool/migration.js.map +1 -0
  313. package/schematics/update-tool/public-api.d.ts +16 -0
  314. package/schematics/update-tool/public-api.js +33 -0
  315. package/schematics/update-tool/public-api.js.map +1 -0
  316. package/schematics/update-tool/target-version.d.ts +16 -0
  317. package/schematics/update-tool/target-version.js +27 -0
  318. package/schematics/update-tool/target-version.js.map +1 -0
  319. package/schematics/update-tool/update-recorder.d.ts +13 -0
  320. package/schematics/update-tool/update-recorder.js +10 -0
  321. package/schematics/update-tool/update-recorder.js.map +1 -0
  322. package/schematics/update-tool/utils/decorators.d.ts +22 -0
  323. package/schematics/update-tool/utils/decorators.js +41 -0
  324. package/schematics/update-tool/utils/decorators.js.map +1 -0
  325. package/schematics/update-tool/utils/diagnostics.d.ts +11 -0
  326. package/schematics/update-tool/utils/diagnostics.js +18 -0
  327. package/schematics/update-tool/utils/diagnostics.js.map +1 -0
  328. package/schematics/update-tool/utils/functions.d.ts +14 -0
  329. package/schematics/update-tool/utils/functions.js +20 -0
  330. package/schematics/update-tool/utils/functions.js.map +1 -0
  331. package/schematics/update-tool/utils/imports.d.ts +17 -0
  332. package/schematics/update-tool/utils/imports.js +110 -0
  333. package/schematics/update-tool/utils/imports.js.map +1 -0
  334. package/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  335. package/schematics/update-tool/utils/line-mappings.js +75 -0
  336. package/schematics/update-tool/utils/line-mappings.js.map +1 -0
  337. package/schematics/update-tool/utils/parse-tsconfig.d.ts +18 -0
  338. package/schematics/update-tool/utils/parse-tsconfig.js +45 -0
  339. package/schematics/update-tool/utils/parse-tsconfig.js.map +1 -0
  340. package/schematics/update-tool/utils/property-name.d.ts +18 -0
  341. package/schematics/update-tool/utils/property-name.js +27 -0
  342. package/schematics/update-tool/utils/property-name.js.map +1 -0
  343. package/schematics/update-tool/utils/virtual-host.d.ts +36 -0
  344. package/schematics/update-tool/utils/virtual-host.js +71 -0
  345. package/schematics/update-tool/utils/virtual-host.js.map +1 -0
  346. package/schematics/update-tool/version-changes.d.ts +32 -0
  347. package/schematics/update-tool/version-changes.js +38 -0
  348. package/schematics/update-tool/version-changes.js.map +1 -0
  349. package/schematics/utils/ast/ng-module-imports.d.ts +12 -0
  350. package/schematics/utils/ast/ng-module-imports.js +82 -0
  351. package/schematics/utils/ast/ng-module-imports.js.map +1 -0
  352. package/schematics/utils/ast.d.ts +25 -0
  353. package/schematics/utils/ast.js +79 -0
  354. package/schematics/utils/ast.js.map +1 -0
  355. package/schematics/utils/build-component.d.ts +20 -0
  356. package/schematics/utils/build-component.js +189 -0
  357. package/schematics/utils/build-component.js.map +1 -0
  358. package/schematics/utils/get-project.d.ts +13 -0
  359. package/schematics/utils/get-project.js +28 -0
  360. package/schematics/utils/get-project.js.map +1 -0
  361. package/schematics/utils/html-manipulation.d.ts +15 -0
  362. package/schematics/utils/html-manipulation.js +91 -0
  363. package/schematics/utils/html-manipulation.js.map +1 -0
  364. package/schematics/utils/index.d.ts +19 -0
  365. package/schematics/utils/index.js +36 -0
  366. package/schematics/utils/index.js.map +1 -0
  367. package/schematics/utils/parse5-element.d.ts +12 -0
  368. package/schematics/utils/parse5-element.js +30 -0
  369. package/schematics/utils/parse5-element.js.map +1 -0
  370. package/schematics/utils/project-index-file.d.ts +13 -0
  371. package/schematics/utils/project-index-file.js +43 -0
  372. package/schematics/utils/project-index-file.js.map +1 -0
  373. package/schematics/utils/project-main-file.d.ts +11 -0
  374. package/schematics/utils/project-main-file.js +25 -0
  375. package/schematics/utils/project-main-file.js.map +1 -0
  376. package/schematics/utils/project-style-file.d.ts +13 -0
  377. package/schematics/utils/project-style-file.js +42 -0
  378. package/schematics/utils/project-style-file.js.map +1 -0
  379. package/schematics/utils/project-targets.d.ts +15 -0
  380. package/schematics/utils/project-targets.js +46 -0
  381. package/schematics/utils/project-targets.js.map +1 -0
  382. package/schematics/utils/project-tsconfig-paths.d.ts +14 -0
  383. package/schematics/utils/project-tsconfig-paths.js +46 -0
  384. package/schematics/utils/project-tsconfig-paths.js.map +1 -0
  385. package/schematics/utils/schematic-options.d.ts +20 -0
  386. package/schematics/utils/schematic-options.js +89 -0
  387. package/schematics/utils/schematic-options.js.map +1 -0
  388. package/scrolling/index.d.ts +62 -849
  389. package/scrolling-module.d.d.ts +551 -0
  390. package/selection-model.d.d.ts +112 -0
  391. package/stepper/index.d.ts +236 -419
  392. package/style-loader.d.d.ts +21 -0
  393. package/table/index.d.ts +901 -1483
  394. package/testing/index.d.ts +98 -0
  395. package/testing/selenium-webdriver/index.d.ts +150 -0
  396. package/testing/testbed/index.d.ts +157 -0
  397. package/text-field/_index.scss +89 -89
  398. package/text-field/index.d.ts +154 -203
  399. package/text-field-prebuilt.css +1 -1
  400. package/tree/index.d.ts +720 -593
  401. package/tree-key-manager-strategy.d.d.ts +116 -0
  402. package/unique-selection-dispatcher.d.d.ts +33 -0
  403. package/view-repeater.d.d.ts +88 -0
  404. package/a11y/_index.import.scss +0 -2
  405. package/esm2020/a11y/a11y-module.mjs +0 -32
  406. package/esm2020/a11y/a11y_public_index.mjs +0 -5
  407. package/esm2020/a11y/aria-describer/aria-describer.mjs +0 -232
  408. package/esm2020/a11y/aria-describer/aria-reference.mjs +0 -44
  409. package/esm2020/a11y/fake-event-detection.mjs +0 -31
  410. package/esm2020/a11y/focus-monitor/focus-monitor.mjs +0 -451
  411. package/esm2020/a11y/focus-trap/configurable-focus-trap-config.mjs +0 -9
  412. package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +0 -53
  413. package/esm2020/a11y/focus-trap/configurable-focus-trap.mjs +0 -51
  414. package/esm2020/a11y/focus-trap/event-listener-inert-strategy.mjs +0 -61
  415. package/esm2020/a11y/focus-trap/focus-trap-inert-strategy.mjs +0 -11
  416. package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +0 -53
  417. package/esm2020/a11y/focus-trap/focus-trap.mjs +0 -402
  418. package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +0 -109
  419. package/esm2020/a11y/index.mjs +0 -9
  420. package/esm2020/a11y/input-modality/input-modality-detector.mjs +0 -176
  421. package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +0 -238
  422. package/esm2020/a11y/key-manager/activedescendant-key-manager.mjs +0 -20
  423. package/esm2020/a11y/key-manager/focus-key-manager.mjs +0 -29
  424. package/esm2020/a11y/key-manager/list-key-manager.mjs +0 -321
  425. package/esm2020/a11y/live-announcer/live-announcer-tokens.mjs +0 -19
  426. package/esm2020/a11y/live-announcer/live-announcer.mjs +0 -178
  427. package/esm2020/a11y/public-api.mjs +0 -26
  428. package/esm2020/accordion/accordion-item.mjs +0 -167
  429. package/esm2020/accordion/accordion-module.mjs +0 -24
  430. package/esm2020/accordion/accordion.mjs +0 -70
  431. package/esm2020/accordion/accordion_public_index.mjs +0 -5
  432. package/esm2020/accordion/index.mjs +0 -9
  433. package/esm2020/accordion/public-api.mjs +0 -11
  434. package/esm2020/bidi/bidi-module.mjs +0 -23
  435. package/esm2020/bidi/bidi_public_index.mjs +0 -5
  436. package/esm2020/bidi/dir-document-token.mjs +0 -33
  437. package/esm2020/bidi/dir.mjs +0 -69
  438. package/esm2020/bidi/directionality.mjs +0 -52
  439. package/esm2020/bidi/index.mjs +0 -9
  440. package/esm2020/bidi/public-api.mjs +0 -12
  441. package/esm2020/clipboard/clipboard-module.mjs +0 -23
  442. package/esm2020/clipboard/clipboard.mjs +0 -53
  443. package/esm2020/clipboard/clipboard_public_index.mjs +0 -5
  444. package/esm2020/clipboard/copy-to-clipboard.mjs +0 -99
  445. package/esm2020/clipboard/index.mjs +0 -9
  446. package/esm2020/clipboard/pending-copy.mjs +0 -69
  447. package/esm2020/clipboard/public-api.mjs +0 -12
  448. package/esm2020/coercion/array.mjs +0 -11
  449. package/esm2020/coercion/boolean-property.mjs +0 -12
  450. package/esm2020/coercion/css-pixel-value.mjs +0 -15
  451. package/esm2020/coercion/element.mjs +0 -16
  452. package/esm2020/coercion/index.mjs +0 -9
  453. package/esm2020/coercion/number-property.mjs +0 -21
  454. package/esm2020/coercion/public-api.mjs +0 -14
  455. package/esm2020/coercion/string-array.mjs +0 -38
  456. package/esm2020/collections/array-data-source.mjs +0 -21
  457. package/esm2020/collections/collection-viewer.mjs +0 -9
  458. package/esm2020/collections/collections_public_index.mjs +0 -5
  459. package/esm2020/collections/data-source.mjs +0 -19
  460. package/esm2020/collections/dispose-view-repeater-strategy.mjs +0 -47
  461. package/esm2020/collections/index.mjs +0 -9
  462. package/esm2020/collections/public-api.mjs +0 -17
  463. package/esm2020/collections/recycle-view-repeater-strategy.mjs +0 -128
  464. package/esm2020/collections/selection-model.mjs +0 -216
  465. package/esm2020/collections/tree-adapter.mjs +0 -9
  466. package/esm2020/collections/unique-selection-dispatcher.mjs +0 -55
  467. package/esm2020/collections/view-repeater.mjs +0 -14
  468. package/esm2020/dialog/dialog-config.mjs +0 -63
  469. package/esm2020/dialog/dialog-container.mjs +0 -278
  470. package/esm2020/dialog/dialog-injectors.mjs +0 -26
  471. package/esm2020/dialog/dialog-module.mjs +0 -42
  472. package/esm2020/dialog/dialog-ref.mjs +0 -76
  473. package/esm2020/dialog/dialog.mjs +0 -301
  474. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  475. package/esm2020/dialog/index.mjs +0 -9
  476. package/esm2020/dialog/public-api.mjs +0 -14
  477. package/esm2020/drag-drop/directives/assertions.mjs +0 -18
  478. package/esm2020/drag-drop/directives/config.mjs +0 -14
  479. package/esm2020/drag-drop/directives/drag-handle.mjs +0 -66
  480. package/esm2020/drag-drop/directives/drag-placeholder.mjs +0 -36
  481. package/esm2020/drag-drop/directives/drag-preview.mjs +0 -47
  482. package/esm2020/drag-drop/directives/drag.mjs +0 -487
  483. package/esm2020/drag-drop/directives/drop-list-group.mjs +0 -53
  484. package/esm2020/drag-drop/directives/drop-list.mjs +0 -345
  485. package/esm2020/drag-drop/dom/client-rect.mjs +0 -64
  486. package/esm2020/drag-drop/dom/clone-node.mjs +0 -65
  487. package/esm2020/drag-drop/dom/parent-position-tracker.mjs +0 -76
  488. package/esm2020/drag-drop/dom/styling.mjs +0 -69
  489. package/esm2020/drag-drop/dom/transition-duration.mjs +0 -36
  490. package/esm2020/drag-drop/drag-drop-module.mjs +0 -57
  491. package/esm2020/drag-drop/drag-drop-registry.mjs +0 -231
  492. package/esm2020/drag-drop/drag-drop.mjs +0 -57
  493. package/esm2020/drag-drop/drag-drop_public_index.mjs +0 -5
  494. package/esm2020/drag-drop/drag-events.mjs +0 -9
  495. package/esm2020/drag-drop/drag-parent.mjs +0 -16
  496. package/esm2020/drag-drop/drag-ref.mjs +0 -1146
  497. package/esm2020/drag-drop/drag-utils.mjs +0 -60
  498. package/esm2020/drag-drop/drop-list-ref.mjs +0 -577
  499. package/esm2020/drag-drop/index.mjs +0 -9
  500. package/esm2020/drag-drop/public-api.mjs +0 -23
  501. package/esm2020/drag-drop/sorting/drop-list-sort-strategy.mjs +0 -9
  502. package/esm2020/drag-drop/sorting/single-axis-sort-strategy.mjs +0 -341
  503. package/esm2020/index.mjs +0 -9
  504. package/esm2020/keycodes/index.mjs +0 -9
  505. package/esm2020/keycodes/keycodes.mjs +0 -127
  506. package/esm2020/keycodes/keycodes_public_index.mjs +0 -5
  507. package/esm2020/keycodes/modifiers.mjs +0 -18
  508. package/esm2020/keycodes/public-api.mjs +0 -10
  509. package/esm2020/layout/breakpoints-observer.mjs +0 -105
  510. package/esm2020/layout/breakpoints.mjs +0 -29
  511. package/esm2020/layout/index.mjs +0 -9
  512. package/esm2020/layout/layout-module.mjs +0 -19
  513. package/esm2020/layout/layout_public_index.mjs +0 -5
  514. package/esm2020/layout/media-matcher.mjs +0 -85
  515. package/esm2020/layout/public-api.mjs +0 -12
  516. package/esm2020/listbox/index.mjs +0 -9
  517. package/esm2020/listbox/listbox-module.mjs +0 -24
  518. package/esm2020/listbox/listbox.mjs +0 -872
  519. package/esm2020/listbox/listbox_public_index.mjs +0 -5
  520. package/esm2020/listbox/public-api.mjs +0 -10
  521. package/esm2020/menu/context-menu-trigger.mjs +0 -212
  522. package/esm2020/menu/index.mjs +0 -9
  523. package/esm2020/menu/menu-aim.mjs +0 -203
  524. package/esm2020/menu/menu-bar.mjs +0 -133
  525. package/esm2020/menu/menu-base.mjs +0 -187
  526. package/esm2020/menu/menu-errors.mjs +0 -22
  527. package/esm2020/menu/menu-group.mjs +0 -30
  528. package/esm2020/menu/menu-interface.mjs +0 -11
  529. package/esm2020/menu/menu-item-checkbox.mjs +0 -49
  530. package/esm2020/menu/menu-item-radio.mjs +0 -71
  531. package/esm2020/menu/menu-item-selectable.mjs +0 -42
  532. package/esm2020/menu/menu-item.mjs +0 -267
  533. package/esm2020/menu/menu-module.mjs +0 -62
  534. package/esm2020/menu/menu-stack.mjs +0 -156
  535. package/esm2020/menu/menu-trigger-base.mjs +0 -107
  536. package/esm2020/menu/menu-trigger.mjs +0 -291
  537. package/esm2020/menu/menu.mjs +0 -134
  538. package/esm2020/menu/menu_public_index.mjs +0 -5
  539. package/esm2020/menu/pointer-focus-tracker.mjs +0 -51
  540. package/esm2020/menu/public-api.mjs +0 -24
  541. package/esm2020/observers/index.mjs +0 -9
  542. package/esm2020/observers/observe-content.mjs +0 -187
  543. package/esm2020/observers/observers_public_index.mjs +0 -5
  544. package/esm2020/observers/public-api.mjs +0 -9
  545. package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +0 -52
  546. package/esm2020/overlay/dispatchers/index.mjs +0 -10
  547. package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +0 -81
  548. package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +0 -138
  549. package/esm2020/overlay/fullscreen-overlay-container.mjs +0 -94
  550. package/esm2020/overlay/index.mjs +0 -9
  551. package/esm2020/overlay/overlay-config.mjs +0 -45
  552. package/esm2020/overlay/overlay-container.mjs +0 -81
  553. package/esm2020/overlay/overlay-directives.mjs +0 -427
  554. package/esm2020/overlay/overlay-module.mjs +0 -29
  555. package/esm2020/overlay/overlay-ref.mjs +0 -427
  556. package/esm2020/overlay/overlay-reference.mjs +0 -9
  557. package/esm2020/overlay/overlay.mjs +0 -125
  558. package/esm2020/overlay/overlay_public_index.mjs +0 -5
  559. package/esm2020/overlay/position/connected-position.mjs +0 -88
  560. package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +0 -985
  561. package/esm2020/overlay/position/global-position-strategy.mjs +0 -237
  562. package/esm2020/overlay/position/overlay-position-builder.mjs +0 -50
  563. package/esm2020/overlay/position/position-strategy.mjs +0 -9
  564. package/esm2020/overlay/position/scroll-clip.mjs +0 -40
  565. package/esm2020/overlay/public-api.mjs +0 -22
  566. package/esm2020/overlay/scroll/block-scroll-strategy.mjs +0 -80
  567. package/esm2020/overlay/scroll/close-scroll-strategy.mjs +0 -61
  568. package/esm2020/overlay/scroll/index.mjs +0 -14
  569. package/esm2020/overlay/scroll/noop-scroll-strategy.mjs +0 -17
  570. package/esm2020/overlay/scroll/reposition-scroll-strategy.mjs +0 -61
  571. package/esm2020/overlay/scroll/scroll-strategy-options.mjs +0 -55
  572. package/esm2020/overlay/scroll/scroll-strategy.mjs +0 -14
  573. package/esm2020/platform/features/input-types.mjs +0 -59
  574. package/esm2020/platform/features/passive-listeners.mjs +0 -36
  575. package/esm2020/platform/features/scrolling.mjs +0 -85
  576. package/esm2020/platform/features/shadow-dom.mjs +0 -54
  577. package/esm2020/platform/features/test-environment.mjs +0 -24
  578. package/esm2020/platform/index.mjs +0 -9
  579. package/esm2020/platform/platform-module.mjs +0 -19
  580. package/esm2020/platform/platform.mjs +0 -85
  581. package/esm2020/platform/platform_public_index.mjs +0 -5
  582. package/esm2020/platform/public-api.mjs +0 -15
  583. package/esm2020/portal/dom-portal-outlet.mjs +0 -158
  584. package/esm2020/portal/index.mjs +0 -9
  585. package/esm2020/portal/portal-directives.mjs +0 -246
  586. package/esm2020/portal/portal-errors.mjs +0 -51
  587. package/esm2020/portal/portal-injector.mjs +0 -28
  588. package/esm2020/portal/portal.mjs +0 -188
  589. package/esm2020/portal/portal_public_index.mjs +0 -5
  590. package/esm2020/portal/public-api.mjs +0 -12
  591. package/esm2020/public-api.mjs +0 -9
  592. package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +0 -217
  593. package/esm2020/scrolling/index.mjs +0 -9
  594. package/esm2020/scrolling/public-api.mjs +0 -20
  595. package/esm2020/scrolling/scroll-dispatcher.mjs +0 -163
  596. package/esm2020/scrolling/scrollable.mjs +0 -176
  597. package/esm2020/scrolling/scrolling-module.mjs +0 -67
  598. package/esm2020/scrolling/scrolling_public_index.mjs +0 -5
  599. package/esm2020/scrolling/viewport-ruler.mjs +0 -146
  600. package/esm2020/scrolling/virtual-for-of.mjs +0 -298
  601. package/esm2020/scrolling/virtual-scroll-repeater.mjs +0 -9
  602. package/esm2020/scrolling/virtual-scroll-strategy.mjs +0 -11
  603. package/esm2020/scrolling/virtual-scroll-viewport.mjs +0 -437
  604. package/esm2020/scrolling/virtual-scrollable-element.mjs +0 -41
  605. package/esm2020/scrolling/virtual-scrollable-window.mjs +0 -40
  606. package/esm2020/scrolling/virtual-scrollable.mjs +0 -40
  607. package/esm2020/stepper/index.mjs +0 -9
  608. package/esm2020/stepper/public-api.mjs +0 -13
  609. package/esm2020/stepper/step-header.mjs +0 -30
  610. package/esm2020/stepper/step-label.mjs +0 -23
  611. package/esm2020/stepper/stepper-button.mjs +0 -56
  612. package/esm2020/stepper/stepper-module.mjs +0 -40
  613. package/esm2020/stepper/stepper.mjs +0 -458
  614. package/esm2020/stepper/stepper_public_index.mjs +0 -5
  615. package/esm2020/table/can-stick.mjs +0 -44
  616. package/esm2020/table/cell.mjs +0 -217
  617. package/esm2020/table/coalesced-style-scheduler.mjs +0 -91
  618. package/esm2020/table/index.mjs +0 -9
  619. package/esm2020/table/public-api.mjs +0 -20
  620. package/esm2020/table/row.mjs +0 -262
  621. package/esm2020/table/sticky-position-listener.mjs +0 -11
  622. package/esm2020/table/sticky-styler.mjs +0 -345
  623. package/esm2020/table/table-errors.mjs +0 -67
  624. package/esm2020/table/table-module.mjs +0 -94
  625. package/esm2020/table/table.mjs +0 -1065
  626. package/esm2020/table/table_public_index.mjs +0 -5
  627. package/esm2020/table/text-column.mjs +0 -153
  628. package/esm2020/table/tokens.mjs +0 -16
  629. package/esm2020/text-field/autofill.mjs +0 -113
  630. package/esm2020/text-field/autosize.mjs +0 -309
  631. package/esm2020/text-field/index.mjs +0 -9
  632. package/esm2020/text-field/public-api.mjs +0 -11
  633. package/esm2020/text-field/text-field-module.mjs +0 -24
  634. package/esm2020/text-field/text-field_public_index.mjs +0 -5
  635. package/esm2020/tree/control/base-tree-control.mjs +0 -57
  636. package/esm2020/tree/control/flat-tree-control.mjs +0 -51
  637. package/esm2020/tree/control/nested-tree-control.mjs +0 -58
  638. package/esm2020/tree/control/tree-control.mjs +0 -2
  639. package/esm2020/tree/index.mjs +0 -9
  640. package/esm2020/tree/nested-node.mjs +0 -112
  641. package/esm2020/tree/node.mjs +0 -35
  642. package/esm2020/tree/outlet.mjs +0 -39
  643. package/esm2020/tree/padding.mjs +0 -131
  644. package/esm2020/tree/public-api.mjs +0 -20
  645. package/esm2020/tree/toggle.mjs +0 -50
  646. package/esm2020/tree/tree-errors.mjs +0 -43
  647. package/esm2020/tree/tree-module.mjs +0 -49
  648. package/esm2020/tree/tree.mjs +0 -347
  649. package/esm2020/tree/tree_public_index.mjs +0 -5
  650. package/esm2020/version.mjs +0 -11
  651. package/fesm2015/a11y.mjs +0 -2473
  652. package/fesm2015/a11y.mjs.map +0 -1
  653. package/fesm2015/accordion.mjs +0 -414
  654. package/fesm2015/accordion.mjs.map +0 -1
  655. package/fesm2015/bidi.mjs +0 -194
  656. package/fesm2015/bidi.mjs.map +0 -1
  657. package/fesm2015/cdk.mjs +0 -30
  658. package/fesm2015/cdk.mjs.map +0 -1
  659. package/fesm2015/clipboard.mjs +0 -263
  660. package/fesm2015/clipboard.mjs.map +0 -1
  661. package/fesm2015/coercion.mjs +0 -132
  662. package/fesm2015/coercion.mjs.map +0 -1
  663. package/fesm2015/collections.mjs +0 -519
  664. package/fesm2015/collections.mjs.map +0 -1
  665. package/fesm2015/dialog.mjs +0 -1050
  666. package/fesm2015/dialog.mjs.map +0 -1
  667. package/fesm2015/drag-drop.mjs +0 -3812
  668. package/fesm2015/drag-drop.mjs.map +0 -1
  669. package/fesm2015/keycodes.mjs.map +0 -1
  670. package/fesm2015/layout.mjs +0 -337
  671. package/fesm2015/layout.mjs.map +0 -1
  672. package/fesm2015/listbox.mjs +0 -1200
  673. package/fesm2015/listbox.mjs.map +0 -1
  674. package/fesm2015/menu.mjs +0 -2719
  675. package/fesm2015/menu.mjs.map +0 -1
  676. package/fesm2015/observers.mjs +0 -326
  677. package/fesm2015/observers.mjs.map +0 -1
  678. package/fesm2015/overlay.mjs +0 -3137
  679. package/fesm2015/overlay.mjs.map +0 -1
  680. package/fesm2015/platform.mjs +0 -385
  681. package/fesm2015/platform.mjs.map +0 -1
  682. package/fesm2015/portal.mjs +0 -691
  683. package/fesm2015/portal.mjs.map +0 -1
  684. package/fesm2015/scrolling.mjs.map +0 -1
  685. package/fesm2015/stepper.mjs +0 -989
  686. package/fesm2015/stepper.mjs.map +0 -1
  687. package/fesm2015/table.mjs +0 -2356
  688. package/fesm2015/table.mjs.map +0 -1
  689. package/fesm2015/testing.mjs +0 -833
  690. package/fesm2015/testing.mjs.map +0 -1
  691. package/fesm2015/text-field.mjs +0 -461
  692. package/fesm2015/text-field.mjs.map +0 -1
  693. package/fesm2015/tree.mjs +0 -1303
  694. package/fesm2015/tree.mjs.map +0 -1
  695. package/fesm2020/a11y.mjs +0 -2476
  696. package/fesm2020/a11y.mjs.map +0 -1
  697. package/fesm2020/accordion.mjs +0 -414
  698. package/fesm2020/accordion.mjs.map +0 -1
  699. package/fesm2020/bidi.mjs +0 -192
  700. package/fesm2020/bidi.mjs.map +0 -1
  701. package/fesm2020/cdk.mjs +0 -30
  702. package/fesm2020/cdk.mjs.map +0 -1
  703. package/fesm2020/clipboard.mjs.map +0 -1
  704. package/fesm2020/coercion.mjs +0 -132
  705. package/fesm2020/coercion.mjs.map +0 -1
  706. package/fesm2020/collections.mjs +0 -535
  707. package/fesm2020/collections.mjs.map +0 -1
  708. package/fesm2020/dialog.mjs.map +0 -1
  709. package/fesm2020/drag-drop.mjs.map +0 -1
  710. package/fesm2020/keycodes.mjs +0 -167
  711. package/fesm2020/keycodes.mjs.map +0 -1
  712. package/fesm2020/layout.mjs +0 -337
  713. package/fesm2020/layout.mjs.map +0 -1
  714. package/fesm2020/listbox.mjs +0 -1164
  715. package/fesm2020/listbox.mjs.map +0 -1
  716. package/fesm2020/menu.mjs +0 -2615
  717. package/fesm2020/menu.mjs.map +0 -1
  718. package/fesm2020/observers.mjs +0 -325
  719. package/fesm2020/observers.mjs.map +0 -1
  720. package/fesm2020/overlay.mjs.map +0 -1
  721. package/fesm2020/platform.mjs +0 -383
  722. package/fesm2020/platform.mjs.map +0 -1
  723. package/fesm2020/portal.mjs.map +0 -1
  724. package/fesm2020/scrolling.mjs +0 -1591
  725. package/fesm2020/scrolling.mjs.map +0 -1
  726. package/fesm2020/stepper.mjs +0 -985
  727. package/fesm2020/stepper.mjs.map +0 -1
  728. package/fesm2020/table.mjs.map +0 -1
  729. package/fesm2020/testing.mjs +0 -797
  730. package/fesm2020/testing.mjs.map +0 -1
  731. package/fesm2020/text-field.mjs.map +0 -1
  732. package/fesm2020/tree.mjs +0 -1305
  733. package/fesm2020/tree.mjs.map +0 -1
  734. package/overlay/_index.import.scss +0 -13
  735. package/text-field/_index.import.scss +0 -2
@@ -1,1164 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import {
3
- inject,
4
- ElementRef,
5
- Directive,
6
- Input,
7
- ChangeDetectorRef,
8
- InjectFlags,
9
- forwardRef,
10
- Output,
11
- ContentChildren,
12
- NgModule,
13
- } from '@angular/core';
14
- import { ActiveDescendantKeyManager } from '@kato-lee/cdk/a11y';
15
- import {
16
- A,
17
- hasModifierKey,
18
- SPACE,
19
- ENTER,
20
- HOME,
21
- END,
22
- UP_ARROW,
23
- DOWN_ARROW,
24
- LEFT_ARROW,
25
- RIGHT_ARROW,
26
- } from '@kato-lee/cdk/keycodes';
27
- import { coerceBooleanProperty, coerceArray } from '@kato-lee/cdk/coercion';
28
- import { SelectionModel } from '@kato-lee/cdk/collections';
29
- import { Subject, defer, merge } from 'rxjs';
30
- import { startWith, switchMap, map, takeUntil, filter } from 'rxjs/operators';
31
- import { Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
32
- import { Directionality } from '@kato-lee/cdk/bidi';
33
-
34
- /**
35
- * @license
36
- * Copyright Google LLC All Rights Reserved.
37
- *
38
- * Use of this source code is governed by an MIT-style license that can be
39
- * found in the LICENSE file at https://angular.io/license
40
- */
41
- /** The next id to use for creating unique DOM IDs. */
42
- let nextId = 0;
43
- /**
44
- * An implementation of SelectionModel that internally always represents the selection as a
45
- * multi-selection. This is necessary so that we can recover the full selection if the user
46
- * switches the listbox from single-selection to multi-selection after initialization.
47
- *
48
- * This selection model may report multiple selected values, even if it is in single-selection
49
- * mode. It is up to the user (CdkListbox) to check for invalid selections.
50
- */
51
- class ListboxSelectionModel extends SelectionModel {
52
- constructor(multiple = false, initiallySelectedValues, emitChanges = true, compareWith) {
53
- super(true, initiallySelectedValues, emitChanges, compareWith);
54
- this.multiple = multiple;
55
- }
56
- isMultipleSelection() {
57
- return this.multiple;
58
- }
59
- select(...values) {
60
- // The super class is always in multi-selection mode, so we need to override the behavior if
61
- // this selection model actually belongs to a single-selection listbox.
62
- if (this.multiple) {
63
- return super.select(...values);
64
- } else {
65
- return super.setSelection(...values);
66
- }
67
- }
68
- }
69
- /** A selectable option in a listbox. */
70
- class CdkOption {
71
- constructor() {
72
- this._generatedId = `cdk-option-${nextId++}`;
73
- this._disabled = false;
74
- /** The option's host element */
75
- this.element = inject(ElementRef).nativeElement;
76
- /** The parent listbox this option belongs to. */
77
- this.listbox = inject(CdkListbox);
78
- /** Emits when the option is destroyed. */
79
- this.destroyed = new Subject();
80
- /** Emits when the option is clicked. */
81
- this._clicked = new Subject();
82
- /** Whether the option is currently active. */
83
- this._active = false;
84
- }
85
- /** The id of the option's host element. */
86
- get id() {
87
- return this._id || this._generatedId;
88
- }
89
- set id(value) {
90
- this._id = value;
91
- }
92
- /** Whether this option is disabled. */
93
- get disabled() {
94
- return this.listbox.disabled || this._disabled;
95
- }
96
- set disabled(value) {
97
- this._disabled = coerceBooleanProperty(value);
98
- }
99
- /** The tabindex of the option when it is enabled. */
100
- get enabledTabIndex() {
101
- return this._enabledTabIndex === undefined
102
- ? this.listbox.enabledTabIndex
103
- : this._enabledTabIndex;
104
- }
105
- set enabledTabIndex(value) {
106
- this._enabledTabIndex = value;
107
- }
108
- ngOnDestroy() {
109
- this.destroyed.next();
110
- this.destroyed.complete();
111
- }
112
- /** Whether this option is selected. */
113
- isSelected() {
114
- return this.listbox.isSelected(this);
115
- }
116
- /** Whether this option is active. */
117
- isActive() {
118
- return this._active;
119
- }
120
- /** Toggle the selected state of this option. */
121
- toggle() {
122
- this.listbox.toggle(this);
123
- }
124
- /** Select this option if it is not selected. */
125
- select() {
126
- this.listbox.select(this);
127
- }
128
- /** Deselect this option if it is selected. */
129
- deselect() {
130
- this.listbox.deselect(this);
131
- }
132
- /** Focus this option. */
133
- focus() {
134
- this.element.focus();
135
- }
136
- /** Get the label for this element which is required by the FocusableOption interface. */
137
- getLabel() {
138
- return (this.typeaheadLabel ?? this.element.textContent?.trim()) || '';
139
- }
140
- /**
141
- * Set the option as active.
142
- * @docs-private
143
- */
144
- setActiveStyles() {
145
- this._active = true;
146
- }
147
- /**
148
- * Set the option as inactive.
149
- * @docs-private
150
- */
151
- setInactiveStyles() {
152
- this._active = false;
153
- }
154
- /** Handle focus events on the option. */
155
- _handleFocus() {
156
- // Options can wind up getting focused in active descendant mode if the user clicks on them.
157
- // In this case, we push focus back to the parent listbox to prevent an extra tab stop when
158
- // the user performs a shift+tab.
159
- if (this.listbox.useActiveDescendant) {
160
- this.listbox._setActiveOption(this);
161
- this.listbox.focus();
162
- }
163
- }
164
- /** Get the tabindex for this option. */
165
- _getTabIndex() {
166
- if (this.listbox.useActiveDescendant || this.disabled) {
167
- return -1;
168
- }
169
- return this.isActive() ? this.enabledTabIndex : -1;
170
- }
171
- }
172
- CdkOption.ɵfac = i0.ɵɵngDeclareFactory({
173
- minVersion: '12.0.0',
174
- version: '14.2.0',
175
- ngImport: i0,
176
- type: CdkOption,
177
- deps: [],
178
- target: i0.ɵɵFactoryTarget.Directive,
179
- });
180
- CdkOption.ɵdir = i0.ɵɵngDeclareDirective({
181
- minVersion: '14.0.0',
182
- version: '14.2.0',
183
- type: CdkOption,
184
- selector: '[cdkOption]',
185
- inputs: {
186
- id: 'id',
187
- value: ['cdkOption', 'value'],
188
- typeaheadLabel: ['cdkOptionTypeaheadLabel', 'typeaheadLabel'],
189
- disabled: ['cdkOptionDisabled', 'disabled'],
190
- enabledTabIndex: ['tabindex', 'enabledTabIndex'],
191
- },
192
- host: {
193
- attributes: { role: 'option' },
194
- listeners: { click: '_clicked.next($event)', focus: '_handleFocus()' },
195
- properties: {
196
- id: 'id',
197
- 'attr.aria-selected': 'isSelected()',
198
- 'attr.tabindex': '_getTabIndex()',
199
- 'attr.aria-disabled': 'disabled',
200
- 'class.cdk-option-active': 'isActive()',
201
- },
202
- classAttribute: 'cdk-option',
203
- },
204
- exportAs: ['cdkOption'],
205
- ngImport: i0,
206
- });
207
- i0.ɵɵngDeclareClassMetadata({
208
- minVersion: '12.0.0',
209
- version: '14.2.0',
210
- ngImport: i0,
211
- type: CdkOption,
212
- decorators: [
213
- {
214
- type: Directive,
215
- args: [
216
- {
217
- selector: '[cdkOption]',
218
- exportAs: 'cdkOption',
219
- host: {
220
- role: 'option',
221
- class: 'cdk-option',
222
- '[id]': 'id',
223
- '[attr.aria-selected]': 'isSelected()',
224
- '[attr.tabindex]': '_getTabIndex()',
225
- '[attr.aria-disabled]': 'disabled',
226
- '[class.cdk-option-active]': 'isActive()',
227
- '(click)': '_clicked.next($event)',
228
- '(focus)': '_handleFocus()',
229
- },
230
- },
231
- ],
232
- },
233
- ],
234
- propDecorators: {
235
- id: [
236
- {
237
- type: Input,
238
- },
239
- ],
240
- value: [
241
- {
242
- type: Input,
243
- args: ['cdkOption'],
244
- },
245
- ],
246
- typeaheadLabel: [
247
- {
248
- type: Input,
249
- args: ['cdkOptionTypeaheadLabel'],
250
- },
251
- ],
252
- disabled: [
253
- {
254
- type: Input,
255
- args: ['cdkOptionDisabled'],
256
- },
257
- ],
258
- enabledTabIndex: [
259
- {
260
- type: Input,
261
- args: ['tabindex'],
262
- },
263
- ],
264
- },
265
- });
266
- class CdkListbox {
267
- constructor() {
268
- this._generatedId = `cdk-listbox-${nextId++}`;
269
- this._disabled = false;
270
- this._useActiveDescendant = false;
271
- this._orientation = 'vertical';
272
- this._navigationWrapDisabled = false;
273
- this._navigateDisabledOptions = false;
274
- /** Emits when the selected value(s) in the listbox change. */
275
- this.valueChange = new Subject();
276
- /** The selection model used by the listbox. */
277
- this.selectionModel = new ListboxSelectionModel();
278
- /** Emits when the listbox is destroyed. */
279
- this.destroyed = new Subject();
280
- /** The host element of the listbox. */
281
- this.element = inject(ElementRef).nativeElement;
282
- /** The change detector for this listbox. */
283
- this.changeDetectorRef = inject(ChangeDetectorRef);
284
- /** Whether the currently selected value in the selection model is invalid. */
285
- this._invalid = false;
286
- /** The last user-triggered option. */
287
- this._lastTriggered = null;
288
- /** Callback called when the listbox has been touched */
289
- this._onTouched = () => {};
290
- /** Callback called when the listbox value changes */
291
- this._onChange = () => {};
292
- /** Callback called when the form validator changes. */
293
- this._onValidatorChange = () => {};
294
- /** Emits when an option has been clicked. */
295
- this._optionClicked = defer(() =>
296
- this.options.changes.pipe(
297
- startWith(this.options),
298
- switchMap(options =>
299
- merge(...options.map(option => option._clicked.pipe(map(event => ({ option, event })))))
300
- )
301
- )
302
- );
303
- /** The directionality of the page. */
304
- this._dir = inject(Directionality, InjectFlags.Optional);
305
- /** A predicate that skips disabled options. */
306
- this._skipDisabledPredicate = option => option.disabled;
307
- /** A predicate that does not skip any options. */
308
- this._skipNonePredicate = () => false;
309
- /**
310
- * Validator that produces an error if multiple values are selected in a single selection
311
- * listbox.
312
- * @param control The control to validate
313
- * @return A validation error or null
314
- */
315
- this._validateUnexpectedMultipleValues = control => {
316
- const controlValue = this._coerceValue(control.value);
317
- if (!this.multiple && controlValue.length > 1) {
318
- return { cdkListboxUnexpectedMultipleValues: true };
319
- }
320
- return null;
321
- };
322
- /**
323
- * Validator that produces an error if any selected values are not valid options for this listbox.
324
- * @param control The control to validate
325
- * @return A validation error or null
326
- */
327
- this._validateUnexpectedOptionValues = control => {
328
- const controlValue = this._coerceValue(control.value);
329
- const invalidValues = this._getInvalidOptionValues(controlValue);
330
- if (invalidValues.length) {
331
- return { cdkListboxUnexpectedOptionValues: { values: invalidValues } };
332
- }
333
- return null;
334
- };
335
- /** The combined set of validators for this listbox. */
336
- this._validators = Validators.compose([
337
- this._validateUnexpectedMultipleValues,
338
- this._validateUnexpectedOptionValues,
339
- ]);
340
- }
341
- /** The id of the option's host element. */
342
- get id() {
343
- return this._id || this._generatedId;
344
- }
345
- set id(value) {
346
- this._id = value;
347
- }
348
- /** The tabindex to use when the listbox is enabled. */
349
- get enabledTabIndex() {
350
- return this._enabledTabIndex === undefined ? 0 : this._enabledTabIndex;
351
- }
352
- set enabledTabIndex(value) {
353
- this._enabledTabIndex = value;
354
- }
355
- /** The value selected in the listbox, represented as an array of option values. */
356
- get value() {
357
- return this._invalid ? [] : this.selectionModel.selected;
358
- }
359
- set value(value) {
360
- this._setSelection(value);
361
- }
362
- /**
363
- * Whether the listbox allows multiple options to be selected. If the value switches from `true`
364
- * to `false`, and more than one option is selected, all options are deselected.
365
- */
366
- get multiple() {
367
- return this.selectionModel.multiple;
368
- }
369
- set multiple(value) {
370
- this.selectionModel.multiple = coerceBooleanProperty(value);
371
- if (this.options) {
372
- this._updateInternalValue();
373
- }
374
- }
375
- /** Whether the listbox is disabled. */
376
- get disabled() {
377
- return this._disabled;
378
- }
379
- set disabled(value) {
380
- this._disabled = coerceBooleanProperty(value);
381
- }
382
- /** Whether the listbox will use active descendant or will move focus onto the options. */
383
- get useActiveDescendant() {
384
- return this._useActiveDescendant;
385
- }
386
- set useActiveDescendant(shouldUseActiveDescendant) {
387
- this._useActiveDescendant = coerceBooleanProperty(shouldUseActiveDescendant);
388
- }
389
- /** The orientation of the listbox. Only affects keyboard interaction, not visual layout. */
390
- get orientation() {
391
- return this._orientation;
392
- }
393
- set orientation(value) {
394
- this._orientation = value === 'horizontal' ? 'horizontal' : 'vertical';
395
- if (value === 'horizontal') {
396
- this.listKeyManager?.withHorizontalOrientation(this._dir?.value || 'ltr');
397
- } else {
398
- this.listKeyManager?.withVerticalOrientation();
399
- }
400
- }
401
- /** The function used to compare option values. */
402
- get compareWith() {
403
- return this.selectionModel.compareWith;
404
- }
405
- set compareWith(fn) {
406
- this.selectionModel.compareWith = fn;
407
- }
408
- /**
409
- * Whether the keyboard navigation should wrap when the user presses arrow down on the last item
410
- * or arrow up on the first item.
411
- */
412
- get navigationWrapDisabled() {
413
- return this._navigationWrapDisabled;
414
- }
415
- set navigationWrapDisabled(wrap) {
416
- this._navigationWrapDisabled = coerceBooleanProperty(wrap);
417
- this.listKeyManager?.withWrap(!this._navigationWrapDisabled);
418
- }
419
- /** Whether keyboard navigation should skip over disabled items. */
420
- get navigateDisabledOptions() {
421
- return this._navigateDisabledOptions;
422
- }
423
- set navigateDisabledOptions(skip) {
424
- this._navigateDisabledOptions = coerceBooleanProperty(skip);
425
- this.listKeyManager?.skipPredicate(
426
- this._navigateDisabledOptions ? this._skipNonePredicate : this._skipDisabledPredicate
427
- );
428
- }
429
- ngAfterContentInit() {
430
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
431
- this._verifyNoOptionValueCollisions();
432
- }
433
- this._initKeyManager();
434
- // Update the internal value whenever the options or the model value changes.
435
- merge(this.selectionModel.changed, this.options.changes)
436
- .pipe(startWith(null), takeUntil(this.destroyed))
437
- .subscribe(() => this._updateInternalValue());
438
- this._optionClicked
439
- .pipe(
440
- filter(({ option }) => !option.disabled),
441
- takeUntil(this.destroyed)
442
- )
443
- .subscribe(({ option, event }) => this._handleOptionClicked(option, event));
444
- }
445
- ngOnDestroy() {
446
- this.listKeyManager.change.complete();
447
- this.destroyed.next();
448
- this.destroyed.complete();
449
- }
450
- /**
451
- * Toggle the selected state of the given option.
452
- * @param option The option to toggle
453
- */
454
- toggle(option) {
455
- this.toggleValue(option.value);
456
- }
457
- /**
458
- * Toggle the selected state of the given value.
459
- * @param value The value to toggle
460
- */
461
- toggleValue(value) {
462
- if (this._invalid) {
463
- this.selectionModel.clear(false);
464
- }
465
- this.selectionModel.toggle(value);
466
- }
467
- /**
468
- * Select the given option.
469
- * @param option The option to select
470
- */
471
- select(option) {
472
- this.selectValue(option.value);
473
- }
474
- /**
475
- * Select the given value.
476
- * @param value The value to select
477
- */
478
- selectValue(value) {
479
- if (this._invalid) {
480
- this.selectionModel.clear(false);
481
- }
482
- this.selectionModel.select(value);
483
- }
484
- /**
485
- * Deselect the given option.
486
- * @param option The option to deselect
487
- */
488
- deselect(option) {
489
- this.deselectValue(option.value);
490
- }
491
- /**
492
- * Deselect the given value.
493
- * @param value The value to deselect
494
- */
495
- deselectValue(value) {
496
- if (this._invalid) {
497
- this.selectionModel.clear(false);
498
- }
499
- this.selectionModel.deselect(value);
500
- }
501
- /**
502
- * Set the selected state of all options.
503
- * @param isSelected The new selected state to set
504
- */
505
- setAllSelected(isSelected) {
506
- if (!isSelected) {
507
- this.selectionModel.clear();
508
- } else {
509
- if (this._invalid) {
510
- this.selectionModel.clear(false);
511
- }
512
- this.selectionModel.select(...this.options.map(option => option.value));
513
- }
514
- }
515
- /**
516
- * Get whether the given option is selected.
517
- * @param option The option to get the selected state of
518
- */
519
- isSelected(option) {
520
- return this.isValueSelected(option.value);
521
- }
522
- /**
523
- * Get whether the given value is selected.
524
- * @param value The value to get the selected state of
525
- */
526
- isValueSelected(value) {
527
- if (this._invalid) {
528
- return false;
529
- }
530
- return this.selectionModel.isSelected(value);
531
- }
532
- /**
533
- * Registers a callback to be invoked when the listbox's value changes from user input.
534
- * @param fn The callback to register
535
- * @docs-private
536
- */
537
- registerOnChange(fn) {
538
- this._onChange = fn;
539
- }
540
- /**
541
- * Registers a callback to be invoked when the listbox is blurred by the user.
542
- * @param fn The callback to register
543
- * @docs-private
544
- */
545
- registerOnTouched(fn) {
546
- this._onTouched = fn;
547
- }
548
- /**
549
- * Sets the listbox's value.
550
- * @param value The new value of the listbox
551
- * @docs-private
552
- */
553
- writeValue(value) {
554
- this._setSelection(value);
555
- }
556
- /**
557
- * Sets the disabled state of the listbox.
558
- * @param isDisabled The new disabled state
559
- * @docs-private
560
- */
561
- setDisabledState(isDisabled) {
562
- this.disabled = isDisabled;
563
- }
564
- /**
565
- * Validate the given control
566
- * @docs-private
567
- */
568
- validate(control) {
569
- return this._validators(control);
570
- }
571
- /**
572
- * Registers a callback to be called when the form validator changes.
573
- * @param fn The callback to call
574
- * @docs-private
575
- */
576
- registerOnValidatorChange(fn) {
577
- this._onValidatorChange = fn;
578
- }
579
- /** Focus the listbox's host element. */
580
- focus() {
581
- this.element.focus();
582
- }
583
- /**
584
- * Triggers the given option in response to user interaction.
585
- * - In single selection mode: selects the option and deselects any other selected option.
586
- * - In multi selection mode: toggles the selected state of the option.
587
- * @param option The option to trigger
588
- */
589
- triggerOption(option) {
590
- if (option && !option.disabled) {
591
- this._lastTriggered = option;
592
- const changed = this.multiple
593
- ? this.selectionModel.toggle(option.value)
594
- : this.selectionModel.select(option.value);
595
- if (changed) {
596
- this._onChange(this.value);
597
- this.valueChange.next({
598
- value: this.value,
599
- listbox: this,
600
- option: option,
601
- });
602
- }
603
- }
604
- }
605
- /**
606
- * Trigger the given range of options in response to user interaction.
607
- * Should only be called in multi-selection mode.
608
- * @param trigger The option that was triggered
609
- * @param from The start index of the options to toggle
610
- * @param to The end index of the options to toggle
611
- * @param on Whether to toggle the option range on
612
- */
613
- triggerRange(trigger, from, to, on) {
614
- if (this.disabled || (trigger && trigger.disabled)) {
615
- return;
616
- }
617
- this._lastTriggered = trigger;
618
- const isEqual = this.compareWith ?? Object.is;
619
- const updateValues = [...this.options]
620
- .slice(Math.max(0, Math.min(from, to)), Math.min(this.options.length, Math.max(from, to) + 1))
621
- .filter(option => !option.disabled)
622
- .map(option => option.value);
623
- const selected = [...this.value];
624
- for (const updateValue of updateValues) {
625
- const selectedIndex = selected.findIndex(selectedValue =>
626
- isEqual(selectedValue, updateValue)
627
- );
628
- if (on && selectedIndex === -1) {
629
- selected.push(updateValue);
630
- } else if (!on && selectedIndex !== -1) {
631
- selected.splice(selectedIndex, 1);
632
- }
633
- }
634
- let changed = this.selectionModel.setSelection(...selected);
635
- if (changed) {
636
- this._onChange(this.value);
637
- this.valueChange.next({
638
- value: this.value,
639
- listbox: this,
640
- option: trigger,
641
- });
642
- }
643
- }
644
- /**
645
- * Sets the given option as active.
646
- * @param option The option to make active
647
- */
648
- _setActiveOption(option) {
649
- this.listKeyManager.setActiveItem(option);
650
- }
651
- /** Called when the listbox receives focus. */
652
- _handleFocus() {
653
- if (!this.useActiveDescendant) {
654
- this.listKeyManager.setNextItemActive();
655
- this._focusActiveOption();
656
- }
657
- }
658
- /** Called when the user presses keydown on the listbox. */
659
- _handleKeydown(event) {
660
- if (this._disabled) {
661
- return;
662
- }
663
- const { keyCode } = event;
664
- const previousActiveIndex = this.listKeyManager.activeItemIndex;
665
- const ctrlKeys = ['ctrlKey', 'metaKey'];
666
- if (this.multiple && keyCode === A && hasModifierKey(event, ...ctrlKeys)) {
667
- // Toggle all options off if they're all selected, otherwise toggle them all on.
668
- this.triggerRange(
669
- null,
670
- 0,
671
- this.options.length - 1,
672
- this.options.length !== this.value.length
673
- );
674
- event.preventDefault();
675
- return;
676
- }
677
- if (
678
- this.multiple &&
679
- (keyCode === SPACE || keyCode === ENTER) &&
680
- hasModifierKey(event, 'shiftKey')
681
- ) {
682
- if (this.listKeyManager.activeItem && this.listKeyManager.activeItemIndex != null) {
683
- this.triggerRange(
684
- this.listKeyManager.activeItem,
685
- this._getLastTriggeredIndex() ?? this.listKeyManager.activeItemIndex,
686
- this.listKeyManager.activeItemIndex,
687
- !this.listKeyManager.activeItem.isSelected()
688
- );
689
- }
690
- event.preventDefault();
691
- return;
692
- }
693
- if (
694
- this.multiple &&
695
- keyCode === HOME &&
696
- hasModifierKey(event, ...ctrlKeys) &&
697
- hasModifierKey(event, 'shiftKey')
698
- ) {
699
- const trigger = this.listKeyManager.activeItem;
700
- if (trigger) {
701
- const from = this.listKeyManager.activeItemIndex;
702
- this.listKeyManager.setFirstItemActive();
703
- this.triggerRange(
704
- trigger,
705
- from,
706
- this.listKeyManager.activeItemIndex,
707
- !trigger.isSelected()
708
- );
709
- }
710
- event.preventDefault();
711
- return;
712
- }
713
- if (
714
- this.multiple &&
715
- keyCode === END &&
716
- hasModifierKey(event, ...ctrlKeys) &&
717
- hasModifierKey(event, 'shiftKey')
718
- ) {
719
- const trigger = this.listKeyManager.activeItem;
720
- if (trigger) {
721
- const from = this.listKeyManager.activeItemIndex;
722
- this.listKeyManager.setLastItemActive();
723
- this.triggerRange(
724
- trigger,
725
- from,
726
- this.listKeyManager.activeItemIndex,
727
- !trigger.isSelected()
728
- );
729
- }
730
- event.preventDefault();
731
- return;
732
- }
733
- if (keyCode === SPACE || keyCode === ENTER) {
734
- this.triggerOption(this.listKeyManager.activeItem);
735
- event.preventDefault();
736
- return;
737
- }
738
- const isNavKey =
739
- keyCode === UP_ARROW ||
740
- keyCode === DOWN_ARROW ||
741
- keyCode === LEFT_ARROW ||
742
- keyCode === RIGHT_ARROW ||
743
- keyCode === HOME ||
744
- keyCode === END;
745
- this.listKeyManager.onKeydown(event);
746
- // Will select an option if shift was pressed while navigating to the option
747
- if (isNavKey && event.shiftKey && previousActiveIndex !== this.listKeyManager.activeItemIndex) {
748
- this.triggerOption(this.listKeyManager.activeItem);
749
- }
750
- }
751
- /**
752
- * Called when the focus leaves an element in the listbox.
753
- * @param event The focusout event
754
- */
755
- _handleFocusOut(event) {
756
- const otherElement = event.relatedTarget;
757
- if (this.element !== otherElement && !this.element.contains(otherElement)) {
758
- this._onTouched();
759
- }
760
- }
761
- /** Get the id of the active option if active descendant is being used. */
762
- _getAriaActiveDescendant() {
763
- return this._useActiveDescendant ? this.listKeyManager?.activeItem?.id : null;
764
- }
765
- /** Get the tabindex for the listbox. */
766
- _getTabIndex() {
767
- if (this.disabled) {
768
- return -1;
769
- }
770
- return this.useActiveDescendant || !this.listKeyManager.activeItem ? this.enabledTabIndex : -1;
771
- }
772
- /** Initialize the key manager. */
773
- _initKeyManager() {
774
- this.listKeyManager = new ActiveDescendantKeyManager(this.options)
775
- .withWrap(!this._navigationWrapDisabled)
776
- .withTypeAhead()
777
- .withHomeAndEnd()
778
- .withAllowedModifierKeys(['shiftKey'])
779
- .skipPredicate(
780
- this._navigateDisabledOptions ? this._skipNonePredicate : this._skipDisabledPredicate
781
- );
782
- if (this.orientation === 'vertical') {
783
- this.listKeyManager.withVerticalOrientation();
784
- } else {
785
- this.listKeyManager.withHorizontalOrientation(this._dir?.value || 'ltr');
786
- }
787
- this.listKeyManager.change
788
- .pipe(takeUntil(this.destroyed))
789
- .subscribe(() => this._focusActiveOption());
790
- }
791
- /** Focus the active option. */
792
- _focusActiveOption() {
793
- if (!this.useActiveDescendant) {
794
- this.listKeyManager.activeItem?.focus();
795
- }
796
- this.changeDetectorRef.markForCheck();
797
- }
798
- /**
799
- * Set the selected values.
800
- * @param value The list of new selected values.
801
- */
802
- _setSelection(value) {
803
- if (this._invalid) {
804
- this.selectionModel.clear(false);
805
- }
806
- this.selectionModel.setSelection(...this._coerceValue(value));
807
- }
808
- /** Update the internal value of the listbox based on the selection model. */
809
- _updateInternalValue() {
810
- const indexCache = new Map();
811
- this.selectionModel.sort((a, b) => {
812
- const aIndex = this._getIndexForValue(indexCache, a);
813
- const bIndex = this._getIndexForValue(indexCache, b);
814
- return aIndex - bIndex;
815
- });
816
- const selected = this.selectionModel.selected;
817
- this._invalid =
818
- (!this.multiple && selected.length > 1) || !!this._getInvalidOptionValues(selected).length;
819
- this._onValidatorChange();
820
- this.changeDetectorRef.markForCheck();
821
- }
822
- /**
823
- * Gets the index of the given value in the given list of options.
824
- * @param cache The cache of indices found so far
825
- * @param value The value to find
826
- * @return The index of the value in the options list
827
- */
828
- _getIndexForValue(cache, value) {
829
- const isEqual = this.compareWith || Object.is;
830
- if (!cache.has(value)) {
831
- let index = -1;
832
- for (let i = 0; i < this.options.length; i++) {
833
- if (isEqual(value, this.options.get(i).value)) {
834
- index = i;
835
- break;
836
- }
837
- }
838
- cache.set(value, index);
839
- }
840
- return cache.get(value);
841
- }
842
- /**
843
- * Handle the user clicking an option.
844
- * @param option The option that was clicked.
845
- */
846
- _handleOptionClicked(option, event) {
847
- this.listKeyManager.setActiveItem(option);
848
- if (event.shiftKey && this.multiple) {
849
- this.triggerRange(
850
- option,
851
- this._getLastTriggeredIndex() ?? this.listKeyManager.activeItemIndex,
852
- this.listKeyManager.activeItemIndex,
853
- !option.isSelected()
854
- );
855
- } else {
856
- this.triggerOption(option);
857
- }
858
- }
859
- /** Verifies that no two options represent the same value under the compareWith function. */
860
- _verifyNoOptionValueCollisions() {
861
- this.options.changes.pipe(startWith(this.options), takeUntil(this.destroyed)).subscribe(() => {
862
- const isEqual = this.compareWith ?? Object.is;
863
- for (let i = 0; i < this.options.length; i++) {
864
- const option = this.options.get(i);
865
- let duplicate = null;
866
- for (let j = i + 1; j < this.options.length; j++) {
867
- const other = this.options.get(j);
868
- if (isEqual(option.value, other.value)) {
869
- duplicate = other;
870
- break;
871
- }
872
- }
873
- if (duplicate) {
874
- // TODO(mmalerba): Link to docs about this.
875
- if (this.compareWith) {
876
- console.warn(
877
- `Found multiple CdkOption representing the same value under the given compareWith function`,
878
- {
879
- option1: option.element,
880
- option2: duplicate.element,
881
- compareWith: this.compareWith,
882
- }
883
- );
884
- } else {
885
- console.warn(`Found multiple CdkOption with the same value`, {
886
- option1: option.element,
887
- option2: duplicate.element,
888
- });
889
- }
890
- return;
891
- }
892
- }
893
- });
894
- }
895
- /**
896
- * Coerces a value into an array representing a listbox selection.
897
- * @param value The value to coerce
898
- * @return An array
899
- */
900
- _coerceValue(value) {
901
- return value == null ? [] : coerceArray(value);
902
- }
903
- /**
904
- * Get the sublist of values that do not represent valid option values in this listbox.
905
- * @param values The list of values
906
- * @return The sublist of values that are not valid option values
907
- */
908
- _getInvalidOptionValues(values) {
909
- const isEqual = this.compareWith || Object.is;
910
- const validValues = (this.options || []).map(option => option.value);
911
- return values.filter(value => !validValues.some(validValue => isEqual(value, validValue)));
912
- }
913
- /** Get the index of the last triggered option. */
914
- _getLastTriggeredIndex() {
915
- const index = this.options.toArray().indexOf(this._lastTriggered);
916
- return index === -1 ? null : index;
917
- }
918
- }
919
- CdkListbox.ɵfac = i0.ɵɵngDeclareFactory({
920
- minVersion: '12.0.0',
921
- version: '14.2.0',
922
- ngImport: i0,
923
- type: CdkListbox,
924
- deps: [],
925
- target: i0.ɵɵFactoryTarget.Directive,
926
- });
927
- CdkListbox.ɵdir = i0.ɵɵngDeclareDirective({
928
- minVersion: '14.0.0',
929
- version: '14.2.0',
930
- type: CdkListbox,
931
- selector: '[cdkListbox]',
932
- inputs: {
933
- id: 'id',
934
- enabledTabIndex: ['tabindex', 'enabledTabIndex'],
935
- value: ['cdkListboxValue', 'value'],
936
- multiple: ['cdkListboxMultiple', 'multiple'],
937
- disabled: ['cdkListboxDisabled', 'disabled'],
938
- useActiveDescendant: ['cdkListboxUseActiveDescendant', 'useActiveDescendant'],
939
- orientation: ['cdkListboxOrientation', 'orientation'],
940
- compareWith: ['cdkListboxCompareWith', 'compareWith'],
941
- navigationWrapDisabled: ['cdkListboxNavigationWrapDisabled', 'navigationWrapDisabled'],
942
- navigateDisabledOptions: ['cdkListboxNavigatesDisabledOptions', 'navigateDisabledOptions'],
943
- },
944
- outputs: { valueChange: 'cdkListboxValueChange' },
945
- host: {
946
- attributes: { role: 'listbox' },
947
- listeners: {
948
- focus: '_handleFocus()',
949
- keydown: '_handleKeydown($event)',
950
- focusout: '_handleFocusOut($event)',
951
- },
952
- properties: {
953
- id: 'id',
954
- 'attr.tabindex': '_getTabIndex()',
955
- 'attr.aria-disabled': 'disabled',
956
- 'attr.aria-multiselectable': 'multiple',
957
- 'attr.aria-activedescendant': '_getAriaActiveDescendant()',
958
- 'attr.aria-orientation': 'orientation',
959
- },
960
- classAttribute: 'cdk-listbox',
961
- },
962
- providers: [
963
- {
964
- provide: NG_VALUE_ACCESSOR,
965
- useExisting: forwardRef(() => CdkListbox),
966
- multi: true,
967
- },
968
- {
969
- provide: NG_VALIDATORS,
970
- useExisting: forwardRef(() => CdkListbox),
971
- multi: true,
972
- },
973
- ],
974
- queries: [{ propertyName: 'options', predicate: CdkOption, descendants: true }],
975
- exportAs: ['cdkListbox'],
976
- ngImport: i0,
977
- });
978
- i0.ɵɵngDeclareClassMetadata({
979
- minVersion: '12.0.0',
980
- version: '14.2.0',
981
- ngImport: i0,
982
- type: CdkListbox,
983
- decorators: [
984
- {
985
- type: Directive,
986
- args: [
987
- {
988
- selector: '[cdkListbox]',
989
- exportAs: 'cdkListbox',
990
- host: {
991
- role: 'listbox',
992
- class: 'cdk-listbox',
993
- '[id]': 'id',
994
- '[attr.tabindex]': '_getTabIndex()',
995
- '[attr.aria-disabled]': 'disabled',
996
- '[attr.aria-multiselectable]': 'multiple',
997
- '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',
998
- '[attr.aria-orientation]': 'orientation',
999
- '(focus)': '_handleFocus()',
1000
- '(keydown)': '_handleKeydown($event)',
1001
- '(focusout)': '_handleFocusOut($event)',
1002
- },
1003
- providers: [
1004
- {
1005
- provide: NG_VALUE_ACCESSOR,
1006
- useExisting: forwardRef(() => CdkListbox),
1007
- multi: true,
1008
- },
1009
- {
1010
- provide: NG_VALIDATORS,
1011
- useExisting: forwardRef(() => CdkListbox),
1012
- multi: true,
1013
- },
1014
- ],
1015
- },
1016
- ],
1017
- },
1018
- ],
1019
- propDecorators: {
1020
- id: [
1021
- {
1022
- type: Input,
1023
- },
1024
- ],
1025
- enabledTabIndex: [
1026
- {
1027
- type: Input,
1028
- args: ['tabindex'],
1029
- },
1030
- ],
1031
- value: [
1032
- {
1033
- type: Input,
1034
- args: ['cdkListboxValue'],
1035
- },
1036
- ],
1037
- multiple: [
1038
- {
1039
- type: Input,
1040
- args: ['cdkListboxMultiple'],
1041
- },
1042
- ],
1043
- disabled: [
1044
- {
1045
- type: Input,
1046
- args: ['cdkListboxDisabled'],
1047
- },
1048
- ],
1049
- useActiveDescendant: [
1050
- {
1051
- type: Input,
1052
- args: ['cdkListboxUseActiveDescendant'],
1053
- },
1054
- ],
1055
- orientation: [
1056
- {
1057
- type: Input,
1058
- args: ['cdkListboxOrientation'],
1059
- },
1060
- ],
1061
- compareWith: [
1062
- {
1063
- type: Input,
1064
- args: ['cdkListboxCompareWith'],
1065
- },
1066
- ],
1067
- navigationWrapDisabled: [
1068
- {
1069
- type: Input,
1070
- args: ['cdkListboxNavigationWrapDisabled'],
1071
- },
1072
- ],
1073
- navigateDisabledOptions: [
1074
- {
1075
- type: Input,
1076
- args: ['cdkListboxNavigatesDisabledOptions'],
1077
- },
1078
- ],
1079
- valueChange: [
1080
- {
1081
- type: Output,
1082
- args: ['cdkListboxValueChange'],
1083
- },
1084
- ],
1085
- options: [
1086
- {
1087
- type: ContentChildren,
1088
- args: [CdkOption, { descendants: true }],
1089
- },
1090
- ],
1091
- },
1092
- });
1093
-
1094
- /**
1095
- * @license
1096
- * Copyright Google LLC All Rights Reserved.
1097
- *
1098
- * Use of this source code is governed by an MIT-style license that can be
1099
- * found in the LICENSE file at https://angular.io/license
1100
- */
1101
- const EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];
1102
- class CdkListboxModule {}
1103
- CdkListboxModule.ɵfac = i0.ɵɵngDeclareFactory({
1104
- minVersion: '12.0.0',
1105
- version: '14.2.0',
1106
- ngImport: i0,
1107
- type: CdkListboxModule,
1108
- deps: [],
1109
- target: i0.ɵɵFactoryTarget.NgModule,
1110
- });
1111
- CdkListboxModule.ɵmod = i0.ɵɵngDeclareNgModule({
1112
- minVersion: '14.0.0',
1113
- version: '14.2.0',
1114
- ngImport: i0,
1115
- type: CdkListboxModule,
1116
- declarations: [CdkListbox, CdkOption],
1117
- exports: [CdkListbox, CdkOption],
1118
- });
1119
- CdkListboxModule.ɵinj = i0.ɵɵngDeclareInjector({
1120
- minVersion: '12.0.0',
1121
- version: '14.2.0',
1122
- ngImport: i0,
1123
- type: CdkListboxModule,
1124
- });
1125
- i0.ɵɵngDeclareClassMetadata({
1126
- minVersion: '12.0.0',
1127
- version: '14.2.0',
1128
- ngImport: i0,
1129
- type: CdkListboxModule,
1130
- decorators: [
1131
- {
1132
- type: NgModule,
1133
- args: [
1134
- {
1135
- exports: EXPORTED_DECLARATIONS,
1136
- declarations: EXPORTED_DECLARATIONS,
1137
- },
1138
- ],
1139
- },
1140
- ],
1141
- });
1142
-
1143
- /**
1144
- * @license
1145
- * Copyright Google LLC All Rights Reserved.
1146
- *
1147
- * Use of this source code is governed by an MIT-style license that can be
1148
- * found in the LICENSE file at https://angular.io/license
1149
- */
1150
-
1151
- /**
1152
- * @license
1153
- * Copyright Google LLC All Rights Reserved.
1154
- *
1155
- * Use of this source code is governed by an MIT-style license that can be
1156
- * found in the LICENSE file at https://angular.io/license
1157
- */
1158
-
1159
- /**
1160
- * Generated bundle index. Do not edit.
1161
- */
1162
-
1163
- export { CdkListbox, CdkListboxModule, CdkOption };
1164
- //# sourceMappingURL=listbox.mjs.map