1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { Directive, TemplateRef, Input, InjectionToken } from '@angular/core';
|
---|
9 | /**
|
---|
10 | * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as
|
---|
11 | * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary
|
---|
12 | * retention of the class and its directive metadata.
|
---|
13 | */
|
---|
14 | export const CDK_DRAG_PLACEHOLDER = new InjectionToken('CdkDragPlaceholder');
|
---|
15 | /**
|
---|
16 | * Element that will be used as a template for the placeholder of a CdkDrag when
|
---|
17 | * it is being dragged. The placeholder is displayed in place of the element being dragged.
|
---|
18 | */
|
---|
19 | export class CdkDragPlaceholder {
|
---|
20 | constructor(templateRef) {
|
---|
21 | this.templateRef = templateRef;
|
---|
22 | }
|
---|
23 | }
|
---|
24 | CdkDragPlaceholder.decorators = [
|
---|
25 | { type: Directive, args: [{
|
---|
26 | selector: 'ng-template[cdkDragPlaceholder]',
|
---|
27 | providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }],
|
---|
28 | },] }
|
---|
29 | ];
|
---|
30 | CdkDragPlaceholder.ctorParameters = () => [
|
---|
31 | { type: TemplateRef }
|
---|
32 | ];
|
---|
33 | CdkDragPlaceholder.propDecorators = {
|
---|
34 | data: [{ type: Input }]
|
---|
35 | };
|
---|
36 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhZy1wbGFjZWhvbGRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9jZGsvZHJhZy1kcm9wL2RpcmVjdGl2ZXMvZHJhZy1wbGFjZWhvbGRlci50cyJdLCJuYW1lcyI6W10sIm1hc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