@angular/cdk 19.2.13 → 19.2.15

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 (429) hide show
  1. package/_adev_assets/cdk_testing.json +7032 -1
  2. package/_adev_assets/cdk_testing_protractor.json +1747 -1
  3. package/_adev_assets/cdk_testing_selenium_webdriver.json +1801 -1
  4. package/_adev_assets/cdk_testing_testbed.json +1903 -1
  5. package/dialog/index.d.ts +17 -12
  6. package/fesm2022/cdk.mjs +1 -1
  7. package/fesm2022/cdk.mjs.map +1 -1
  8. package/fesm2022/dialog.mjs +21 -9
  9. package/fesm2022/dialog.mjs.map +1 -1
  10. package/fesm2022/testing.mjs +255 -52
  11. package/fesm2022/testing.mjs.map +1 -1
  12. package/{harness-environment.d-BatBdODN.d.ts → harness-environment.d-BbFzIFDE.d.ts} +362 -89
  13. package/package.json +1 -1
  14. package/schematics/ng-add/index.js +1 -1
  15. package/testing/index.d.ts +6 -2
  16. package/testing/selenium-webdriver/index.d.ts +1 -1
  17. package/testing/testbed/index.d.ts +1 -1
  18. package/npm_package/LICENSE +0 -21
  19. package/npm_package/README.md +0 -6
  20. package/npm_package/_adev_assets/cdk_testing.json +0 -1
  21. package/npm_package/_adev_assets/cdk_testing_protractor.json +0 -1
  22. package/npm_package/_adev_assets/cdk_testing_selenium_webdriver.json +0 -1
  23. package/npm_package/_adev_assets/cdk_testing_testbed.json +0 -1
  24. package/npm_package/_index.scss +0 -8
  25. package/npm_package/a11y/_index.scss +0 -60
  26. package/npm_package/a11y/index.d.ts +0 -550
  27. package/npm_package/a11y-module.d-DBHGyKoh.d.ts +0 -314
  28. package/npm_package/a11y-prebuilt.css +0 -1
  29. package/npm_package/accordion/index.d.ts +0 -90
  30. package/npm_package/activedescendant-key-manager.d-Bjic5obv.d.ts +0 -32
  31. package/npm_package/bidi/index.d.ts +0 -21
  32. package/npm_package/bidi-module.d-D-fEBKdS.d.ts +0 -54
  33. package/npm_package/clipboard/index.d.ts +0 -101
  34. package/npm_package/coercion/index.d.ts +0 -45
  35. package/npm_package/coercion/private/index.d.ts +0 -9
  36. package/npm_package/collections/index.d.ts +0 -99
  37. package/npm_package/data-source.d-Bblv7Zvh.d.ts +0 -43
  38. package/npm_package/dialog/index.d.ts +0 -426
  39. package/npm_package/drag-drop/index.d.ts +0 -1383
  40. package/npm_package/fesm2022/a11y-module-BYox5gpI.mjs +0 -952
  41. package/npm_package/fesm2022/a11y-module-BYox5gpI.mjs.map +0 -1
  42. package/npm_package/fesm2022/a11y.mjs +0 -539
  43. package/npm_package/fesm2022/a11y.mjs.map +0 -1
  44. package/npm_package/fesm2022/accordion.mjs +0 -210
  45. package/npm_package/fesm2022/accordion.mjs.map +0 -1
  46. package/npm_package/fesm2022/activedescendant-key-manager-DC3-fwQI.mjs +0 -16
  47. package/npm_package/fesm2022/activedescendant-key-manager-DC3-fwQI.mjs.map +0 -1
  48. package/npm_package/fesm2022/array-I1yfCXUO.mjs +0 -6
  49. package/npm_package/fesm2022/array-I1yfCXUO.mjs.map +0 -1
  50. package/npm_package/fesm2022/backwards-compatibility-DHR38MsD.mjs +0 -25
  51. package/npm_package/fesm2022/backwards-compatibility-DHR38MsD.mjs.map +0 -1
  52. package/npm_package/fesm2022/bidi.mjs +0 -80
  53. package/npm_package/fesm2022/bidi.mjs.map +0 -1
  54. package/npm_package/fesm2022/boolean-property-DaaVhX5A.mjs +0 -7
  55. package/npm_package/fesm2022/boolean-property-DaaVhX5A.mjs.map +0 -1
  56. package/npm_package/fesm2022/breakpoints-observer-CljOfYGy.mjs +0 -179
  57. package/npm_package/fesm2022/breakpoints-observer-CljOfYGy.mjs.map +0 -1
  58. package/npm_package/fesm2022/cdk.mjs +0 -7
  59. package/npm_package/fesm2022/cdk.mjs.map +0 -1
  60. package/npm_package/fesm2022/clipboard.mjs +0 -211
  61. package/npm_package/fesm2022/clipboard.mjs.map +0 -1
  62. package/npm_package/fesm2022/coercion/private.mjs +0 -15
  63. package/npm_package/fesm2022/coercion/private.mjs.map +0 -1
  64. package/npm_package/fesm2022/coercion.mjs +0 -39
  65. package/npm_package/fesm2022/coercion.mjs.map +0 -1
  66. package/npm_package/fesm2022/collections.mjs +0 -8
  67. package/npm_package/fesm2022/collections.mjs.map +0 -1
  68. package/npm_package/fesm2022/css-pixel-value-C_HEqLhI.mjs +0 -10
  69. package/npm_package/fesm2022/css-pixel-value-C_HEqLhI.mjs.map +0 -1
  70. package/npm_package/fesm2022/data-source-D34wiQZj.mjs +0 -15
  71. package/npm_package/fesm2022/data-source-D34wiQZj.mjs.map +0 -1
  72. package/npm_package/fesm2022/dialog.mjs +0 -870
  73. package/npm_package/fesm2022/dialog.mjs.map +0 -1
  74. package/npm_package/fesm2022/directionality-CBXD4hga.mjs +0 -72
  75. package/npm_package/fesm2022/directionality-CBXD4hga.mjs.map +0 -1
  76. package/npm_package/fesm2022/dispose-view-repeater-strategy-D_JReLI1.mjs +0 -44
  77. package/npm_package/fesm2022/dispose-view-repeater-strategy-D_JReLI1.mjs.map +0 -1
  78. package/npm_package/fesm2022/drag-drop.mjs +0 -4359
  79. package/npm_package/fesm2022/drag-drop.mjs.map +0 -1
  80. package/npm_package/fesm2022/element-x4z00URv.mjs +0 -29
  81. package/npm_package/fesm2022/element-x4z00URv.mjs.map +0 -1
  82. package/npm_package/fesm2022/fake-event-detection-DWOdFTFz.mjs +0 -24
  83. package/npm_package/fesm2022/fake-event-detection-DWOdFTFz.mjs.map +0 -1
  84. package/npm_package/fesm2022/focus-key-manager-C1rAQJ5z.mjs +0 -22
  85. package/npm_package/fesm2022/focus-key-manager-C1rAQJ5z.mjs.map +0 -1
  86. package/npm_package/fesm2022/focus-monitor-e2l_RpN3.mjs +0 -629
  87. package/npm_package/fesm2022/focus-monitor-e2l_RpN3.mjs.map +0 -1
  88. package/npm_package/fesm2022/id-generator-Dw_9dSDu.mjs +0 -37
  89. package/npm_package/fesm2022/id-generator-Dw_9dSDu.mjs.map +0 -1
  90. package/npm_package/fesm2022/keycodes-CpHkExLC.mjs +0 -122
  91. package/npm_package/fesm2022/keycodes-CpHkExLC.mjs.map +0 -1
  92. package/npm_package/fesm2022/keycodes.mjs +0 -15
  93. package/npm_package/fesm2022/keycodes.mjs.map +0 -1
  94. package/npm_package/fesm2022/layout.mjs +0 -43
  95. package/npm_package/fesm2022/layout.mjs.map +0 -1
  96. package/npm_package/fesm2022/list-key-manager-CyOIXo8P.mjs +0 -360
  97. package/npm_package/fesm2022/list-key-manager-CyOIXo8P.mjs.map +0 -1
  98. package/npm_package/fesm2022/listbox.mjs +0 -925
  99. package/npm_package/fesm2022/listbox.mjs.map +0 -1
  100. package/npm_package/fesm2022/menu.mjs +0 -1966
  101. package/npm_package/fesm2022/menu.mjs.map +0 -1
  102. package/npm_package/fesm2022/observers/private.mjs +0 -124
  103. package/npm_package/fesm2022/observers/private.mjs.map +0 -1
  104. package/npm_package/fesm2022/observers.mjs +0 -210
  105. package/npm_package/fesm2022/observers.mjs.map +0 -1
  106. package/npm_package/fesm2022/overlay-module-BUj0D19H.mjs +0 -3029
  107. package/npm_package/fesm2022/overlay-module-BUj0D19H.mjs.map +0 -1
  108. package/npm_package/fesm2022/overlay.mjs +0 -102
  109. package/npm_package/fesm2022/overlay.mjs.map +0 -1
  110. package/npm_package/fesm2022/passive-listeners-esHZRgIN.mjs +0 -31
  111. package/npm_package/fesm2022/passive-listeners-esHZRgIN.mjs.map +0 -1
  112. package/npm_package/fesm2022/platform-DmdVEw_C.mjs +0 -77
  113. package/npm_package/fesm2022/platform-DmdVEw_C.mjs.map +0 -1
  114. package/npm_package/fesm2022/platform.mjs +0 -74
  115. package/npm_package/fesm2022/platform.mjs.map +0 -1
  116. package/npm_package/fesm2022/portal-directives-Bw5woq8I.mjs +0 -653
  117. package/npm_package/fesm2022/portal-directives-Bw5woq8I.mjs.map +0 -1
  118. package/npm_package/fesm2022/portal.mjs +0 -29
  119. package/npm_package/fesm2022/portal.mjs.map +0 -1
  120. package/npm_package/fesm2022/private.mjs +0 -19
  121. package/npm_package/fesm2022/private.mjs.map +0 -1
  122. package/npm_package/fesm2022/recycle-view-repeater-strategy-DoWdPqVw.mjs +0 -156
  123. package/npm_package/fesm2022/recycle-view-repeater-strategy-DoWdPqVw.mjs.map +0 -1
  124. package/npm_package/fesm2022/scrolling-BkvA05C8.mjs +0 -99
  125. package/npm_package/fesm2022/scrolling-BkvA05C8.mjs.map +0 -1
  126. package/npm_package/fesm2022/scrolling.mjs +0 -1464
  127. package/npm_package/fesm2022/scrolling.mjs.map +0 -1
  128. package/npm_package/fesm2022/selection-model-CeeHVIcP.mjs +0 -226
  129. package/npm_package/fesm2022/selection-model-CeeHVIcP.mjs.map +0 -1
  130. package/npm_package/fesm2022/shadow-dom-B0oHn41l.mjs +0 -49
  131. package/npm_package/fesm2022/shadow-dom-B0oHn41l.mjs.map +0 -1
  132. package/npm_package/fesm2022/stepper.mjs +0 -614
  133. package/npm_package/fesm2022/stepper.mjs.map +0 -1
  134. package/npm_package/fesm2022/style-loader-Cu9AvjH9.mjs +0 -47
  135. package/npm_package/fesm2022/style-loader-Cu9AvjH9.mjs.map +0 -1
  136. package/npm_package/fesm2022/table.mjs +0 -2602
  137. package/npm_package/fesm2022/table.mjs.map +0 -1
  138. package/npm_package/fesm2022/test-environment-CT0XxPyp.mjs +0 -19
  139. package/npm_package/fesm2022/test-environment-CT0XxPyp.mjs.map +0 -1
  140. package/npm_package/fesm2022/testing/selenium-webdriver.mjs +0 -353
  141. package/npm_package/fesm2022/testing/selenium-webdriver.mjs.map +0 -1
  142. package/npm_package/fesm2022/testing/testbed.mjs +0 -782
  143. package/npm_package/fesm2022/testing/testbed.mjs.map +0 -1
  144. package/npm_package/fesm2022/testing.mjs +0 -698
  145. package/npm_package/fesm2022/testing.mjs.map +0 -1
  146. package/npm_package/fesm2022/text-field.mjs +0 -437
  147. package/npm_package/fesm2022/text-field.mjs.map +0 -1
  148. package/npm_package/fesm2022/tree-key-manager-KnCoIkIC.mjs +0 -360
  149. package/npm_package/fesm2022/tree-key-manager-KnCoIkIC.mjs.map +0 -1
  150. package/npm_package/fesm2022/tree.mjs +0 -1795
  151. package/npm_package/fesm2022/tree.mjs.map +0 -1
  152. package/npm_package/fesm2022/typeahead-9ZW4Dtsf.mjs +0 -88
  153. package/npm_package/fesm2022/typeahead-9ZW4Dtsf.mjs.map +0 -1
  154. package/npm_package/fesm2022/unique-selection-dispatcher-DtHZDqyJ.mjs +0 -49
  155. package/npm_package/fesm2022/unique-selection-dispatcher-DtHZDqyJ.mjs.map +0 -1
  156. package/npm_package/focus-key-manager.d-BIKDy8oD.d.ts +0 -34
  157. package/npm_package/focus-monitor.d-CvvJeQRc.d.ts +0 -210
  158. package/npm_package/harness-environment.d-BatBdODN.d.ts +0 -620
  159. package/npm_package/index.d.ts +0 -6
  160. package/npm_package/keycodes/index.d.ts +0 -129
  161. package/npm_package/layout/index.d.ts +0 -89
  162. package/npm_package/list-key-manager.d-BlK3jyRn.d.ts +0 -165
  163. package/npm_package/listbox/index.d.ts +0 -353
  164. package/npm_package/menu/index.d.ts +0 -821
  165. package/npm_package/number-property.d-CJVxXUcb.d.ts +0 -16
  166. package/npm_package/observers/index.d.ts +0 -84
  167. package/npm_package/observers/private/index.d.ts +0 -34
  168. package/npm_package/overlay/_index-deprecated.scss +0 -13
  169. package/npm_package/overlay/_index.scss +0 -193
  170. package/npm_package/overlay/index.d.ts +0 -42
  171. package/npm_package/overlay-module.d-B3qEQtts.d.ts +0 -791
  172. package/npm_package/overlay-prebuilt.css +0 -1
  173. package/npm_package/overlay.d-BdoMy0hX.d.ts +0 -296
  174. package/npm_package/package.json +0 -186
  175. package/npm_package/platform/index.d.ts +0 -83
  176. package/npm_package/platform.d-B3vREl3q.d.ts +0 -33
  177. package/npm_package/portal/index.d.ts +0 -86
  178. package/npm_package/portal-directives.d-BoG39gYN.d.ts +0 -232
  179. package/npm_package/private/index.d.ts +0 -13
  180. package/npm_package/schematics/collection.json +0 -18
  181. package/npm_package/schematics/index.d.ts +0 -14
  182. package/npm_package/schematics/index.js +0 -37
  183. package/npm_package/schematics/index.js.map +0 -1
  184. package/npm_package/schematics/migration.json +0 -15
  185. package/npm_package/schematics/ng-add/index.d.ts +0 -17
  186. package/npm_package/schematics/ng-add/index.js +0 -39
  187. package/npm_package/schematics/ng-add/index.js.map +0 -1
  188. package/npm_package/schematics/ng-add/package-config.d.ts +0 -12
  189. package/npm_package/schematics/ng-add/package-config.js +0 -51
  190. package/npm_package/schematics/ng-add/package-config.js.map +0 -1
  191. package/npm_package/schematics/ng-add/schema.d.ts +0 -11
  192. package/npm_package/schematics/ng-add/schema.js +0 -10
  193. package/npm_package/schematics/ng-add/schema.js.map +0 -1
  194. package/npm_package/schematics/ng-add/schema.json +0 -16
  195. package/npm_package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +0 -53
  196. package/npm_package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +0 -21
  197. package/npm_package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +0 -25
  198. package/npm_package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +0 -45
  199. package/npm_package/schematics/ng-generate/drag-drop/index.d.ts +0 -11
  200. package/npm_package/schematics/ng-generate/drag-drop/index.js +0 -42
  201. package/npm_package/schematics/ng-generate/drag-drop/index.js.map +0 -1
  202. package/npm_package/schematics/ng-generate/drag-drop/schema.d.ts +0 -10
  203. package/npm_package/schematics/ng-generate/drag-drop/schema.js +0 -10
  204. package/npm_package/schematics/ng-generate/drag-drop/schema.js.map +0 -1
  205. package/npm_package/schematics/ng-generate/drag-drop/schema.json +0 -100
  206. package/npm_package/schematics/ng-update/data/attribute-selectors.d.ts +0 -15
  207. package/npm_package/schematics/ng-update/data/attribute-selectors.js +0 -12
  208. package/npm_package/schematics/ng-update/data/attribute-selectors.js.map +0 -1
  209. package/npm_package/schematics/ng-update/data/class-names.d.ts +0 -15
  210. package/npm_package/schematics/ng-update/data/class-names.js +0 -12
  211. package/npm_package/schematics/ng-update/data/class-names.js.map +0 -1
  212. package/npm_package/schematics/ng-update/data/constructor-checks.d.ts +0 -15
  213. package/npm_package/schematics/ng-update/data/constructor-checks.js +0 -17
  214. package/npm_package/schematics/ng-update/data/constructor-checks.js.map +0 -1
  215. package/npm_package/schematics/ng-update/data/css-selectors.d.ts +0 -27
  216. package/npm_package/schematics/ng-update/data/css-selectors.js +0 -12
  217. package/npm_package/schematics/ng-update/data/css-selectors.js.map +0 -1
  218. package/npm_package/schematics/ng-update/data/css-tokens.d.ts +0 -27
  219. package/npm_package/schematics/ng-update/data/css-tokens.js +0 -12
  220. package/npm_package/schematics/ng-update/data/css-tokens.js.map +0 -1
  221. package/npm_package/schematics/ng-update/data/element-selectors.d.ts +0 -15
  222. package/npm_package/schematics/ng-update/data/element-selectors.js +0 -12
  223. package/npm_package/schematics/ng-update/data/element-selectors.js.map +0 -1
  224. package/npm_package/schematics/ng-update/data/index.d.ts +0 -18
  225. package/npm_package/schematics/ng-update/data/index.js +0 -35
  226. package/npm_package/schematics/ng-update/data/index.js.map +0 -1
  227. package/npm_package/schematics/ng-update/data/input-names.d.ts +0 -22
  228. package/npm_package/schematics/ng-update/data/input-names.js +0 -12
  229. package/npm_package/schematics/ng-update/data/input-names.js.map +0 -1
  230. package/npm_package/schematics/ng-update/data/method-call-checks.d.ts +0 -17
  231. package/npm_package/schematics/ng-update/data/method-call-checks.js +0 -12
  232. package/npm_package/schematics/ng-update/data/method-call-checks.js.map +0 -1
  233. package/npm_package/schematics/ng-update/data/output-names.d.ts +0 -22
  234. package/npm_package/schematics/ng-update/data/output-names.js +0 -12
  235. package/npm_package/schematics/ng-update/data/output-names.js.map +0 -1
  236. package/npm_package/schematics/ng-update/data/property-names.d.ts +0 -20
  237. package/npm_package/schematics/ng-update/data/property-names.js +0 -12
  238. package/npm_package/schematics/ng-update/data/property-names.js.map +0 -1
  239. package/npm_package/schematics/ng-update/data/symbol-removal.d.ts +0 -17
  240. package/npm_package/schematics/ng-update/data/symbol-removal.js +0 -12
  241. package/npm_package/schematics/ng-update/data/symbol-removal.js.map +0 -1
  242. package/npm_package/schematics/ng-update/devkit-file-system.d.ts +0 -30
  243. package/npm_package/schematics/ng-update/devkit-file-system.js +0 -83
  244. package/npm_package/schematics/ng-update/devkit-file-system.js.map +0 -1
  245. package/npm_package/schematics/ng-update/devkit-migration-rule.d.ts +0 -24
  246. package/npm_package/schematics/ng-update/devkit-migration-rule.js +0 -142
  247. package/npm_package/schematics/ng-update/devkit-migration-rule.js.map +0 -1
  248. package/npm_package/schematics/ng-update/devkit-migration.d.ts +0 -35
  249. package/npm_package/schematics/ng-update/devkit-migration.js +0 -20
  250. package/npm_package/schematics/ng-update/devkit-migration.js.map +0 -1
  251. package/npm_package/schematics/ng-update/find-stylesheets.d.ts +0 -16
  252. package/npm_package/schematics/ng-update/find-stylesheets.js +0 -41
  253. package/npm_package/schematics/ng-update/find-stylesheets.js.map +0 -1
  254. package/npm_package/schematics/ng-update/html-parsing/angular.d.ts +0 -15
  255. package/npm_package/schematics/ng-update/html-parsing/angular.js +0 -51
  256. package/npm_package/schematics/ng-update/html-parsing/angular.js.map +0 -1
  257. package/npm_package/schematics/ng-update/html-parsing/elements.d.ts +0 -24
  258. package/npm_package/schematics/ng-update/html-parsing/elements.js +0 -63
  259. package/npm_package/schematics/ng-update/html-parsing/elements.js.map +0 -1
  260. package/npm_package/schematics/ng-update/index.d.ts +0 -10
  261. package/npm_package/schematics/ng-update/index.js +0 -29
  262. package/npm_package/schematics/ng-update/index.js.map +0 -1
  263. package/npm_package/schematics/ng-update/migrations/attribute-selectors.d.ts +0 -26
  264. package/npm_package/schematics/ng-update/migrations/attribute-selectors.js +0 -71
  265. package/npm_package/schematics/ng-update/migrations/attribute-selectors.js.map +0 -1
  266. package/npm_package/schematics/ng-update/migrations/class-inheritance.d.ts +0 -26
  267. package/npm_package/schematics/ng-update/migrations/class-inheritance.js +0 -58
  268. package/npm_package/schematics/ng-update/migrations/class-inheritance.js.map +0 -1
  269. package/npm_package/schematics/ng-update/migrations/class-names.d.ts +0 -32
  270. package/npm_package/schematics/ng-update/migrations/class-names.js +0 -91
  271. package/npm_package/schematics/ng-update/migrations/class-names.js.map +0 -1
  272. package/npm_package/schematics/ng-update/migrations/constructor-signature.d.ts +0 -29
  273. package/npm_package/schematics/ng-update/migrations/constructor-signature.js +0 -139
  274. package/npm_package/schematics/ng-update/migrations/constructor-signature.js.map +0 -1
  275. package/npm_package/schematics/ng-update/migrations/css-selectors.d.ts +0 -26
  276. package/npm_package/schematics/ng-update/migrations/css-selectors.js +0 -75
  277. package/npm_package/schematics/ng-update/migrations/css-selectors.js.map +0 -1
  278. package/npm_package/schematics/ng-update/migrations/css-tokens.d.ts +0 -26
  279. package/npm_package/schematics/ng-update/migrations/css-tokens.js +0 -83
  280. package/npm_package/schematics/ng-update/migrations/css-tokens.js.map +0 -1
  281. package/npm_package/schematics/ng-update/migrations/element-selectors.d.ts +0 -26
  282. package/npm_package/schematics/ng-update/migrations/element-selectors.js +0 -66
  283. package/npm_package/schematics/ng-update/migrations/element-selectors.js.map +0 -1
  284. package/npm_package/schematics/ng-update/migrations/input-names.d.ts +0 -26
  285. package/npm_package/schematics/ng-update/migrations/input-names.js +0 -59
  286. package/npm_package/schematics/ng-update/migrations/input-names.js.map +0 -1
  287. package/npm_package/schematics/ng-update/migrations/method-call-arguments.d.ts +0 -22
  288. package/npm_package/schematics/ng-update/migrations/method-call-arguments.js +0 -62
  289. package/npm_package/schematics/ng-update/migrations/method-call-arguments.js.map +0 -1
  290. package/npm_package/schematics/ng-update/migrations/misc-template.d.ts +0 -18
  291. package/npm_package/schematics/ng-update/migrations/misc-template.js +0 -25
  292. package/npm_package/schematics/ng-update/migrations/misc-template.js.map +0 -1
  293. package/npm_package/schematics/ng-update/migrations/output-names.d.ts +0 -22
  294. package/npm_package/schematics/ng-update/migrations/output-names.js +0 -46
  295. package/npm_package/schematics/ng-update/migrations/output-names.js.map +0 -1
  296. package/npm_package/schematics/ng-update/migrations/property-names.d.ts +0 -22
  297. package/npm_package/schematics/ng-update/migrations/property-names.js +0 -60
  298. package/npm_package/schematics/ng-update/migrations/property-names.js.map +0 -1
  299. package/npm_package/schematics/ng-update/migrations/symbol-removal.d.ts +0 -18
  300. package/npm_package/schematics/ng-update/migrations/symbol-removal.js +0 -47
  301. package/npm_package/schematics/ng-update/migrations/symbol-removal.js.map +0 -1
  302. package/npm_package/schematics/ng-update/public-api.d.ts +0 -19
  303. package/npm_package/schematics/ng-update/public-api.js +0 -36
  304. package/npm_package/schematics/ng-update/public-api.js.map +0 -1
  305. package/npm_package/schematics/ng-update/typescript/base-types.d.ts +0 -10
  306. package/npm_package/schematics/ng-update/typescript/base-types.js +0 -23
  307. package/npm_package/schematics/ng-update/typescript/base-types.js.map +0 -1
  308. package/npm_package/schematics/ng-update/typescript/imports.d.ts +0 -18
  309. package/npm_package/schematics/ng-update/typescript/imports.js +0 -53
  310. package/npm_package/schematics/ng-update/typescript/imports.js.map +0 -1
  311. package/npm_package/schematics/ng-update/typescript/literal.d.ts +0 -18
  312. package/npm_package/schematics/ng-update/typescript/literal.js +0 -32
  313. package/npm_package/schematics/ng-update/typescript/literal.js.map +0 -1
  314. package/npm_package/schematics/ng-update/typescript/module-specifiers.d.ts +0 -16
  315. package/npm_package/schematics/ng-update/typescript/module-specifiers.js +0 -35
  316. package/npm_package/schematics/ng-update/typescript/module-specifiers.js.map +0 -1
  317. package/npm_package/schematics/ng-update/upgrade-data.d.ts +0 -35
  318. package/npm_package/schematics/ng-update/upgrade-data.js +0 -40
  319. package/npm_package/schematics/ng-update/upgrade-data.js.map +0 -1
  320. package/npm_package/schematics/package.json +0 -3
  321. package/npm_package/schematics/paths.d.ts +0 -11
  322. package/npm_package/schematics/paths.js +0 -16
  323. package/npm_package/schematics/paths.js.map +0 -1
  324. package/npm_package/schematics/update-tool/component-resource-collector.d.ts +0 -44
  325. package/npm_package/schematics/update-tool/component-resource-collector.js +0 -164
  326. package/npm_package/schematics/update-tool/component-resource-collector.js.map +0 -1
  327. package/npm_package/schematics/update-tool/file-system.d.ts +0 -72
  328. package/npm_package/schematics/update-tool/file-system.js +0 -18
  329. package/npm_package/schematics/update-tool/file-system.js.map +0 -1
  330. package/npm_package/schematics/update-tool/index.d.ts +0 -74
  331. package/npm_package/schematics/update-tool/index.js +0 -172
  332. package/npm_package/schematics/update-tool/index.js.map +0 -1
  333. package/npm_package/schematics/update-tool/logger.d.ts +0 -15
  334. package/npm_package/schematics/update-tool/logger.js +0 -18
  335. package/npm_package/schematics/update-tool/logger.js.map +0 -1
  336. package/npm_package/schematics/update-tool/migration.d.ts +0 -87
  337. package/npm_package/schematics/update-tool/migration.js +0 -70
  338. package/npm_package/schematics/update-tool/migration.js.map +0 -1
  339. package/npm_package/schematics/update-tool/public-api.d.ts +0 -16
  340. package/npm_package/schematics/update-tool/public-api.js +0 -33
  341. package/npm_package/schematics/update-tool/public-api.js.map +0 -1
  342. package/npm_package/schematics/update-tool/target-version.d.ts +0 -16
  343. package/npm_package/schematics/update-tool/target-version.js +0 -27
  344. package/npm_package/schematics/update-tool/target-version.js.map +0 -1
  345. package/npm_package/schematics/update-tool/update-recorder.d.ts +0 -13
  346. package/npm_package/schematics/update-tool/update-recorder.js +0 -10
  347. package/npm_package/schematics/update-tool/update-recorder.js.map +0 -1
  348. package/npm_package/schematics/update-tool/utils/decorators.d.ts +0 -22
  349. package/npm_package/schematics/update-tool/utils/decorators.js +0 -41
  350. package/npm_package/schematics/update-tool/utils/decorators.js.map +0 -1
  351. package/npm_package/schematics/update-tool/utils/diagnostics.d.ts +0 -11
  352. package/npm_package/schematics/update-tool/utils/diagnostics.js +0 -18
  353. package/npm_package/schematics/update-tool/utils/diagnostics.js.map +0 -1
  354. package/npm_package/schematics/update-tool/utils/functions.d.ts +0 -14
  355. package/npm_package/schematics/update-tool/utils/functions.js +0 -20
  356. package/npm_package/schematics/update-tool/utils/functions.js.map +0 -1
  357. package/npm_package/schematics/update-tool/utils/imports.d.ts +0 -17
  358. package/npm_package/schematics/update-tool/utils/imports.js +0 -110
  359. package/npm_package/schematics/update-tool/utils/imports.js.map +0 -1
  360. package/npm_package/schematics/update-tool/utils/line-mappings.d.ts +0 -21
  361. package/npm_package/schematics/update-tool/utils/line-mappings.js +0 -75
  362. package/npm_package/schematics/update-tool/utils/line-mappings.js.map +0 -1
  363. package/npm_package/schematics/update-tool/utils/parse-tsconfig.d.ts +0 -18
  364. package/npm_package/schematics/update-tool/utils/parse-tsconfig.js +0 -45
  365. package/npm_package/schematics/update-tool/utils/parse-tsconfig.js.map +0 -1
  366. package/npm_package/schematics/update-tool/utils/property-name.d.ts +0 -18
  367. package/npm_package/schematics/update-tool/utils/property-name.js +0 -27
  368. package/npm_package/schematics/update-tool/utils/property-name.js.map +0 -1
  369. package/npm_package/schematics/update-tool/utils/virtual-host.d.ts +0 -36
  370. package/npm_package/schematics/update-tool/utils/virtual-host.js +0 -71
  371. package/npm_package/schematics/update-tool/utils/virtual-host.js.map +0 -1
  372. package/npm_package/schematics/update-tool/version-changes.d.ts +0 -32
  373. package/npm_package/schematics/update-tool/version-changes.js +0 -38
  374. package/npm_package/schematics/update-tool/version-changes.js.map +0 -1
  375. package/npm_package/schematics/utils/ast/ng-module-imports.d.ts +0 -12
  376. package/npm_package/schematics/utils/ast/ng-module-imports.js +0 -82
  377. package/npm_package/schematics/utils/ast/ng-module-imports.js.map +0 -1
  378. package/npm_package/schematics/utils/ast.d.ts +0 -25
  379. package/npm_package/schematics/utils/ast.js +0 -79
  380. package/npm_package/schematics/utils/ast.js.map +0 -1
  381. package/npm_package/schematics/utils/build-component.d.ts +0 -20
  382. package/npm_package/schematics/utils/build-component.js +0 -188
  383. package/npm_package/schematics/utils/build-component.js.map +0 -1
  384. package/npm_package/schematics/utils/get-project.d.ts +0 -13
  385. package/npm_package/schematics/utils/get-project.js +0 -28
  386. package/npm_package/schematics/utils/get-project.js.map +0 -1
  387. package/npm_package/schematics/utils/html-manipulation.d.ts +0 -15
  388. package/npm_package/schematics/utils/html-manipulation.js +0 -91
  389. package/npm_package/schematics/utils/html-manipulation.js.map +0 -1
  390. package/npm_package/schematics/utils/index.d.ts +0 -19
  391. package/npm_package/schematics/utils/index.js +0 -36
  392. package/npm_package/schematics/utils/index.js.map +0 -1
  393. package/npm_package/schematics/utils/parse5-element.d.ts +0 -12
  394. package/npm_package/schematics/utils/parse5-element.js +0 -30
  395. package/npm_package/schematics/utils/parse5-element.js.map +0 -1
  396. package/npm_package/schematics/utils/project-index-file.d.ts +0 -10
  397. package/npm_package/schematics/utils/project-index-file.js +0 -20
  398. package/npm_package/schematics/utils/project-index-file.js.map +0 -1
  399. package/npm_package/schematics/utils/project-main-file.d.ts +0 -10
  400. package/npm_package/schematics/utils/project-main-file.js +0 -25
  401. package/npm_package/schematics/utils/project-main-file.js.map +0 -1
  402. package/npm_package/schematics/utils/project-style-file.d.ts +0 -13
  403. package/npm_package/schematics/utils/project-style-file.js +0 -42
  404. package/npm_package/schematics/utils/project-style-file.js.map +0 -1
  405. package/npm_package/schematics/utils/project-targets.d.ts +0 -14
  406. package/npm_package/schematics/utils/project-targets.js +0 -46
  407. package/npm_package/schematics/utils/project-targets.js.map +0 -1
  408. package/npm_package/schematics/utils/project-tsconfig-paths.d.ts +0 -14
  409. package/npm_package/schematics/utils/project-tsconfig-paths.js +0 -46
  410. package/npm_package/schematics/utils/project-tsconfig-paths.js.map +0 -1
  411. package/npm_package/schematics/utils/schematic-options.d.ts +0 -20
  412. package/npm_package/schematics/utils/schematic-options.js +0 -89
  413. package/npm_package/schematics/utils/schematic-options.js.map +0 -1
  414. package/npm_package/scrolling/index.d.ts +0 -62
  415. package/npm_package/scrolling-module.d-ud2XrbF8.d.ts +0 -552
  416. package/npm_package/selection-model.d-C_vvNGP-.d.ts +0 -117
  417. package/npm_package/stepper/index.d.ts +0 -228
  418. package/npm_package/style-loader.d-BXZfQZTF.d.ts +0 -21
  419. package/npm_package/table/index.d.ts +0 -1100
  420. package/npm_package/testing/index.d.ts +0 -94
  421. package/npm_package/testing/selenium-webdriver/index.d.ts +0 -150
  422. package/npm_package/testing/testbed/index.d.ts +0 -157
  423. package/npm_package/text-field/_index.scss +0 -89
  424. package/npm_package/text-field/index.d.ts +0 -156
  425. package/npm_package/text-field-prebuilt.css +0 -1
  426. package/npm_package/tree/index.d.ts +0 -720
  427. package/npm_package/tree-key-manager-strategy.d-XB6M79l-.d.ts +0 -116
  428. package/npm_package/unique-selection-dispatcher.d-DSFqf1MM.d.ts +0 -33
  429. package/npm_package/view-repeater.d-BKljR8u8.d.ts +0 -89
