@angular/cdk 21.0.5 → 21.0.6
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/LICENSE +1 -1
- package/fesm2022/_overlay-module-chunk.mjs +15 -4
- package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +244 -241
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/types/_overlay-module-chunk.d.ts +2 -0
- package/types/drag-drop.d.ts +23 -7
package/package.json
CHANGED
|
@@ -26,6 +26,6 @@ function default_1() {
|
|
|
26
26
|
// In order to align the CDK version with other Angular dependencies that are setup by
|
|
27
27
|
// `@schematics/angular`, we use tilde instead of caret. This is default for Angular
|
|
28
28
|
// dependencies in new CLI projects.
|
|
29
|
-
return (0, utility_1.addDependency)('@angular/cdk', `~21.0.
|
|
29
|
+
return (0, utility_1.addDependency)('@angular/cdk', `~21.0.6`, { existing: utility_1.ExistingBehavior.Skip });
|
|
30
30
|
}
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -713,6 +713,8 @@ declare class FlexibleConnectedPositionStrategy implements PositionStrategy {
|
|
|
713
713
|
private _getViewportMarginBottom;
|
|
714
714
|
/** Returns the DOMRect of the current origin. */
|
|
715
715
|
private _getOriginRect;
|
|
716
|
+
/** Gets the dimensions of the overlay container. */
|
|
717
|
+
private _getContainerRect;
|
|
716
718
|
}
|
|
717
719
|
/** A simple (x, y) coordinate. */
|
|
718
720
|
interface Point {
|
package/types/drag-drop.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, ElementRef, NgZone, OnDestroy, EventEmitter, AfterViewInit, TemplateRef, OnChanges, SimpleChanges, ViewContainerRef, Renderer2 } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injector, ElementRef, NgZone, OnDestroy, EventEmitter, AfterViewInit, TemplateRef, OnChanges, SimpleChanges, ViewContainerRef, Renderer2 } from '@angular/core';
|
|
3
3
|
import { Direction } from './_bidi-module-chunk.js';
|
|
4
4
|
import { Subject, Observable } from 'rxjs';
|
|
5
5
|
import { ViewportRuler } from './scrolling.js';
|
|
@@ -41,6 +41,12 @@ interface DragDropConfig extends Partial<DragRefConfig> {
|
|
|
41
41
|
previewContainer?: 'global' | 'parent';
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Creates a `DropListRef` for an element, turning it into a drop list.
|
|
46
|
+
* @param injector Injector used to resolve dependencies.
|
|
47
|
+
* @param element Element to which to attach the drop list functionality.
|
|
48
|
+
*/
|
|
49
|
+
declare function createDropListRef<T = unknown>(injector: Injector, element: ElementRef<HTMLElement> | HTMLElement): DropListRef<T>;
|
|
44
50
|
/**
|
|
45
51
|
* Reference to a drop list. Used to manipulate or dispose of the container.
|
|
46
52
|
*/
|
|
@@ -924,6 +930,13 @@ interface Point {
|
|
|
924
930
|
* Same advantages and disadvantages as `parent`.
|
|
925
931
|
*/
|
|
926
932
|
type PreviewContainer = 'global' | 'parent' | ElementRef<HTMLElement> | HTMLElement;
|
|
933
|
+
/**
|
|
934
|
+
* Creates a `DragRef` for an element, turning it into a draggable item.
|
|
935
|
+
* @param injector Injector used to resolve dependencies.
|
|
936
|
+
* @param element Element to which to attach the dragging functionality.
|
|
937
|
+
* @param config Object used to configure the dragging behavior.
|
|
938
|
+
*/
|
|
939
|
+
declare function createDragRef<T = unknown>(injector: Injector, element: ElementRef<HTMLElement> | HTMLElement, config?: DragRefConfig): DragRef<T>;
|
|
927
940
|
/**
|
|
928
941
|
* Reference to a draggable item. Used to manipulate or dispose of the item.
|
|
929
942
|
*/
|
|
@@ -1320,23 +1333,26 @@ declare class DragRef<T = any> {
|
|
|
1320
1333
|
|
|
1321
1334
|
/**
|
|
1322
1335
|
* Service that allows for drag-and-drop functionality to be attached to DOM elements.
|
|
1336
|
+
* @deprecated Use the `createDragRef` or `createDropListRef` function for better tree shaking.
|
|
1337
|
+
* Will be removed in v23.
|
|
1338
|
+
* @breaking-change 23.0.0
|
|
1323
1339
|
*/
|
|
1324
1340
|
declare class DragDrop {
|
|
1325
|
-
private
|
|
1326
|
-
private _ngZone;
|
|
1327
|
-
private _viewportRuler;
|
|
1328
|
-
private _dragDropRegistry;
|
|
1329
|
-
private _renderer;
|
|
1341
|
+
private _injector;
|
|
1330
1342
|
constructor(...args: unknown[]);
|
|
1331
1343
|
/**
|
|
1332
1344
|
* Turns an element into a draggable item.
|
|
1333
1345
|
* @param element Element to which to attach the dragging functionality.
|
|
1334
1346
|
* @param config Object used to configure the dragging behavior.
|
|
1347
|
+
* @deprecated Use the `createDragRef` function that provides better tree shaking.
|
|
1348
|
+
* @breaking-change 23.0.0
|
|
1335
1349
|
*/
|
|
1336
1350
|
createDrag<T = any>(element: ElementRef<HTMLElement> | HTMLElement, config?: DragRefConfig): DragRef<T>;
|
|
1337
1351
|
/**
|
|
1338
1352
|
* Turns an element into a drop list.
|
|
1339
1353
|
* @param element Element to which to attach the drop list functionality.
|
|
1354
|
+
* @deprecated Use the `createDropListRef` function that provides better tree shaking.
|
|
1355
|
+
* @breaking-change 23.0.0
|
|
1340
1356
|
*/
|
|
1341
1357
|
createDropList<T = any>(element: ElementRef<HTMLElement> | HTMLElement): DropListRef<T>;
|
|
1342
1358
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragDrop, never>;
|
|
@@ -1406,5 +1422,5 @@ declare class DragDropModule {
|
|
|
1406
1422
|
static ɵinj: i0.ɵɵInjectorDeclaration<DragDropModule>;
|
|
1407
1423
|
}
|
|
1408
1424
|
|
|
1409
|
-
export { CDK_DRAG_CONFIG, CDK_DRAG_HANDLE, CDK_DRAG_PARENT, CDK_DRAG_PLACEHOLDER, CDK_DRAG_PREVIEW, CDK_DROP_LIST, CDK_DROP_LIST_GROUP, CdkDrag, CdkDragHandle, CdkDragPlaceholder, CdkDragPreview, CdkDropList, CdkDropListGroup, DragDrop, DragDropModule, DragDropRegistry, DragRef, DropListRef, copyArrayItem, moveItemInArray, transferArrayItem };
|
|
1425
|
+
export { CDK_DRAG_CONFIG, CDK_DRAG_HANDLE, CDK_DRAG_PARENT, CDK_DRAG_PLACEHOLDER, CDK_DRAG_PREVIEW, CDK_DROP_LIST, CDK_DROP_LIST_GROUP, CdkDrag, CdkDragHandle, CdkDragPlaceholder, CdkDragPreview, CdkDropList, CdkDropListGroup, DragDrop, DragDropModule, DragDropRegistry, DragRef, DropListRef, copyArrayItem, createDragRef, createDropListRef, moveItemInArray, transferArrayItem };
|
|
1410
1426
|
export type { CdkDragDrop, CdkDragEnd, CdkDragEnter, CdkDragExit, CdkDragMove, CdkDragRelease, CdkDragSortEvent, CdkDragStart, DragAxis, DragConstrainPosition, DragDropConfig, DragRefConfig, DragStartDelay, DropListOrientation, Point, PreviewContainer };
|