@angular/cdk 8.0.0-rc.2 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/a11y/typings/aria-describer/aria-describer.d.ts +4 -3
  2. package/a11y/typings/index.metadata.json +1 -1
  3. package/bundles/cdk-a11y.umd.js +42 -10
  4. package/bundles/cdk-a11y.umd.js.map +1 -1
  5. package/bundles/cdk-a11y.umd.min.js +1 -1
  6. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  7. package/bundles/cdk-drag-drop.umd.js +532 -87
  8. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  9. package/bundles/cdk-drag-drop.umd.min.js +2 -2
  10. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  11. package/bundles/cdk-layout.umd.js +5 -1
  12. package/bundles/cdk-layout.umd.js.map +1 -1
  13. package/bundles/cdk-layout.umd.min.js +1 -1
  14. package/bundles/cdk-layout.umd.min.js.map +1 -1
  15. package/bundles/cdk-overlay.umd.js +31 -23
  16. package/bundles/cdk-overlay.umd.js.map +1 -1
  17. package/bundles/cdk-overlay.umd.min.js +2 -2
  18. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  19. package/bundles/cdk-scrolling.umd.js +6 -7
  20. package/bundles/cdk-scrolling.umd.js.map +1 -1
  21. package/bundles/cdk-scrolling.umd.min.js +1 -1
  22. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  23. package/bundles/cdk-tree.umd.js +8 -6
  24. package/bundles/cdk-tree.umd.js.map +1 -1
  25. package/bundles/cdk-tree.umd.min.js +1 -1
  26. package/bundles/cdk-tree.umd.min.js.map +1 -1
  27. package/bundles/cdk.umd.js +1 -1
  28. package/bundles/cdk.umd.js.map +1 -1
  29. package/bundles/cdk.umd.min.js +1 -1
  30. package/bundles/cdk.umd.min.js.map +1 -1
  31. package/drag-drop/typings/directives/drag.d.ts +1 -1
  32. package/drag-drop/typings/directives/drop-list.d.ts +2 -0
  33. package/drag-drop/typings/drag-drop-registry.d.ts +2 -0
  34. package/drag-drop/typings/drag-ref.d.ts +10 -1
  35. package/drag-drop/typings/drop-list-ref.d.ts +59 -3
  36. package/drag-drop/typings/index.metadata.json +1 -1
  37. package/esm2015/a11y.js +35 -10
  38. package/esm2015/a11y.js.map +1 -1
  39. package/esm2015/cdk.js +1 -1
  40. package/esm2015/cdk.js.map +1 -1
  41. package/esm2015/drag-drop.js +467 -85
  42. package/esm2015/drag-drop.js.map +1 -1
  43. package/esm2015/layout.js +7 -3
  44. package/esm2015/layout.js.map +1 -1
  45. package/esm2015/overlay.js +31 -23
  46. package/esm2015/overlay.js.map +1 -1
  47. package/esm2015/scrolling.js +6 -7
  48. package/esm2015/scrolling.js.map +1 -1
  49. package/esm2015/tree.js +7 -6
  50. package/esm2015/tree.js.map +1 -1
  51. package/esm5/a11y.es5.js +42 -10
  52. package/esm5/a11y.es5.js.map +1 -1
  53. package/esm5/cdk.es5.js +1 -1
  54. package/esm5/cdk.es5.js.map +1 -1
  55. package/esm5/drag-drop.es5.js +530 -85
  56. package/esm5/drag-drop.es5.js.map +1 -1
  57. package/esm5/layout.es5.js +7 -3
  58. package/esm5/layout.es5.js.map +1 -1
  59. package/esm5/overlay.es5.js +32 -24
  60. package/esm5/overlay.es5.js.map +1 -1
  61. package/esm5/scrolling.es5.js +6 -7
  62. package/esm5/scrolling.es5.js.map +1 -1
  63. package/esm5/tree.es5.js +8 -6
  64. package/esm5/tree.es5.js.map +1 -1
  65. package/overlay/typings/index.metadata.json +1 -1
  66. package/overlay/typings/overlay-ref.d.ts +1 -0
  67. package/package.json +4 -4
  68. package/schematics/index.d.ts +1 -0
  69. package/schematics/index.js +1 -0
  70. package/schematics/index.js.map +1 -1
  71. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
  72. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
  73. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.spec.ts → __name@dasherize__.component.spec.ts.template} +0 -0
  74. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +0 -0
  75. package/schematics/ng-generate/drag-drop/index.js +2 -2
  76. package/schematics/ng-generate/drag-drop/index.js.map +1 -1
  77. package/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  78. package/schematics/ng-update/data/attribute-selectors.js +5 -13
  79. package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
  80. package/schematics/ng-update/data/class-names.d.ts +1 -1
  81. package/schematics/ng-update/data/class-names.js +5 -21
  82. package/schematics/ng-update/data/class-names.js.map +1 -1
  83. package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  84. package/schematics/ng-update/data/constructor-checks.js +3 -5
  85. package/schematics/ng-update/data/constructor-checks.js.map +1 -1
  86. package/schematics/ng-update/data/css-selectors.d.ts +1 -1
  87. package/schematics/ng-update/data/css-selectors.js +1 -1
  88. package/schematics/ng-update/data/css-selectors.js.map +1 -1
  89. package/schematics/ng-update/data/element-selectors.d.ts +1 -1
  90. package/schematics/ng-update/data/element-selectors.js +1 -1
  91. package/schematics/ng-update/data/element-selectors.js.map +1 -1
  92. package/schematics/ng-update/data/input-names.d.ts +1 -1
  93. package/schematics/ng-update/data/input-names.js +13 -37
  94. package/schematics/ng-update/data/input-names.js.map +1 -1
  95. package/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  96. package/schematics/ng-update/data/method-call-checks.js +6 -15
  97. package/schematics/ng-update/data/method-call-checks.js.map +1 -1
  98. package/schematics/ng-update/data/output-names.d.ts +1 -1
  99. package/schematics/ng-update/data/output-names.js +1 -1
  100. package/schematics/ng-update/data/output-names.js.map +1 -1
  101. package/schematics/ng-update/data/property-names.d.ts +1 -1
  102. package/schematics/ng-update/data/property-names.js +19 -59
  103. package/schematics/ng-update/data/property-names.js.map +1 -1
  104. package/schematics/ng-update/html-parsing/elements.js.map +1 -1
  105. package/schematics/ng-update/index.d.ts +0 -2
  106. package/schematics/ng-update/index.js +13 -24
  107. package/schematics/ng-update/index.js.map +1 -1
  108. package/schematics/ng-update/public-api.d.ts +0 -5
  109. package/schematics/ng-update/public-api.js +0 -5
  110. package/schematics/ng-update/public-api.js.map +1 -1
  111. package/schematics/ng-update/typescript/base-types.js.map +1 -1
  112. package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
  113. package/schematics/ng-update/upgrade-data.d.ts +5 -30
  114. package/schematics/ng-update/upgrade-data.js +4 -34
  115. package/schematics/ng-update/upgrade-data.js.map +1 -1
  116. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
  117. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js +66 -0
  118. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js.map +1 -0
  119. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
  120. package/schematics/ng-update/upgrade-rules/{class-inheritance/classInheritanceCheckRule.js → class-inheritance-rule.js} +24 -20
  121. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js.map +1 -0
  122. package/{typings/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
  123. package/schematics/ng-update/upgrade-rules/{class-names/classNamesIdentifierRule.js → class-names-rule.js} +19 -24
  124. package/schematics/ng-update/upgrade-rules/class-names-rule.js.map +1 -0
  125. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
  126. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js +134 -0
  127. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js.map +1 -0
  128. package/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
  129. package/schematics/ng-update/upgrade-rules/css-selectors-rule.js +73 -0
  130. package/schematics/ng-update/upgrade-rules/css-selectors-rule.js.map +1 -0
  131. package/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
  132. package/schematics/ng-update/upgrade-rules/element-selectors-rule.js +64 -0
  133. package/schematics/ng-update/upgrade-rules/element-selectors-rule.js.map +1 -0
  134. package/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
  135. package/schematics/ng-update/upgrade-rules/index.js +49 -29
  136. package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
  137. package/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
  138. package/schematics/ng-update/upgrade-rules/input-names-rule.js +59 -0
  139. package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -0
  140. package/schematics/ng-update/upgrade-rules/{signature-check/methodCallsCheckRule.d.ts → method-call-arguments-rule.d.ts} +8 -9
  141. package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js +60 -0
  142. package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js.map +1 -0
  143. package/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
  144. package/schematics/ng-update/upgrade-rules/misc-template-rule.js +37 -0
  145. package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -0
  146. package/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
  147. package/schematics/ng-update/upgrade-rules/output-names-rule.js +46 -0
  148. package/schematics/ng-update/upgrade-rules/output-names-rule.js.map +1 -0
  149. package/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
  150. package/schematics/ng-update/upgrade-rules/property-names-rule.js +46 -0
  151. package/schematics/ng-update/upgrade-rules/property-names-rule.js.map +1 -0
  152. package/schematics/tsconfig.tsbuildinfo +2896 -3609
  153. package/schematics/update-tool/component-resource-collector.d.ts +41 -0
  154. package/schematics/update-tool/component-resource-collector.js +141 -0
  155. package/schematics/update-tool/component-resource-collector.js.map +1 -0
  156. package/schematics/update-tool/index.d.ts +13 -0
  157. package/schematics/update-tool/index.js +117 -0
  158. package/schematics/update-tool/index.js.map +1 -0
  159. package/schematics/update-tool/migration-rule.d.ts +45 -0
  160. package/schematics/update-tool/migration-rule.js +50 -0
  161. package/schematics/update-tool/migration-rule.js.map +1 -0
  162. package/schematics/update-tool/public-api.d.ts +12 -0
  163. package/schematics/update-tool/public-api.js +18 -0
  164. package/schematics/update-tool/public-api.js.map +1 -0
  165. package/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
  166. package/schematics/{ng-update → update-tool}/target-version.js +3 -3
  167. package/schematics/update-tool/target-version.js.map +1 -0
  168. package/schematics/update-tool/utils/decorators.d.ts +23 -0
  169. package/schematics/update-tool/utils/decorators.js +37 -0
  170. package/schematics/update-tool/utils/decorators.js.map +1 -0
  171. package/schematics/update-tool/utils/functions.d.ts +14 -0
  172. package/schematics/update-tool/utils/functions.js +20 -0
  173. package/schematics/update-tool/utils/functions.js.map +1 -0
  174. package/schematics/update-tool/utils/imports.d.ts +15 -0
  175. package/schematics/update-tool/utils/imports.js +35 -0
  176. package/schematics/update-tool/utils/imports.js.map +1 -0
  177. package/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  178. package/schematics/update-tool/utils/line-mappings.js +75 -0
  179. package/schematics/update-tool/utils/line-mappings.js.map +1 -0
  180. package/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
  181. package/schematics/update-tool/utils/parse-tsconfig.js +22 -0
  182. package/schematics/update-tool/utils/parse-tsconfig.js.map +1 -0
  183. package/schematics/update-tool/utils/property-name.d.ts +18 -0
  184. package/schematics/update-tool/utils/property-name.js +27 -0
  185. package/schematics/update-tool/utils/property-name.js.map +1 -0
  186. package/schematics/update-tool/version-changes.d.ts +32 -0
  187. package/schematics/update-tool/version-changes.js +41 -0
  188. package/schematics/update-tool/version-changes.js.map +1 -0
  189. package/schematics/utils/build-component.js +4 -4
  190. package/schematics/utils/build-component.js.map +1 -1
  191. package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
  192. package/schematics/utils/project-tsconfig-paths.js +77 -0
  193. package/schematics/utils/project-tsconfig-paths.js.map +1 -0
  194. package/typings/a11y/aria-describer/aria-describer.d.ts +4 -3
  195. package/typings/a11y/index.metadata.json +1 -1
  196. package/typings/drag-drop/directives/drag.d.ts +1 -1
  197. package/typings/drag-drop/directives/drop-list.d.ts +2 -0
  198. package/typings/drag-drop/drag-drop-registry.d.ts +2 -0
  199. package/typings/drag-drop/drag-ref.d.ts +10 -1
  200. package/typings/drag-drop/drop-list-ref.d.ts +59 -3
  201. package/typings/drag-drop/index.metadata.json +1 -1
  202. package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +4 -3
  203. package/typings/esm5/a11y/index.metadata.json +1 -1
  204. package/typings/esm5/drag-drop/directives/drag.d.ts +1 -1
  205. package/typings/esm5/drag-drop/directives/drop-list.d.ts +2 -0
  206. package/typings/esm5/drag-drop/drag-drop-registry.d.ts +2 -0
  207. package/typings/esm5/drag-drop/drag-ref.d.ts +10 -1
  208. package/typings/esm5/drag-drop/drop-list-ref.d.ts +59 -3
  209. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  210. package/typings/esm5/index.metadata.json +1 -1
  211. package/typings/esm5/overlay/index.metadata.json +1 -1
  212. package/typings/esm5/overlay/overlay-ref.d.ts +1 -0
  213. package/typings/index.metadata.json +1 -1
  214. package/typings/overlay/index.metadata.json +1 -1
  215. package/typings/overlay/overlay-ref.d.ts +1 -0
  216. package/typings/schematics/index.d.ts +1 -0
  217. package/typings/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  218. package/typings/schematics/ng-update/data/class-names.d.ts +1 -1
  219. package/typings/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  220. package/typings/schematics/ng-update/data/css-selectors.d.ts +1 -1
  221. package/typings/schematics/ng-update/data/element-selectors.d.ts +1 -1
  222. package/typings/schematics/ng-update/data/input-names.d.ts +1 -1
  223. package/typings/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  224. package/typings/schematics/ng-update/data/output-names.d.ts +1 -1
  225. package/typings/schematics/ng-update/data/property-names.d.ts +1 -1
  226. package/typings/schematics/ng-update/index.d.ts +0 -2
  227. package/typings/schematics/ng-update/public-api.d.ts +0 -5
  228. package/typings/schematics/ng-update/upgrade-data.d.ts +5 -30
  229. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
  230. package/typings/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
  231. package/{schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → typings/schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
  232. package/typings/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
  233. package/typings/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
  234. package/typings/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
  235. package/typings/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
  236. package/typings/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
  237. package/typings/schematics/ng-update/upgrade-rules/{signature-check/methodCallsCheckRule.d.ts → method-call-arguments-rule.d.ts} +8 -9
  238. package/typings/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
  239. package/typings/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
  240. package/typings/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
  241. package/typings/schematics/update-tool/component-resource-collector.d.ts +41 -0
  242. package/typings/schematics/update-tool/index.d.ts +13 -0
  243. package/typings/schematics/update-tool/migration-rule.d.ts +45 -0
  244. package/typings/schematics/update-tool/public-api.d.ts +12 -0
  245. package/typings/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
  246. package/typings/schematics/update-tool/utils/decorators.d.ts +23 -0
  247. package/typings/schematics/update-tool/utils/functions.d.ts +14 -0
  248. package/typings/schematics/update-tool/utils/imports.d.ts +15 -0
  249. package/typings/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  250. package/typings/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
  251. package/typings/schematics/update-tool/utils/property-name.d.ts +18 -0
  252. package/typings/schematics/update-tool/version-changes.d.ts +32 -0
  253. package/typings/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
  254. package/schematics/ng-update/target-version.js.map +0 -1
  255. package/schematics/ng-update/tslint/component-file.d.ts +0 -14
  256. package/schematics/ng-update/tslint/component-file.js +0 -31
  257. package/schematics/ng-update/tslint/component-file.js.map +0 -1
  258. package/schematics/ng-update/tslint/component-walker.d.ts +0 -47
  259. package/schematics/ng-update/tslint/component-walker.js +0 -142
  260. package/schematics/ng-update/tslint/component-walker.js.map +0 -1
  261. package/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
  262. package/schematics/ng-update/tslint/external-failure-walker.js +0 -38
  263. package/schematics/ng-update/tslint/external-failure-walker.js.map +0 -1
  264. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
  265. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js +0 -49
  266. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js.map +0 -1
  267. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
  268. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js +0 -62
  269. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js.map +0 -1
  270. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
  271. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js +0 -59
  272. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js.map +0 -1
  273. package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
  274. package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.js.map +0 -1
  275. package/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.js.map +0 -1
  276. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
  277. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js +0 -53
  278. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js.map +0 -1
  279. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
  280. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js +0 -63
  281. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js.map +0 -1
  282. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
  283. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js +0 -62
  284. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js.map +0 -1
  285. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
  286. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js +0 -50
  287. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js.map +0 -1
  288. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
  289. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js +0 -60
  290. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js.map +0 -1
  291. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
  292. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js +0 -59
  293. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js.map +0 -1
  294. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
  295. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js +0 -67
  296. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js.map +0 -1
  297. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
  298. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js +0 -67
  299. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js.map +0 -1
  300. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
  301. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js +0 -49
  302. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +0 -1
  303. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
  304. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js +0 -67
  305. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js.map +0 -1
  306. package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js +0 -64
  307. package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js.map +0 -1
  308. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
  309. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js +0 -46
  310. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js.map +0 -1
  311. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
  312. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +0 -132
  313. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +0 -1
  314. package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js +0 -58
  315. package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js.map +0 -1
  316. package/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
  317. package/schematics/ng-update/upgrade-rules/tslint-config.js +0 -76
  318. package/schematics/ng-update/upgrade-rules/tslint-config.js.map +0 -1
  319. package/typings/schematics/ng-update/tslint/component-file.d.ts +0 -14
  320. package/typings/schematics/ng-update/tslint/component-walker.d.ts +0 -47
  321. package/typings/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
  322. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
  323. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
  324. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
  325. package/typings/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
  326. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
  327. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
  328. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
  329. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
  330. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
  331. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
  332. package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
  333. package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
  334. package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
  335. package/typings/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
  336. package/typings/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
  337. package/typings/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
  338. package/typings/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
@@ -1,132 +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.io/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- const chalk_1 = require("chalk");
11
- const tslint_1 = require("tslint");
12
- const ts = require("typescript");
13
- const upgrade_data_1 = require("../../upgrade-data");
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
- * Rule that visits every TypeScript new expression or super call and checks if the parameter
28
- * type signature is invalid and needs to be updated manually.
29
- */
30
- class Rule extends tslint_1.Rules.TypedRule {
31
- applyWithProgram(sourceFile, program) {
32
- // Note that the data for this rule is not distinguished based on the target version because
33
- // we don't keep track of the new signature and don't want to update incrementally.
34
- // See: https://github.com/angular/components/pull/12970#issuecomment-418337566
35
- const data = upgrade_data_1.getAllChanges(this.getOptions().ruleArguments[1].constructorChecks);
36
- return this.applyWithFunction(sourceFile, visitSourceFile, data, program);
37
- }
38
- }
39
- exports.Rule = Rule;
40
- /**
41
- * Function that will be called for each source file of the upgrade project. In order to properly
42
- * determine invalid constructor signatures, we take advantage of the pre-emit diagnostics from
43
- * TypeScript.
44
- *
45
- * By using the diagnostics we can properly respect type assignability because otherwise we
46
- * would need to rely on type equality checking which is too strict.
47
- * See related issue: https://github.com/Microsoft/TypeScript/issues/9879
48
- */
49
- function visitSourceFile(context, program) {
50
- // List of classes of which the constructor signature has changed.
51
- const signatureChangeData = context.options;
52
- const sourceFile = context.sourceFile;
53
- const diagnostics = ts.getPreEmitDiagnostics(program, sourceFile)
54
- .filter(diagnostic => signatureErrorDiagnostics.includes(diagnostic.code))
55
- .filter(diagnostic => diagnostic.start !== undefined);
56
- for (const diagnostic of diagnostics) {
57
- const node = findConstructorNode(diagnostic, sourceFile);
58
- if (!node) {
59
- continue;
60
- }
61
- const classType = program.getTypeChecker().getTypeAtLocation(node.expression);
62
- const className = classType.symbol && classType.symbol.name;
63
- const isNewExpression = ts.isNewExpression(node);
64
- // Determine the class names of the actual construct signatures because we cannot assume
65
- // that the diagnostic refers to a constructor of the actual expression. In case the constructor
66
- // is inherited, we need to detect that the owner-class of the constructor is added to the
67
- // constructor checks upgrade data. e.g. `class CustomCalendar extends MatCalendar {}`.
68
- const signatureClassNames = classType.getConstructSignatures()
69
- .map(signature => getClassDeclarationOfSignature(signature))
70
- .map(declaration => declaration && declaration.name ? declaration.name.text : null)
71
- .filter(Boolean);
72
- // Besides checking the signature class names, we need to check the actual class name because
73
- // there can be classes without an explicit constructor.
74
- if (!signatureChangeData.includes(className) &&
75
- !signatureClassNames.some(name => signatureChangeData.includes(name))) {
76
- continue;
77
- }
78
- const classSignatures = classType.getConstructSignatures()
79
- .map(signature => getParameterTypesFromSignature(signature, program));
80
- const expressionName = isNewExpression ? `new ${className}` : 'super';
81
- const signatures = classSignatures
82
- .map(signature => signature.map(t => program.getTypeChecker().typeToString(t)))
83
- .map(signature => `${expressionName}(${signature.join(', ')})`)
84
- .join(' or ');
85
- context.addFailureAtNode(node, `Found "${chalk_1.bold(className)}" constructed with ` +
86
- `an invalid signature. Please manually update the ${chalk_1.bold(expressionName)} expression to ` +
87
- `match the new signature${classSignatures.length > 1 ? 's' : ''}: ${chalk_1.green(signatures)}`);
88
- }
89
- }
90
- /** Resolves the type for each parameter in the specified signature. */
91
- function getParameterTypesFromSignature(signature, program) {
92
- return signature.getParameters()
93
- .map(param => param.declarations[0])
94
- .map(node => node.type)
95
- .map(typeNode => program.getTypeChecker().getTypeFromTypeNode(typeNode));
96
- }
97
- /**
98
- * Walks through each node of a source file in order to find a new-expression node or super-call
99
- * expression node that is captured by the specified diagnostic.
100
- */
101
- function findConstructorNode(diagnostic, sourceFile) {
102
- let resolvedNode = null;
103
- const _visitNode = (node) => {
104
- // Check whether the current node contains the diagnostic. If the node contains the diagnostic,
105
- // walk deeper in order to find all constructor expression nodes.
106
- if (node.getStart() <= diagnostic.start && node.getEnd() >= diagnostic.start) {
107
- if (ts.isNewExpression(node) ||
108
- (ts.isCallExpression(node) && node.expression.kind === ts.SyntaxKind.SuperKeyword)) {
109
- resolvedNode = node;
110
- }
111
- ts.forEachChild(node, _visitNode);
112
- }
113
- };
114
- ts.forEachChild(sourceFile, _visitNode);
115
- return resolvedNode;
116
- }
117
- /** Determines the class declaration of the specified construct signature. */
118
- function getClassDeclarationOfSignature(signature) {
119
- let node = signature.getDeclaration();
120
- // Handle signatures which don't have an actual declaration. This happens if a class
121
- // does not have an explicitly written constructor.
122
- if (!node) {
123
- return null;
124
- }
125
- while (!ts.isSourceFile(node = node.parent)) {
126
- if (ts.isClassDeclaration(node)) {
127
- return node;
128
- }
129
- }
130
- return null;
131
- }
132
- //# sourceMappingURL=constructorSignatureCheckRule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constructorSignatureCheckRule.js","sourceRoot":"","sources":["../../../../../../../src/cdk/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,iCAAkC;AAClC,mCAAuD;AACvD,iCAAiC;AAEjC,qDAAiD;AAEjD;;;;;GAKG;AACH,MAAM,yBAAyB,GAAG;IAChC,wCAAwC;IACxC,IAAI;IACJ,kDAAkD;IAClD,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;CACvB,CAAC;AAEF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AAU,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;IAE/C,oFAAoF;IACpF,mDAAmD;IACnD,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE;QAC3C,IAAI,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE;YAC/B,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -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.io/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- const chalk_1 = require("chalk");
11
- const tslint_1 = require("tslint");
12
- const ts = require("typescript");
13
- const upgrade_data_1 = require("../../upgrade-data");
14
- /**
15
- * Rule that visits every TypeScript method call expression and checks if the argument count
16
- * is invalid and needs to be *manually* updated.
17
- */
18
- class Rule extends tslint_1.Rules.TypedRule {
19
- applyWithProgram(sourceFile, program) {
20
- return this.applyWithWalker(new Walker(sourceFile, this.getOptions(), program));
21
- }
22
- }
23
- exports.Rule = Rule;
24
- class Walker extends tslint_1.ProgramAwareRuleWalker {
25
- constructor() {
26
- super(...arguments);
27
- /** Change data that upgrades to the specified target version. */
28
- this.data = upgrade_data_1.getUpgradeDataFromWalker(this, 'methodCallChecks');
29
- }
30
- visitCallExpression(node) {
31
- if (ts.isPropertyAccessExpression(node.expression)) {
32
- this._checkPropertyAccessMethodCall(node);
33
- }
34
- return super.visitCallExpression(node);
35
- }
36
- _checkPropertyAccessMethodCall(node) {
37
- const propertyAccess = node.expression;
38
- if (!ts.isIdentifier(propertyAccess.name)) {
39
- return;
40
- }
41
- const hostType = this.getTypeChecker().getTypeAtLocation(propertyAccess.expression);
42
- const hostTypeName = hostType.symbol && hostType.symbol.name;
43
- const methodName = propertyAccess.name.text;
44
- if (!hostTypeName) {
45
- return;
46
- }
47
- const failure = this.data
48
- .filter(data => data.method === methodName && data.className === hostTypeName)
49
- .map(data => data.invalidArgCounts.find(f => f.count === node.arguments.length))[0];
50
- if (!failure) {
51
- return;
52
- }
53
- this.addFailureAtNode(node, `Found call to "${chalk_1.bold(hostTypeName + '.' + methodName)}" ` +
54
- `with ${chalk_1.bold(`${failure.count}`)} arguments. Message: ${failure.message}`);
55
- }
56
- }
57
- exports.Walker = Walker;
58
- //# sourceMappingURL=methodCallsCheckRule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"methodCallsCheckRule.js","sourceRoot":"","sources":["../../../../../../../src/cdk/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,iCAA2B;AAC3B,mCAAkE;AAClE,iCAAiC;AAGjC,qDAA4D;AAE5D;;;GAGG;AACH,MAAa,IAAK,SAAQ,cAAK,CAAC,SAAS;IACvC,gBAAgB,CAAC,UAAyB,EAAE,OAAmB;QAC7D,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC;CACF;AAJD,oBAIC;AAED,MAAa,MAAO,SAAQ,+BAAsB;IAAlD;;QAEE,iEAAiE;QACjE,SAAI,GAA4B,uCAAwB,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAoCrF,CAAC;IAlCC,mBAAmB,CAAC,IAAuB;QACzC,IAAI,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YAClD,IAAI,CAAC,8BAA8B,CAAC,I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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.io/license
7
- */
8
- import { TargetVersion } from '../target-version';
9
- import { RuleUpgradeData } from '../upgrade-data';
10
- /** Optional upgrade configuration for TSLint. */
11
- export interface UpgradeTSLintConfig {
12
- upgradeData: RuleUpgradeData;
13
- extraRuleDirectories?: string[];
14
- extraUpgradeRules?: UpgradeRules;
15
- extraStyleFiles?: string[];
16
- }
17
- /** Type for the configuration list of upgrade rules. */
18
- export declare type UpgradeRules = (string | (string | TargetVersion)[])[];
19
- /**
20
- * Creates a TSLint configuration object that can be passed to the schematic `TSLintFixTask`.
21
- * Each rule will have the specified target version as option which can be used to swap out
22
- * the upgrade data based on the given target version.
23
- *
24
- * @param target Target version that will be used to reduce the upgrade data to the necessary
25
- * changes that are affected by the target version.
26
- * @param config Configuration object that can be specified to add additional rules or
27
- * specify additional external stylesheets which are not referenced by Angular.
28
- */
29
- export declare function createTslintConfig(target: TargetVersion, config: UpgradeTSLintConfig): {
30
- rulesDirectory: string[];
31
- rules: {};
32
- };
@@ -1,76 +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.io/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- const glob_1 = require("glob");
11
- /**
12
- * List of upgrade rules that will be always enabled because the upgrade data for these rules
13
- * can be swapped out dynamically.
14
- *
15
- * Rules which are specific to CDK breaking changes and are not based on the upgrade data,
16
- * shouldn't be listed here because those cannot be disabled if Angular Material runs its
17
- * update schematic using these base rules.
18
- */
19
- const baseUpgradeRules = [
20
- // Attribute selector update rules.
21
- 'attribute-selectors-string-literal',
22
- 'attribute-selectors-stylesheet',
23
- 'attribute-selectors-template',
24
- // Class inheritance
25
- 'class-inheritance-check',
26
- // Class name update rules
27
- 'class-names-identifier',
28
- // CSS selectors update rules
29
- 'css-selectors-string-literal',
30
- 'css-selectors-stylesheet',
31
- 'css-selectors-template',
32
- // Element selector update rules
33
- 'element-selectors-string-literal',
34
- 'element-selectors-stylesheet',
35
- 'element-selectors-template',
36
- // Input name update rules
37
- 'input-names-stylesheet',
38
- 'input-names-template',
39
- // Output name update rules
40
- 'output-names-template',
41
- // Property name update rules
42
- 'property-names-access',
43
- // Signature and method call checks
44
- 'constructor-signature-check',
45
- 'method-calls-check',
46
- ];
47
- /** List of absolute paths that refer to directories that contain the upgrade rules. */
48
- const ruleDirectories = glob_1.sync('./**/', { cwd: __dirname, absolute: true });
49
- /**
50
- * Creates a TSLint configuration object that can be passed to the schematic `TSLintFixTask`.
51
- * Each rule will have the specified target version as option which can be used to swap out
52
- * the upgrade data based on the given target version.
53
- *
54
- * @param target Target version that will be used to reduce the upgrade data to the necessary
55
- * changes that are affected by the target version.
56
- * @param config Configuration object that can be specified to add additional rules or
57
- * specify additional external stylesheets which are not referenced by Angular.
58
- */
59
- function createTslintConfig(target, config) {
60
- const configuredRules = baseUpgradeRules.concat(config.extraUpgradeRules || []);
61
- const configuredRuleDirs = ruleDirectories.concat(config.extraRuleDirectories || []);
62
- const enabledRules = configuredRules.reduce((result, data) => {
63
- const ruleName = data instanceof Array ? data[0] : data;
64
- const versionConstraints = data instanceof Array ? data.slice(1) : null;
65
- if (!versionConstraints || versionConstraints.includes(target)) {
66
- result[ruleName] = [true, target, config.upgradeData, config.extraStyleFiles];
67
- }
68
- return result;
69
- }, {});
70
- return {
71
- rulesDirectory: configuredRuleDirs,
72
- rules: enabledRules
73
- };
74
- }
75
- exports.createTslintConfig = createTslintConfig;
76
- //# sourceMappingURL=tslint-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tslint-config.js","sourceRoot":"","sources":["../../../../../../src/cdk/schematics/ng-update/upgrade-rules/tslint-config.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,+BAAsC;AAetC;;;;;;;GAOG;AACH,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MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;SAC/E;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,cAAc,EAAE,kBAAkB;QAClC,KAAK,EAAE,YAAY;KACpB,CAAC;AACJ,CAAC;AAnBD,gDAmBC"}
@@ -1,14 +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.io/license
7
- */
8
- import * as ts from 'typescript';
9
- export declare type ExternalResource = ts.SourceFile;
10
- /**
11
- * Creates a fake TypeScript source file that can contain content of templates or stylesheets.
12
- * The fake TypeScript source file then can be passed to TSLint in combination with a rule failure.
13
- */
14
- export declare function createComponentFile(filePath: string, content: string): ExternalResource;
@@ -1,47 +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.io/license
7
- */
8
- import * as ts from 'typescript';
9
- import { ExternalResource } from './component-file';
10
- import { ExternalFailureWalker } from './external-failure-walker';
11
- /**
12
- * Custom TSLint rule walker that identifies Angular components and visits specific parts of
13
- * the component metadata.
14
- */
15
- export declare class ComponentWalker extends ExternalFailureWalker {
16
- visitInlineTemplate(_template: ts.StringLiteralLike): void;
17
- visitInlineStylesheet(_stylesheet: ts.StringLiteralLike): void;
18
- visitExternalTemplate(_template: ExternalResource): void;
19
- visitExternalStylesheet(_stylesheet: ExternalResource): void;
20
- /**
21
- * We keep track of all visited stylesheet files because we allow manually reporting external
22
- * stylesheets which couldn't be detected by the component walker. Reporting these files multiple
23
- * times will result in duplicated TSLint failures and replacements.
24
- */
25
- private _visitedStylesheetFiles;
26
- visitNode(node: ts.Node): void;
27
- private _visitDirectiveCallExpression;
28
- private _reportExternalTemplate;
29
- private _reportInlineStyles;
30
- private _visitExternalStylesArrayLiteral;
31
- private _reportExternalStyle;
32
- /**
33
- * Recursively searches for the metadata object literal expression inside of a directive call
34
- * expression. Since expression calls can be nested through *parenthesized* expressions, we
35
- * need to recursively visit and check every expression inside of a parenthesized expression.
36
- *
37
- * e.g. @Component((({myMetadataExpression}))) will return `myMetadataExpression`.
38
- */
39
- private _findMetadataFromExpression;
40
- /**
41
- * Creates a TSLint failure that reports that the resource file that belongs to the specified
42
- * TypeScript node could not be resolved in the file system.
43
- */
44
- private _createResourceNotFoundFailure;
45
- /** Reports the specified additional stylesheets. */
46
- _reportExtraStylesheetFiles(filePaths: string[]): void;
47
- }
@@ -1,25 +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.io/license
7
- */
8
- import { Fix, Replacement, RuleWalker } from 'tslint';
9
- import { ExternalResource } from './component-file';
10
- /**
11
- * Enhanced TSLint rule walker that makes it easier to create rule failures that don't belong to
12
- * the source file that has been passed to the rule walker.
13
- */
14
- export declare class ExternalFailureWalker extends RuleWalker {
15
- /** Adds a failure for the external resource at the specified position with the given width. */
16
- addExternalFailureAt(node: ExternalResource, start: number, width: number, message: string, fix?: Fix): void;
17
- /** Adds a failure at the specified range for the external resource. */
18
- addExternalFailureFromStartToEnd(node: ExternalResource, start: number, end: number, message: string, fix?: Fix): void;
19
- /** Adds a failure for the whole external resource node. */
20
- addExternalFailure(node: ExternalResource, message: string, fix?: Fix): void;
21
- /** Adds a failure to the external resource at the location of the specified replacement. */
22
- addExternalFailureAtReplacement(node: ExternalResource, message: string, replacement: Replacement): void;
23
- /** Adds a failure at the location of the specified replacement. */
24
- addFailureAtReplacement(message: string, replacement: Replacement): void;
25
- }
@@ -1,16 +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.io/license
7
- */
8
- import { RuleFailure, Rules } from 'tslint';
9
- import * as ts from 'typescript';
10
- /**
11
- * Rule that walks through every string literal that is part of a call expression and
12
- * switches deprecated attribute selectors to the updated selector.
13
- */
14
- export declare class Rule extends Rules.AbstractRule {
15
- apply(sourceFile: ts.SourceFile): RuleFailure[];
16
- }
@@ -1,31 +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.io/license
7
- */
8
- import { IOptions, RuleFailure, Rules } from 'tslint';
9
- import * as ts from 'typescript';
10
- import { AttributeSelectorUpgradeData } from '../../data';
11
- import { ExternalResource } from '../../tslint/component-file';
12
- import { ComponentWalker } from '../../tslint/component-walker';
13
- /**
14
- * Rule that walks through every stylesheet in the application and updates outdated
15
- * attribute selectors to the updated selector.
16
- */
17
- export declare class Rule extends Rules.AbstractRule {
18
- apply(sourceFile: ts.SourceFile): RuleFailure[];
19
- }
20
- export declare class Walker extends ComponentWalker {
21
- /** Change data that upgrades to the specified target version. */
22
- data: AttributeSelectorUpgradeData[];
23
- constructor(sourceFile: ts.SourceFile, options: IOptions);
24
- visitInlineStylesheet(literal: ts.StringLiteralLike): void;
25
- visitExternalStylesheet(node: ExternalResource): void;
26
- /**
27
- * Searches for outdated attribute selectors in the specified content and creates replacements
28
- * with the according messages that can be added to a rule failure.
29
- */
30
- private _createReplacementsForContent;
31
- }
@@ -1,30 +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.io/license
7
- */
8
- import { RuleFailure, Rules } from 'tslint';
9
- import * as ts from 'typescript';
10
- import { AttributeSelectorUpgradeData } from '../../data';
11
- import { ExternalResource } from '../../tslint/component-file';
12
- import { ComponentWalker } from '../../tslint/component-walker';
13
- /**
14
- * Rule that walks through every component template and switches outdated attribute
15
- * selectors to the updated selector.
16
- */
17
- export declare class Rule extends Rules.AbstractRule {
18
- apply(sourceFile: ts.SourceFile): RuleFailure[];
19
- }
20
- export declare class Walker extends ComponentWalker {
21
- /** Change data that upgrades to the specified target version. */
22
- data: AttributeSelectorUpgradeData[];
23
- visitInlineTemplate(node: ts.StringLiteralLike): void;
24
- visitExternalTemplate(node: ExternalResource): void;
25
- /**
26
- * Searches for outdated attribute selectors in the specified content and creates replacements
27
- * with the according messages that can be added to a rule failure.
28
- */
29
- private _createReplacementsForContent;
30
- }
@@ -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.io/license
7
- */
8
- import { IOptions, ProgramAwareRuleWalker, RuleFailure, Rules } from 'tslint';
9
- import * as ts from 'typescript';
10
- import { PropertyNameUpgradeData } from '../../data/property-names';
11
- /**
12
- * Rule that identifies class declarations that extend CDK or Material classes and had
13
- * a public property change.
14
- */
15
- export declare class Rule extends Rules.TypedRule {
16
- applyWithProgram(sourceFile: ts.SourceFile, program: ts.Program): RuleFailure[];
17
- }
18
- export declare class Walker extends ProgramAwareRuleWalker {
19
- /**
20
- * Map of classes that have been updated. Each class name maps to the according property
21
- * change data.
22
- */
23
- propertyNames: Map<string, PropertyNameUpgradeData>;
24
- constructor(sourceFile: ts.SourceFile, options: IOptions, program: ts.Program);
25
- visitClassDeclaration(node: ts.ClassDeclaration): void;
26
- }
@@ -1,24 +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.io/license
7
- */
8
- import { RuleFailure, Rules, RuleWalker } from 'tslint';
9
- import * as ts from 'typescript';
10
- import { CssSelectorUpgradeData } from '../../data/css-selectors';
11
- /**
12
- * Rule that walks through every string literal that is wrapped inside of a call expression.
13
- * All string literals which include an outdated CSS selector will be migrated.
14
- */
15
- export declare class Rule extends Rules.AbstractRule {
16
- apply(sourceFile: ts.SourceFile): RuleFailure[];
17
- }
18
- export declare class Walker extends RuleWalker {
19
- /** Change data that upgrades to the specified target version. */
20
- data: CssSelectorUpgradeData[];
21
- visitStringLiteral(node: ts.StringLiteral): void;
22
- /** Adds a css selector failure with the given replacement at the specified node. */
23
- private _addFailureWithReplacement;
24
- }
@@ -1,31 +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.io/license
7
- */
8
- import { IOptions, RuleFailure, Rules } from 'tslint';
9
- import * as ts from 'typescript';
10
- import { CssSelectorUpgradeData } from '../../data';
11
- import { ExternalResource } from '../../tslint/component-file';
12
- import { ComponentWalker } from '../../tslint/component-walker';
13
- /**
14
- * Rule that walks through every inline or external CSs stylesheet and updates outdated
15
- * CSS selectors.
16
- */
17
- export declare class Rule extends Rules.AbstractRule {
18
- apply(sourceFile: ts.SourceFile): RuleFailure[];
19
- }
20
- export declare class Walker extends ComponentWalker {
21
- /** Change data that upgrades to the specified target version. */
22
- data: CssSelectorUpgradeData[];
23
- constructor(sourceFile: ts.SourceFile, options: IOptions);
24
- visitInlineStylesheet(node: ts.StringLiteralLike): void;
25
- visitExternalStylesheet(node: ExternalResource): void;
26
- /**
27
- * Searches for outdated CSS selectors in the specified content and creates replacements
28
- * with the according messages that can be added to a rule failure.
29
- */
30
- private _createReplacementsForContent;
31
- }
@@ -1,30 +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.io/license
7
- */
8
- import { RuleFailure, Rules } from 'tslint';
9
- import * as ts from 'typescript';
10
- import { CssSelectorUpgradeData } from '../../data';
11
- import { ExternalResource } from '../../tslint/component-file';
12
- import { ComponentWalker } from '../../tslint/component-walker';
13
- /**
14
- * Rule that walks through every inline or external HTML template and updates outdated
15
- * CSS selectors.
16
- */
17
- export declare class Rule extends Rules.AbstractRule {
18
- apply(sourceFile: ts.SourceFile): RuleFailure[];
19
- }
20
- export declare class Walker extends ComponentWalker {
21
- /** Change data that upgrades to the specified target version. */
22
- data: CssSelectorUpgradeData[];
23
- visitInlineTemplate(node: ts.StringLiteralLike): void;
24
- visitExternalTemplate(node: ExternalResource): void;
25
- /**
26
- * Searches for outdated css selectors in the specified content and creates replacements
27
- * with the according messages that can be added to a rule failure.
28
- */
29
- private _createReplacementsForContent;
30
- }
@@ -1,24 +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.io/license
7
- */
8
- import { RuleFailure, Rules, RuleWalker } from 'tslint';
9
- import * as ts from 'typescript';
10
- import { ElementSelectorUpgradeData } from '../../data/element-selectors';
11
- /**
12
- * Rule that walks through every string literal that is wrapped inside of a call expression.
13
- * All string literals which include an outdated element selector will be migrated.
14
- */
15
- export declare class Rule extends Rules.AbstractRule {
16
- apply(sourceFile: ts.SourceFile): RuleFailure[];
17
- }
18
- export declare class Walker extends RuleWalker {
19
- /** Change data that upgrades to the specified target version. */
20
- data: ElementSelectorUpgradeData[];
21
- visitStringLiteral(node: ts.StringLiteral): void;
22
- /** Adds an element selector failure with the given replacement at the specified node. */
23
- private _addFailureWithReplacement;
24
- }