@angular/cdk 8.0.0-beta.2 → 8.0.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/README.md +2 -2
- package/_overlay.scss +4 -4
- package/bundles/cdk-a11y.umd.js +227 -79
- 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-accordion.umd.js +20 -8
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +5 -5
- package/bundles/cdk-bidi.umd.min.js +1 -1
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +5 -5
- package/bundles/cdk-collections.umd.js +38 -15
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +571 -180
- 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-keycodes.umd.js +7 -3
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +83 -30
- 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-observers.umd.js +30 -11
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +1 -1
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +229 -108
- 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-platform.umd.js +17 -10
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +1 -1
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +32 -13
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +184 -62
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +30 -12
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +384 -74
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +1 -1
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +61 -21
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +1 -1
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +85 -29
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +2 -2
- 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 +11 -2
- package/drag-drop/typings/drag-events.d.ts +17 -0
- package/drag-drop/typings/drag-ref.d.ts +9 -5
- package/drag-drop/typings/drop-list-ref.d.ts +9 -3
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +229 -81
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +22 -10
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/bidi.js +8 -8
- package/esm2015/cdk.js +4 -4
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +7 -7
- package/esm2015/collections.js +41 -18
- package/esm2015/collections.js.map +1 -1
- package/esm2015/drag-drop.js +540 -181
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +9 -5
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +89 -36
- package/esm2015/layout.js.map +1 -1
- package/esm2015/observers.js +33 -14
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +232 -110
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +20 -13
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +34 -15
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +180 -58
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +32 -14
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +369 -69
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +64 -24
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js +86 -30
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +230 -82
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +22 -10
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/bidi.es5.js +8 -8
- package/esm5/cdk.es5.js +4 -4
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +7 -7
- package/esm5/collections.es5.js +42 -19
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +574 -183
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +9 -5
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +86 -33
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/observers.es5.js +33 -14
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +232 -111
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +20 -13
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +34 -15
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +187 -65
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +32 -14
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +386 -72
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +64 -24
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js +87 -31
- package/esm5/tree.es5.js.map +1 -1
- package/layout/typings/breakpoints-observer.d.ts +3 -3
- package/layout/typings/index.metadata.json +1 -1
- package/layout/typings/media-matcher.d.ts +2 -2
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/position/flexible-connected-position-strategy.d.ts +1 -3
- package/package.json +8 -8
- package/portal/typings/portal.d.ts +2 -2
- package/schematics/ng-update/data/attribute-selectors.js +1 -1
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.js +3 -3
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.js +1 -1
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/input-names.js +1 -1
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.js +1 -1
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/property-names.js +4 -4
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +1 -1
- package/schematics/tsconfig.tsbuildinfo +5811 -0
- package/schematics/utils/ast.d.ts +1 -1
- package/schematics/utils/build-component.js +1 -1
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/utils/get-project.d.ts +1 -1
- package/schematics/utils/project-main-file.d.ts +1 -1
- package/schematics/utils/project-style-file.d.ts +1 -1
- package/schematics/utils/project-targets.d.ts +1 -1
- package/schematics/utils/schematic-options.d.ts +1 -1
- package/table/typings/cell.d.ts +3 -2
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/public-api.d.ts +1 -0
- package/table/typings/row.d.ts +5 -4
- package/table/typings/sticky-styler.d.ts +5 -5
- package/table/typings/table-errors.d.ts +10 -0
- package/table/typings/text-column.d.ts +80 -0
- package/typings/drag-drop/directives/drag.d.ts +11 -2
- package/typings/drag-drop/drag-events.d.ts +17 -0
- package/typings/drag-drop/drag-ref.d.ts +9 -5
- package/typings/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +11 -2
- package/typings/esm5/drag-drop/drag-events.d.ts +17 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +9 -5
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/layout/breakpoints-observer.d.ts +3 -3
- package/typings/esm5/layout/index.metadata.json +1 -1
- package/typings/esm5/layout/media-matcher.d.ts +2 -2
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/esm5/portal/portal.d.ts +2 -2
- package/typings/esm5/table/cell.d.ts +3 -2
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/public-api.d.ts +1 -0
- package/typings/esm5/table/row.d.ts +5 -4
- package/typings/esm5/table/sticky-styler.d.ts +5 -5
- package/typings/esm5/table/table-errors.d.ts +10 -0
- package/typings/esm5/table/text-column.d.ts +80 -0
- package/typings/index.metadata.json +1 -1
- package/typings/layout/breakpoints-observer.d.ts +3 -3
- package/typings/layout/index.metadata.json +1 -1
- package/typings/layout/media-matcher.d.ts +2 -2
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/portal/portal.d.ts +2 -2
- package/typings/schematics/utils/ast.d.ts +1 -1
- package/typings/schematics/utils/get-project.d.ts +1 -1
- package/typings/schematics/utils/project-main-file.d.ts +1 -1
- package/typings/schematics/utils/project-style-file.d.ts +1 -1
- package/typings/schematics/utils/project-targets.d.ts +1 -1
- package/typings/schematics/utils/schematic-options.d.ts +1 -1
- package/typings/table/cell.d.ts +3 -2
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/public-api.d.ts +1 -0
- package/typings/table/row.d.ts +5 -4
- package/typings/table/sticky-styler.d.ts +5 -5
- package/typings/table/table-errors.d.ts +10 -0
- package/typings/table/text-column.d.ts +80 -0
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @fileoverview added by tsickle
|
|
16
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
16
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
17
17
|
*/
|
|
18
18
|
/**
|
|
19
19
|
* Shallow-extends a stylesheet object with another stylesheet object.
|
|
@@ -53,7 +53,7 @@ function toggleNativeDragInteractions(element, enable) {
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* @fileoverview added by tsickle
|
|
56
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
56
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -78,7 +78,11 @@ function getTransformTransitionDurationInMs(element) {
|
|
|
78
78
|
/** @type {?} */
|
|
79
79
|
var transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');
|
|
80
80
|
/** @type {?} */
|
|
81
|
-
var property = transitionedProperties.find(
|
|
81
|
+
var property = transitionedProperties.find((/**
|
|
82
|
+
* @param {?} prop
|
|
83
|
+
* @return {?}
|
|
84
|
+
*/
|
|
85
|
+
function (prop) { return prop === 'transform' || prop === 'all'; }));
|
|
82
86
|
// If there's no transition for `all` or `transform`, we shouldn't do anything.
|
|
83
87
|
if (!property) {
|
|
84
88
|
return 0;
|
|
@@ -103,12 +107,16 @@ function getTransformTransitionDurationInMs(element) {
|
|
|
103
107
|
function parseCssPropertyValue(computedStyle, name) {
|
|
104
108
|
/** @type {?} */
|
|
105
109
|
var value = computedStyle.getPropertyValue(name);
|
|
106
|
-
return value.split(',').map(
|
|
110
|
+
return value.split(',').map((/**
|
|
111
|
+
* @param {?} part
|
|
112
|
+
* @return {?}
|
|
113
|
+
*/
|
|
114
|
+
function (part) { return part.trim(); }));
|
|
107
115
|
}
|
|
108
116
|
|
|
109
117
|
/**
|
|
110
118
|
* @fileoverview added by tsickle
|
|
111
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
119
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
112
120
|
*/
|
|
113
121
|
/**
|
|
114
122
|
* Options that can be used to bind a passive event listener.
|
|
@@ -161,11 +169,6 @@ DragRef = /** @class */ (function () {
|
|
|
161
169
|
* Emits when the item is being moved.
|
|
162
170
|
*/
|
|
163
171
|
this._moveEvents = new rxjs.Subject();
|
|
164
|
-
/**
|
|
165
|
-
* Amount of subscriptions to the move event. Used to avoid
|
|
166
|
-
* hitting the zone if the consumer didn't subscribe to it.
|
|
167
|
-
*/
|
|
168
|
-
this._moveEventSubscriptions = 0;
|
|
169
172
|
/**
|
|
170
173
|
* Subscription to pointer movement events.
|
|
171
174
|
*/
|
|
@@ -232,28 +235,28 @@ DragRef = /** @class */ (function () {
|
|
|
232
235
|
* Emits as the user is dragging the item. Use with caution,
|
|
233
236
|
* because this event will fire for every pixel that the user has dragged.
|
|
234
237
|
*/
|
|
235
|
-
this.moved =
|
|
236
|
-
/** @type {?} */
|
|
237
|
-
var subscription = _this._moveEvents.subscribe(observer);
|
|
238
|
-
_this._moveEventSubscriptions++;
|
|
239
|
-
return function () {
|
|
240
|
-
subscription.unsubscribe();
|
|
241
|
-
_this._moveEventSubscriptions--;
|
|
242
|
-
};
|
|
243
|
-
});
|
|
238
|
+
this.moved = this._moveEvents.asObservable();
|
|
244
239
|
/**
|
|
245
240
|
* Handler for the `mousedown`/`touchstart` events.
|
|
246
241
|
*/
|
|
247
|
-
this._pointerDown =
|
|
242
|
+
this._pointerDown = (/**
|
|
243
|
+
* @param {?} event
|
|
244
|
+
* @return {?}
|
|
245
|
+
*/
|
|
246
|
+
function (event) {
|
|
248
247
|
_this.beforeStarted.next();
|
|
249
248
|
// Delegate the event based on whether it started from a handle or the element itself.
|
|
250
249
|
if (_this._handles.length) {
|
|
251
250
|
/** @type {?} */
|
|
252
|
-
var targetHandle = _this._handles.find(
|
|
251
|
+
var targetHandle = _this._handles.find((/**
|
|
252
|
+
* @param {?} handle
|
|
253
|
+
* @return {?}
|
|
254
|
+
*/
|
|
255
|
+
function (handle) {
|
|
253
256
|
/** @type {?} */
|
|
254
257
|
var target = event.target;
|
|
255
258
|
return !!target && (target === handle || handle.contains((/** @type {?} */ (target))));
|
|
256
|
-
});
|
|
259
|
+
}));
|
|
257
260
|
if (targetHandle && !_this._disabledHandles.has(targetHandle) && !_this.disabled) {
|
|
258
261
|
_this._initializeDragSequence(targetHandle, event);
|
|
259
262
|
}
|
|
@@ -261,11 +264,15 @@ DragRef = /** @class */ (function () {
|
|
|
261
264
|
else if (!_this.disabled) {
|
|
262
265
|
_this._initializeDragSequence(_this._rootElement, event);
|
|
263
266
|
}
|
|
264
|
-
};
|
|
267
|
+
});
|
|
265
268
|
/**
|
|
266
269
|
* Handler that is invoked when the user moves their pointer after they've initiated a drag.
|
|
267
270
|
*/
|
|
268
|
-
this._pointerMove =
|
|
271
|
+
this._pointerMove = (/**
|
|
272
|
+
* @param {?} event
|
|
273
|
+
* @return {?}
|
|
274
|
+
*/
|
|
275
|
+
function (event) {
|
|
269
276
|
if (!_this._hasStartedDragging) {
|
|
270
277
|
/** @type {?} */
|
|
271
278
|
var pointerPosition = _this._getPointerPositionOnPage(event);
|
|
@@ -281,7 +288,10 @@ DragRef = /** @class */ (function () {
|
|
|
281
288
|
// per pixel of movement (e.g. if the user moves their pointer quickly).
|
|
282
289
|
if (isOverThreshold && (Date.now() >= _this._dragStartTime + (_this.dragStartDelay || 0))) {
|
|
283
290
|
_this._hasStartedDragging = true;
|
|
284
|
-
_this._ngZone.run(
|
|
291
|
+
_this._ngZone.run((/**
|
|
292
|
+
* @return {?}
|
|
293
|
+
*/
|
|
294
|
+
function () { return _this._startDragSequence(event); }));
|
|
285
295
|
}
|
|
286
296
|
return;
|
|
287
297
|
}
|
|
@@ -319,21 +329,29 @@ DragRef = /** @class */ (function () {
|
|
|
319
329
|
// Since this event gets fired for every pixel while dragging, we only
|
|
320
330
|
// want to fire it if the consumer opted into it. Also we have to
|
|
321
331
|
// re-enter the zone because we run all of the events on the outside.
|
|
322
|
-
if (_this.
|
|
323
|
-
_this._ngZone.run(
|
|
332
|
+
if (_this._moveEvents.observers.length) {
|
|
333
|
+
_this._ngZone.run((/**
|
|
334
|
+
* @return {?}
|
|
335
|
+
*/
|
|
336
|
+
function () {
|
|
324
337
|
_this._moveEvents.next({
|
|
325
338
|
source: _this,
|
|
326
339
|
pointerPosition: constrainedPointerPosition,
|
|
327
340
|
event: event,
|
|
341
|
+
distance: _this._getDragDistance(constrainedPointerPosition),
|
|
328
342
|
delta: _this._pointerDirectionDelta
|
|
329
343
|
});
|
|
330
|
-
});
|
|
344
|
+
}));
|
|
331
345
|
}
|
|
332
|
-
};
|
|
346
|
+
});
|
|
333
347
|
/**
|
|
334
348
|
* Handler that is invoked when the user lifts their pointer up, after initiating a drag.
|
|
335
349
|
*/
|
|
336
|
-
this._pointerUp =
|
|
350
|
+
this._pointerUp = (/**
|
|
351
|
+
* @param {?} event
|
|
352
|
+
* @return {?}
|
|
353
|
+
*/
|
|
354
|
+
function (event) {
|
|
337
355
|
// Note that here we use `isDragging` from the service, rather than from `this`.
|
|
338
356
|
// The difference is that the one from the service reflects whether a dragging sequence
|
|
339
357
|
// has been initiated, whereas the one on `this` includes whether the user has passed
|
|
@@ -356,15 +374,26 @@ DragRef = /** @class */ (function () {
|
|
|
356
374
|
// to the new passive transform.
|
|
357
375
|
_this._passiveTransform.x = _this._activeTransform.x;
|
|
358
376
|
_this._passiveTransform.y = _this._activeTransform.y;
|
|
359
|
-
_this._ngZone.run(
|
|
377
|
+
_this._ngZone.run((/**
|
|
378
|
+
* @return {?}
|
|
379
|
+
*/
|
|
380
|
+
function () {
|
|
381
|
+
_this.ended.next({
|
|
382
|
+
source: _this,
|
|
383
|
+
distance: _this._getDragDistance(_this._getPointerPositionOnPage(event))
|
|
384
|
+
});
|
|
385
|
+
}));
|
|
360
386
|
_this._dragDropRegistry.stopDragging(_this);
|
|
361
387
|
return;
|
|
362
388
|
}
|
|
363
|
-
_this._animatePreviewToPlaceholder().then(
|
|
389
|
+
_this._animatePreviewToPlaceholder().then((/**
|
|
390
|
+
* @return {?}
|
|
391
|
+
*/
|
|
392
|
+
function () {
|
|
364
393
|
_this._cleanupDragArtifacts(event);
|
|
365
394
|
_this._dragDropRegistry.stopDragging(_this);
|
|
366
|
-
});
|
|
367
|
-
};
|
|
395
|
+
}));
|
|
396
|
+
});
|
|
368
397
|
this.withRootElement(element);
|
|
369
398
|
_dragDropRegistry.registerDragItem(this);
|
|
370
399
|
}
|
|
@@ -437,8 +466,16 @@ DragRef = /** @class */ (function () {
|
|
|
437
466
|
* @return {THIS}
|
|
438
467
|
*/
|
|
439
468
|
function (handles) {
|
|
440
|
-
(/** @type {?} */ (this))._handles = handles.map(
|
|
441
|
-
|
|
469
|
+
(/** @type {?} */ (this))._handles = handles.map((/**
|
|
470
|
+
* @param {?} handle
|
|
471
|
+
* @return {?}
|
|
472
|
+
*/
|
|
473
|
+
function (handle) { return coercion.coerceElement(handle); }));
|
|
474
|
+
(/** @type {?} */ (this))._handles.forEach((/**
|
|
475
|
+
* @param {?} handle
|
|
476
|
+
* @return {?}
|
|
477
|
+
*/
|
|
478
|
+
function (handle) { return toggleNativeDragInteractions(handle, false); }));
|
|
442
479
|
(/** @type {?} */ (this))._toggleNativeDragInteractions();
|
|
443
480
|
return (/** @type {?} */ (this));
|
|
444
481
|
};
|
|
@@ -912,32 +949,39 @@ DragRef = /** @class */ (function () {
|
|
|
912
949
|
(/** @type {?} */ (this._nextSibling.parentNode)).insertBefore(this._rootElement, this._nextSibling);
|
|
913
950
|
}
|
|
914
951
|
else {
|
|
915
|
-
this._initialContainer.element.appendChild(this._rootElement);
|
|
952
|
+
coercion.coerceElement(this._initialContainer.element).appendChild(this._rootElement);
|
|
916
953
|
}
|
|
917
954
|
this._destroyPreview();
|
|
918
955
|
this._destroyPlaceholder();
|
|
919
956
|
this._boundaryRect = this._previewRect = undefined;
|
|
920
957
|
// Re-enter the NgZone since we bound `document` events on the outside.
|
|
921
|
-
this._ngZone.run(
|
|
958
|
+
this._ngZone.run((/**
|
|
959
|
+
* @return {?}
|
|
960
|
+
*/
|
|
961
|
+
function () {
|
|
922
962
|
/** @type {?} */
|
|
923
963
|
var container = (/** @type {?} */ (_this._dropContainer));
|
|
924
964
|
/** @type {?} */
|
|
925
965
|
var currentIndex = container.getItemIndex(_this);
|
|
926
|
-
var _a = _this._getPointerPositionOnPage(event), x = _a.x, y = _a.y;
|
|
927
966
|
/** @type {?} */
|
|
928
|
-
var
|
|
929
|
-
|
|
967
|
+
var pointerPosition = _this._getPointerPositionOnPage(event);
|
|
968
|
+
/** @type {?} */
|
|
969
|
+
var distance = _this._getDragDistance(_this._getPointerPositionOnPage(event));
|
|
970
|
+
/** @type {?} */
|
|
971
|
+
var isPointerOverContainer = container._isOverContainer(pointerPosition.x, pointerPosition.y);
|
|
972
|
+
_this.ended.next({ source: _this, distance: distance });
|
|
930
973
|
_this.dropped.next({
|
|
931
974
|
item: _this,
|
|
932
975
|
currentIndex: currentIndex,
|
|
933
976
|
previousIndex: _this._initialContainer.getItemIndex(_this),
|
|
934
977
|
container: container,
|
|
935
978
|
previousContainer: _this._initialContainer,
|
|
936
|
-
isPointerOverContainer: isPointerOverContainer
|
|
979
|
+
isPointerOverContainer: isPointerOverContainer,
|
|
980
|
+
distance: distance
|
|
937
981
|
});
|
|
938
|
-
container.drop(_this, currentIndex, _this._initialContainer, isPointerOverContainer);
|
|
982
|
+
container.drop(_this, currentIndex, _this._initialContainer, isPointerOverContainer, distance);
|
|
939
983
|
_this._dropContainer = _this._initialContainer;
|
|
940
|
-
});
|
|
984
|
+
}));
|
|
941
985
|
};
|
|
942
986
|
/**
|
|
943
987
|
* Updates the item's position in its drop container, or moves it
|
|
@@ -962,8 +1006,7 @@ DragRef = /** @class */ (function () {
|
|
|
962
1006
|
var x = _a.x, y = _a.y;
|
|
963
1007
|
// Drop container that draggable has been moved into.
|
|
964
1008
|
/** @type {?} */
|
|
965
|
-
var newContainer =
|
|
966
|
-
this._initialContainer._getSiblingContainerFromPosition(this, x, y);
|
|
1009
|
+
var newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);
|
|
967
1010
|
// If we couldn't find a new container to move the item into, and the item has left it's
|
|
968
1011
|
// initial container, check whether the it's over the initial container. This handles the
|
|
969
1012
|
// case where two containers are connected one way and the user tries to undo dragging an
|
|
@@ -973,15 +1016,22 @@ DragRef = /** @class */ (function () {
|
|
|
973
1016
|
newContainer = this._initialContainer;
|
|
974
1017
|
}
|
|
975
1018
|
if (newContainer && newContainer !== this._dropContainer) {
|
|
976
|
-
this._ngZone.run(
|
|
1019
|
+
this._ngZone.run((/**
|
|
1020
|
+
* @return {?}
|
|
1021
|
+
*/
|
|
1022
|
+
function () {
|
|
977
1023
|
// Notify the old container that the item has left.
|
|
978
1024
|
_this.exited.next({ item: _this, container: (/** @type {?} */ (_this._dropContainer)) });
|
|
979
1025
|
(/** @type {?} */ (_this._dropContainer)).exit(_this);
|
|
980
1026
|
// Notify the new container that the item has entered.
|
|
981
|
-
_this.entered.next({ item: _this, container: (/** @type {?} */ (newContainer)) });
|
|
982
1027
|
_this._dropContainer = (/** @type {?} */ (newContainer));
|
|
983
1028
|
_this._dropContainer.enter(_this, x, y);
|
|
984
|
-
|
|
1029
|
+
_this.entered.next({
|
|
1030
|
+
item: _this,
|
|
1031
|
+
container: (/** @type {?} */ (newContainer)),
|
|
1032
|
+
currentIndex: (/** @type {?} */ (newContainer)).getItemIndex(_this)
|
|
1033
|
+
});
|
|
1034
|
+
}));
|
|
985
1035
|
}
|
|
986
1036
|
(/** @type {?} */ (this._dropContainer))._sortItem(this, x, y, this._pointerDirectionDelta);
|
|
987
1037
|
this._preview.style.transform =
|
|
@@ -1077,24 +1127,35 @@ DragRef = /** @class */ (function () {
|
|
|
1077
1127
|
if (duration === 0) {
|
|
1078
1128
|
return Promise.resolve();
|
|
1079
1129
|
}
|
|
1080
|
-
return this._ngZone.runOutsideAngular(
|
|
1081
|
-
|
|
1130
|
+
return this._ngZone.runOutsideAngular((/**
|
|
1131
|
+
* @return {?}
|
|
1132
|
+
*/
|
|
1133
|
+
function () {
|
|
1134
|
+
return new Promise((/**
|
|
1135
|
+
* @param {?} resolve
|
|
1136
|
+
* @return {?}
|
|
1137
|
+
*/
|
|
1138
|
+
function (resolve) {
|
|
1082
1139
|
/** @type {?} */
|
|
1083
|
-
var handler = (/** @type {?} */ ((
|
|
1140
|
+
var handler = (/** @type {?} */ (((/**
|
|
1141
|
+
* @param {?} event
|
|
1142
|
+
* @return {?}
|
|
1143
|
+
*/
|
|
1144
|
+
function (event) {
|
|
1084
1145
|
if (!event || (event.target === _this._preview && event.propertyName === 'transform')) {
|
|
1085
1146
|
_this._preview.removeEventListener('transitionend', handler);
|
|
1086
1147
|
resolve();
|
|
1087
1148
|
clearTimeout(timeout);
|
|
1088
1149
|
}
|
|
1089
|
-
})));
|
|
1150
|
+
}))));
|
|
1090
1151
|
// If a transition is short enough, the browser might not fire the `transitionend` event.
|
|
1091
1152
|
// Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll
|
|
1092
1153
|
// fire if the transition hasn't completed when it was supposed to.
|
|
1093
1154
|
/** @type {?} */
|
|
1094
1155
|
var timeout = setTimeout((/** @type {?} */ (handler)), duration * 1.5);
|
|
1095
1156
|
_this._preview.addEventListener('transitionend', handler);
|
|
1096
|
-
});
|
|
1097
|
-
});
|
|
1157
|
+
}));
|
|
1158
|
+
}));
|
|
1098
1159
|
};
|
|
1099
1160
|
/** Creates an element that will be shown instead of the current element while dragging. */
|
|
1100
1161
|
/**
|
|
@@ -1338,6 +1399,30 @@ DragRef = /** @class */ (function () {
|
|
|
1338
1399
|
this._rootElement.style.transform = this._initialTransform ?
|
|
1339
1400
|
transform + ' ' + this._initialTransform : transform;
|
|
1340
1401
|
};
|
|
1402
|
+
/**
|
|
1403
|
+
* Gets the distance that the user has dragged during the current drag sequence.
|
|
1404
|
+
* @param currentPosition Current position of the user's pointer.
|
|
1405
|
+
*/
|
|
1406
|
+
/**
|
|
1407
|
+
* Gets the distance that the user has dragged during the current drag sequence.
|
|
1408
|
+
* @private
|
|
1409
|
+
* @param {?} currentPosition Current position of the user's pointer.
|
|
1410
|
+
* @return {?}
|
|
1411
|
+
*/
|
|
1412
|
+
DragRef.prototype._getDragDistance = /**
|
|
1413
|
+
* Gets the distance that the user has dragged during the current drag sequence.
|
|
1414
|
+
* @private
|
|
1415
|
+
* @param {?} currentPosition Current position of the user's pointer.
|
|
1416
|
+
* @return {?}
|
|
1417
|
+
*/
|
|
1418
|
+
function (currentPosition) {
|
|
1419
|
+
/** @type {?} */
|
|
1420
|
+
var pickupPosition = this._pickupPositionOnPage;
|
|
1421
|
+
if (pickupPosition) {
|
|
1422
|
+
return { x: currentPosition.x - pickupPosition.x, y: currentPosition.y - pickupPosition.y };
|
|
1423
|
+
}
|
|
1424
|
+
return { x: 0, y: 0 };
|
|
1425
|
+
};
|
|
1341
1426
|
return DragRef;
|
|
1342
1427
|
}());
|
|
1343
1428
|
/**
|
|
@@ -1361,11 +1446,26 @@ function deepCloneNode(node) {
|
|
|
1361
1446
|
var clone = (/** @type {?} */ (node.cloneNode(true)));
|
|
1362
1447
|
/** @type {?} */
|
|
1363
1448
|
var descendantsWithId = clone.querySelectorAll('[id]');
|
|
1449
|
+
/** @type {?} */
|
|
1450
|
+
var descendantCanvases = node.querySelectorAll('canvas');
|
|
1364
1451
|
// Remove the `id` to avoid having multiple elements with the same id on the page.
|
|
1365
1452
|
clone.removeAttribute('id');
|
|
1366
1453
|
for (var i = 0; i < descendantsWithId.length; i++) {
|
|
1367
1454
|
descendantsWithId[i].removeAttribute('id');
|
|
1368
1455
|
}
|
|
1456
|
+
// `cloneNode` won't transfer the content of `canvas` elements so we have to do it ourselves.
|
|
1457
|
+
// We match up the cloned canvas to their sources using their index in the DOM.
|
|
1458
|
+
if (descendantCanvases.length) {
|
|
1459
|
+
/** @type {?} */
|
|
1460
|
+
var cloneCanvases = clone.querySelectorAll('canvas');
|
|
1461
|
+
for (var i = 0; i < descendantCanvases.length; i++) {
|
|
1462
|
+
/** @type {?} */
|
|
1463
|
+
var correspondingCloneContext = cloneCanvases[i].getContext('2d');
|
|
1464
|
+
if (correspondingCloneContext) {
|
|
1465
|
+
correspondingCloneContext.drawImage(descendantCanvases[i], 0, 0);
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1369
1469
|
return clone;
|
|
1370
1470
|
}
|
|
1371
1471
|
/**
|
|
@@ -1414,7 +1514,7 @@ function getPreviewInsertionPoint(documentRef) {
|
|
|
1414
1514
|
|
|
1415
1515
|
/**
|
|
1416
1516
|
* @fileoverview added by tsickle
|
|
1417
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1517
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1418
1518
|
*/
|
|
1419
1519
|
|
|
1420
1520
|
/**
|
|
@@ -1490,7 +1590,7 @@ function clamp$1(value, max) {
|
|
|
1490
1590
|
|
|
1491
1591
|
/**
|
|
1492
1592
|
* @fileoverview added by tsickle
|
|
1493
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1593
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1494
1594
|
*/
|
|
1495
1595
|
/**
|
|
1496
1596
|
* Counter used to generate unique ids for drop refs.
|
|
@@ -1534,7 +1634,10 @@ DropListRef = /** @class */ (function () {
|
|
|
1534
1634
|
* Function that is used to determine whether an item
|
|
1535
1635
|
* is allowed to be moved into a drop container.
|
|
1536
1636
|
*/
|
|
1537
|
-
this.enterPredicate =
|
|
1637
|
+
this.enterPredicate = (/**
|
|
1638
|
+
* @return {?}
|
|
1639
|
+
*/
|
|
1640
|
+
function () { return true; });
|
|
1538
1641
|
/**
|
|
1539
1642
|
* Emits right before dragging has started.
|
|
1540
1643
|
*/
|
|
@@ -1632,10 +1735,12 @@ DropListRef = /** @class */ (function () {
|
|
|
1632
1735
|
var _this = this;
|
|
1633
1736
|
this.beforeStarted.next();
|
|
1634
1737
|
this._isDragging = true;
|
|
1635
|
-
this.
|
|
1636
|
-
this.
|
|
1637
|
-
|
|
1638
|
-
|
|
1738
|
+
this._cacheItems();
|
|
1739
|
+
this._siblings.forEach((/**
|
|
1740
|
+
* @param {?} sibling
|
|
1741
|
+
* @return {?}
|
|
1742
|
+
*/
|
|
1743
|
+
function (sibling) { return sibling._startReceiving(_this); }));
|
|
1639
1744
|
};
|
|
1640
1745
|
/**
|
|
1641
1746
|
* Emits an event to indicate that the user moved an item into the container.
|
|
@@ -1658,7 +1763,6 @@ DropListRef = /** @class */ (function () {
|
|
|
1658
1763
|
* @return {?}
|
|
1659
1764
|
*/
|
|
1660
1765
|
function (item, pointerX, pointerY) {
|
|
1661
|
-
this.entered.next({ item: item, container: this });
|
|
1662
1766
|
this.start();
|
|
1663
1767
|
// If sorting is disabled, we want the item to return to its starting
|
|
1664
1768
|
// position if the user is returning it to its initial container.
|
|
@@ -1697,7 +1801,7 @@ DropListRef = /** @class */ (function () {
|
|
|
1697
1801
|
activeDraggables.splice(newIndex, 0, item);
|
|
1698
1802
|
}
|
|
1699
1803
|
else {
|
|
1700
|
-
this.element.appendChild(placeholder);
|
|
1804
|
+
coercion.coerceElement(this.element).appendChild(placeholder);
|
|
1701
1805
|
activeDraggables.push(item);
|
|
1702
1806
|
}
|
|
1703
1807
|
// The transform needs to be cleared so it doesn't throw off the measurements.
|
|
@@ -1705,6 +1809,7 @@ DropListRef = /** @class */ (function () {
|
|
|
1705
1809
|
// Note that the positions were already cached when we called `start` above,
|
|
1706
1810
|
// but we need to refresh them since the amount of items has changed.
|
|
1707
1811
|
this._cacheItemPositions();
|
|
1812
|
+
this.entered.next({ item: item, container: this, currentIndex: this.getItemIndex(item) });
|
|
1708
1813
|
};
|
|
1709
1814
|
/**
|
|
1710
1815
|
* Removes an item from the container after it was dragged into another container by the user.
|
|
@@ -1731,26 +1836,33 @@ DropListRef = /** @class */ (function () {
|
|
|
1731
1836
|
* @param previousContainer Container from which the item got dragged in.
|
|
1732
1837
|
* @param isPointerOverContainer Whether the user's pointer was over the
|
|
1733
1838
|
* container when the item was dropped.
|
|
1839
|
+
* @param distance Distance the user has dragged since the start of the dragging sequence.
|
|
1840
|
+
* @breaking-change 9.0.0 `distance` parameter to become required.
|
|
1734
1841
|
*/
|
|
1735
1842
|
/**
|
|
1736
1843
|
* Drops an item into this container.
|
|
1844
|
+
* \@breaking-change 9.0.0 `distance` parameter to become required.
|
|
1737
1845
|
* @param {?} item Item being dropped into the container.
|
|
1738
1846
|
* @param {?} currentIndex Index at which the item should be inserted.
|
|
1739
1847
|
* @param {?} previousContainer Container from which the item got dragged in.
|
|
1740
1848
|
* @param {?} isPointerOverContainer Whether the user's pointer was over the
|
|
1741
1849
|
* container when the item was dropped.
|
|
1850
|
+
* @param {?=} distance Distance the user has dragged since the start of the dragging sequence.
|
|
1742
1851
|
* @return {?}
|
|
1743
1852
|
*/
|
|
1744
1853
|
DropListRef.prototype.drop = /**
|
|
1745
1854
|
* Drops an item into this container.
|
|
1855
|
+
* \@breaking-change 9.0.0 `distance` parameter to become required.
|
|
1746
1856
|
* @param {?} item Item being dropped into the container.
|
|
1747
1857
|
* @param {?} currentIndex Index at which the item should be inserted.
|
|
1748
1858
|
* @param {?} previousContainer Container from which the item got dragged in.
|
|
1749
1859
|
* @param {?} isPointerOverContainer Whether the user's pointer was over the
|
|
1750
1860
|
* container when the item was dropped.
|
|
1861
|
+
* @param {?=} distance Distance the user has dragged since the start of the dragging sequence.
|
|
1751
1862
|
* @return {?}
|
|
1752
1863
|
*/
|
|
1753
|
-
function (item, currentIndex, previousContainer, isPointerOverContainer) {
|
|
1864
|
+
function (item, currentIndex, previousContainer, isPointerOverContainer, distance) {
|
|
1865
|
+
if (distance === void 0) { distance = { x: 0, y: 0 }; }
|
|
1754
1866
|
this._reset();
|
|
1755
1867
|
this.dropped.next({
|
|
1756
1868
|
item: item,
|
|
@@ -1758,7 +1870,8 @@ DropListRef = /** @class */ (function () {
|
|
|
1758
1870
|
previousIndex: previousContainer.getItemIndex(item),
|
|
1759
1871
|
container: this,
|
|
1760
1872
|
previousContainer: previousContainer,
|
|
1761
|
-
isPointerOverContainer: isPointerOverContainer
|
|
1873
|
+
isPointerOverContainer: isPointerOverContainer,
|
|
1874
|
+
distance: distance
|
|
1762
1875
|
});
|
|
1763
1876
|
};
|
|
1764
1877
|
/**
|
|
@@ -1782,7 +1895,14 @@ DropListRef = /** @class */ (function () {
|
|
|
1782
1895
|
function (items) {
|
|
1783
1896
|
var _this = this;
|
|
1784
1897
|
(/** @type {?} */ (this))._draggables = items;
|
|
1785
|
-
items.forEach(
|
|
1898
|
+
items.forEach((/**
|
|
1899
|
+
* @param {?} item
|
|
1900
|
+
* @return {?}
|
|
1901
|
+
*/
|
|
1902
|
+
function (item) { return item._withDropContainer((/** @type {?} */ (_this))); }));
|
|
1903
|
+
if ((/** @type {?} */ (this)).isDragging()) {
|
|
1904
|
+
(/** @type {?} */ (this))._cacheItems();
|
|
1905
|
+
}
|
|
1786
1906
|
return (/** @type {?} */ (this));
|
|
1787
1907
|
};
|
|
1788
1908
|
/** Sets the layout direction of the drop list. */
|
|
@@ -1875,7 +1995,11 @@ DropListRef = /** @class */ (function () {
|
|
|
1875
1995
|
/** @type {?} */
|
|
1876
1996
|
var items = this._orientation === 'horizontal' && this._direction === 'rtl' ?
|
|
1877
1997
|
this._itemPositions.slice().reverse() : this._itemPositions;
|
|
1878
|
-
return findIndex(items,
|
|
1998
|
+
return findIndex(items, (/**
|
|
1999
|
+
* @param {?} currentItem
|
|
2000
|
+
* @return {?}
|
|
2001
|
+
*/
|
|
2002
|
+
function (currentItem) { return currentItem.drag === item; }));
|
|
1879
2003
|
};
|
|
1880
2004
|
/**
|
|
1881
2005
|
* Whether the list is able to receive the item that
|
|
@@ -1932,7 +2056,11 @@ DropListRef = /** @class */ (function () {
|
|
|
1932
2056
|
/** @type {?} */
|
|
1933
2057
|
var isHorizontal = this._orientation === 'horizontal';
|
|
1934
2058
|
/** @type {?} */
|
|
1935
|
-
var currentIndex = findIndex(siblings,
|
|
2059
|
+
var currentIndex = findIndex(siblings, (/**
|
|
2060
|
+
* @param {?} currentItem
|
|
2061
|
+
* @return {?}
|
|
2062
|
+
*/
|
|
2063
|
+
function (currentItem) { return currentItem.drag === item; }));
|
|
1936
2064
|
/** @type {?} */
|
|
1937
2065
|
var siblingAtNewPosition = siblings[newIndex];
|
|
1938
2066
|
/** @type {?} */
|
|
@@ -1961,7 +2089,12 @@ DropListRef = /** @class */ (function () {
|
|
|
1961
2089
|
container: this,
|
|
1962
2090
|
item: item
|
|
1963
2091
|
});
|
|
1964
|
-
siblings.forEach(
|
|
2092
|
+
siblings.forEach((/**
|
|
2093
|
+
* @param {?} sibling
|
|
2094
|
+
* @param {?} index
|
|
2095
|
+
* @return {?}
|
|
2096
|
+
*/
|
|
2097
|
+
function (sibling, index) {
|
|
1965
2098
|
// Don't do anything if the position hasn't changed.
|
|
1966
2099
|
if (oldOrder[index] === sibling) {
|
|
1967
2100
|
return;
|
|
@@ -1989,7 +2122,7 @@ DropListRef = /** @class */ (function () {
|
|
|
1989
2122
|
elementToOffset.style.transform = "translate3d(0, " + Math.round(sibling.offset) + "px, 0)";
|
|
1990
2123
|
adjustClientRect(sibling.clientRect, offset, 0);
|
|
1991
2124
|
}
|
|
1992
|
-
});
|
|
2125
|
+
}));
|
|
1993
2126
|
};
|
|
1994
2127
|
/** Caches the position of the drop list. */
|
|
1995
2128
|
/**
|
|
@@ -2003,7 +2136,7 @@ DropListRef = /** @class */ (function () {
|
|
|
2003
2136
|
* @return {?}
|
|
2004
2137
|
*/
|
|
2005
2138
|
function () {
|
|
2006
|
-
this._clientRect = this.element.getBoundingClientRect();
|
|
2139
|
+
this._clientRect = coercion.coerceElement(this.element).getBoundingClientRect();
|
|
2007
2140
|
};
|
|
2008
2141
|
/** Refreshes the position cache of the items and sibling containers. */
|
|
2009
2142
|
/**
|
|
@@ -2020,7 +2153,11 @@ DropListRef = /** @class */ (function () {
|
|
|
2020
2153
|
var _this = this;
|
|
2021
2154
|
/** @type {?} */
|
|
2022
2155
|
var isHorizontal = this._orientation === 'horizontal';
|
|
2023
|
-
this._itemPositions = this._activeDraggables.map(
|
|
2156
|
+
this._itemPositions = this._activeDraggables.map((/**
|
|
2157
|
+
* @param {?} drag
|
|
2158
|
+
* @return {?}
|
|
2159
|
+
*/
|
|
2160
|
+
function (drag) {
|
|
2024
2161
|
/** @type {?} */
|
|
2025
2162
|
var elementToMeasure = _this._dragDropRegistry.isDragging(drag) ?
|
|
2026
2163
|
// If the element is being dragged, we have to measure the
|
|
@@ -2045,10 +2182,15 @@ DropListRef = /** @class */ (function () {
|
|
|
2045
2182
|
height: clientRect.height
|
|
2046
2183
|
}
|
|
2047
2184
|
};
|
|
2048
|
-
}).sort(
|
|
2185
|
+
})).sort((/**
|
|
2186
|
+
* @param {?} a
|
|
2187
|
+
* @param {?} b
|
|
2188
|
+
* @return {?}
|
|
2189
|
+
*/
|
|
2190
|
+
function (a, b) {
|
|
2049
2191
|
return isHorizontal ? a.clientRect.left - b.clientRect.left :
|
|
2050
2192
|
a.clientRect.top - b.clientRect.top;
|
|
2051
|
-
});
|
|
2193
|
+
}));
|
|
2052
2194
|
};
|
|
2053
2195
|
/** Resets the container to its initial state. */
|
|
2054
2196
|
/**
|
|
@@ -2065,8 +2207,16 @@ DropListRef = /** @class */ (function () {
|
|
|
2065
2207
|
var _this = this;
|
|
2066
2208
|
this._isDragging = false;
|
|
2067
2209
|
// TODO(crisbeto): may have to wait for the animations to finish.
|
|
2068
|
-
this._activeDraggables.forEach(
|
|
2069
|
-
|
|
2210
|
+
this._activeDraggables.forEach((/**
|
|
2211
|
+
* @param {?} item
|
|
2212
|
+
* @return {?}
|
|
2213
|
+
*/
|
|
2214
|
+
function (item) { return item.getRootElement().style.transform = ''; }));
|
|
2215
|
+
this._siblings.forEach((/**
|
|
2216
|
+
* @param {?} sibling
|
|
2217
|
+
* @return {?}
|
|
2218
|
+
*/
|
|
2219
|
+
function (sibling) { return sibling._stopReceiving(_this); }));
|
|
2070
2220
|
this._activeDraggables = [];
|
|
2071
2221
|
this._itemPositions = [];
|
|
2072
2222
|
this._previousSwap.drag = null;
|
|
@@ -2213,7 +2363,13 @@ DropListRef = /** @class */ (function () {
|
|
|
2213
2363
|
var _this = this;
|
|
2214
2364
|
/** @type {?} */
|
|
2215
2365
|
var isHorizontal = this._orientation === 'horizontal';
|
|
2216
|
-
return findIndex(this._itemPositions,
|
|
2366
|
+
return findIndex(this._itemPositions, (/**
|
|
2367
|
+
* @param {?} __0
|
|
2368
|
+
* @param {?} _
|
|
2369
|
+
* @param {?} array
|
|
2370
|
+
* @return {?}
|
|
2371
|
+
*/
|
|
2372
|
+
function (_a, _, array) {
|
|
2217
2373
|
var drag = _a.drag, clientRect = _a.clientRect;
|
|
2218
2374
|
if (drag === item) {
|
|
2219
2375
|
// If there's only one item left in the container, it must be
|
|
@@ -2234,7 +2390,23 @@ DropListRef = /** @class */ (function () {
|
|
|
2234
2390
|
// sub-pixel precision, whereas the pointer coordinates are rounded to pixels.
|
|
2235
2391
|
pointerX >= Math.floor(clientRect.left) && pointerX <= Math.floor(clientRect.right) :
|
|
2236
2392
|
pointerY >= Math.floor(clientRect.top) && pointerY <= Math.floor(clientRect.bottom);
|
|
2237
|
-
});
|
|
2393
|
+
}));
|
|
2394
|
+
};
|
|
2395
|
+
/** Caches the current items in the list and their positions. */
|
|
2396
|
+
/**
|
|
2397
|
+
* Caches the current items in the list and their positions.
|
|
2398
|
+
* @private
|
|
2399
|
+
* @return {?}
|
|
2400
|
+
*/
|
|
2401
|
+
DropListRef.prototype._cacheItems = /**
|
|
2402
|
+
* Caches the current items in the list and their positions.
|
|
2403
|
+
* @private
|
|
2404
|
+
* @return {?}
|
|
2405
|
+
*/
|
|
2406
|
+
function () {
|
|
2407
|
+
this._activeDraggables = this._draggables.slice();
|
|
2408
|
+
this._cacheItemPositions();
|
|
2409
|
+
this._cacheOwnPosition();
|
|
2238
2410
|
};
|
|
2239
2411
|
/**
|
|
2240
2412
|
* Checks whether the user's pointer is positioned over the container.
|
|
@@ -2280,7 +2452,11 @@ DropListRef = /** @class */ (function () {
|
|
|
2280
2452
|
* @return {?}
|
|
2281
2453
|
*/
|
|
2282
2454
|
function (item, x, y) {
|
|
2283
|
-
return this._siblings.find(
|
|
2455
|
+
return this._siblings.find((/**
|
|
2456
|
+
* @param {?} sibling
|
|
2457
|
+
* @return {?}
|
|
2458
|
+
*/
|
|
2459
|
+
function (sibling) { return sibling._canReceive(item, x, y); }));
|
|
2284
2460
|
};
|
|
2285
2461
|
/**
|
|
2286
2462
|
* Checks whether the drop list can receive the passed-in item.
|
|
@@ -2307,19 +2483,21 @@ DropListRef = /** @class */ (function () {
|
|
|
2307
2483
|
return false;
|
|
2308
2484
|
}
|
|
2309
2485
|
/** @type {?} */
|
|
2310
|
-
var elementFromPoint = this._document.elementFromPoint(x, y);
|
|
2486
|
+
var elementFromPoint = (/** @type {?} */ (this._document.elementFromPoint(x, y)));
|
|
2311
2487
|
// If there's no element at the pointer position, then
|
|
2312
2488
|
// the client rect is probably scrolled out of the view.
|
|
2313
2489
|
if (!elementFromPoint) {
|
|
2314
2490
|
return false;
|
|
2315
2491
|
}
|
|
2492
|
+
/** @type {?} */
|
|
2493
|
+
var nativeElement = coercion.coerceElement(this.element);
|
|
2316
2494
|
// The `ClientRect`, that we're using to find the container over which the user is
|
|
2317
2495
|
// hovering, doesn't give us any information on whether the element has been scrolled
|
|
2318
2496
|
// out of the view or whether it's overlapping with other containers. This means that
|
|
2319
2497
|
// we could end up transferring the item into a container that's invisible or is positioned
|
|
2320
2498
|
// below another one. We use the result from `elementFromPoint` to get the top-most element
|
|
2321
2499
|
// at the pointer position and to find whether it's one of the intersecting drop containers.
|
|
2322
|
-
return elementFromPoint ===
|
|
2500
|
+
return elementFromPoint === nativeElement || nativeElement.contains(elementFromPoint);
|
|
2323
2501
|
};
|
|
2324
2502
|
/**
|
|
2325
2503
|
* Called by one of the connected drop lists when a dragging sequence has started.
|
|
@@ -2405,7 +2583,7 @@ function isInsideClientRect(clientRect, x, y) {
|
|
|
2405
2583
|
|
|
2406
2584
|
/**
|
|
2407
2585
|
* @fileoverview added by tsickle
|
|
2408
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2586
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2409
2587
|
*/
|
|
2410
2588
|
/**
|
|
2411
2589
|
* Event options that can be used to bind an active, capturing event.
|
|
@@ -2458,11 +2636,15 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2458
2636
|
* Event listener that will prevent the default browser action while the user is dragging.
|
|
2459
2637
|
* @param event Event whose default action should be prevented.
|
|
2460
2638
|
*/
|
|
2461
|
-
this._preventDefaultWhileDragging =
|
|
2639
|
+
this._preventDefaultWhileDragging = (/**
|
|
2640
|
+
* @param {?} event
|
|
2641
|
+
* @return {?}
|
|
2642
|
+
*/
|
|
2643
|
+
function (event) {
|
|
2462
2644
|
if (_this._activeDragInstances.size) {
|
|
2463
2645
|
event.preventDefault();
|
|
2464
2646
|
}
|
|
2465
|
-
};
|
|
2647
|
+
});
|
|
2466
2648
|
this._document = _document;
|
|
2467
2649
|
}
|
|
2468
2650
|
/** Adds a drop container to the registry. */
|
|
@@ -2502,11 +2684,14 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2502
2684
|
// won't preventDefault on a dynamically-added `touchmove` listener.
|
|
2503
2685
|
// See https://bugs.webkit.org/show_bug.cgi?id=184250.
|
|
2504
2686
|
if (this._dragInstances.size === 1) {
|
|
2505
|
-
this._ngZone.runOutsideAngular(
|
|
2687
|
+
this._ngZone.runOutsideAngular((/**
|
|
2688
|
+
* @return {?}
|
|
2689
|
+
*/
|
|
2690
|
+
function () {
|
|
2506
2691
|
// The event handler has to be explicitly active,
|
|
2507
2692
|
// because newer browsers make it passive by default.
|
|
2508
2693
|
_this._document.addEventListener('touchmove', _this._preventDefaultWhileDragging, activeCapturingEventOptions);
|
|
2509
|
-
});
|
|
2694
|
+
}));
|
|
2510
2695
|
}
|
|
2511
2696
|
};
|
|
2512
2697
|
/** Removes a drop container from the registry. */
|
|
@@ -2573,11 +2758,19 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2573
2758
|
// use `preventDefault` to prevent the page from scrolling while the user is dragging.
|
|
2574
2759
|
this._globalListeners
|
|
2575
2760
|
.set(moveEvent, {
|
|
2576
|
-
handler:
|
|
2761
|
+
handler: (/**
|
|
2762
|
+
* @param {?} e
|
|
2763
|
+
* @return {?}
|
|
2764
|
+
*/
|
|
2765
|
+
function (e) { return _this.pointerMove.next((/** @type {?} */ (e))); }),
|
|
2577
2766
|
options: activeCapturingEventOptions
|
|
2578
2767
|
})
|
|
2579
2768
|
.set(upEvent, {
|
|
2580
|
-
handler:
|
|
2769
|
+
handler: (/**
|
|
2770
|
+
* @param {?} e
|
|
2771
|
+
* @return {?}
|
|
2772
|
+
*/
|
|
2773
|
+
function (e) { return _this.pointerUp.next((/** @type {?} */ (e))); }),
|
|
2581
2774
|
options: true
|
|
2582
2775
|
})
|
|
2583
2776
|
// Preventing the default action on `mousemove` isn't enough to disable text selection
|
|
@@ -2596,11 +2789,19 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2596
2789
|
options: activeCapturingEventOptions
|
|
2597
2790
|
});
|
|
2598
2791
|
}
|
|
2599
|
-
this._ngZone.runOutsideAngular(
|
|
2600
|
-
|
|
2792
|
+
this._ngZone.runOutsideAngular((/**
|
|
2793
|
+
* @return {?}
|
|
2794
|
+
*/
|
|
2795
|
+
function () {
|
|
2796
|
+
_this._globalListeners.forEach((/**
|
|
2797
|
+
* @param {?} config
|
|
2798
|
+
* @param {?} name
|
|
2799
|
+
* @return {?}
|
|
2800
|
+
*/
|
|
2801
|
+
function (config, name) {
|
|
2601
2802
|
_this._document.addEventListener(name, config.handler, config.options);
|
|
2602
|
-
});
|
|
2603
|
-
});
|
|
2803
|
+
}));
|
|
2804
|
+
}));
|
|
2604
2805
|
}
|
|
2605
2806
|
};
|
|
2606
2807
|
/** Stops dragging a drag item instance. */
|
|
@@ -2654,7 +2855,11 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2654
2855
|
* @return {?}
|
|
2655
2856
|
*/
|
|
2656
2857
|
function (id) {
|
|
2657
|
-
return Array.from(this._dropInstances).find(
|
|
2858
|
+
return Array.from(this._dropInstances).find((/**
|
|
2859
|
+
* @param {?} instance
|
|
2860
|
+
* @return {?}
|
|
2861
|
+
*/
|
|
2862
|
+
function (instance) { return instance.id === id; }));
|
|
2658
2863
|
};
|
|
2659
2864
|
/**
|
|
2660
2865
|
* @return {?}
|
|
@@ -2664,8 +2869,16 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2664
2869
|
*/
|
|
2665
2870
|
function () {
|
|
2666
2871
|
var _this = this;
|
|
2667
|
-
this._dragInstances.forEach(
|
|
2668
|
-
|
|
2872
|
+
this._dragInstances.forEach((/**
|
|
2873
|
+
* @param {?} instance
|
|
2874
|
+
* @return {?}
|
|
2875
|
+
*/
|
|
2876
|
+
function (instance) { return _this.removeDragItem(instance); }));
|
|
2877
|
+
this._dropInstances.forEach((/**
|
|
2878
|
+
* @param {?} instance
|
|
2879
|
+
* @return {?}
|
|
2880
|
+
*/
|
|
2881
|
+
function (instance) { return _this.removeDropContainer(instance); }));
|
|
2669
2882
|
this._clearGlobalListeners();
|
|
2670
2883
|
this.pointerMove.complete();
|
|
2671
2884
|
this.pointerUp.complete();
|
|
@@ -2683,9 +2896,14 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2683
2896
|
*/
|
|
2684
2897
|
function () {
|
|
2685
2898
|
var _this = this;
|
|
2686
|
-
this._globalListeners.forEach(
|
|
2899
|
+
this._globalListeners.forEach((/**
|
|
2900
|
+
* @param {?} config
|
|
2901
|
+
* @param {?} name
|
|
2902
|
+
* @return {?}
|
|
2903
|
+
*/
|
|
2904
|
+
function (config, name) {
|
|
2687
2905
|
_this._document.removeEventListener(name, config.handler, config.options);
|
|
2688
|
-
});
|
|
2906
|
+
}));
|
|
2689
2907
|
this._globalListeners.clear();
|
|
2690
2908
|
};
|
|
2691
2909
|
DragDropRegistry.decorators = [
|
|
@@ -2696,13 +2914,13 @@ var DragDropRegistry = /** @class */ (function () {
|
|
|
2696
2914
|
{ type: core.NgZone },
|
|
2697
2915
|
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
|
|
2698
2916
|
]; };
|
|
2699
|
-
/** @nocollapse */ DragDropRegistry.ngInjectableDef = core
|
|
2917
|
+
/** @nocollapse */ DragDropRegistry.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DragDropRegistry_Factory() { return new DragDropRegistry(core.ɵɵinject(core.NgZone), core.ɵɵinject(common.DOCUMENT)); }, token: DragDropRegistry, providedIn: "root" });
|
|
2700
2918
|
return DragDropRegistry;
|
|
2701
2919
|
}());
|
|
2702
2920
|
|
|
2703
2921
|
/**
|
|
2704
2922
|
* @fileoverview added by tsickle
|
|
2705
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2923
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2706
2924
|
*/
|
|
2707
2925
|
/**
|
|
2708
2926
|
* Default configuration to be used when creating a `DragRef`.
|
|
@@ -2774,13 +2992,13 @@ var DragDrop = /** @class */ (function () {
|
|
|
2774
2992
|
{ type: scrolling.ViewportRuler },
|
|
2775
2993
|
{ type: DragDropRegistry }
|
|
2776
2994
|
]; };
|
|
2777
|
-
/** @nocollapse */ DragDrop.ngInjectableDef = core
|
|
2995
|
+
/** @nocollapse */ DragDrop.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DragDrop_Factory() { return new DragDrop(core.ɵɵinject(common.DOCUMENT), core.ɵɵinject(core.NgZone), core.ɵɵinject(scrolling.ViewportRuler), core.ɵɵinject(DragDropRegistry)); }, token: DragDrop, providedIn: "root" });
|
|
2778
2996
|
return DragDrop;
|
|
2779
2997
|
}());
|
|
2780
2998
|
|
|
2781
2999
|
/**
|
|
2782
3000
|
* @fileoverview added by tsickle
|
|
2783
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3001
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2784
3002
|
*/
|
|
2785
3003
|
/**
|
|
2786
3004
|
* Injection token that is used to provide a CdkDropList instance to CdkDrag.
|
|
@@ -2799,12 +3017,12 @@ var CDK_DROP_LIST_CONTAINER = CDK_DROP_LIST;
|
|
|
2799
3017
|
|
|
2800
3018
|
/**
|
|
2801
3019
|
* @fileoverview added by tsickle
|
|
2802
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3020
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2803
3021
|
*/
|
|
2804
3022
|
|
|
2805
3023
|
/**
|
|
2806
3024
|
* @fileoverview added by tsickle
|
|
2807
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3025
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2808
3026
|
*/
|
|
2809
3027
|
/**
|
|
2810
3028
|
* Injection token that can be used for a `CdkDrag` to provide itself as a parent to the
|
|
@@ -2817,7 +3035,7 @@ var CDK_DRAG_PARENT = new core.InjectionToken('CDK_DRAG_PARENT');
|
|
|
2817
3035
|
|
|
2818
3036
|
/**
|
|
2819
3037
|
* @fileoverview added by tsickle
|
|
2820
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3038
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2821
3039
|
*/
|
|
2822
3040
|
/**
|
|
2823
3041
|
* Handle that can be used to drag and CdkDrag instance.
|
|
@@ -2881,7 +3099,7 @@ var CdkDragHandle = /** @class */ (function () {
|
|
|
2881
3099
|
|
|
2882
3100
|
/**
|
|
2883
3101
|
* @fileoverview added by tsickle
|
|
2884
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3102
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2885
3103
|
*/
|
|
2886
3104
|
/**
|
|
2887
3105
|
* Element that will be used as a template for the placeholder of a CdkDrag when
|
|
@@ -2909,7 +3127,7 @@ var CdkDragPlaceholder = /** @class */ (function () {
|
|
|
2909
3127
|
|
|
2910
3128
|
/**
|
|
2911
3129
|
* @fileoverview added by tsickle
|
|
2912
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3130
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2913
3131
|
*/
|
|
2914
3132
|
/**
|
|
2915
3133
|
* Element that will be used as a template for the preview
|
|
@@ -2937,7 +3155,7 @@ var CdkDragPreview = /** @class */ (function () {
|
|
|
2937
3155
|
|
|
2938
3156
|
/**
|
|
2939
3157
|
* @fileoverview added by tsickle
|
|
2940
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3158
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2941
3159
|
*/
|
|
2942
3160
|
/**
|
|
2943
3161
|
* Injection token that can be used to configure the behavior of `CdkDrag`.
|
|
@@ -3003,23 +3221,64 @@ var CdkDrag = /** @class */ (function () {
|
|
|
3003
3221
|
* Emits as the user is dragging the item. Use with caution,
|
|
3004
3222
|
* because this event will fire for every pixel that the user has dragged.
|
|
3005
3223
|
*/
|
|
3006
|
-
this.moved = new rxjs.Observable(
|
|
3224
|
+
this.moved = new rxjs.Observable((/**
|
|
3225
|
+
* @param {?} observer
|
|
3226
|
+
* @return {?}
|
|
3227
|
+
*/
|
|
3228
|
+
function (observer) {
|
|
3007
3229
|
/** @type {?} */
|
|
3008
|
-
var subscription = _this._dragRef.moved.pipe(operators.map(
|
|
3230
|
+
var subscription = _this._dragRef.moved.pipe(operators.map((/**
|
|
3231
|
+
* @param {?} movedEvent
|
|
3232
|
+
* @return {?}
|
|
3233
|
+
*/
|
|
3234
|
+
function (movedEvent) { return ({
|
|
3009
3235
|
source: _this,
|
|
3010
3236
|
pointerPosition: movedEvent.pointerPosition,
|
|
3011
3237
|
event: movedEvent.event,
|
|
3012
|
-
delta: movedEvent.delta
|
|
3013
|
-
|
|
3014
|
-
|
|
3238
|
+
delta: movedEvent.delta,
|
|
3239
|
+
distance: movedEvent.distance
|
|
3240
|
+
}); }))).subscribe(observer);
|
|
3241
|
+
return (/**
|
|
3242
|
+
* @return {?}
|
|
3243
|
+
*/
|
|
3244
|
+
function () {
|
|
3015
3245
|
subscription.unsubscribe();
|
|
3016
|
-
};
|
|
3017
|
-
});
|
|
3246
|
+
});
|
|
3247
|
+
}));
|
|
3018
3248
|
this._dragRef = dragDrop.createDrag(element, config);
|
|
3019
3249
|
this._dragRef.data = this;
|
|
3020
3250
|
this._syncInputs(this._dragRef);
|
|
3021
3251
|
this._handleEvents(this._dragRef);
|
|
3022
3252
|
}
|
|
3253
|
+
Object.defineProperty(CdkDrag.prototype, "boundaryElementSelector", {
|
|
3254
|
+
/**
|
|
3255
|
+
* Selector that will be used to determine the element to which the draggable's position will
|
|
3256
|
+
* be constrained. Matching starts from the element's parent and goes up the DOM until a matching
|
|
3257
|
+
* element has been found
|
|
3258
|
+
* @deprecated Use `boundaryElement` instead.
|
|
3259
|
+
* @breaking-change 9.0.0
|
|
3260
|
+
*/
|
|
3261
|
+
get: /**
|
|
3262
|
+
* Selector that will be used to determine the element to which the draggable's position will
|
|
3263
|
+
* be constrained. Matching starts from the element's parent and goes up the DOM until a matching
|
|
3264
|
+
* element has been found
|
|
3265
|
+
* @deprecated Use `boundaryElement` instead.
|
|
3266
|
+
* \@breaking-change 9.0.0
|
|
3267
|
+
* @return {?}
|
|
3268
|
+
*/
|
|
3269
|
+
function () {
|
|
3270
|
+
return typeof this.boundaryElement === 'string' ? this.boundaryElement : (/** @type {?} */ (undefined));
|
|
3271
|
+
},
|
|
3272
|
+
set: /**
|
|
3273
|
+
* @param {?} selector
|
|
3274
|
+
* @return {?}
|
|
3275
|
+
*/
|
|
3276
|
+
function (selector) {
|
|
3277
|
+
this.boundaryElement = selector;
|
|
3278
|
+
},
|
|
3279
|
+
enumerable: true,
|
|
3280
|
+
configurable: true
|
|
3281
|
+
});
|
|
3023
3282
|
Object.defineProperty(CdkDrag.prototype, "disabled", {
|
|
3024
3283
|
/** Whether starting to drag this element is disabled. */
|
|
3025
3284
|
get: /**
|
|
@@ -3109,33 +3368,60 @@ var CdkDrag = /** @class */ (function () {
|
|
|
3109
3368
|
// their original DOM position and then they get transferred to the portal.
|
|
3110
3369
|
this._ngZone.onStable.asObservable()
|
|
3111
3370
|
.pipe(operators.take(1), operators.takeUntil(this._destroyed))
|
|
3112
|
-
.subscribe(
|
|
3371
|
+
.subscribe((/**
|
|
3372
|
+
* @return {?}
|
|
3373
|
+
*/
|
|
3374
|
+
function () {
|
|
3113
3375
|
_this._updateRootElement();
|
|
3114
3376
|
// Listen for any newly-added handles.
|
|
3115
3377
|
_this._handles.changes.pipe(operators.startWith(_this._handles),
|
|
3116
3378
|
// Sync the new handles with the DragRef.
|
|
3117
|
-
operators.tap(
|
|
3379
|
+
operators.tap((/**
|
|
3380
|
+
* @param {?} handles
|
|
3381
|
+
* @return {?}
|
|
3382
|
+
*/
|
|
3383
|
+
function (handles) {
|
|
3118
3384
|
/** @type {?} */
|
|
3119
3385
|
var childHandleElements = handles
|
|
3120
|
-
.filter(
|
|
3121
|
-
|
|
3386
|
+
.filter((/**
|
|
3387
|
+
* @param {?} handle
|
|
3388
|
+
* @return {?}
|
|
3389
|
+
*/
|
|
3390
|
+
function (handle) { return handle._parentDrag === _this; }))
|
|
3391
|
+
.map((/**
|
|
3392
|
+
* @param {?} handle
|
|
3393
|
+
* @return {?}
|
|
3394
|
+
*/
|
|
3395
|
+
function (handle) { return handle.element; }));
|
|
3122
3396
|
_this._dragRef.withHandles(childHandleElements);
|
|
3123
|
-
}),
|
|
3397
|
+
})),
|
|
3124
3398
|
// Listen if the state of any of the handles changes.
|
|
3125
|
-
operators.switchMap(
|
|
3126
|
-
|
|
3127
|
-
|
|
3399
|
+
operators.switchMap((/**
|
|
3400
|
+
* @param {?} handles
|
|
3401
|
+
* @return {?}
|
|
3402
|
+
*/
|
|
3403
|
+
function (handles) {
|
|
3404
|
+
return rxjs.merge.apply(void 0, handles.map((/**
|
|
3405
|
+
* @param {?} item
|
|
3406
|
+
* @return {?}
|
|
3407
|
+
*/
|
|
3408
|
+
function (item) { return item._stateChanges; })));
|
|
3409
|
+
})), operators.takeUntil(_this._destroyed)).subscribe((/**
|
|
3410
|
+
* @param {?} handleInstance
|
|
3411
|
+
* @return {?}
|
|
3412
|
+
*/
|
|
3413
|
+
function (handleInstance) {
|
|
3128
3414
|
// Enabled/disable the handle that changed in the DragRef.
|
|
3129
3415
|
/** @type {?} */
|
|
3130
3416
|
var dragRef = _this._dragRef;
|
|
3131
3417
|
/** @type {?} */
|
|
3132
3418
|
var handle = handleInstance.element.nativeElement;
|
|
3133
3419
|
handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);
|
|
3134
|
-
});
|
|
3420
|
+
}));
|
|
3135
3421
|
if (_this.freeDragPosition) {
|
|
3136
3422
|
_this._dragRef.setFreeDragPosition(_this.freeDragPosition);
|
|
3137
3423
|
}
|
|
3138
|
-
});
|
|
3424
|
+
}));
|
|
3139
3425
|
};
|
|
3140
3426
|
/**
|
|
3141
3427
|
* @param {?} changes
|
|
@@ -3149,7 +3435,7 @@ var CdkDrag = /** @class */ (function () {
|
|
|
3149
3435
|
/** @type {?} */
|
|
3150
3436
|
var rootSelectorChange = changes['rootElementSelector'];
|
|
3151
3437
|
/** @type {?} */
|
|
3152
|
-
var positionChange = changes['
|
|
3438
|
+
var positionChange = changes['freeDragPosition'];
|
|
3153
3439
|
// We don't have to react to the first change since it's being
|
|
3154
3440
|
// handled in `ngAfterViewInit` where it needs to be deferred.
|
|
3155
3441
|
if (rootSelectorChange && !rootSelectorChange.firstChange) {
|
|
@@ -3194,21 +3480,32 @@ var CdkDrag = /** @class */ (function () {
|
|
|
3194
3480
|
}
|
|
3195
3481
|
this._dragRef.withRootElement(rootElement || element);
|
|
3196
3482
|
};
|
|
3197
|
-
/** Gets the boundary element, based on the `
|
|
3483
|
+
/** Gets the boundary element, based on the `boundaryElement` value. */
|
|
3198
3484
|
/**
|
|
3199
|
-
* Gets the boundary element, based on the `
|
|
3485
|
+
* Gets the boundary element, based on the `boundaryElement` value.
|
|
3200
3486
|
* @private
|
|
3201
3487
|
* @return {?}
|
|
3202
3488
|
*/
|
|
3203
3489
|
CdkDrag.prototype._getBoundaryElement = /**
|
|
3204
|
-
* Gets the boundary element, based on the `
|
|
3490
|
+
* Gets the boundary element, based on the `boundaryElement` value.
|
|
3205
3491
|
* @private
|
|
3206
3492
|
* @return {?}
|
|
3207
3493
|
*/
|
|
3208
3494
|
function () {
|
|
3209
3495
|
/** @type {?} */
|
|
3210
|
-
var
|
|
3211
|
-
|
|
3496
|
+
var boundary = this.boundaryElement;
|
|
3497
|
+
if (!boundary) {
|
|
3498
|
+
return null;
|
|
3499
|
+
}
|
|
3500
|
+
if (typeof boundary === 'string') {
|
|
3501
|
+
return getClosestMatchingAncestor(this.element.nativeElement, boundary);
|
|
3502
|
+
}
|
|
3503
|
+
/** @type {?} */
|
|
3504
|
+
var element = coercion.coerceElement(boundary);
|
|
3505
|
+
if (core.isDevMode() && !element.contains(this.element.nativeElement)) {
|
|
3506
|
+
throw Error('Draggable element is not inside of the node passed into cdkDragBoundary.');
|
|
3507
|
+
}
|
|
3508
|
+
return element;
|
|
3212
3509
|
};
|
|
3213
3510
|
/** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */
|
|
3214
3511
|
/**
|
|
@@ -3225,7 +3522,10 @@ var CdkDrag = /** @class */ (function () {
|
|
|
3225
3522
|
*/
|
|
3226
3523
|
function (ref) {
|
|
3227
3524
|
var _this = this;
|
|
3228
|
-
ref.beforeStarted.subscribe(
|
|
3525
|
+
ref.beforeStarted.subscribe((/**
|
|
3526
|
+
* @return {?}
|
|
3527
|
+
*/
|
|
3528
|
+
function () {
|
|
3229
3529
|
if (!ref.isDragging()) {
|
|
3230
3530
|
/** @type {?} */
|
|
3231
3531
|
var dir = _this._dir;
|
|
@@ -3253,7 +3553,7 @@ var CdkDrag = /** @class */ (function () {
|
|
|
3253
3553
|
ref.withDirection(dir.value);
|
|
3254
3554
|
}
|
|
3255
3555
|
}
|
|
3256
|
-
});
|
|
3556
|
+
}));
|
|
3257
3557
|
};
|
|
3258
3558
|
/** Handles the events from the underlying `DragRef`. */
|
|
3259
3559
|
/**
|
|
@@ -3270,43 +3570,67 @@ var CdkDrag = /** @class */ (function () {
|
|
|
3270
3570
|
*/
|
|
3271
3571
|
function (ref) {
|
|
3272
3572
|
var _this = this;
|
|
3273
|
-
ref.started.subscribe(
|
|
3573
|
+
ref.started.subscribe((/**
|
|
3574
|
+
* @return {?}
|
|
3575
|
+
*/
|
|
3576
|
+
function () {
|
|
3274
3577
|
_this.started.emit({ source: _this });
|
|
3275
3578
|
// Since all of these events run outside of change detection,
|
|
3276
3579
|
// we need to ensure that everything is marked correctly.
|
|
3277
3580
|
_this._changeDetectorRef.markForCheck();
|
|
3278
|
-
});
|
|
3279
|
-
ref.released.subscribe(
|
|
3581
|
+
}));
|
|
3582
|
+
ref.released.subscribe((/**
|
|
3583
|
+
* @return {?}
|
|
3584
|
+
*/
|
|
3585
|
+
function () {
|
|
3280
3586
|
_this.released.emit({ source: _this });
|
|
3281
|
-
});
|
|
3282
|
-
ref.ended.subscribe(
|
|
3283
|
-
|
|
3587
|
+
}));
|
|
3588
|
+
ref.ended.subscribe((/**
|
|
3589
|
+
* @param {?} event
|
|
3590
|
+
* @return {?}
|
|
3591
|
+
*/
|
|
3592
|
+
function (event) {
|
|
3593
|
+
_this.ended.emit({ source: _this, distance: event.distance });
|
|
3284
3594
|
// Since all of these events run outside of change detection,
|
|
3285
3595
|
// we need to ensure that everything is marked correctly.
|
|
3286
3596
|
_this._changeDetectorRef.markForCheck();
|
|
3287
|
-
});
|
|
3288
|
-
ref.entered.subscribe(
|
|
3597
|
+
}));
|
|
3598
|
+
ref.entered.subscribe((/**
|
|
3599
|
+
* @param {?} event
|
|
3600
|
+
* @return {?}
|
|
3601
|
+
*/
|
|
3602
|
+
function (event) {
|
|
3289
3603
|
_this.entered.emit({
|
|
3290
3604
|
container: event.container.data,
|
|
3291
|
-
item: _this
|
|
3605
|
+
item: _this,
|
|
3606
|
+
currentIndex: event.currentIndex
|
|
3292
3607
|
});
|
|
3293
|
-
});
|
|
3294
|
-
ref.exited.subscribe(
|
|
3608
|
+
}));
|
|
3609
|
+
ref.exited.subscribe((/**
|
|
3610
|
+
* @param {?} event
|
|
3611
|
+
* @return {?}
|
|
3612
|
+
*/
|
|
3613
|
+
function (event) {
|
|
3295
3614
|
_this.exited.emit({
|
|
3296
3615
|
container: event.container.data,
|
|
3297
3616
|
item: _this
|
|
3298
3617
|
});
|
|
3299
|
-
});
|
|
3300
|
-
ref.dropped.subscribe(
|
|
3618
|
+
}));
|
|
3619
|
+
ref.dropped.subscribe((/**
|
|
3620
|
+
* @param {?} event
|
|
3621
|
+
* @return {?}
|
|
3622
|
+
*/
|
|
3623
|
+
function (event) {
|
|
3301
3624
|
_this.dropped.emit({
|
|
3302
3625
|
previousIndex: event.previousIndex,
|
|
3303
3626
|
currentIndex: event.currentIndex,
|
|
3304
3627
|
previousContainer: event.previousContainer.data,
|
|
3305
3628
|
container: event.container.data,
|
|
3306
3629
|
isPointerOverContainer: event.isPointerOverContainer,
|
|
3307
|
-
item: _this
|
|
3630
|
+
item: _this,
|
|
3631
|
+
distance: event.distance
|
|
3308
3632
|
});
|
|
3309
|
-
});
|
|
3633
|
+
}));
|
|
3310
3634
|
};
|
|
3311
3635
|
CdkDrag.decorators = [
|
|
3312
3636
|
{ type: core.Directive, args: [{
|
|
@@ -3339,7 +3663,7 @@ var CdkDrag = /** @class */ (function () {
|
|
|
3339
3663
|
data: [{ type: core.Input, args: ['cdkDragData',] }],
|
|
3340
3664
|
lockAxis: [{ type: core.Input, args: ['cdkDragLockAxis',] }],
|
|
3341
3665
|
rootElementSelector: [{ type: core.Input, args: ['cdkDragRootElement',] }],
|
|
3342
|
-
|
|
3666
|
+
boundaryElement: [{ type: core.Input, args: ['cdkDragBoundary',] }],
|
|
3343
3667
|
dragStartDelay: [{ type: core.Input, args: ['cdkDragStartDelay',] }],
|
|
3344
3668
|
freeDragPosition: [{ type: core.Input, args: ['cdkDragFreeDragPosition',] }],
|
|
3345
3669
|
disabled: [{ type: core.Input, args: ['cdkDragDisabled',] }],
|
|
@@ -3376,7 +3700,7 @@ function getClosestMatchingAncestor(element, selector) {
|
|
|
3376
3700
|
|
|
3377
3701
|
/**
|
|
3378
3702
|
* @fileoverview added by tsickle
|
|
3379
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3703
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3380
3704
|
*/
|
|
3381
3705
|
/**
|
|
3382
3706
|
* Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`
|
|
@@ -3433,7 +3757,7 @@ var CdkDropListGroup = /** @class */ (function () {
|
|
|
3433
3757
|
|
|
3434
3758
|
/**
|
|
3435
3759
|
* @fileoverview added by tsickle
|
|
3436
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3760
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3437
3761
|
*/
|
|
3438
3762
|
/**
|
|
3439
3763
|
* Counter used to generate unique ids for drop zones.
|
|
@@ -3480,7 +3804,10 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3480
3804
|
* Function that is used to determine whether an item
|
|
3481
3805
|
* is allowed to be moved into a drop container.
|
|
3482
3806
|
*/
|
|
3483
|
-
this.enterPredicate =
|
|
3807
|
+
this.enterPredicate = (/**
|
|
3808
|
+
* @return {?}
|
|
3809
|
+
*/
|
|
3810
|
+
function () { return true; });
|
|
3484
3811
|
/**
|
|
3485
3812
|
* Emits when the user drops an item inside the container.
|
|
3486
3813
|
*/
|
|
@@ -3500,9 +3827,14 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3500
3827
|
this.sorted = new core.EventEmitter();
|
|
3501
3828
|
this._dropListRef = dragDrop.createDropList(element);
|
|
3502
3829
|
this._dropListRef.data = this;
|
|
3503
|
-
this._dropListRef.enterPredicate =
|
|
3830
|
+
this._dropListRef.enterPredicate = (/**
|
|
3831
|
+
* @param {?} drag
|
|
3832
|
+
* @param {?} drop
|
|
3833
|
+
* @return {?}
|
|
3834
|
+
*/
|
|
3835
|
+
function (drag, drop) {
|
|
3504
3836
|
return _this.enterPredicate(drag.data, drop.data);
|
|
3505
|
-
};
|
|
3837
|
+
});
|
|
3506
3838
|
this._syncInputs(this._dropListRef);
|
|
3507
3839
|
this._handleEvents(this._dropListRef);
|
|
3508
3840
|
CdkDropList._dropLists.push(this);
|
|
@@ -3556,9 +3888,17 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3556
3888
|
var _this = this;
|
|
3557
3889
|
this._draggables.changes
|
|
3558
3890
|
.pipe(operators.startWith(this._draggables), operators.takeUntil(this._destroyed))
|
|
3559
|
-
.subscribe(
|
|
3560
|
-
|
|
3561
|
-
|
|
3891
|
+
.subscribe((/**
|
|
3892
|
+
* @param {?} items
|
|
3893
|
+
* @return {?}
|
|
3894
|
+
*/
|
|
3895
|
+
function (items) {
|
|
3896
|
+
_this._dropListRef.withItems(items.map((/**
|
|
3897
|
+
* @param {?} drag
|
|
3898
|
+
* @return {?}
|
|
3899
|
+
*/
|
|
3900
|
+
function (drag) { return drag._dragRef; })));
|
|
3901
|
+
}));
|
|
3562
3902
|
};
|
|
3563
3903
|
/**
|
|
3564
3904
|
* @return {?}
|
|
@@ -3769,28 +4109,55 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3769
4109
|
if (this._dir) {
|
|
3770
4110
|
this._dir.change
|
|
3771
4111
|
.pipe(operators.startWith(this._dir.value), operators.takeUntil(this._destroyed))
|
|
3772
|
-
.subscribe(
|
|
4112
|
+
.subscribe((/**
|
|
4113
|
+
* @param {?} value
|
|
4114
|
+
* @return {?}
|
|
4115
|
+
*/
|
|
4116
|
+
function (value) { return ref.withDirection(value); }));
|
|
3773
4117
|
}
|
|
3774
|
-
ref.beforeStarted.subscribe(
|
|
4118
|
+
ref.beforeStarted.subscribe((/**
|
|
4119
|
+
* @return {?}
|
|
4120
|
+
*/
|
|
4121
|
+
function () {
|
|
3775
4122
|
/** @type {?} */
|
|
3776
|
-
var siblings = coercion.coerceArray(_this.connectedTo).map(
|
|
4123
|
+
var siblings = coercion.coerceArray(_this.connectedTo).map((/**
|
|
4124
|
+
* @param {?} drop
|
|
4125
|
+
* @return {?}
|
|
4126
|
+
*/
|
|
4127
|
+
function (drop) {
|
|
3777
4128
|
return typeof drop === 'string' ?
|
|
3778
|
-
(/** @type {?} */ (CdkDropList._dropLists.find(
|
|
3779
|
-
|
|
4129
|
+
(/** @type {?} */ (CdkDropList._dropLists.find((/**
|
|
4130
|
+
* @param {?} list
|
|
4131
|
+
* @return {?}
|
|
4132
|
+
*/
|
|
4133
|
+
function (list) { return list.id === drop; })))) : drop;
|
|
4134
|
+
}));
|
|
3780
4135
|
if (_this._group) {
|
|
3781
|
-
_this._group._items.forEach(
|
|
4136
|
+
_this._group._items.forEach((/**
|
|
4137
|
+
* @param {?} drop
|
|
4138
|
+
* @return {?}
|
|
4139
|
+
*/
|
|
4140
|
+
function (drop) {
|
|
3782
4141
|
if (siblings.indexOf(drop) === -1) {
|
|
3783
4142
|
siblings.push(drop);
|
|
3784
4143
|
}
|
|
3785
|
-
});
|
|
4144
|
+
}));
|
|
3786
4145
|
}
|
|
3787
4146
|
ref.disabled = _this.disabled;
|
|
3788
4147
|
ref.lockAxis = _this.lockAxis;
|
|
3789
4148
|
ref.sortingDisabled = _this.sortingDisabled;
|
|
3790
4149
|
ref
|
|
3791
|
-
.connectedTo(siblings.filter(
|
|
4150
|
+
.connectedTo(siblings.filter((/**
|
|
4151
|
+
* @param {?} drop
|
|
4152
|
+
* @return {?}
|
|
4153
|
+
*/
|
|
4154
|
+
function (drop) { return drop && drop !== _this; })).map((/**
|
|
4155
|
+
* @param {?} list
|
|
4156
|
+
* @return {?}
|
|
4157
|
+
*/
|
|
4158
|
+
function (list) { return list._dropListRef; })))
|
|
3792
4159
|
.withOrientation(_this.orientation);
|
|
3793
|
-
});
|
|
4160
|
+
}));
|
|
3794
4161
|
};
|
|
3795
4162
|
/** Handles events from the underlying DropListRef. */
|
|
3796
4163
|
/**
|
|
@@ -3807,43 +4174,64 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3807
4174
|
*/
|
|
3808
4175
|
function (ref) {
|
|
3809
4176
|
var _this = this;
|
|
3810
|
-
ref.beforeStarted.subscribe(
|
|
4177
|
+
ref.beforeStarted.subscribe((/**
|
|
4178
|
+
* @return {?}
|
|
4179
|
+
*/
|
|
4180
|
+
function () {
|
|
3811
4181
|
_this._changeDetectorRef.markForCheck();
|
|
3812
|
-
});
|
|
3813
|
-
ref.entered.subscribe(
|
|
4182
|
+
}));
|
|
4183
|
+
ref.entered.subscribe((/**
|
|
4184
|
+
* @param {?} event
|
|
4185
|
+
* @return {?}
|
|
4186
|
+
*/
|
|
4187
|
+
function (event) {
|
|
3814
4188
|
_this.entered.emit({
|
|
3815
4189
|
container: _this,
|
|
3816
|
-
item: event.item.data
|
|
4190
|
+
item: event.item.data,
|
|
4191
|
+
currentIndex: event.currentIndex
|
|
3817
4192
|
});
|
|
3818
|
-
});
|
|
3819
|
-
ref.exited.subscribe(
|
|
4193
|
+
}));
|
|
4194
|
+
ref.exited.subscribe((/**
|
|
4195
|
+
* @param {?} event
|
|
4196
|
+
* @return {?}
|
|
4197
|
+
*/
|
|
4198
|
+
function (event) {
|
|
3820
4199
|
_this.exited.emit({
|
|
3821
4200
|
container: _this,
|
|
3822
4201
|
item: event.item.data
|
|
3823
4202
|
});
|
|
3824
4203
|
_this._changeDetectorRef.markForCheck();
|
|
3825
|
-
});
|
|
3826
|
-
ref.sorted.subscribe(
|
|
4204
|
+
}));
|
|
4205
|
+
ref.sorted.subscribe((/**
|
|
4206
|
+
* @param {?} event
|
|
4207
|
+
* @return {?}
|
|
4208
|
+
*/
|
|
4209
|
+
function (event) {
|
|
3827
4210
|
_this.sorted.emit({
|
|
3828
4211
|
previousIndex: event.previousIndex,
|
|
3829
4212
|
currentIndex: event.currentIndex,
|
|
3830
4213
|
container: _this,
|
|
3831
4214
|
item: event.item.data
|
|
3832
4215
|
});
|
|
3833
|
-
});
|
|
3834
|
-
ref.dropped.subscribe(
|
|
4216
|
+
}));
|
|
4217
|
+
ref.dropped.subscribe((/**
|
|
4218
|
+
* @param {?} event
|
|
4219
|
+
* @return {?}
|
|
4220
|
+
*/
|
|
4221
|
+
function (event) {
|
|
3835
4222
|
_this.dropped.emit({
|
|
3836
4223
|
previousIndex: event.previousIndex,
|
|
3837
4224
|
currentIndex: event.currentIndex,
|
|
3838
4225
|
previousContainer: event.previousContainer.data,
|
|
3839
4226
|
container: event.container.data,
|
|
3840
4227
|
item: event.item.data,
|
|
3841
|
-
isPointerOverContainer: event.isPointerOverContainer
|
|
4228
|
+
isPointerOverContainer: event.isPointerOverContainer,
|
|
4229
|
+
distance: event.distance
|
|
3842
4230
|
});
|
|
3843
4231
|
// Mark for check since all of these events run outside of change
|
|
3844
4232
|
// detection and we're not guaranteed for something else to have triggered it.
|
|
3845
4233
|
_this._changeDetectorRef.markForCheck();
|
|
3846
|
-
});
|
|
4234
|
+
}));
|
|
3847
4235
|
};
|
|
3848
4236
|
/**
|
|
3849
4237
|
* Keeps track of the drop lists that are currently on the page.
|
|
@@ -3876,7 +4264,10 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3876
4264
|
{ type: CdkDropListGroup, decorators: [{ type: core.Optional }, { type: core.SkipSelf }] }
|
|
3877
4265
|
]; };
|
|
3878
4266
|
CdkDropList.propDecorators = {
|
|
3879
|
-
_draggables: [{ type: core.ContentChildren, args: [core.forwardRef(
|
|
4267
|
+
_draggables: [{ type: core.ContentChildren, args: [core.forwardRef((/**
|
|
4268
|
+
* @return {?}
|
|
4269
|
+
*/
|
|
4270
|
+
function () { return CdkDrag; })), {
|
|
3880
4271
|
// Explicitly set to false since some of the logic below makes assumptions about it.
|
|
3881
4272
|
// The `.withItems` call below should be updated if we ever need to switch this to `true`.
|
|
3882
4273
|
descendants: false
|
|
@@ -3899,7 +4290,7 @@ var CdkDropList = /** @class */ (function () {
|
|
|
3899
4290
|
|
|
3900
4291
|
/**
|
|
3901
4292
|
* @fileoverview added by tsickle
|
|
3902
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4293
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3903
4294
|
*/
|
|
3904
4295
|
var DragDropModule = /** @class */ (function () {
|
|
3905
4296
|
function DragDropModule() {
|