@angular/cdk 8.0.0-rc.2 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/typings/aria-describer/aria-describer.d.ts +4 -3
- package/a11y/typings/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +42 -10
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +532 -87
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +5 -1
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +31 -23
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +6 -7
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +8 -6
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/drag-drop/typings/directives/drag.d.ts +1 -1
- package/drag-drop/typings/directives/drop-list.d.ts +2 -0
- package/drag-drop/typings/drag-drop-registry.d.ts +2 -0
- package/drag-drop/typings/drag-ref.d.ts +10 -1
- package/drag-drop/typings/drop-list-ref.d.ts +59 -3
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +35 -10
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/drag-drop.js +467 -85
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/layout.js +7 -3
- package/esm2015/layout.js.map +1 -1
- package/esm2015/overlay.js +31 -23
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/scrolling.js +6 -7
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/tree.js +7 -6
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +42 -10
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/cdk.es5.js +1 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +530 -85
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/layout.es5.js +7 -3
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/overlay.es5.js +32 -24
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +6 -7
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/tree.es5.js +8 -6
- package/esm5/tree.es5.js.map +1 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-ref.d.ts +1 -0
- package/package.json +4 -4
- package/schematics/index.d.ts +1 -0
- package/schematics/index.js +1 -0
- package/schematics/index.js.map +1 -1
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.spec.ts → __name@dasherize__.component.spec.ts.template} +0 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +0 -0
- package/schematics/ng-generate/drag-drop/index.js +2 -2
- package/schematics/ng-generate/drag-drop/index.js.map +1 -1
- package/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
- package/schematics/ng-update/data/attribute-selectors.js +5 -13
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.d.ts +1 -1
- package/schematics/ng-update/data/class-names.js +5 -21
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
- package/schematics/ng-update/data/constructor-checks.js +3 -5
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/css-selectors.d.ts +1 -1
- package/schematics/ng-update/data/css-selectors.js +1 -1
- package/schematics/ng-update/data/css-selectors.js.map +1 -1
- package/schematics/ng-update/data/element-selectors.d.ts +1 -1
- package/schematics/ng-update/data/element-selectors.js +1 -1
- package/schematics/ng-update/data/element-selectors.js.map +1 -1
- package/schematics/ng-update/data/input-names.d.ts +1 -1
- package/schematics/ng-update/data/input-names.js +13 -37
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.d.ts +1 -1
- package/schematics/ng-update/data/method-call-checks.js +6 -15
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/output-names.d.ts +1 -1
- package/schematics/ng-update/data/output-names.js +1 -1
- package/schematics/ng-update/data/output-names.js.map +1 -1
- package/schematics/ng-update/data/property-names.d.ts +1 -1
- package/schematics/ng-update/data/property-names.js +19 -59
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/html-parsing/elements.js.map +1 -1
- package/schematics/ng-update/index.d.ts +0 -2
- package/schematics/ng-update/index.js +13 -24
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/public-api.d.ts +0 -5
- package/schematics/ng-update/public-api.js +0 -5
- package/schematics/ng-update/public-api.js.map +1 -1
- package/schematics/ng-update/typescript/base-types.js.map +1 -1
- package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
- package/schematics/ng-update/upgrade-data.d.ts +5 -30
- package/schematics/ng-update/upgrade-data.js +4 -34
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js +66 -0
- package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
- package/schematics/ng-update/upgrade-rules/{class-inheritance/classInheritanceCheckRule.js → class-inheritance-rule.js} +24 -20
- package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js.map +1 -0
- package/{typings/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
- package/schematics/ng-update/upgrade-rules/{class-names/classNamesIdentifierRule.js → class-names-rule.js} +19 -24
- package/schematics/ng-update/upgrade-rules/class-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js +134 -0
- package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.js +73 -0
- package/schematics/ng-update/upgrade-rules/css-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.js +64 -0
- package/schematics/ng-update/upgrade-rules/element-selectors-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
- package/schematics/ng-update/upgrade-rules/index.js +49 -29
- package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
- package/schematics/ng-update/upgrade-rules/input-names-rule.js +59 -0
- package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/{signature-check/methodCallsCheckRule.d.ts → method-call-arguments-rule.d.ts} +8 -9
- package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js +60 -0
- package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js +37 -0
- package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.js +46 -0
- package/schematics/ng-update/upgrade-rules/output-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.js +46 -0
- package/schematics/ng-update/upgrade-rules/property-names-rule.js.map +1 -0
- package/schematics/tsconfig.tsbuildinfo +2896 -3609
- package/schematics/update-tool/component-resource-collector.d.ts +41 -0
- package/schematics/update-tool/component-resource-collector.js +141 -0
- package/schematics/update-tool/component-resource-collector.js.map +1 -0
- package/schematics/update-tool/index.d.ts +13 -0
- package/schematics/update-tool/index.js +117 -0
- package/schematics/update-tool/index.js.map +1 -0
- package/schematics/update-tool/migration-rule.d.ts +45 -0
- package/schematics/update-tool/migration-rule.js +50 -0
- package/schematics/update-tool/migration-rule.js.map +1 -0
- package/schematics/update-tool/public-api.d.ts +12 -0
- package/schematics/update-tool/public-api.js +18 -0
- package/schematics/update-tool/public-api.js.map +1 -0
- package/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
- package/schematics/{ng-update → update-tool}/target-version.js +3 -3
- package/schematics/update-tool/target-version.js.map +1 -0
- package/schematics/update-tool/utils/decorators.d.ts +23 -0
- package/schematics/update-tool/utils/decorators.js +37 -0
- package/schematics/update-tool/utils/decorators.js.map +1 -0
- package/schematics/update-tool/utils/functions.d.ts +14 -0
- package/schematics/update-tool/utils/functions.js +20 -0
- package/schematics/update-tool/utils/functions.js.map +1 -0
- package/schematics/update-tool/utils/imports.d.ts +15 -0
- package/schematics/update-tool/utils/imports.js +35 -0
- package/schematics/update-tool/utils/imports.js.map +1 -0
- package/schematics/update-tool/utils/line-mappings.d.ts +21 -0
- package/schematics/update-tool/utils/line-mappings.js +75 -0
- package/schematics/update-tool/utils/line-mappings.js.map +1 -0
- package/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
- package/schematics/update-tool/utils/parse-tsconfig.js +22 -0
- package/schematics/update-tool/utils/parse-tsconfig.js.map +1 -0
- package/schematics/update-tool/utils/property-name.d.ts +18 -0
- package/schematics/update-tool/utils/property-name.js +27 -0
- package/schematics/update-tool/utils/property-name.js.map +1 -0
- package/schematics/update-tool/version-changes.d.ts +32 -0
- package/schematics/update-tool/version-changes.js +41 -0
- package/schematics/update-tool/version-changes.js.map +1 -0
- package/schematics/utils/build-component.js +4 -4
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
- package/schematics/utils/project-tsconfig-paths.js +77 -0
- package/schematics/utils/project-tsconfig-paths.js.map +1 -0
- package/typings/a11y/aria-describer/aria-describer.d.ts +4 -3
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/drag-drop/directives/drag.d.ts +1 -1
- package/typings/drag-drop/directives/drop-list.d.ts +2 -0
- package/typings/drag-drop/drag-drop-registry.d.ts +2 -0
- package/typings/drag-drop/drag-ref.d.ts +10 -1
- package/typings/drag-drop/drop-list-ref.d.ts +59 -3
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +4 -3
- package/typings/esm5/a11y/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +1 -1
- package/typings/esm5/drag-drop/directives/drop-list.d.ts +2 -0
- package/typings/esm5/drag-drop/drag-drop-registry.d.ts +2 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +10 -1
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +59 -3
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-ref.d.ts +1 -0
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-ref.d.ts +1 -0
- package/typings/schematics/index.d.ts +1 -0
- package/typings/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/class-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/constructor-checks.d.ts +1 -1
- package/typings/schematics/ng-update/data/css-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/element-selectors.d.ts +1 -1
- package/typings/schematics/ng-update/data/input-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/method-call-checks.d.ts +1 -1
- package/typings/schematics/ng-update/data/output-names.d.ts +1 -1
- package/typings/schematics/ng-update/data/property-names.d.ts +1 -1
- package/typings/schematics/ng-update/index.d.ts +0 -2
- package/typings/schematics/ng-update/public-api.d.ts +0 -5
- package/typings/schematics/ng-update/upgrade-data.d.ts +5 -30
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
- package/{schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → typings/schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
- package/typings/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
- package/typings/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
- package/typings/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
- package/typings/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
- package/typings/schematics/ng-update/upgrade-rules/{signature-check/methodCallsCheckRule.d.ts → method-call-arguments-rule.d.ts} +8 -9
- package/typings/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
- package/typings/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
- package/typings/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
- package/typings/schematics/update-tool/component-resource-collector.d.ts +41 -0
- package/typings/schematics/update-tool/index.d.ts +13 -0
- package/typings/schematics/update-tool/migration-rule.d.ts +45 -0
- package/typings/schematics/update-tool/public-api.d.ts +12 -0
- package/typings/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
- package/typings/schematics/update-tool/utils/decorators.d.ts +23 -0
- package/typings/schematics/update-tool/utils/functions.d.ts +14 -0
- package/typings/schematics/update-tool/utils/imports.d.ts +15 -0
- package/typings/schematics/update-tool/utils/line-mappings.d.ts +21 -0
- package/typings/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
- package/typings/schematics/update-tool/utils/property-name.d.ts +18 -0
- package/typings/schematics/update-tool/version-changes.d.ts +32 -0
- package/typings/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
- package/schematics/ng-update/target-version.js.map +0 -1
- package/schematics/ng-update/tslint/component-file.d.ts +0 -14
- package/schematics/ng-update/tslint/component-file.js +0 -31
- package/schematics/ng-update/tslint/component-file.js.map +0 -1
- package/schematics/ng-update/tslint/component-walker.d.ts +0 -47
- package/schematics/ng-update/tslint/component-walker.js +0 -142
- package/schematics/ng-update/tslint/component-walker.js.map +0 -1
- package/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
- package/schematics/ng-update/tslint/external-failure-walker.js +0 -38
- package/schematics/ng-update/tslint/external-failure-walker.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js +0 -49
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js +0 -62
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js +0 -59
- package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
- package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js +0 -53
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js +0 -63
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js +0 -62
- package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js +0 -50
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js +0 -60
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js +0 -59
- package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js +0 -49
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js +0 -67
- package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js +0 -64
- package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js +0 -46
- package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +0 -132
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js +0 -58
- package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
- package/schematics/ng-update/upgrade-rules/tslint-config.js +0 -76
- package/schematics/ng-update/upgrade-rules/tslint-config.js.map +0 -1
- package/typings/schematics/ng-update/tslint/component-file.d.ts +0 -14
- package/typings/schematics/ng-update/tslint/component-walker.d.ts +0 -47
- package/typings/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
- package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
- package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
- package/typings/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
- package/typings/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
- package/typings/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
- package/typings/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
package/esm2015/drag-drop.js
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
|
|
9
9
|
import { coerceBooleanProperty, coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';
|
|
10
|
-
import { Subscription, Subject, Observable, merge } from 'rxjs';
|
|
10
|
+
import { Subscription, Subject, interval, animationFrameScheduler, Observable, merge } from 'rxjs';
|
|
11
|
+
import { startWith, takeUntil, take, map, switchMap, tap } from 'rxjs/operators';
|
|
11
12
|
import { ElementRef, Injectable, NgZone, Inject, InjectionToken, NgModule, ContentChildren, EventEmitter, forwardRef, Input, Output, Optional, Directive, ChangeDetectorRef, SkipSelf, ContentChild, ViewContainerRef, isDevMode, TemplateRef, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
|
|
12
13
|
import { DOCUMENT } from '@angular/common';
|
|
13
14
|
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
14
15
|
import { Directionality } from '@angular/cdk/bidi';
|
|
15
|
-
import { startWith, take, map, takeUntil, switchMap, tap } from 'rxjs/operators';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @fileoverview added by tsickle
|
|
@@ -182,6 +182,10 @@ class DragRef {
|
|
|
182
182
|
* Subscription to the event that is dispatched when the user lifts their pointer.
|
|
183
183
|
*/
|
|
184
184
|
this._pointerUpSubscription = Subscription.EMPTY;
|
|
185
|
+
/**
|
|
186
|
+
* Subscription to the viewport being scrolled.
|
|
187
|
+
*/
|
|
188
|
+
this._scrollSubscription = Subscription.EMPTY;
|
|
185
189
|
/**
|
|
186
190
|
* Cached reference to the boundary element.
|
|
187
191
|
*/
|
|
@@ -291,12 +295,23 @@ class DragRef {
|
|
|
291
295
|
// direction. Note that this is preferrable over doing something like `skip(minimumDistance)`
|
|
292
296
|
// in the `pointerMove` subscription, because we're not guaranteed to have one move event
|
|
293
297
|
// per pixel of movement (e.g. if the user moves their pointer quickly).
|
|
294
|
-
if (isOverThreshold
|
|
295
|
-
|
|
296
|
-
this.
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
if (isOverThreshold) {
|
|
299
|
+
/** @type {?} */
|
|
300
|
+
const isDelayElapsed = Date.now() >= this._dragStartTime + (this.dragStartDelay || 0);
|
|
301
|
+
if (!isDelayElapsed) {
|
|
302
|
+
this._endDragSequence(event);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
// Prevent other drag sequences from starting while something in the container is still
|
|
306
|
+
// being dragged. This can happen while we're waiting for the drop animation to finish
|
|
307
|
+
// and can cause errors, because some elements might still be moving around.
|
|
308
|
+
if (!this._dropContainer || !this._dropContainer.isDragging()) {
|
|
309
|
+
this._hasStartedDragging = true;
|
|
310
|
+
this._ngZone.run((/**
|
|
311
|
+
* @return {?}
|
|
312
|
+
*/
|
|
313
|
+
() => this._startDragSequence(event)));
|
|
314
|
+
}
|
|
300
315
|
}
|
|
301
316
|
return;
|
|
302
317
|
}
|
|
@@ -357,47 +372,7 @@ class DragRef {
|
|
|
357
372
|
* @return {?}
|
|
358
373
|
*/
|
|
359
374
|
(event) => {
|
|
360
|
-
|
|
361
|
-
// The difference is that the one from the service reflects whether a dragging sequence
|
|
362
|
-
// has been initiated, whereas the one on `this` includes whether the user has passed
|
|
363
|
-
// the minimum dragging threshold.
|
|
364
|
-
if (!this._dragDropRegistry.isDragging(this)) {
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
this._removeSubscriptions();
|
|
368
|
-
this._dragDropRegistry.stopDragging(this);
|
|
369
|
-
if (this._handles) {
|
|
370
|
-
this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;
|
|
371
|
-
}
|
|
372
|
-
if (!this._hasStartedDragging) {
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
this.released.next({ source: this });
|
|
376
|
-
if (!this._dropContainer) {
|
|
377
|
-
// Convert the active transform into a passive one. This means that next time
|
|
378
|
-
// the user starts dragging the item, its position will be calculated relatively
|
|
379
|
-
// to the new passive transform.
|
|
380
|
-
this._passiveTransform.x = this._activeTransform.x;
|
|
381
|
-
this._passiveTransform.y = this._activeTransform.y;
|
|
382
|
-
this._ngZone.run((/**
|
|
383
|
-
* @return {?}
|
|
384
|
-
*/
|
|
385
|
-
() => {
|
|
386
|
-
this.ended.next({
|
|
387
|
-
source: this,
|
|
388
|
-
distance: this._getDragDistance(this._getPointerPositionOnPage(event))
|
|
389
|
-
});
|
|
390
|
-
}));
|
|
391
|
-
this._dragDropRegistry.stopDragging(this);
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
this._animatePreviewToPlaceholder().then((/**
|
|
395
|
-
* @return {?}
|
|
396
|
-
*/
|
|
397
|
-
() => {
|
|
398
|
-
this._cleanupDragArtifacts(event);
|
|
399
|
-
this._dragDropRegistry.stopDragging(this);
|
|
400
|
-
}));
|
|
375
|
+
this._endDragSequence(event);
|
|
401
376
|
});
|
|
402
377
|
this.withRootElement(element);
|
|
403
378
|
_dragDropRegistry.registerDragItem(this);
|
|
@@ -602,7 +577,9 @@ class DragRef {
|
|
|
602
577
|
* @return {?}
|
|
603
578
|
*/
|
|
604
579
|
getFreeDragPosition() {
|
|
605
|
-
|
|
580
|
+
/** @type {?} */
|
|
581
|
+
const position = this.isDragging() ? this._activeTransform : this._passiveTransform;
|
|
582
|
+
return { x: position.x, y: position.y };
|
|
606
583
|
}
|
|
607
584
|
/**
|
|
608
585
|
* Sets the current position in pixels the draggable outside of a drop container.
|
|
@@ -620,6 +597,17 @@ class DragRef {
|
|
|
620
597
|
}
|
|
621
598
|
return (/** @type {?} */ (this));
|
|
622
599
|
}
|
|
600
|
+
/**
|
|
601
|
+
* Updates the item's sort order based on the last-known pointer position.
|
|
602
|
+
* @return {?}
|
|
603
|
+
*/
|
|
604
|
+
_sortFromLastPointerPosition() {
|
|
605
|
+
/** @type {?} */
|
|
606
|
+
const position = this._pointerPositionAtLastDirectionChange;
|
|
607
|
+
if (position && this._dropContainer) {
|
|
608
|
+
this._updateActiveDropContainer(position);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
623
611
|
/**
|
|
624
612
|
* Unsubscribes from the global subscriptions.
|
|
625
613
|
* @private
|
|
@@ -628,6 +616,7 @@ class DragRef {
|
|
|
628
616
|
_removeSubscriptions() {
|
|
629
617
|
this._pointerMoveSubscription.unsubscribe();
|
|
630
618
|
this._pointerUpSubscription.unsubscribe();
|
|
619
|
+
this._scrollSubscription.unsubscribe();
|
|
631
620
|
}
|
|
632
621
|
/**
|
|
633
622
|
* Destroys the preview element and its ViewRef.
|
|
@@ -657,6 +646,58 @@ class DragRef {
|
|
|
657
646
|
}
|
|
658
647
|
this._placeholder = this._placeholderRef = (/** @type {?} */ (null));
|
|
659
648
|
}
|
|
649
|
+
/**
|
|
650
|
+
* Clears subscriptions and stops the dragging sequence.
|
|
651
|
+
* @private
|
|
652
|
+
* @param {?} event Browser event object that ended the sequence.
|
|
653
|
+
* @return {?}
|
|
654
|
+
*/
|
|
655
|
+
_endDragSequence(event) {
|
|
656
|
+
// Note that here we use `isDragging` from the service, rather than from `this`.
|
|
657
|
+
// The difference is that the one from the service reflects whether a dragging sequence
|
|
658
|
+
// has been initiated, whereas the one on `this` includes whether the user has passed
|
|
659
|
+
// the minimum dragging threshold.
|
|
660
|
+
if (!this._dragDropRegistry.isDragging(this)) {
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
this._removeSubscriptions();
|
|
664
|
+
this._dragDropRegistry.stopDragging(this);
|
|
665
|
+
if (this._handles) {
|
|
666
|
+
this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;
|
|
667
|
+
}
|
|
668
|
+
if (!this._hasStartedDragging) {
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
this.released.next({ source: this });
|
|
672
|
+
if (this._dropContainer) {
|
|
673
|
+
// Stop scrolling immediately, instead of waiting for the animation to finish.
|
|
674
|
+
this._dropContainer._stopScrolling();
|
|
675
|
+
this._animatePreviewToPlaceholder().then((/**
|
|
676
|
+
* @return {?}
|
|
677
|
+
*/
|
|
678
|
+
() => {
|
|
679
|
+
this._cleanupDragArtifacts(event);
|
|
680
|
+
this._dragDropRegistry.stopDragging(this);
|
|
681
|
+
}));
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
// Convert the active transform into a passive one. This means that next time
|
|
685
|
+
// the user starts dragging the item, its position will be calculated relatively
|
|
686
|
+
// to the new passive transform.
|
|
687
|
+
this._passiveTransform.x = this._activeTransform.x;
|
|
688
|
+
this._passiveTransform.y = this._activeTransform.y;
|
|
689
|
+
this._ngZone.run((/**
|
|
690
|
+
* @return {?}
|
|
691
|
+
*/
|
|
692
|
+
() => {
|
|
693
|
+
this.ended.next({
|
|
694
|
+
source: this,
|
|
695
|
+
distance: this._getDragDistance(this._getPointerPositionOnPage(event))
|
|
696
|
+
});
|
|
697
|
+
}));
|
|
698
|
+
this._dragDropRegistry.stopDragging(this);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
660
701
|
/**
|
|
661
702
|
* Starts the dragging sequence.
|
|
662
703
|
* @private
|
|
@@ -669,6 +710,7 @@ class DragRef {
|
|
|
669
710
|
if (isTouchEvent(event)) {
|
|
670
711
|
this._lastTouchEventTime = Date.now();
|
|
671
712
|
}
|
|
713
|
+
this._toggleNativeDragInteractions();
|
|
672
714
|
if (this._dropContainer) {
|
|
673
715
|
/** @type {?} */
|
|
674
716
|
const element = this._rootElement;
|
|
@@ -732,12 +774,19 @@ class DragRef {
|
|
|
732
774
|
this._rootElementTapHighlight = rootElement.style.webkitTapHighlightColor;
|
|
733
775
|
rootElement.style.webkitTapHighlightColor = 'transparent';
|
|
734
776
|
}
|
|
735
|
-
this._toggleNativeDragInteractions();
|
|
736
777
|
this._hasStartedDragging = this._hasMoved = false;
|
|
737
778
|
this._initialContainer = (/** @type {?} */ (this._dropContainer));
|
|
779
|
+
// Avoid multiple subscriptions and memory leaks when multi touch
|
|
780
|
+
// (isDragging check above isn't enough because of possible temporal and/or dimensional delays)
|
|
781
|
+
this._removeSubscriptions();
|
|
738
782
|
this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);
|
|
739
783
|
this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);
|
|
740
|
-
this.
|
|
784
|
+
this._scrollSubscription = this._dragDropRegistry.scroll.pipe(startWith(null)).subscribe((/**
|
|
785
|
+
* @return {?}
|
|
786
|
+
*/
|
|
787
|
+
() => {
|
|
788
|
+
this._scrollPosition = this._viewportRuler.getViewportScrollPosition();
|
|
789
|
+
}));
|
|
741
790
|
if (this._boundaryElement) {
|
|
742
791
|
this._boundaryRect = this._boundaryElement.getBoundingClientRect();
|
|
743
792
|
}
|
|
@@ -840,6 +889,7 @@ class DragRef {
|
|
|
840
889
|
});
|
|
841
890
|
}));
|
|
842
891
|
}
|
|
892
|
+
(/** @type {?} */ (this._dropContainer))._startScrollingIfNecessary(x, y);
|
|
843
893
|
(/** @type {?} */ (this._dropContainer))._sortItem(this, x, y, this._pointerDirectionDelta);
|
|
844
894
|
this._preview.style.transform =
|
|
845
895
|
getTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);
|
|
@@ -1016,7 +1066,7 @@ class DragRef {
|
|
|
1016
1066
|
/** @type {?} */
|
|
1017
1067
|
const point = this._getPointerPositionOnPage(event);
|
|
1018
1068
|
/** @type {?} */
|
|
1019
|
-
const constrainedPoint = this.constrainPosition ? this.constrainPosition(point) : point;
|
|
1069
|
+
const constrainedPoint = this.constrainPosition ? this.constrainPosition(point, this) : point;
|
|
1020
1070
|
/** @type {?} */
|
|
1021
1071
|
const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;
|
|
1022
1072
|
if (this.lockAxis === 'x' || dropContainerLock === 'x') {
|
|
@@ -1085,7 +1135,7 @@ class DragRef {
|
|
|
1085
1135
|
return;
|
|
1086
1136
|
}
|
|
1087
1137
|
/** @type {?} */
|
|
1088
|
-
const shouldEnable = this.
|
|
1138
|
+
const shouldEnable = this._handles.length > 0 || !this.isDragging();
|
|
1089
1139
|
if (shouldEnable !== this._nativeInteractionsEnabled) {
|
|
1090
1140
|
this._nativeInteractionsEnabled = shouldEnable;
|
|
1091
1141
|
toggleNativeDragInteractions(this._rootElement, shouldEnable);
|
|
@@ -1206,7 +1256,10 @@ function removeElement(element) {
|
|
|
1206
1256
|
* @return {?}
|
|
1207
1257
|
*/
|
|
1208
1258
|
function isTouchEvent(event) {
|
|
1209
|
-
|
|
1259
|
+
// This function is called for every pixel that the user has dragged so we need it to be
|
|
1260
|
+
// as fast as possible. Since we only bind mouse events and touch events, we can assume
|
|
1261
|
+
// that if the event's name starts with `t`, it's a touch event.
|
|
1262
|
+
return event.type[0] === 't';
|
|
1210
1263
|
}
|
|
1211
1264
|
/**
|
|
1212
1265
|
* Gets the element into which the drag preview should be inserted.
|
|
@@ -1315,6 +1368,18 @@ let _uniqueIdCounter = 0;
|
|
|
1315
1368
|
* @type {?}
|
|
1316
1369
|
*/
|
|
1317
1370
|
const DROP_PROXIMITY_THRESHOLD = 0.05;
|
|
1371
|
+
/**
|
|
1372
|
+
* Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the
|
|
1373
|
+
* viewport. The value comes from trying it out manually until it feels right.
|
|
1374
|
+
* @type {?}
|
|
1375
|
+
*/
|
|
1376
|
+
const SCROLL_PROXIMITY_THRESHOLD = 0.05;
|
|
1377
|
+
/**
|
|
1378
|
+
* Number of pixels to scroll for each frame when auto-scrolling an element.
|
|
1379
|
+
* The value comes from trying it out manually until it feels right.
|
|
1380
|
+
* @type {?}
|
|
1381
|
+
*/
|
|
1382
|
+
const AUTO_SCROLL_STEP = 2;
|
|
1318
1383
|
/**
|
|
1319
1384
|
* Reference to a drop list. Used to manipulate or dispose of the container.
|
|
1320
1385
|
* \@docs-private
|
|
@@ -1325,9 +1390,13 @@ class DropListRef {
|
|
|
1325
1390
|
* @param {?} element
|
|
1326
1391
|
* @param {?} _dragDropRegistry
|
|
1327
1392
|
* @param {?} _document
|
|
1393
|
+
* @param {?=} _ngZone
|
|
1394
|
+
* @param {?=} _viewportRuler
|
|
1328
1395
|
*/
|
|
1329
|
-
constructor(element, _dragDropRegistry, _document) {
|
|
1396
|
+
constructor(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {
|
|
1330
1397
|
this._dragDropRegistry = _dragDropRegistry;
|
|
1398
|
+
this._ngZone = _ngZone;
|
|
1399
|
+
this._viewportRuler = _viewportRuler;
|
|
1331
1400
|
/**
|
|
1332
1401
|
* Unique ID for the drop list.
|
|
1333
1402
|
* @deprecated No longer being used. To be removed.
|
|
@@ -1342,6 +1411,11 @@ class DropListRef {
|
|
|
1342
1411
|
* Whether sorting items within the list is disabled.
|
|
1343
1412
|
*/
|
|
1344
1413
|
this.sortingDisabled = true;
|
|
1414
|
+
/**
|
|
1415
|
+
* Whether auto-scrolling the view when the user
|
|
1416
|
+
* moves their pointer close to the edges is disabled.
|
|
1417
|
+
*/
|
|
1418
|
+
this.autoScrollDisabled = false;
|
|
1345
1419
|
/**
|
|
1346
1420
|
* Function that is used to determine whether an item
|
|
1347
1421
|
* is allowed to be moved into a drop container.
|
|
@@ -1379,6 +1453,14 @@ class DropListRef {
|
|
|
1379
1453
|
* Cache of the dimensions of all the items inside the container.
|
|
1380
1454
|
*/
|
|
1381
1455
|
this._itemPositions = [];
|
|
1456
|
+
/**
|
|
1457
|
+
* Keeps track of the container's scroll position.
|
|
1458
|
+
*/
|
|
1459
|
+
this._scrollPosition = { top: 0, left: 0 };
|
|
1460
|
+
/**
|
|
1461
|
+
* Keeps track of the scroll position of the viewport.
|
|
1462
|
+
*/
|
|
1463
|
+
this._viewportScrollPosition = { top: 0, left: 0 };
|
|
1382
1464
|
/**
|
|
1383
1465
|
* Keeps track of the item that was last swapped with the dragged item, as
|
|
1384
1466
|
* well as what direction the pointer was moving in when the swap occured.
|
|
@@ -1400,6 +1482,66 @@ class DropListRef {
|
|
|
1400
1482
|
* Layout direction of the drop list.
|
|
1401
1483
|
*/
|
|
1402
1484
|
this._direction = 'ltr';
|
|
1485
|
+
/**
|
|
1486
|
+
* Subscription to the window being scrolled.
|
|
1487
|
+
*/
|
|
1488
|
+
this._viewportScrollSubscription = Subscription.EMPTY;
|
|
1489
|
+
/**
|
|
1490
|
+
* Vertical direction in which the list is currently scrolling.
|
|
1491
|
+
*/
|
|
1492
|
+
this._verticalScrollDirection = 0 /* NONE */;
|
|
1493
|
+
/**
|
|
1494
|
+
* Horizontal direction in which the list is currently scrolling.
|
|
1495
|
+
*/
|
|
1496
|
+
this._horizontalScrollDirection = 0 /* NONE */;
|
|
1497
|
+
/**
|
|
1498
|
+
* Used to signal to the current auto-scroll sequence when to stop.
|
|
1499
|
+
*/
|
|
1500
|
+
this._stopScrollTimers = new Subject();
|
|
1501
|
+
/**
|
|
1502
|
+
* Handles the container being scrolled. Has to be an arrow function to preserve the context.
|
|
1503
|
+
*/
|
|
1504
|
+
this._handleScroll = (/**
|
|
1505
|
+
* @return {?}
|
|
1506
|
+
*/
|
|
1507
|
+
() => {
|
|
1508
|
+
if (!this.isDragging()) {
|
|
1509
|
+
return;
|
|
1510
|
+
}
|
|
1511
|
+
/** @type {?} */
|
|
1512
|
+
const element = coerceElement(this.element);
|
|
1513
|
+
this._updateAfterScroll(this._scrollPosition, element.scrollTop, element.scrollLeft);
|
|
1514
|
+
});
|
|
1515
|
+
/**
|
|
1516
|
+
* Starts the interval that'll auto-scroll the element.
|
|
1517
|
+
*/
|
|
1518
|
+
this._startScrollInterval = (/**
|
|
1519
|
+
* @return {?}
|
|
1520
|
+
*/
|
|
1521
|
+
() => {
|
|
1522
|
+
this._stopScrolling();
|
|
1523
|
+
interval(0, animationFrameScheduler)
|
|
1524
|
+
.pipe(takeUntil(this._stopScrollTimers))
|
|
1525
|
+
.subscribe((/**
|
|
1526
|
+
* @return {?}
|
|
1527
|
+
*/
|
|
1528
|
+
() => {
|
|
1529
|
+
/** @type {?} */
|
|
1530
|
+
const node = this._scrollNode;
|
|
1531
|
+
if (this._verticalScrollDirection === 1 /* UP */) {
|
|
1532
|
+
incrementVerticalScroll(node, -AUTO_SCROLL_STEP);
|
|
1533
|
+
}
|
|
1534
|
+
else if (this._verticalScrollDirection === 2 /* DOWN */) {
|
|
1535
|
+
incrementVerticalScroll(node, AUTO_SCROLL_STEP);
|
|
1536
|
+
}
|
|
1537
|
+
if (this._horizontalScrollDirection === 1 /* LEFT */) {
|
|
1538
|
+
incrementHorizontalScroll(node, -AUTO_SCROLL_STEP);
|
|
1539
|
+
}
|
|
1540
|
+
else if (this._horizontalScrollDirection === 2 /* RIGHT */) {
|
|
1541
|
+
incrementHorizontalScroll(node, AUTO_SCROLL_STEP);
|
|
1542
|
+
}
|
|
1543
|
+
}));
|
|
1544
|
+
});
|
|
1403
1545
|
_dragDropRegistry.registerDropContainer(this);
|
|
1404
1546
|
this._document = _document;
|
|
1405
1547
|
this.element = element instanceof ElementRef ? element.nativeElement : element;
|
|
@@ -1409,12 +1551,16 @@ class DropListRef {
|
|
|
1409
1551
|
* @return {?}
|
|
1410
1552
|
*/
|
|
1411
1553
|
dispose() {
|
|
1554
|
+
this._stopScrolling();
|
|
1555
|
+
this._stopScrollTimers.complete();
|
|
1556
|
+
this._removeListeners();
|
|
1412
1557
|
this.beforeStarted.complete();
|
|
1413
1558
|
this.entered.complete();
|
|
1414
1559
|
this.exited.complete();
|
|
1415
1560
|
this.dropped.complete();
|
|
1416
1561
|
this.sorted.complete();
|
|
1417
1562
|
this._activeSiblings.clear();
|
|
1563
|
+
this._scrollNode = (/** @type {?} */ (null));
|
|
1418
1564
|
this._dragDropRegistry.removeDropContainer(this);
|
|
1419
1565
|
}
|
|
1420
1566
|
/**
|
|
@@ -1429,6 +1575,8 @@ class DropListRef {
|
|
|
1429
1575
|
* @return {?}
|
|
1430
1576
|
*/
|
|
1431
1577
|
start() {
|
|
1578
|
+
/** @type {?} */
|
|
1579
|
+
const element = coerceElement(this.element);
|
|
1432
1580
|
this.beforeStarted.next();
|
|
1433
1581
|
this._isDragging = true;
|
|
1434
1582
|
this._cacheItems();
|
|
@@ -1437,6 +1585,31 @@ class DropListRef {
|
|
|
1437
1585
|
* @return {?}
|
|
1438
1586
|
*/
|
|
1439
1587
|
sibling => sibling._startReceiving(this)));
|
|
1588
|
+
this._removeListeners();
|
|
1589
|
+
// @breaking-change 9.0.0 Remove check for _ngZone once it's marked as a required param.
|
|
1590
|
+
if (this._ngZone) {
|
|
1591
|
+
this._ngZone.runOutsideAngular((/**
|
|
1592
|
+
* @return {?}
|
|
1593
|
+
*/
|
|
1594
|
+
() => element.addEventListener('scroll', this._handleScroll)));
|
|
1595
|
+
}
|
|
1596
|
+
else {
|
|
1597
|
+
element.addEventListener('scroll', this._handleScroll);
|
|
1598
|
+
}
|
|
1599
|
+
// @breaking-change 9.0.0 Remove check for _viewportRuler once it's marked as a required param.
|
|
1600
|
+
if (this._viewportRuler) {
|
|
1601
|
+
this._viewportScrollPosition = this._viewportRuler.getViewportScrollPosition();
|
|
1602
|
+
this._viewportScrollSubscription = this._dragDropRegistry.scroll.subscribe((/**
|
|
1603
|
+
* @return {?}
|
|
1604
|
+
*/
|
|
1605
|
+
() => {
|
|
1606
|
+
if (this.isDragging()) {
|
|
1607
|
+
/** @type {?} */
|
|
1608
|
+
const newPosition = (/** @type {?} */ (this._viewportRuler)).getViewportScrollPosition();
|
|
1609
|
+
this._updateAfterScroll(this._viewportScrollPosition, newPosition.top, newPosition.left, this._clientRect);
|
|
1610
|
+
}
|
|
1611
|
+
}));
|
|
1612
|
+
}
|
|
1440
1613
|
}
|
|
1441
1614
|
/**
|
|
1442
1615
|
* Emits an event to indicate that the user moved an item into the container.
|
|
@@ -1699,13 +1872,83 @@ class DropListRef {
|
|
|
1699
1872
|
}
|
|
1700
1873
|
}));
|
|
1701
1874
|
}
|
|
1875
|
+
/**
|
|
1876
|
+
* Checks whether the user's pointer is close to the edges of either the
|
|
1877
|
+
* viewport or the drop list and starts the auto-scroll sequence.
|
|
1878
|
+
* @param {?} pointerX User's pointer position along the x axis.
|
|
1879
|
+
* @param {?} pointerY User's pointer position along the y axis.
|
|
1880
|
+
* @return {?}
|
|
1881
|
+
*/
|
|
1882
|
+
_startScrollingIfNecessary(pointerX, pointerY) {
|
|
1883
|
+
if (this.autoScrollDisabled) {
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1886
|
+
/** @type {?} */
|
|
1887
|
+
let scrollNode;
|
|
1888
|
+
/** @type {?} */
|
|
1889
|
+
let verticalScrollDirection = 0 /* NONE */;
|
|
1890
|
+
/** @type {?} */
|
|
1891
|
+
let horizontalScrollDirection = 0 /* NONE */;
|
|
1892
|
+
// @breaking-change 9.0.0 Remove null check for _viewportRuler once it's a required parameter.
|
|
1893
|
+
// Check whether we're in range to scroll the viewport.
|
|
1894
|
+
if (this._viewportRuler) {
|
|
1895
|
+
const { width, height } = this._viewportRuler.getViewportSize();
|
|
1896
|
+
/** @type {?} */
|
|
1897
|
+
const clientRect = { width, height, top: 0, right: width, bottom: height, left: 0 };
|
|
1898
|
+
verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);
|
|
1899
|
+
horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);
|
|
1900
|
+
scrollNode = window;
|
|
1901
|
+
}
|
|
1902
|
+
// If we couldn't find a scroll direction based on the
|
|
1903
|
+
// window, try with the container, if the pointer is close by.
|
|
1904
|
+
if (!verticalScrollDirection && !horizontalScrollDirection &&
|
|
1905
|
+
this._isPointerNearDropContainer(pointerX, pointerY)) {
|
|
1906
|
+
verticalScrollDirection = getVerticalScrollDirection(this._clientRect, pointerY);
|
|
1907
|
+
horizontalScrollDirection = getHorizontalScrollDirection(this._clientRect, pointerX);
|
|
1908
|
+
scrollNode = coerceElement(this.element);
|
|
1909
|
+
}
|
|
1910
|
+
// TODO(crisbeto): we also need to account for whether the view or element are scrollable in
|
|
1911
|
+
// the first place. With the current approach we'll still try to scroll them, but it just
|
|
1912
|
+
// won't do anything. The only case where this is relevant is that if we have a scrollable
|
|
1913
|
+
// list close to the viewport edge where the viewport isn't scrollable. In this case the
|
|
1914
|
+
// we'll be trying to scroll the viewport rather than the list.
|
|
1915
|
+
if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection ||
|
|
1916
|
+
horizontalScrollDirection !== this._horizontalScrollDirection ||
|
|
1917
|
+
scrollNode !== this._scrollNode)) {
|
|
1918
|
+
this._verticalScrollDirection = verticalScrollDirection;
|
|
1919
|
+
this._horizontalScrollDirection = horizontalScrollDirection;
|
|
1920
|
+
this._scrollNode = scrollNode;
|
|
1921
|
+
if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {
|
|
1922
|
+
// @breaking-change 9.0.0 Remove null check for `_ngZone` once it is made required.
|
|
1923
|
+
if (this._ngZone) {
|
|
1924
|
+
this._ngZone.runOutsideAngular(this._startScrollInterval);
|
|
1925
|
+
}
|
|
1926
|
+
else {
|
|
1927
|
+
this._startScrollInterval();
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
else {
|
|
1931
|
+
this._stopScrolling();
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
/**
|
|
1936
|
+
* Stops any currently-running auto-scroll sequences.
|
|
1937
|
+
* @return {?}
|
|
1938
|
+
*/
|
|
1939
|
+
_stopScrolling() {
|
|
1940
|
+
this._stopScrollTimers.next();
|
|
1941
|
+
}
|
|
1702
1942
|
/**
|
|
1703
1943
|
* Caches the position of the drop list.
|
|
1704
1944
|
* @private
|
|
1705
1945
|
* @return {?}
|
|
1706
1946
|
*/
|
|
1707
1947
|
_cacheOwnPosition() {
|
|
1708
|
-
|
|
1948
|
+
/** @type {?} */
|
|
1949
|
+
const element = coerceElement(this.element);
|
|
1950
|
+
this._clientRect = getMutableClientRect(element);
|
|
1951
|
+
this._scrollPosition = { top: element.scrollTop, left: element.scrollLeft };
|
|
1709
1952
|
}
|
|
1710
1953
|
/**
|
|
1711
1954
|
* Refreshes the position cache of the items and sibling containers.
|
|
@@ -1726,24 +1969,7 @@ class DropListRef {
|
|
|
1726
1969
|
// placeholder, because the element is hidden.
|
|
1727
1970
|
drag.getPlaceholderElement() :
|
|
1728
1971
|
drag.getRootElement();
|
|
1729
|
-
|
|
1730
|
-
const clientRect = elementToMeasure.getBoundingClientRect();
|
|
1731
|
-
return {
|
|
1732
|
-
drag,
|
|
1733
|
-
offset: 0,
|
|
1734
|
-
// We need to clone the `clientRect` here, because all the values on it are readonly
|
|
1735
|
-
// and we need to be able to update them. Also we can't use a spread here, because
|
|
1736
|
-
// the values on a `ClientRect` aren't own properties. See:
|
|
1737
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
|
|
1738
|
-
clientRect: {
|
|
1739
|
-
top: clientRect.top,
|
|
1740
|
-
right: clientRect.right,
|
|
1741
|
-
bottom: clientRect.bottom,
|
|
1742
|
-
left: clientRect.left,
|
|
1743
|
-
width: clientRect.width,
|
|
1744
|
-
height: clientRect.height
|
|
1745
|
-
}
|
|
1746
|
-
};
|
|
1972
|
+
return { drag, offset: 0, clientRect: getMutableClientRect(elementToMeasure) };
|
|
1747
1973
|
})).sort((/**
|
|
1748
1974
|
* @param {?} a
|
|
1749
1975
|
* @param {?} b
|
|
@@ -1776,6 +2002,8 @@ class DropListRef {
|
|
|
1776
2002
|
this._itemPositions = [];
|
|
1777
2003
|
this._previousSwap.drag = null;
|
|
1778
2004
|
this._previousSwap.delta = 0;
|
|
2005
|
+
this._stopScrolling();
|
|
2006
|
+
this._removeListeners();
|
|
1779
2007
|
}
|
|
1780
2008
|
/**
|
|
1781
2009
|
* Gets the offset in pixels by which the items that aren't being dragged should be moved.
|
|
@@ -1899,6 +2127,60 @@ class DropListRef {
|
|
|
1899
2127
|
this._cacheItemPositions();
|
|
1900
2128
|
this._cacheOwnPosition();
|
|
1901
2129
|
}
|
|
2130
|
+
/**
|
|
2131
|
+
* Updates the internal state of the container after a scroll event has happened.
|
|
2132
|
+
* @private
|
|
2133
|
+
* @param {?} scrollPosition Object that is keeping track of the scroll position.
|
|
2134
|
+
* @param {?} newTop New top scroll position.
|
|
2135
|
+
* @param {?} newLeft New left scroll position.
|
|
2136
|
+
* @param {?=} extraClientRect Extra `ClientRect` object that should be updated, in addition to the
|
|
2137
|
+
* ones of the drag items. Useful when the viewport has been scrolled and we also need to update
|
|
2138
|
+
* the `ClientRect` of the list.
|
|
2139
|
+
* @return {?}
|
|
2140
|
+
*/
|
|
2141
|
+
_updateAfterScroll(scrollPosition, newTop, newLeft, extraClientRect) {
|
|
2142
|
+
/** @type {?} */
|
|
2143
|
+
const topDifference = scrollPosition.top - newTop;
|
|
2144
|
+
/** @type {?} */
|
|
2145
|
+
const leftDifference = scrollPosition.left - newLeft;
|
|
2146
|
+
if (extraClientRect) {
|
|
2147
|
+
adjustClientRect(extraClientRect, topDifference, leftDifference);
|
|
2148
|
+
}
|
|
2149
|
+
// Since we know the amount that the user has scrolled we can shift all of the client rectangles
|
|
2150
|
+
// ourselves. This is cheaper than re-measuring everything and we can avoid inconsistent
|
|
2151
|
+
// behavior where we might be measuring the element before its position has changed.
|
|
2152
|
+
this._itemPositions.forEach((/**
|
|
2153
|
+
* @param {?} __0
|
|
2154
|
+
* @return {?}
|
|
2155
|
+
*/
|
|
2156
|
+
({ clientRect }) => {
|
|
2157
|
+
adjustClientRect(clientRect, topDifference, leftDifference);
|
|
2158
|
+
}));
|
|
2159
|
+
// We need two loops for this, because we want all of the cached
|
|
2160
|
+
// positions to be up-to-date before we re-sort the item.
|
|
2161
|
+
this._itemPositions.forEach((/**
|
|
2162
|
+
* @param {?} __0
|
|
2163
|
+
* @return {?}
|
|
2164
|
+
*/
|
|
2165
|
+
({ drag }) => {
|
|
2166
|
+
if (this._dragDropRegistry.isDragging(drag)) {
|
|
2167
|
+
// We need to re-sort the item manually, because the pointer move
|
|
2168
|
+
// events won't be dispatched while the user is scrolling.
|
|
2169
|
+
drag._sortFromLastPointerPosition();
|
|
2170
|
+
}
|
|
2171
|
+
}));
|
|
2172
|
+
scrollPosition.top = newTop;
|
|
2173
|
+
scrollPosition.left = newLeft;
|
|
2174
|
+
}
|
|
2175
|
+
/**
|
|
2176
|
+
* Removes the event listeners associated with this drop list.
|
|
2177
|
+
* @private
|
|
2178
|
+
* @return {?}
|
|
2179
|
+
*/
|
|
2180
|
+
_removeListeners() {
|
|
2181
|
+
coerceElement(this.element).removeEventListener('scroll', this._handleScroll);
|
|
2182
|
+
this._viewportScrollSubscription.unsubscribe();
|
|
2183
|
+
}
|
|
1902
2184
|
/**
|
|
1903
2185
|
* Checks whether the user's pointer is positioned over the container.
|
|
1904
2186
|
* @param {?} x Pointer position along the X axis.
|
|
@@ -1988,7 +2270,7 @@ function adjustClientRect(clientRect, top, left) {
|
|
|
1988
2270
|
}
|
|
1989
2271
|
/**
|
|
1990
2272
|
* Finds the index of an item that matches a predicate function. Used as an equivalent
|
|
1991
|
-
* of `Array.prototype.
|
|
2273
|
+
* of `Array.prototype.findIndex` which isn't part of the standard Google typings.
|
|
1992
2274
|
* @template T
|
|
1993
2275
|
* @param {?} array Array in which to look for matches.
|
|
1994
2276
|
* @param {?} predicate Function used to determine whether an item is a match.
|
|
@@ -2013,6 +2295,93 @@ function isInsideClientRect(clientRect, x, y) {
|
|
|
2013
2295
|
const { top, bottom, left, right } = clientRect;
|
|
2014
2296
|
return y >= top && y <= bottom && x >= left && x <= right;
|
|
2015
2297
|
}
|
|
2298
|
+
/**
|
|
2299
|
+
* Gets a mutable version of an element's bounding `ClientRect`.
|
|
2300
|
+
* @param {?} element
|
|
2301
|
+
* @return {?}
|
|
2302
|
+
*/
|
|
2303
|
+
function getMutableClientRect(element) {
|
|
2304
|
+
/** @type {?} */
|
|
2305
|
+
const clientRect = element.getBoundingClientRect();
|
|
2306
|
+
// We need to clone the `clientRect` here, because all the values on it are readonly
|
|
2307
|
+
// and we need to be able to update them. Also we can't use a spread here, because
|
|
2308
|
+
// the values on a `ClientRect` aren't own properties. See:
|
|
2309
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
|
|
2310
|
+
return {
|
|
2311
|
+
top: clientRect.top,
|
|
2312
|
+
right: clientRect.right,
|
|
2313
|
+
bottom: clientRect.bottom,
|
|
2314
|
+
left: clientRect.left,
|
|
2315
|
+
width: clientRect.width,
|
|
2316
|
+
height: clientRect.height
|
|
2317
|
+
};
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Increments the vertical scroll position of a node.
|
|
2321
|
+
* @param {?} node Node whose scroll position should change.
|
|
2322
|
+
* @param {?} amount Amount of pixels that the `node` should be scrolled.
|
|
2323
|
+
* @return {?}
|
|
2324
|
+
*/
|
|
2325
|
+
function incrementVerticalScroll(node, amount) {
|
|
2326
|
+
if (node === window) {
|
|
2327
|
+
((/** @type {?} */ (node))).scrollBy(0, amount);
|
|
2328
|
+
}
|
|
2329
|
+
else {
|
|
2330
|
+
// Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
|
|
2331
|
+
((/** @type {?} */ (node))).scrollTop += amount;
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
/**
|
|
2335
|
+
* Increments the horizontal scroll position of a node.
|
|
2336
|
+
* @param {?} node Node whose scroll position should change.
|
|
2337
|
+
* @param {?} amount Amount of pixels that the `node` should be scrolled.
|
|
2338
|
+
* @return {?}
|
|
2339
|
+
*/
|
|
2340
|
+
function incrementHorizontalScroll(node, amount) {
|
|
2341
|
+
if (node === window) {
|
|
2342
|
+
((/** @type {?} */ (node))).scrollBy(amount, 0);
|
|
2343
|
+
}
|
|
2344
|
+
else {
|
|
2345
|
+
// Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
|
|
2346
|
+
((/** @type {?} */ (node))).scrollLeft += amount;
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
/**
|
|
2350
|
+
* Gets whether the vertical auto-scroll direction of a node.
|
|
2351
|
+
* @param {?} clientRect Dimensions of the node.
|
|
2352
|
+
* @param {?} pointerY Position of the user's pointer along the y axis.
|
|
2353
|
+
* @return {?}
|
|
2354
|
+
*/
|
|
2355
|
+
function getVerticalScrollDirection(clientRect, pointerY) {
|
|
2356
|
+
const { top, bottom, height } = clientRect;
|
|
2357
|
+
/** @type {?} */
|
|
2358
|
+
const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;
|
|
2359
|
+
if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {
|
|
2360
|
+
return 1 /* UP */;
|
|
2361
|
+
}
|
|
2362
|
+
else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {
|
|
2363
|
+
return 2 /* DOWN */;
|
|
2364
|
+
}
|
|
2365
|
+
return 0 /* NONE */;
|
|
2366
|
+
}
|
|
2367
|
+
/**
|
|
2368
|
+
* Gets whether the horizontal auto-scroll direction of a node.
|
|
2369
|
+
* @param {?} clientRect Dimensions of the node.
|
|
2370
|
+
* @param {?} pointerX Position of the user's pointer along the x axis.
|
|
2371
|
+
* @return {?}
|
|
2372
|
+
*/
|
|
2373
|
+
function getHorizontalScrollDirection(clientRect, pointerX) {
|
|
2374
|
+
const { left, right, width } = clientRect;
|
|
2375
|
+
/** @type {?} */
|
|
2376
|
+
const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;
|
|
2377
|
+
if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {
|
|
2378
|
+
return 1 /* LEFT */;
|
|
2379
|
+
}
|
|
2380
|
+
else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {
|
|
2381
|
+
return 2 /* RIGHT */;
|
|
2382
|
+
}
|
|
2383
|
+
return 0 /* NONE */;
|
|
2384
|
+
}
|
|
2016
2385
|
|
|
2017
2386
|
/**
|
|
2018
2387
|
* @fileoverview added by tsickle
|
|
@@ -2068,6 +2437,10 @@ class DragDropRegistry {
|
|
|
2068
2437
|
* while the user is dragging a drag item instance.
|
|
2069
2438
|
*/
|
|
2070
2439
|
this.pointerUp = new Subject();
|
|
2440
|
+
/**
|
|
2441
|
+
* Emits when the viewport has been scrolled while the user is dragging an item.
|
|
2442
|
+
*/
|
|
2443
|
+
this.scroll = new Subject();
|
|
2071
2444
|
/**
|
|
2072
2445
|
* Event listener that will prevent the default browser action while the user is dragging.
|
|
2073
2446
|
* @param event Event whose default action should be prevented.
|
|
@@ -2144,6 +2517,10 @@ class DragDropRegistry {
|
|
|
2144
2517
|
* @return {?}
|
|
2145
2518
|
*/
|
|
2146
2519
|
startDragging(drag, event) {
|
|
2520
|
+
// Do not process the same drag twice to avoid memory leaks and redundant listeners
|
|
2521
|
+
if (this._activeDragInstances.has(drag)) {
|
|
2522
|
+
return;
|
|
2523
|
+
}
|
|
2147
2524
|
this._activeDragInstances.add(drag);
|
|
2148
2525
|
if (this._activeDragInstances.size === 1) {
|
|
2149
2526
|
/** @type {?} */
|
|
@@ -2171,6 +2548,13 @@ class DragDropRegistry {
|
|
|
2171
2548
|
*/
|
|
2172
2549
|
(e) => this.pointerUp.next((/** @type {?} */ (e)))),
|
|
2173
2550
|
options: true
|
|
2551
|
+
})
|
|
2552
|
+
.set('scroll', {
|
|
2553
|
+
handler: (/**
|
|
2554
|
+
* @param {?} e
|
|
2555
|
+
* @return {?}
|
|
2556
|
+
*/
|
|
2557
|
+
(e) => this.scroll.next(e))
|
|
2174
2558
|
})
|
|
2175
2559
|
// Preventing the default action on `mousemove` isn't enough to disable text selection
|
|
2176
2560
|
// on Safari so we need to prevent the selection event as well. Alternatively this can
|
|
@@ -2180,14 +2564,6 @@ class DragDropRegistry {
|
|
|
2180
2564
|
handler: this._preventDefaultWhileDragging,
|
|
2181
2565
|
options: activeCapturingEventOptions
|
|
2182
2566
|
});
|
|
2183
|
-
// TODO(crisbeto): prevent mouse wheel scrolling while
|
|
2184
|
-
// dragging until we've set up proper scroll handling.
|
|
2185
|
-
if (!isTouchEvent) {
|
|
2186
|
-
this._globalListeners.set('wheel', {
|
|
2187
|
-
handler: this._preventDefaultWhileDragging,
|
|
2188
|
-
options: activeCapturingEventOptions
|
|
2189
|
-
});
|
|
2190
|
-
}
|
|
2191
2567
|
this._ngZone.runOutsideAngular((/**
|
|
2192
2568
|
* @return {?}
|
|
2193
2569
|
*/
|
|
@@ -2326,7 +2702,7 @@ class DragDrop {
|
|
|
2326
2702
|
* @return {?}
|
|
2327
2703
|
*/
|
|
2328
2704
|
createDropList(element) {
|
|
2329
|
-
return new DropListRef(element, this._dragDropRegistry, this._document);
|
|
2705
|
+
return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
|
|
2330
2706
|
}
|
|
2331
2707
|
}
|
|
2332
2708
|
DragDrop.decorators = [
|
|
@@ -3077,6 +3453,10 @@ class CdkDropList {
|
|
|
3077
3453
|
* @return {?}
|
|
3078
3454
|
*/
|
|
3079
3455
|
() => true);
|
|
3456
|
+
/**
|
|
3457
|
+
* Whether to auto-scroll the view when the user moves their pointer close to the edges.
|
|
3458
|
+
*/
|
|
3459
|
+
this.autoScrollDisabled = false;
|
|
3080
3460
|
/**
|
|
3081
3461
|
* Emits when the user drops an item inside the container.
|
|
3082
3462
|
*/
|
|
@@ -3296,6 +3676,7 @@ class CdkDropList {
|
|
|
3296
3676
|
ref.disabled = this.disabled;
|
|
3297
3677
|
ref.lockAxis = this.lockAxis;
|
|
3298
3678
|
ref.sortingDisabled = this.sortingDisabled;
|
|
3679
|
+
ref.autoScrollDisabled = this.autoScrollDisabled;
|
|
3299
3680
|
ref
|
|
3300
3681
|
.connectedTo(siblings.filter((/**
|
|
3301
3682
|
* @param {?} drop
|
|
@@ -3423,6 +3804,7 @@ CdkDropList.propDecorators = {
|
|
|
3423
3804
|
disabled: [{ type: Input, args: ['cdkDropListDisabled',] }],
|
|
3424
3805
|
sortingDisabled: [{ type: Input, args: ['cdkDropListSortingDisabled',] }],
|
|
3425
3806
|
enterPredicate: [{ type: Input, args: ['cdkDropListEnterPredicate',] }],
|
|
3807
|
+
autoScrollDisabled: [{ type: Input, args: ['cdkDropListAutoScrollDisabled',] }],
|
|
3426
3808
|
dropped: [{ type: Output, args: ['cdkDropListDropped',] }],
|
|
3427
3809
|
entered: [{ type: Output, args: ['cdkDropListEntered',] }],
|
|
3428
3810
|
exited: [{ type: Output, args: ['cdkDropListExited',] }],
|