@syncfusion/ej2-lists 31.1.17 → 31.2.2
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/dist/ej2-lists.min.js +3 -3
- package/dist/ej2-lists.umd.min.js +3 -3
- package/dist/ej2-lists.umd.min.js.map +1 -1
- package/dist/es6/ej2-lists.es2015.js +3 -1
- package/dist/es6/ej2-lists.es2015.js.map +1 -1
- package/dist/es6/ej2-lists.es5.js +3 -1
- package/dist/es6/ej2-lists.es5.js.map +1 -1
- package/dist/global/ej2-lists.min.js +3 -3
- package/dist/global/ej2-lists.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +12 -56
- package/src/common/list-base.js +3 -1
- package/dist/ts/common/index.d.ts +0 -4
- package/dist/ts/common/index.ts +0 -4
- package/dist/ts/common/list-base.d.ts +0 -415
- package/dist/ts/common/list-base.ts +0 -1362
- package/dist/ts/component.d.ts +0 -4
- package/dist/ts/component.ts +0 -4
- package/dist/ts/index.d.ts +0 -6
- package/dist/ts/index.ts +0 -6
- package/dist/ts/list-view/index.d.ts +0 -6
- package/dist/ts/list-view/index.ts +0 -6
- package/dist/ts/list-view/list-view-model.d.ts +0 -324
- package/dist/ts/list-view/list-view.d.ts +0 -845
- package/dist/ts/list-view/list-view.ts +0 -2740
- package/dist/ts/list-view/virtualization.d.ts +0 -97
- package/dist/ts/list-view/virtualization.ts +0 -947
- package/dist/ts/sortable/index.d.ts +0 -5
- package/dist/ts/sortable/index.ts +0 -5
- package/dist/ts/sortable/sortable-model.d.ts +0 -80
- package/dist/ts/sortable/sortable.d.ts +0 -146
- package/dist/ts/sortable/sortable.ts +0 -483
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Base, Event, getUniqueID, NotifyPropertyChanges, INotifyPropertyChanged, Property, detach, Browser } from '@syncfusion/ej2-base';import { closest, Draggable, DragPosition, MouseEventArgs, remove, compareElementParent } from '@syncfusion/ej2-base';import { addClass, isNullOrUndefined, getComponent, isBlazor, BlazorDragEventArgs, EventHandler } from '@syncfusion/ej2-base';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Interface for a class Sortable
|
|
5
|
-
*/
|
|
6
|
-
export interface SortableModel {
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* It is used to enable or disable the built-in animations. The default value is `false`
|
|
10
|
-
*
|
|
11
|
-
* @default false
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
enableAnimation?: boolean;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Specifies the sortable item class.
|
|
18
|
-
*
|
|
19
|
-
* @default null
|
|
20
|
-
*/
|
|
21
|
-
itemClass?: string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Defines the scope value to group sets of sortable libraries.
|
|
25
|
-
* More than one Sortable with same scope allows to transfer elements between different sortable libraries which has same scope value.
|
|
26
|
-
*/
|
|
27
|
-
scope?: string;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Defines the callback function for customizing the cloned element.
|
|
31
|
-
*/
|
|
32
|
-
helper?: (Element: object) => HTMLElement;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Defines the callback function for customizing the placeHolder element.
|
|
36
|
-
*/
|
|
37
|
-
placeHolder?: (Element: object) => HTMLElement;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Specifies the callback function for drag event.
|
|
41
|
-
*
|
|
42
|
-
* @event 'object'
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
drag?: (e: any) => void;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Specifies the callback function for beforeDragStart event.
|
|
50
|
-
*
|
|
51
|
-
* @event 'object'
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
beforeDragStart?: (e: any) => void;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Specifies the callback function for dragStart event.
|
|
58
|
-
*
|
|
59
|
-
* @event 'object'
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
dragStart?: (e: any) => void;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Specifies the callback function for beforeDrop event.
|
|
66
|
-
*
|
|
67
|
-
* @event 'object'
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
beforeDrop?: (e: any) => void;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Specifies the callback function for drop event.
|
|
74
|
-
*
|
|
75
|
-
* @event 'object'
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
drop?: (e: any) => void;
|
|
79
|
-
|
|
80
|
-
}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { Base, INotifyPropertyChanged } from '@syncfusion/ej2-base';
|
|
2
|
-
import { SortableModel } from './sortable-model';
|
|
3
|
-
/**
|
|
4
|
-
* Sortable Module provides support to enable sortable functionality in Dom Elements.
|
|
5
|
-
* ```html
|
|
6
|
-
* <div id="sortable">
|
|
7
|
-
* <div>Item 1</div>
|
|
8
|
-
* <div>Item 2</div>
|
|
9
|
-
* <div>Item 3</div>
|
|
10
|
-
* <div>Item 4</div>
|
|
11
|
-
* <div>Item 5</div>
|
|
12
|
-
* </div>
|
|
13
|
-
* ```
|
|
14
|
-
* ```typescript
|
|
15
|
-
* let ele: HTMLElement = document.getElementById('sortable');
|
|
16
|
-
* let sortObj: Sortable = new Sortable(ele, {});
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare class Sortable extends Base<HTMLElement> implements INotifyPropertyChanged {
|
|
20
|
-
private target;
|
|
21
|
-
private curTarget;
|
|
22
|
-
private placeHolderElement;
|
|
23
|
-
/**
|
|
24
|
-
* It is used to enable or disable the built-in animations. The default value is `false`
|
|
25
|
-
*
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
|
-
enableAnimation: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Specifies the sortable item class.
|
|
31
|
-
*
|
|
32
|
-
* @default null
|
|
33
|
-
*/
|
|
34
|
-
itemClass: string;
|
|
35
|
-
/**
|
|
36
|
-
* Defines the scope value to group sets of sortable libraries.
|
|
37
|
-
* More than one Sortable with same scope allows to transfer elements between different sortable libraries which has same scope value.
|
|
38
|
-
*/
|
|
39
|
-
scope: string;
|
|
40
|
-
/**
|
|
41
|
-
* Defines the callback function for customizing the cloned element.
|
|
42
|
-
*/
|
|
43
|
-
helper: (Element: object) => HTMLElement;
|
|
44
|
-
/**
|
|
45
|
-
* Defines the callback function for customizing the placeHolder element.
|
|
46
|
-
*/
|
|
47
|
-
placeHolder: (Element: object) => HTMLElement;
|
|
48
|
-
/**
|
|
49
|
-
* Specifies the callback function for drag event.
|
|
50
|
-
*
|
|
51
|
-
* @event 'object'
|
|
52
|
-
*/
|
|
53
|
-
drag: (e: any) => void;
|
|
54
|
-
/**
|
|
55
|
-
* Specifies the callback function for beforeDragStart event.
|
|
56
|
-
*
|
|
57
|
-
* @event 'object'
|
|
58
|
-
*/
|
|
59
|
-
beforeDragStart: (e: any) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Specifies the callback function for dragStart event.
|
|
62
|
-
*
|
|
63
|
-
* @event 'object'
|
|
64
|
-
*/
|
|
65
|
-
dragStart: (e: any) => void;
|
|
66
|
-
/**
|
|
67
|
-
* Specifies the callback function for beforeDrop event.
|
|
68
|
-
*
|
|
69
|
-
* @event 'object'
|
|
70
|
-
*/
|
|
71
|
-
beforeDrop: (e: any) => void;
|
|
72
|
-
/**
|
|
73
|
-
* Specifies the callback function for drop event.
|
|
74
|
-
*
|
|
75
|
-
* @event 'object'
|
|
76
|
-
*/
|
|
77
|
-
drop: (e: any) => void;
|
|
78
|
-
constructor(element: HTMLElement, options?: SortableModel);
|
|
79
|
-
protected bind(): void;
|
|
80
|
-
private initializeDraggable;
|
|
81
|
-
private wireEvents;
|
|
82
|
-
private unwireEvents;
|
|
83
|
-
private keyDownHandler;
|
|
84
|
-
private getPlaceHolder;
|
|
85
|
-
private getHelper;
|
|
86
|
-
private isValidTarget;
|
|
87
|
-
private onDrag;
|
|
88
|
-
private removePlaceHolder;
|
|
89
|
-
private updateItemClass;
|
|
90
|
-
private getSortableInstance;
|
|
91
|
-
private getIndex;
|
|
92
|
-
private getSortableElement;
|
|
93
|
-
private onDragStart;
|
|
94
|
-
private queryPositionInfo;
|
|
95
|
-
private isPlaceHolderPresent;
|
|
96
|
-
private onDragStop;
|
|
97
|
-
/**
|
|
98
|
-
* It is used to sort array of elements from source element to destination element.
|
|
99
|
-
*
|
|
100
|
-
* @param destination - Defines the destination element to which the sortable elements needs to be appended.
|
|
101
|
-
*
|
|
102
|
-
* If it is null, then the Sortable library element will be considered as destination.
|
|
103
|
-
* @param targetIndexes - Specifies the sortable elements indexes which needs to be sorted.
|
|
104
|
-
* @param insertBefore - Specifies the index before which the sortable elements needs to be appended.
|
|
105
|
-
* If it is null, elements will be appended as last child.
|
|
106
|
-
* @function moveTo
|
|
107
|
-
* @returns {void}
|
|
108
|
-
*/
|
|
109
|
-
moveTo(destination?: HTMLElement, targetIndexes?: number[], insertBefore?: number): void;
|
|
110
|
-
/**
|
|
111
|
-
* It is used to destroy the Sortable library.
|
|
112
|
-
*/
|
|
113
|
-
destroy(): void;
|
|
114
|
-
getModuleName(): string;
|
|
115
|
-
onPropertyChanged(newProp: SortableModel, oldProp: SortableModel): void;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* It is used to sort array of elements from source element to destination element.
|
|
119
|
-
*
|
|
120
|
-
* @param {HTMLElement} from - The source element from which to move elements.
|
|
121
|
-
* @param {HTMLElement} [to=from] - The destination element to which to move elements. Defaults to the source element.
|
|
122
|
-
* @param {number[]} [targetIndexes] - The indexes of elements to move. If not provided, all children of the source element will be moved.
|
|
123
|
-
* @param {number} [insertBefore] - The index before which to insert the moved elements in the destination element. If not provided, elements will be appended to the end of the destination element.
|
|
124
|
-
* @returns {void}
|
|
125
|
-
* @private
|
|
126
|
-
*/
|
|
127
|
-
export declare function moveTo(from: HTMLElement, to?: HTMLElement, targetIndexes?: number[], insertBefore?: number): void;
|
|
128
|
-
/**
|
|
129
|
-
* An interface that holds item drop event arguments
|
|
130
|
-
*/
|
|
131
|
-
export interface DropEventArgs {
|
|
132
|
-
previousIndex: number;
|
|
133
|
-
currentIndex: number;
|
|
134
|
-
droppedElement: Element;
|
|
135
|
-
target: Element;
|
|
136
|
-
helper: Element;
|
|
137
|
-
cancel?: boolean;
|
|
138
|
-
handled?: boolean;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* An interface that holds item before drag event arguments
|
|
142
|
-
*/
|
|
143
|
-
export interface BeforeDragEventArgs {
|
|
144
|
-
cancel?: boolean;
|
|
145
|
-
target: Element;
|
|
146
|
-
}
|