@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.
- package/a11y/typings/aria-describer/aria-describer.d.ts +4 -3
- package/a11y/typings/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +42 -10
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +532 -87
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +5 -1
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +31 -23
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +6 -7
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +8 -6
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/drag-drop/typings/directives/drag.d.ts +1 -1
- package/drag-drop/typings/directives/drop-list.d.ts +2 -0
- package/drag-drop/typings/drag-drop-registry.d.ts +2 -0
- package/drag-drop/typings/drag-ref.d.ts +10 -1
- package/drag-drop/typings/drop-list-ref.d.ts +59 -3
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +35 -10
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/drag-drop.js +467 -85
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/layout.js +7 -3
- package/esm2015/layout.js.map +1 -1
- package/esm2015/overlay.js +31 -23
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/scrolling.js +6 -7
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/tree.js +7 -6
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +42 -10
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/cdk.es5.js +1 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +530 -85
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/layout.es5.js +7 -3
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/overlay.es5.js +32 -24
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +6 -7
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/tree.es5.js +8 -6
- package/esm5/tree.es5.js.map +1 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-ref.d.ts +1 -0
- package/package.json +4 -4
- package/schematics/index.d.ts +1 -0
- package/schematics/index.js +1 -0
- package/schematics/index.js.map +1 -1
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
- 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
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +0 -0
- package/schematics/ng-generate/drag-drop/index.js +2 -2
- package/schematics/ng-generate/drag-drop/index.js.map +1 -1
- package/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
- package/schematics/ng-update/data/attribute-selectors.js +5 -13
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.d.ts +1 -1
- package/schematics/ng-update/data/class-names.js +5 -21
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
- package/schematics/ng-update/data/constructor-checks.js +3 -5
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/css-selectors.d.ts +1 -1
- package/schematics/ng-update/data/css-selectors.js +1 -1
- package/schematics/ng-update/data/css-selectors.js.map +1 -1
- package/schematics/ng-update/data/element-selectors.d.ts +1 -1
- package/schematics/ng-update/data/element-selectors.js +1 -1
- package/schematics/ng-update/data/element-selectors.js.map +1 -1
- package/schematics/ng-update/data/input-names.d.ts +1 -1
- package/schematics/ng-update/data/input-names.js +13 -37
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.d.ts +1 -1
- package/schematics/ng-update/data/method-call-checks.js +6 -15
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/output-names.d.ts +1 -1
- package/schematics/ng-update/data/output-names.js +1 -1
- package/schematics/ng-update/data/output-names.js.map +1 -1
- package/schematics/ng-update/data/property-names.d.ts +1 -1
- package/schematics/ng-update/data/property-names.js +19 -59
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/html-parsing/elements.js.map +1 -1
- package/schematics/ng-update/index.d.ts +0 -2
- package/schematics/ng-update/index.js +13 -24
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/public-api.d.ts +0 -5
- package/schematics/ng-update/public-api.js +0 -5
- package/schematics/ng-update/public-api.js.map +1 -1
- package/schematics/ng-update/typescript/base-types.js.map +1 -1
- package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
- package/schematics/ng-update/upgrade-data.d.ts +5 -30
- package/schematics/ng-update/upgrade-data.js +4 -34
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js +66 -0
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
- package/schematics/ng-update/upgrade-rules/{class-inheritance/classInheritanceCheckRule.js → class-inheritance-rule.js} +24 -20
- package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js.map +1 -0
- package/{typings/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
- package/schematics/ng-update/upgrade-rules/{class-names/classNamesIdentifierRule.js → class-names-rule.js} +19 -24
- package/schematics/ng-update/upgrade-rules/class-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js +134 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.js +73 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.js +64 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
- package/schematics/ng-update/upgrade-rules/index.js +49 -29
- package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
- package/schematics/ng-update/upgrade-rules/input-names-rule.js +59 -0
- package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/{signature-check/methodCallsCheckRule.d.ts → method-call-arguments-rule.d.ts} +8 -9
- package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js +60 -0
- package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js +37 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.js +46 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.js +46 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.js.map +1 -0
- package/schematics/tsconfig.tsbuildinfo +2896 -3609
- package/schematics/update-tool/component-resource-collector.d.ts +41 -0
- package/schematics/update-tool/component-resource-collector.js +141 -0
- package/schematics/update-tool/component-resource-collector.js.map +1 -0
- package/schematics/update-tool/index.d.ts +13 -0
- package/schematics/update-tool/index.js +117 -0
- package/schematics/update-tool/index.js.map +1 -0
- package/schematics/update-tool/migration-rule.d.ts +45 -0
- package/schematics/update-tool/migration-rule.js +50 -0
- package/schematics/update-tool/migration-rule.js.map +1 -0
- package/schematics/update-tool/public-api.d.ts +12 -0
- package/schematics/update-tool/public-api.js +18 -0
- package/schematics/update-tool/public-api.js.map +1 -0
- package/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
- package/schematics/{ng-update → update-tool}/target-version.js +3 -3
- package/schematics/update-tool/target-version.js.map +1 -0
- package/schematics/update-tool/utils/decorators.d.ts +23 -0
- package/schematics/update-tool/utils/decorators.js +37 -0
- package/schematics/update-tool/utils/decorators.js.map +1 -0
- package/schematics/update-tool/utils/functions.d.ts +14 -0
- package/schematics/update-tool/utils/functions.js +20 -0
- package/schematics/update-tool/utils/functions.js.map +1 -0
- package/schematics/update-tool/utils/imports.d.ts +15 -0
- package/schematics/update-tool/utils/imports.js +35 -0
- package/schematics/update-tool/utils/imports.js.map +1 -0
- package/schematics/update-tool/utils/line-mappings.d.ts +21 -0
- package/schematics/update-tool/utils/line-mappings.js +75 -0
- package/schematics/update-tool/utils/line-mappings.js.map +1 -0
- package/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
- package/schematics/update-tool/utils/parse-tsconfig.js +22 -0
- package/schematics/update-tool/utils/parse-tsconfig.js.map +1 -0
- package/schematics/update-tool/utils/property-name.d.ts +18 -0
- package/schematics/update-tool/utils/property-name.js +27 -0
- package/schematics/update-tool/utils/property-name.js.map +1 -0
- package/schematics/update-tool/version-changes.d.ts +32 -0
- package/schematics/update-tool/version-changes.js +41 -0
- package/schematics/update-tool/version-changes.js.map +1 -0
- package/schematics/utils/build-component.js +4 -4
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
- package/schematics/utils/project-tsconfig-paths.js +77 -0
- package/schematics/utils/project-tsconfig-paths.js.map +1 -0
- package/typings/a11y/aria-describer/aria-describer.d.ts +4 -3
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/drag-drop/directives/drag.d.ts +1 -1
- package/typings/drag-drop/directives/drop-list.d.ts +2 -0
- package/typings/drag-drop/drag-drop-registry.d.ts +2 -0
- package/typings/drag-drop/drag-ref.d.ts +10 -1
- package/typings/drag-drop/drop-list-ref.d.ts +59 -3
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +4 -3
- package/typings/esm5/a11y/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +1 -1
- package/typings/esm5/drag-drop/directives/drop-list.d.ts +2 -0
- package/typings/esm5/drag-drop/drag-drop-registry.d.ts +2 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +10 -1
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +59 -3
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-ref.d.ts +1 -0
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-ref.d.ts +1 -0
- package/typings/schematics/index.d.ts +1 -0
- package/typings/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/class-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/constructor-checks.d.ts +1 -1
- package/typings/schematics/ng-update/data/css-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/element-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/input-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/method-call-checks.d.ts +1 -1
- package/typings/schematics/ng-update/data/output-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/property-names.d.ts +1 -1
- package/typings/schematics/ng-update/index.d.ts +0 -2
- package/typings/schematics/ng-update/public-api.d.ts +0 -5
- package/typings/schematics/ng-update/upgrade-data.d.ts +5 -30
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
- package/{schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → typings/schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
- package/typings/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
- package/typings/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
- package/typings/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
- package/typings/schematics/ng-update/upgrade-rules/{signature-check/methodCallsCheckRule.d.ts → method-call-arguments-rule.d.ts} +8 -9
- package/typings/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
- package/typings/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
- package/typings/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
- package/typings/schematics/update-tool/component-resource-collector.d.ts +41 -0
- package/typings/schematics/update-tool/index.d.ts +13 -0
- package/typings/schematics/update-tool/migration-rule.d.ts +45 -0
- package/typings/schematics/update-tool/public-api.d.ts +12 -0
- package/typings/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
- package/typings/schematics/update-tool/utils/decorators.d.ts +23 -0
- package/typings/schematics/update-tool/utils/functions.d.ts +14 -0
- package/typings/schematics/update-tool/utils/imports.d.ts +15 -0
- package/typings/schematics/update-tool/utils/line-mappings.d.ts +21 -0
- package/typings/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
- package/typings/schematics/update-tool/utils/property-name.d.ts +18 -0
- package/typings/schematics/update-tool/version-changes.d.ts +32 -0
- package/typings/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
- package/schematics/ng-update/target-version.js.map +0 -1
- package/schematics/ng-update/tslint/component-file.d.ts +0 -14
- package/schematics/ng-update/tslint/component-file.js +0 -31
- package/schematics/ng-update/tslint/component-file.js.map +0 -1
- package/schematics/ng-update/tslint/component-walker.d.ts +0 -47
- package/schematics/ng-update/tslint/component-walker.js +0 -142
- package/schematics/ng-update/tslint/component-walker.js.map +0 -1
- package/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
- package/schematics/ng-update/tslint/external-failure-walker.js +0 -38
- package/schematics/ng-update/tslint/external-failure-walker.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js +0 -49
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js +0 -62
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js +0 -59
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
- package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js +0 -53
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js +0 -63
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js +0 -62
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js +0 -50
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js +0 -60
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js +0 -59
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js +0 -49
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js +0 -64
- package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js +0 -46
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +0 -132
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js +0 -58
- package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
- package/schematics/ng-update/upgrade-rules/tslint-config.js +0 -76
- package/schematics/ng-update/upgrade-rules/tslint-config.js.map +0 -1
- package/typings/schematics/ng-update/tslint/component-file.d.ts +0 -14
- package/typings/schematics/ng-update/tslint/component-walker.d.ts +0 -47
- package/typings/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
- package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
- package/typings/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
- package/typings/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
- package/typings/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
|
@@ -0,0 +1,32 @@
|
|
|
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 { TargetVersion } from './target-version';
|
|
9
|
+
export declare type VersionChanges<T> = {
|
|
10
|
+
[target in TargetVersion]?: ReadableChange<T>[];
|
|
11
|
+
};
|
|
12
|
+
export declare type ReadableChange<T> = {
|
|
13
|
+
pr: string;
|
|
14
|
+
changes: T[];
|
|
15
|
+
};
|
|
16
|
+
/** Conditional type that unwraps the value of a version changes type. */
|
|
17
|
+
export declare type ValueOfChanges<T> = T extends VersionChanges<infer X> ? X : null;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the changes for a given target version from the specified version changes object.
|
|
20
|
+
*
|
|
21
|
+
* For readability and a good overview of breaking changes, the version change data always
|
|
22
|
+
* includes the related Pull Request link. Since this data is not needed when performing the
|
|
23
|
+
* upgrade, this unused data can be removed and the changes data can be flattened into an
|
|
24
|
+
* easy iterable array.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getChangesForTarget<T>(target: TargetVersion, data: VersionChanges<T>): T[];
|
|
27
|
+
/**
|
|
28
|
+
* Gets all changes from the specified version changes object. This is helpful in case a migration
|
|
29
|
+
* rule does not distinguish data based on the target version, but for readability the
|
|
30
|
+
* upgrade data is separated for each target version.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getAllChanges<T>(data: VersionChanges<T>): T[];
|
|
@@ -10,4 +10,7 @@ import { Tree } from '@angular-devkit/schematics';
|
|
|
10
10
|
* Gets all tsconfig paths from a CLI project by reading the workspace configuration
|
|
11
11
|
* and looking for common tsconfig locations.
|
|
12
12
|
*/
|
|
13
|
-
export declare function getProjectTsConfigPaths(tree: Tree):
|
|
13
|
+
export declare function getProjectTsConfigPaths(tree: Tree): {
|
|
14
|
+
buildPaths: string[];
|
|
15
|
+
testPaths: string[];
|
|
16
|
+
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target-version.js","sourceRoot":"","sources":["../../../../../src/cdk/schematics/ng-update/target-version.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,2EAA2E;AAC3E,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,6CAAE,CAAA;IACF,6CAAE,CAAA;IACF,6CAAE,CAAA;AACJ,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED;;;GAGG;AACH,SAAgB,kBAAkB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;SAC9B,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,aAAa,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC,CAAC;AACvE,CAAC;AAHD,gDAGC"}
|
|
@@ -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,31 +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 ts = require("typescript");
|
|
11
|
-
/**
|
|
12
|
-
* Creates a fake TypeScript source file that can contain content of templates or stylesheets.
|
|
13
|
-
* The fake TypeScript source file then can be passed to TSLint in combination with a rule failure.
|
|
14
|
-
*/
|
|
15
|
-
function createComponentFile(filePath, content) {
|
|
16
|
-
const sourceFile = ts.createSourceFile(filePath, `\`${content}\``, ts.ScriptTarget.ES5);
|
|
17
|
-
// Subtract two characters because the string literal quotes are only needed for parsing
|
|
18
|
-
// and are not part of the actual source file.
|
|
19
|
-
sourceFile.end = sourceFile.end - 2;
|
|
20
|
-
// Note: This does not affect the way TSLint applies replacements for external resource files.
|
|
21
|
-
// At the time of writing, TSLint loads files manually if the actual rule source file is not
|
|
22
|
-
// equal to the source file of the replacement. This means that the replacements need proper
|
|
23
|
-
// offsets without the string literal quote symbols.
|
|
24
|
-
sourceFile.getFullText = function () {
|
|
25
|
-
return sourceFile.text.substring(1, sourceFile.text.length - 1);
|
|
26
|
-
};
|
|
27
|
-
sourceFile.getText = sourceFile.getFullText;
|
|
28
|
-
return sourceFile;
|
|
29
|
-
}
|
|
30
|
-
exports.createComponentFile = createComponentFile;
|
|
31
|
-
//# sourceMappingURL=component-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-file.js","sourceRoot":"","sources":["../../../../../../src/cdk/schematics/ng-update/tslint/component-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,iCAAiC;AAIjC;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,QAAgB,EAAE,OAAe;IACnE,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,OAAO,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAExF,wFAAwF;IACxF,8CAA8C;IAC9C,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC;IAEpC,8FAA8F;IAC9F,4FAA4F;IAC5F,4FAA4F;IAC5F,oDAAoD;IACpD,UAAU,CAAC,WAAW,GAAG;QACvB,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC;IAE5C,OAAO,UAAU,CAAC;AACpB,CAAC;AAlBD,kDAkBC"}
|
|
@@ -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,142 +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 fs_1 = require("fs");
|
|
11
|
-
const path_1 = require("path");
|
|
12
|
-
const ts = require("typescript");
|
|
13
|
-
const literal_1 = require("../typescript/literal");
|
|
14
|
-
const component_file_1 = require("./component-file");
|
|
15
|
-
const external_failure_walker_1 = require("./external-failure-walker");
|
|
16
|
-
/**
|
|
17
|
-
* Custom TSLint rule walker that identifies Angular components and visits specific parts of
|
|
18
|
-
* the component metadata.
|
|
19
|
-
*/
|
|
20
|
-
class ComponentWalker extends external_failure_walker_1.ExternalFailureWalker {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
/**
|
|
24
|
-
* We keep track of all visited stylesheet files because we allow manually reporting external
|
|
25
|
-
* stylesheets which couldn't be detected by the component walker. Reporting these files multiple
|
|
26
|
-
* times will result in duplicated TSLint failures and replacements.
|
|
27
|
-
*/
|
|
28
|
-
this._visitedStylesheetFiles = new Set();
|
|
29
|
-
}
|
|
30
|
-
visitInlineTemplate(_template) { }
|
|
31
|
-
visitInlineStylesheet(_stylesheet) { }
|
|
32
|
-
visitExternalTemplate(_template) { }
|
|
33
|
-
visitExternalStylesheet(_stylesheet) { }
|
|
34
|
-
visitNode(node) {
|
|
35
|
-
if (node.kind === ts.SyntaxKind.CallExpression) {
|
|
36
|
-
const callExpression = node;
|
|
37
|
-
const callExpressionName = callExpression.expression.getText();
|
|
38
|
-
if (callExpressionName === 'Component' || callExpressionName === 'Directive') {
|
|
39
|
-
this._visitDirectiveCallExpression(callExpression);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
super.visitNode(node);
|
|
43
|
-
}
|
|
44
|
-
_visitDirectiveCallExpression(callExpression) {
|
|
45
|
-
// If the call expressions does not have the correct amount of arguments, we can assume that
|
|
46
|
-
// this call expression is not related to Angular and just uses a similar decorator name.
|
|
47
|
-
if (callExpression.arguments.length !== 1) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const directiveMetadata = this._findMetadataFromExpression(callExpression.arguments[0]);
|
|
51
|
-
if (!directiveMetadata) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
for (const property of directiveMetadata.properties) {
|
|
55
|
-
const propertyName = property.name.getText();
|
|
56
|
-
if (propertyName === 'template' && literal_1.isStringLiteralLike(property.initializer)) {
|
|
57
|
-
this.visitInlineTemplate(property.initializer);
|
|
58
|
-
}
|
|
59
|
-
if (propertyName === 'templateUrl' && literal_1.isStringLiteralLike(property.initializer)) {
|
|
60
|
-
this._reportExternalTemplate(property.initializer);
|
|
61
|
-
}
|
|
62
|
-
if (propertyName === 'styles' && ts.isArrayLiteralExpression(property.initializer)) {
|
|
63
|
-
this._reportInlineStyles(property.initializer);
|
|
64
|
-
}
|
|
65
|
-
if (propertyName === 'styleUrls' && ts.isArrayLiteralExpression(property.initializer)) {
|
|
66
|
-
this._visitExternalStylesArrayLiteral(property.initializer);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
_reportExternalTemplate(node) {
|
|
71
|
-
const templatePath = path_1.resolve(path_1.dirname(this.getSourceFile().fileName), node.text);
|
|
72
|
-
// Check if the external template file exists before proceeding.
|
|
73
|
-
if (!fs_1.existsSync(templatePath)) {
|
|
74
|
-
this._createResourceNotFoundFailure(node, templatePath);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
// Create a fake TypeScript source file that includes the template content.
|
|
78
|
-
const templateFile = component_file_1.createComponentFile(templatePath, fs_1.readFileSync(templatePath, 'utf8'));
|
|
79
|
-
this.visitExternalTemplate(templateFile);
|
|
80
|
-
}
|
|
81
|
-
_reportInlineStyles(expression) {
|
|
82
|
-
expression.elements.forEach(node => {
|
|
83
|
-
if (literal_1.isStringLiteralLike(node)) {
|
|
84
|
-
this.visitInlineStylesheet(node);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
_visitExternalStylesArrayLiteral(expression) {
|
|
89
|
-
expression.elements.forEach(node => {
|
|
90
|
-
if (literal_1.isStringLiteralLike(node)) {
|
|
91
|
-
const stylePath = path_1.resolve(path_1.dirname(this.getSourceFile().fileName), node.text);
|
|
92
|
-
// Check if the external stylesheet file exists before proceeding.
|
|
93
|
-
if (!fs_1.existsSync(stylePath)) {
|
|
94
|
-
return this._createResourceNotFoundFailure(node, stylePath);
|
|
95
|
-
}
|
|
96
|
-
this._reportExternalStyle(stylePath);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
_reportExternalStyle(stylePath) {
|
|
101
|
-
// Keep track of all reported external stylesheets because we allow reporting additional
|
|
102
|
-
// stylesheet files which couldn't be detected by the component walker. This allows us to
|
|
103
|
-
// ensure that no stylesheet files are visited multiple times.
|
|
104
|
-
if (this._visitedStylesheetFiles.has(stylePath)) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
this._visitedStylesheetFiles.add(stylePath);
|
|
108
|
-
// Create a fake TypeScript source file that includes the stylesheet content.
|
|
109
|
-
const stylesheetFile = component_file_1.createComponentFile(stylePath, fs_1.readFileSync(stylePath, 'utf8'));
|
|
110
|
-
this.visitExternalStylesheet(stylesheetFile);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Recursively searches for the metadata object literal expression inside of a directive call
|
|
114
|
-
* expression. Since expression calls can be nested through *parenthesized* expressions, we
|
|
115
|
-
* need to recursively visit and check every expression inside of a parenthesized expression.
|
|
116
|
-
*
|
|
117
|
-
* e.g. @Component((({myMetadataExpression}))) will return `myMetadataExpression`.
|
|
118
|
-
*/
|
|
119
|
-
_findMetadataFromExpression(node) {
|
|
120
|
-
if (node.kind === ts.SyntaxKind.ObjectLiteralExpression) {
|
|
121
|
-
return node;
|
|
122
|
-
}
|
|
123
|
-
else if (node.kind === ts.SyntaxKind.ParenthesizedExpression) {
|
|
124
|
-
return this._findMetadataFromExpression(node.expression);
|
|
125
|
-
}
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Creates a TSLint failure that reports that the resource file that belongs to the specified
|
|
130
|
-
* TypeScript node could not be resolved in the file system.
|
|
131
|
-
*/
|
|
132
|
-
_createResourceNotFoundFailure(node, resourceUrl) {
|
|
133
|
-
this.addFailureAtNode(node, `Could not resolve resource file: "${resourceUrl}". ` +
|
|
134
|
-
`Skipping automatic upgrade for this file.`);
|
|
135
|
-
}
|
|
136
|
-
/** Reports the specified additional stylesheets. */
|
|
137
|
-
_reportExtraStylesheetFiles(filePaths) {
|
|
138
|
-
filePaths.forEach(filePath => this._reportExternalStyle(path_1.resolve(filePath)));
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
exports.ComponentWalker = ComponentWalker;
|
|
142
|
-
//# sourceMappingURL=component-walker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-walker.js","sourceRoot":"","sources":["../../../../../../src/cdk/schematics/ng-update/tslint/component-walker.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,2BAA4C;AAC5C,+BAAsC;AACtC,iCAAiC;AACjC,mDAA0D;AAC1D,qDAAuE;AACvE,uEAAgE;AAEhE;;;GAGG;AACH,MAAa,eAAgB,SAAQ,+CAAqB;IAA1D;;QAQE;;;;WAIG;QACK,4BAAuB,GAAgB,IAAI,GAAG,EAAU,CAAC;IAqInE,CAAC;IAhJC,mBAAmB,CAAC,SAA+B,IAAG,CAAC;IACvD,qBAAqB,CAAC,WAAiC,IAAG,CAAC;IAE3D,qBAAqB,CAAC,SAA2B,IAAG,CAAC;IACrD,uBAAuB,CAAC,WAA6B,IAAG,CAAC;IASzD,SAAS,CAAC,IAAa;QACrB,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,CA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|
@@ -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,38 +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 tslint_1 = require("tslint");
|
|
11
|
-
/**
|
|
12
|
-
* Enhanced TSLint rule walker that makes it easier to create rule failures that don't belong to
|
|
13
|
-
* the source file that has been passed to the rule walker.
|
|
14
|
-
*/
|
|
15
|
-
class ExternalFailureWalker extends tslint_1.RuleWalker {
|
|
16
|
-
/** Adds a failure for the external resource at the specified position with the given width. */
|
|
17
|
-
addExternalFailureAt(node, start, width, message, fix) {
|
|
18
|
-
this.addFailure(new tslint_1.RuleFailure(node, start, start + width, message, this.getRuleName(), fix));
|
|
19
|
-
}
|
|
20
|
-
/** Adds a failure at the specified range for the external resource. */
|
|
21
|
-
addExternalFailureFromStartToEnd(node, start, end, message, fix) {
|
|
22
|
-
this.addFailure(new tslint_1.RuleFailure(node, start, end, message, this.getRuleName(), fix));
|
|
23
|
-
}
|
|
24
|
-
/** Adds a failure for the whole external resource node. */
|
|
25
|
-
addExternalFailure(node, message, fix) {
|
|
26
|
-
this.addExternalFailureAt(node, node.getStart(), node.getFullWidth(), message, fix);
|
|
27
|
-
}
|
|
28
|
-
/** Adds a failure to the external resource at the location of the specified replacement. */
|
|
29
|
-
addExternalFailureAtReplacement(node, message, replacement) {
|
|
30
|
-
this.addExternalFailureAt(node, replacement.start, replacement.end, message, replacement);
|
|
31
|
-
}
|
|
32
|
-
/** Adds a failure at the location of the specified replacement. */
|
|
33
|
-
addFailureAtReplacement(message, replacement) {
|
|
34
|
-
this.addFailureAt(replacement.start, replacement.end, message, replacement);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.ExternalFailureWalker = ExternalFailureWalker;
|
|
38
|
-
//# sourceMappingURL=external-failure-walker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"external-failure-walker.js","sourceRoot":"","sources":["../../../../../../src/cdk/schematics/ng-update/tslint/external-failure-walker.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,mCAAiE;AAGjE;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,mBAAU;IAEnD,+FAA+F;IAC/F,oBAAoB,C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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,49 +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 literal_1 = require("../../typescript/literal");
|
|
14
|
-
const upgrade_data_1 = require("../../upgrade-data");
|
|
15
|
-
/**
|
|
16
|
-
* Rule that walks through every string literal that is part of a call expression and
|
|
17
|
-
* switches deprecated attribute selectors to the updated selector.
|
|
18
|
-
*/
|
|
19
|
-
class Rule extends tslint_1.Rules.AbstractRule {
|
|
20
|
-
apply(sourceFile) {
|
|
21
|
-
return this.applyWithWalker(new Walker(sourceFile, this.getOptions()));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.Rule = Rule;
|
|
25
|
-
class Walker extends tslint_1.RuleWalker {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
/** Change data that upgrades to the specified target version. */
|
|
29
|
-
this.data = upgrade_data_1.getUpgradeDataFromWalker(this, 'attributeSelectors');
|
|
30
|
-
}
|
|
31
|
-
visitStringLiteral(literal) {
|
|
32
|
-
if (literal.parent && literal.parent.kind !== ts.SyntaxKind.CallExpression) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const literalText = literal.getText();
|
|
36
|
-
this.data.forEach(selector => {
|
|
37
|
-
literal_1.findAllSubstringIndices(literalText, selector.replace)
|
|
38
|
-
.map(offset => literal.getStart() + offset)
|
|
39
|
-
.map(start => new tslint_1.Replacement(start, selector.replace.length, selector.replaceWith))
|
|
40
|
-
.forEach(replacement => this._addFailureWithReplacement(literal, replacement, selector));
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/** Adds an attribute selector failure with the given replacement at the specified node. */
|
|
44
|
-
_addFailureWithReplacement(node, replacement, data) {
|
|
45
|
-
this.addFailureAtNode(node, `Found deprecated attribute selector "${chalk_1.red('[' + data.replace + ']')}" which ` +
|
|
46
|
-
`has been renamed to "${chalk_1.green('[' + data.replaceWith + ']')}"`, replacement);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=attributeSelectorsStringLiteralRule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributeSelectorsStringLiteralRule.js","sourceRoot":"","sources":["../../../../../../../src/cdk/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,iCAAiC;AACjC,mCAAmE;AACnE,iCAAiC;AAEjC,sDAAiE;AACjE,qDAA4D;AAE5D;;;GAGG;AACH,MAAa,IAAK,SAAQ,cAAK,CAAC,YAAY;IAC1C,KAAK,CAAC,UAAyB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;CACF;AAJD,oBAIC;AAED,MAAM,MAAO,SAAQ,mBAAU;IAA/B;;QAEE,iEAAiE;QACjE,SAAI,G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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
|
-
}
|
package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js
DELETED
|
@@ -1,62 +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 component_walker_1 = require("../../tslint/component-walker");
|
|
13
|
-
const literal_1 = require("../../typescript/literal");
|
|
14
|
-
const upgrade_data_1 = require("../../upgrade-data");
|
|
15
|
-
/**
|
|
16
|
-
* Rule that walks through every stylesheet in the application and updates outdated
|
|
17
|
-
* attribute selectors to the updated selector.
|
|
18
|
-
*/
|
|
19
|
-
class Rule extends tslint_1.Rules.AbstractRule {
|
|
20
|
-
apply(sourceFile) {
|
|
21
|
-
return this.applyWithWalker(new Walker(sourceFile, this.getOptions()));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.Rule = Rule;
|
|
25
|
-
class Walker extends component_walker_1.ComponentWalker {
|
|
26
|
-
constructor(sourceFile, options) {
|
|
27
|
-
super(sourceFile, options);
|
|
28
|
-
/** Change data that upgrades to the specified target version. */
|
|
29
|
-
this.data = upgrade_data_1.getUpgradeDataFromWalker(this, 'attributeSelectors');
|
|
30
|
-
this._reportExtraStylesheetFiles(options.ruleArguments[2]);
|
|
31
|
-
}
|
|
32
|
-
visitInlineStylesheet(literal) {
|
|
33
|
-
this._createReplacementsForContent(literal, literal.getText()).forEach(data => {
|
|
34
|
-
this.addFailureAtReplacement(data.failureMessage, data.replacement);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
visitExternalStylesheet(node) {
|
|
38
|
-
this._createReplacementsForContent(node, node.getText()).forEach(data => {
|
|
39
|
-
this.addExternalFailureAtReplacement(node, data.failureMessage, data.replacement);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Searches for outdated attribute selectors in the specified content and creates replacements
|
|
44
|
-
* with the according messages that can be added to a rule failure.
|
|
45
|
-
*/
|
|
46
|
-
_createReplacementsForContent(node, stylesheetContent) {
|
|
47
|
-
const replacements = [];
|
|
48
|
-
this.data.forEach(selector => {
|
|
49
|
-
const currentSelector = `[${selector.replace}]`;
|
|
50
|
-
const updatedSelector = `[${selector.replaceWith}]`;
|
|
51
|
-
const failureMessage = `Found deprecated attribute selector "${chalk_1.red(currentSelector)}"` +
|
|
52
|
-
` which has been renamed to "${chalk_1.green(updatedSelector)}"`;
|
|
53
|
-
literal_1.findAllSubstringIndices(stylesheetContent, currentSelector)
|
|
54
|
-
.map(offset => node.getStart() + offset)
|
|
55
|
-
.map(start => new tslint_1.Replacement(start, currentSelector.length, updatedSelector))
|
|
56
|
-
.forEach(replacement => replacements.push({ replacement, failureMessage }));
|
|
57
|
-
});
|
|
58
|
-
return replacements;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.Walker = Walker;
|
|
62
|
-
//# sourceMappingURL=attributeSelectorsStylesheetRule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributeSelectorsStylesheetRule.js","sourceRoot":"","sources":["../../../../../../../src/cdk/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,iCAAiC;AACjC,mCAAiE;AAKjE,oEAA8D;AAC9D,sDAAiE;AACjE,qDAA4D;AAE5D;;;GAGG;AACH,MAAa,IAAK,SAAQ,cAAK,CAAC,YAAY;IAE1C,KAAK,CAAC,UAAyB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;CACF;AALD,oBAKC;AAED,MAAa,MAAO,SAAQ,kCAAe;IAKzC,YAAY,UAAyB,EAAE,OAAiB;QACtD,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAJ7B,iEAAiE;QACjE,SAAI,GAAmC,uCAAwB,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;QAI1F,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;I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,YAAY,CAAC,IAAI,CAAC,EAAC,WAAW,EAAE,cAAc,EAAC,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;QAEH,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AA5CD,wBA4CC"}
|
package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts
DELETED
|
@@ -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
|
-
}
|
package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js
DELETED
|
@@ -1,59 +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 component_walker_1 = require("../../tslint/component-walker");
|
|
13
|
-
const literal_1 = require("../../typescript/literal");
|
|
14
|
-
const upgrade_data_1 = require("../../upgrade-data");
|
|
15
|
-
/**
|
|
16
|
-
* Rule that walks through every component template and switches outdated attribute
|
|
17
|
-
* selectors to the updated selector.
|
|
18
|
-
*/
|
|
19
|
-
class Rule extends tslint_1.Rules.AbstractRule {
|
|
20
|
-
apply(sourceFile) {
|
|
21
|
-
return this.applyWithWalker(new Walker(sourceFile, this.getOptions()));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.Rule = Rule;
|
|
25
|
-
class Walker extends component_walker_1.ComponentWalker {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
/** Change data that upgrades to the specified target version. */
|
|
29
|
-
this.data = upgrade_data_1.getUpgradeDataFromWalker(this, 'attributeSelectors');
|
|
30
|
-
}
|
|
31
|
-
visitInlineTemplate(node) {
|
|
32
|
-
this._createReplacementsForContent(node, node.getText()).forEach(data => {
|
|
33
|
-
this.addFailureAtReplacement(data.failureMessage, data.replacement);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
visitExternalTemplate(node) {
|
|
37
|
-
this._createReplacementsForContent(node, node.getText()).forEach(data => {
|
|
38
|
-
this.addExternalFailureAtReplacement(node, data.failureMessage, data.replacement);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Searches for outdated attribute selectors in the specified content and creates replacements
|
|
43
|
-
* with the according messages that can be added to a rule failure.
|
|
44
|
-
*/
|
|
45
|
-
_createReplacementsForContent(node, templateContent) {
|
|
46
|
-
const replacements = [];
|
|
47
|
-
this.data.forEach(selector => {
|
|
48
|
-
const failureMessage = `Found deprecated attribute selector "[${chalk_1.red(selector.replace)}]"` +
|
|
49
|
-
` which has been renamed to "[${chalk_1.green(selector.replaceWith)}]"`;
|
|
50
|
-
literal_1.findAllSubstringIndices(templateContent, selector.replace)
|
|
51
|
-
.map(offset => node.getStart() + offset)
|
|
52
|
-
.map(start => new tslint_1.Replacement(start, selector.replace.length, selector.replaceWith))
|
|
53
|
-
.forEach(replacement => replacements.push({ replacement, failureMessage }));
|
|
54
|
-
});
|
|
55
|
-
return replacements;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.Walker = Walker;
|
|
59
|
-
//# sourceMappingURL=attributeSelectorsTemplateRule.js.map
|
package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributeSelectorsTemplateRule.js","sourceRoot":"","sources":["../../../../../../../src/cdk/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,iCAAiC;AACjC,mCAAuD;AAKvD,oEAA8D;AAC9D,sDAAiE;AACjE,qDAA4D;AAE5D;;;GAGG;AACH,MAAa,IAAK,SAAQ,cAAK,CAAC,YAAY;IAC1C,KAAK,CAAC,UAAyB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;CACF;AAJD,oBAIC;AAED,MAAa,MAAO,SAAQ,kCAAe;IAA3C;;QAEE,iEAAiE;QACjE,SAAI,GAAmC,uCAAwB,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IAiC9F,CAAC;IA/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