@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,172 @@
|
|
|
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.UpdateProject = void 0;
|
|
11
|
+
const ts = require("typescript");
|
|
12
|
+
const component_resource_collector_1 = require("./component-resource-collector");
|
|
13
|
+
const logger_1 = require("./logger");
|
|
14
|
+
const parse_tsconfig_1 = require("./utils/parse-tsconfig");
|
|
15
|
+
const virtual_host_1 = require("./utils/virtual-host");
|
|
16
|
+
/**
|
|
17
|
+
* An update project that can be run against individual migrations. An update project
|
|
18
|
+
* accepts a TypeScript program and a context that is provided to all migrations. The
|
|
19
|
+
* context is usually not used by migrations, but in some cases migrations rely on
|
|
20
|
+
* specifics from the tool that performs the update (e.g. the Angular CLI). In those cases,
|
|
21
|
+
* the context can provide the necessary specifics to the migrations in a type-safe way.
|
|
22
|
+
*/
|
|
23
|
+
class UpdateProject {
|
|
24
|
+
constructor(
|
|
25
|
+
/** Context provided to all migrations. */
|
|
26
|
+
_context,
|
|
27
|
+
/** TypeScript program using workspace paths. */
|
|
28
|
+
_program,
|
|
29
|
+
/** File system used for reading, writing and editing files. */
|
|
30
|
+
_fileSystem,
|
|
31
|
+
/**
|
|
32
|
+
* Set of analyzed files. Used for avoiding multiple migration runs if
|
|
33
|
+
* files overlap between targets.
|
|
34
|
+
*/
|
|
35
|
+
_analyzedFiles = new Set(),
|
|
36
|
+
/** Logger used for printing messages. */
|
|
37
|
+
_logger = logger_1.defaultLogger) {
|
|
38
|
+
this._context = _context;
|
|
39
|
+
this._program = _program;
|
|
40
|
+
this._fileSystem = _fileSystem;
|
|
41
|
+
this._analyzedFiles = _analyzedFiles;
|
|
42
|
+
this._logger = _logger;
|
|
43
|
+
this._typeChecker = this._program.getTypeChecker();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Migrates the project to the specified target version.
|
|
47
|
+
* @param migrationTypes Migrations that should be run.
|
|
48
|
+
* @param target Version the project should be updated to. Can be `null` if the set of
|
|
49
|
+
* specified migrations runs regardless of a target version.
|
|
50
|
+
* @param data Upgrade data that is passed to all migration rules.
|
|
51
|
+
* @param additionalStylesheetPaths Additional stylesheets that should be migrated, if not
|
|
52
|
+
* referenced in an Angular component. This is helpful for global stylesheets in a project.
|
|
53
|
+
* @param limitToDirectory If specified, changes will be limited to the given directory.
|
|
54
|
+
*/
|
|
55
|
+
migrate(migrationTypes, target, data, additionalStylesheetPaths, limitToDirectory) {
|
|
56
|
+
limitToDirectory && (limitToDirectory = this._fileSystem.resolve(limitToDirectory));
|
|
57
|
+
// Create instances of the specified migrations.
|
|
58
|
+
const migrations = this._createMigrations(migrationTypes, target, data);
|
|
59
|
+
// Creates the component resource collector. The collector can visit arbitrary
|
|
60
|
+
// TypeScript nodes and will find Angular component resources. Resources include
|
|
61
|
+
// templates and stylesheets. It also captures inline stylesheets and templates.
|
|
62
|
+
const resourceCollector = new component_resource_collector_1.ComponentResourceCollector(this._typeChecker, this._fileSystem);
|
|
63
|
+
// Collect all of the TypeScript source files we want to migrate. We don't
|
|
64
|
+
// migrate type definition files, or source files from external libraries.
|
|
65
|
+
const sourceFiles = this._program.getSourceFiles().filter(f => {
|
|
66
|
+
return (!f.isDeclarationFile &&
|
|
67
|
+
(limitToDirectory == null ||
|
|
68
|
+
this._fileSystem.resolve(f.fileName).startsWith(limitToDirectory)) &&
|
|
69
|
+
!this._program.isSourceFileFromExternalLibrary(f));
|
|
70
|
+
});
|
|
71
|
+
// Helper function that visits a given TypeScript node and collects all referenced
|
|
72
|
+
// component resources (i.e. stylesheets or templates). Additionally, the helper
|
|
73
|
+
// visits the node in each instantiated migration.
|
|
74
|
+
const visitNodeAndCollectResources = (node) => {
|
|
75
|
+
migrations.forEach(r => r.visitNode(node));
|
|
76
|
+
ts.forEachChild(node, visitNodeAndCollectResources);
|
|
77
|
+
resourceCollector.visitNode(node);
|
|
78
|
+
};
|
|
79
|
+
// Walk through all source file, if it has not been visited before, and
|
|
80
|
+
// visit found nodes while collecting potential resources.
|
|
81
|
+
sourceFiles.forEach(sourceFile => {
|
|
82
|
+
const resolvedPath = this._fileSystem.resolve(sourceFile.fileName);
|
|
83
|
+
// Do not visit source files which have been checked as part of a
|
|
84
|
+
// previously migrated TypeScript project.
|
|
85
|
+
if (!this._analyzedFiles.has(resolvedPath)) {
|
|
86
|
+
visitNodeAndCollectResources(sourceFile);
|
|
87
|
+
this._analyzedFiles.add(resolvedPath);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
// Walk through all resolved templates and visit them in each instantiated
|
|
91
|
+
// migration. Note that this can only happen after source files have been
|
|
92
|
+
// visited because we find templates through the TypeScript source files.
|
|
93
|
+
resourceCollector.resolvedTemplates.forEach(template => {
|
|
94
|
+
// Do not visit the template if it has been checked before. Inline
|
|
95
|
+
// templates cannot be referenced multiple times.
|
|
96
|
+
if (template.inline || !this._analyzedFiles.has(template.filePath)) {
|
|
97
|
+
migrations.forEach(m => m.visitTemplate(template));
|
|
98
|
+
this._analyzedFiles.add(template.filePath);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
// Walk through all resolved stylesheets and visit them in each instantiated
|
|
102
|
+
// migration. Note that this can only happen after source files have been
|
|
103
|
+
// visited because we find stylesheets through the TypeScript source files.
|
|
104
|
+
resourceCollector.resolvedStylesheets.forEach(stylesheet => {
|
|
105
|
+
// Do not visit the stylesheet if it has been checked before. Inline
|
|
106
|
+
// stylesheets cannot be referenced multiple times.
|
|
107
|
+
if (stylesheet.inline || !this._analyzedFiles.has(stylesheet.filePath)) {
|
|
108
|
+
migrations.forEach(r => r.visitStylesheet(stylesheet));
|
|
109
|
+
this._analyzedFiles.add(stylesheet.filePath);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
// In some applications, developers will have global stylesheets which are not
|
|
113
|
+
// specified in any Angular component. Therefore we allow for additional stylesheets
|
|
114
|
+
// being specified. We visit them in each migration unless they have been already
|
|
115
|
+
// discovered before as actual component resource.
|
|
116
|
+
if (additionalStylesheetPaths) {
|
|
117
|
+
additionalStylesheetPaths.forEach(filePath => {
|
|
118
|
+
const resolvedPath = this._fileSystem.resolve(filePath);
|
|
119
|
+
if (limitToDirectory == null || resolvedPath.startsWith(limitToDirectory)) {
|
|
120
|
+
const stylesheet = resourceCollector.resolveExternalStylesheet(resolvedPath, null);
|
|
121
|
+
// Do not visit stylesheets which have been referenced from a component.
|
|
122
|
+
if (!this._analyzedFiles.has(resolvedPath) && stylesheet) {
|
|
123
|
+
migrations.forEach(r => r.visitStylesheet(stylesheet));
|
|
124
|
+
this._analyzedFiles.add(resolvedPath);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
// Call the "postAnalysis" method for each migration.
|
|
130
|
+
migrations.forEach(r => r.postAnalysis());
|
|
131
|
+
// Collect all failures reported by individual migrations.
|
|
132
|
+
const failures = migrations.reduce((res, m) => res.concat(m.failures), []);
|
|
133
|
+
// In case there are failures, print these to the CLI logger as warnings.
|
|
134
|
+
if (failures.length) {
|
|
135
|
+
failures.forEach(({ filePath, message, position }) => {
|
|
136
|
+
const lineAndCharacter = position ? `@${position.line + 1}:${position.character + 1}` : '';
|
|
137
|
+
this._logger.warn(`${filePath}${lineAndCharacter} - ${message}`);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
hasFailures: !!failures.length,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Creates instances of the given migrations with the specified target
|
|
146
|
+
* version and data.
|
|
147
|
+
*/
|
|
148
|
+
_createMigrations(types, target, data) {
|
|
149
|
+
const result = [];
|
|
150
|
+
for (const ctor of types) {
|
|
151
|
+
const instance = new ctor(this._program, this._typeChecker, target, this._context, data, this._fileSystem, this._logger);
|
|
152
|
+
instance.init();
|
|
153
|
+
if (instance.enabled) {
|
|
154
|
+
result.push(instance);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return result;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Creates a program from the specified tsconfig and patches the host
|
|
161
|
+
* to read files and directories through the given file system.
|
|
162
|
+
*
|
|
163
|
+
* @throws {TsconfigParseError} If the tsconfig could not be parsed.
|
|
164
|
+
*/
|
|
165
|
+
static createProgramFromTsconfig(tsconfigPath, fs) {
|
|
166
|
+
const parsed = (0, parse_tsconfig_1.parseTsconfigFile)(fs.resolve(tsconfigPath), fs);
|
|
167
|
+
const host = (0, virtual_host_1.createFileSystemCompilerHost)(parsed.options, fs);
|
|
168
|
+
return ts.createProgram(parsed.fileNames, parsed.options, host);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
exports.UpdateProject = UpdateProject;
|
|
172
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AAEjC,iFAA0E;AAE1E,qCAAqD;AAGrD,2DAAyD;AACzD,uDAAkE;AAElE;;;;;;GAMG;AACH,MAAa,aAAa;IAGxB;IACE,0CAA0C;IAClC,QAAiB;IACzB,gDAAgD;IACxC,QAAoB;IAC5B,+DAA+D;IACvD,WAAuB;IAC/B;;;OAGG;IACK,iBAAqC,IAAI,GAAG,EAAE;IACtD,yCAAyC;IACjC,UAAwB,sBAAa;QAXrC,aAAQ,GAAR,QAAQ,CAAS;QAEjB,aAAQ,GAAR,QAAQ,CAAY;QAEpB,gBAAW,GAAX,WAAW,CAAY;QAKvB,mBAAc,GAAd,cAAc,CAAgC;QAE9C,YAAO,GAAP,OAAO,CAA8B;QAE7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,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AAC;QAC9D,OAAO,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;CACF;AArLD,sCAqLC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 interface UpdateLogger {
|
|
9
|
+
debug(message: string): void;
|
|
10
|
+
error(message: string): void;
|
|
11
|
+
fatal(message: string): void;
|
|
12
|
+
info(message: string): void;
|
|
13
|
+
warn(message: string): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const defaultLogger: UpdateLogger;
|
|
@@ -0,0 +1,18 @@
|
|
|
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.defaultLogger = void 0;
|
|
11
|
+
exports.defaultLogger = {
|
|
12
|
+
debug: m => console.debug(m),
|
|
13
|
+
error: m => console.error(m),
|
|
14
|
+
fatal: m => console.error(m),
|
|
15
|
+
info: m => console.info(m),
|
|
16
|
+
warn: m => console.warn(m),
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["logger.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAUU,QAAA,aAAa,GAAiB;IACzC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import * as ts from 'typescript';
|
|
9
|
+
import { ResolvedResource } from './component-resource-collector';
|
|
10
|
+
import { FileSystem, WorkspacePath } from './file-system';
|
|
11
|
+
import { UpdateLogger } from './logger';
|
|
12
|
+
import { TargetVersion } from './target-version';
|
|
13
|
+
import { LineAndCharacter } from './utils/line-mappings';
|
|
14
|
+
export interface MigrationFailure {
|
|
15
|
+
filePath: WorkspacePath;
|
|
16
|
+
message: string;
|
|
17
|
+
position?: LineAndCharacter;
|
|
18
|
+
}
|
|
19
|
+
export type PostMigrationAction = void | {
|
|
20
|
+
/** Whether the package manager should run upon migration completion. */
|
|
21
|
+
runPackageManager: boolean;
|
|
22
|
+
};
|
|
23
|
+
/** Creates a constructor type for the specified type. */
|
|
24
|
+
export type Constructor<T> = new (...args: any[]) => T;
|
|
25
|
+
/** Gets a constructor type for the passed migration data. */
|
|
26
|
+
export type MigrationCtor<Data, Context = any> = Constructor<Migration<Data, Context>>;
|
|
27
|
+
export declare abstract class Migration<Data, Context = any> {
|
|
28
|
+
/** TypeScript program for the migration. */
|
|
29
|
+
program: ts.Program;
|
|
30
|
+
/** TypeChecker instance for the analysis program. */
|
|
31
|
+
typeChecker: ts.TypeChecker;
|
|
32
|
+
/**
|
|
33
|
+
* Version for which the migration rule should run. Null if the migration
|
|
34
|
+
* is invoked manually.
|
|
35
|
+
*/
|
|
36
|
+
targetVersion: TargetVersion | null;
|
|
37
|
+
/** Context data for the migration. */
|
|
38
|
+
context: Context;
|
|
39
|
+
/** Upgrade data passed to the migration. */
|
|
40
|
+
upgradeData: Data;
|
|
41
|
+
/** File system that can be used for modifying files. */
|
|
42
|
+
fileSystem: FileSystem;
|
|
43
|
+
/** Logger that can be used to print messages as part of the migration. */
|
|
44
|
+
logger: UpdateLogger;
|
|
45
|
+
/** List of migration failures that need to be reported. */
|
|
46
|
+
failures: MigrationFailure[];
|
|
47
|
+
/** Whether the migration is enabled or not. */
|
|
48
|
+
abstract enabled: boolean;
|
|
49
|
+
constructor(
|
|
50
|
+
/** TypeScript program for the migration. */
|
|
51
|
+
program: ts.Program,
|
|
52
|
+
/** TypeChecker instance for the analysis program. */
|
|
53
|
+
typeChecker: ts.TypeChecker,
|
|
54
|
+
/**
|
|
55
|
+
* Version for which the migration rule should run. Null if the migration
|
|
56
|
+
* is invoked manually.
|
|
57
|
+
*/
|
|
58
|
+
targetVersion: TargetVersion | null,
|
|
59
|
+
/** Context data for the migration. */
|
|
60
|
+
context: Context,
|
|
61
|
+
/** Upgrade data passed to the migration. */
|
|
62
|
+
upgradeData: Data,
|
|
63
|
+
/** File system that can be used for modifying files. */
|
|
64
|
+
fileSystem: FileSystem,
|
|
65
|
+
/** Logger that can be used to print messages as part of the migration. */
|
|
66
|
+
logger: UpdateLogger);
|
|
67
|
+
/** Method can be used to perform global analysis of the program. */
|
|
68
|
+
init(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Method that will be called once all nodes, templates and stylesheets
|
|
71
|
+
* have been visited.
|
|
72
|
+
*/
|
|
73
|
+
postAnalysis(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Method that will be called for each node in a given source file. Unlike tslint, this
|
|
76
|
+
* function will only retrieve TypeScript nodes that need to be casted manually. This
|
|
77
|
+
* allows us to only walk the program source files once per program and not per
|
|
78
|
+
* migration rule (significant performance boost).
|
|
79
|
+
*/
|
|
80
|
+
visitNode(node: ts.Node): void;
|
|
81
|
+
/** Method that will be called for each Angular template in the program. */
|
|
82
|
+
visitTemplate(template: ResolvedResource): void;
|
|
83
|
+
/** Method that will be called for each stylesheet in the program. */
|
|
84
|
+
visitStylesheet(stylesheet: ResolvedResource): void;
|
|
85
|
+
/** Creates a failure with a specified message at the given node location. */
|
|
86
|
+
protected createFailureAtNode(node: ts.Node, message: string): void;
|
|
87
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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.Migration = void 0;
|
|
11
|
+
const ts = require("typescript");
|
|
12
|
+
class Migration {
|
|
13
|
+
constructor(
|
|
14
|
+
/** TypeScript program for the migration. */
|
|
15
|
+
program,
|
|
16
|
+
/** TypeChecker instance for the analysis program. */
|
|
17
|
+
typeChecker,
|
|
18
|
+
/**
|
|
19
|
+
* Version for which the migration rule should run. Null if the migration
|
|
20
|
+
* is invoked manually.
|
|
21
|
+
*/
|
|
22
|
+
targetVersion,
|
|
23
|
+
/** Context data for the migration. */
|
|
24
|
+
context,
|
|
25
|
+
/** Upgrade data passed to the migration. */
|
|
26
|
+
upgradeData,
|
|
27
|
+
/** File system that can be used for modifying files. */
|
|
28
|
+
fileSystem,
|
|
29
|
+
/** Logger that can be used to print messages as part of the migration. */
|
|
30
|
+
logger) {
|
|
31
|
+
this.program = program;
|
|
32
|
+
this.typeChecker = typeChecker;
|
|
33
|
+
this.targetVersion = targetVersion;
|
|
34
|
+
this.context = context;
|
|
35
|
+
this.upgradeData = upgradeData;
|
|
36
|
+
this.fileSystem = fileSystem;
|
|
37
|
+
this.logger = logger;
|
|
38
|
+
/** List of migration failures that need to be reported. */
|
|
39
|
+
this.failures = [];
|
|
40
|
+
}
|
|
41
|
+
/** Method can be used to perform global analysis of the program. */
|
|
42
|
+
init() { }
|
|
43
|
+
/**
|
|
44
|
+
* Method that will be called once all nodes, templates and stylesheets
|
|
45
|
+
* have been visited.
|
|
46
|
+
*/
|
|
47
|
+
postAnalysis() { }
|
|
48
|
+
/**
|
|
49
|
+
* Method that will be called for each node in a given source file. Unlike tslint, this
|
|
50
|
+
* function will only retrieve TypeScript nodes that need to be casted manually. This
|
|
51
|
+
* allows us to only walk the program source files once per program and not per
|
|
52
|
+
* migration rule (significant performance boost).
|
|
53
|
+
*/
|
|
54
|
+
visitNode(node) { }
|
|
55
|
+
/** Method that will be called for each Angular template in the program. */
|
|
56
|
+
visitTemplate(template) { }
|
|
57
|
+
/** Method that will be called for each stylesheet in the program. */
|
|
58
|
+
visitStylesheet(stylesheet) { }
|
|
59
|
+
/** Creates a failure with a specified message at the given node location. */
|
|
60
|
+
createFailureAtNode(node, message) {
|
|
61
|
+
const sourceFile = node.getSourceFile();
|
|
62
|
+
this.failures.push({
|
|
63
|
+
filePath: this.fileSystem.resolve(sourceFile.fileName),
|
|
64
|
+
position: ts.getLineAndCharacterOfPosition(sourceFile, node.getStart()),
|
|
65
|
+
message: message,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.Migration = Migration;
|
|
70
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.js","sourceRoot":"","sources":["migration.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iCAAiC;AAuBjC,MAAsB,SAAS;IAO7B;IACE,4CAA4C;I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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 './component-resource-collector';
|
|
9
|
+
export * from './file-system';
|
|
10
|
+
export * from './index';
|
|
11
|
+
export * from './migration';
|
|
12
|
+
export * from './target-version';
|
|
13
|
+
export * from './utils/decorators';
|
|
14
|
+
export * from './utils/imports';
|
|
15
|
+
export * from './utils/property-name';
|
|
16
|
+
export * from './version-changes';
|
|
@@ -0,0 +1,33 @@
|
|
|
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("./component-resource-collector"), exports);
|
|
25
|
+
__exportStar(require("./file-system"), exports);
|
|
26
|
+
__exportStar(require("./index"), exports);
|
|
27
|
+
__exportStar(require("./migration"), exports);
|
|
28
|
+
__exportStar(require("./target-version"), exports);
|
|
29
|
+
__exportStar(require("./utils/decorators"), exports);
|
|
30
|
+
__exportStar(require("./utils/imports"), exports);
|
|
31
|
+
__exportStar(require("./utils/property-name"), exports);
|
|
32
|
+
__exportStar(require("./version-changes"), exports);
|
|
33
|
+
//# 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,iEAA+C;AAC/C,gDAA8B;AAC9B,0CAAwB;AACxB,8CAA4B;AAC5B,mDAAiC;AACjC,qDAAmC;AACnC,kDAAgC;AAChC,wDAAsC;AACtC,oDAAkC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
/** Possible versions that can be automatically migrated by `ng update`. */
|
|
9
|
+
export declare enum TargetVersion {
|
|
10
|
+
V20 = "version 20"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Returns all versions that are supported by "ng update". The versions are determined
|
|
14
|
+
* based on the "TargetVersion" enum.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getAllVersionNames(): string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
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.TargetVersion = void 0;
|
|
11
|
+
exports.getAllVersionNames = getAllVersionNames;
|
|
12
|
+
/** Possible versions that can be automatically migrated by `ng update`. */
|
|
13
|
+
// tslint:disable-next-line:prefer-const-enum
|
|
14
|
+
var TargetVersion;
|
|
15
|
+
(function (TargetVersion) {
|
|
16
|
+
TargetVersion["V20"] = "version 20";
|
|
17
|
+
})(TargetVersion || (exports.TargetVersion = TargetVersion = {}));
|
|
18
|
+
/**
|
|
19
|
+
* Returns all versions that are supported by "ng update". The versions are determined
|
|
20
|
+
* based on the "TargetVersion" enum.
|
|
21
|
+
*/
|
|
22
|
+
function getAllVersionNames() {
|
|
23
|
+
return Object.keys(TargetVersion).filter(enumValue => {
|
|
24
|
+
return typeof TargetVersion[enumValue] === 'string';
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=target-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-version.js","sourceRoot":"","sources":["target-version.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAaH,gDAIC;AAfD,2EAA2E;AAE3E,6CAA6C;AAC7C,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,mCAAkB,CAAA;AACpB,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED;;;GAGG;AACH,SAAgB,kBAAkB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;QACnD,OAAO,OAAQ,aAAoD,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC;IAC9F,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
/** Update recorder that can be used to apply changes to a source file. */
|
|
9
|
+
export interface UpdateRecorder {
|
|
10
|
+
insertLeft(index: number, content: string): UpdateRecorder;
|
|
11
|
+
insertRight(index: number, content: string): UpdateRecorder;
|
|
12
|
+
remove(index: number, length: number): UpdateRecorder;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
//# sourceMappingURL=update-recorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-recorder.js","sourceRoot":"","sources":["update-recorder.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -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 { Import } from './imports';
|
|
10
|
+
export type CallExpressionDecorator = ts.Decorator & {
|
|
11
|
+
expression: ts.CallExpression;
|
|
12
|
+
};
|
|
13
|
+
export interface NgDecorator {
|
|
14
|
+
name: string;
|
|
15
|
+
node: CallExpressionDecorator;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Gets all decorators which are imported from an Angular package
|
|
19
|
+
* (e.g. "@angular/core") from a list of decorators.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAngularDecorators(typeChecker: ts.TypeChecker, decorators: readonly ts.Decorator[]): readonly NgDecorator[];
|
|
22
|
+
export declare function getCallDecoratorImport(typeChecker: ts.TypeChecker, decorator: ts.Decorator): Import | null;
|
|
@@ -0,0 +1,41 @@
|
|
|
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.getAngularDecorators = getAngularDecorators;
|
|
11
|
+
exports.getCallDecoratorImport = getCallDecoratorImport;
|
|
12
|
+
const ts = require("typescript");
|
|
13
|
+
const imports_1 = require("./imports");
|
|
14
|
+
/**
|
|
15
|
+
* Gets all decorators which are imported from an Angular package
|
|
16
|
+
* (e.g. "@angular/core") from a list of decorators.
|
|
17
|
+
*/
|
|
18
|
+
function getAngularDecorators(typeChecker, decorators) {
|
|
19
|
+
return decorators
|
|
20
|
+
.map(node => ({ node, importData: getCallDecoratorImport(typeChecker, node) }))
|
|
21
|
+
.filter(({ importData }) => importData && importData.moduleName.startsWith('@angular/'))
|
|
22
|
+
.map(({ node, importData }) => ({
|
|
23
|
+
node: node,
|
|
24
|
+
name: importData.symbolName,
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
function getCallDecoratorImport(typeChecker, decorator) {
|
|
28
|
+
if (!ts.isCallExpression(decorator.expression)) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const valueExpr = decorator.expression.expression;
|
|
32
|
+
let identifier = null;
|
|
33
|
+
if (ts.isIdentifier(valueExpr)) {
|
|
34
|
+
identifier = valueExpr;
|
|
35
|
+
}
|
|
36
|
+
else if (ts.isPropertyAccessExpression(valueExpr) && ts.isIdentifier(valueExpr.name)) {
|
|
37
|
+
identifier = valueExpr.name;
|
|
38
|
+
}
|
|
39
|
+
return identifier ? (0, imports_1.getImportOfIdentifier)(identifier, typeChecker) : null;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=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B,CAAC;IACD,OAAO,UAAU,CAAC,CAAC,CAAC,IAAA,+BAAqB,EAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { FileSystem } from '../file-system';
|
|
10
|
+
/** Formats the specified diagnostics with respect to the given file system. */
|
|
11
|
+
export declare function formatDiagnostics(diagnostics: ts.Diagnostic[], fileSystem: FileSystem): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
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.formatDiagnostics = formatDiagnostics;
|
|
11
|
+
const ts = require("typescript");
|
|
12
|
+
const virtual_host_1 = require("./virtual-host");
|
|
13
|
+
/** Formats the specified diagnostics with respect to the given file system. */
|
|
14
|
+
function formatDiagnostics(diagnostics, fileSystem) {
|
|
15
|
+
const formatHost = (0, virtual_host_1.createFormatDiagnosticHost)(fileSystem);
|
|
16
|
+
return ts.formatDiagnosticsWithColorAndContext(diagnostics, formatHost);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["diagnostics.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAOH,8CAGC;AARD,iCAAiC;AAEjC,iDAA0D;AAE1D,+EAA+E;AAC/E,SAAgB,iBAAiB,CAAC,WAA4B,EAAE,UAAsB;IACpF,MAAM,UAAU,GAAG,IAAA,yCAA0B,EAAC,UAAU,CAAC,CAAC;IAC1D,OAAO,EAAE,CAAC,oCAAoC,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Unwraps a given expression TypeScript node. Expressions can be wrapped within multiple
|
|
11
|
+
* parentheses. e.g. "(((({exp}))))()". The function should return the TypeScript node
|
|
12
|
+
* referring to the inner expression. e.g "exp".
|
|
13
|
+
*/
|
|
14
|
+
export declare function unwrapExpression(node: ts.Expression | ts.ParenthesizedExpression): ts.Expression;
|