@angular/cdk 8.0.1 → 8.1.2
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 +515 -82
- 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 +50 -31
- 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 +14 -9
- 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 +450 -80
- 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 +50 -31
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/tree.js +13 -9
- 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 +513 -80
- 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 +50 -31
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/tree.es5.js +14 -9
- package/esm5/tree.es5.js.map +1 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-container.d.ts +2 -2
- 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-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 +2873 -5006
- 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/tree/typings/index.metadata.json +1 -1
- 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-container.d.ts +2 -2
- package/typings/esm5/overlay/overlay-ref.d.ts +1 -0
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-container.d.ts +2 -2
- 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/{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/typings/tree/index.metadata.json +1 -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 -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
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
(function (global, factory) {
|
|
9
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/platform'), require('@angular/cdk/coercion'), require('rxjs'), require('@angular/core'), require('@angular/common'), require('@angular/cdk/scrolling'), require('@angular/cdk/bidi')
|
|
10
|
-
typeof define === 'function' && define.amd ? define('@angular/cdk/drag-drop', ['exports', '@angular/cdk/platform', '@angular/cdk/coercion', 'rxjs', '@angular/core', '@angular/common', '@angular/cdk/scrolling', '@angular/cdk/bidi'
|
|
11
|
-
(factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.dragDrop = {}),global.ng.cdk.platform,global.ng.cdk.coercion,global.rxjs,global.ng.core,global.ng.common,global.ng.cdk.scrolling,global.ng.cdk.bidi
|
|
12
|
-
}(this, (function (exports,platform,coercion,rxjs,core,common,scrolling,bidi
|
|
9
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/platform'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@angular/common'), require('@angular/cdk/scrolling'), require('@angular/cdk/bidi')) :
|
|
10
|
+
typeof define === 'function' && define.amd ? define('@angular/cdk/drag-drop', ['exports', '@angular/cdk/platform', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/common', '@angular/cdk/scrolling', '@angular/cdk/bidi'], factory) :
|
|
11
|
+
(factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.dragDrop = {}),global.ng.cdk.platform,global.ng.cdk.coercion,global.rxjs,global.rxjs.operators,global.ng.core,global.ng.common,global.ng.cdk.scrolling,global.ng.cdk.bidi));
|
|
12
|
+
}(this, (function (exports,platform,coercion,rxjs,operators,core,common,scrolling,bidi) { 'use strict';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @fileoverview added by tsickle
|
|
@@ -177,6 +177,10 @@ DragRef = /** @class */ (function () {
|
|
|
177
177
|
* Subscription to the event that is dispatched when the user lifts their pointer.
|
|
178
178
|
*/
|
|
179
179
|
this._pointerUpSubscription = rxjs.Subscription.EMPTY;
|
|
180
|
+
/**
|
|
181
|
+
* Subscription to the viewport being scrolled.
|
|
182
|
+
*/
|
|
183
|
+
this._scrollSubscription = rxjs.Subscription.EMPTY;
|
|
180
184
|
/**
|
|
181
185
|
* Cached reference to the boundary element.
|
|
182
186
|
*/
|
|
@@ -286,7 +290,13 @@ DragRef = /** @class */ (function () {
|
|
|
286
290
|
// direction. Note that this is preferrable over doing something like `skip(minimumDistance)`
|
|
287
291
|
// in the `pointerMove` subscription, because we're not guaranteed to have one move event
|
|
288
292
|
// per pixel of movement (e.g. if the user moves their pointer quickly).
|
|
289
|
-
if (isOverThreshold
|
|
293
|
+
if (isOverThreshold) {
|
|
294
|
+
/** @type {?} */
|
|
295
|
+
var isDelayElapsed = Date.now() >= _this._dragStartTime + (_this.dragStartDelay || 0);
|
|
296
|
+
if (!isDelayElapsed) {
|
|
297
|
+
_this._endDragSequence(event);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
290
300
|
// Prevent other drag sequences from starting while something in the container is still
|
|
291
301
|
// being dragged. This can happen while we're waiting for the drop animation to finish
|
|
292
302
|
// and can cause errors, because some elements might still be moving around.
|
|
@@ -357,47 +367,7 @@ DragRef = /** @class */ (function () {
|
|
|
357
367
|
* @return {?}
|
|
358
368
|
*/
|
|
359
369
|
function (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
|
-
function () {
|
|
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
|
-
function () {
|
|
398
|
-
_this._cleanupDragArtifacts(event);
|
|
399
|
-
_this._dragDropRegistry.stopDragging(_this);
|
|
400
|
-
}));
|
|
370
|
+
_this._endDragSequence(event);
|
|
401
371
|
});
|
|
402
372
|
this.withRootElement(element);
|
|
403
373
|
_dragDropRegistry.registerDragItem(this);
|
|
@@ -729,7 +699,9 @@ DragRef = /** @class */ (function () {
|
|
|
729
699
|
* @return {?}
|
|
730
700
|
*/
|
|
731
701
|
function () {
|
|
732
|
-
|
|
702
|
+
/** @type {?} */
|
|
703
|
+
var position = this.isDragging() ? this._activeTransform : this._passiveTransform;
|
|
704
|
+
return { x: position.x, y: position.y };
|
|
733
705
|
};
|
|
734
706
|
/**
|
|
735
707
|
* Sets the current position in pixels the draggable outside of a drop container.
|
|
@@ -758,6 +730,22 @@ DragRef = /** @class */ (function () {
|
|
|
758
730
|
}
|
|
759
731
|
return (/** @type {?} */ (this));
|
|
760
732
|
};
|
|
733
|
+
/** Updates the item's sort order based on the last-known pointer position. */
|
|
734
|
+
/**
|
|
735
|
+
* Updates the item's sort order based on the last-known pointer position.
|
|
736
|
+
* @return {?}
|
|
737
|
+
*/
|
|
738
|
+
DragRef.prototype._sortFromLastPointerPosition = /**
|
|
739
|
+
* Updates the item's sort order based on the last-known pointer position.
|
|
740
|
+
* @return {?}
|
|
741
|
+
*/
|
|
742
|
+
function () {
|
|
743
|
+
/** @type {?} */
|
|
744
|
+
var position = this._pointerPositionAtLastDirectionChange;
|
|
745
|
+
if (position && this._dropContainer) {
|
|
746
|
+
this._updateActiveDropContainer(position);
|
|
747
|
+
}
|
|
748
|
+
};
|
|
761
749
|
/** Unsubscribes from the global subscriptions. */
|
|
762
750
|
/**
|
|
763
751
|
* Unsubscribes from the global subscriptions.
|
|
@@ -772,6 +760,7 @@ DragRef = /** @class */ (function () {
|
|
|
772
760
|
function () {
|
|
773
761
|
this._pointerMoveSubscription.unsubscribe();
|
|
774
762
|
this._pointerUpSubscription.unsubscribe();
|
|
763
|
+
this._scrollSubscription.unsubscribe();
|
|
775
764
|
};
|
|
776
765
|
/** Destroys the preview element and its ViewRef. */
|
|
777
766
|
/**
|
|
@@ -813,6 +802,69 @@ DragRef = /** @class */ (function () {
|
|
|
813
802
|
}
|
|
814
803
|
this._placeholder = this._placeholderRef = (/** @type {?} */ (null));
|
|
815
804
|
};
|
|
805
|
+
/**
|
|
806
|
+
* Clears subscriptions and stops the dragging sequence.
|
|
807
|
+
* @param event Browser event object that ended the sequence.
|
|
808
|
+
*/
|
|
809
|
+
/**
|
|
810
|
+
* Clears subscriptions and stops the dragging sequence.
|
|
811
|
+
* @private
|
|
812
|
+
* @param {?} event Browser event object that ended the sequence.
|
|
813
|
+
* @return {?}
|
|
814
|
+
*/
|
|
815
|
+
DragRef.prototype._endDragSequence = /**
|
|
816
|
+
* Clears subscriptions and stops the dragging sequence.
|
|
817
|
+
* @private
|
|
818
|
+
* @param {?} event Browser event object that ended the sequence.
|
|
819
|
+
* @return {?}
|
|
820
|
+
*/
|
|
821
|
+
function (event) {
|
|
822
|
+
var _this = this;
|
|
823
|
+
// Note that here we use `isDragging` from the service, rather than from `this`.
|
|
824
|
+
// The difference is that the one from the service reflects whether a dragging sequence
|
|
825
|
+
// has been initiated, whereas the one on `this` includes whether the user has passed
|
|
826
|
+
// the minimum dragging threshold.
|
|
827
|
+
if (!this._dragDropRegistry.isDragging(this)) {
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
this._removeSubscriptions();
|
|
831
|
+
this._dragDropRegistry.stopDragging(this);
|
|
832
|
+
if (this._handles) {
|
|
833
|
+
this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;
|
|
834
|
+
}
|
|
835
|
+
if (!this._hasStartedDragging) {
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
this.released.next({ source: this });
|
|
839
|
+
if (this._dropContainer) {
|
|
840
|
+
// Stop scrolling immediately, instead of waiting for the animation to finish.
|
|
841
|
+
this._dropContainer._stopScrolling();
|
|
842
|
+
this._animatePreviewToPlaceholder().then((/**
|
|
843
|
+
* @return {?}
|
|
844
|
+
*/
|
|
845
|
+
function () {
|
|
846
|
+
_this._cleanupDragArtifacts(event);
|
|
847
|
+
_this._dragDropRegistry.stopDragging(_this);
|
|
848
|
+
}));
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
// Convert the active transform into a passive one. This means that next time
|
|
852
|
+
// the user starts dragging the item, its position will be calculated relatively
|
|
853
|
+
// to the new passive transform.
|
|
854
|
+
this._passiveTransform.x = this._activeTransform.x;
|
|
855
|
+
this._passiveTransform.y = this._activeTransform.y;
|
|
856
|
+
this._ngZone.run((/**
|
|
857
|
+
* @return {?}
|
|
858
|
+
*/
|
|
859
|
+
function () {
|
|
860
|
+
_this.ended.next({
|
|
861
|
+
source: _this,
|
|
862
|
+
distance: _this._getDragDistance(_this._getPointerPositionOnPage(event))
|
|
863
|
+
});
|
|
864
|
+
}));
|
|
865
|
+
this._dragDropRegistry.stopDragging(this);
|
|
866
|
+
}
|
|
867
|
+
};
|
|
816
868
|
/** Starts the dragging sequence. */
|
|
817
869
|
/**
|
|
818
870
|
* Starts the dragging sequence.
|
|
@@ -832,6 +884,7 @@ DragRef = /** @class */ (function () {
|
|
|
832
884
|
if (isTouchEvent(event)) {
|
|
833
885
|
this._lastTouchEventTime = Date.now();
|
|
834
886
|
}
|
|
887
|
+
this._toggleNativeDragInteractions();
|
|
835
888
|
if (this._dropContainer) {
|
|
836
889
|
/** @type {?} */
|
|
837
890
|
var element = this._rootElement;
|
|
@@ -874,6 +927,7 @@ DragRef = /** @class */ (function () {
|
|
|
874
927
|
* @return {?}
|
|
875
928
|
*/
|
|
876
929
|
function (referenceElement, event) {
|
|
930
|
+
var _this = this;
|
|
877
931
|
// Always stop propagation for the event that initializes
|
|
878
932
|
// the dragging sequence, in order to prevent it from potentially
|
|
879
933
|
// starting another sequence for a draggable parent somewhere up the DOM tree.
|
|
@@ -909,7 +963,6 @@ DragRef = /** @class */ (function () {
|
|
|
909
963
|
this._rootElementTapHighlight = rootElement.style.webkitTapHighlightColor;
|
|
910
964
|
rootElement.style.webkitTapHighlightColor = 'transparent';
|
|
911
965
|
}
|
|
912
|
-
this._toggleNativeDragInteractions();
|
|
913
966
|
this._hasStartedDragging = this._hasMoved = false;
|
|
914
967
|
this._initialContainer = (/** @type {?} */ (this._dropContainer));
|
|
915
968
|
// Avoid multiple subscriptions and memory leaks when multi touch
|
|
@@ -917,7 +970,12 @@ DragRef = /** @class */ (function () {
|
|
|
917
970
|
this._removeSubscriptions();
|
|
918
971
|
this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);
|
|
919
972
|
this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);
|
|
920
|
-
this.
|
|
973
|
+
this._scrollSubscription = this._dragDropRegistry.scroll.pipe(operators.startWith(null)).subscribe((/**
|
|
974
|
+
* @return {?}
|
|
975
|
+
*/
|
|
976
|
+
function () {
|
|
977
|
+
_this._scrollPosition = _this._viewportRuler.getViewportScrollPosition();
|
|
978
|
+
}));
|
|
921
979
|
if (this._boundaryElement) {
|
|
922
980
|
this._boundaryRect = this._boundaryElement.getBoundingClientRect();
|
|
923
981
|
}
|
|
@@ -1041,6 +1099,7 @@ DragRef = /** @class */ (function () {
|
|
|
1041
1099
|
});
|
|
1042
1100
|
}));
|
|
1043
1101
|
}
|
|
1102
|
+
(/** @type {?} */ (this._dropContainer))._startScrollingIfNecessary(x, y);
|
|
1044
1103
|
(/** @type {?} */ (this._dropContainer))._sortItem(this, x, y, this._pointerDirectionDelta);
|
|
1045
1104
|
this._preview.style.transform =
|
|
1046
1105
|
getTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);
|
|
@@ -1269,7 +1328,7 @@ DragRef = /** @class */ (function () {
|
|
|
1269
1328
|
/** @type {?} */
|
|
1270
1329
|
var point = this._getPointerPositionOnPage(event);
|
|
1271
1330
|
/** @type {?} */
|
|
1272
|
-
var constrainedPoint = this.constrainPosition ? this.constrainPosition(point) : point;
|
|
1331
|
+
var constrainedPoint = this.constrainPosition ? this.constrainPosition(point, this) : point;
|
|
1273
1332
|
/** @type {?} */
|
|
1274
1333
|
var dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;
|
|
1275
1334
|
if (this.lockAxis === 'x' || dropContainerLock === 'x') {
|
|
@@ -1351,7 +1410,7 @@ DragRef = /** @class */ (function () {
|
|
|
1351
1410
|
return;
|
|
1352
1411
|
}
|
|
1353
1412
|
/** @type {?} */
|
|
1354
|
-
var shouldEnable = this.
|
|
1413
|
+
var shouldEnable = this._handles.length > 0 || !this.isDragging();
|
|
1355
1414
|
if (shouldEnable !== this._nativeInteractionsEnabled) {
|
|
1356
1415
|
this._nativeInteractionsEnabled = shouldEnable;
|
|
1357
1416
|
toggleNativeDragInteractions(this._rootElement, shouldEnable);
|
|
@@ -1502,7 +1561,10 @@ function removeElement(element) {
|
|
|
1502
1561
|
* @return {?}
|
|
1503
1562
|
*/
|
|
1504
1563
|
function isTouchEvent(event) {
|
|
1505
|
-
|
|
1564
|
+
// This function is called for every pixel that the user has dragged so we need it to be
|
|
1565
|
+
// as fast as possible. Since we only bind mouse events and touch events, we can assume
|
|
1566
|
+
// that if the event's name starts with `t`, it's a touch event.
|
|
1567
|
+
return event.type[0] === 't';
|
|
1506
1568
|
}
|
|
1507
1569
|
/**
|
|
1508
1570
|
* Gets the element into which the drag preview should be inserted.
|
|
@@ -1611,6 +1673,18 @@ var _uniqueIdCounter = 0;
|
|
|
1611
1673
|
* @type {?}
|
|
1612
1674
|
*/
|
|
1613
1675
|
var DROP_PROXIMITY_THRESHOLD = 0.05;
|
|
1676
|
+
/**
|
|
1677
|
+
* Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the
|
|
1678
|
+
* viewport. The value comes from trying it out manually until it feels right.
|
|
1679
|
+
* @type {?}
|
|
1680
|
+
*/
|
|
1681
|
+
var SCROLL_PROXIMITY_THRESHOLD = 0.05;
|
|
1682
|
+
/**
|
|
1683
|
+
* Number of pixels to scroll for each frame when auto-scrolling an element.
|
|
1684
|
+
* The value comes from trying it out manually until it feels right.
|
|
1685
|
+
* @type {?}
|
|
1686
|
+
*/
|
|
1687
|
+
var AUTO_SCROLL_STEP = 2;
|
|
1614
1688
|
/**
|
|
1615
1689
|
* Reference to a drop list. Used to manipulate or dispose of the container.
|
|
1616
1690
|
* \@docs-private
|
|
@@ -1622,8 +1696,11 @@ var /**
|
|
|
1622
1696
|
* @template T
|
|
1623
1697
|
*/
|
|
1624
1698
|
DropListRef = /** @class */ (function () {
|
|
1625
|
-
function DropListRef(element, _dragDropRegistry, _document) {
|
|
1699
|
+
function DropListRef(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {
|
|
1700
|
+
var _this = this;
|
|
1626
1701
|
this._dragDropRegistry = _dragDropRegistry;
|
|
1702
|
+
this._ngZone = _ngZone;
|
|
1703
|
+
this._viewportRuler = _viewportRuler;
|
|
1627
1704
|
/**
|
|
1628
1705
|
* Unique ID for the drop list.
|
|
1629
1706
|
* @deprecated No longer being used. To be removed.
|
|
@@ -1638,6 +1715,11 @@ DropListRef = /** @class */ (function () {
|
|
|
1638
1715
|
* Whether sorting items within the list is disabled.
|
|
1639
1716
|
*/
|
|
1640
1717
|
this.sortingDisabled = true;
|
|
1718
|
+
/**
|
|
1719
|
+
* Whether auto-scrolling the view when the user
|
|
1720
|
+
* moves their pointer close to the edges is disabled.
|
|
1721
|
+
*/
|
|
1722
|
+
this.autoScrollDisabled = false;
|
|
1641
1723
|
/**
|
|
1642
1724
|
* Function that is used to determine whether an item
|
|
1643
1725
|
* is allowed to be moved into a drop container.
|
|
@@ -1675,6 +1757,14 @@ DropListRef = /** @class */ (function () {
|
|
|
1675
1757
|
* Cache of the dimensions of all the items inside the container.
|
|
1676
1758
|
*/
|
|
1677
1759
|
this._itemPositions = [];
|
|
1760
|
+
/**
|
|
1761
|
+
* Keeps track of the container's scroll position.
|
|
1762
|
+
*/
|
|
1763
|
+
this._scrollPosition = { top: 0, left: 0 };
|
|
1764
|
+
/**
|
|
1765
|
+
* Keeps track of the scroll position of the viewport.
|
|
1766
|
+
*/
|
|
1767
|
+
this._viewportScrollPosition = { top: 0, left: 0 };
|
|
1678
1768
|
/**
|
|
1679
1769
|
* Keeps track of the item that was last swapped with the dragged item, as
|
|
1680
1770
|
* well as what direction the pointer was moving in when the swap occured.
|
|
@@ -1696,6 +1786,66 @@ DropListRef = /** @class */ (function () {
|
|
|
1696
1786
|
* Layout direction of the drop list.
|
|
1697
1787
|
*/
|
|
1698
1788
|
this._direction = 'ltr';
|
|
1789
|
+
/**
|
|
1790
|
+
* Subscription to the window being scrolled.
|
|
1791
|
+
*/
|
|
1792
|
+
this._viewportScrollSubscription = rxjs.Subscription.EMPTY;
|
|
1793
|
+
/**
|
|
1794
|
+
* Vertical direction in which the list is currently scrolling.
|
|
1795
|
+
*/
|
|
1796
|
+
this._verticalScrollDirection = 0 /* NONE */;
|
|
1797
|
+
/**
|
|
1798
|
+
* Horizontal direction in which the list is currently scrolling.
|
|
1799
|
+
*/
|
|
1800
|
+
this._horizontalScrollDirection = 0 /* NONE */;
|
|
1801
|
+
/**
|
|
1802
|
+
* Used to signal to the current auto-scroll sequence when to stop.
|
|
1803
|
+
*/
|
|
1804
|
+
this._stopScrollTimers = new rxjs.Subject();
|
|
1805
|
+
/**
|
|
1806
|
+
* Handles the container being scrolled. Has to be an arrow function to preserve the context.
|
|
1807
|
+
*/
|
|
1808
|
+
this._handleScroll = (/**
|
|
1809
|
+
* @return {?}
|
|
1810
|
+
*/
|
|
1811
|
+
function () {
|
|
1812
|
+
if (!_this.isDragging()) {
|
|
1813
|
+
return;
|
|
1814
|
+
}
|
|
1815
|
+
/** @type {?} */
|
|
1816
|
+
var element = coercion.coerceElement(_this.element);
|
|
1817
|
+
_this._updateAfterScroll(_this._scrollPosition, element.scrollTop, element.scrollLeft);
|
|
1818
|
+
});
|
|
1819
|
+
/**
|
|
1820
|
+
* Starts the interval that'll auto-scroll the element.
|
|
1821
|
+
*/
|
|
1822
|
+
this._startScrollInterval = (/**
|
|
1823
|
+
* @return {?}
|
|
1824
|
+
*/
|
|
1825
|
+
function () {
|
|
1826
|
+
_this._stopScrolling();
|
|
1827
|
+
rxjs.interval(0, rxjs.animationFrameScheduler)
|
|
1828
|
+
.pipe(operators.takeUntil(_this._stopScrollTimers))
|
|
1829
|
+
.subscribe((/**
|
|
1830
|
+
* @return {?}
|
|
1831
|
+
*/
|
|
1832
|
+
function () {
|
|
1833
|
+
/** @type {?} */
|
|
1834
|
+
var node = _this._scrollNode;
|
|
1835
|
+
if (_this._verticalScrollDirection === 1 /* UP */) {
|
|
1836
|
+
incrementVerticalScroll(node, -AUTO_SCROLL_STEP);
|
|
1837
|
+
}
|
|
1838
|
+
else if (_this._verticalScrollDirection === 2 /* DOWN */) {
|
|
1839
|
+
incrementVerticalScroll(node, AUTO_SCROLL_STEP);
|
|
1840
|
+
}
|
|
1841
|
+
if (_this._horizontalScrollDirection === 1 /* LEFT */) {
|
|
1842
|
+
incrementHorizontalScroll(node, -AUTO_SCROLL_STEP);
|
|
1843
|
+
}
|
|
1844
|
+
else if (_this._horizontalScrollDirection === 2 /* RIGHT */) {
|
|
1845
|
+
incrementHorizontalScroll(node, AUTO_SCROLL_STEP);
|
|
1846
|
+
}
|
|
1847
|
+
}));
|
|
1848
|
+
});
|
|
1699
1849
|
_dragDropRegistry.registerDropContainer(this);
|
|
1700
1850
|
this._document = _document;
|
|
1701
1851
|
this.element = element instanceof core.ElementRef ? element.nativeElement : element;
|
|
@@ -1710,12 +1860,16 @@ DropListRef = /** @class */ (function () {
|
|
|
1710
1860
|
* @return {?}
|
|
1711
1861
|
*/
|
|
1712
1862
|
function () {
|
|
1863
|
+
this._stopScrolling();
|
|
1864
|
+
this._stopScrollTimers.complete();
|
|
1865
|
+
this._removeListeners();
|
|
1713
1866
|
this.beforeStarted.complete();
|
|
1714
1867
|
this.entered.complete();
|
|
1715
1868
|
this.exited.complete();
|
|
1716
1869
|
this.dropped.complete();
|
|
1717
1870
|
this.sorted.complete();
|
|
1718
1871
|
this._activeSiblings.clear();
|
|
1872
|
+
this._scrollNode = (/** @type {?} */ (null));
|
|
1719
1873
|
this._dragDropRegistry.removeDropContainer(this);
|
|
1720
1874
|
};
|
|
1721
1875
|
/** Whether an item from this list is currently being dragged. */
|
|
@@ -1741,6 +1895,8 @@ DropListRef = /** @class */ (function () {
|
|
|
1741
1895
|
*/
|
|
1742
1896
|
function () {
|
|
1743
1897
|
var _this = this;
|
|
1898
|
+
/** @type {?} */
|
|
1899
|
+
var element = coercion.coerceElement(this.element);
|
|
1744
1900
|
this.beforeStarted.next();
|
|
1745
1901
|
this._isDragging = true;
|
|
1746
1902
|
this._cacheItems();
|
|
@@ -1749,6 +1905,31 @@ DropListRef = /** @class */ (function () {
|
|
|
1749
1905
|
* @return {?}
|
|
1750
1906
|
*/
|
|
1751
1907
|
function (sibling) { return sibling._startReceiving(_this); }));
|
|
1908
|
+
this._removeListeners();
|
|
1909
|
+
// @breaking-change 9.0.0 Remove check for _ngZone once it's marked as a required param.
|
|
1910
|
+
if (this._ngZone) {
|
|
1911
|
+
this._ngZone.runOutsideAngular((/**
|
|
1912
|
+
* @return {?}
|
|
1913
|
+
*/
|
|
1914
|
+
function () { return element.addEventListener('scroll', _this._handleScroll); }));
|
|
1915
|
+
}
|
|
1916
|
+
else {
|
|
1917
|
+
element.addEventListener('scroll', this._handleScroll);
|
|
1918
|
+
}
|
|
1919
|
+
// @breaking-change 9.0.0 Remove check for _viewportRuler once it's marked as a required param.
|
|
1920
|
+
if (this._viewportRuler) {
|
|
1921
|
+
this._viewportScrollPosition = this._viewportRuler.getViewportScrollPosition();
|
|
1922
|
+
this._viewportScrollSubscription = this._dragDropRegistry.scroll.subscribe((/**
|
|
1923
|
+
* @return {?}
|
|
1924
|
+
*/
|
|
1925
|
+
function () {
|
|
1926
|
+
if (_this.isDragging()) {
|
|
1927
|
+
/** @type {?} */
|
|
1928
|
+
var newPosition = (/** @type {?} */ (_this._viewportRuler)).getViewportScrollPosition();
|
|
1929
|
+
_this._updateAfterScroll(_this._viewportScrollPosition, newPosition.top, newPosition.left, _this._clientRect);
|
|
1930
|
+
}
|
|
1931
|
+
}));
|
|
1932
|
+
}
|
|
1752
1933
|
};
|
|
1753
1934
|
/**
|
|
1754
1935
|
* Emits an event to indicate that the user moved an item into the container.
|
|
@@ -2132,6 +2313,91 @@ DropListRef = /** @class */ (function () {
|
|
|
2132
2313
|
}
|
|
2133
2314
|
}));
|
|
2134
2315
|
};
|
|
2316
|
+
/**
|
|
2317
|
+
* Checks whether the user's pointer is close to the edges of either the
|
|
2318
|
+
* viewport or the drop list and starts the auto-scroll sequence.
|
|
2319
|
+
* @param pointerX User's pointer position along the x axis.
|
|
2320
|
+
* @param pointerY User's pointer position along the y axis.
|
|
2321
|
+
*/
|
|
2322
|
+
/**
|
|
2323
|
+
* Checks whether the user's pointer is close to the edges of either the
|
|
2324
|
+
* viewport or the drop list and starts the auto-scroll sequence.
|
|
2325
|
+
* @param {?} pointerX User's pointer position along the x axis.
|
|
2326
|
+
* @param {?} pointerY User's pointer position along the y axis.
|
|
2327
|
+
* @return {?}
|
|
2328
|
+
*/
|
|
2329
|
+
DropListRef.prototype._startScrollingIfNecessary = /**
|
|
2330
|
+
* Checks whether the user's pointer is close to the edges of either the
|
|
2331
|
+
* viewport or the drop list and starts the auto-scroll sequence.
|
|
2332
|
+
* @param {?} pointerX User's pointer position along the x axis.
|
|
2333
|
+
* @param {?} pointerY User's pointer position along the y axis.
|
|
2334
|
+
* @return {?}
|
|
2335
|
+
*/
|
|
2336
|
+
function (pointerX, pointerY) {
|
|
2337
|
+
if (this.autoScrollDisabled) {
|
|
2338
|
+
return;
|
|
2339
|
+
}
|
|
2340
|
+
/** @type {?} */
|
|
2341
|
+
var scrollNode;
|
|
2342
|
+
/** @type {?} */
|
|
2343
|
+
var verticalScrollDirection = 0 /* NONE */;
|
|
2344
|
+
/** @type {?} */
|
|
2345
|
+
var horizontalScrollDirection = 0 /* NONE */;
|
|
2346
|
+
// @breaking-change 9.0.0 Remove null check for _viewportRuler once it's a required parameter.
|
|
2347
|
+
// Check whether we're in range to scroll the viewport.
|
|
2348
|
+
if (this._viewportRuler) {
|
|
2349
|
+
var _a = this._viewportRuler.getViewportSize(), width = _a.width, height = _a.height;
|
|
2350
|
+
/** @type {?} */
|
|
2351
|
+
var clientRect = { width: width, height: height, top: 0, right: width, bottom: height, left: 0 };
|
|
2352
|
+
verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);
|
|
2353
|
+
horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);
|
|
2354
|
+
scrollNode = window;
|
|
2355
|
+
}
|
|
2356
|
+
// If we couldn't find a scroll direction based on the
|
|
2357
|
+
// window, try with the container, if the pointer is close by.
|
|
2358
|
+
if (!verticalScrollDirection && !horizontalScrollDirection &&
|
|
2359
|
+
this._isPointerNearDropContainer(pointerX, pointerY)) {
|
|
2360
|
+
verticalScrollDirection = getVerticalScrollDirection(this._clientRect, pointerY);
|
|
2361
|
+
horizontalScrollDirection = getHorizontalScrollDirection(this._clientRect, pointerX);
|
|
2362
|
+
scrollNode = coercion.coerceElement(this.element);
|
|
2363
|
+
}
|
|
2364
|
+
// TODO(crisbeto): we also need to account for whether the view or element are scrollable in
|
|
2365
|
+
// the first place. With the current approach we'll still try to scroll them, but it just
|
|
2366
|
+
// won't do anything. The only case where this is relevant is that if we have a scrollable
|
|
2367
|
+
// list close to the viewport edge where the viewport isn't scrollable. In this case the
|
|
2368
|
+
// we'll be trying to scroll the viewport rather than the list.
|
|
2369
|
+
if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection ||
|
|
2370
|
+
horizontalScrollDirection !== this._horizontalScrollDirection ||
|
|
2371
|
+
scrollNode !== this._scrollNode)) {
|
|
2372
|
+
this._verticalScrollDirection = verticalScrollDirection;
|
|
2373
|
+
this._horizontalScrollDirection = horizontalScrollDirection;
|
|
2374
|
+
this._scrollNode = scrollNode;
|
|
2375
|
+
if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {
|
|
2376
|
+
// @breaking-change 9.0.0 Remove null check for `_ngZone` once it is made required.
|
|
2377
|
+
if (this._ngZone) {
|
|
2378
|
+
this._ngZone.runOutsideAngular(this._startScrollInterval);
|
|
2379
|
+
}
|
|
2380
|
+
else {
|
|
2381
|
+
this._startScrollInterval();
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
else {
|
|
2385
|
+
this._stopScrolling();
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
};
|
|
2389
|
+
/** Stops any currently-running auto-scroll sequences. */
|
|
2390
|
+
/**
|
|
2391
|
+
* Stops any currently-running auto-scroll sequences.
|
|
2392
|
+
* @return {?}
|
|
2393
|
+
*/
|
|
2394
|
+
DropListRef.prototype._stopScrolling = /**
|
|
2395
|
+
* Stops any currently-running auto-scroll sequences.
|
|
2396
|
+
* @return {?}
|
|
2397
|
+
*/
|
|
2398
|
+
function () {
|
|
2399
|
+
this._stopScrollTimers.next();
|
|
2400
|
+
};
|
|
2135
2401
|
/** Caches the position of the drop list. */
|
|
2136
2402
|
/**
|
|
2137
2403
|
* Caches the position of the drop list.
|
|
@@ -2144,7 +2410,10 @@ DropListRef = /** @class */ (function () {
|
|
|
2144
2410
|
* @return {?}
|
|
2145
2411
|
*/
|
|
2146
2412
|
function () {
|
|
2147
|
-
|
|
2413
|
+
/** @type {?} */
|
|
2414
|
+
var element = coercion.coerceElement(this.element);
|
|
2415
|
+
this._clientRect = getMutableClientRect(element);
|
|
2416
|
+
this._scrollPosition = { top: element.scrollTop, left: element.scrollLeft };
|
|
2148
2417
|
};
|
|
2149
2418
|
/** Refreshes the position cache of the items and sibling containers. */
|
|
2150
2419
|
/**
|
|
@@ -2172,24 +2441,7 @@ DropListRef = /** @class */ (function () {
|
|
|
2172
2441
|
// placeholder, because the element is hidden.
|
|
2173
2442
|
drag.getPlaceholderElement() :
|
|
2174
2443
|
drag.getRootElement();
|
|
2175
|
-
|
|
2176
|
-
var clientRect = elementToMeasure.getBoundingClientRect();
|
|
2177
|
-
return {
|
|
2178
|
-
drag: drag,
|
|
2179
|
-
offset: 0,
|
|
2180
|
-
// We need to clone the `clientRect` here, because all the values on it are readonly
|
|
2181
|
-
// and we need to be able to update them. Also we can't use a spread here, because
|
|
2182
|
-
// the values on a `ClientRect` aren't own properties. See:
|
|
2183
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
|
|
2184
|
-
clientRect: {
|
|
2185
|
-
top: clientRect.top,
|
|
2186
|
-
right: clientRect.right,
|
|
2187
|
-
bottom: clientRect.bottom,
|
|
2188
|
-
left: clientRect.left,
|
|
2189
|
-
width: clientRect.width,
|
|
2190
|
-
height: clientRect.height
|
|
2191
|
-
}
|
|
2192
|
-
};
|
|
2444
|
+
return { drag: drag, offset: 0, clientRect: getMutableClientRect(elementToMeasure) };
|
|
2193
2445
|
})).sort((/**
|
|
2194
2446
|
* @param {?} a
|
|
2195
2447
|
* @param {?} b
|
|
@@ -2229,6 +2481,8 @@ DropListRef = /** @class */ (function () {
|
|
|
2229
2481
|
this._itemPositions = [];
|
|
2230
2482
|
this._previousSwap.drag = null;
|
|
2231
2483
|
this._previousSwap.delta = 0;
|
|
2484
|
+
this._stopScrolling();
|
|
2485
|
+
this._removeListeners();
|
|
2232
2486
|
};
|
|
2233
2487
|
/**
|
|
2234
2488
|
* Gets the offset in pixels by which the items that aren't being dragged should be moved.
|
|
@@ -2416,6 +2670,89 @@ DropListRef = /** @class */ (function () {
|
|
|
2416
2670
|
this._cacheItemPositions();
|
|
2417
2671
|
this._cacheOwnPosition();
|
|
2418
2672
|
};
|
|
2673
|
+
/**
|
|
2674
|
+
* Updates the internal state of the container after a scroll event has happened.
|
|
2675
|
+
* @param scrollPosition Object that is keeping track of the scroll position.
|
|
2676
|
+
* @param newTop New top scroll position.
|
|
2677
|
+
* @param newLeft New left scroll position.
|
|
2678
|
+
* @param extraClientRect Extra `ClientRect` object that should be updated, in addition to the
|
|
2679
|
+
* ones of the drag items. Useful when the viewport has been scrolled and we also need to update
|
|
2680
|
+
* the `ClientRect` of the list.
|
|
2681
|
+
*/
|
|
2682
|
+
/**
|
|
2683
|
+
* Updates the internal state of the container after a scroll event has happened.
|
|
2684
|
+
* @private
|
|
2685
|
+
* @param {?} scrollPosition Object that is keeping track of the scroll position.
|
|
2686
|
+
* @param {?} newTop New top scroll position.
|
|
2687
|
+
* @param {?} newLeft New left scroll position.
|
|
2688
|
+
* @param {?=} extraClientRect Extra `ClientRect` object that should be updated, in addition to the
|
|
2689
|
+
* ones of the drag items. Useful when the viewport has been scrolled and we also need to update
|
|
2690
|
+
* the `ClientRect` of the list.
|
|
2691
|
+
* @return {?}
|
|
2692
|
+
*/
|
|
2693
|
+
DropListRef.prototype._updateAfterScroll = /**
|
|
2694
|
+
* Updates the internal state of the container after a scroll event has happened.
|
|
2695
|
+
* @private
|
|
2696
|
+
* @param {?} scrollPosition Object that is keeping track of the scroll position.
|
|
2697
|
+
* @param {?} newTop New top scroll position.
|
|
2698
|
+
* @param {?} newLeft New left scroll position.
|
|
2699
|
+
* @param {?=} extraClientRect Extra `ClientRect` object that should be updated, in addition to the
|
|
2700
|
+
* ones of the drag items. Useful when the viewport has been scrolled and we also need to update
|
|
2701
|
+
* the `ClientRect` of the list.
|
|
2702
|
+
* @return {?}
|
|
2703
|
+
*/
|
|
2704
|
+
function (scrollPosition, newTop, newLeft, extraClientRect) {
|
|
2705
|
+
var _this = this;
|
|
2706
|
+
/** @type {?} */
|
|
2707
|
+
var topDifference = scrollPosition.top - newTop;
|
|
2708
|
+
/** @type {?} */
|
|
2709
|
+
var leftDifference = scrollPosition.left - newLeft;
|
|
2710
|
+
if (extraClientRect) {
|
|
2711
|
+
adjustClientRect(extraClientRect, topDifference, leftDifference);
|
|
2712
|
+
}
|
|
2713
|
+
// Since we know the amount that the user has scrolled we can shift all of the client rectangles
|
|
2714
|
+
// ourselves. This is cheaper than re-measuring everything and we can avoid inconsistent
|
|
2715
|
+
// behavior where we might be measuring the element before its position has changed.
|
|
2716
|
+
this._itemPositions.forEach((/**
|
|
2717
|
+
* @param {?} __0
|
|
2718
|
+
* @return {?}
|
|
2719
|
+
*/
|
|
2720
|
+
function (_a) {
|
|
2721
|
+
var clientRect = _a.clientRect;
|
|
2722
|
+
adjustClientRect(clientRect, topDifference, leftDifference);
|
|
2723
|
+
}));
|
|
2724
|
+
// We need two loops for this, because we want all of the cached
|
|
2725
|
+
// positions to be up-to-date before we re-sort the item.
|
|
2726
|
+
this._itemPositions.forEach((/**
|
|
2727
|
+
* @param {?} __0
|
|
2728
|
+
* @return {?}
|
|
2729
|
+
*/
|
|
2730
|
+
function (_a) {
|
|
2731
|
+
var drag = _a.drag;
|
|
2732
|
+
if (_this._dragDropRegistry.isDragging(drag)) {
|
|
2733
|
+
// We need to re-sort the item manually, because the pointer move
|
|
2734
|
+
// events won't be dispatched while the user is scrolling.
|
|
2735
|
+
drag._sortFromLastPointerPosition();
|
|
2736
|
+
}
|
|
2737
|
+
}));
|
|
2738
|
+
scrollPosition.top = newTop;
|
|
2739
|
+
scrollPosition.left = newLeft;
|
|
2740
|
+
};
|
|
2741
|
+
/** Removes the event listeners associated with this drop list. */
|
|
2742
|
+
/**
|
|
2743
|
+
* Removes the event listeners associated with this drop list.
|
|
2744
|
+
* @private
|
|
2745
|
+
* @return {?}
|
|
2746
|
+
*/
|
|
2747
|
+
DropListRef.prototype._removeListeners = /**
|
|
2748
|
+
* Removes the event listeners associated with this drop list.
|
|
2749
|
+
* @private
|
|
2750
|
+
* @return {?}
|
|
2751
|
+
*/
|
|
2752
|
+
function () {
|
|
2753
|
+
coercion.coerceElement(this.element).removeEventListener('scroll', this._handleScroll);
|
|
2754
|
+
this._viewportScrollSubscription.unsubscribe();
|
|
2755
|
+
};
|
|
2419
2756
|
/**
|
|
2420
2757
|
* Checks whether the user's pointer is positioned over the container.
|
|
2421
2758
|
* @param x Pointer position along the X axis.
|
|
@@ -2563,7 +2900,7 @@ function adjustClientRect(clientRect, top, left) {
|
|
|
2563
2900
|
}
|
|
2564
2901
|
/**
|
|
2565
2902
|
* Finds the index of an item that matches a predicate function. Used as an equivalent
|
|
2566
|
-
* of `Array.prototype.
|
|
2903
|
+
* of `Array.prototype.findIndex` which isn't part of the standard Google typings.
|
|
2567
2904
|
* @template T
|
|
2568
2905
|
* @param {?} array Array in which to look for matches.
|
|
2569
2906
|
* @param {?} predicate Function used to determine whether an item is a match.
|
|
@@ -2588,6 +2925,93 @@ function isInsideClientRect(clientRect, x, y) {
|
|
|
2588
2925
|
var top = clientRect.top, bottom = clientRect.bottom, left = clientRect.left, right = clientRect.right;
|
|
2589
2926
|
return y >= top && y <= bottom && x >= left && x <= right;
|
|
2590
2927
|
}
|
|
2928
|
+
/**
|
|
2929
|
+
* Gets a mutable version of an element's bounding `ClientRect`.
|
|
2930
|
+
* @param {?} element
|
|
2931
|
+
* @return {?}
|
|
2932
|
+
*/
|
|
2933
|
+
function getMutableClientRect(element) {
|
|
2934
|
+
/** @type {?} */
|
|
2935
|
+
var clientRect = element.getBoundingClientRect();
|
|
2936
|
+
// We need to clone the `clientRect` here, because all the values on it are readonly
|
|
2937
|
+
// and we need to be able to update them. Also we can't use a spread here, because
|
|
2938
|
+
// the values on a `ClientRect` aren't own properties. See:
|
|
2939
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
|
|
2940
|
+
return {
|
|
2941
|
+
top: clientRect.top,
|
|
2942
|
+
right: clientRect.right,
|
|
2943
|
+
bottom: clientRect.bottom,
|
|
2944
|
+
left: clientRect.left,
|
|
2945
|
+
width: clientRect.width,
|
|
2946
|
+
height: clientRect.height
|
|
2947
|
+
};
|
|
2948
|
+
}
|
|
2949
|
+
/**
|
|
2950
|
+
* Increments the vertical scroll position of a node.
|
|
2951
|
+
* @param {?} node Node whose scroll position should change.
|
|
2952
|
+
* @param {?} amount Amount of pixels that the `node` should be scrolled.
|
|
2953
|
+
* @return {?}
|
|
2954
|
+
*/
|
|
2955
|
+
function incrementVerticalScroll(node, amount) {
|
|
2956
|
+
if (node === window) {
|
|
2957
|
+
((/** @type {?} */ (node))).scrollBy(0, amount);
|
|
2958
|
+
}
|
|
2959
|
+
else {
|
|
2960
|
+
// Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
|
|
2961
|
+
((/** @type {?} */ (node))).scrollTop += amount;
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
/**
|
|
2965
|
+
* Increments the horizontal scroll position of a node.
|
|
2966
|
+
* @param {?} node Node whose scroll position should change.
|
|
2967
|
+
* @param {?} amount Amount of pixels that the `node` should be scrolled.
|
|
2968
|
+
* @return {?}
|
|
2969
|
+
*/
|
|
2970
|
+
function incrementHorizontalScroll(node, amount) {
|
|
2971
|
+
if (node === window) {
|
|
2972
|
+
((/** @type {?} */ (node))).scrollBy(amount, 0);
|
|
2973
|
+
}
|
|
2974
|
+
else {
|
|
2975
|
+
// Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
|
|
2976
|
+
((/** @type {?} */ (node))).scrollLeft += amount;
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* Gets whether the vertical auto-scroll direction of a node.
|
|
2981
|
+
* @param {?} clientRect Dimensions of the node.
|
|
2982
|
+
* @param {?} pointerY Position of the user's pointer along the y axis.
|
|
2983
|
+
* @return {?}
|
|
2984
|
+
*/
|
|
2985
|
+
function getVerticalScrollDirection(clientRect, pointerY) {
|
|
2986
|
+
var top = clientRect.top, bottom = clientRect.bottom, height = clientRect.height;
|
|
2987
|
+
/** @type {?} */
|
|
2988
|
+
var yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;
|
|
2989
|
+
if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {
|
|
2990
|
+
return 1 /* UP */;
|
|
2991
|
+
}
|
|
2992
|
+
else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {
|
|
2993
|
+
return 2 /* DOWN */;
|
|
2994
|
+
}
|
|
2995
|
+
return 0 /* NONE */;
|
|
2996
|
+
}
|
|
2997
|
+
/**
|
|
2998
|
+
* Gets whether the horizontal auto-scroll direction of a node.
|
|
2999
|
+
* @param {?} clientRect Dimensions of the node.
|
|
3000
|
+
* @param {?} pointerX Position of the user's pointer along the x axis.
|
|
3001
|
+
* @return {?}
|
|
3002
|
+
*/
|
|
3003
|
+
function getHorizontalScrollDirection(clientRect, pointerX) {
|
|
3004
|
+
var left = clientRect.left, right = clientRect.right, width = clientRect.width;
|
|
3005
|
+
/** @type {?} */
|
|
3006
|
+
var xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;
|
|
3007
|
+
if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {
|
|
3008
|
+
return 1 /* LEFT */;
|
|
3009
|
+
}
|
|
3010
|
+
else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {
|
|
3011
|
+
return 2 /* RIGHT */;
|
|
3012
|
+
}
|
|
3013
|
+
return 0 /* NONE */;
|
|
3014
|
+
}
|
|
2591
3015
|
|
|
2592
3016
|
/**
|
|
2593
3017
|
* @fileoverview added by tsickle
|
|
@@ -2640,6 +3064,10 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2640
3064
|
* while the user is dragging a drag item instance.
|
|
2641
3065
|
*/
|
|
2642
3066
|
this.pointerUp = new rxjs.Subject();
|
|
3067
|
+
/**
|
|
3068
|
+
* Emits when the viewport has been scrolled while the user is dragging an item.
|
|
3069
|
+
*/
|
|
3070
|
+
this.scroll = new rxjs.Subject();
|
|
2643
3071
|
/**
|
|
2644
3072
|
* Event listener that will prevent the default browser action while the user is dragging.
|
|
2645
3073
|
* @param event Event whose default action should be prevented.
|
|
@@ -2784,6 +3212,13 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2784
3212
|
*/
|
|
2785
3213
|
function (e) { return _this.pointerUp.next((/** @type {?} */ (e))); }),
|
|
2786
3214
|
options: true
|
|
3215
|
+
})
|
|
3216
|
+
.set('scroll', {
|
|
3217
|
+
handler: (/**
|
|
3218
|
+
* @param {?} e
|
|
3219
|
+
* @return {?}
|
|
3220
|
+
*/
|
|
3221
|
+
function (e) { return _this.scroll.next(e); })
|
|
2787
3222
|
})
|
|
2788
3223
|
// Preventing the default action on `mousemove` isn't enough to disable text selection
|
|
2789
3224
|
// on Safari so we need to prevent the selection event as well. Alternatively this can
|
|
@@ -2793,14 +3228,6 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2793
3228
|
handler: this._preventDefaultWhileDragging,
|
|
2794
3229
|
options: activeCapturingEventOptions
|
|
2795
3230
|
});
|
|
2796
|
-
// TODO(crisbeto): prevent mouse wheel scrolling while
|
|
2797
|
-
// dragging until we've set up proper scroll handling.
|
|
2798
|
-
if (!isTouchEvent) {
|
|
2799
|
-
this._globalListeners.set('wheel', {
|
|
2800
|
-
handler: this._preventDefaultWhileDragging,
|
|
2801
|
-
options: activeCapturingEventOptions
|
|
2802
|
-
});
|
|
2803
|
-
}
|
|
2804
3231
|
this._ngZone.runOutsideAngular((/**
|
|
2805
3232
|
* @return {?}
|
|
2806
3233
|
*/
|
|
@@ -2992,7 +3419,7 @@ var DragDrop = /** @class */ (function () {
|
|
|
2992
3419
|
* @return {?}
|
|
2993
3420
|
*/
|
|
2994
3421
|
function (element) {
|
|
2995
|
-
return new DropListRef(element, this._dragDropRegistry, this._document);
|
|
3422
|
+
return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
|
|
2996
3423
|
};
|
|
2997
3424
|
DragDrop.decorators = [
|
|
2998
3425
|
{ type: core.Injectable, args: [{ providedIn: 'root' },] },
|
|
@@ -3820,6 +4247,10 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3820
4247
|
* @return {?}
|
|
3821
4248
|
*/
|
|
3822
4249
|
function () { return true; });
|
|
4250
|
+
/**
|
|
4251
|
+
* Whether to auto-scroll the view when the user moves their pointer close to the edges.
|
|
4252
|
+
*/
|
|
4253
|
+
this.autoScrollDisabled = false;
|
|
3823
4254
|
/**
|
|
3824
4255
|
* Emits when the user drops an item inside the container.
|
|
3825
4256
|
*/
|
|
@@ -4158,6 +4589,7 @@ var CdkDropList = /** @class */ (function () {
|
|
|
4158
4589
|
ref.disabled = _this.disabled;
|
|
4159
4590
|
ref.lockAxis = _this.lockAxis;
|
|
4160
4591
|
ref.sortingDisabled = _this.sortingDisabled;
|
|
4592
|
+
ref.autoScrollDisabled = _this.autoScrollDisabled;
|
|
4161
4593
|
ref
|
|
4162
4594
|
.connectedTo(siblings.filter((/**
|
|
4163
4595
|
* @param {?} drop
|
|
@@ -4292,6 +4724,7 @@ var CdkDropList = /** @class */ (function () {
|
|
|
4292
4724
|
disabled: [{ type: core.Input, args: ['cdkDropListDisabled',] }],
|
|
4293
4725
|
sortingDisabled: [{ type: core.Input, args: ['cdkDropListSortingDisabled',] }],
|
|
4294
4726
|
enterPredicate: [{ type: core.Input, args: ['cdkDropListEnterPredicate',] }],
|
|
4727
|
+
autoScrollDisabled: [{ type: core.Input, args: ['cdkDropListAutoScrollDisabled',] }],
|
|
4295
4728
|
dropped: [{ type: core.Output, args: ['cdkDropListDropped',] }],
|
|
4296
4729
|
entered: [{ type: core.Output, args: ['cdkDropListEntered',] }],
|
|
4297
4730
|
exited: [{ type: core.Output, args: ['cdkDropListExited',] }],
|