@angular/cdk 17.3.0-next.0 → 17.3.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 +19 -14
- package/esm2022/a11y/live-announcer/live-announcer.mjs +4 -2
- package/esm2022/dialog/dialog-container.mjs +1 -1
- package/esm2022/drag-drop/directives/drag-handle.mjs +5 -3
- package/esm2022/drag-drop/directives/drag-placeholder.mjs +8 -2
- package/esm2022/drag-drop/directives/drag-preview.mjs +8 -2
- package/esm2022/drag-drop/directives/drag.mjs +43 -27
- package/esm2022/drag-drop/drag-parent.mjs +1 -1
- package/esm2022/menu/context-menu-trigger.mjs +4 -4
- package/esm2022/menu/menu-trigger.mjs +4 -4
- package/esm2022/overlay/position/flexible-connected-position-strategy.mjs +2 -2
- package/esm2022/portal/portal-directives.mjs +7 -5
- package/esm2022/scrolling/virtual-scroll-viewport.mjs +1 -1
- package/esm2022/table/can-stick.mjs +3 -1
- package/esm2022/table/cell.mjs +28 -11
- package/esm2022/table/row.mjs +64 -22
- package/esm2022/table/table.mjs +1 -1
- package/esm2022/table/text-column.mjs +1 -1
- package/esm2022/tree/node.mjs +2 -2
- package/esm2022/version.mjs +1 -1
- package/fesm2022/a11y.mjs +3 -1
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +118 -88
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/menu.mjs +6 -6
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/overlay.mjs +1 -1
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/portal.mjs +6 -4
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/table.mjs +128 -65
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tree.mjs +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/table/index.d.ts +36 -24
package/fesm2022/drag-drop.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Inject, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter, Self,
|
|
2
|
+
import { Injectable, Inject, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter, Self, Output, inject, 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';
|
|
6
6
|
import { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';
|
|
7
7
|
import { coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';
|
|
8
8
|
import { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
|
|
9
|
-
import { Subject, Subscription, interval, animationFrameScheduler, Observable, merge } from 'rxjs';
|
|
10
|
-
import { takeUntil, map, take,
|
|
9
|
+
import { Subject, Subscription, interval, animationFrameScheduler, Observable, merge, BehaviorSubject } from 'rxjs';
|
|
10
|
+
import { takeUntil, map, take, tap, switchMap, startWith } from 'rxjs/operators';
|
|
11
11
|
import * as i1$1 from '@angular/cdk/bidi';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -2701,17 +2701,19 @@ class CdkDragHandle {
|
|
|
2701
2701
|
this._disabled = value;
|
|
2702
2702
|
this._stateChanges.next(this);
|
|
2703
2703
|
}
|
|
2704
|
-
constructor(element,
|
|
2704
|
+
constructor(element, _parentDrag) {
|
|
2705
2705
|
this.element = element;
|
|
2706
|
+
this._parentDrag = _parentDrag;
|
|
2706
2707
|
/** Emits when the state of the handle has changed. */
|
|
2707
2708
|
this._stateChanges = new Subject();
|
|
2708
2709
|
this._disabled = false;
|
|
2709
2710
|
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2710
2711
|
assertElementNode(element.nativeElement, 'cdkDragHandle');
|
|
2711
2712
|
}
|
|
2712
|
-
this
|
|
2713
|
+
_parentDrag?._addHandle(this);
|
|
2713
2714
|
}
|
|
2714
2715
|
ngOnDestroy() {
|
|
2716
|
+
this._parentDrag?._removeHandle(this);
|
|
2715
2717
|
this._stateChanges.complete();
|
|
2716
2718
|
}
|
|
2717
2719
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragHandle, deps: [{ token: i0.ElementRef }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -2739,67 +2741,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
2739
2741
|
args: [{ alias: 'cdkDragHandleDisabled', transform: booleanAttribute }]
|
|
2740
2742
|
}] } });
|
|
2741
2743
|
|
|
2742
|
-
/**
|
|
2743
|
-
* Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as
|
|
2744
|
-
* alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary
|
|
2745
|
-
* retention of the class and its directive metadata.
|
|
2746
|
-
*/
|
|
2747
|
-
const CDK_DRAG_PLACEHOLDER = new InjectionToken('CdkDragPlaceholder');
|
|
2748
|
-
/**
|
|
2749
|
-
* Element that will be used as a template for the placeholder of a CdkDrag when
|
|
2750
|
-
* it is being dragged. The placeholder is displayed in place of the element being dragged.
|
|
2751
|
-
*/
|
|
2752
|
-
class CdkDragPlaceholder {
|
|
2753
|
-
constructor(templateRef) {
|
|
2754
|
-
this.templateRef = templateRef;
|
|
2755
|
-
}
|
|
2756
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragPlaceholder, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2757
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: CdkDragPlaceholder, isStandalone: true, selector: "ng-template[cdkDragPlaceholder]", inputs: { data: "data" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 }); }
|
|
2758
|
-
}
|
|
2759
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragPlaceholder, decorators: [{
|
|
2760
|
-
type: Directive,
|
|
2761
|
-
args: [{
|
|
2762
|
-
selector: 'ng-template[cdkDragPlaceholder]',
|
|
2763
|
-
standalone: true,
|
|
2764
|
-
providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }],
|
|
2765
|
-
}]
|
|
2766
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { data: [{
|
|
2767
|
-
type: Input
|
|
2768
|
-
}] } });
|
|
2769
|
-
|
|
2770
|
-
/**
|
|
2771
|
-
* Injection token that can be used to reference instances of `CdkDragPreview`. It serves as
|
|
2772
|
-
* alternative token to the actual `CdkDragPreview` class which could cause unnecessary
|
|
2773
|
-
* retention of the class and its directive metadata.
|
|
2774
|
-
*/
|
|
2775
|
-
const CDK_DRAG_PREVIEW = new InjectionToken('CdkDragPreview');
|
|
2776
|
-
/**
|
|
2777
|
-
* Element that will be used as a template for the preview
|
|
2778
|
-
* of a CdkDrag when it is being dragged.
|
|
2779
|
-
*/
|
|
2780
|
-
class CdkDragPreview {
|
|
2781
|
-
constructor(templateRef) {
|
|
2782
|
-
this.templateRef = templateRef;
|
|
2783
|
-
/** Whether the preview should preserve the same size as the item that is being dragged. */
|
|
2784
|
-
this.matchSize = false;
|
|
2785
|
-
}
|
|
2786
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragPreview, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2787
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0", type: CdkDragPreview, isStandalone: true, selector: "ng-template[cdkDragPreview]", inputs: { data: "data", matchSize: ["matchSize", "matchSize", booleanAttribute] }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 }); }
|
|
2788
|
-
}
|
|
2789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragPreview, decorators: [{
|
|
2790
|
-
type: Directive,
|
|
2791
|
-
args: [{
|
|
2792
|
-
selector: 'ng-template[cdkDragPreview]',
|
|
2793
|
-
standalone: true,
|
|
2794
|
-
providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }],
|
|
2795
|
-
}]
|
|
2796
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { data: [{
|
|
2797
|
-
type: Input
|
|
2798
|
-
}], matchSize: [{
|
|
2799
|
-
type: Input,
|
|
2800
|
-
args: [{ transform: booleanAttribute }]
|
|
2801
|
-
}] } });
|
|
2802
|
-
|
|
2803
2744
|
/**
|
|
2804
2745
|
* Injection token that can be used to configure the
|
|
2805
2746
|
* behavior of the drag&drop-related components.
|
|
@@ -2843,6 +2784,7 @@ class CdkDrag {
|
|
|
2843
2784
|
this._selfHandle = _selfHandle;
|
|
2844
2785
|
this._parentDrag = _parentDrag;
|
|
2845
2786
|
this._destroyed = new Subject();
|
|
2787
|
+
this._handles = new BehaviorSubject([]);
|
|
2846
2788
|
/** Emits when the user starts dragging the item. */
|
|
2847
2789
|
this.started = new EventEmitter();
|
|
2848
2790
|
/** Emits when the user has released a drag item, before any animations have started. */
|
|
@@ -2970,11 +2912,41 @@ class CdkDrag {
|
|
|
2970
2912
|
}
|
|
2971
2913
|
// Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.
|
|
2972
2914
|
this._ngZone.runOutsideAngular(() => {
|
|
2915
|
+
this._handles.complete();
|
|
2973
2916
|
this._destroyed.next();
|
|
2974
2917
|
this._destroyed.complete();
|
|
2975
2918
|
this._dragRef.dispose();
|
|
2976
2919
|
});
|
|
2977
2920
|
}
|
|
2921
|
+
_addHandle(handle) {
|
|
2922
|
+
const handles = this._handles.getValue();
|
|
2923
|
+
handles.push(handle);
|
|
2924
|
+
this._handles.next(handles);
|
|
2925
|
+
}
|
|
2926
|
+
_removeHandle(handle) {
|
|
2927
|
+
const handles = this._handles.getValue();
|
|
2928
|
+
const index = handles.indexOf(handle);
|
|
2929
|
+
if (index > -1) {
|
|
2930
|
+
handles.splice(index, 1);
|
|
2931
|
+
this._handles.next(handles);
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
_setPreviewTemplate(preview) {
|
|
2935
|
+
this._previewTemplate = preview;
|
|
2936
|
+
}
|
|
2937
|
+
_resetPreviewTemplate(preview) {
|
|
2938
|
+
if (preview === this._previewTemplate) {
|
|
2939
|
+
this._previewTemplate = null;
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
_setPlaceholderTemplate(placeholder) {
|
|
2943
|
+
this._placeholderTemplate = placeholder;
|
|
2944
|
+
}
|
|
2945
|
+
_resetPlaceholderTemplate(placeholder) {
|
|
2946
|
+
if (placeholder === this._placeholderTemplate) {
|
|
2947
|
+
this._placeholderTemplate = null;
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2978
2950
|
/** Syncs the root element with the `DragRef`. */
|
|
2979
2951
|
_updateRootElement() {
|
|
2980
2952
|
const element = this.element.nativeElement;
|
|
@@ -3138,26 +3110,22 @@ class CdkDrag {
|
|
|
3138
3110
|
/** Sets up the listener that syncs the handles with the drag ref. */
|
|
3139
3111
|
_setupHandlesListener() {
|
|
3140
3112
|
// Listen for any newly-added handles.
|
|
3141
|
-
this._handles
|
|
3142
|
-
.pipe(
|
|
3113
|
+
this._handles
|
|
3114
|
+
.pipe(
|
|
3143
3115
|
// Sync the new handles with the DragRef.
|
|
3144
|
-
tap(
|
|
3145
|
-
const
|
|
3146
|
-
.filter(handle => handle._parentDrag === this)
|
|
3147
|
-
.map(handle => handle.element);
|
|
3116
|
+
tap(handles => {
|
|
3117
|
+
const handleElements = handles.map(handle => handle.element);
|
|
3148
3118
|
// Usually handles are only allowed to be a descendant of the drag element, but if
|
|
3149
3119
|
// the consumer defined a different drag root, we should allow the drag element
|
|
3150
3120
|
// itself to be a handle too.
|
|
3151
3121
|
if (this._selfHandle && this.rootElementSelector) {
|
|
3152
|
-
|
|
3122
|
+
handleElements.push(this.element);
|
|
3153
3123
|
}
|
|
3154
|
-
this._dragRef.withHandles(
|
|
3124
|
+
this._dragRef.withHandles(handleElements);
|
|
3155
3125
|
}),
|
|
3156
3126
|
// Listen if the state of any of the handles changes.
|
|
3157
3127
|
switchMap((handles) => {
|
|
3158
|
-
return merge(...handles.map(item =>
|
|
3159
|
-
return item._stateChanges.pipe(startWith(item));
|
|
3160
|
-
}));
|
|
3128
|
+
return merge(...handles.map(item => item._stateChanges.pipe(startWith(item))));
|
|
3161
3129
|
}), takeUntil(this._destroyed))
|
|
3162
3130
|
.subscribe(handleInstance => {
|
|
3163
3131
|
// Enabled/disable the handle that changed in the DragRef.
|
|
@@ -3167,7 +3135,7 @@ class CdkDrag {
|
|
|
3167
3135
|
});
|
|
3168
3136
|
}
|
|
3169
3137
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", 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 }); }
|
|
3170
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0", 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 }],
|
|
3138
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0", 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 }); }
|
|
3171
3139
|
}
|
|
3172
3140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDrag, decorators: [{
|
|
3173
3141
|
type: Directive,
|
|
@@ -3213,16 +3181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
3213
3181
|
}, {
|
|
3214
3182
|
type: Inject,
|
|
3215
3183
|
args: [CDK_DRAG_PARENT]
|
|
3216
|
-
}] }], propDecorators: {
|
|
3217
|
-
type: ContentChildren,
|
|
3218
|
-
args: [CDK_DRAG_HANDLE, { descendants: true }]
|
|
3219
|
-
}], _previewTemplate: [{
|
|
3220
|
-
type: ContentChild,
|
|
3221
|
-
args: [CDK_DRAG_PREVIEW]
|
|
3222
|
-
}], _placeholderTemplate: [{
|
|
3223
|
-
type: ContentChild,
|
|
3224
|
-
args: [CDK_DRAG_PLACEHOLDER]
|
|
3225
|
-
}], data: [{
|
|
3184
|
+
}] }], propDecorators: { data: [{
|
|
3226
3185
|
type: Input,
|
|
3227
3186
|
args: ['cdkDragData']
|
|
3228
3187
|
}], lockAxis: [{
|
|
@@ -3632,6 +3591,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
3632
3591
|
args: ['cdkDropListSorted']
|
|
3633
3592
|
}] } });
|
|
3634
3593
|
|
|
3594
|
+
/**
|
|
3595
|
+
* Injection token that can be used to reference instances of `CdkDragPreview`. It serves as
|
|
3596
|
+
* alternative token to the actual `CdkDragPreview` class which could cause unnecessary
|
|
3597
|
+
* retention of the class and its directive metadata.
|
|
3598
|
+
*/
|
|
3599
|
+
const CDK_DRAG_PREVIEW = new InjectionToken('CdkDragPreview');
|
|
3600
|
+
/**
|
|
3601
|
+
* Element that will be used as a template for the preview
|
|
3602
|
+
* of a CdkDrag when it is being dragged.
|
|
3603
|
+
*/
|
|
3604
|
+
class CdkDragPreview {
|
|
3605
|
+
constructor(templateRef) {
|
|
3606
|
+
this.templateRef = templateRef;
|
|
3607
|
+
this._drag = inject(CDK_DRAG_PARENT);
|
|
3608
|
+
/** Whether the preview should preserve the same size as the item that is being dragged. */
|
|
3609
|
+
this.matchSize = false;
|
|
3610
|
+
this._drag._setPreviewTemplate(this);
|
|
3611
|
+
}
|
|
3612
|
+
ngOnDestroy() {
|
|
3613
|
+
this._drag._resetPreviewTemplate(this);
|
|
3614
|
+
}
|
|
3615
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragPreview, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3616
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0", type: CdkDragPreview, isStandalone: true, selector: "ng-template[cdkDragPreview]", inputs: { data: "data", matchSize: ["matchSize", "matchSize", booleanAttribute] }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 }); }
|
|
3617
|
+
}
|
|
3618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragPreview, decorators: [{
|
|
3619
|
+
type: Directive,
|
|
3620
|
+
args: [{
|
|
3621
|
+
selector: 'ng-template[cdkDragPreview]',
|
|
3622
|
+
standalone: true,
|
|
3623
|
+
providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }],
|
|
3624
|
+
}]
|
|
3625
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { data: [{
|
|
3626
|
+
type: Input
|
|
3627
|
+
}], matchSize: [{
|
|
3628
|
+
type: Input,
|
|
3629
|
+
args: [{ transform: booleanAttribute }]
|
|
3630
|
+
}] } });
|
|
3631
|
+
|
|
3632
|
+
/**
|
|
3633
|
+
* Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as
|
|
3634
|
+
* alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary
|
|
3635
|
+
* retention of the class and its directive metadata.
|
|
3636
|
+
*/
|
|
3637
|
+
const CDK_DRAG_PLACEHOLDER = new InjectionToken('CdkDragPlaceholder');
|
|
3638
|
+
/**
|
|
3639
|
+
* Element that will be used as a template for the placeholder of a CdkDrag when
|
|
3640
|
+
* it is being dragged. The placeholder is displayed in place of the element being dragged.
|
|
3641
|
+
*/
|
|
3642
|
+
class CdkDragPlaceholder {
|
|
3643
|
+
constructor(templateRef) {
|
|
3644
|
+
this.templateRef = templateRef;
|
|
3645
|
+
this._drag = inject(CDK_DRAG_PARENT);
|
|
3646
|
+
this._drag._setPlaceholderTemplate(this);
|
|
3647
|
+
}
|
|
3648
|
+
ngOnDestroy() {
|
|
3649
|
+
this._drag._resetPlaceholderTemplate(this);
|
|
3650
|
+
}
|
|
3651
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragPlaceholder, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3652
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: CdkDragPlaceholder, isStandalone: true, selector: "ng-template[cdkDragPlaceholder]", inputs: { data: "data" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 }); }
|
|
3653
|
+
}
|
|
3654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: CdkDragPlaceholder, decorators: [{
|
|
3655
|
+
type: Directive,
|
|
3656
|
+
args: [{
|
|
3657
|
+
selector: 'ng-template[cdkDragPlaceholder]',
|
|
3658
|
+
standalone: true,
|
|
3659
|
+
providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }],
|
|
3660
|
+
}]
|
|
3661
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { data: [{
|
|
3662
|
+
type: Input
|
|
3663
|
+
}] } });
|
|
3664
|
+
|
|
3635
3665
|
const DRAG_DROP_DIRECTIVES = [
|
|
3636
3666
|
CdkDropList,
|
|
3637
3667
|
CdkDropListGroup,
|