@worktile/gantt 15.1.0-next.0 → 15.1.0-next.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/components/bar/bar-drag.d.ts +18 -4
- package/components/bar/bar.component.scss +0 -22
- package/components/drag-backdrop/drag-backdrop.component.scss +1 -0
- package/components/loader/loader.component.d.ts +5 -0
- package/components/loader/loader.component.scss +90 -0
- package/components/table/body/gantt-table-body.component.d.ts +1 -1
- package/esm2020/components/bar/bar-drag.mjs +106 -31
- package/esm2020/components/bar/bar.component.mjs +32 -27
- package/esm2020/components/loader/loader.component.mjs +29 -0
- package/esm2020/components/table/body/gantt-table-body.component.mjs +22 -9
- package/esm2020/components/table/header/gantt-table-header.component.mjs +2 -2
- package/esm2020/gantt-abstract.mjs +1 -1
- package/esm2020/gantt-item-upper.mjs +8 -5
- package/esm2020/gantt.component.mjs +40 -12
- package/esm2020/gantt.module.mjs +4 -1
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/table/gantt-column.component.mjs +8 -4
- package/esm2020/utils/drag-scroll.mjs +35 -0
- package/fesm2015/worktile-gantt.mjs +270 -78
- package/fesm2015/worktile-gantt.mjs.map +1 -1
- package/fesm2020/worktile-gantt.mjs +267 -78
- package/fesm2020/worktile-gantt.mjs.map +1 -1
- package/gantt-abstract.d.ts +2 -1
- package/gantt-item-upper.d.ts +1 -0
- package/gantt.component.d.ts +6 -1
- package/gantt.component.scss +4 -0
- package/gantt.module.d.ts +13 -12
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/styles/index.scss +1 -0
- package/styles/variables.scss +3 -0
- package/table/gantt-column.component.d.ts +4 -2
- package/utils/drag-scroll.d.ts +20 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnDestroy, NgZone } from '@angular/core';
|
|
2
2
|
import { DragDrop } from '@angular/cdk/drag-drop';
|
|
3
3
|
import { GanttDomService } from '../../gantt-dom.service';
|
|
4
4
|
import { GanttDragContainer } from '../../gantt-drag-container';
|
|
@@ -10,6 +10,7 @@ export declare class GanttBarDrag implements OnDestroy {
|
|
|
10
10
|
private dragDrop;
|
|
11
11
|
private dom;
|
|
12
12
|
private dragContainer;
|
|
13
|
+
private _ngZone;
|
|
13
14
|
private root;
|
|
14
15
|
private ganttUpper;
|
|
15
16
|
private barElement;
|
|
@@ -17,15 +18,24 @@ export declare class GanttBarDrag implements OnDestroy {
|
|
|
17
18
|
private get dragDisabled();
|
|
18
19
|
private get linkDragDisabled();
|
|
19
20
|
private linkDraggingLine;
|
|
20
|
-
private dropListRef;
|
|
21
21
|
private barDragRef;
|
|
22
22
|
private dragRefs;
|
|
23
23
|
private destroy$;
|
|
24
|
+
/** Used to signal to the current auto-scroll sequence when to stop. */
|
|
25
|
+
private stopScrollTimers$;
|
|
26
|
+
/** container element scrollLeft */
|
|
24
27
|
private containerScrollLeft;
|
|
28
|
+
/** move distance when drag bar */
|
|
25
29
|
private barDragMoveDistance;
|
|
30
|
+
/** move distance when drag bar handle */
|
|
26
31
|
private barHandleDragMoveDistance;
|
|
32
|
+
/** scrolling state when drag */
|
|
27
33
|
private dragScrolling;
|
|
28
|
-
|
|
34
|
+
/** dragScrollDistance */
|
|
35
|
+
private dragScrollDistance;
|
|
36
|
+
/** Horizontal direction in which the list is currently scrolling. */
|
|
37
|
+
private _horizontalScrollDirection;
|
|
38
|
+
constructor(dragDrop: DragDrop, dom: GanttDomService, dragContainer: GanttDragContainer, _ngZone: NgZone, root: NgxGanttRootComponent);
|
|
29
39
|
private createDragRef;
|
|
30
40
|
private createDragScrollEvent;
|
|
31
41
|
private createMouseEvents;
|
|
@@ -41,9 +51,13 @@ export declare class GanttBarDrag implements OnDestroy {
|
|
|
41
51
|
private calcLinkLinePositions;
|
|
42
52
|
private createLinkDraggingLine;
|
|
43
53
|
private destroyLinkDraggingLine;
|
|
54
|
+
private startScrollInterval;
|
|
55
|
+
private startScrollingIfNecessary;
|
|
56
|
+
private stopScrolling;
|
|
57
|
+
private isStartOrEndInsideView;
|
|
44
58
|
createDrags(elementRef: ElementRef, item: GanttItemInternal, ganttUpper: GanttUpper): void;
|
|
45
59
|
updateItem(item: GanttItemInternal): void;
|
|
46
60
|
ngOnDestroy(): void;
|
|
47
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GanttBarDrag, [null, null, null, { skipSelf: true; }]>;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GanttBarDrag, [null, null, null, null, { skipSelf: true; }]>;
|
|
48
62
|
static ɵprov: i0.ɵɵInjectableDeclaration<GanttBarDrag>;
|
|
49
63
|
}
|
|
@@ -157,12 +157,6 @@ $gantt-bar-link-drop-border: 5px;
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
&-draggable-drag {
|
|
161
|
-
.gantt-bar-layer {
|
|
162
|
-
visibility: hidden;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
160
|
&-active {
|
|
167
161
|
@include active-bar();
|
|
168
162
|
}
|
|
@@ -204,20 +198,4 @@ $gantt-bar-link-drop-border: 5px;
|
|
|
204
198
|
}
|
|
205
199
|
}
|
|
206
200
|
}
|
|
207
|
-
|
|
208
|
-
// 强制去掉 cdk drag placeholder 默认样式
|
|
209
|
-
&.cdk-drag-placeholder,
|
|
210
|
-
.drag-handles .handle.cdk-drag-placeholder {
|
|
211
|
-
background: none !important;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.handle.cdk-drag-preview {
|
|
216
|
-
visibility: hidden;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.gantt-bar.cdk-drag-preview {
|
|
220
|
-
.gantt-bar-layer {
|
|
221
|
-
display: none;
|
|
222
|
-
}
|
|
223
201
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class GanttLoaderComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GanttLoaderComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GanttLoaderComponent, "gantt-loader", never, {}, {}, never, never, false, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
@use '../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.gantt-loader {
|
|
4
|
+
&-overlay {
|
|
5
|
+
position: absolute;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: calc(100% - 40px);
|
|
8
|
+
top: 40px;
|
|
9
|
+
left: 0;
|
|
10
|
+
background: rgba(255, 255, 255, 0.6);
|
|
11
|
+
z-index: 1001;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-wrapper {
|
|
15
|
+
position: absolute;
|
|
16
|
+
padding-top: 20px;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 50%;
|
|
19
|
+
transform: translateX(-50%);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-loading {
|
|
23
|
+
display: inline-block;
|
|
24
|
+
position: relative;
|
|
25
|
+
height: 8px;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
transform: translateX(-18px);
|
|
28
|
+
|
|
29
|
+
&:before,
|
|
30
|
+
&:after {
|
|
31
|
+
content: '';
|
|
32
|
+
display: block;
|
|
33
|
+
position: absolute;
|
|
34
|
+
height: 8px;
|
|
35
|
+
width: 8px;
|
|
36
|
+
border-radius: 4px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:before {
|
|
40
|
+
animation: gantt-loader-loading-ellipsis-b 1s ease-in-out infinite;
|
|
41
|
+
background: variables.$gantt-loader-loading-color;
|
|
42
|
+
opacity: 0.4;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:after {
|
|
46
|
+
animation: gantt-loader-loading-ellipsis-a 1s ease-in-out infinite;
|
|
47
|
+
background: variables.$gantt-loader-loading-color;
|
|
48
|
+
opacity: 0.8;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&-spot {
|
|
52
|
+
position: absolute;
|
|
53
|
+
left: 13px;
|
|
54
|
+
height: 8px;
|
|
55
|
+
width: 8px;
|
|
56
|
+
background: variables.$gantt-loader-loading-color;
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes gantt-loader-loading-ellipsis-b {
|
|
63
|
+
0% {
|
|
64
|
+
left: 0;
|
|
65
|
+
transform: scale(1.1);
|
|
66
|
+
}
|
|
67
|
+
50% {
|
|
68
|
+
left: 25px;
|
|
69
|
+
transform: scale(1);
|
|
70
|
+
}
|
|
71
|
+
100% {
|
|
72
|
+
left: 0;
|
|
73
|
+
transform: scale(1.1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes gantt-loader-loading-ellipsis-a {
|
|
78
|
+
0% {
|
|
79
|
+
left: 25px;
|
|
80
|
+
transform: scale(1.1);
|
|
81
|
+
}
|
|
82
|
+
50% {
|
|
83
|
+
left: 0;
|
|
84
|
+
transform: scale(1);
|
|
85
|
+
}
|
|
86
|
+
100% {
|
|
87
|
+
left: 25px;
|
|
88
|
+
transform: scale(1.1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -49,7 +49,7 @@ export declare class GanttTableBodyComponent implements OnInit, OnDestroy, After
|
|
|
49
49
|
private insertItem;
|
|
50
50
|
private insertChildrenItem;
|
|
51
51
|
private getParentByItem;
|
|
52
|
-
private
|
|
52
|
+
private getChildrenElementsByElement;
|
|
53
53
|
private getTargetPosition;
|
|
54
54
|
private showDropPositionPlaceholder;
|
|
55
55
|
private cleanupDragArtifacts;
|