@angular/cdk 18.0.0-next.5 → 18.0.0-rc.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/drag-drop/index.d.ts +8 -8
- package/esm2022/a11y/a11y-module.mjs +4 -4
- package/esm2022/a11y/aria-describer/aria-describer.mjs +3 -3
- package/esm2022/a11y/focus-monitor/focus-monitor.mjs +6 -6
- package/esm2022/a11y/focus-trap/configurable-focus-trap-factory.mjs +3 -3
- package/esm2022/a11y/focus-trap/focus-trap-manager.mjs +3 -3
- package/esm2022/a11y/focus-trap/focus-trap.mjs +6 -6
- package/esm2022/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +3 -3
- package/esm2022/a11y/input-modality/input-modality-detector.mjs +3 -3
- package/esm2022/a11y/interactivity-checker/interactivity-checker.mjs +3 -3
- package/esm2022/a11y/key-manager/list-key-manager.mjs +2 -2
- package/esm2022/a11y/live-announcer/live-announcer.mjs +6 -6
- package/esm2022/accordion/accordion-item.mjs +3 -3
- package/esm2022/accordion/accordion-module.mjs +4 -4
- package/esm2022/accordion/accordion.mjs +3 -3
- package/esm2022/bidi/bidi-module.mjs +4 -4
- package/esm2022/bidi/dir.mjs +3 -3
- package/esm2022/bidi/directionality.mjs +3 -3
- package/esm2022/clipboard/clipboard-module.mjs +4 -4
- package/esm2022/clipboard/clipboard.mjs +3 -3
- package/esm2022/clipboard/copy-to-clipboard.mjs +3 -3
- package/esm2022/collections/unique-selection-dispatcher.mjs +3 -3
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/dialog/dialog-module.mjs +4 -4
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/drag-drop/directives/drag-handle.mjs +3 -3
- package/esm2022/drag-drop/directives/drag-placeholder.mjs +3 -3
- package/esm2022/drag-drop/directives/drag-preview.mjs +3 -3
- package/esm2022/drag-drop/directives/drag.mjs +3 -3
- package/esm2022/drag-drop/directives/drop-list-group.mjs +3 -3
- package/esm2022/drag-drop/directives/drop-list.mjs +3 -3
- package/esm2022/drag-drop/dom/root-node.mjs +21 -0
- package/esm2022/drag-drop/dom/styling.mjs +21 -1
- package/esm2022/drag-drop/drag-drop-module.mjs +4 -4
- package/esm2022/drag-drop/drag-drop-registry.mjs +3 -3
- package/esm2022/drag-drop/drag-drop.mjs +38 -5
- package/esm2022/drag-drop/drag-ref.mjs +11 -99
- package/esm2022/drag-drop/preview-ref.mjs +114 -0
- package/esm2022/layout/breakpoints-observer.mjs +3 -3
- package/esm2022/layout/layout-module.mjs +4 -4
- package/esm2022/layout/media-matcher.mjs +3 -3
- package/esm2022/listbox/listbox-module.mjs +4 -4
- package/esm2022/listbox/listbox.mjs +6 -6
- package/esm2022/menu/context-menu-trigger.mjs +6 -6
- package/esm2022/menu/menu-aim.mjs +6 -6
- package/esm2022/menu/menu-bar.mjs +3 -3
- package/esm2022/menu/menu-base.mjs +3 -3
- package/esm2022/menu/menu-group.mjs +3 -3
- package/esm2022/menu/menu-item-checkbox.mjs +3 -3
- package/esm2022/menu/menu-item-radio.mjs +3 -3
- package/esm2022/menu/menu-item-selectable.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +3 -3
- package/esm2022/menu/menu-module.mjs +4 -4
- package/esm2022/menu/menu-stack.mjs +3 -3
- package/esm2022/menu/menu-trigger-base.mjs +3 -3
- package/esm2022/menu/menu-trigger.mjs +3 -3
- package/esm2022/menu/menu.mjs +3 -3
- package/esm2022/observers/observe-content.mjs +13 -13
- package/esm2022/observers/private/shared-resize-observer.mjs +3 -3
- package/esm2022/overlay/dispatchers/base-overlay-dispatcher.mjs +3 -3
- package/esm2022/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +3 -3
- package/esm2022/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +3 -3
- package/esm2022/overlay/fullscreen-overlay-container.mjs +3 -3
- package/esm2022/overlay/overlay-container.mjs +3 -3
- package/esm2022/overlay/overlay-directives.mjs +6 -6
- package/esm2022/overlay/overlay-module.mjs +4 -4
- package/esm2022/overlay/overlay.mjs +3 -3
- package/esm2022/overlay/position/overlay-position-builder.mjs +3 -3
- package/esm2022/overlay/scroll/scroll-strategy-options.mjs +3 -3
- package/esm2022/platform/platform-module.mjs +4 -4
- package/esm2022/platform/platform.mjs +3 -3
- package/esm2022/portal/portal-directives.mjs +16 -16
- package/esm2022/scrolling/fixed-size-virtual-scroll.mjs +3 -3
- package/esm2022/scrolling/scroll-dispatcher.mjs +3 -3
- package/esm2022/scrolling/scrollable.mjs +3 -3
- package/esm2022/scrolling/scrolling-module.mjs +8 -8
- package/esm2022/scrolling/viewport-ruler.mjs +3 -3
- package/esm2022/scrolling/virtual-for-of.mjs +3 -3
- package/esm2022/scrolling/virtual-scroll-viewport.mjs +30 -20
- package/esm2022/scrolling/virtual-scrollable-element.mjs +3 -3
- package/esm2022/scrolling/virtual-scrollable-window.mjs +3 -3
- package/esm2022/scrolling/virtual-scrollable.mjs +3 -3
- package/esm2022/stepper/step-header.mjs +3 -3
- package/esm2022/stepper/step-label.mjs +3 -3
- package/esm2022/stepper/stepper-button.mjs +6 -6
- package/esm2022/stepper/stepper-module.mjs +4 -4
- package/esm2022/stepper/stepper.mjs +6 -6
- package/esm2022/table/cell.mjs +21 -21
- package/esm2022/table/coalesced-style-scheduler.mjs +3 -3
- package/esm2022/table/row.mjs +27 -27
- package/esm2022/table/table-module.mjs +4 -4
- package/esm2022/table/table.mjs +18 -18
- package/esm2022/table/text-column.mjs +3 -3
- package/esm2022/text-field/autofill.mjs +6 -6
- package/esm2022/text-field/autosize.mjs +3 -3
- package/esm2022/text-field/text-field-module.mjs +4 -4
- package/esm2022/tree/nested-node.mjs +3 -3
- package/esm2022/tree/node.mjs +3 -3
- package/esm2022/tree/outlet.mjs +3 -3
- package/esm2022/tree/padding.mjs +3 -3
- package/esm2022/tree/toggle.mjs +3 -3
- package/esm2022/tree/tree-module.mjs +4 -4
- package/esm2022/tree/tree.mjs +6 -6
- package/esm2022/version.mjs +1 -1
- package/fesm2022/a11y.mjs +41 -41
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +10 -10
- package/fesm2022/bidi.mjs +10 -10
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +10 -10
- package/fesm2022/collections.mjs +3 -3
- package/fesm2022/dialog.mjs +10 -10
- package/fesm2022/drag-drop.mjs +233 -152
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/layout.mjs +10 -10
- package/fesm2022/listbox.mjs +10 -10
- package/fesm2022/menu.mjs +49 -49
- package/fesm2022/observers/private.mjs +3 -3
- package/fesm2022/observers.mjs +13 -13
- package/fesm2022/overlay.mjs +34 -34
- package/fesm2022/platform.mjs +7 -7
- package/fesm2022/portal.mjs +16 -16
- package/fesm2022/scrolling.mjs +60 -50
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +22 -22
- package/fesm2022/table.mjs +76 -76
- package/fesm2022/text-field.mjs +13 -13
- package/fesm2022/tree.mjs +25 -25
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/scrolling/index.d.ts +2 -0
package/fesm2022/drag-drop.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Inject, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter,
|
|
2
|
+
import { Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, inject, ApplicationRef, EnvironmentInjector, createComponent, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter, Injector, afterNextRender, Self, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { DOCUMENT } from '@angular/common';
|
|
4
4
|
import * as i1 from '@angular/cdk/scrolling';
|
|
5
5
|
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
@@ -71,34 +71,25 @@ function combineTransforms(transform, initialTransform) {
|
|
|
71
71
|
? transform + ' ' + initialTransform
|
|
72
72
|
: transform;
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const computedStyle = getComputedStyle(element);
|
|
84
|
-
const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');
|
|
85
|
-
const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');
|
|
86
|
-
// If there's no transition for `all` or `transform`, we shouldn't do anything.
|
|
87
|
-
if (!property) {
|
|
88
|
-
return 0;
|
|
89
|
-
}
|
|
90
|
-
// Get the index of the property that we're interested in and match
|
|
91
|
-
// it up to the same index in `transition-delay` and `transition-duration`.
|
|
92
|
-
const propertyIndex = transitionedProperties.indexOf(property);
|
|
93
|
-
const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');
|
|
94
|
-
const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');
|
|
95
|
-
return (parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +
|
|
96
|
-
parseCssTimeUnitsToMs(rawDelays[propertyIndex]));
|
|
74
|
+
/**
|
|
75
|
+
* Matches the target element's size to the source's size.
|
|
76
|
+
* @param target Element that needs to be resized.
|
|
77
|
+
* @param sourceRect Dimensions of the source element.
|
|
78
|
+
*/
|
|
79
|
+
function matchElementSize(target, sourceRect) {
|
|
80
|
+
target.style.width = `${sourceRect.width}px`;
|
|
81
|
+
target.style.height = `${sourceRect.height}px`;
|
|
82
|
+
target.style.transform = getTransform(sourceRect.left, sourceRect.top);
|
|
97
83
|
}
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Gets a 3d `transform` that can be applied to an element.
|
|
86
|
+
* @param x Desired position of the element along the X axis.
|
|
87
|
+
* @param y Desired position of the element along the Y axis.
|
|
88
|
+
*/
|
|
89
|
+
function getTransform(x, y) {
|
|
90
|
+
// Round the transforms since some browsers will
|
|
91
|
+
// blur the elements for sub-pixel transforms.
|
|
92
|
+
return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;
|
|
102
93
|
}
|
|
103
94
|
|
|
104
95
|
/** Gets a mutable version of an element's bounding `DOMRect`. */
|
|
@@ -283,6 +274,152 @@ function transferCanvasData(source, clone) {
|
|
|
283
274
|
}
|
|
284
275
|
}
|
|
285
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Gets the root HTML element of an embedded view.
|
|
279
|
+
* If the root is not an HTML element it gets wrapped in one.
|
|
280
|
+
*/
|
|
281
|
+
function getRootNode(viewRef, _document) {
|
|
282
|
+
const rootNodes = viewRef.rootNodes;
|
|
283
|
+
if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {
|
|
284
|
+
return rootNodes[0];
|
|
285
|
+
}
|
|
286
|
+
const wrapper = _document.createElement('div');
|
|
287
|
+
rootNodes.forEach(node => wrapper.appendChild(node));
|
|
288
|
+
return wrapper;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/** Parses a CSS time value to milliseconds. */
|
|
292
|
+
function parseCssTimeUnitsToMs(value) {
|
|
293
|
+
// Some browsers will return it in seconds, whereas others will return milliseconds.
|
|
294
|
+
const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;
|
|
295
|
+
return parseFloat(value) * multiplier;
|
|
296
|
+
}
|
|
297
|
+
/** Gets the transform transition duration, including the delay, of an element in milliseconds. */
|
|
298
|
+
function getTransformTransitionDurationInMs(element) {
|
|
299
|
+
const computedStyle = getComputedStyle(element);
|
|
300
|
+
const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');
|
|
301
|
+
const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');
|
|
302
|
+
// If there's no transition for `all` or `transform`, we shouldn't do anything.
|
|
303
|
+
if (!property) {
|
|
304
|
+
return 0;
|
|
305
|
+
}
|
|
306
|
+
// Get the index of the property that we're interested in and match
|
|
307
|
+
// it up to the same index in `transition-delay` and `transition-duration`.
|
|
308
|
+
const propertyIndex = transitionedProperties.indexOf(property);
|
|
309
|
+
const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');
|
|
310
|
+
const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');
|
|
311
|
+
return (parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +
|
|
312
|
+
parseCssTimeUnitsToMs(rawDelays[propertyIndex]));
|
|
313
|
+
}
|
|
314
|
+
/** Parses out multiple values from a computed style into an array. */
|
|
315
|
+
function parseCssPropertyValue(computedStyle, name) {
|
|
316
|
+
const value = computedStyle.getPropertyValue(name);
|
|
317
|
+
return value.split(',').map(part => part.trim());
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/** Inline styles to be set as `!important` while dragging. */
|
|
321
|
+
const importantProperties = new Set([
|
|
322
|
+
// Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.
|
|
323
|
+
'position',
|
|
324
|
+
]);
|
|
325
|
+
class PreviewRef {
|
|
326
|
+
constructor(_document, _rootElement, _direction, _initialDomRect, _previewTemplate, _previewClass, _pickupPositionOnPage, _initialTransform, _zIndex) {
|
|
327
|
+
this._document = _document;
|
|
328
|
+
this._rootElement = _rootElement;
|
|
329
|
+
this._direction = _direction;
|
|
330
|
+
this._initialDomRect = _initialDomRect;
|
|
331
|
+
this._previewTemplate = _previewTemplate;
|
|
332
|
+
this._previewClass = _previewClass;
|
|
333
|
+
this._pickupPositionOnPage = _pickupPositionOnPage;
|
|
334
|
+
this._initialTransform = _initialTransform;
|
|
335
|
+
this._zIndex = _zIndex;
|
|
336
|
+
}
|
|
337
|
+
attach(parent) {
|
|
338
|
+
this._preview = this._createPreview();
|
|
339
|
+
parent.appendChild(this._preview);
|
|
340
|
+
// The null check is necessary for browsers that don't support the popover API.
|
|
341
|
+
// Note that we use a string access for compatibility with Closure.
|
|
342
|
+
if ('showPopover' in this._preview) {
|
|
343
|
+
this._preview['showPopover']();
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
destroy() {
|
|
347
|
+
this._preview.remove();
|
|
348
|
+
this._previewEmbeddedView?.destroy();
|
|
349
|
+
this._preview = this._previewEmbeddedView = null;
|
|
350
|
+
}
|
|
351
|
+
setTransform(value) {
|
|
352
|
+
this._preview.style.transform = value;
|
|
353
|
+
}
|
|
354
|
+
getBoundingClientRect() {
|
|
355
|
+
return this._preview.getBoundingClientRect();
|
|
356
|
+
}
|
|
357
|
+
addClass(className) {
|
|
358
|
+
this._preview.classList.add(className);
|
|
359
|
+
}
|
|
360
|
+
getTransitionDuration() {
|
|
361
|
+
return getTransformTransitionDurationInMs(this._preview);
|
|
362
|
+
}
|
|
363
|
+
addEventListener(name, handler) {
|
|
364
|
+
this._preview.addEventListener(name, handler);
|
|
365
|
+
}
|
|
366
|
+
removeEventListener(name, handler) {
|
|
367
|
+
this._preview.removeEventListener(name, handler);
|
|
368
|
+
}
|
|
369
|
+
_createPreview() {
|
|
370
|
+
const previewConfig = this._previewTemplate;
|
|
371
|
+
const previewClass = this._previewClass;
|
|
372
|
+
const previewTemplate = previewConfig ? previewConfig.template : null;
|
|
373
|
+
let preview;
|
|
374
|
+
if (previewTemplate && previewConfig) {
|
|
375
|
+
// Measure the element before we've inserted the preview
|
|
376
|
+
// since the insertion could throw off the measurement.
|
|
377
|
+
const rootRect = previewConfig.matchSize ? this._initialDomRect : null;
|
|
378
|
+
const viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate, previewConfig.context);
|
|
379
|
+
viewRef.detectChanges();
|
|
380
|
+
preview = getRootNode(viewRef, this._document);
|
|
381
|
+
this._previewEmbeddedView = viewRef;
|
|
382
|
+
if (previewConfig.matchSize) {
|
|
383
|
+
matchElementSize(preview, rootRect);
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
preview.style.transform = getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
preview = deepCloneNode(this._rootElement);
|
|
391
|
+
matchElementSize(preview, this._initialDomRect);
|
|
392
|
+
if (this._initialTransform) {
|
|
393
|
+
preview.style.transform = this._initialTransform;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
extendStyles(preview.style, {
|
|
397
|
+
// It's important that we disable the pointer events on the preview, because
|
|
398
|
+
// it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.
|
|
399
|
+
'pointer-events': 'none',
|
|
400
|
+
// We have to reset the margin, because it can throw off positioning relative to the viewport.
|
|
401
|
+
'margin': '0',
|
|
402
|
+
'position': 'fixed',
|
|
403
|
+
'top': '0',
|
|
404
|
+
'left': '0',
|
|
405
|
+
'z-index': this._zIndex + '',
|
|
406
|
+
}, importantProperties);
|
|
407
|
+
toggleNativeDragInteractions(preview, false);
|
|
408
|
+
preview.classList.add('cdk-drag-preview');
|
|
409
|
+
preview.setAttribute('popover', 'manual');
|
|
410
|
+
preview.setAttribute('dir', this._direction);
|
|
411
|
+
if (previewClass) {
|
|
412
|
+
if (Array.isArray(previewClass)) {
|
|
413
|
+
previewClass.forEach(className => preview.classList.add(className));
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
preview.classList.add(previewClass);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return preview;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
286
423
|
/** Options that can be used to bind a passive event listener. */
|
|
287
424
|
const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
|
|
288
425
|
/** Options that can be used to bind an active event listener. */
|
|
@@ -704,9 +841,8 @@ class DragRef {
|
|
|
704
841
|
}
|
|
705
842
|
/** Destroys the preview element and its ViewRef. */
|
|
706
843
|
_destroyPreview() {
|
|
707
|
-
this._preview?.
|
|
708
|
-
this.
|
|
709
|
-
this._preview = this._previewRef = null;
|
|
844
|
+
this._preview?.destroy();
|
|
845
|
+
this._preview = null;
|
|
710
846
|
}
|
|
711
847
|
/** Destroys the placeholder element and its ViewRef. */
|
|
712
848
|
_destroyPlaceholder() {
|
|
@@ -793,13 +929,13 @@ class DragRef {
|
|
|
793
929
|
this._initialTransform = element.style.transform || '';
|
|
794
930
|
// Create the preview after the initial transform has
|
|
795
931
|
// been cached, because it can be affected by the transform.
|
|
796
|
-
this._preview = this.
|
|
932
|
+
this._preview = new PreviewRef(this._document, this._rootElement, this._direction, this._initialDomRect, this._previewTemplate || null, this.previewClass || null, this._pickupPositionOnPage, this._initialTransform, this._config.zIndex || 1000);
|
|
933
|
+
this._preview.attach(this._getPreviewInsertionPoint(parent, shadowRoot));
|
|
797
934
|
// We move the element out at the end of the body and we make it hidden, because keeping it in
|
|
798
935
|
// place will throw off the consumer's `:last-child` selectors. We can't remove the element
|
|
799
936
|
// from the DOM completely, because iOS will stop firing all subsequent events in the chain.
|
|
800
937
|
toggleVisibility(element, false, dragImportantProperties);
|
|
801
938
|
this._document.body.appendChild(parent.replaceChild(placeholder, element));
|
|
802
|
-
this._getPreviewInsertionPoint(parent, shadowRoot).appendChild(this._preview);
|
|
803
939
|
this.started.next({ source: this, event }); // Emit before notifying the container.
|
|
804
940
|
dropContainer.start();
|
|
805
941
|
this._initialContainer = dropContainer;
|
|
@@ -972,61 +1108,6 @@ class DragRef {
|
|
|
972
1108
|
}
|
|
973
1109
|
}
|
|
974
1110
|
}
|
|
975
|
-
/**
|
|
976
|
-
* Creates the element that will be rendered next to the user's pointer
|
|
977
|
-
* and will be used as a preview of the element that is being dragged.
|
|
978
|
-
*/
|
|
979
|
-
_createPreviewElement() {
|
|
980
|
-
const previewConfig = this._previewTemplate;
|
|
981
|
-
const previewClass = this.previewClass;
|
|
982
|
-
const previewTemplate = previewConfig ? previewConfig.template : null;
|
|
983
|
-
let preview;
|
|
984
|
-
if (previewTemplate && previewConfig) {
|
|
985
|
-
// Measure the element before we've inserted the preview
|
|
986
|
-
// since the insertion could throw off the measurement.
|
|
987
|
-
const rootRect = previewConfig.matchSize ? this._initialDomRect : null;
|
|
988
|
-
const viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate, previewConfig.context);
|
|
989
|
-
viewRef.detectChanges();
|
|
990
|
-
preview = getRootNode(viewRef, this._document);
|
|
991
|
-
this._previewRef = viewRef;
|
|
992
|
-
if (previewConfig.matchSize) {
|
|
993
|
-
matchElementSize(preview, rootRect);
|
|
994
|
-
}
|
|
995
|
-
else {
|
|
996
|
-
preview.style.transform = getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
else {
|
|
1000
|
-
preview = deepCloneNode(this._rootElement);
|
|
1001
|
-
matchElementSize(preview, this._initialDomRect);
|
|
1002
|
-
if (this._initialTransform) {
|
|
1003
|
-
preview.style.transform = this._initialTransform;
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
extendStyles(preview.style, {
|
|
1007
|
-
// It's important that we disable the pointer events on the preview, because
|
|
1008
|
-
// it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.
|
|
1009
|
-
'pointer-events': 'none',
|
|
1010
|
-
// We have to reset the margin, because it can throw off positioning relative to the viewport.
|
|
1011
|
-
'margin': '0',
|
|
1012
|
-
'position': 'fixed',
|
|
1013
|
-
'top': '0',
|
|
1014
|
-
'left': '0',
|
|
1015
|
-
'z-index': `${this._config.zIndex || 1000}`,
|
|
1016
|
-
}, dragImportantProperties);
|
|
1017
|
-
toggleNativeDragInteractions(preview, false);
|
|
1018
|
-
preview.classList.add('cdk-drag-preview');
|
|
1019
|
-
preview.setAttribute('dir', this._direction);
|
|
1020
|
-
if (previewClass) {
|
|
1021
|
-
if (Array.isArray(previewClass)) {
|
|
1022
|
-
previewClass.forEach(className => preview.classList.add(className));
|
|
1023
|
-
}
|
|
1024
|
-
else {
|
|
1025
|
-
preview.classList.add(previewClass);
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
return preview;
|
|
1029
|
-
}
|
|
1030
1111
|
/**
|
|
1031
1112
|
* Animates the preview element from its current position to the location of the drop placeholder.
|
|
1032
1113
|
* @returns Promise that resolves when the animation completes.
|
|
@@ -1038,14 +1119,14 @@ class DragRef {
|
|
|
1038
1119
|
}
|
|
1039
1120
|
const placeholderRect = this._placeholder.getBoundingClientRect();
|
|
1040
1121
|
// Apply the class that adds a transition to the preview.
|
|
1041
|
-
this._preview.
|
|
1122
|
+
this._preview.addClass('cdk-drag-animating');
|
|
1042
1123
|
// Move the preview to the placeholder position.
|
|
1043
1124
|
this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);
|
|
1044
1125
|
// If the element doesn't have a `transition`, the `transitionend` event won't fire. Since
|
|
1045
1126
|
// we need to trigger a style recalculation in order for the `cdk-drag-animating` class to
|
|
1046
1127
|
// apply its style, we take advantage of the available info to figure out whether we need to
|
|
1047
1128
|
// bind the event in the first place.
|
|
1048
|
-
const duration =
|
|
1129
|
+
const duration = this._preview.getTransitionDuration();
|
|
1049
1130
|
if (duration === 0) {
|
|
1050
1131
|
return Promise.resolve();
|
|
1051
1132
|
}
|
|
@@ -1233,7 +1314,7 @@ class DragRef {
|
|
|
1233
1314
|
// it could be completely different and the transform might not make sense anymore.
|
|
1234
1315
|
const initialTransform = this._previewTemplate?.template ? undefined : this._initialTransform;
|
|
1235
1316
|
const transform = getTransform(x, y);
|
|
1236
|
-
this._preview.
|
|
1317
|
+
this._preview.setTransform(combineTransforms(transform, initialTransform));
|
|
1237
1318
|
}
|
|
1238
1319
|
/**
|
|
1239
1320
|
* Gets the distance that the user has dragged during the current drag sequence.
|
|
@@ -1392,16 +1473,6 @@ class DragRef {
|
|
|
1392
1473
|
});
|
|
1393
1474
|
}
|
|
1394
1475
|
}
|
|
1395
|
-
/**
|
|
1396
|
-
* Gets a 3d `transform` that can be applied to an element.
|
|
1397
|
-
* @param x Desired position of the element along the X axis.
|
|
1398
|
-
* @param y Desired position of the element along the Y axis.
|
|
1399
|
-
*/
|
|
1400
|
-
function getTransform(x, y) {
|
|
1401
|
-
// Round the transforms since some browsers will
|
|
1402
|
-
// blur the elements for sub-pixel transforms.
|
|
1403
|
-
return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;
|
|
1404
|
-
}
|
|
1405
1476
|
/** Clamps a value between a minimum and a maximum. */
|
|
1406
1477
|
function clamp$1(value, min, max) {
|
|
1407
1478
|
return Math.max(min, Math.min(max, value));
|
|
@@ -1413,29 +1484,6 @@ function isTouchEvent(event) {
|
|
|
1413
1484
|
// that if the event's name starts with `t`, it's a touch event.
|
|
1414
1485
|
return event.type[0] === 't';
|
|
1415
1486
|
}
|
|
1416
|
-
/**
|
|
1417
|
-
* Gets the root HTML element of an embedded view.
|
|
1418
|
-
* If the root is not an HTML element it gets wrapped in one.
|
|
1419
|
-
*/
|
|
1420
|
-
function getRootNode(viewRef, _document) {
|
|
1421
|
-
const rootNodes = viewRef.rootNodes;
|
|
1422
|
-
if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {
|
|
1423
|
-
return rootNodes[0];
|
|
1424
|
-
}
|
|
1425
|
-
const wrapper = _document.createElement('div');
|
|
1426
|
-
rootNodes.forEach(node => wrapper.appendChild(node));
|
|
1427
|
-
return wrapper;
|
|
1428
|
-
}
|
|
1429
|
-
/**
|
|
1430
|
-
* Matches the target element's size to the source's size.
|
|
1431
|
-
* @param target Element that needs to be resized.
|
|
1432
|
-
* @param sourceRect Dimensions of the source element.
|
|
1433
|
-
*/
|
|
1434
|
-
function matchElementSize(target, sourceRect) {
|
|
1435
|
-
target.style.width = `${sourceRect.width}px`;
|
|
1436
|
-
target.style.height = `${sourceRect.height}px`;
|
|
1437
|
-
target.style.transform = getTransform(sourceRect.left, sourceRect.top);
|
|
1438
|
-
}
|
|
1439
1487
|
/** Callback invoked for `selectstart` events inside the shadow DOM. */
|
|
1440
1488
|
function shadowDomSelectStart(event) {
|
|
1441
1489
|
event.preventDefault();
|
|
@@ -2635,10 +2683,10 @@ class DragDropRegistry {
|
|
|
2635
2683
|
});
|
|
2636
2684
|
this._globalListeners.clear();
|
|
2637
2685
|
}
|
|
2638
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2639
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2686
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDropRegistry, deps: [{ token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2687
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDropRegistry, providedIn: 'root' }); }
|
|
2640
2688
|
}
|
|
2641
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDropRegistry, decorators: [{
|
|
2642
2690
|
type: Injectable,
|
|
2643
2691
|
args: [{ providedIn: 'root' }]
|
|
2644
2692
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: undefined, decorators: [{
|
|
@@ -2651,6 +2699,20 @@ const DEFAULT_CONFIG = {
|
|
|
2651
2699
|
dragStartThreshold: 5,
|
|
2652
2700
|
pointerDirectionChangeThreshold: 5,
|
|
2653
2701
|
};
|
|
2702
|
+
/** Keeps track of the apps currently containing badges. */
|
|
2703
|
+
const activeApps = new Set();
|
|
2704
|
+
/**
|
|
2705
|
+
* Component used to load the drag&drop reset styles.
|
|
2706
|
+
* @docs-private
|
|
2707
|
+
*/
|
|
2708
|
+
class _ResetsLoader {
|
|
2709
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: _ResetsLoader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2710
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.5", type: _ResetsLoader, isStandalone: true, selector: "ng-component", host: { attributes: { "cdk-drag-resets-container": "" } }, ngImport: i0, template: '', isInline: true, styles: ["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2711
|
+
}
|
|
2712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: _ResetsLoader, decorators: [{
|
|
2713
|
+
type: Component,
|
|
2714
|
+
args: [{ standalone: true, encapsulation: ViewEncapsulation.None, template: '', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'cdk-drag-resets-container': '' }, styles: ["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}"] }]
|
|
2715
|
+
}] });
|
|
2654
2716
|
/**
|
|
2655
2717
|
* Service that allows for drag-and-drop functionality to be attached to DOM elements.
|
|
2656
2718
|
*/
|
|
@@ -2660,6 +2722,8 @@ class DragDrop {
|
|
|
2660
2722
|
this._ngZone = _ngZone;
|
|
2661
2723
|
this._viewportRuler = _viewportRuler;
|
|
2662
2724
|
this._dragDropRegistry = _dragDropRegistry;
|
|
2725
|
+
this._appRef = inject(ApplicationRef);
|
|
2726
|
+
this._environmentInjector = inject(EnvironmentInjector);
|
|
2663
2727
|
}
|
|
2664
2728
|
/**
|
|
2665
2729
|
* Turns an element into a draggable item.
|
|
@@ -2667,6 +2731,7 @@ class DragDrop {
|
|
|
2667
2731
|
* @param config Object used to configure the dragging behavior.
|
|
2668
2732
|
*/
|
|
2669
2733
|
createDrag(element, config = DEFAULT_CONFIG) {
|
|
2734
|
+
this._loadResets();
|
|
2670
2735
|
return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry);
|
|
2671
2736
|
}
|
|
2672
2737
|
/**
|
|
@@ -2676,10 +2741,26 @@ class DragDrop {
|
|
|
2676
2741
|
createDropList(element) {
|
|
2677
2742
|
return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
|
|
2678
2743
|
}
|
|
2679
|
-
|
|
2680
|
-
|
|
2744
|
+
// TODO(crisbeto): abstract this away into something reusable.
|
|
2745
|
+
/** Loads the CSS resets needed for the module to work correctly. */
|
|
2746
|
+
_loadResets() {
|
|
2747
|
+
if (!activeApps.has(this._appRef)) {
|
|
2748
|
+
activeApps.add(this._appRef);
|
|
2749
|
+
const componentRef = createComponent(_ResetsLoader, {
|
|
2750
|
+
environmentInjector: this._environmentInjector,
|
|
2751
|
+
});
|
|
2752
|
+
this._appRef.onDestroy(() => {
|
|
2753
|
+
activeApps.delete(this._appRef);
|
|
2754
|
+
if (activeApps.size === 0) {
|
|
2755
|
+
componentRef.destroy();
|
|
2756
|
+
}
|
|
2757
|
+
});
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDrop, deps: [{ token: DOCUMENT }, { token: i0.NgZone }, { token: i1.ViewportRuler }, { token: DragDropRegistry }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2761
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDrop, providedIn: 'root' }); }
|
|
2681
2762
|
}
|
|
2682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDrop, decorators: [{
|
|
2683
2764
|
type: Injectable,
|
|
2684
2765
|
args: [{ providedIn: 'root' }]
|
|
2685
2766
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -2737,10 +2818,10 @@ class CdkDragHandle {
|
|
|
2737
2818
|
this._parentDrag?._removeHandle(this);
|
|
2738
2819
|
this._stateChanges.complete();
|
|
2739
2820
|
}
|
|
2740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2741
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.
|
|
2821
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDragHandle, deps: [{ token: i0.ElementRef }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2822
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.5", type: CdkDragHandle, isStandalone: true, selector: "[cdkDragHandle]", inputs: { disabled: ["cdkDragHandleDisabled", "disabled", booleanAttribute] }, host: { classAttribute: "cdk-drag-handle" }, providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }], ngImport: i0 }); }
|
|
2742
2823
|
}
|
|
2743
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDragHandle, decorators: [{
|
|
2744
2825
|
type: Directive,
|
|
2745
2826
|
args: [{
|
|
2746
2827
|
selector: '[cdkDragHandle]',
|
|
@@ -3153,10 +3234,10 @@ class CdkDrag {
|
|
|
3153
3234
|
handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);
|
|
3154
3235
|
});
|
|
3155
3236
|
}
|
|
3156
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3157
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.
|
|
3237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDrag, deps: [{ token: i0.ElementRef }, { token: CDK_DROP_LIST, optional: true, skipSelf: true }, { token: DOCUMENT }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: CDK_DRAG_CONFIG, optional: true }, { token: i1$1.Directionality, optional: true }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: CDK_DRAG_HANDLE, optional: true, self: true }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3238
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.5", type: CdkDrag, isStandalone: true, selector: "[cdkDrag]", inputs: { data: ["cdkDragData", "data"], lockAxis: ["cdkDragLockAxis", "lockAxis"], rootElementSelector: ["cdkDragRootElement", "rootElementSelector"], boundaryElement: ["cdkDragBoundary", "boundaryElement"], dragStartDelay: ["cdkDragStartDelay", "dragStartDelay"], freeDragPosition: ["cdkDragFreeDragPosition", "freeDragPosition"], disabled: ["cdkDragDisabled", "disabled", booleanAttribute], constrainPosition: ["cdkDragConstrainPosition", "constrainPosition"], previewClass: ["cdkDragPreviewClass", "previewClass"], previewContainer: ["cdkDragPreviewContainer", "previewContainer"] }, outputs: { started: "cdkDragStarted", released: "cdkDragReleased", ended: "cdkDragEnded", entered: "cdkDragEntered", exited: "cdkDragExited", dropped: "cdkDragDropped", moved: "cdkDragMoved" }, host: { properties: { "class.cdk-drag-disabled": "disabled", "class.cdk-drag-dragging": "_dragRef.isDragging()" }, classAttribute: "cdk-drag" }, providers: [{ provide: CDK_DRAG_PARENT, useExisting: CdkDrag }], exportAs: ["cdkDrag"], usesOnChanges: true, ngImport: i0 }); }
|
|
3158
3239
|
}
|
|
3159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDrag, decorators: [{
|
|
3160
3241
|
type: Directive,
|
|
3161
3242
|
args: [{
|
|
3162
3243
|
selector: '[cdkDrag]',
|
|
@@ -3275,10 +3356,10 @@ class CdkDropListGroup {
|
|
|
3275
3356
|
ngOnDestroy() {
|
|
3276
3357
|
this._items.clear();
|
|
3277
3358
|
}
|
|
3278
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3279
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.
|
|
3359
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDropListGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3360
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.5", type: CdkDropListGroup, isStandalone: true, selector: "[cdkDropListGroup]", inputs: { disabled: ["cdkDropListGroupDisabled", "disabled", booleanAttribute] }, providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }], exportAs: ["cdkDropListGroup"], ngImport: i0 }); }
|
|
3280
3361
|
}
|
|
3281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDropListGroup, decorators: [{
|
|
3282
3363
|
type: Directive,
|
|
3283
3364
|
args: [{
|
|
3284
3365
|
selector: '[cdkDropListGroup]',
|
|
@@ -3524,14 +3605,14 @@ class CdkDropList {
|
|
|
3524
3605
|
_syncItemsWithRef() {
|
|
3525
3606
|
this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));
|
|
3526
3607
|
}
|
|
3527
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3528
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.
|
|
3608
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDropList, deps: [{ token: i0.ElementRef }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: i1.ScrollDispatcher }, { token: i1$1.Directionality, optional: true }, { token: CDK_DROP_LIST_GROUP, optional: true, skipSelf: true }, { token: CDK_DRAG_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3609
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.5", type: CdkDropList, isStandalone: true, selector: "[cdkDropList], cdk-drop-list", inputs: { connectedTo: ["cdkDropListConnectedTo", "connectedTo"], data: ["cdkDropListData", "data"], orientation: ["cdkDropListOrientation", "orientation"], id: "id", lockAxis: ["cdkDropListLockAxis", "lockAxis"], disabled: ["cdkDropListDisabled", "disabled", booleanAttribute], sortingDisabled: ["cdkDropListSortingDisabled", "sortingDisabled", booleanAttribute], enterPredicate: ["cdkDropListEnterPredicate", "enterPredicate"], sortPredicate: ["cdkDropListSortPredicate", "sortPredicate"], autoScrollDisabled: ["cdkDropListAutoScrollDisabled", "autoScrollDisabled", booleanAttribute], autoScrollStep: ["cdkDropListAutoScrollStep", "autoScrollStep"] }, outputs: { dropped: "cdkDropListDropped", entered: "cdkDropListEntered", exited: "cdkDropListExited", sorted: "cdkDropListSorted" }, host: { properties: { "attr.id": "id", "class.cdk-drop-list-disabled": "disabled", "class.cdk-drop-list-dragging": "_dropListRef.isDragging()", "class.cdk-drop-list-receiving": "_dropListRef.isReceiving()" }, classAttribute: "cdk-drop-list" }, providers: [
|
|
3529
3610
|
// Prevent child drop lists from picking up the same group as their parent.
|
|
3530
3611
|
{ provide: CDK_DROP_LIST_GROUP, useValue: undefined },
|
|
3531
3612
|
{ provide: CDK_DROP_LIST, useExisting: CdkDropList },
|
|
3532
3613
|
], exportAs: ["cdkDropList"], ngImport: i0 }); }
|
|
3533
3614
|
}
|
|
3534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDropList, decorators: [{
|
|
3535
3616
|
type: Directive,
|
|
3536
3617
|
args: [{
|
|
3537
3618
|
selector: '[cdkDropList], cdk-drop-list',
|
|
@@ -3631,10 +3712,10 @@ class CdkDragPreview {
|
|
|
3631
3712
|
ngOnDestroy() {
|
|
3632
3713
|
this._drag?._resetPreviewTemplate(this);
|
|
3633
3714
|
}
|
|
3634
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3635
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.
|
|
3715
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDragPreview, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3716
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.5", type: CdkDragPreview, isStandalone: true, selector: "ng-template[cdkDragPreview]", inputs: { data: "data", matchSize: ["matchSize", "matchSize", booleanAttribute] }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 }); }
|
|
3636
3717
|
}
|
|
3637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDragPreview, decorators: [{
|
|
3638
3719
|
type: Directive,
|
|
3639
3720
|
args: [{
|
|
3640
3721
|
selector: 'ng-template[cdkDragPreview]',
|
|
@@ -3667,10 +3748,10 @@ class CdkDragPlaceholder {
|
|
|
3667
3748
|
ngOnDestroy() {
|
|
3668
3749
|
this._drag?._resetPlaceholderTemplate(this);
|
|
3669
3750
|
}
|
|
3670
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3671
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
3751
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDragPlaceholder, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3752
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.5", type: CdkDragPlaceholder, isStandalone: true, selector: "ng-template[cdkDragPlaceholder]", inputs: { data: "data" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 }); }
|
|
3672
3753
|
}
|
|
3673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: CdkDragPlaceholder, decorators: [{
|
|
3674
3755
|
type: Directive,
|
|
3675
3756
|
args: [{
|
|
3676
3757
|
selector: 'ng-template[cdkDragPlaceholder]',
|
|
@@ -3690,8 +3771,8 @@ const DRAG_DROP_DIRECTIVES = [
|
|
|
3690
3771
|
CdkDragPlaceholder,
|
|
3691
3772
|
];
|
|
3692
3773
|
class DragDropModule {
|
|
3693
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3694
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
3774
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3775
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDropModule, imports: [CdkDropList,
|
|
3695
3776
|
CdkDropListGroup,
|
|
3696
3777
|
CdkDrag,
|
|
3697
3778
|
CdkDragHandle,
|
|
@@ -3702,9 +3783,9 @@ class DragDropModule {
|
|
|
3702
3783
|
CdkDragHandle,
|
|
3703
3784
|
CdkDragPreview,
|
|
3704
3785
|
CdkDragPlaceholder] }); }
|
|
3705
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3786
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDropModule, providers: [DragDrop], imports: [CdkScrollableModule] }); }
|
|
3706
3787
|
}
|
|
3707
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5", ngImport: i0, type: DragDropModule, decorators: [{
|
|
3708
3789
|
type: NgModule,
|
|
3709
3790
|
args: [{
|
|
3710
3791
|
imports: DRAG_DROP_DIRECTIVES,
|