@angular/cdk 8.0.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 +511 -81
- 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-overlay.umd.js +15 -13
- 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-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 +446 -79
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/overlay.js +14 -12
- package/esm2015/overlay.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 +509 -79
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/overlay.es5.js +15 -13
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/tree.es5.js +8 -6
- package/esm5/tree.es5.js.map +1 -1
- 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-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/{typings/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.d.ts → schematics/ng-update/upgrade-rules/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 +2895 -3608
- 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/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
- package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.js +31 -20
- 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/index.metadata.json +1 -1
- 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/{schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.d.ts → typings/schematics/ng-update/upgrade-rules/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.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 -87
- 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/esm5/drag-drop.es5.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
|
|
@@ -180,6 +180,10 @@ DragRef = /** @class */ (function () {
|
|
|
180
180
|
* Subscription to the event that is dispatched when the user lifts their pointer.
|
|
181
181
|
*/
|
|
182
182
|
this._pointerUpSubscription = Subscription.EMPTY;
|
|
183
|
+
/**
|
|
184
|
+
* Subscription to the viewport being scrolled.
|
|
185
|
+
*/
|
|
186
|
+
this._scrollSubscription = Subscription.EMPTY;
|
|
183
187
|
/**
|
|
184
188
|
* Cached reference to the boundary element.
|
|
185
189
|
*/
|
|
@@ -289,7 +293,13 @@ DragRef = /** @class */ (function () {
|
|
|
289
293
|
// direction. Note that this is preferrable over doing something like `skip(minimumDistance)`
|
|
290
294
|
// in the `pointerMove` subscription, because we're not guaranteed to have one move event
|
|
291
295
|
// per pixel of movement (e.g. if the user moves their pointer quickly).
|
|
292
|
-
if (isOverThreshold
|
|
296
|
+
if (isOverThreshold) {
|
|
297
|
+
/** @type {?} */
|
|
298
|
+
var isDelayElapsed = Date.now() >= _this._dragStartTime + (_this.dragStartDelay || 0);
|
|
299
|
+
if (!isDelayElapsed) {
|
|
300
|
+
_this._endDragSequence(event);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
293
303
|
// Prevent other drag sequences from starting while something in the container is still
|
|
294
304
|
// being dragged. This can happen while we're waiting for the drop animation to finish
|
|
295
305
|
// and can cause errors, because some elements might still be moving around.
|
|
@@ -360,47 +370,7 @@ DragRef = /** @class */ (function () {
|
|
|
360
370
|
* @return {?}
|
|
361
371
|
*/
|
|
362
372
|
function (event) {
|
|
363
|
-
|
|
364
|
-
// The difference is that the one from the service reflects whether a dragging sequence
|
|
365
|
-
// has been initiated, whereas the one on `this` includes whether the user has passed
|
|
366
|
-
// the minimum dragging threshold.
|
|
367
|
-
if (!_this._dragDropRegistry.isDragging(_this)) {
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
_this._removeSubscriptions();
|
|
371
|
-
_this._dragDropRegistry.stopDragging(_this);
|
|
372
|
-
if (_this._handles) {
|
|
373
|
-
_this._rootElement.style.webkitTapHighlightColor = _this._rootElementTapHighlight;
|
|
374
|
-
}
|
|
375
|
-
if (!_this._hasStartedDragging) {
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
_this.released.next({ source: _this });
|
|
379
|
-
if (!_this._dropContainer) {
|
|
380
|
-
// Convert the active transform into a passive one. This means that next time
|
|
381
|
-
// the user starts dragging the item, its position will be calculated relatively
|
|
382
|
-
// to the new passive transform.
|
|
383
|
-
_this._passiveTransform.x = _this._activeTransform.x;
|
|
384
|
-
_this._passiveTransform.y = _this._activeTransform.y;
|
|
385
|
-
_this._ngZone.run((/**
|
|
386
|
-
* @return {?}
|
|
387
|
-
*/
|
|
388
|
-
function () {
|
|
389
|
-
_this.ended.next({
|
|
390
|
-
source: _this,
|
|
391
|
-
distance: _this._getDragDistance(_this._getPointerPositionOnPage(event))
|
|
392
|
-
});
|
|
393
|
-
}));
|
|
394
|
-
_this._dragDropRegistry.stopDragging(_this);
|
|
395
|
-
return;
|
|
396
|
-
}
|
|
397
|
-
_this._animatePreviewToPlaceholder().then((/**
|
|
398
|
-
* @return {?}
|
|
399
|
-
*/
|
|
400
|
-
function () {
|
|
401
|
-
_this._cleanupDragArtifacts(event);
|
|
402
|
-
_this._dragDropRegistry.stopDragging(_this);
|
|
403
|
-
}));
|
|
373
|
+
_this._endDragSequence(event);
|
|
404
374
|
});
|
|
405
375
|
this.withRootElement(element);
|
|
406
376
|
_dragDropRegistry.registerDragItem(this);
|
|
@@ -732,7 +702,9 @@ DragRef = /** @class */ (function () {
|
|
|
732
702
|
* @return {?}
|
|
733
703
|
*/
|
|
734
704
|
function () {
|
|
735
|
-
|
|
705
|
+
/** @type {?} */
|
|
706
|
+
var position = this.isDragging() ? this._activeTransform : this._passiveTransform;
|
|
707
|
+
return { x: position.x, y: position.y };
|
|
736
708
|
};
|
|
737
709
|
/**
|
|
738
710
|
* Sets the current position in pixels the draggable outside of a drop container.
|
|
@@ -761,6 +733,22 @@ DragRef = /** @class */ (function () {
|
|
|
761
733
|
}
|
|
762
734
|
return (/** @type {?} */ (this));
|
|
763
735
|
};
|
|
736
|
+
/** Updates the item's sort order based on the last-known pointer position. */
|
|
737
|
+
/**
|
|
738
|
+
* Updates the item's sort order based on the last-known pointer position.
|
|
739
|
+
* @return {?}
|
|
740
|
+
*/
|
|
741
|
+
DragRef.prototype._sortFromLastPointerPosition = /**
|
|
742
|
+
* Updates the item's sort order based on the last-known pointer position.
|
|
743
|
+
* @return {?}
|
|
744
|
+
*/
|
|
745
|
+
function () {
|
|
746
|
+
/** @type {?} */
|
|
747
|
+
var position = this._pointerPositionAtLastDirectionChange;
|
|
748
|
+
if (position && this._dropContainer) {
|
|
749
|
+
this._updateActiveDropContainer(position);
|
|
750
|
+
}
|
|
751
|
+
};
|
|
764
752
|
/** Unsubscribes from the global subscriptions. */
|
|
765
753
|
/**
|
|
766
754
|
* Unsubscribes from the global subscriptions.
|
|
@@ -775,6 +763,7 @@ DragRef = /** @class */ (function () {
|
|
|
775
763
|
function () {
|
|
776
764
|
this._pointerMoveSubscription.unsubscribe();
|
|
777
765
|
this._pointerUpSubscription.unsubscribe();
|
|
766
|
+
this._scrollSubscription.unsubscribe();
|
|
778
767
|
};
|
|
779
768
|
/** Destroys the preview element and its ViewRef. */
|
|
780
769
|
/**
|
|
@@ -816,6 +805,69 @@ DragRef = /** @class */ (function () {
|
|
|
816
805
|
}
|
|
817
806
|
this._placeholder = this._placeholderRef = (/** @type {?} */ (null));
|
|
818
807
|
};
|
|
808
|
+
/**
|
|
809
|
+
* Clears subscriptions and stops the dragging sequence.
|
|
810
|
+
* @param event Browser event object that ended the sequence.
|
|
811
|
+
*/
|
|
812
|
+
/**
|
|
813
|
+
* Clears subscriptions and stops the dragging sequence.
|
|
814
|
+
* @private
|
|
815
|
+
* @param {?} event Browser event object that ended the sequence.
|
|
816
|
+
* @return {?}
|
|
817
|
+
*/
|
|
818
|
+
DragRef.prototype._endDragSequence = /**
|
|
819
|
+
* Clears subscriptions and stops the dragging sequence.
|
|
820
|
+
* @private
|
|
821
|
+
* @param {?} event Browser event object that ended the sequence.
|
|
822
|
+
* @return {?}
|
|
823
|
+
*/
|
|
824
|
+
function (event) {
|
|
825
|
+
var _this = this;
|
|
826
|
+
// Note that here we use `isDragging` from the service, rather than from `this`.
|
|
827
|
+
// The difference is that the one from the service reflects whether a dragging sequence
|
|
828
|
+
// has been initiated, whereas the one on `this` includes whether the user has passed
|
|
829
|
+
// the minimum dragging threshold.
|
|
830
|
+
if (!this._dragDropRegistry.isDragging(this)) {
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
this._removeSubscriptions();
|
|
834
|
+
this._dragDropRegistry.stopDragging(this);
|
|
835
|
+
if (this._handles) {
|
|
836
|
+
this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;
|
|
837
|
+
}
|
|
838
|
+
if (!this._hasStartedDragging) {
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
this.released.next({ source: this });
|
|
842
|
+
if (this._dropContainer) {
|
|
843
|
+
// Stop scrolling immediately, instead of waiting for the animation to finish.
|
|
844
|
+
this._dropContainer._stopScrolling();
|
|
845
|
+
this._animatePreviewToPlaceholder().then((/**
|
|
846
|
+
* @return {?}
|
|
847
|
+
*/
|
|
848
|
+
function () {
|
|
849
|
+
_this._cleanupDragArtifacts(event);
|
|
850
|
+
_this._dragDropRegistry.stopDragging(_this);
|
|
851
|
+
}));
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
// Convert the active transform into a passive one. This means that next time
|
|
855
|
+
// the user starts dragging the item, its position will be calculated relatively
|
|
856
|
+
// to the new passive transform.
|
|
857
|
+
this._passiveTransform.x = this._activeTransform.x;
|
|
858
|
+
this._passiveTransform.y = this._activeTransform.y;
|
|
859
|
+
this._ngZone.run((/**
|
|
860
|
+
* @return {?}
|
|
861
|
+
*/
|
|
862
|
+
function () {
|
|
863
|
+
_this.ended.next({
|
|
864
|
+
source: _this,
|
|
865
|
+
distance: _this._getDragDistance(_this._getPointerPositionOnPage(event))
|
|
866
|
+
});
|
|
867
|
+
}));
|
|
868
|
+
this._dragDropRegistry.stopDragging(this);
|
|
869
|
+
}
|
|
870
|
+
};
|
|
819
871
|
/** Starts the dragging sequence. */
|
|
820
872
|
/**
|
|
821
873
|
* Starts the dragging sequence.
|
|
@@ -835,6 +887,7 @@ DragRef = /** @class */ (function () {
|
|
|
835
887
|
if (isTouchEvent(event)) {
|
|
836
888
|
this._lastTouchEventTime = Date.now();
|
|
837
889
|
}
|
|
890
|
+
this._toggleNativeDragInteractions();
|
|
838
891
|
if (this._dropContainer) {
|
|
839
892
|
/** @type {?} */
|
|
840
893
|
var element = this._rootElement;
|
|
@@ -877,6 +930,7 @@ DragRef = /** @class */ (function () {
|
|
|
877
930
|
* @return {?}
|
|
878
931
|
*/
|
|
879
932
|
function (referenceElement, event) {
|
|
933
|
+
var _this = this;
|
|
880
934
|
// Always stop propagation for the event that initializes
|
|
881
935
|
// the dragging sequence, in order to prevent it from potentially
|
|
882
936
|
// starting another sequence for a draggable parent somewhere up the DOM tree.
|
|
@@ -912,7 +966,6 @@ DragRef = /** @class */ (function () {
|
|
|
912
966
|
this._rootElementTapHighlight = rootElement.style.webkitTapHighlightColor;
|
|
913
967
|
rootElement.style.webkitTapHighlightColor = 'transparent';
|
|
914
968
|
}
|
|
915
|
-
this._toggleNativeDragInteractions();
|
|
916
969
|
this._hasStartedDragging = this._hasMoved = false;
|
|
917
970
|
this._initialContainer = (/** @type {?} */ (this._dropContainer));
|
|
918
971
|
// Avoid multiple subscriptions and memory leaks when multi touch
|
|
@@ -920,7 +973,12 @@ DragRef = /** @class */ (function () {
|
|
|
920
973
|
this._removeSubscriptions();
|
|
921
974
|
this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);
|
|
922
975
|
this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);
|
|
923
|
-
this.
|
|
976
|
+
this._scrollSubscription = this._dragDropRegistry.scroll.pipe(startWith(null)).subscribe((/**
|
|
977
|
+
* @return {?}
|
|
978
|
+
*/
|
|
979
|
+
function () {
|
|
980
|
+
_this._scrollPosition = _this._viewportRuler.getViewportScrollPosition();
|
|
981
|
+
}));
|
|
924
982
|
if (this._boundaryElement) {
|
|
925
983
|
this._boundaryRect = this._boundaryElement.getBoundingClientRect();
|
|
926
984
|
}
|
|
@@ -1044,6 +1102,7 @@ DragRef = /** @class */ (function () {
|
|
|
1044
1102
|
});
|
|
1045
1103
|
}));
|
|
1046
1104
|
}
|
|
1105
|
+
(/** @type {?} */ (this._dropContainer))._startScrollingIfNecessary(x, y);
|
|
1047
1106
|
(/** @type {?} */ (this._dropContainer))._sortItem(this, x, y, this._pointerDirectionDelta);
|
|
1048
1107
|
this._preview.style.transform =
|
|
1049
1108
|
getTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);
|
|
@@ -1272,7 +1331,7 @@ DragRef = /** @class */ (function () {
|
|
|
1272
1331
|
/** @type {?} */
|
|
1273
1332
|
var point = this._getPointerPositionOnPage(event);
|
|
1274
1333
|
/** @type {?} */
|
|
1275
|
-
var constrainedPoint = this.constrainPosition ? this.constrainPosition(point) : point;
|
|
1334
|
+
var constrainedPoint = this.constrainPosition ? this.constrainPosition(point, this) : point;
|
|
1276
1335
|
/** @type {?} */
|
|
1277
1336
|
var dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;
|
|
1278
1337
|
if (this.lockAxis === 'x' || dropContainerLock === 'x') {
|
|
@@ -1354,7 +1413,7 @@ DragRef = /** @class */ (function () {
|
|
|
1354
1413
|
return;
|
|
1355
1414
|
}
|
|
1356
1415
|
/** @type {?} */
|
|
1357
|
-
var shouldEnable = this.
|
|
1416
|
+
var shouldEnable = this._handles.length > 0 || !this.isDragging();
|
|
1358
1417
|
if (shouldEnable !== this._nativeInteractionsEnabled) {
|
|
1359
1418
|
this._nativeInteractionsEnabled = shouldEnable;
|
|
1360
1419
|
toggleNativeDragInteractions(this._rootElement, shouldEnable);
|
|
@@ -1617,6 +1676,18 @@ var _uniqueIdCounter = 0;
|
|
|
1617
1676
|
* @type {?}
|
|
1618
1677
|
*/
|
|
1619
1678
|
var DROP_PROXIMITY_THRESHOLD = 0.05;
|
|
1679
|
+
/**
|
|
1680
|
+
* Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the
|
|
1681
|
+
* viewport. The value comes from trying it out manually until it feels right.
|
|
1682
|
+
* @type {?}
|
|
1683
|
+
*/
|
|
1684
|
+
var SCROLL_PROXIMITY_THRESHOLD = 0.05;
|
|
1685
|
+
/**
|
|
1686
|
+
* Number of pixels to scroll for each frame when auto-scrolling an element.
|
|
1687
|
+
* The value comes from trying it out manually until it feels right.
|
|
1688
|
+
* @type {?}
|
|
1689
|
+
*/
|
|
1690
|
+
var AUTO_SCROLL_STEP = 2;
|
|
1620
1691
|
/**
|
|
1621
1692
|
* Reference to a drop list. Used to manipulate or dispose of the container.
|
|
1622
1693
|
* \@docs-private
|
|
@@ -1628,8 +1699,11 @@ var /**
|
|
|
1628
1699
|
* @template T
|
|
1629
1700
|
*/
|
|
1630
1701
|
DropListRef = /** @class */ (function () {
|
|
1631
|
-
function DropListRef(element, _dragDropRegistry, _document) {
|
|
1702
|
+
function DropListRef(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {
|
|
1703
|
+
var _this = this;
|
|
1632
1704
|
this._dragDropRegistry = _dragDropRegistry;
|
|
1705
|
+
this._ngZone = _ngZone;
|
|
1706
|
+
this._viewportRuler = _viewportRuler;
|
|
1633
1707
|
/**
|
|
1634
1708
|
* Unique ID for the drop list.
|
|
1635
1709
|
* @deprecated No longer being used. To be removed.
|
|
@@ -1644,6 +1718,11 @@ DropListRef = /** @class */ (function () {
|
|
|
1644
1718
|
* Whether sorting items within the list is disabled.
|
|
1645
1719
|
*/
|
|
1646
1720
|
this.sortingDisabled = true;
|
|
1721
|
+
/**
|
|
1722
|
+
* Whether auto-scrolling the view when the user
|
|
1723
|
+
* moves their pointer close to the edges is disabled.
|
|
1724
|
+
*/
|
|
1725
|
+
this.autoScrollDisabled = false;
|
|
1647
1726
|
/**
|
|
1648
1727
|
* Function that is used to determine whether an item
|
|
1649
1728
|
* is allowed to be moved into a drop container.
|
|
@@ -1681,6 +1760,14 @@ DropListRef = /** @class */ (function () {
|
|
|
1681
1760
|
* Cache of the dimensions of all the items inside the container.
|
|
1682
1761
|
*/
|
|
1683
1762
|
this._itemPositions = [];
|
|
1763
|
+
/**
|
|
1764
|
+
* Keeps track of the container's scroll position.
|
|
1765
|
+
*/
|
|
1766
|
+
this._scrollPosition = { top: 0, left: 0 };
|
|
1767
|
+
/**
|
|
1768
|
+
* Keeps track of the scroll position of the viewport.
|
|
1769
|
+
*/
|
|
1770
|
+
this._viewportScrollPosition = { top: 0, left: 0 };
|
|
1684
1771
|
/**
|
|
1685
1772
|
* Keeps track of the item that was last swapped with the dragged item, as
|
|
1686
1773
|
* well as what direction the pointer was moving in when the swap occured.
|
|
@@ -1702,6 +1789,66 @@ DropListRef = /** @class */ (function () {
|
|
|
1702
1789
|
* Layout direction of the drop list.
|
|
1703
1790
|
*/
|
|
1704
1791
|
this._direction = 'ltr';
|
|
1792
|
+
/**
|
|
1793
|
+
* Subscription to the window being scrolled.
|
|
1794
|
+
*/
|
|
1795
|
+
this._viewportScrollSubscription = Subscription.EMPTY;
|
|
1796
|
+
/**
|
|
1797
|
+
* Vertical direction in which the list is currently scrolling.
|
|
1798
|
+
*/
|
|
1799
|
+
this._verticalScrollDirection = 0 /* NONE */;
|
|
1800
|
+
/**
|
|
1801
|
+
* Horizontal direction in which the list is currently scrolling.
|
|
1802
|
+
*/
|
|
1803
|
+
this._horizontalScrollDirection = 0 /* NONE */;
|
|
1804
|
+
/**
|
|
1805
|
+
* Used to signal to the current auto-scroll sequence when to stop.
|
|
1806
|
+
*/
|
|
1807
|
+
this._stopScrollTimers = new Subject();
|
|
1808
|
+
/**
|
|
1809
|
+
* Handles the container being scrolled. Has to be an arrow function to preserve the context.
|
|
1810
|
+
*/
|
|
1811
|
+
this._handleScroll = (/**
|
|
1812
|
+
* @return {?}
|
|
1813
|
+
*/
|
|
1814
|
+
function () {
|
|
1815
|
+
if (!_this.isDragging()) {
|
|
1816
|
+
return;
|
|
1817
|
+
}
|
|
1818
|
+
/** @type {?} */
|
|
1819
|
+
var element = coerceElement(_this.element);
|
|
1820
|
+
_this._updateAfterScroll(_this._scrollPosition, element.scrollTop, element.scrollLeft);
|
|
1821
|
+
});
|
|
1822
|
+
/**
|
|
1823
|
+
* Starts the interval that'll auto-scroll the element.
|
|
1824
|
+
*/
|
|
1825
|
+
this._startScrollInterval = (/**
|
|
1826
|
+
* @return {?}
|
|
1827
|
+
*/
|
|
1828
|
+
function () {
|
|
1829
|
+
_this._stopScrolling();
|
|
1830
|
+
interval(0, animationFrameScheduler)
|
|
1831
|
+
.pipe(takeUntil(_this._stopScrollTimers))
|
|
1832
|
+
.subscribe((/**
|
|
1833
|
+
* @return {?}
|
|
1834
|
+
*/
|
|
1835
|
+
function () {
|
|
1836
|
+
/** @type {?} */
|
|
1837
|
+
var node = _this._scrollNode;
|
|
1838
|
+
if (_this._verticalScrollDirection === 1 /* UP */) {
|
|
1839
|
+
incrementVerticalScroll(node, -AUTO_SCROLL_STEP);
|
|
1840
|
+
}
|
|
1841
|
+
else if (_this._verticalScrollDirection === 2 /* DOWN */) {
|
|
1842
|
+
incrementVerticalScroll(node, AUTO_SCROLL_STEP);
|
|
1843
|
+
}
|
|
1844
|
+
if (_this._horizontalScrollDirection === 1 /* LEFT */) {
|
|
1845
|
+
incrementHorizontalScroll(node, -AUTO_SCROLL_STEP);
|
|
1846
|
+
}
|
|
1847
|
+
else if (_this._horizontalScrollDirection === 2 /* RIGHT */) {
|
|
1848
|
+
incrementHorizontalScroll(node, AUTO_SCROLL_STEP);
|
|
1849
|
+
}
|
|
1850
|
+
}));
|
|
1851
|
+
});
|
|
1705
1852
|
_dragDropRegistry.registerDropContainer(this);
|
|
1706
1853
|
this._document = _document;
|
|
1707
1854
|
this.element = element instanceof ElementRef ? element.nativeElement : element;
|
|
@@ -1716,12 +1863,16 @@ DropListRef = /** @class */ (function () {
|
|
|
1716
1863
|
* @return {?}
|
|
1717
1864
|
*/
|
|
1718
1865
|
function () {
|
|
1866
|
+
this._stopScrolling();
|
|
1867
|
+
this._stopScrollTimers.complete();
|
|
1868
|
+
this._removeListeners();
|
|
1719
1869
|
this.beforeStarted.complete();
|
|
1720
1870
|
this.entered.complete();
|
|
1721
1871
|
this.exited.complete();
|
|
1722
1872
|
this.dropped.complete();
|
|
1723
1873
|
this.sorted.complete();
|
|
1724
1874
|
this._activeSiblings.clear();
|
|
1875
|
+
this._scrollNode = (/** @type {?} */ (null));
|
|
1725
1876
|
this._dragDropRegistry.removeDropContainer(this);
|
|
1726
1877
|
};
|
|
1727
1878
|
/** Whether an item from this list is currently being dragged. */
|
|
@@ -1747,6 +1898,8 @@ DropListRef = /** @class */ (function () {
|
|
|
1747
1898
|
*/
|
|
1748
1899
|
function () {
|
|
1749
1900
|
var _this = this;
|
|
1901
|
+
/** @type {?} */
|
|
1902
|
+
var element = coerceElement(this.element);
|
|
1750
1903
|
this.beforeStarted.next();
|
|
1751
1904
|
this._isDragging = true;
|
|
1752
1905
|
this._cacheItems();
|
|
@@ -1755,6 +1908,31 @@ DropListRef = /** @class */ (function () {
|
|
|
1755
1908
|
* @return {?}
|
|
1756
1909
|
*/
|
|
1757
1910
|
function (sibling) { return sibling._startReceiving(_this); }));
|
|
1911
|
+
this._removeListeners();
|
|
1912
|
+
// @breaking-change 9.0.0 Remove check for _ngZone once it's marked as a required param.
|
|
1913
|
+
if (this._ngZone) {
|
|
1914
|
+
this._ngZone.runOutsideAngular((/**
|
|
1915
|
+
* @return {?}
|
|
1916
|
+
*/
|
|
1917
|
+
function () { return element.addEventListener('scroll', _this._handleScroll); }));
|
|
1918
|
+
}
|
|
1919
|
+
else {
|
|
1920
|
+
element.addEventListener('scroll', this._handleScroll);
|
|
1921
|
+
}
|
|
1922
|
+
// @breaking-change 9.0.0 Remove check for _viewportRuler once it's marked as a required param.
|
|
1923
|
+
if (this._viewportRuler) {
|
|
1924
|
+
this._viewportScrollPosition = this._viewportRuler.getViewportScrollPosition();
|
|
1925
|
+
this._viewportScrollSubscription = this._dragDropRegistry.scroll.subscribe((/**
|
|
1926
|
+
* @return {?}
|
|
1927
|
+
*/
|
|
1928
|
+
function () {
|
|
1929
|
+
if (_this.isDragging()) {
|
|
1930
|
+
/** @type {?} */
|
|
1931
|
+
var newPosition = (/** @type {?} */ (_this._viewportRuler)).getViewportScrollPosition();
|
|
1932
|
+
_this._updateAfterScroll(_this._viewportScrollPosition, newPosition.top, newPosition.left, _this._clientRect);
|
|
1933
|
+
}
|
|
1934
|
+
}));
|
|
1935
|
+
}
|
|
1758
1936
|
};
|
|
1759
1937
|
/**
|
|
1760
1938
|
* Emits an event to indicate that the user moved an item into the container.
|
|
@@ -2138,6 +2316,91 @@ DropListRef = /** @class */ (function () {
|
|
|
2138
2316
|
}
|
|
2139
2317
|
}));
|
|
2140
2318
|
};
|
|
2319
|
+
/**
|
|
2320
|
+
* Checks whether the user's pointer is close to the edges of either the
|
|
2321
|
+
* viewport or the drop list and starts the auto-scroll sequence.
|
|
2322
|
+
* @param pointerX User's pointer position along the x axis.
|
|
2323
|
+
* @param pointerY User's pointer position along the y axis.
|
|
2324
|
+
*/
|
|
2325
|
+
/**
|
|
2326
|
+
* Checks whether the user's pointer is close to the edges of either the
|
|
2327
|
+
* viewport or the drop list and starts the auto-scroll sequence.
|
|
2328
|
+
* @param {?} pointerX User's pointer position along the x axis.
|
|
2329
|
+
* @param {?} pointerY User's pointer position along the y axis.
|
|
2330
|
+
* @return {?}
|
|
2331
|
+
*/
|
|
2332
|
+
DropListRef.prototype._startScrollingIfNecessary = /**
|
|
2333
|
+
* Checks whether the user's pointer is close to the edges of either the
|
|
2334
|
+
* viewport or the drop list and starts the auto-scroll sequence.
|
|
2335
|
+
* @param {?} pointerX User's pointer position along the x axis.
|
|
2336
|
+
* @param {?} pointerY User's pointer position along the y axis.
|
|
2337
|
+
* @return {?}
|
|
2338
|
+
*/
|
|
2339
|
+
function (pointerX, pointerY) {
|
|
2340
|
+
if (this.autoScrollDisabled) {
|
|
2341
|
+
return;
|
|
2342
|
+
}
|
|
2343
|
+
/** @type {?} */
|
|
2344
|
+
var scrollNode;
|
|
2345
|
+
/** @type {?} */
|
|
2346
|
+
var verticalScrollDirection = 0 /* NONE */;
|
|
2347
|
+
/** @type {?} */
|
|
2348
|
+
var horizontalScrollDirection = 0 /* NONE */;
|
|
2349
|
+
// @breaking-change 9.0.0 Remove null check for _viewportRuler once it's a required parameter.
|
|
2350
|
+
// Check whether we're in range to scroll the viewport.
|
|
2351
|
+
if (this._viewportRuler) {
|
|
2352
|
+
var _a = this._viewportRuler.getViewportSize(), width = _a.width, height = _a.height;
|
|
2353
|
+
/** @type {?} */
|
|
2354
|
+
var clientRect = { width: width, height: height, top: 0, right: width, bottom: height, left: 0 };
|
|
2355
|
+
verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);
|
|
2356
|
+
horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);
|
|
2357
|
+
scrollNode = window;
|
|
2358
|
+
}
|
|
2359
|
+
// If we couldn't find a scroll direction based on the
|
|
2360
|
+
// window, try with the container, if the pointer is close by.
|
|
2361
|
+
if (!verticalScrollDirection && !horizontalScrollDirection &&
|
|
2362
|
+
this._isPointerNearDropContainer(pointerX, pointerY)) {
|
|
2363
|
+
verticalScrollDirection = getVerticalScrollDirection(this._clientRect, pointerY);
|
|
2364
|
+
horizontalScrollDirection = getHorizontalScrollDirection(this._clientRect, pointerX);
|
|
2365
|
+
scrollNode = coerceElement(this.element);
|
|
2366
|
+
}
|
|
2367
|
+
// TODO(crisbeto): we also need to account for whether the view or element are scrollable in
|
|
2368
|
+
// the first place. With the current approach we'll still try to scroll them, but it just
|
|
2369
|
+
// won't do anything. The only case where this is relevant is that if we have a scrollable
|
|
2370
|
+
// list close to the viewport edge where the viewport isn't scrollable. In this case the
|
|
2371
|
+
// we'll be trying to scroll the viewport rather than the list.
|
|
2372
|
+
if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection ||
|
|
2373
|
+
horizontalScrollDirection !== this._horizontalScrollDirection ||
|
|
2374
|
+
scrollNode !== this._scrollNode)) {
|
|
2375
|
+
this._verticalScrollDirection = verticalScrollDirection;
|
|
2376
|
+
this._horizontalScrollDirection = horizontalScrollDirection;
|
|
2377
|
+
this._scrollNode = scrollNode;
|
|
2378
|
+
if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {
|
|
2379
|
+
// @breaking-change 9.0.0 Remove null check for `_ngZone` once it is made required.
|
|
2380
|
+
if (this._ngZone) {
|
|
2381
|
+
this._ngZone.runOutsideAngular(this._startScrollInterval);
|
|
2382
|
+
}
|
|
2383
|
+
else {
|
|
2384
|
+
this._startScrollInterval();
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
else {
|
|
2388
|
+
this._stopScrolling();
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
};
|
|
2392
|
+
/** Stops any currently-running auto-scroll sequences. */
|
|
2393
|
+
/**
|
|
2394
|
+
* Stops any currently-running auto-scroll sequences.
|
|
2395
|
+
* @return {?}
|
|
2396
|
+
*/
|
|
2397
|
+
DropListRef.prototype._stopScrolling = /**
|
|
2398
|
+
* Stops any currently-running auto-scroll sequences.
|
|
2399
|
+
* @return {?}
|
|
2400
|
+
*/
|
|
2401
|
+
function () {
|
|
2402
|
+
this._stopScrollTimers.next();
|
|
2403
|
+
};
|
|
2141
2404
|
/** Caches the position of the drop list. */
|
|
2142
2405
|
/**
|
|
2143
2406
|
* Caches the position of the drop list.
|
|
@@ -2150,7 +2413,10 @@ DropListRef = /** @class */ (function () {
|
|
|
2150
2413
|
* @return {?}
|
|
2151
2414
|
*/
|
|
2152
2415
|
function () {
|
|
2153
|
-
|
|
2416
|
+
/** @type {?} */
|
|
2417
|
+
var element = coerceElement(this.element);
|
|
2418
|
+
this._clientRect = getMutableClientRect(element);
|
|
2419
|
+
this._scrollPosition = { top: element.scrollTop, left: element.scrollLeft };
|
|
2154
2420
|
};
|
|
2155
2421
|
/** Refreshes the position cache of the items and sibling containers. */
|
|
2156
2422
|
/**
|
|
@@ -2178,24 +2444,7 @@ DropListRef = /** @class */ (function () {
|
|
|
2178
2444
|
// placeholder, because the element is hidden.
|
|
2179
2445
|
drag.getPlaceholderElement() :
|
|
2180
2446
|
drag.getRootElement();
|
|
2181
|
-
|
|
2182
|
-
var clientRect = elementToMeasure.getBoundingClientRect();
|
|
2183
|
-
return {
|
|
2184
|
-
drag: drag,
|
|
2185
|
-
offset: 0,
|
|
2186
|
-
// We need to clone the `clientRect` here, because all the values on it are readonly
|
|
2187
|
-
// and we need to be able to update them. Also we can't use a spread here, because
|
|
2188
|
-
// the values on a `ClientRect` aren't own properties. See:
|
|
2189
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
|
|
2190
|
-
clientRect: {
|
|
2191
|
-
top: clientRect.top,
|
|
2192
|
-
right: clientRect.right,
|
|
2193
|
-
bottom: clientRect.bottom,
|
|
2194
|
-
left: clientRect.left,
|
|
2195
|
-
width: clientRect.width,
|
|
2196
|
-
height: clientRect.height
|
|
2197
|
-
}
|
|
2198
|
-
};
|
|
2447
|
+
return { drag: drag, offset: 0, clientRect: getMutableClientRect(elementToMeasure) };
|
|
2199
2448
|
})).sort((/**
|
|
2200
2449
|
* @param {?} a
|
|
2201
2450
|
* @param {?} b
|
|
@@ -2235,6 +2484,8 @@ DropListRef = /** @class */ (function () {
|
|
|
2235
2484
|
this._itemPositions = [];
|
|
2236
2485
|
this._previousSwap.drag = null;
|
|
2237
2486
|
this._previousSwap.delta = 0;
|
|
2487
|
+
this._stopScrolling();
|
|
2488
|
+
this._removeListeners();
|
|
2238
2489
|
};
|
|
2239
2490
|
/**
|
|
2240
2491
|
* Gets the offset in pixels by which the items that aren't being dragged should be moved.
|
|
@@ -2422,6 +2673,89 @@ DropListRef = /** @class */ (function () {
|
|
|
2422
2673
|
this._cacheItemPositions();
|
|
2423
2674
|
this._cacheOwnPosition();
|
|
2424
2675
|
};
|
|
2676
|
+
/**
|
|
2677
|
+
* Updates the internal state of the container after a scroll event has happened.
|
|
2678
|
+
* @param scrollPosition Object that is keeping track of the scroll position.
|
|
2679
|
+
* @param newTop New top scroll position.
|
|
2680
|
+
* @param newLeft New left scroll position.
|
|
2681
|
+
* @param extraClientRect Extra `ClientRect` object that should be updated, in addition to the
|
|
2682
|
+
* ones of the drag items. Useful when the viewport has been scrolled and we also need to update
|
|
2683
|
+
* the `ClientRect` of the list.
|
|
2684
|
+
*/
|
|
2685
|
+
/**
|
|
2686
|
+
* Updates the internal state of the container after a scroll event has happened.
|
|
2687
|
+
* @private
|
|
2688
|
+
* @param {?} scrollPosition Object that is keeping track of the scroll position.
|
|
2689
|
+
* @param {?} newTop New top scroll position.
|
|
2690
|
+
* @param {?} newLeft New left scroll position.
|
|
2691
|
+
* @param {?=} extraClientRect Extra `ClientRect` object that should be updated, in addition to the
|
|
2692
|
+
* ones of the drag items. Useful when the viewport has been scrolled and we also need to update
|
|
2693
|
+
* the `ClientRect` of the list.
|
|
2694
|
+
* @return {?}
|
|
2695
|
+
*/
|
|
2696
|
+
DropListRef.prototype._updateAfterScroll = /**
|
|
2697
|
+
* Updates the internal state of the container after a scroll event has happened.
|
|
2698
|
+
* @private
|
|
2699
|
+
* @param {?} scrollPosition Object that is keeping track of the scroll position.
|
|
2700
|
+
* @param {?} newTop New top scroll position.
|
|
2701
|
+
* @param {?} newLeft New left scroll position.
|
|
2702
|
+
* @param {?=} extraClientRect Extra `ClientRect` object that should be updated, in addition to the
|
|
2703
|
+
* ones of the drag items. Useful when the viewport has been scrolled and we also need to update
|
|
2704
|
+
* the `ClientRect` of the list.
|
|
2705
|
+
* @return {?}
|
|
2706
|
+
*/
|
|
2707
|
+
function (scrollPosition, newTop, newLeft, extraClientRect) {
|
|
2708
|
+
var _this = this;
|
|
2709
|
+
/** @type {?} */
|
|
2710
|
+
var topDifference = scrollPosition.top - newTop;
|
|
2711
|
+
/** @type {?} */
|
|
2712
|
+
var leftDifference = scrollPosition.left - newLeft;
|
|
2713
|
+
if (extraClientRect) {
|
|
2714
|
+
adjustClientRect(extraClientRect, topDifference, leftDifference);
|
|
2715
|
+
}
|
|
2716
|
+
// Since we know the amount that the user has scrolled we can shift all of the client rectangles
|
|
2717
|
+
// ourselves. This is cheaper than re-measuring everything and we can avoid inconsistent
|
|
2718
|
+
// behavior where we might be measuring the element before its position has changed.
|
|
2719
|
+
this._itemPositions.forEach((/**
|
|
2720
|
+
* @param {?} __0
|
|
2721
|
+
* @return {?}
|
|
2722
|
+
*/
|
|
2723
|
+
function (_a) {
|
|
2724
|
+
var clientRect = _a.clientRect;
|
|
2725
|
+
adjustClientRect(clientRect, topDifference, leftDifference);
|
|
2726
|
+
}));
|
|
2727
|
+
// We need two loops for this, because we want all of the cached
|
|
2728
|
+
// positions to be up-to-date before we re-sort the item.
|
|
2729
|
+
this._itemPositions.forEach((/**
|
|
2730
|
+
* @param {?} __0
|
|
2731
|
+
* @return {?}
|
|
2732
|
+
*/
|
|
2733
|
+
function (_a) {
|
|
2734
|
+
var drag = _a.drag;
|
|
2735
|
+
if (_this._dragDropRegistry.isDragging(drag)) {
|
|
2736
|
+
// We need to re-sort the item manually, because the pointer move
|
|
2737
|
+
// events won't be dispatched while the user is scrolling.
|
|
2738
|
+
drag._sortFromLastPointerPosition();
|
|
2739
|
+
}
|
|
2740
|
+
}));
|
|
2741
|
+
scrollPosition.top = newTop;
|
|
2742
|
+
scrollPosition.left = newLeft;
|
|
2743
|
+
};
|
|
2744
|
+
/** Removes the event listeners associated with this drop list. */
|
|
2745
|
+
/**
|
|
2746
|
+
* Removes the event listeners associated with this drop list.
|
|
2747
|
+
* @private
|
|
2748
|
+
* @return {?}
|
|
2749
|
+
*/
|
|
2750
|
+
DropListRef.prototype._removeListeners = /**
|
|
2751
|
+
* Removes the event listeners associated with this drop list.
|
|
2752
|
+
* @private
|
|
2753
|
+
* @return {?}
|
|
2754
|
+
*/
|
|
2755
|
+
function () {
|
|
2756
|
+
coerceElement(this.element).removeEventListener('scroll', this._handleScroll);
|
|
2757
|
+
this._viewportScrollSubscription.unsubscribe();
|
|
2758
|
+
};
|
|
2425
2759
|
/**
|
|
2426
2760
|
* Checks whether the user's pointer is positioned over the container.
|
|
2427
2761
|
* @param x Pointer position along the X axis.
|
|
@@ -2569,7 +2903,7 @@ function adjustClientRect(clientRect, top, left) {
|
|
|
2569
2903
|
}
|
|
2570
2904
|
/**
|
|
2571
2905
|
* Finds the index of an item that matches a predicate function. Used as an equivalent
|
|
2572
|
-
* of `Array.prototype.
|
|
2906
|
+
* of `Array.prototype.findIndex` which isn't part of the standard Google typings.
|
|
2573
2907
|
* @template T
|
|
2574
2908
|
* @param {?} array Array in which to look for matches.
|
|
2575
2909
|
* @param {?} predicate Function used to determine whether an item is a match.
|
|
@@ -2594,6 +2928,93 @@ function isInsideClientRect(clientRect, x, y) {
|
|
|
2594
2928
|
var top = clientRect.top, bottom = clientRect.bottom, left = clientRect.left, right = clientRect.right;
|
|
2595
2929
|
return y >= top && y <= bottom && x >= left && x <= right;
|
|
2596
2930
|
}
|
|
2931
|
+
/**
|
|
2932
|
+
* Gets a mutable version of an element's bounding `ClientRect`.
|
|
2933
|
+
* @param {?} element
|
|
2934
|
+
* @return {?}
|
|
2935
|
+
*/
|
|
2936
|
+
function getMutableClientRect(element) {
|
|
2937
|
+
/** @type {?} */
|
|
2938
|
+
var clientRect = element.getBoundingClientRect();
|
|
2939
|
+
// We need to clone the `clientRect` here, because all the values on it are readonly
|
|
2940
|
+
// and we need to be able to update them. Also we can't use a spread here, because
|
|
2941
|
+
// the values on a `ClientRect` aren't own properties. See:
|
|
2942
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
|
|
2943
|
+
return {
|
|
2944
|
+
top: clientRect.top,
|
|
2945
|
+
right: clientRect.right,
|
|
2946
|
+
bottom: clientRect.bottom,
|
|
2947
|
+
left: clientRect.left,
|
|
2948
|
+
width: clientRect.width,
|
|
2949
|
+
height: clientRect.height
|
|
2950
|
+
};
|
|
2951
|
+
}
|
|
2952
|
+
/**
|
|
2953
|
+
* Increments the vertical scroll position of a node.
|
|
2954
|
+
* @param {?} node Node whose scroll position should change.
|
|
2955
|
+
* @param {?} amount Amount of pixels that the `node` should be scrolled.
|
|
2956
|
+
* @return {?}
|
|
2957
|
+
*/
|
|
2958
|
+
function incrementVerticalScroll(node, amount) {
|
|
2959
|
+
if (node === window) {
|
|
2960
|
+
((/** @type {?} */ (node))).scrollBy(0, amount);
|
|
2961
|
+
}
|
|
2962
|
+
else {
|
|
2963
|
+
// Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
|
|
2964
|
+
((/** @type {?} */ (node))).scrollTop += amount;
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
/**
|
|
2968
|
+
* Increments the horizontal scroll position of a node.
|
|
2969
|
+
* @param {?} node Node whose scroll position should change.
|
|
2970
|
+
* @param {?} amount Amount of pixels that the `node` should be scrolled.
|
|
2971
|
+
* @return {?}
|
|
2972
|
+
*/
|
|
2973
|
+
function incrementHorizontalScroll(node, amount) {
|
|
2974
|
+
if (node === window) {
|
|
2975
|
+
((/** @type {?} */ (node))).scrollBy(amount, 0);
|
|
2976
|
+
}
|
|
2977
|
+
else {
|
|
2978
|
+
// Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
|
|
2979
|
+
((/** @type {?} */ (node))).scrollLeft += amount;
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
/**
|
|
2983
|
+
* Gets whether the vertical auto-scroll direction of a node.
|
|
2984
|
+
* @param {?} clientRect Dimensions of the node.
|
|
2985
|
+
* @param {?} pointerY Position of the user's pointer along the y axis.
|
|
2986
|
+
* @return {?}
|
|
2987
|
+
*/
|
|
2988
|
+
function getVerticalScrollDirection(clientRect, pointerY) {
|
|
2989
|
+
var top = clientRect.top, bottom = clientRect.bottom, height = clientRect.height;
|
|
2990
|
+
/** @type {?} */
|
|
2991
|
+
var yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;
|
|
2992
|
+
if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {
|
|
2993
|
+
return 1 /* UP */;
|
|
2994
|
+
}
|
|
2995
|
+
else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {
|
|
2996
|
+
return 2 /* DOWN */;
|
|
2997
|
+
}
|
|
2998
|
+
return 0 /* NONE */;
|
|
2999
|
+
}
|
|
3000
|
+
/**
|
|
3001
|
+
* Gets whether the horizontal auto-scroll direction of a node.
|
|
3002
|
+
* @param {?} clientRect Dimensions of the node.
|
|
3003
|
+
* @param {?} pointerX Position of the user's pointer along the x axis.
|
|
3004
|
+
* @return {?}
|
|
3005
|
+
*/
|
|
3006
|
+
function getHorizontalScrollDirection(clientRect, pointerX) {
|
|
3007
|
+
var left = clientRect.left, right = clientRect.right, width = clientRect.width;
|
|
3008
|
+
/** @type {?} */
|
|
3009
|
+
var xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;
|
|
3010
|
+
if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {
|
|
3011
|
+
return 1 /* LEFT */;
|
|
3012
|
+
}
|
|
3013
|
+
else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {
|
|
3014
|
+
return 2 /* RIGHT */;
|
|
3015
|
+
}
|
|
3016
|
+
return 0 /* NONE */;
|
|
3017
|
+
}
|
|
2597
3018
|
|
|
2598
3019
|
/**
|
|
2599
3020
|
* @fileoverview added by tsickle
|
|
@@ -2646,6 +3067,10 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2646
3067
|
* while the user is dragging a drag item instance.
|
|
2647
3068
|
*/
|
|
2648
3069
|
this.pointerUp = new Subject();
|
|
3070
|
+
/**
|
|
3071
|
+
* Emits when the viewport has been scrolled while the user is dragging an item.
|
|
3072
|
+
*/
|
|
3073
|
+
this.scroll = new Subject();
|
|
2649
3074
|
/**
|
|
2650
3075
|
* Event listener that will prevent the default browser action while the user is dragging.
|
|
2651
3076
|
* @param event Event whose default action should be prevented.
|
|
@@ -2790,6 +3215,13 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2790
3215
|
*/
|
|
2791
3216
|
function (e) { return _this.pointerUp.next((/** @type {?} */ (e))); }),
|
|
2792
3217
|
options: true
|
|
3218
|
+
})
|
|
3219
|
+
.set('scroll', {
|
|
3220
|
+
handler: (/**
|
|
3221
|
+
* @param {?} e
|
|
3222
|
+
* @return {?}
|
|
3223
|
+
*/
|
|
3224
|
+
function (e) { return _this.scroll.next(e); })
|
|
2793
3225
|
})
|
|
2794
3226
|
// Preventing the default action on `mousemove` isn't enough to disable text selection
|
|
2795
3227
|
// on Safari so we need to prevent the selection event as well. Alternatively this can
|
|
@@ -2799,14 +3231,6 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2799
3231
|
handler: this._preventDefaultWhileDragging,
|
|
2800
3232
|
options: activeCapturingEventOptions
|
|
2801
3233
|
});
|
|
2802
|
-
// TODO(crisbeto): prevent mouse wheel scrolling while
|
|
2803
|
-
// dragging until we've set up proper scroll handling.
|
|
2804
|
-
if (!isTouchEvent) {
|
|
2805
|
-
this._globalListeners.set('wheel', {
|
|
2806
|
-
handler: this._preventDefaultWhileDragging,
|
|
2807
|
-
options: activeCapturingEventOptions
|
|
2808
|
-
});
|
|
2809
|
-
}
|
|
2810
3234
|
this._ngZone.runOutsideAngular((/**
|
|
2811
3235
|
* @return {?}
|
|
2812
3236
|
*/
|
|
@@ -2998,7 +3422,7 @@ var DragDrop = /** @class */ (function () {
|
|
|
2998
3422
|
* @return {?}
|
|
2999
3423
|
*/
|
|
3000
3424
|
function (element) {
|
|
3001
|
-
return new DropListRef(element, this._dragDropRegistry, this._document);
|
|
3425
|
+
return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
|
|
3002
3426
|
};
|
|
3003
3427
|
DragDrop.decorators = [
|
|
3004
3428
|
{ type: Injectable, args: [{ providedIn: 'root' },] },
|
|
@@ -3826,6 +4250,10 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3826
4250
|
* @return {?}
|
|
3827
4251
|
*/
|
|
3828
4252
|
function () { return true; });
|
|
4253
|
+
/**
|
|
4254
|
+
* Whether to auto-scroll the view when the user moves their pointer close to the edges.
|
|
4255
|
+
*/
|
|
4256
|
+
this.autoScrollDisabled = false;
|
|
3829
4257
|
/**
|
|
3830
4258
|
* Emits when the user drops an item inside the container.
|
|
3831
4259
|
*/
|
|
@@ -4164,6 +4592,7 @@ var CdkDropList = /** @class */ (function () {
|
|
|
4164
4592
|
ref.disabled = _this.disabled;
|
|
4165
4593
|
ref.lockAxis = _this.lockAxis;
|
|
4166
4594
|
ref.sortingDisabled = _this.sortingDisabled;
|
|
4595
|
+
ref.autoScrollDisabled = _this.autoScrollDisabled;
|
|
4167
4596
|
ref
|
|
4168
4597
|
.connectedTo(siblings.filter((/**
|
|
4169
4598
|
* @param {?} drop
|
|
@@ -4298,6 +4727,7 @@ var CdkDropList = /** @class */ (function () {
|
|
|
4298
4727
|
disabled: [{ type: Input, args: ['cdkDropListDisabled',] }],
|
|
4299
4728
|
sortingDisabled: [{ type: Input, args: ['cdkDropListSortingDisabled',] }],
|
|
4300
4729
|
enterPredicate: [{ type: Input, args: ['cdkDropListEnterPredicate',] }],
|
|
4730
|
+
autoScrollDisabled: [{ type: Input, args: ['cdkDropListAutoScrollDisabled',] }],
|
|
4301
4731
|
dropped: [{ type: Output, args: ['cdkDropListDropped',] }],
|
|
4302
4732
|
entered: [{ type: Output, args: ['cdkDropListEntered',] }],
|
|
4303
4733
|
exited: [{ type: Output, args: ['cdkDropListExited',] }],
|