vxe-gantt 4.0.14 → 4.0.16
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/es/gantt/src/gantt-body.js +11 -2
- package/es/gantt/src/gantt-chart.js +16 -3
- package/es/gantt/src/gantt-footer.js +7 -1
- package/es/gantt/src/gantt-header.js +7 -2
- package/es/gantt/src/gantt.js +44 -0
- package/es/gantt/style.css +0 -1
- package/es/gantt/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-gantt/style.css +0 -1
- package/es/vxe-gantt/style.min.css +1 -1
- package/lib/gantt/src/gantt-body.js +25 -2
- package/lib/gantt/src/gantt-body.min.js +1 -1
- package/lib/gantt/src/gantt-chart.js +23 -2
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt-footer.js +11 -1
- package/lib/gantt/src/gantt-footer.min.js +1 -1
- package/lib/gantt/src/gantt-header.js +9 -1
- package/lib/gantt/src/gantt-header.min.js +1 -1
- package/lib/gantt/src/gantt.js +52 -0
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/gantt/style/style.css +0 -1
- package/lib/gantt/style/style.min.css +1 -1
- package/lib/index.umd.js +122 -8
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-gantt/style/style.css +0 -1
- package/lib/vxe-gantt/style/style.min.css +1 -1
- package/package.json +3 -3
- package/packages/gantt/src/gantt-body.ts +14 -4
- package/packages/gantt/src/gantt-chart.ts +17 -3
- package/packages/gantt/src/gantt-footer.ts +9 -2
- package/packages/gantt/src/gantt-header.ts +8 -2
- package/packages/gantt/src/gantt.ts +44 -0
- package/styles/components/gantt.scss +0 -1
package/lib/index.umd.js
CHANGED
|
@@ -2780,7 +2780,7 @@ var core_ = __webpack_require__(4345);
|
|
|
2780
2780
|
const {
|
|
2781
2781
|
log
|
|
2782
2782
|
} = core_.VxeUI;
|
|
2783
|
-
const version = `gantt v${"4.0.
|
|
2783
|
+
const version = `gantt v${"4.0.16"}`;
|
|
2784
2784
|
const warnLog = log.create('warn', version);
|
|
2785
2785
|
const errLog = log.create('error', version);
|
|
2786
2786
|
;// ./packages/ui/index.ts
|
|
@@ -2791,7 +2791,7 @@ const {
|
|
|
2791
2791
|
setIcon,
|
|
2792
2792
|
checkVersion
|
|
2793
2793
|
} = core_.VxeUI;
|
|
2794
|
-
core_.VxeUI.ganttVersion = "4.0.
|
|
2794
|
+
core_.VxeUI.ganttVersion = "4.0.16";
|
|
2795
2795
|
setConfig({
|
|
2796
2796
|
gantt: {
|
|
2797
2797
|
// size: null,
|
|
@@ -3324,6 +3324,8 @@ function getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) {
|
|
|
3324
3324
|
const {
|
|
3325
3325
|
getI18n
|
|
3326
3326
|
} = core_.VxeUI;
|
|
3327
|
+
const sourceType = 'gantt';
|
|
3328
|
+
const viewType = 'header';
|
|
3327
3329
|
/* harmony default export */ var gantt_header = (defineVxeComponent({
|
|
3328
3330
|
name: 'VxeGanttViewHeader',
|
|
3329
3331
|
setup() {
|
|
@@ -3403,6 +3405,9 @@ const {
|
|
|
3403
3405
|
}
|
|
3404
3406
|
let cellVNs = label;
|
|
3405
3407
|
const ctParams = {
|
|
3408
|
+
source: sourceType,
|
|
3409
|
+
type: viewType,
|
|
3410
|
+
column,
|
|
3406
3411
|
scaleObj: scaleItem,
|
|
3407
3412
|
title: label,
|
|
3408
3413
|
dateObj: dateObj,
|
|
@@ -3428,7 +3433,10 @@ const {
|
|
|
3428
3433
|
}],
|
|
3429
3434
|
colspan: childCount || null,
|
|
3430
3435
|
title: titleSlot ? null : label,
|
|
3431
|
-
style: cellStys
|
|
3436
|
+
style: cellStys,
|
|
3437
|
+
onContextmenu(evnt) {
|
|
3438
|
+
$xeGantt.handleTaskHeaderContextmenuEvent(evnt, ctParams);
|
|
3439
|
+
}
|
|
3432
3440
|
}, cellVNs);
|
|
3433
3441
|
}));
|
|
3434
3442
|
}))])])]);
|
|
@@ -3469,6 +3477,8 @@ const {
|
|
|
3469
3477
|
const {
|
|
3470
3478
|
renderEmptyElement
|
|
3471
3479
|
} = core_.VxeUI;
|
|
3480
|
+
const gantt_chart_sourceType = 'gantt';
|
|
3481
|
+
const gantt_chart_viewType = 'chart';
|
|
3472
3482
|
/* harmony default export */ var gantt_chart = (defineVxeComponent({
|
|
3473
3483
|
name: 'VxeGanttViewChart',
|
|
3474
3484
|
setup() {
|
|
@@ -3484,7 +3494,7 @@ const {
|
|
|
3484
3494
|
computeTaskBarOpts
|
|
3485
3495
|
} = $xeGantt.getComputeMaps();
|
|
3486
3496
|
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
3487
|
-
const renderTaskBar = ($xeTable, row, rowid, $rowIndex) => {
|
|
3497
|
+
const renderTaskBar = ($xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex) => {
|
|
3488
3498
|
const tableProps = $xeTable.props;
|
|
3489
3499
|
const {
|
|
3490
3500
|
treeConfig
|
|
@@ -3553,6 +3563,14 @@ const {
|
|
|
3553
3563
|
title
|
|
3554
3564
|
}));
|
|
3555
3565
|
}
|
|
3566
|
+
const ctParams = {
|
|
3567
|
+
source: gantt_chart_sourceType,
|
|
3568
|
+
type: gantt_chart_viewType,
|
|
3569
|
+
row,
|
|
3570
|
+
$rowIndex,
|
|
3571
|
+
rowIndex,
|
|
3572
|
+
_rowIndex
|
|
3573
|
+
};
|
|
3556
3574
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3557
3575
|
key: treeConfig ? rowid : $rowIndex,
|
|
3558
3576
|
rowid,
|
|
@@ -3562,6 +3580,9 @@ const {
|
|
|
3562
3580
|
}],
|
|
3563
3581
|
style: {
|
|
3564
3582
|
height: `${cellHeight}px`
|
|
3583
|
+
},
|
|
3584
|
+
onContextmenu(evnt) {
|
|
3585
|
+
$xeGantt.handleTaskBarContextmenuEvent(evnt, ctParams);
|
|
3565
3586
|
}
|
|
3566
3587
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3567
3588
|
class: taskBarSlot ? 'vxe-gantt-view--chart-custom-bar' : 'vxe-gantt-view--chart-bar',
|
|
@@ -3596,6 +3617,7 @@ const {
|
|
|
3596
3617
|
} = tableReactData;
|
|
3597
3618
|
const tableInternalData = $xeTable.internalData;
|
|
3598
3619
|
const {
|
|
3620
|
+
fullAllDataRowIdData,
|
|
3599
3621
|
treeExpandedMaps
|
|
3600
3622
|
} = tableInternalData;
|
|
3601
3623
|
const {
|
|
@@ -3612,7 +3634,14 @@ const {
|
|
|
3612
3634
|
const trVNs = [];
|
|
3613
3635
|
tableData.forEach((row, $rowIndex) => {
|
|
3614
3636
|
const rowid = $xeTable ? $xeTable.getRowid(row) : '';
|
|
3615
|
-
|
|
3637
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
3638
|
+
let rowIndex = $rowIndex;
|
|
3639
|
+
let _rowIndex = -1;
|
|
3640
|
+
if (rowRest) {
|
|
3641
|
+
rowIndex = rowRest.index;
|
|
3642
|
+
_rowIndex = rowRest._index;
|
|
3643
|
+
}
|
|
3644
|
+
trVNs.push(renderTaskBar($xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex));
|
|
3616
3645
|
let isExpandTree = false;
|
|
3617
3646
|
let rowChildren = [];
|
|
3618
3647
|
if (treeConfig && !scrollYLoad && !transform) {
|
|
@@ -3662,6 +3691,8 @@ const {
|
|
|
3662
3691
|
|
|
3663
3692
|
|
|
3664
3693
|
|
|
3694
|
+
const gantt_body_sourceType = 'gantt';
|
|
3695
|
+
const gantt_body_viewType = 'body';
|
|
3665
3696
|
/* harmony default export */ var gantt_body = (defineVxeComponent({
|
|
3666
3697
|
name: 'VxeGanttViewBody',
|
|
3667
3698
|
setup() {
|
|
@@ -3740,7 +3771,7 @@ const {
|
|
|
3740
3771
|
$columnIndex: 0,
|
|
3741
3772
|
_columnIndex: 0,
|
|
3742
3773
|
fixed: '',
|
|
3743
|
-
type:
|
|
3774
|
+
type: gantt_body_viewType,
|
|
3744
3775
|
isHidden: false,
|
|
3745
3776
|
isEdit: false,
|
|
3746
3777
|
level: -1,
|
|
@@ -3755,6 +3786,15 @@ const {
|
|
|
3755
3786
|
onDblclick: evnt => $xeTable.handleRowResizeDblclickEvent(evnt, cellParams)
|
|
3756
3787
|
}));
|
|
3757
3788
|
}
|
|
3789
|
+
const ctParams = {
|
|
3790
|
+
source: gantt_body_sourceType,
|
|
3791
|
+
type: gantt_body_viewType,
|
|
3792
|
+
row,
|
|
3793
|
+
column,
|
|
3794
|
+
$rowIndex,
|
|
3795
|
+
rowIndex,
|
|
3796
|
+
_rowIndex
|
|
3797
|
+
};
|
|
3758
3798
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
|
|
3759
3799
|
key: $columnIndex,
|
|
3760
3800
|
class: ['vxe-gantt-view--body-column', {
|
|
@@ -3775,6 +3815,9 @@ const {
|
|
|
3775
3815
|
row,
|
|
3776
3816
|
column
|
|
3777
3817
|
});
|
|
3818
|
+
},
|
|
3819
|
+
onContextmenu(evnt) {
|
|
3820
|
+
$xeGantt.handleTaskBodyContextmenuEvent(evnt, ctParams);
|
|
3778
3821
|
}
|
|
3779
3822
|
}, tdVNs);
|
|
3780
3823
|
};
|
|
@@ -3889,7 +3932,16 @@ const {
|
|
|
3889
3932
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3890
3933
|
ref: refBodyScroll,
|
|
3891
3934
|
class: 'vxe-gantt-view--body-inner-wrapper',
|
|
3892
|
-
onScroll: $xeGanttView.triggerBodyScrollEvent
|
|
3935
|
+
onScroll: $xeGanttView.triggerBodyScrollEvent,
|
|
3936
|
+
onContextmenu(evnt) {
|
|
3937
|
+
$xeGantt.handleTaskBodyContextmenuEvent(evnt, {
|
|
3938
|
+
source: gantt_body_sourceType,
|
|
3939
|
+
type: gantt_body_viewType,
|
|
3940
|
+
rowIndex: -1,
|
|
3941
|
+
$rowIndex: -1,
|
|
3942
|
+
_rowIndex: -1
|
|
3943
|
+
});
|
|
3944
|
+
}
|
|
3893
3945
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3894
3946
|
ref: refBodyXSpace,
|
|
3895
3947
|
class: 'vxe-body--x-space'
|
|
@@ -3936,9 +3988,12 @@ const {
|
|
|
3936
3988
|
;// ./packages/gantt/src/gantt-footer.ts
|
|
3937
3989
|
|
|
3938
3990
|
|
|
3991
|
+
const gantt_footer_sourceType = 'gantt';
|
|
3992
|
+
const gantt_footer_viewType = 'footer';
|
|
3939
3993
|
/* harmony default export */ var gantt_footer = (defineVxeComponent({
|
|
3940
3994
|
name: 'VxeGanttViewFooter',
|
|
3941
3995
|
setup() {
|
|
3996
|
+
const $xeGantt = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeGantt', {});
|
|
3942
3997
|
const $xeGanttView = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeGanttView', {});
|
|
3943
3998
|
const {
|
|
3944
3999
|
internalData
|
|
@@ -3948,7 +4003,14 @@ const {
|
|
|
3948
4003
|
const renderVN = () => {
|
|
3949
4004
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3950
4005
|
ref: refElem,
|
|
3951
|
-
class: 'vxe-gantt-view--footer-wrapper'
|
|
4006
|
+
class: 'vxe-gantt-view--footer-wrapper',
|
|
4007
|
+
onContextmenu(evnt) {
|
|
4008
|
+
$xeGantt.handleTaskFooterContextmenuEvent(evnt, {
|
|
4009
|
+
source: gantt_footer_sourceType,
|
|
4010
|
+
type: gantt_footer_viewType,
|
|
4011
|
+
$rowIndex: -1
|
|
4012
|
+
});
|
|
4013
|
+
}
|
|
3952
4014
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3953
4015
|
ref: refHeaderScroll,
|
|
3954
4016
|
class: 'vxe-gantt-view--footer-inner-wrapper'
|
|
@@ -6983,6 +7045,58 @@ function getViewTypeLevel(type) {
|
|
|
6983
7045
|
},
|
|
6984
7046
|
handleTaskBarDblclickEvent(evnt, params) {
|
|
6985
7047
|
$xeGantt.dispatchEvent('task-bar-dblclick', params, evnt);
|
|
7048
|
+
},
|
|
7049
|
+
handleTaskHeaderContextmenuEvent(evnt, params) {
|
|
7050
|
+
const $xeTable = refTable.value;
|
|
7051
|
+
if ($xeTable) {
|
|
7052
|
+
const tableProps = $xeTable.props;
|
|
7053
|
+
const {
|
|
7054
|
+
menuConfig
|
|
7055
|
+
} = tableProps;
|
|
7056
|
+
if (isEnableConf(menuConfig)) {
|
|
7057
|
+
evnt.stopPropagation();
|
|
7058
|
+
$xeTable.handleOpenMenuEvent(evnt, 'header', params);
|
|
7059
|
+
}
|
|
7060
|
+
}
|
|
7061
|
+
},
|
|
7062
|
+
handleTaskBodyContextmenuEvent(evnt, params) {
|
|
7063
|
+
const $xeTable = refTable.value;
|
|
7064
|
+
if ($xeTable) {
|
|
7065
|
+
const tableProps = $xeTable.props;
|
|
7066
|
+
const {
|
|
7067
|
+
menuConfig
|
|
7068
|
+
} = tableProps;
|
|
7069
|
+
if (isEnableConf(menuConfig)) {
|
|
7070
|
+
evnt.stopPropagation();
|
|
7071
|
+
$xeTable.handleOpenMenuEvent(evnt, 'body', params);
|
|
7072
|
+
}
|
|
7073
|
+
}
|
|
7074
|
+
},
|
|
7075
|
+
handleTaskFooterContextmenuEvent(evnt, params) {
|
|
7076
|
+
const $xeTable = refTable.value;
|
|
7077
|
+
if ($xeTable) {
|
|
7078
|
+
const tableProps = $xeTable.props;
|
|
7079
|
+
const {
|
|
7080
|
+
menuConfig
|
|
7081
|
+
} = tableProps;
|
|
7082
|
+
if (isEnableConf(menuConfig)) {
|
|
7083
|
+
evnt.stopPropagation();
|
|
7084
|
+
$xeTable.handleOpenMenuEvent(evnt, 'footer', params);
|
|
7085
|
+
}
|
|
7086
|
+
}
|
|
7087
|
+
},
|
|
7088
|
+
handleTaskBarContextmenuEvent(evnt, params) {
|
|
7089
|
+
const $xeTable = refTable.value;
|
|
7090
|
+
if ($xeTable) {
|
|
7091
|
+
const tableProps = $xeTable.props;
|
|
7092
|
+
const {
|
|
7093
|
+
menuConfig
|
|
7094
|
+
} = tableProps;
|
|
7095
|
+
if (isEnableConf(menuConfig)) {
|
|
7096
|
+
evnt.stopPropagation();
|
|
7097
|
+
$xeTable.handleOpenMenuEvent(evnt, 'body', params);
|
|
7098
|
+
}
|
|
7099
|
+
}
|
|
6986
7100
|
}
|
|
6987
7101
|
};
|
|
6988
7102
|
Object.assign($xeGantt, ganttExtendTableMethods, ganttMethods, ganttPrivateMethods, {
|