@@ -1,63 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.findElementsWithAttribute = findElementsWithAttribute;
11
- exports.findAttributeOnElementWithTag = findAttributeOnElementWithTag;
12
- exports.findAttributeOnElementWithAttrs = findAttributeOnElementWithAttrs;
13
- exports.getStartOffsetOfAttribute = getStartOffsetOfAttribute;
14
- const parse5_1 = require("parse5");
15
- /**
16
- * Parses a HTML fragment and traverses all AST nodes in order find elements that
17
- * include the specified attribute.
18
- */
19
- function findElementsWithAttribute(html, attributeName) {
20
- const document = (0, parse5_1.parseFragment)(html, { sourceCodeLocationInfo: true });
21
- const elements = [];
22
- const visitNodes = (nodes) => {
23
- nodes.forEach(n => {
24
- var _a;
25
- const node = n;
26
- if (node.childNodes) {
27
- visitNodes(node.childNodes);
28
- }
29
- if ((_a = node.attrs) === null || _a === void 0 ? void 0 : _a.some(attr => attr.name === attributeName.toLowerCase())) {
30
- elements.push(node);
31
- }
32
- });
33
- };
34
- visitNodes(document.childNodes);
35
- return elements;
36
- }
37
- /**
38
- * Finds elements with explicit tag names that also contain the specified attribute. Returns the
39
- * attribute start offset based on the specified HTML.
40
- */
41
- function findAttributeOnElementWithTag(html, name, tagNames) {
42
- return findElementsWithAttribute(html, name)
43
- .filter(element => tagNames.includes(element.tagName))
44
- .map(element => getStartOffsetOfAttribute(element, name));
45
- }
46
- /**
47
- * Finds elements that contain the given attribute and contain at least one of the other
48
- * specified attributes. Returns the primary attribute's start offset based on the specified HTML.
49
- */
50
- function findAttributeOnElementWithAttrs(html, name, attrs) {
51
- return findElementsWithAttribute(html, name)
52
- .filter(element => attrs.some(attr => hasElementAttribute(element, attr)))
53
- .map(element => getStartOffsetOfAttribute(element, name));
54
- }
55
- /** Shorthand function that checks if the specified element contains the given attribute. */
56
- function hasElementAttribute(element, attributeName) {
57
- return element.attrs && element.attrs.some(attr => attr.name === attributeName.toLowerCase());
58
- }
59
- /** Gets the start offset of the given attribute from a Parse5 element. */
60
- function getStartOffsetOfAttribute(element, attributeName) {
61
- return element.sourceCodeLocation.attrs[attributeName.toLowerCase()].startOffset;
62
- }
63
- //# sourceMappingURL=elements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["elements.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AASH,8DAqBC;AAMD,sEAIC;AAMD,0EAIC;AAQD,8DAEC;AA1DD,mCAAqC;AAGrC;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,IAAY,EAAE,aAAqB;IAC3E,MAAM,QAAQ,GAAG,IAAA,sBAAa,EAAC,IAAI,EAAE,EAAC,sBAAsB,EAAE,IAAI,EAAC,CAAC,CAAC;IACrE,MAAM,QAAQ,GAAc,EAAE,CAAC;IAE/B,MAAM,UAAU,GAAG,CAAC,KAAkB,EAAE,EAAE;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;;YAChB,MAAM,IAAI,GAAG,CAAY,CAAC;YAE1B,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBACpB,UAAU,CAAC,IAA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CAAC,IAAI,KAAK,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC;AAChG,CAAC;AAED,0EAA0E;AAC1E,SAAgB,yBAAyB,CAAC,OAAY,EAAE,aAAqB;IAC3E,OAAO,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC;AACnF,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import { Rule } from '@angular-devkit/schematics';
9
- /** Entry point for the migration schematics with target of Angular CDK 18.0.0 */
10
- export declare function updateToV19(): Rule;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.updateToV19 = updateToV19;
11
- const target_version_1 = require("../update-tool/target-version");
12
- const upgrade_data_1 = require("./upgrade-data");
13
- const devkit_migration_rule_1 = require("./devkit-migration-rule");
14
- const cdkMigrations = [];
15
- /** Entry point for the migration schematics with target of Angular CDK 18.0.0 */
16
- function updateToV19() {
17
- return (0, devkit_migration_rule_1.createMigrationSchematicRule)(target_version_1.TargetVersion.V19, cdkMigrations, upgrade_data_1.cdkUpgradeData, onMigrationComplete);
18
- }
19
- /** Function that will be called when the migration completed. */
20
- function onMigrationComplete(context, targetVersion, hasFailures) {
21
- context.logger.info('');
22
- context.logger.info(` ✓ Updated Angular CDK to ${targetVersion}`);
23
- context.logger.info('');
24
- if (hasFailures) {
25
- context.logger.warn(' ⚠ Some issues were detected but could not be fixed automatically. Please check the ' +
26
- 'output above and fix these issues manually.');
27
- }
28
- }
29
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAUH,kCAOC;AAdD,kEAA4D;AAC5D,iDAA8C;AAC9C,mEAA8F;AAE9F,MAAM,aAAa,GAA8B,EAAE,CAAC;AAEpD,iFAAiF;AACjF,SAAgB,WAAW;IACzB,OAAO,IAAA,oDAA4B,EACjC,8BAAa,CAAC,GAAG,EACjB,aAAa,EACb,6BAAc,EACd,mBAAmB,CACpB,CAAC;AACJ,CAAC;AAED,iEAAiE;AACjE,SAAS,mBAAmB,CAC1B,OAAyB,EACzB,aAA4B,EAC5B,WAAoB;IAEpB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,+BAA+B,aAAa,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAExB,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,wFAAwF;YACtF,6CAA6C,CAChD,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import * as ts from 'typescript';
9
- import { ResolvedResource } from '../../update-tool/component-resource-collector';
10
- import { Migration } from '../../update-tool/migration';
11
- import { AttributeSelectorUpgradeData } from '../data/attribute-selectors';
12
- import { UpgradeData } from '../upgrade-data';
13
- /**
14
- * Migration that walks through every string literal, template and stylesheet
15
- * in order to switch deprecated attribute selectors to the updated selector.
16
- */
17
- export declare class AttributeSelectorsMigration extends Migration<UpgradeData> {
18
- /** Required upgrade changes for specified target version. */
19
- data: AttributeSelectorUpgradeData[];
20
- enabled: boolean;
21
- visitNode(node: ts.Node): void;
22
- visitTemplate(template: ResolvedResource): void;
23
- visitStylesheet(stylesheet: ResolvedResource): void;
24
- private _visitStringLiteralLike;
25
- private _replaceSelector;
26
- }
@@ -1,71 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.AttributeSelectorsMigration = void 0;
11
- const ts = require("typescript");
12
- const migration_1 = require("../../update-tool/migration");
13
- const literal_1 = require("../typescript/literal");
14
- const upgrade_data_1 = require("../upgrade-data");
15
- /**
16
- * Migration that walks through every string literal, template and stylesheet
17
- * in order to switch deprecated attribute selectors to the updated selector.
18
- */
19
- class AttributeSelectorsMigration extends migration_1.Migration {
20
- constructor() {
21
- super(...arguments);
22
- /** Required upgrade changes for specified target version. */
23
- this.data = (0, upgrade_data_1.getVersionUpgradeData)(this, 'attributeSelectors');
24
- // Only enable the migration rule if there is upgrade data.
25
- this.enabled = this.data.length !== 0;
26
- }
27
- visitNode(node) {
28
- if (ts.isStringLiteralLike(node)) {
29
- this._visitStringLiteralLike(node);
30
- }
31
- }
32
- visitTemplate(template) {
33
- this.data.forEach(selector => {
34
- (0, literal_1.findAllSubstringIndices)(template.content, selector.replace)
35
- .map(offset => template.start + offset)
36
- .forEach(start => this._replaceSelector(template.filePath, start, selector));
37
- });
38
- }
39
- visitStylesheet(stylesheet) {
40
- this.data.forEach(selector => {
41
- const currentSelector = `[${selector.replace}]`;
42
- const updatedSelector = `[${selector.replaceWith}]`;
43
- (0, literal_1.findAllSubstringIndices)(stylesheet.content, currentSelector)
44
- .map(offset => stylesheet.start + offset)
45
- .forEach(start => this._replaceSelector(stylesheet.filePath, start, {
46
- replace: currentSelector,
47
- replaceWith: updatedSelector,
48
- }));
49
- });
50
- }
51
- _visitStringLiteralLike(literal) {
52
- if (literal.parent && literal.parent.kind !== ts.SyntaxKind.CallExpression) {
53
- return;
54
- }
55
- const literalText = literal.getText();
56
- const filePath = this.fileSystem.resolve(literal.getSourceFile().fileName);
57
- this.data.forEach(selector => {
58
- (0, literal_1.findAllSubstringIndices)(literalText, selector.replace)
59
- .map(offset => literal.getStart() + offset)
60
- .forEach(start => this._replaceSelector(filePath, start, selector));
61
- });
62
- }
63
- _replaceSelector(filePath, start, data) {
64
- this.fileSystem
65
- .edit(filePath)
66
- .remove(start, data.replace.length)
67
- .insertRight(start, data.replaceWith);
68
- }
69
- }
70
- exports.AttributeSelectorsMigration = AttributeSelectorsMigration;
71
- //# sourceMappingURL=attribute-selectors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attribute-selectors.js","sourceRoot":"","sources":["attribute-selectors.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AAGjC,2DAAsD;AAEtD,mDAA8D;AAC9D,kDAAmE;AAEnE;;;GAGG;AACH,MAAa,2BAA4B,SAAQ,qBAAsB;IAAvE;;QACE,6DAA6D;QAC7D,SAAI,GAAG,IAAA,oCAAqB,EAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;QAEzD,2DAA2D;QAC3D,YAAO,GAAY,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IAyD5C,CAAC;IAvDU,SAAS,CAAC,IAAa;QAC9B,IAAI,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAEQ,aAAa,CAAC,QAA0B;QAC/C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC3B,IAAA,iCAAuB,EAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;iBACxD,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC;iBACtC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,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,CAAC;iBAC1C,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,gBAAgB,CACtB,QAAuB,EACvB,KAAa,EACb,IAAkC;QAElC,IAAI,CAAC,UAAU;aACZ,IAAI,CAAC,QAAQ,CAAC;aACd,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;aAClC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;CACF;AA9DD,kEA8DC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import * as ts from 'typescript';
9
- import { Migration } from '../../update-tool/migration';
10
- import { PropertyNameUpgradeData } from '../data/property-names';
11
- import { UpgradeData } from '../upgrade-data';
12
- /**
13
- * Migration that identifies class declarations that extend CDK or Material classes
14
- * which had a public property change.
15
- */
16
- export declare class ClassInheritanceMigration extends Migration<UpgradeData> {
17
- /**
18
- * Map of classes that have been updated. Each class name maps to the according property
19
- * change data.
20
- */
21
- propertyNames: Map<string, PropertyNameUpgradeData>;
22
- enabled: boolean;
23
- init(): void;
24
- visitNode(node: ts.Node): void;
25
- private _visitClassDeclaration;
26
- }
@@ -1,58 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ClassInheritanceMigration = void 0;
11
- const ts = require("typescript");
12
- const migration_1 = require("../../update-tool/migration");
13
- const base_types_1 = require("../typescript/base-types");
14
- const upgrade_data_1 = require("../upgrade-data");
15
- /**
16
- * Migration that identifies class declarations that extend CDK or Material classes
17
- * which had a public property change.
18
- */
19
- class ClassInheritanceMigration extends migration_1.Migration {
20
- constructor() {
21
- super(...arguments);
22
- /**
23
- * Map of classes that have been updated. Each class name maps to the according property
24
- * change data.
25
- */
26
- this.propertyNames = new Map();
27
- // Only enable the migration rule if there is upgrade data.
28
- this.enabled = this.propertyNames.size !== 0;
29
- }
30
- init() {
31
- (0, upgrade_data_1.getVersionUpgradeData)(this, 'propertyNames')
32
- .filter(data => data.limitedTo && data.limitedTo.classes)
33
- .forEach(data => data.limitedTo.classes.forEach(name => this.propertyNames.set(name, data)));
34
- }
35
- visitNode(node) {
36
- if (ts.isClassDeclaration(node)) {
37
- this._visitClassDeclaration(node);
38
- }
39
- }
40
- _visitClassDeclaration(node) {
41
- const baseTypes = (0, base_types_1.determineBaseTypes)(node);
42
- const className = node.name ? node.name.text : '{unknown-name}';
43
- if (!baseTypes) {
44
- return;
45
- }
46
- baseTypes.forEach(typeName => {
47
- const data = this.propertyNames.get(typeName);
48
- if (data) {
49
- this.createFailureAtNode(node, `Found class "${className}" which extends class ` +
50
- `"${typeName}". Please note that the base class property ` +
51
- `"${data.replace}" has changed to "${data.replaceWith}". ` +
52
- `You may need to update your class as well.`);
53
- }
54
- });
55
- }
56
- }
57
- exports.ClassInheritanceMigration = ClassInheritanceMigration;
58
- //# sourceMappingURL=class-inheritance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-inheritance.js","sourceRoot":"","sources":["class-inheritance.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AACjC,2DAAsD;AAEtD,yDAA4D;AAC5D,kDAAmE;AAEnE;;;GAGG;AACH,MAAa,yBAA0B,SAAQ,qBAAsB;IAArE;;QACE;;;WAGG;QACH,kBAAa,GAAG,IAAI,GAAG,EAAmC,CAAC;QAE3D,2DAA2D;QAC3D,YAAO,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK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ACF;AA5CD,8DA4CC"}
@@ -1,32 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import * as ts from 'typescript';
9
- import { Migration } from '../../update-tool/migration';
10
- import { ClassNameUpgradeData } from '../data';
11
- import { UpgradeData } from '../upgrade-data';
12
- /**
13
- * Migration that walks through every identifier that is part of Angular Material or thr CDK
14
- * and replaces the outdated name with the new one if specified in the upgrade data.
15
- */
16
- export declare class ClassNamesMigration extends Migration<UpgradeData> {
17
- /** Change data that upgrades to the specified target version. */
18
- data: ClassNameUpgradeData[];
19
- /**
20
- * List of identifier names that have been imported from `@angular/material` or `@angular/cdk`
21
- * in the current source file and therefore can be considered trusted.
22
- */
23
- trustedIdentifiers: Set<string>;
24
- /** List of namespaces that have been imported from `@angular/material` or `@angular/cdk`. */
25
- trustedNamespaces: Set<string>;
26
- enabled: boolean;
27
- visitNode(node: ts.Node): void;
28
- /** Method that is called for every identifier inside of the specified project. */
29
- private _visitIdentifier;
30
- /** Creates a failure and replacement for the specified identifier. */
31
- private _createFailureWithReplacement;
32
- }
@@ -1,91 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ClassNamesMigration = void 0;
11
- const ts = require("typescript");
12
- const migration_1 = require("../../update-tool/migration");
13
- const imports_1 = require("../typescript/imports");
14
- const module_specifiers_1 = require("../typescript/module-specifiers");
15
- const upgrade_data_1 = require("../upgrade-data");
16
- /**
17
- * Migration that walks through every identifier that is part of Angular Material or thr CDK
18
- * and replaces the outdated name with the new one if specified in the upgrade data.
19
- */
20
- // TODO: rework this rule to identify symbols using the import identifier resolver. This
21
- // makes it more robust, less AST convoluted and is more TypeScript AST idiomatic. COMP-300.
22
- class ClassNamesMigration extends migration_1.Migration {
23
- constructor() {
24
- super(...arguments);
25
- /** Change data that upgrades to the specified target version. */
26
- this.data = (0, upgrade_data_1.getVersionUpgradeData)(this, 'classNames');
27
- /**
28
- * List of identifier names that have been imported from `@angular/material` or `@angular/cdk`
29
- * in the current source file and therefore can be considered trusted.
30
- */
31
- this.trustedIdentifiers = new Set();
32
- /** List of namespaces that have been imported from `@angular/material` or `@angular/cdk`. */
33
- this.trustedNamespaces = new Set();
34
- // Only enable the migration rule if there is upgrade data.
35
- this.enabled = this.data.length !== 0;
36
- }
37
- visitNode(node) {
38
- if (ts.isIdentifier(node)) {
39
- this._visitIdentifier(node);
40
- }
41
- }
42
- /** Method that is called for every identifier inside of the specified project. */
43
- _visitIdentifier(identifier) {
44
- // For identifiers that aren't listed in the className data, the whole check can be
45
- // skipped safely.
46
- if (!this.data.some(data => data.replace === identifier.text)) {
47
- return;
48
- }
49
- // For namespace imports that are referring to Angular Material or the CDK, we store the
50
- // namespace name in order to be able to safely find identifiers that don't belong to the
51
- // developer's application.
52
- if ((0, imports_1.isNamespaceImportNode)(identifier) && (0, module_specifiers_1.isMaterialImportDeclaration)(identifier)) {
53
- this.trustedNamespaces.add(identifier.text);
54
- return this._createFailureWithReplacement(identifier);
55
- }
56
- // For export declarations that are referring to Angular Material or the CDK, the identifier
57
- // can be immediately updated to the new name.
58
- if ((0, imports_1.isExportSpecifierNode)(identifier) && (0, module_specifiers_1.isMaterialExportDeclaration)(identifier)) {
59
- return this._createFailureWithReplacement(identifier);
60
- }
61
- // For import declarations that are referring to Angular Material or the CDK, the name of
62
- // the import identifiers. This allows us to identify identifiers that belong to Material and
63
- // the CDK, and we won't accidentally touch a developer's identifier.
64
- if ((0, imports_1.isImportSpecifierNode)(identifier) && (0, module_specifiers_1.isMaterialImportDeclaration)(identifier)) {
65
- this.trustedIdentifiers.add(identifier.text);
66
- return this._createFailureWithReplacement(identifier);
67
- }
68
- // In case the identifier is part of a property access expression, we need to verify that the
69
- // property access originates from a namespace that has been imported from Material or the CDK.
70
- if (ts.isPropertyAccessExpression(identifier.parent)) {
71
- const expression = identifier.parent.expression;
72
- if (ts.isIdentifier(expression) && this.trustedNamespaces.has(expression.text)) {
73
- return this._createFailureWithReplacement(identifier);
74
- }
75
- }
76
- else if (this.trustedIdentifiers.has(identifier.text)) {
77
- return this._createFailureWithReplacement(identifier);
78
- }
79
- }
80
- /** Creates a failure and replacement for the specified identifier. */
81
- _createFailureWithReplacement(identifier) {
82
- const classData = this.data.find(data => data.replace === identifier.text);
83
- const filePath = this.fileSystem.resolve(identifier.getSourceFile().fileName);
84
- this.fileSystem
85
- .edit(filePath)
86
- .remove(identifier.getStart(), identifier.getWidth())
87
- .insertRight(identifier.getStart(), classData.replaceWith);
88
- }
89
- }
90
- exports.ClassNamesMigration = ClassNamesMigration;
91
- //# sourceMappingURL=class-names.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-names.js","sourceRoot":"","sources":["class-names.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AACjC,2DAAsD;AAGtD,mDAI+B;AAC/B,uEAGyC;AACzC,kDAAmE;AAEnE;;;GAGG;AACH,wFAAwF;AACxF,4FAA4F;AAC5F,MAAa,mBAAoB,SAAQ,qBAAsB;IAA/D;;QACE,iEAAiE;QACjE,SAAI,GAA2B,IAAA,oCAAqB,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAEzE;;;WAGG;QACH,uBAAkB,GAAgB,IAAI,GAAG,EAAE,CAAC;QAE5C,6FAA6F;QAC7F,sBAAiB,GAAgB,IAAI,GAAG,EAAE,CAAC;QAE3C,2DAA2D;QAC3D,YAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IA+DnC,CAAC;IA7DU,SAAS,CAAC,IAAa;QAC9B,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,IAAI,CAA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AE,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/E,OAAO,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;aAAM,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACxD,OAAO,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,sEAAsE;IAC9D,6BAA6B,CAAC,UAAyB;QAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,IAAI,CAAE,CAAC;QAC5E,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,CAAC;QAE9E,IAAI,CAAC,UAAU;aACZ,IAAI,CAAC,QAAQ,CAAC;aACd,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC;aACpD,WAAW,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAC/D,CAAC;CACF;AA7ED,kDA6EC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import * as ts from 'typescript';
9
- import { Migration } from '../../update-tool/migration';
10
- import { UpgradeData } from '../upgrade-data';
11
- /**
12
- * Migration that visits every TypeScript new expression or super call and checks if
13
- * the parameter type signature is invalid and needs to be updated manually.
14
- */
15
- export declare class ConstructorSignatureMigration extends Migration<UpgradeData> {
16
- data: string[];
17
- enabled: boolean;
18
- visitNode(node: ts.Node): void;
19
- /**
20
- * Method that will be called for each source file of the upgrade project. In order to
21
- * properly determine invalid constructor signatures, we take advantage of the pre-emit
22
- * diagnostics from TypeScript.
23
- *
24
- * By using the diagnostics, the migration can handle type assignability. Not using
25
- * diagnostics would mean that we need to use simple type equality checking which is
26
- * too strict. See related issue: https://github.com/Microsoft/TypeScript/issues/9879
27
- */
28
- private _visitSourceFile;
29
- }
@@ -1,139 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ConstructorSignatureMigration = void 0;
11
- const ts = require("typescript");
12
- const migration_1 = require("../../update-tool/migration");
13
- const version_changes_1 = require("../../update-tool/version-changes");
14
- /**
15
- * List of diagnostic codes that refer to pre-emit diagnostics which indicate invalid
16
- * new expression or super call signatures. See the list of diagnostics here:
17
- *
18
- * https://github.com/Microsoft/TypeScript/blob/master/src/compiler/diagnosticMessages.json
19
- */
20
- const signatureErrorDiagnostics = [
21
- // Type not assignable error diagnostic.
22
- 2345,
23
- // Constructor argument length invalid diagnostics
24
- 2554, 2555, 2556, 2557,
25
- ];
26
- /**
27
- * Migration that visits every TypeScript new expression or super call and checks if
28
- * the parameter type signature is invalid and needs to be updated manually.
29
- */
30
- class ConstructorSignatureMigration extends migration_1.Migration {
31
- constructor() {
32
- super(...arguments);
33
- // Note that the data for this rule is not distinguished based on the target version because
34
- // we don't keep track of the new signature and don't want to update incrementally.
35
- // See: https://github.com/angular/components/pull/12970#issuecomment-418337566
36
- this.data = (0, version_changes_1.getAllChanges)(this.upgradeData.constructorChecks);
37
- // Only enable the migration rule if there is upgrade data.
38
- this.enabled = this.data.length !== 0;
39
- }
40
- visitNode(node) {
41
- if (ts.isSourceFile(node)) {
42
- this._visitSourceFile(node);
43
- }
44
- }
45
- /**
46
- * Method that will be called for each source file of the upgrade project. In order to
47
- * properly determine invalid constructor signatures, we take advantage of the pre-emit
48
- * diagnostics from TypeScript.
49
- *
50
- * By using the diagnostics, the migration can handle type assignability. Not using
51
- * diagnostics would mean that we need to use simple type equality checking which is
52
- * too strict. See related issue: https://github.com/Microsoft/TypeScript/issues/9879
53
- */
54
- _visitSourceFile(sourceFile) {
55
- // List of classes of which the constructor signature has changed.
56
- const diagnostics = ts
57
- .getPreEmitDiagnostics(this.program, sourceFile)
58
- .filter(diagnostic => signatureErrorDiagnostics.includes(diagnostic.code))
59
- .filter(diagnostic => diagnostic.start !== undefined);
60
- for (const diagnostic of diagnostics) {
61
- const node = findConstructorNode(diagnostic, sourceFile);
62
- if (!node) {
63
- continue;
64
- }
65
- const classType = this.typeChecker.getTypeAtLocation(node.expression);
66
- const className = classType.symbol && classType.symbol.name;
67
- const isNewExpression = ts.isNewExpression(node);
68
- // Determine the class names of the actual construct signatures because we cannot assume that
69
- // the diagnostic refers to a constructor of the actual expression. In case the constructor
70
- // is inherited, we need to detect that the owner-class of the constructor is added to the
71
- // constructor checks upgrade data. e.g. `class CustomCalendar extends MatCalendar {}`.
72
- const signatureClassNames = classType
73
- .getConstructSignatures()
74
- .map(signature => getClassDeclarationOfSignature(signature))
75
- .map(declaration => (declaration && declaration.name ? declaration.name.text : null))
76
- .filter(Boolean);
77
- // Besides checking the signature class names, we need to check the actual class name because
78
- // there can be classes without an explicit constructor.
79
- if (!this.data.includes(className) &&
80
- !signatureClassNames.some(name => this.data.includes(name))) {
81
- continue;
82
- }
83
- const classSignatures = classType
84
- .getConstructSignatures()
85
- .map(signature => getParameterTypesFromSignature(signature, this.typeChecker));
86
- const expressionName = isNewExpression ? `new ${className}` : 'super';
87
- const signatures = classSignatures
88
- .map(signature => signature.map(t => (t === null ? 'any' : this.typeChecker.typeToString(t))))
89
- .map(signature => `${expressionName}(${signature.join(', ')})`)
90
- .join(' or ');
91
- this.createFailureAtNode(node, `Found "${className}" constructed with ` +
92
- `an invalid signature. Please manually update the ${expressionName} expression to ` +
93
- `match the new signature${classSignatures.length > 1 ? 's' : ''}: ${signatures}`);
94
- }
95
- }
96
- }
97
- exports.ConstructorSignatureMigration = ConstructorSignatureMigration;
98
- /** Resolves the type for each parameter in the specified signature. */
99
- function getParameterTypesFromSignature(signature, typeChecker) {
100
- return signature
101
- .getParameters()
102
- .map(param => param.declarations ? typeChecker.getTypeAtLocation(param.declarations[0]) : null);
103
- }
104
- /**
105
- * Walks through each node of a source file in order to find a new-expression node or super-call
106
- * expression node that is captured by the specified diagnostic.
107
- */
108
- function findConstructorNode(diagnostic, sourceFile) {
109
- let resolvedNode = null;
110
- const _visitNode = (node) => {
111
- // Check whether the current node contains the diagnostic. If the node contains the diagnostic,
112
- // walk deeper in order to find all constructor expression nodes.
113
- if (node.getStart() <= diagnostic.start && node.getEnd() >= diagnostic.start) {
114
- if (ts.isNewExpression(node) ||
115
- (ts.isCallExpression(node) && node.expression.kind === ts.SyntaxKind.SuperKeyword)) {
116
- resolvedNode = node;
117
- }
118
- ts.forEachChild(node, _visitNode);
119
- }
120
- };
121
- ts.forEachChild(sourceFile, _visitNode);
122
- return resolvedNode;
123
- }
124
- /** Determines the class declaration of the specified construct signature. */
125
- function getClassDeclarationOfSignature(signature) {
126
- let node = signature.getDeclaration();
127
- // Handle signatures which don't have an actual declaration. This happens if a class
128
- // does not have an explicitly written constructor.
129
- if (!node) {
130
- return null;
131
- }
132
- while (!ts.isSourceFile((node = node.parent))) {
133
- if (ts.isClassDeclaration(node)) {
134
- return node;
135
- }
136
- }
137
- return null;
138
- }
139
- //# sourceMappingURL=constructor-signature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constructor-signature.js","sourceRoot":"","sources":["constructor-signature.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AACjC,2DAAsD;AACtD,uEAAgE;AAGhE;;;;;GAKG;AACH,MAAM,yBAAyB,GAAG;I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AE,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACpC,CAAC;IACH,CAAC,CAAC;IAEF,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAExC,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,6EAA6E;AAC7E,SAAS,8BAA8B,CAAC,SAAuB;IAC7D,IAAI,IAAI,GAAY,SAAS,CAAC,cAAc,EAAE,CAAC;IAC/C,oFAAoF;IACpF,mDAAmD;IACnD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC9C,IAAI,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import * as ts from 'typescript';
9
- import { ResolvedResource } from '../../update-tool/component-resource-collector';
10
- import { Migration } from '../../update-tool/migration';
11
- import { CssSelectorUpgradeData } from '../data/css-selectors';
12
- import { UpgradeData } from '../upgrade-data';
13
- /**
14
- * Migration that walks through every string literal, template and stylesheet in
15
- * order to migrate outdated CSS selectors to the new selector.
16
- */
17
- export declare class CssSelectorsMigration extends Migration<UpgradeData> {
18
- /** Change data that upgrades to the specified target version. */
19
- data: CssSelectorUpgradeData[];
20
- enabled: boolean;
21
- visitNode(node: ts.Node): void;
22
- visitTemplate(template: ResolvedResource): void;
23
- visitStylesheet(stylesheet: ResolvedResource): void;
24
- private _visitStringLiteralLike;
25
- private _replaceSelector;
26
- }