ngx-aur-mat-table 17.2.2-20 → 17.2.2-21
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/esm2022/lib/drag-drop/aur-drag-drop.manager.mjs +10 -30
- package/esm2022/lib/drag-drop/model/aur-drag-drop-mapping.mjs +1 -1
- package/esm2022/lib/ngx-aur-mat-table.component.mjs +3 -3
- package/fesm2022/ngx-aur-mat-table.mjs +11 -31
- package/fesm2022/ngx-aur-mat-table.mjs.map +1 -1
- package/lib/drag-drop/aur-drag-drop.manager.d.ts +2 -6
- package/lib/drag-drop/model/aur-drag-drop-mapping.d.ts +1 -19
- package/package.json +1 -1
|
@@ -54,18 +54,14 @@ export declare class AurDragDropManager {
|
|
|
54
54
|
canDropPreventDefault(targetName: string, event: DragEvent): void;
|
|
55
55
|
/**
|
|
56
56
|
* Executes the drop operation on the specified target.
|
|
57
|
-
* @param {unknown[]} targetDataset - The dataset of the target element.
|
|
58
57
|
* @param {string} targetName - The name of the target element.
|
|
59
58
|
* @param {any} targetData - The data for the target element.
|
|
60
59
|
*/
|
|
61
|
-
drop(
|
|
60
|
+
drop(targetName: string, targetData: any): void;
|
|
62
61
|
/**
|
|
63
62
|
* Ends the drag operation and updates the dataset if the drop was successful.
|
|
64
|
-
* @param {unknown[]} sourceDataset - The dataset of the source element.
|
|
65
63
|
*/
|
|
66
|
-
endDrag(
|
|
64
|
+
endDrag(): void;
|
|
67
65
|
private buildDropContext;
|
|
68
|
-
private buildGrabContext;
|
|
69
|
-
private calcDatasetAfterGrab;
|
|
70
66
|
private getMapping;
|
|
71
67
|
}
|
|
@@ -24,15 +24,6 @@ export interface AurDragDropMapping<SOURCE, TARGET> {
|
|
|
24
24
|
* This represents the component that accepts the drop action.
|
|
25
25
|
*/
|
|
26
26
|
readonly targetName: string;
|
|
27
|
-
/**
|
|
28
|
-
* Function called to handle grabbing data from the source component.
|
|
29
|
-
* It is invoked after a drop has occurred, and it describes what should
|
|
30
|
-
* happen to the data in the source table.
|
|
31
|
-
*
|
|
32
|
-
* @param ctx - The grab context containing information about the source and target.
|
|
33
|
-
* @returns An array of data elements of type SOURCE.
|
|
34
|
-
*/
|
|
35
|
-
readonly grabFn: (ctx: GrabContext<SOURCE, TARGET>) => void;
|
|
36
27
|
/**
|
|
37
28
|
* Function called to handle the drop action in the target component.
|
|
38
29
|
* It is invoked when the drop event occurs, and it describes how to process
|
|
@@ -41,22 +32,13 @@ export interface AurDragDropMapping<SOURCE, TARGET> {
|
|
|
41
32
|
* @param ctx - The drop context containing information about the source and target.
|
|
42
33
|
* @returns An array of data elements of type TARGET.
|
|
43
34
|
*/
|
|
44
|
-
readonly
|
|
35
|
+
readonly afterDropFn: (ctx: DropContext<SOURCE, TARGET>) => Observable<AurDropResult>;
|
|
45
36
|
}
|
|
46
37
|
export interface AurDropResult {
|
|
47
|
-
isValid: boolean;
|
|
48
|
-
}
|
|
49
|
-
export interface GrabContext<SOURCE, TARGET> {
|
|
50
|
-
readonly sourceName: string;
|
|
51
|
-
readonly sourceData: SOURCE[];
|
|
52
|
-
readonly sourceDataset: SOURCE[];
|
|
53
|
-
readonly targetName: string;
|
|
54
|
-
readonly targetData: TARGET;
|
|
55
38
|
}
|
|
56
39
|
export interface DropContext<SOURCE, TARGET> {
|
|
57
40
|
readonly sourceName: string;
|
|
58
41
|
readonly sourceData: SOURCE[];
|
|
59
|
-
readonly targetDataset: TARGET[];
|
|
60
42
|
readonly targetName: string;
|
|
61
43
|
readonly targetData: TARGET;
|
|
62
44
|
}
|