@worktile/gantt 15.2.0-next.1 → 15.2.0
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.component.scss +4 -0
- package/esm2020/components/bar/bar-drag.mjs +1 -3
- package/esm2020/components/bar/bar.component.mjs +12 -3
- package/esm2020/components/table/body/gantt-table-body.component.mjs +6 -1
- package/esm2020/gantt.module.mjs +9 -3
- package/esm2020/public-api.mjs +4 -1
- package/fesm2015/worktile-gantt.mjs +25 -7
- package/fesm2015/worktile-gantt.mjs.map +1 -1
- package/fesm2020/worktile-gantt.mjs +25 -7
- package/fesm2020/worktile-gantt.mjs.map +1 -1
- package/gantt.module.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -1765,6 +1765,11 @@ class GanttTableBodyComponent {
|
|
|
1765
1765
|
source: event.source.data?.origin,
|
|
1766
1766
|
sourceParent: this.getParentByItem(event.source.data)?.origin
|
|
1767
1767
|
});
|
|
1768
|
+
// dropEnterPredicate 方法返回值为 false 时,始终未执行 onListDropped,所以只能在 dragEnded 中移除 drag-item-hide
|
|
1769
|
+
const children = this.getChildrenElementsByElement(event.source.element.nativeElement);
|
|
1770
|
+
children.forEach((element) => {
|
|
1771
|
+
element.classList.remove('drag-item-hide');
|
|
1772
|
+
});
|
|
1768
1773
|
}
|
|
1769
1774
|
onListDropped(event) {
|
|
1770
1775
|
if (!this.itemDropTarget) {
|
|
@@ -2895,11 +2900,9 @@ class GanttBarDrag {
|
|
|
2895
2900
|
dragBackdropElement.style.display = 'none';
|
|
2896
2901
|
}
|
|
2897
2902
|
setDraggingStyles() {
|
|
2898
|
-
this.barElement.style.pointerEvents = 'none';
|
|
2899
2903
|
this.barElement.classList.add('gantt-bar-draggable-drag');
|
|
2900
2904
|
}
|
|
2901
2905
|
clearDraggingStyles() {
|
|
2902
|
-
this.barElement.style.pointerEvents = '';
|
|
2903
2906
|
this.barElement.classList.remove('gantt-bar-draggable-drag');
|
|
2904
2907
|
}
|
|
2905
2908
|
barDragMove() {
|
|
@@ -3183,7 +3186,11 @@ class NgxGanttBarComponent extends GanttItemUpper {
|
|
|
3183
3186
|
}
|
|
3184
3187
|
ngOnInit() {
|
|
3185
3188
|
super.ngOnInit();
|
|
3189
|
+
this.dragContainer.dragStarted.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
3190
|
+
this.elementRef.nativeElement.style.pointerEvents = 'none';
|
|
3191
|
+
});
|
|
3186
3192
|
this.dragContainer.dragEnded.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
3193
|
+
this.elementRef.nativeElement.style.pointerEvents = '';
|
|
3187
3194
|
this.setContentBackground();
|
|
3188
3195
|
});
|
|
3189
3196
|
}
|
|
@@ -3228,17 +3235,22 @@ class NgxGanttBarComponent extends GanttItemUpper {
|
|
|
3228
3235
|
const contentElement = this.contentElementRef.nativeElement;
|
|
3229
3236
|
const color = this.item.color || barBackground;
|
|
3230
3237
|
const style = this.item.barStyle || {};
|
|
3238
|
+
const barElement = this.elementRef.nativeElement;
|
|
3231
3239
|
if (this.item.origin.start && this.item.origin.end) {
|
|
3232
3240
|
style.background = color;
|
|
3233
3241
|
style.borderRadius = '';
|
|
3234
3242
|
}
|
|
3235
3243
|
if (this.item.origin.start && !this.item.origin.end) {
|
|
3236
3244
|
style.background = linearGradient('to left', hexToRgb(color, 0.55), hexToRgb(color, 1));
|
|
3237
|
-
|
|
3245
|
+
const borderRadius = '4px 12.5px 12.5px 4px';
|
|
3246
|
+
style.borderRadius = borderRadius;
|
|
3247
|
+
barElement.style.borderRadius = borderRadius;
|
|
3238
3248
|
}
|
|
3239
3249
|
if (!this.item.origin.start && this.item.origin.end) {
|
|
3240
3250
|
style.background = linearGradient('to right', hexToRgb(color, 0.55), hexToRgb(color, 1));
|
|
3241
|
-
|
|
3251
|
+
const borderRadius = '12.5px 4px 4px 12.5px';
|
|
3252
|
+
style.borderRadius = borderRadius;
|
|
3253
|
+
barElement.style.borderRadius = borderRadius;
|
|
3242
3254
|
}
|
|
3243
3255
|
if (this.item.progress >= 0) {
|
|
3244
3256
|
const contentProgressElement = contentElement.querySelector('.gantt-bar-content-progress');
|
|
@@ -4113,7 +4125,10 @@ NgxGanttModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
4113
4125
|
NgxGanttBarComponent,
|
|
4114
4126
|
NgxGanttRangeComponent,
|
|
4115
4127
|
NgxGanttBaselineComponent,
|
|
4116
|
-
NgxGanttToolbarComponent
|
|
4128
|
+
NgxGanttToolbarComponent,
|
|
4129
|
+
GanttCalendarHeaderComponent,
|
|
4130
|
+
GanttCalendarGridComponent,
|
|
4131
|
+
GanttDragBackdropComponent] });
|
|
4117
4132
|
NgxGanttModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttModule, providers: [
|
|
4118
4133
|
CdkVirtualScrollViewport,
|
|
4119
4134
|
{
|
|
@@ -4133,7 +4148,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
4133
4148
|
NgxGanttBarComponent,
|
|
4134
4149
|
NgxGanttRangeComponent,
|
|
4135
4150
|
NgxGanttBaselineComponent,
|
|
4136
|
-
NgxGanttToolbarComponent
|
|
4151
|
+
NgxGanttToolbarComponent,
|
|
4152
|
+
GanttCalendarHeaderComponent,
|
|
4153
|
+
GanttCalendarGridComponent,
|
|
4154
|
+
GanttDragBackdropComponent
|
|
4137
4155
|
],
|
|
4138
4156
|
declarations: [
|
|
4139
4157
|
NgxGanttComponent,
|
|
@@ -4175,5 +4193,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
4175
4193
|
* Generated bundle index. Do not edit.
|
|
4176
4194
|
*/
|
|
4177
4195
|
|
|
4178
|
-
export { GANTT_GLOBAL_CONFIG, GANTT_UPPER_TOKEN, GanttBarClickEvent, GanttBaselineItemInternal, GanttDate, GanttDatePoint, GanttDragEvent, GanttGroupInternal, GanttItemInternal, GanttItemType, GanttItemUpper, GanttLineClickEvent, GanttLinkDragEvent, GanttLinkLineType, GanttLinkType, GanttLoadOnScrollEvent, GanttLoaderComponent, GanttPrintService, GanttSelectedEvent, GanttTableDragDroppedEvent, GanttTableDragEndedEvent, GanttTableDragEnterPredicateContext, GanttTableDragStartedEvent, GanttTableEvent, GanttUpper, GanttView, GanttViewType, GanttVirtualScrolledIndexChangeEvent, IsGanttBarItemPipe, IsGanttCustomItemPipe, IsGanttRangeItemPipe, LinkColors, NgxGanttBarComponent, NgxGanttBaselineComponent, NgxGanttComponent, NgxGanttModule, NgxGanttRangeComponent, NgxGanttRootComponent, NgxGanttTableColumnComponent, NgxGanttTableComponent, NgxGanttToolbarComponent, defaultConfig, ganttViews, primaryDatePointTop, registerView, secondaryDatePointTop };
|
|
4196
|
+
export { GANTT_GLOBAL_CONFIG, GANTT_UPPER_TOKEN, GanttBarClickEvent, GanttBaselineItemInternal, GanttCalendarGridComponent, GanttCalendarHeaderComponent, GanttDate, GanttDatePoint, GanttDragBackdropComponent, GanttDragEvent, GanttGroupInternal, GanttItemInternal, GanttItemType, GanttItemUpper, GanttLineClickEvent, GanttLinkDragEvent, GanttLinkLineType, GanttLinkType, GanttLoadOnScrollEvent, GanttLoaderComponent, GanttPrintService, GanttSelectedEvent, GanttTableDragDroppedEvent, GanttTableDragEndedEvent, GanttTableDragEnterPredicateContext, GanttTableDragStartedEvent, GanttTableEvent, GanttUpper, GanttView, GanttViewType, GanttVirtualScrolledIndexChangeEvent, IsGanttBarItemPipe, IsGanttCustomItemPipe, IsGanttRangeItemPipe, LinkColors, NgxGanttBarComponent, NgxGanttBaselineComponent, NgxGanttComponent, NgxGanttModule, NgxGanttRangeComponent, NgxGanttRootComponent, NgxGanttTableColumnComponent, NgxGanttTableComponent, NgxGanttToolbarComponent, defaultConfig, ganttViews, primaryDatePointTop, registerView, secondaryDatePointTop };
|
|
4179
4197
|
//# sourceMappingURL=worktile-gantt.mjs.map
|