@kato-lee/cdk 14.2.7 → 20.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +8 -8
- package/_adev_assets/cdk_drag_drop.json +7215 -0
- package/_adev_assets/cdk_testing.json +7605 -0
- package/_adev_assets/cdk_testing_protractor.json +1747 -0
- package/_adev_assets/cdk_testing_selenium_webdriver.json +1801 -0
- package/_adev_assets/cdk_testing_testbed.json +1903 -0
- package/_index.scss +8 -8
- package/a11y/_index.scss +60 -102
- package/a11y/index.d.ts +550 -1212
- package/a11y-module.d.d.ts +314 -0
- package/a11y-prebuilt.css +1 -1
- package/accordion/index.d.ts +92 -140
- package/activedescendant-key-manager.d.d.ts +39 -0
- package/bidi/index.d.ts +21 -80
- package/bidi-module.d.d.ts +57 -0
- package/clipboard/index.d.ts +101 -115
- package/coercion/index.d.ts +45 -67
- package/coercion/private/index.d.ts +9 -0
- package/collections/index.d.ts +99 -374
- package/data-source.d.d.ts +43 -0
- package/dialog/index.d.ts +412 -469
- package/drag-drop/index.d.ts +1410 -1614
- package/fesm2022/a11y-module.mjs +951 -0
- package/fesm2022/a11y-module.mjs.map +1 -0
- package/fesm2022/a11y.mjs +538 -0
- package/fesm2022/a11y.mjs.map +1 -0
- package/fesm2022/accordion.mjs +216 -0
- package/fesm2022/accordion.mjs.map +1 -0
- package/fesm2022/activedescendant-key-manager.mjs +16 -0
- package/fesm2022/activedescendant-key-manager.mjs.map +1 -0
- package/fesm2022/array.mjs +6 -0
- package/fesm2022/array.mjs.map +1 -0
- package/fesm2022/bidi.mjs +78 -0
- package/fesm2022/bidi.mjs.map +1 -0
- package/fesm2022/breakpoints-observer.mjs +179 -0
- package/fesm2022/breakpoints-observer.mjs.map +1 -0
- package/fesm2022/cdk.mjs +7 -0
- package/fesm2022/cdk.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/clipboard.mjs +210 -259
- package/fesm2022/clipboard.mjs.map +1 -0
- package/fesm2022/coercion/private.mjs +15 -0
- package/fesm2022/coercion/private.mjs.map +1 -0
- package/fesm2022/coercion.mjs +43 -0
- package/fesm2022/coercion.mjs.map +1 -0
- package/fesm2022/collections.mjs +8 -0
- package/fesm2022/collections.mjs.map +1 -0
- package/fesm2022/css-pixel-value.mjs +10 -0
- package/fesm2022/css-pixel-value.mjs.map +1 -0
- package/fesm2022/data-source.mjs +15 -0
- package/fesm2022/data-source.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/dialog.mjs +874 -787
- package/fesm2022/dialog.mjs.map +1 -0
- package/fesm2022/directionality.mjs +77 -0
- package/fesm2022/directionality.mjs.map +1 -0
- package/fesm2022/dispose-view-repeater-strategy.mjs +44 -0
- package/fesm2022/dispose-view-repeater-strategy.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/drag-drop.mjs +4477 -3808
- package/fesm2022/drag-drop.mjs.map +1 -0
- package/fesm2022/element.mjs +29 -0
- package/fesm2022/element.mjs.map +1 -0
- package/fesm2022/fake-event-detection.mjs +24 -0
- package/fesm2022/fake-event-detection.mjs.map +1 -0
- package/fesm2022/focus-key-manager.mjs +22 -0
- package/fesm2022/focus-key-manager.mjs.map +1 -0
- package/fesm2022/focus-monitor.mjs +622 -0
- package/fesm2022/focus-monitor.mjs.map +1 -0
- package/fesm2022/id-generator.mjs +37 -0
- package/fesm2022/id-generator.mjs.map +1 -0
- package/fesm2022/keycodes.mjs +15 -0
- package/fesm2022/keycodes.mjs.map +1 -0
- package/{fesm2015/keycodes.mjs → fesm2022/keycodes2.mjs} +122 -167
- package/fesm2022/keycodes2.mjs.map +1 -0
- package/fesm2022/layout.mjs +43 -0
- package/fesm2022/layout.mjs.map +1 -0
- package/fesm2022/list-key-manager.mjs +360 -0
- package/fesm2022/list-key-manager.mjs.map +1 -0
- package/fesm2022/listbox.mjs +928 -0
- package/fesm2022/listbox.mjs.map +1 -0
- package/fesm2022/menu.mjs +2001 -0
- package/fesm2022/menu.mjs.map +1 -0
- package/fesm2022/observers/private.mjs +124 -0
- package/fesm2022/observers/private.mjs.map +1 -0
- package/fesm2022/observers.mjs +210 -0
- package/fesm2022/observers.mjs.map +1 -0
- package/{fesm2020/overlay.mjs → fesm2022/overlay-module.mjs} +3062 -3145
- package/fesm2022/overlay-module.mjs.map +1 -0
- package/fesm2022/overlay.mjs +101 -0
- package/fesm2022/overlay.mjs.map +1 -0
- package/fesm2022/passive-listeners.mjs +31 -0
- package/fesm2022/passive-listeners.mjs.map +1 -0
- package/fesm2022/platform.mjs +73 -0
- package/fesm2022/platform.mjs.map +1 -0
- package/fesm2022/platform2.mjs +77 -0
- package/fesm2022/platform2.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/portal.mjs +614 -689
- package/fesm2022/portal.mjs.map +1 -0
- package/fesm2022/private.mjs +19 -0
- package/fesm2022/private.mjs.map +1 -0
- package/fesm2022/recycle-view-repeater-strategy.mjs +156 -0
- package/fesm2022/recycle-view-repeater-strategy.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/scrolling.mjs +1472 -1558
- package/fesm2022/scrolling.mjs.map +1 -0
- package/fesm2022/scrolling2.mjs +99 -0
- package/fesm2022/scrolling2.mjs.map +1 -0
- package/fesm2022/selection-model.mjs +221 -0
- package/fesm2022/selection-model.mjs.map +1 -0
- package/fesm2022/shadow-dom.mjs +49 -0
- package/fesm2022/shadow-dom.mjs.map +1 -0
- package/fesm2022/stepper.mjs +632 -0
- package/fesm2022/stepper.mjs.map +1 -0
- package/fesm2022/style-loader.mjs +47 -0
- package/fesm2022/style-loader.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/table.mjs +2511 -2348
- package/fesm2022/table.mjs.map +1 -0
- package/fesm2022/test-environment.mjs +19 -0
- package/fesm2022/test-environment.mjs.map +1 -0
- package/fesm2022/testing/selenium-webdriver.mjs +353 -0
- package/fesm2022/testing/selenium-webdriver.mjs.map +1 -0
- package/fesm2022/testing/testbed.mjs +782 -0
- package/fesm2022/testing/testbed.mjs.map +1 -0
- package/fesm2022/testing.mjs +950 -0
- package/fesm2022/testing.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/text-field.mjs +432 -459
- package/fesm2022/text-field.mjs.map +1 -0
- package/fesm2022/tree-key-manager.mjs +360 -0
- package/fesm2022/tree-key-manager.mjs.map +1 -0
- package/fesm2022/tree.mjs +1800 -0
- package/fesm2022/tree.mjs.map +1 -0
- package/fesm2022/typeahead.mjs +88 -0
- package/fesm2022/typeahead.mjs.map +1 -0
- package/fesm2022/unique-selection-dispatcher.mjs +49 -0
- package/fesm2022/unique-selection-dispatcher.mjs.map +1 -0
- package/focus-key-manager.d.d.ts +39 -0
- package/focus-monitor.d.d.ts +208 -0
- package/harness-environment.d.d.ts +944 -0
- package/index.d.ts +6 -6
- package/keycodes/index.d.ts +129 -249
- package/layout/index.d.ts +89 -90
- package/list-key-manager.d.d.ts +170 -0
- package/listbox/index.d.ts +354 -419
- package/menu/index.d.ts +834 -1013
- package/number-property.d.d.ts +16 -0
- package/observers/index.d.ts +84 -109
- package/observers/private/index.d.ts +34 -0
- package/overlay/_index-deprecated.scss +13 -13
- package/overlay/_index.scss +193 -152
- package/overlay/index.d.ts +328 -1343
- package/overlay-module.d.d.ts +801 -0
- package/overlay-prebuilt.css +1 -1
- package/package.json +177 -232
- package/platform/index.d.ts +67 -106
- package/platform.d.d.ts +33 -0
- package/portal/index.d.ts +51 -328
- package/portal-directives.d.d.ts +211 -0
- package/private/index.d.ts +13 -0
- package/schematics/collection.json +18 -0
- package/schematics/index.d.ts +14 -0
- package/schematics/index.js +37 -0
- package/schematics/index.js.map +1 -0
- package/schematics/migration.json +15 -0
- package/schematics/ng-add/index.d.ts +17 -0
- package/schematics/ng-add/index.js +31 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/schema.d.ts +11 -0
- package/schematics/ng-add/schema.js +10 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +16 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +53 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +21 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +25 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +45 -0
- package/schematics/ng-generate/drag-drop/index.d.ts +11 -0
- package/schematics/ng-generate/drag-drop/index.js +42 -0
- package/schematics/ng-generate/drag-drop/index.js.map +1 -0
- package/schematics/ng-generate/drag-drop/schema.d.ts +10 -0
- package/schematics/ng-generate/drag-drop/schema.js +10 -0
- package/schematics/ng-generate/drag-drop/schema.js.map +1 -0
- package/schematics/ng-generate/drag-drop/schema.json +100 -0
- package/schematics/ng-update/data/attribute-selectors.d.ts +15 -0
- package/schematics/ng-update/data/attribute-selectors.js +12 -0
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -0
- package/schematics/ng-update/data/class-names.d.ts +15 -0
- package/schematics/ng-update/data/class-names.js +12 -0
- package/schematics/ng-update/data/class-names.js.map +1 -0
- package/schematics/ng-update/data/constructor-checks.d.ts +15 -0
- package/schematics/ng-update/data/constructor-checks.js +17 -0
- package/schematics/ng-update/data/constructor-checks.js.map +1 -0
- package/schematics/ng-update/data/css-selectors.d.ts +27 -0
- package/schematics/ng-update/data/css-selectors.js +12 -0
- package/schematics/ng-update/data/css-selectors.js.map +1 -0
- package/schematics/ng-update/data/css-tokens.d.ts +27 -0
- package/schematics/ng-update/data/css-tokens.js +12 -0
- package/schematics/ng-update/data/css-tokens.js.map +1 -0
- package/schematics/ng-update/data/element-selectors.d.ts +15 -0
- package/schematics/ng-update/data/element-selectors.js +12 -0
- package/schematics/ng-update/data/element-selectors.js.map +1 -0
- package/schematics/ng-update/data/index.d.ts +18 -0
- package/schematics/ng-update/data/index.js +35 -0
- package/schematics/ng-update/data/index.js.map +1 -0
- package/schematics/ng-update/data/input-names.d.ts +22 -0
- package/schematics/ng-update/data/input-names.js +12 -0
- package/schematics/ng-update/data/input-names.js.map +1 -0
- package/schematics/ng-update/data/method-call-checks.d.ts +17 -0
- package/schematics/ng-update/data/method-call-checks.js +12 -0
- package/schematics/ng-update/data/method-call-checks.js.map +1 -0
- package/schematics/ng-update/data/output-names.d.ts +22 -0
- package/schematics/ng-update/data/output-names.js +12 -0
- package/schematics/ng-update/data/output-names.js.map +1 -0
- package/schematics/ng-update/data/property-names.d.ts +20 -0
- package/schematics/ng-update/data/property-names.js +12 -0
- package/schematics/ng-update/data/property-names.js.map +1 -0
- package/schematics/ng-update/data/symbol-removal.d.ts +17 -0
- package/schematics/ng-update/data/symbol-removal.js +12 -0
- package/schematics/ng-update/data/symbol-removal.js.map +1 -0
- package/schematics/ng-update/devkit-file-system.d.ts +30 -0
- package/schematics/ng-update/devkit-file-system.js +83 -0
- package/schematics/ng-update/devkit-file-system.js.map +1 -0
- package/schematics/ng-update/devkit-migration-rule.d.ts +24 -0
- package/schematics/ng-update/devkit-migration-rule.js +142 -0
- package/schematics/ng-update/devkit-migration-rule.js.map +1 -0
- package/schematics/ng-update/devkit-migration.d.ts +35 -0
- package/schematics/ng-update/devkit-migration.js +20 -0
- package/schematics/ng-update/devkit-migration.js.map +1 -0
- package/schematics/ng-update/find-stylesheets.d.ts +16 -0
- package/schematics/ng-update/find-stylesheets.js +41 -0
- package/schematics/ng-update/find-stylesheets.js.map +1 -0
- package/schematics/ng-update/html-parsing/angular.d.ts +15 -0
- package/schematics/ng-update/html-parsing/angular.js +51 -0
- package/schematics/ng-update/html-parsing/angular.js.map +1 -0
- package/schematics/ng-update/html-parsing/elements.d.ts +24 -0
- package/schematics/ng-update/html-parsing/elements.js +63 -0
- package/schematics/ng-update/html-parsing/elements.js.map +1 -0
- package/schematics/ng-update/index.d.ts +10 -0
- package/schematics/ng-update/index.js +29 -0
- package/schematics/ng-update/index.js.map +1 -0
- package/schematics/ng-update/migrations/attribute-selectors.d.ts +26 -0
- package/schematics/ng-update/migrations/attribute-selectors.js +71 -0
- package/schematics/ng-update/migrations/attribute-selectors.js.map +1 -0
- package/schematics/ng-update/migrations/class-inheritance.d.ts +26 -0
- package/schematics/ng-update/migrations/class-inheritance.js +58 -0
- package/schematics/ng-update/migrations/class-inheritance.js.map +1 -0
- package/schematics/ng-update/migrations/class-names.d.ts +32 -0
- package/schematics/ng-update/migrations/class-names.js +91 -0
- package/schematics/ng-update/migrations/class-names.js.map +1 -0
- package/schematics/ng-update/migrations/constructor-signature.d.ts +29 -0
- package/schematics/ng-update/migrations/constructor-signature.js +139 -0
- package/schematics/ng-update/migrations/constructor-signature.js.map +1 -0
- package/schematics/ng-update/migrations/css-selectors.d.ts +26 -0
- package/schematics/ng-update/migrations/css-selectors.js +75 -0
- package/schematics/ng-update/migrations/css-selectors.js.map +1 -0
- package/schematics/ng-update/migrations/css-tokens.d.ts +26 -0
- package/schematics/ng-update/migrations/css-tokens.js +83 -0
- package/schematics/ng-update/migrations/css-tokens.js.map +1 -0
- package/schematics/ng-update/migrations/element-selectors.d.ts +26 -0
- package/schematics/ng-update/migrations/element-selectors.js +66 -0
- package/schematics/ng-update/migrations/element-selectors.js.map +1 -0
- package/schematics/ng-update/migrations/input-names.d.ts +26 -0
- package/schematics/ng-update/migrations/input-names.js +59 -0
- package/schematics/ng-update/migrations/input-names.js.map +1 -0
- package/schematics/ng-update/migrations/method-call-arguments.d.ts +22 -0
- package/schematics/ng-update/migrations/method-call-arguments.js +62 -0
- package/schematics/ng-update/migrations/method-call-arguments.js.map +1 -0
- package/schematics/ng-update/migrations/misc-template.d.ts +18 -0
- package/schematics/ng-update/migrations/misc-template.js +25 -0
- package/schematics/ng-update/migrations/misc-template.js.map +1 -0
- package/schematics/ng-update/migrations/output-names.d.ts +22 -0
- package/schematics/ng-update/migrations/output-names.js +46 -0
- package/schematics/ng-update/migrations/output-names.js.map +1 -0
- package/schematics/ng-update/migrations/property-names.d.ts +22 -0
- package/schematics/ng-update/migrations/property-names.js +60 -0
- package/schematics/ng-update/migrations/property-names.js.map +1 -0
- package/schematics/ng-update/migrations/symbol-removal.d.ts +18 -0
- package/schematics/ng-update/migrations/symbol-removal.js +47 -0
- package/schematics/ng-update/migrations/symbol-removal.js.map +1 -0
- package/schematics/ng-update/public-api.d.ts +19 -0
- package/schematics/ng-update/public-api.js +36 -0
- package/schematics/ng-update/public-api.js.map +1 -0
- package/schematics/ng-update/typescript/base-types.d.ts +10 -0
- package/schematics/ng-update/typescript/base-types.js +23 -0
- package/schematics/ng-update/typescript/base-types.js.map +1 -0
- package/schematics/ng-update/typescript/imports.d.ts +18 -0
- package/schematics/ng-update/typescript/imports.js +53 -0
- package/schematics/ng-update/typescript/imports.js.map +1 -0
- package/schematics/ng-update/typescript/literal.d.ts +18 -0
- package/schematics/ng-update/typescript/literal.js +32 -0
- package/schematics/ng-update/typescript/literal.js.map +1 -0
- package/schematics/ng-update/typescript/module-specifiers.d.ts +16 -0
- package/schematics/ng-update/typescript/module-specifiers.js +35 -0
- package/schematics/ng-update/typescript/module-specifiers.js.map +1 -0
- package/schematics/ng-update/upgrade-data.d.ts +35 -0
- package/schematics/ng-update/upgrade-data.js +40 -0
- package/schematics/ng-update/upgrade-data.js.map +1 -0
- package/schematics/package.json +3 -0
- package/schematics/paths.d.ts +11 -0
- package/schematics/paths.js +16 -0
- package/schematics/paths.js.map +1 -0
- package/schematics/update-tool/component-resource-collector.d.ts +44 -0
- package/schematics/update-tool/component-resource-collector.js +164 -0
- package/schematics/update-tool/component-resource-collector.js.map +1 -0
- package/schematics/update-tool/file-system.d.ts +72 -0
- package/schematics/update-tool/file-system.js +18 -0
- package/schematics/update-tool/file-system.js.map +1 -0
- package/schematics/update-tool/index.d.ts +74 -0
- package/schematics/update-tool/index.js +172 -0
- package/schematics/update-tool/index.js.map +1 -0
- package/schematics/update-tool/logger.d.ts +15 -0
- package/schematics/update-tool/logger.js +18 -0
- package/schematics/update-tool/logger.js.map +1 -0
- package/schematics/update-tool/migration.d.ts +87 -0
- package/schematics/update-tool/migration.js +70 -0
- package/schematics/update-tool/migration.js.map +1 -0
- package/schematics/update-tool/public-api.d.ts +16 -0
- package/schematics/update-tool/public-api.js +33 -0
- package/schematics/update-tool/public-api.js.map +1 -0
- package/schematics/update-tool/target-version.d.ts +16 -0
- package/schematics/update-tool/target-version.js +27 -0
- package/schematics/update-tool/target-version.js.map +1 -0
- package/schematics/update-tool/update-recorder.d.ts +13 -0
- package/schematics/update-tool/update-recorder.js +10 -0
- package/schematics/update-tool/update-recorder.js.map +1 -0
- package/schematics/update-tool/utils/decorators.d.ts +22 -0
- package/schematics/update-tool/utils/decorators.js +41 -0
- package/schematics/update-tool/utils/decorators.js.map +1 -0
- package/schematics/update-tool/utils/diagnostics.d.ts +11 -0
- package/schematics/update-tool/utils/diagnostics.js +18 -0
- package/schematics/update-tool/utils/diagnostics.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 +17 -0
- package/schematics/update-tool/utils/imports.js +110 -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 +18 -0
- package/schematics/update-tool/utils/parse-tsconfig.js +45 -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/utils/virtual-host.d.ts +36 -0
- package/schematics/update-tool/utils/virtual-host.js +71 -0
- package/schematics/update-tool/utils/virtual-host.js.map +1 -0
- package/schematics/update-tool/version-changes.d.ts +32 -0
- package/schematics/update-tool/version-changes.js +38 -0
- package/schematics/update-tool/version-changes.js.map +1 -0
- package/schematics/utils/ast/ng-module-imports.d.ts +12 -0
- package/schematics/utils/ast/ng-module-imports.js +82 -0
- package/schematics/utils/ast/ng-module-imports.js.map +1 -0
- package/schematics/utils/ast.d.ts +25 -0
- package/schematics/utils/ast.js +79 -0
- package/schematics/utils/ast.js.map +1 -0
- package/schematics/utils/build-component.d.ts +20 -0
- package/schematics/utils/build-component.js +189 -0
- package/schematics/utils/build-component.js.map +1 -0
- package/schematics/utils/get-project.d.ts +13 -0
- package/schematics/utils/get-project.js +28 -0
- package/schematics/utils/get-project.js.map +1 -0
- package/schematics/utils/html-manipulation.d.ts +15 -0
- package/schematics/utils/html-manipulation.js +91 -0
- package/schematics/utils/html-manipulation.js.map +1 -0
- package/schematics/utils/index.d.ts +19 -0
- package/schematics/utils/index.js +36 -0
- package/schematics/utils/index.js.map +1 -0
- package/schematics/utils/parse5-element.d.ts +12 -0
- package/schematics/utils/parse5-element.js +30 -0
- package/schematics/utils/parse5-element.js.map +1 -0
- package/schematics/utils/project-index-file.d.ts +13 -0
- package/schematics/utils/project-index-file.js +43 -0
- package/schematics/utils/project-index-file.js.map +1 -0
- package/schematics/utils/project-main-file.d.ts +11 -0
- package/schematics/utils/project-main-file.js +25 -0
- package/schematics/utils/project-main-file.js.map +1 -0
- package/schematics/utils/project-style-file.d.ts +13 -0
- package/schematics/utils/project-style-file.js +42 -0
- package/schematics/utils/project-style-file.js.map +1 -0
- package/schematics/utils/project-targets.d.ts +15 -0
- package/schematics/utils/project-targets.js +46 -0
- package/schematics/utils/project-targets.js.map +1 -0
- package/schematics/utils/project-tsconfig-paths.d.ts +14 -0
- package/schematics/utils/project-tsconfig-paths.js +46 -0
- package/schematics/utils/project-tsconfig-paths.js.map +1 -0
- package/schematics/utils/schematic-options.d.ts +20 -0
- package/schematics/utils/schematic-options.js +89 -0
- package/schematics/utils/schematic-options.js.map +1 -0
- package/scrolling/index.d.ts +62 -849
- package/scrolling-module.d.d.ts +551 -0
- package/selection-model.d.d.ts +112 -0
- package/stepper/index.d.ts +236 -419
- package/style-loader.d.d.ts +21 -0
- package/table/index.d.ts +901 -1483
- package/testing/index.d.ts +98 -0
- package/testing/selenium-webdriver/index.d.ts +150 -0
- package/testing/testbed/index.d.ts +157 -0
- package/text-field/_index.scss +89 -89
- package/text-field/index.d.ts +154 -203
- package/text-field-prebuilt.css +1 -1
- package/tree/index.d.ts +720 -593
- package/tree-key-manager-strategy.d.d.ts +116 -0
- package/unique-selection-dispatcher.d.d.ts +33 -0
- package/view-repeater.d.d.ts +88 -0
- package/a11y/_index.import.scss +0 -2
- package/esm2020/a11y/a11y-module.mjs +0 -32
- package/esm2020/a11y/a11y_public_index.mjs +0 -5
- package/esm2020/a11y/aria-describer/aria-describer.mjs +0 -232
- package/esm2020/a11y/aria-describer/aria-reference.mjs +0 -44
- package/esm2020/a11y/fake-event-detection.mjs +0 -31
- package/esm2020/a11y/focus-monitor/focus-monitor.mjs +0 -451
- package/esm2020/a11y/focus-trap/configurable-focus-trap-config.mjs +0 -9
- package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +0 -53
- package/esm2020/a11y/focus-trap/configurable-focus-trap.mjs +0 -51
- package/esm2020/a11y/focus-trap/event-listener-inert-strategy.mjs +0 -61
- package/esm2020/a11y/focus-trap/focus-trap-inert-strategy.mjs +0 -11
- package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +0 -53
- package/esm2020/a11y/focus-trap/focus-trap.mjs +0 -402
- package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +0 -109
- package/esm2020/a11y/index.mjs +0 -9
- package/esm2020/a11y/input-modality/input-modality-detector.mjs +0 -176
- package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +0 -238
- package/esm2020/a11y/key-manager/activedescendant-key-manager.mjs +0 -20
- package/esm2020/a11y/key-manager/focus-key-manager.mjs +0 -29
- package/esm2020/a11y/key-manager/list-key-manager.mjs +0 -321
- package/esm2020/a11y/live-announcer/live-announcer-tokens.mjs +0 -19
- package/esm2020/a11y/live-announcer/live-announcer.mjs +0 -178
- package/esm2020/a11y/public-api.mjs +0 -26
- package/esm2020/accordion/accordion-item.mjs +0 -167
- package/esm2020/accordion/accordion-module.mjs +0 -24
- package/esm2020/accordion/accordion.mjs +0 -70
- package/esm2020/accordion/accordion_public_index.mjs +0 -5
- package/esm2020/accordion/index.mjs +0 -9
- package/esm2020/accordion/public-api.mjs +0 -11
- package/esm2020/bidi/bidi-module.mjs +0 -23
- package/esm2020/bidi/bidi_public_index.mjs +0 -5
- package/esm2020/bidi/dir-document-token.mjs +0 -33
- package/esm2020/bidi/dir.mjs +0 -69
- package/esm2020/bidi/directionality.mjs +0 -52
- package/esm2020/bidi/index.mjs +0 -9
- package/esm2020/bidi/public-api.mjs +0 -12
- package/esm2020/clipboard/clipboard-module.mjs +0 -23
- package/esm2020/clipboard/clipboard.mjs +0 -53
- package/esm2020/clipboard/clipboard_public_index.mjs +0 -5
- package/esm2020/clipboard/copy-to-clipboard.mjs +0 -99
- package/esm2020/clipboard/index.mjs +0 -9
- package/esm2020/clipboard/pending-copy.mjs +0 -69
- package/esm2020/clipboard/public-api.mjs +0 -12
- package/esm2020/coercion/array.mjs +0 -11
- package/esm2020/coercion/boolean-property.mjs +0 -12
- package/esm2020/coercion/css-pixel-value.mjs +0 -15
- package/esm2020/coercion/element.mjs +0 -16
- package/esm2020/coercion/index.mjs +0 -9
- package/esm2020/coercion/number-property.mjs +0 -21
- package/esm2020/coercion/public-api.mjs +0 -14
- package/esm2020/coercion/string-array.mjs +0 -38
- package/esm2020/collections/array-data-source.mjs +0 -21
- package/esm2020/collections/collection-viewer.mjs +0 -9
- package/esm2020/collections/collections_public_index.mjs +0 -5
- package/esm2020/collections/data-source.mjs +0 -19
- package/esm2020/collections/dispose-view-repeater-strategy.mjs +0 -47
- package/esm2020/collections/index.mjs +0 -9
- package/esm2020/collections/public-api.mjs +0 -17
- package/esm2020/collections/recycle-view-repeater-strategy.mjs +0 -128
- package/esm2020/collections/selection-model.mjs +0 -216
- package/esm2020/collections/tree-adapter.mjs +0 -9
- package/esm2020/collections/unique-selection-dispatcher.mjs +0 -55
- package/esm2020/collections/view-repeater.mjs +0 -14
- package/esm2020/dialog/dialog-config.mjs +0 -63
- package/esm2020/dialog/dialog-container.mjs +0 -278
- package/esm2020/dialog/dialog-injectors.mjs +0 -26
- package/esm2020/dialog/dialog-module.mjs +0 -42
- package/esm2020/dialog/dialog-ref.mjs +0 -76
- package/esm2020/dialog/dialog.mjs +0 -301
- package/esm2020/dialog/dialog_public_index.mjs +0 -5
- package/esm2020/dialog/index.mjs +0 -9
- package/esm2020/dialog/public-api.mjs +0 -14
- package/esm2020/drag-drop/directives/assertions.mjs +0 -18
- package/esm2020/drag-drop/directives/config.mjs +0 -14
- package/esm2020/drag-drop/directives/drag-handle.mjs +0 -66
- package/esm2020/drag-drop/directives/drag-placeholder.mjs +0 -36
- package/esm2020/drag-drop/directives/drag-preview.mjs +0 -47
- package/esm2020/drag-drop/directives/drag.mjs +0 -487
- package/esm2020/drag-drop/directives/drop-list-group.mjs +0 -53
- package/esm2020/drag-drop/directives/drop-list.mjs +0 -345
- package/esm2020/drag-drop/dom/client-rect.mjs +0 -64
- package/esm2020/drag-drop/dom/clone-node.mjs +0 -65
- package/esm2020/drag-drop/dom/parent-position-tracker.mjs +0 -76
- package/esm2020/drag-drop/dom/styling.mjs +0 -69
- package/esm2020/drag-drop/dom/transition-duration.mjs +0 -36
- package/esm2020/drag-drop/drag-drop-module.mjs +0 -57
- package/esm2020/drag-drop/drag-drop-registry.mjs +0 -231
- package/esm2020/drag-drop/drag-drop.mjs +0 -57
- package/esm2020/drag-drop/drag-drop_public_index.mjs +0 -5
- package/esm2020/drag-drop/drag-events.mjs +0 -9
- package/esm2020/drag-drop/drag-parent.mjs +0 -16
- package/esm2020/drag-drop/drag-ref.mjs +0 -1146
- package/esm2020/drag-drop/drag-utils.mjs +0 -60
- package/esm2020/drag-drop/drop-list-ref.mjs +0 -577
- package/esm2020/drag-drop/index.mjs +0 -9
- package/esm2020/drag-drop/public-api.mjs +0 -23
- package/esm2020/drag-drop/sorting/drop-list-sort-strategy.mjs +0 -9
- package/esm2020/drag-drop/sorting/single-axis-sort-strategy.mjs +0 -341
- package/esm2020/index.mjs +0 -9
- package/esm2020/keycodes/index.mjs +0 -9
- package/esm2020/keycodes/keycodes.mjs +0 -127
- package/esm2020/keycodes/keycodes_public_index.mjs +0 -5
- package/esm2020/keycodes/modifiers.mjs +0 -18
- package/esm2020/keycodes/public-api.mjs +0 -10
- package/esm2020/layout/breakpoints-observer.mjs +0 -105
- package/esm2020/layout/breakpoints.mjs +0 -29
- package/esm2020/layout/index.mjs +0 -9
- package/esm2020/layout/layout-module.mjs +0 -19
- package/esm2020/layout/layout_public_index.mjs +0 -5
- package/esm2020/layout/media-matcher.mjs +0 -85
- package/esm2020/layout/public-api.mjs +0 -12
- package/esm2020/listbox/index.mjs +0 -9
- package/esm2020/listbox/listbox-module.mjs +0 -24
- package/esm2020/listbox/listbox.mjs +0 -872
- package/esm2020/listbox/listbox_public_index.mjs +0 -5
- package/esm2020/listbox/public-api.mjs +0 -10
- package/esm2020/menu/context-menu-trigger.mjs +0 -212
- package/esm2020/menu/index.mjs +0 -9
- package/esm2020/menu/menu-aim.mjs +0 -203
- package/esm2020/menu/menu-bar.mjs +0 -133
- package/esm2020/menu/menu-base.mjs +0 -187
- package/esm2020/menu/menu-errors.mjs +0 -22
- package/esm2020/menu/menu-group.mjs +0 -30
- package/esm2020/menu/menu-interface.mjs +0 -11
- package/esm2020/menu/menu-item-checkbox.mjs +0 -49
- package/esm2020/menu/menu-item-radio.mjs +0 -71
- package/esm2020/menu/menu-item-selectable.mjs +0 -42
- package/esm2020/menu/menu-item.mjs +0 -267
- package/esm2020/menu/menu-module.mjs +0 -62
- package/esm2020/menu/menu-stack.mjs +0 -156
- package/esm2020/menu/menu-trigger-base.mjs +0 -107
- package/esm2020/menu/menu-trigger.mjs +0 -291
- package/esm2020/menu/menu.mjs +0 -134
- package/esm2020/menu/menu_public_index.mjs +0 -5
- package/esm2020/menu/pointer-focus-tracker.mjs +0 -51
- package/esm2020/menu/public-api.mjs +0 -24
- package/esm2020/observers/index.mjs +0 -9
- package/esm2020/observers/observe-content.mjs +0 -187
- package/esm2020/observers/observers_public_index.mjs +0 -5
- package/esm2020/observers/public-api.mjs +0 -9
- package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +0 -52
- package/esm2020/overlay/dispatchers/index.mjs +0 -10
- package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +0 -81
- package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +0 -138
- package/esm2020/overlay/fullscreen-overlay-container.mjs +0 -94
- package/esm2020/overlay/index.mjs +0 -9
- package/esm2020/overlay/overlay-config.mjs +0 -45
- package/esm2020/overlay/overlay-container.mjs +0 -81
- package/esm2020/overlay/overlay-directives.mjs +0 -427
- package/esm2020/overlay/overlay-module.mjs +0 -29
- package/esm2020/overlay/overlay-ref.mjs +0 -427
- package/esm2020/overlay/overlay-reference.mjs +0 -9
- package/esm2020/overlay/overlay.mjs +0 -125
- package/esm2020/overlay/overlay_public_index.mjs +0 -5
- package/esm2020/overlay/position/connected-position.mjs +0 -88
- package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +0 -985
- package/esm2020/overlay/position/global-position-strategy.mjs +0 -237
- package/esm2020/overlay/position/overlay-position-builder.mjs +0 -50
- package/esm2020/overlay/position/position-strategy.mjs +0 -9
- package/esm2020/overlay/position/scroll-clip.mjs +0 -40
- package/esm2020/overlay/public-api.mjs +0 -22
- package/esm2020/overlay/scroll/block-scroll-strategy.mjs +0 -80
- package/esm2020/overlay/scroll/close-scroll-strategy.mjs +0 -61
- package/esm2020/overlay/scroll/index.mjs +0 -14
- package/esm2020/overlay/scroll/noop-scroll-strategy.mjs +0 -17
- package/esm2020/overlay/scroll/reposition-scroll-strategy.mjs +0 -61
- package/esm2020/overlay/scroll/scroll-strategy-options.mjs +0 -55
- package/esm2020/overlay/scroll/scroll-strategy.mjs +0 -14
- package/esm2020/platform/features/input-types.mjs +0 -59
- package/esm2020/platform/features/passive-listeners.mjs +0 -36
- package/esm2020/platform/features/scrolling.mjs +0 -85
- package/esm2020/platform/features/shadow-dom.mjs +0 -54
- package/esm2020/platform/features/test-environment.mjs +0 -24
- package/esm2020/platform/index.mjs +0 -9
- package/esm2020/platform/platform-module.mjs +0 -19
- package/esm2020/platform/platform.mjs +0 -85
- package/esm2020/platform/platform_public_index.mjs +0 -5
- package/esm2020/platform/public-api.mjs +0 -15
- package/esm2020/portal/dom-portal-outlet.mjs +0 -158
- package/esm2020/portal/index.mjs +0 -9
- package/esm2020/portal/portal-directives.mjs +0 -246
- package/esm2020/portal/portal-errors.mjs +0 -51
- package/esm2020/portal/portal-injector.mjs +0 -28
- package/esm2020/portal/portal.mjs +0 -188
- package/esm2020/portal/portal_public_index.mjs +0 -5
- package/esm2020/portal/public-api.mjs +0 -12
- package/esm2020/public-api.mjs +0 -9
- package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +0 -217
- package/esm2020/scrolling/index.mjs +0 -9
- package/esm2020/scrolling/public-api.mjs +0 -20
- package/esm2020/scrolling/scroll-dispatcher.mjs +0 -163
- package/esm2020/scrolling/scrollable.mjs +0 -176
- package/esm2020/scrolling/scrolling-module.mjs +0 -67
- package/esm2020/scrolling/scrolling_public_index.mjs +0 -5
- package/esm2020/scrolling/viewport-ruler.mjs +0 -146
- package/esm2020/scrolling/virtual-for-of.mjs +0 -298
- package/esm2020/scrolling/virtual-scroll-repeater.mjs +0 -9
- package/esm2020/scrolling/virtual-scroll-strategy.mjs +0 -11
- package/esm2020/scrolling/virtual-scroll-viewport.mjs +0 -437
- package/esm2020/scrolling/virtual-scrollable-element.mjs +0 -41
- package/esm2020/scrolling/virtual-scrollable-window.mjs +0 -40
- package/esm2020/scrolling/virtual-scrollable.mjs +0 -40
- package/esm2020/stepper/index.mjs +0 -9
- package/esm2020/stepper/public-api.mjs +0 -13
- package/esm2020/stepper/step-header.mjs +0 -30
- package/esm2020/stepper/step-label.mjs +0 -23
- package/esm2020/stepper/stepper-button.mjs +0 -56
- package/esm2020/stepper/stepper-module.mjs +0 -40
- package/esm2020/stepper/stepper.mjs +0 -458
- package/esm2020/stepper/stepper_public_index.mjs +0 -5
- package/esm2020/table/can-stick.mjs +0 -44
- package/esm2020/table/cell.mjs +0 -217
- package/esm2020/table/coalesced-style-scheduler.mjs +0 -91
- package/esm2020/table/index.mjs +0 -9
- package/esm2020/table/public-api.mjs +0 -20
- package/esm2020/table/row.mjs +0 -262
- package/esm2020/table/sticky-position-listener.mjs +0 -11
- package/esm2020/table/sticky-styler.mjs +0 -345
- package/esm2020/table/table-errors.mjs +0 -67
- package/esm2020/table/table-module.mjs +0 -94
- package/esm2020/table/table.mjs +0 -1065
- package/esm2020/table/table_public_index.mjs +0 -5
- package/esm2020/table/text-column.mjs +0 -153
- package/esm2020/table/tokens.mjs +0 -16
- package/esm2020/text-field/autofill.mjs +0 -113
- package/esm2020/text-field/autosize.mjs +0 -309
- package/esm2020/text-field/index.mjs +0 -9
- package/esm2020/text-field/public-api.mjs +0 -11
- package/esm2020/text-field/text-field-module.mjs +0 -24
- package/esm2020/text-field/text-field_public_index.mjs +0 -5
- package/esm2020/tree/control/base-tree-control.mjs +0 -57
- package/esm2020/tree/control/flat-tree-control.mjs +0 -51
- package/esm2020/tree/control/nested-tree-control.mjs +0 -58
- package/esm2020/tree/control/tree-control.mjs +0 -2
- package/esm2020/tree/index.mjs +0 -9
- package/esm2020/tree/nested-node.mjs +0 -112
- package/esm2020/tree/node.mjs +0 -35
- package/esm2020/tree/outlet.mjs +0 -39
- package/esm2020/tree/padding.mjs +0 -131
- package/esm2020/tree/public-api.mjs +0 -20
- package/esm2020/tree/toggle.mjs +0 -50
- package/esm2020/tree/tree-errors.mjs +0 -43
- package/esm2020/tree/tree-module.mjs +0 -49
- package/esm2020/tree/tree.mjs +0 -347
- package/esm2020/tree/tree_public_index.mjs +0 -5
- package/esm2020/version.mjs +0 -11
- package/fesm2015/a11y.mjs +0 -2473
- package/fesm2015/a11y.mjs.map +0 -1
- package/fesm2015/accordion.mjs +0 -414
- package/fesm2015/accordion.mjs.map +0 -1
- package/fesm2015/bidi.mjs +0 -194
- package/fesm2015/bidi.mjs.map +0 -1
- package/fesm2015/cdk.mjs +0 -30
- package/fesm2015/cdk.mjs.map +0 -1
- package/fesm2015/clipboard.mjs +0 -263
- package/fesm2015/clipboard.mjs.map +0 -1
- package/fesm2015/coercion.mjs +0 -132
- package/fesm2015/coercion.mjs.map +0 -1
- package/fesm2015/collections.mjs +0 -519
- package/fesm2015/collections.mjs.map +0 -1
- package/fesm2015/dialog.mjs +0 -1050
- package/fesm2015/dialog.mjs.map +0 -1
- package/fesm2015/drag-drop.mjs +0 -3812
- package/fesm2015/drag-drop.mjs.map +0 -1
- package/fesm2015/keycodes.mjs.map +0 -1
- package/fesm2015/layout.mjs +0 -337
- package/fesm2015/layout.mjs.map +0 -1
- package/fesm2015/listbox.mjs +0 -1200
- package/fesm2015/listbox.mjs.map +0 -1
- package/fesm2015/menu.mjs +0 -2719
- package/fesm2015/menu.mjs.map +0 -1
- package/fesm2015/observers.mjs +0 -326
- package/fesm2015/observers.mjs.map +0 -1
- package/fesm2015/overlay.mjs +0 -3137
- package/fesm2015/overlay.mjs.map +0 -1
- package/fesm2015/platform.mjs +0 -385
- package/fesm2015/platform.mjs.map +0 -1
- package/fesm2015/portal.mjs +0 -691
- package/fesm2015/portal.mjs.map +0 -1
- package/fesm2015/scrolling.mjs.map +0 -1
- package/fesm2015/stepper.mjs +0 -989
- package/fesm2015/stepper.mjs.map +0 -1
- package/fesm2015/table.mjs +0 -2356
- package/fesm2015/table.mjs.map +0 -1
- package/fesm2015/testing.mjs +0 -833
- package/fesm2015/testing.mjs.map +0 -1
- package/fesm2015/text-field.mjs +0 -461
- package/fesm2015/text-field.mjs.map +0 -1
- package/fesm2015/tree.mjs +0 -1303
- package/fesm2015/tree.mjs.map +0 -1
- package/fesm2020/a11y.mjs +0 -2476
- package/fesm2020/a11y.mjs.map +0 -1
- package/fesm2020/accordion.mjs +0 -414
- package/fesm2020/accordion.mjs.map +0 -1
- package/fesm2020/bidi.mjs +0 -192
- package/fesm2020/bidi.mjs.map +0 -1
- package/fesm2020/cdk.mjs +0 -30
- package/fesm2020/cdk.mjs.map +0 -1
- package/fesm2020/clipboard.mjs.map +0 -1
- package/fesm2020/coercion.mjs +0 -132
- package/fesm2020/coercion.mjs.map +0 -1
- package/fesm2020/collections.mjs +0 -535
- package/fesm2020/collections.mjs.map +0 -1
- package/fesm2020/dialog.mjs.map +0 -1
- package/fesm2020/drag-drop.mjs.map +0 -1
- package/fesm2020/keycodes.mjs +0 -167
- package/fesm2020/keycodes.mjs.map +0 -1
- package/fesm2020/layout.mjs +0 -337
- package/fesm2020/layout.mjs.map +0 -1
- package/fesm2020/listbox.mjs +0 -1164
- package/fesm2020/listbox.mjs.map +0 -1
- package/fesm2020/menu.mjs +0 -2615
- package/fesm2020/menu.mjs.map +0 -1
- package/fesm2020/observers.mjs +0 -325
- package/fesm2020/observers.mjs.map +0 -1
- package/fesm2020/overlay.mjs.map +0 -1
- package/fesm2020/platform.mjs +0 -383
- package/fesm2020/platform.mjs.map +0 -1
- package/fesm2020/portal.mjs.map +0 -1
- package/fesm2020/scrolling.mjs +0 -1591
- package/fesm2020/scrolling.mjs.map +0 -1
- package/fesm2020/stepper.mjs +0 -985
- package/fesm2020/stepper.mjs.map +0 -1
- package/fesm2020/table.mjs.map +0 -1
- package/fesm2020/testing.mjs +0 -797
- package/fesm2020/testing.mjs.map +0 -1
- package/fesm2020/text-field.mjs.map +0 -1
- package/fesm2020/tree.mjs +0 -1305
- package/fesm2020/tree.mjs.map +0 -1
- package/overlay/_index.import.scss +0 -13
- package/text-field/_index.import.scss +0 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.InputNamesMigration = void 0;
|
|
11
|
+
const angular_1 = require("../html-parsing/angular");
|
|
12
|
+
const migration_1 = require("../../update-tool/migration");
|
|
13
|
+
const literal_1 = require("../typescript/literal");
|
|
14
|
+
const upgrade_data_1 = require("../upgrade-data");
|
|
15
|
+
/**
|
|
16
|
+
* Migration that walks through every template or stylesheet and replaces outdated input
|
|
17
|
+
* names to the new input name. Selectors in stylesheets could also target input
|
|
18
|
+
* bindings declared as static attribute. See for example:
|
|
19
|
+
*
|
|
20
|
+
* e.g. `<my-component color="primary">` becomes `my-component[color]`
|
|
21
|
+
*/
|
|
22
|
+
class InputNamesMigration extends migration_1.Migration {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
/** Change data that upgrades to the specified target version. */
|
|
26
|
+
this.data = (0, upgrade_data_1.getVersionUpgradeData)(this, 'inputNames');
|
|
27
|
+
// Only enable the migration rule if there is upgrade data.
|
|
28
|
+
this.enabled = this.data.length !== 0;
|
|
29
|
+
}
|
|
30
|
+
visitStylesheet(stylesheet) {
|
|
31
|
+
this.data.forEach(name => {
|
|
32
|
+
const currentSelector = `[${name.replace}]`;
|
|
33
|
+
const updatedSelector = `[${name.replaceWith}]`;
|
|
34
|
+
(0, literal_1.findAllSubstringIndices)(stylesheet.content, currentSelector)
|
|
35
|
+
.map(offset => stylesheet.start + offset)
|
|
36
|
+
.forEach(start => this._replaceInputName(stylesheet.filePath, start, currentSelector.length, updatedSelector));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
visitTemplate(template) {
|
|
40
|
+
this.data.forEach(name => {
|
|
41
|
+
const limitedTo = name.limitedTo;
|
|
42
|
+
const relativeOffsets = [];
|
|
43
|
+
if (limitedTo.attributes) {
|
|
44
|
+
relativeOffsets.push(...(0, angular_1.findInputsOnElementWithAttr)(template.content, name.replace, limitedTo.attributes));
|
|
45
|
+
}
|
|
46
|
+
if (limitedTo.elements) {
|
|
47
|
+
relativeOffsets.push(...(0, angular_1.findInputsOnElementWithTag)(template.content, name.replace, limitedTo.elements));
|
|
48
|
+
}
|
|
49
|
+
relativeOffsets
|
|
50
|
+
.map(offset => template.start + offset)
|
|
51
|
+
.forEach(start => this._replaceInputName(template.filePath, start, name.replace.length, name.replaceWith));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
_replaceInputName(filePath, start, width, newName) {
|
|
55
|
+
this.fileSystem.edit(filePath).remove(start, width).insertRight(start, newName);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.InputNamesMigration = InputNamesMigration;
|
|
59
|
+
//# sourceMappingURL=input-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-names.js","sourceRoot":"","sources":["input-names.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,qDAAgG;AAEhG,2DAAsD;AAGtD,mDAA8D;AAC9D,kDAAmE;AAEnE;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,qBAAsB;IAA/D;;QACE,iEAAiE;QACjE,SAAI,GAA2B,IAAA,oCAAqB,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAEzE,2DAA2D;QAC3D,YAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IAqDnC,CAAC;IAnDU,eAAe,CAAC,UAA4B;QACnD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvB,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC;YAC5C,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;YAEhD,IAAA,iCAAuB,EAAC,UAAU,CAAC,OAAO,EAAE,eAAe,CAAC;iBACzD,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC;iBACxC,OAAO,CAAC,KAAK,CAAC,EAAE,CACf,IAAI,CAAC,iBAAiB,CACpB,UAAU,CAAC,QAAQ,EACnB,KAAK,EACL,eAAe,CAAC,MAAM,EACtB,eAAe,CAChB,CACF,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;IAEQ,aAAa,CAAC,QAA0B;QAC/C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACjC,MAAM,eAAe,GAAa,EAAE,CAAC;YAErC,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC;gBACzB,eAAe,CAAC,IAAI,CAClB,GAAG,IAAA,qCAA2B,EAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,CACrF,CAAC;YACJ,CAAC;YAED,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;gBACvB,eAAe,CAAC,IAAI,CAClB,GAAG,IAAA,oCAA0B,EAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,CAClF,CAAC;YACJ,CAAC;YAED,eAAe;iBACZ,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC;iBACtC,OAAO,CAAC,KAAK,CAAC,EAAE,CACf,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CACxF,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,iBAAiB,CACvB,QAAuB,EACvB,KAAa,EACb,KAAa,EACb,OAAe;QAEf,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF;AA1DD,kDA0DC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import * as ts from 'typescript';
|
|
9
|
+
import { Migration } from '../../update-tool/migration';
|
|
10
|
+
import { MethodCallUpgradeData } from '../data';
|
|
11
|
+
import { UpgradeData } from '../upgrade-data';
|
|
12
|
+
/**
|
|
13
|
+
* Migration that visits every TypeScript method call expression and checks if the
|
|
14
|
+
* argument count is invalid and needs to be *manually* updated.
|
|
15
|
+
*/
|
|
16
|
+
export declare class MethodCallArgumentsMigration extends Migration<UpgradeData> {
|
|
17
|
+
/** Change data that upgrades to the specified target version. */
|
|
18
|
+
data: MethodCallUpgradeData[];
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
visitNode(node: ts.Node): void;
|
|
21
|
+
private _checkPropertyAccessMethodCall;
|
|
22
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.MethodCallArgumentsMigration = void 0;
|
|
11
|
+
const ts = require("typescript");
|
|
12
|
+
const migration_1 = require("../../update-tool/migration");
|
|
13
|
+
const upgrade_data_1 = require("../upgrade-data");
|
|
14
|
+
/**
|
|
15
|
+
* Migration that visits every TypeScript method call expression and checks if the
|
|
16
|
+
* argument count is invalid and needs to be *manually* updated.
|
|
17
|
+
*/
|
|
18
|
+
class MethodCallArgumentsMigration extends migration_1.Migration {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/** Change data that upgrades to the specified target version. */
|
|
22
|
+
this.data = (0, upgrade_data_1.getVersionUpgradeData)(this, 'methodCallChecks');
|
|
23
|
+
// Only enable the migration rule if there is upgrade data.
|
|
24
|
+
this.enabled = this.data.length !== 0;
|
|
25
|
+
}
|
|
26
|
+
visitNode(node) {
|
|
27
|
+
if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression)) {
|
|
28
|
+
this._checkPropertyAccessMethodCall(node);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
_checkPropertyAccessMethodCall(node) {
|
|
32
|
+
const propertyAccess = node.expression;
|
|
33
|
+
if (!ts.isIdentifier(propertyAccess.name)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const hostType = this.typeChecker.getTypeAtLocation(propertyAccess.expression);
|
|
37
|
+
const hostTypeName = hostType.symbol && hostType.symbol.name;
|
|
38
|
+
const methodName = propertyAccess.name.text;
|
|
39
|
+
if (!hostTypeName) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// TODO(devversion): Revisit the implementation of this upgrade rule. It seems difficult
|
|
43
|
+
// and ambiguous to maintain the data for this rule. e.g. consider a method which has the
|
|
44
|
+
// same amount of arguments but just had a type change. In that case we could still add
|
|
45
|
+
// new entries to the upgrade data that match the current argument length to just show
|
|
46
|
+
// a failure message, but adding that data becomes painful if the method has optional
|
|
47
|
+
// parameters and it would mean that the error message would always show up, even if the
|
|
48
|
+
// argument is in some cases still assignable to the new parameter type. We could re-use
|
|
49
|
+
// the logic we have in the constructor-signature checks to check for assignability and
|
|
50
|
+
// to make the upgrade data less verbose.
|
|
51
|
+
const failure = this.data
|
|
52
|
+
.filter(data => data.method === methodName && data.className === hostTypeName)
|
|
53
|
+
.map(data => data.invalidArgCounts.find(f => f.count === node.arguments.length))[0];
|
|
54
|
+
if (!failure) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.createFailureAtNode(node, `Found call to "${hostTypeName + '.' + methodName}" ` +
|
|
58
|
+
`with ${failure.count} arguments. Message: ${failure.message}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.MethodCallArgumentsMigration = MethodCallArgumentsMigration;
|
|
62
|
+
//# sourceMappingURL=method-call-arguments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-call-arguments.js","sourceRoot":"","sources":["method-call-arguments.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AACjC,2DAAsD;AAGtD,kDAAmE;AAEnE;;;GAGG;AACH,MAAa,4BAA6B,SAAQ,qBAAsB;IAAxE;;QACE,iEAAiE;QACjE,SAAI,GAA4B,IAAA,oCAAqB,EAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;QAEhF,2DAA2D;QAC3D,YAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IA8CnC,CAAC;IA5CU,SAAS,CAAC,IAAa;QAC9B,IAAI,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAChF,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAEO,8BAA8B,CAAC,IAAuB;QAC5D,MAAM,cAAc,GAAG,IAAI,CAAC,UAAyC,CAAC;QAEtE,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,OAAO;QACT,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QAC/E,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC7D,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;QAE5C,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QAED,wFAAwF;QACxF,yFAAyF;QACzF,uFAAuF;QACvF,sFAAsF;QACtF,qFAAqF;QACrF,wFAAwF;QACxF,wFAAwF;QACxF,uFAAuF;QACvF,yCAAyC;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI;aACtB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,KAAK,YAAY,CAAC;aAC7E,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtF,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QAED,IAAI,CAAC,mBAAmB,CACtB,IAAI,EACJ,kBAAkB,YAAY,GAAG,GAAG,GAAG,UAAU,IAAI;YACnD,QAAQ,OAAO,CAAC,KAAK,wBAAwB,OAAO,CAAC,OAAO,EAAE,CACjE,CAAC;IACJ,CAAC;CACF;AAnDD,oEAmDC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { ResolvedResource } from '../../update-tool/component-resource-collector';
|
|
9
|
+
import { Migration } from '../../update-tool/migration';
|
|
10
|
+
import { UpgradeData } from '../upgrade-data';
|
|
11
|
+
/**
|
|
12
|
+
* Migration that walks through every template and reports if there are
|
|
13
|
+
* instances of outdated Angular CDK API that can't be migrated automatically.
|
|
14
|
+
*/
|
|
15
|
+
export declare class MiscTemplateMigration extends Migration<UpgradeData> {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
visitTemplate(template: ResolvedResource): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.MiscTemplateMigration = void 0;
|
|
11
|
+
const migration_1 = require("../../update-tool/migration");
|
|
12
|
+
/**
|
|
13
|
+
* Migration that walks through every template and reports if there are
|
|
14
|
+
* instances of outdated Angular CDK API that can't be migrated automatically.
|
|
15
|
+
*/
|
|
16
|
+
class MiscTemplateMigration extends migration_1.Migration {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
// There are currently no migrations for V19 deprecations.
|
|
20
|
+
this.enabled = false;
|
|
21
|
+
}
|
|
22
|
+
visitTemplate(template) { }
|
|
23
|
+
}
|
|
24
|
+
exports.MiscTemplateMigration = MiscTemplateMigration;
|
|
25
|
+
//# sourceMappingURL=misc-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misc-template.js","sourceRoot":"","sources":["misc-template.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,2DAAsD;AAGtD;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,qBAAsB;IAAjE;;QACE,0DAA0D;QAC1D,YAAO,GAAG,KAAK,CAAC;IAGlB,CAAC;IADU,aAAa,CAAC,QAA0B,IAAS,CAAC;CAC5D;AALD,sDAKC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { ResolvedResource } from '../../update-tool/component-resource-collector';
|
|
9
|
+
import { Migration } from '../../update-tool/migration';
|
|
10
|
+
import { OutputNameUpgradeData } from '../data';
|
|
11
|
+
import { UpgradeData } from '../upgrade-data';
|
|
12
|
+
/**
|
|
13
|
+
* Migration that walks through every inline or external HTML template and switches
|
|
14
|
+
* changed output binding names to the proper new output name.
|
|
15
|
+
*/
|
|
16
|
+
export declare class OutputNamesMigration extends Migration<UpgradeData> {
|
|
17
|
+
/** Change data that upgrades to the specified target version. */
|
|
18
|
+
data: OutputNameUpgradeData[];
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
visitTemplate(template: ResolvedResource): void;
|
|
21
|
+
private _replaceOutputName;
|
|
22
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.OutputNamesMigration = void 0;
|
|
11
|
+
const migration_1 = require("../../update-tool/migration");
|
|
12
|
+
const angular_1 = require("../html-parsing/angular");
|
|
13
|
+
const upgrade_data_1 = require("../upgrade-data");
|
|
14
|
+
/**
|
|
15
|
+
* Migration that walks through every inline or external HTML template and switches
|
|
16
|
+
* changed output binding names to the proper new output name.
|
|
17
|
+
*/
|
|
18
|
+
class OutputNamesMigration extends migration_1.Migration {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/** Change data that upgrades to the specified target version. */
|
|
22
|
+
this.data = (0, upgrade_data_1.getVersionUpgradeData)(this, 'outputNames');
|
|
23
|
+
// Only enable the migration rule if there is upgrade data.
|
|
24
|
+
this.enabled = this.data.length !== 0;
|
|
25
|
+
}
|
|
26
|
+
visitTemplate(template) {
|
|
27
|
+
this.data.forEach(name => {
|
|
28
|
+
const limitedTo = name.limitedTo;
|
|
29
|
+
const relativeOffsets = [];
|
|
30
|
+
if (limitedTo.attributes) {
|
|
31
|
+
relativeOffsets.push(...(0, angular_1.findOutputsOnElementWithAttr)(template.content, name.replace, limitedTo.attributes));
|
|
32
|
+
}
|
|
33
|
+
if (limitedTo.elements) {
|
|
34
|
+
relativeOffsets.push(...(0, angular_1.findOutputsOnElementWithTag)(template.content, name.replace, limitedTo.elements));
|
|
35
|
+
}
|
|
36
|
+
relativeOffsets
|
|
37
|
+
.map(offset => template.start + offset)
|
|
38
|
+
.forEach(start => this._replaceOutputName(template.filePath, start, name.replace.length, name.replaceWith));
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
_replaceOutputName(filePath, start, width, newName) {
|
|
42
|
+
this.fileSystem.edit(filePath).remove(start, width).insertRight(start, newName);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.OutputNamesMigration = OutputNamesMigration;
|
|
46
|
+
//# sourceMappingURL=output-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-names.js","sourceRoot":"","sources":["output-names.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH,2DAAsD;AAGtD,qDAAkG;AAClG,kDAAmE;AAEnE;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,qBAAsB;IAAhE;;QACE,iEAAiE;QACjE,SAAI,GAA4B,IAAA,oCAAqB,EAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAE3E,2DAA2D;QAC3D,YAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IAmCnC,CAAC;IAjCU,aAAa,CAAC,QAA0B;QAC/C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACjC,MAAM,eAAe,GAAa,EAAE,CAAC;YAErC,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC;gBACzB,eAAe,CAAC,IAAI,CAClB,GAAG,IAAA,sCAA4B,EAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,CACtF,CAAC;YACJ,CAAC;YAED,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;gBACvB,eAAe,CAAC,IAAI,CAClB,GAAG,IAAA,qCAA2B,EAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,CACnF,CAAC;YACJ,CAAC;YAED,eAAe;iBACZ,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC;iBACtC,OAAO,CAAC,KAAK,CAAC,EAAE,CACf,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CACzF,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,kBAAkB,CACxB,QAAuB,EACvB,KAAa,EACb,KAAa,EACb,OAAe;QAEf,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF;AAxCD,oDAwCC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import * as ts from 'typescript';
|
|
9
|
+
import { Migration } from '../../update-tool/migration';
|
|
10
|
+
import { PropertyNameUpgradeData } from '../data';
|
|
11
|
+
import { UpgradeData } from '../upgrade-data';
|
|
12
|
+
/**
|
|
13
|
+
* Migration that walks through every property access expression and updates
|
|
14
|
+
* accessed properties that have been updated to a new name.
|
|
15
|
+
*/
|
|
16
|
+
export declare class PropertyNamesMigration extends Migration<UpgradeData> {
|
|
17
|
+
/** Change data that upgrades to the specified target version. */
|
|
18
|
+
data: PropertyNameUpgradeData[];
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
visitNode(node: ts.Node): void;
|
|
21
|
+
private _visitPropertyAccessExpression;
|
|
22
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PropertyNamesMigration = void 0;
|
|
11
|
+
const ts = require("typescript");
|
|
12
|
+
const migration_1 = require("../../update-tool/migration");
|
|
13
|
+
const upgrade_data_1 = require("../upgrade-data");
|
|
14
|
+
/**
|
|
15
|
+
* Migration that walks through every property access expression and updates
|
|
16
|
+
* accessed properties that have been updated to a new name.
|
|
17
|
+
*/
|
|
18
|
+
class PropertyNamesMigration extends migration_1.Migration {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/** Change data that upgrades to the specified target version. */
|
|
22
|
+
this.data = (0, upgrade_data_1.getVersionUpgradeData)(this, 'propertyNames');
|
|
23
|
+
// Only enable the migration rule if there is upgrade data.
|
|
24
|
+
this.enabled = this.data.length !== 0;
|
|
25
|
+
}
|
|
26
|
+
visitNode(node) {
|
|
27
|
+
if (ts.isPropertyAccessExpression(node)) {
|
|
28
|
+
this._visitPropertyAccessExpression(node);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
_visitPropertyAccessExpression(node) {
|
|
32
|
+
const hostType = this.typeChecker.getTypeAtLocation(node.expression);
|
|
33
|
+
const typeNames = [];
|
|
34
|
+
if (hostType) {
|
|
35
|
+
if (hostType.isIntersection()) {
|
|
36
|
+
hostType.types.forEach(type => {
|
|
37
|
+
if (type.symbol) {
|
|
38
|
+
typeNames.push(type.symbol.getName());
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else if (hostType.symbol) {
|
|
43
|
+
typeNames.push(hostType.symbol.getName());
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
this.data.forEach(data => {
|
|
47
|
+
if (node.name.text !== data.replace) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (!data.limitedTo || typeNames.some(type => data.limitedTo.classes.includes(type))) {
|
|
51
|
+
this.fileSystem
|
|
52
|
+
.edit(this.fileSystem.resolve(node.getSourceFile().fileName))
|
|
53
|
+
.remove(node.name.getStart(), node.name.getWidth())
|
|
54
|
+
.insertRight(node.name.getStart(), data.replaceWith);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.PropertyNamesMigration = PropertyNamesMigration;
|
|
60
|
+
//# sourceMappingURL=property-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-names.js","sourceRoot":"","sources":["property-names.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AACjC,2DAAsD;AAGtD,kDAAmE;AAEnE;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,qBAAsB;IAAlE;;QACE,iEAAiE;QACjE,SAAI,GAA8B,IAAA,oCAAqB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAE/E,2DAA2D;QAC3D,YAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IAqCnC,CAAC;IAnCU,SAAS,CAAC,IAAa;QAC9B,IAAI,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAEO,8BAA8B,CAAC,IAAiC;QACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,SAAS,GAAa,EAAE,CAAC;QAE/B,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC9B,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBAC5B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;wBAChB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;oBACxC,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;iBAAM,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;gBAC3B,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;gBACpC,OAAO;YACT,CAAC;YAED,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;gBACrF,IAAI,CAAC,UAAU;qBACZ,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,CAAC;qBAC5D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;qBAClD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACzD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA1CD,wDA0CC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import * as ts from 'typescript';
|
|
9
|
+
import { Migration } from '../../update-tool/migration';
|
|
10
|
+
import { SymbolRemovalUpgradeData } from '../data';
|
|
11
|
+
import { UpgradeData } from '../upgrade-data';
|
|
12
|
+
/** Migration that flags imports for symbols that have been removed. */
|
|
13
|
+
export declare class SymbolRemovalMigration extends Migration<UpgradeData> {
|
|
14
|
+
/** Change data that upgrades to the specified target version. */
|
|
15
|
+
data: SymbolRemovalUpgradeData[];
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
visitNode(node: ts.Node): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SymbolRemovalMigration = void 0;
|
|
11
|
+
const ts = require("typescript");
|
|
12
|
+
const migration_1 = require("../../update-tool/migration");
|
|
13
|
+
const upgrade_data_1 = require("../upgrade-data");
|
|
14
|
+
/** Migration that flags imports for symbols that have been removed. */
|
|
15
|
+
class SymbolRemovalMigration extends migration_1.Migration {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
/** Change data that upgrades to the specified target version. */
|
|
19
|
+
this.data = (0, upgrade_data_1.getVersionUpgradeData)(this, 'symbolRemoval');
|
|
20
|
+
// Only enable the migration rule if there is upgrade data.
|
|
21
|
+
this.enabled = this.data.length !== 0;
|
|
22
|
+
}
|
|
23
|
+
visitNode(node) {
|
|
24
|
+
if (!ts.isImportDeclaration(node) || !ts.isStringLiteral(node.moduleSpecifier)) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const namedBindings = node.importClause && node.importClause.namedBindings;
|
|
28
|
+
if (!namedBindings || !ts.isNamedImports(namedBindings)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const moduleNameMatches = this.data.filter(entry => node.moduleSpecifier.text === entry.module);
|
|
32
|
+
if (!moduleNameMatches.length) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
namedBindings.elements.forEach(element => {
|
|
36
|
+
var _a;
|
|
37
|
+
const elementName = ((_a = element.propertyName) === null || _a === void 0 ? void 0 : _a.text) || element.name.text;
|
|
38
|
+
moduleNameMatches.forEach(match => {
|
|
39
|
+
if (match.name === elementName) {
|
|
40
|
+
this.createFailureAtNode(element, match.message);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.SymbolRemovalMigration = SymbolRemovalMigration;
|
|
47
|
+
//# sourceMappingURL=symbol-removal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol-removal.js","sourceRoot":"","sources":["symbol-removal.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AACjC,2DAAsD;AAEtD,kDAAmE;AAEnE,uEAAuE;AACvE,MAAa,sBAAuB,SAAQ,qBAAsB;IAAlE;;QACE,iEAAiE;QACjE,SAAI,GAA+B,IAAA,oCAAqB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAEhF,2DAA2D;QAC3D,YAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IA+BnC,CAAC;IA7BU,SAAS,CAAC,IAAa;QAC9B,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;YAC/E,OAAO;QACT,CAAC;QAED,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC;QAE3E,IAAI,CAAC,aAAa,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACxD,OAAO;QACT,CAAC;QAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CACxC,KAAK,CAAC,EAAE,CAAE,IAAI,CAAC,eAAoC,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,CAC1E,CAAC;QAEF,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;YAC9B,OAAO;QACT,CAAC;QAED,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;;YACvC,MAAM,WAAW,GAAG,CAAA,MAAA,OAAO,CAAC,YAAY,0CAAE,IAAI,KAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YAEpE,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBAChC,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;oBAC/B,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBACnD,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApCD,wDAoCC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
export * from './data/index';
|
|
9
|
+
export * from './devkit-migration';
|
|
10
|
+
export * from './devkit-migration-rule';
|
|
11
|
+
export * from './devkit-file-system';
|
|
12
|
+
export * from './html-parsing/angular';
|
|
13
|
+
export * from './html-parsing/elements';
|
|
14
|
+
export * from './typescript/base-types';
|
|
15
|
+
export * from './typescript/imports';
|
|
16
|
+
export * from './typescript/literal';
|
|
17
|
+
export * from './typescript/module-specifiers';
|
|
18
|
+
export * from './find-stylesheets';
|
|
19
|
+
export * from './upgrade-data';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
21
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
__exportStar(require("./data/index"), exports);
|
|
25
|
+
__exportStar(require("./devkit-migration"), exports);
|
|
26
|
+
__exportStar(require("./devkit-migration-rule"), exports);
|
|
27
|
+
__exportStar(require("./devkit-file-system"), exports);
|
|
28
|
+
__exportStar(require("./html-parsing/angular"), exports);
|
|
29
|
+
__exportStar(require("./html-parsing/elements"), exports);
|
|
30
|
+
__exportStar(require("./typescript/base-types"), exports);
|
|
31
|
+
__exportStar(require("./typescript/imports"), exports);
|
|
32
|
+
__exportStar(require("./typescript/literal"), exports);
|
|
33
|
+
__exportStar(require("./typescript/module-specifiers"), exports);
|
|
34
|
+
__exportStar(require("./find-stylesheets"), exports);
|
|
35
|
+
__exportStar(require("./upgrade-data"), exports);
|
|
36
|
+
//# sourceMappingURL=public-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["public-api.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;AAEH,+CAA6B;AAC7B,qDAAmC;AACnC,0DAAwC;AACxC,uDAAqC;AACrC,yDAAuC;AACvC,0DAAwC;AACxC,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,iEAA+C;AAC/C,qDAAmC;AACnC,iDAA+B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import * as ts from 'typescript';
|
|
9
|
+
/** Determines the base types of the specified class declaration. */
|
|
10
|
+
export declare function determineBaseTypes(node: ts.ClassDeclaration): string[] | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.determineBaseTypes = determineBaseTypes;
|
|
11
|
+
const ts = require("typescript");
|
|
12
|
+
/** Determines the base types of the specified class declaration. */
|
|
13
|
+
function determineBaseTypes(node) {
|
|
14
|
+
if (!node.heritageClauses) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return node.heritageClauses
|
|
18
|
+
.reduce((types, clause) => types.concat(clause.types), [])
|
|
19
|
+
.map(typeExpression => typeExpression.expression)
|
|
20
|
+
.filter(expression => expression && ts.isIdentifier(expression))
|
|
21
|
+
.map(identifier => identifier.text);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=base-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-types.js","sourceRoot":"","sources":["base-types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAKH,gDAUC;AAbD,iCAAiC;AAEjC,oEAAoE;AACpE,SAAgB,kBAAkB,CAAC,IAAyB;IAC1D,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,IAAI,CAAC,eAAe;SACxB,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAsC,CAAC;SAC7F,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;SAChD,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;SAC/D,GAAG,CAAC,UAAU,CAAC,EAAE,CAAE,UAA4B,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import * as ts from 'typescript';
|
|
9
|
+
/** Checks whether the given node is part of an import specifier node. */
|
|
10
|
+
export declare function isImportSpecifierNode(node: ts.Node): boolean;
|
|
11
|
+
/** Checks whether the given node is part of an export specifier node. */
|
|
12
|
+
export declare function isExportSpecifierNode(node: ts.Node): boolean;
|
|
13
|
+
/** Checks whether the given node is part of a namespace import. */
|
|
14
|
+
export declare function isNamespaceImportNode(node: ts.Node): boolean;
|
|
15
|
+
/** Finds the parent import declaration of a given TypeScript node. */
|
|
16
|
+
export declare function getImportDeclaration(node: ts.Node): ts.ImportDeclaration;
|
|
17
|
+
/** Finds the parent export declaration of a given TypeScript node */
|
|
18
|
+
export declare function getExportDeclaration(node: ts.Node): ts.ExportDeclaration;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.isImportSpecifierNode = isImportSpecifierNode;
|
|
11
|
+
exports.isExportSpecifierNode = isExportSpecifierNode;
|
|
12
|
+
exports.isNamespaceImportNode = isNamespaceImportNode;
|
|
13
|
+
exports.getImportDeclaration = getImportDeclaration;
|
|
14
|
+
exports.getExportDeclaration = getExportDeclaration;
|
|
15
|
+
const ts = require("typescript");
|
|
16
|
+
/** Checks whether the given node is part of an import specifier node. */
|
|
17
|
+
function isImportSpecifierNode(node) {
|
|
18
|
+
return isPartOfKind(node, ts.SyntaxKind.ImportSpecifier);
|
|
19
|
+
}
|
|
20
|
+
/** Checks whether the given node is part of an export specifier node. */
|
|
21
|
+
function isExportSpecifierNode(node) {
|
|
22
|
+
return isPartOfKind(node, ts.SyntaxKind.ExportSpecifier);
|
|
23
|
+
}
|
|
24
|
+
/** Checks whether the given node is part of a namespace import. */
|
|
25
|
+
function isNamespaceImportNode(node) {
|
|
26
|
+
return isPartOfKind(node, ts.SyntaxKind.NamespaceImport);
|
|
27
|
+
}
|
|
28
|
+
/** Finds the parent import declaration of a given TypeScript node. */
|
|
29
|
+
function getImportDeclaration(node) {
|
|
30
|
+
return findDeclaration(node, ts.SyntaxKind.ImportDeclaration);
|
|
31
|
+
}
|
|
32
|
+
/** Finds the parent export declaration of a given TypeScript node */
|
|
33
|
+
function getExportDeclaration(node) {
|
|
34
|
+
return findDeclaration(node, ts.SyntaxKind.ExportDeclaration);
|
|
35
|
+
}
|
|
36
|
+
/** Finds the specified declaration for the given node by walking up the TypeScript nodes. */
|
|
37
|
+
function findDeclaration(node, kind) {
|
|
38
|
+
while (node.kind !== kind) {
|
|
39
|
+
node = node.parent;
|
|
40
|
+
}
|
|
41
|
+
return node;
|
|
42
|
+
}
|
|
43
|
+
/** Checks whether the given node is part of another TypeScript Node with the specified kind. */
|
|
44
|
+
function isPartOfKind(node, kind) {
|
|
45
|
+
if (node.kind === kind) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
else if (node.kind === ts.SyntaxKind.SourceFile) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return isPartOfKind(node.parent, kind);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.js","sourceRoot":"","sources":["imports.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAKH,sDAEC;AAGD,sDAEC;AAGD,sDAEC;AAGD,oDAEC;AAGD,oDAEC;AAzBD,iCAAiC;AAEjC,yEAAyE;AACzE,SAAgB,qBAAqB,CAAC,IAAa;IACjD,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AAC3D,CAAC;AAED,yEAAyE;AACzE,SAAgB,qBAAqB,CAAC,IAAa;IACjD,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AAC3D,CAAC;AAED,mEAAmE;AACnE,SAAgB,qBAAqB,CAAC,IAAa;IACjD,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AAC3D,CAAC;AAED,sEAAsE;AACtE,SAAgB,oBAAoB,CAAC,IAAa;IAChD,OAAO,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAyB,CAAC;AACxF,CAAC;AAED,qEAAqE;AACrE,SAAgB,oBAAoB,CAAC,IAAa;IAChD,OAAO,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAyB,CAAC;AACxF,CAAC;AAED,6FAA6F;AAC7F,SAAS,eAAe,CAA0B,IAAa,EAAE,IAAO;IACtE,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;QAC1B,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,gGAAgG;AAChG,SAAS,YAAY,CAA0B,IAAa,EAAE,IAAO;IACnE,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;QAClD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import * as ts from 'typescript';
|
|
9
|
+
/** Finds all start indices of the given search string in the input string. */
|
|
10
|
+
export declare function findAllSubstringIndices(input: string, search: string): number[];
|
|
11
|
+
/**
|
|
12
|
+
* Checks whether the given node is either a string literal or a no-substitution template
|
|
13
|
+
* literal. Note that we cannot use `ts.isStringLiteralLike()` because if developers update
|
|
14
|
+
* an outdated project, their TypeScript version is not automatically being updated
|
|
15
|
+
* and therefore could throw because the function is not available yet.
|
|
16
|
+
* https://github.com/Microsoft/TypeScript/commit/8518343dc8762475a5e92c9f80b5c5725bd81796
|
|
17
|
+
*/
|
|
18
|
+
export declare function isStringLiteralLike(node: ts.Node): node is ts.StringLiteral | ts.NoSubstitutionTemplateLiteral;
|