vxe-gantt 4.0.5 → 4.0.6
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/emits.js +3 -1
- package/es/gantt/src/gantt-chart.js +18 -4
- package/es/gantt/src/gantt-header.js +14 -7
- package/es/gantt/src/gantt-view.js +12 -12
- package/es/gantt/src/gantt.js +1 -1
- package/es/gantt/style.css +2 -0
- 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 +2 -0
- package/es/vxe-gantt/style.min.css +1 -1
- package/lib/gantt/src/emits.js +1 -1
- package/lib/gantt/src/emits.min.js +1 -1
- package/lib/gantt/src/gantt-chart.js +24 -4
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt-header.js +22 -12
- package/lib/gantt/src/gantt-header.min.js +1 -1
- package/lib/gantt/src/gantt-view.js +12 -12
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +1 -1
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/gantt/style/style.css +2 -0
- package/lib/gantt/style/style.min.css +1 -1
- package/lib/index.umd.js +62 -32
- 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 +2 -0
- package/lib/vxe-gantt/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/gantt/src/emits.ts +3 -1
- package/packages/gantt/src/gantt-chart.ts +20 -4
- package/packages/gantt/src/gantt-header.ts +15 -8
- package/packages/gantt/src/gantt-view.ts +13 -13
- package/packages/gantt/src/gantt.ts +1 -1
- package/styles/components/gantt-module/gantt-chart.scss +2 -0
- package/styles/theme/base.scss +1 -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.6"}`;
|
|
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.6";
|
|
2795
2795
|
setConfig({
|
|
2796
2796
|
gantt: {
|
|
2797
2797
|
// size: null,
|
|
@@ -3289,7 +3289,7 @@ const tableEmits = ['update:data', 'keydown-start', 'keydown', 'keydown-end', 'p
|
|
|
3289
3289
|
const gridEmits = [...tableEmits, 'page-change', 'form-submit', 'form-submit-invalid', 'form-reset', 'form-collapse', 'form-toggle-collapse', 'proxy-query', 'proxy-delete', 'proxy-save', 'toolbar-button-click', 'toolbar-tool-click', 'zoom'];
|
|
3290
3290
|
;// ./packages/gantt/src/emits.ts
|
|
3291
3291
|
|
|
3292
|
-
const ganttEmits = [...gridEmits, 'task-cell-click', 'task-cell-dblclick', 'task-bar-click', 'task-bar-dblclick'];
|
|
3292
|
+
const ganttEmits = [...gridEmits, 'task-cell-click', 'task-cell-dblclick', 'task-bar-click', 'task-bar-dblclick', 'task-view-cell-click', 'task-view-cell-dblclick'];
|
|
3293
3293
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.find.js
|
|
3294
3294
|
var es_iterator_find = __webpack_require__(116);
|
|
3295
3295
|
;// ./packages/gantt/src/util.ts
|
|
@@ -3323,6 +3323,7 @@ const {
|
|
|
3323
3323
|
/* harmony default export */ var gantt_header = (defineVxeComponent({
|
|
3324
3324
|
name: 'VxeGanttViewHeader',
|
|
3325
3325
|
setup() {
|
|
3326
|
+
const $xeGantt = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeGantt', {});
|
|
3326
3327
|
const $xeGanttView = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeGanttView', {});
|
|
3327
3328
|
const {
|
|
3328
3329
|
reactData,
|
|
@@ -3364,12 +3365,17 @@ const {
|
|
|
3364
3365
|
}, $rowIndex) => {
|
|
3365
3366
|
const {
|
|
3366
3367
|
type,
|
|
3367
|
-
titleMethod
|
|
3368
|
+
titleMethod,
|
|
3369
|
+
slots
|
|
3368
3370
|
} = scaleItem;
|
|
3371
|
+
const titleSlot = slots ? slots.title : null;
|
|
3369
3372
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', {
|
|
3370
3373
|
key: $rowIndex
|
|
3371
3374
|
}, columns.map((column, cIndex) => {
|
|
3372
|
-
const
|
|
3375
|
+
const {
|
|
3376
|
+
childCount,
|
|
3377
|
+
dateObj
|
|
3378
|
+
} = column;
|
|
3373
3379
|
let label = `${column.title}`;
|
|
3374
3380
|
if ($rowIndex < headerGroups.length - 1) {
|
|
3375
3381
|
if (scaleItem.type === 'day') {
|
|
@@ -3378,20 +3384,24 @@ const {
|
|
|
3378
3384
|
label = getI18n(`vxe.gantt.${!$rowIndex && headerGroups.length > 1 ? 'tFullFormat' : 'tSimpleFormat'}.${type}`, dateObj);
|
|
3379
3385
|
}
|
|
3380
3386
|
}
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3387
|
+
let cellVNs = label;
|
|
3388
|
+
const ctParams = {
|
|
3389
|
+
scaleObj: scaleItem,
|
|
3390
|
+
title: label,
|
|
3391
|
+
dateObj: dateObj,
|
|
3392
|
+
$rowIndex
|
|
3393
|
+
};
|
|
3394
|
+
if (titleSlot) {
|
|
3395
|
+
cellVNs = $xeGantt.callSlot(titleSlot, ctParams);
|
|
3396
|
+
} else if (titleMethod) {
|
|
3397
|
+
cellVNs = `${titleMethod(ctParams)}`;
|
|
3388
3398
|
}
|
|
3389
3399
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {
|
|
3390
3400
|
key: cIndex,
|
|
3391
3401
|
class: 'vxe-gantt-view--header-column',
|
|
3392
|
-
colspan:
|
|
3393
|
-
title: label
|
|
3394
|
-
},
|
|
3402
|
+
colspan: childCount || null,
|
|
3403
|
+
title: titleSlot ? null : label
|
|
3404
|
+
}, cellVNs);
|
|
3395
3405
|
}));
|
|
3396
3406
|
}))])])]);
|
|
3397
3407
|
};
|
|
@@ -3478,15 +3488,36 @@ const {
|
|
|
3478
3488
|
contentMethod,
|
|
3479
3489
|
barStyle
|
|
3480
3490
|
} = taskBarOpts;
|
|
3491
|
+
const isBarRowStyle = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(barStyle);
|
|
3492
|
+
const barStyObj = (barStyle ? isBarRowStyle ? barStyle({
|
|
3493
|
+
row,
|
|
3494
|
+
$gantt: $xeGantt
|
|
3495
|
+
}) : barStyle : {}) || {};
|
|
3481
3496
|
const {
|
|
3482
3497
|
round
|
|
3483
|
-
} =
|
|
3498
|
+
} = barStyObj;
|
|
3484
3499
|
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
3485
3500
|
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
3486
3501
|
const isRsHeight = resizeHeight > 0;
|
|
3487
3502
|
const cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
3488
3503
|
let title = getStringValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, titleField));
|
|
3489
3504
|
const progressValue = showProgress ? Math.min(100, Math.max(0, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, progressField)))) : 0;
|
|
3505
|
+
const vbStyle = {};
|
|
3506
|
+
const vpStyle = {
|
|
3507
|
+
width: `${progressValue || 0}%`
|
|
3508
|
+
};
|
|
3509
|
+
if (isBarRowStyle) {
|
|
3510
|
+
const {
|
|
3511
|
+
bgColor,
|
|
3512
|
+
completedBgColor
|
|
3513
|
+
} = barStyObj;
|
|
3514
|
+
if (bgColor) {
|
|
3515
|
+
vbStyle.backgroundColor = bgColor;
|
|
3516
|
+
}
|
|
3517
|
+
if (completedBgColor) {
|
|
3518
|
+
vpStyle.backgroundColor = completedBgColor;
|
|
3519
|
+
}
|
|
3520
|
+
}
|
|
3490
3521
|
if (contentMethod) {
|
|
3491
3522
|
title = getStringValue(contentMethod({
|
|
3492
3523
|
row,
|
|
@@ -3505,6 +3536,7 @@ const {
|
|
|
3505
3536
|
}
|
|
3506
3537
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3507
3538
|
class: taskBarSlot ? 'vxe-gantt-view--chart-custom-bar' : 'vxe-gantt-view--chart-bar',
|
|
3539
|
+
style: vbStyle,
|
|
3508
3540
|
rowid,
|
|
3509
3541
|
onClick(evnt) {
|
|
3510
3542
|
$xeGantt.handleTaskBarClickEvent(evnt, {
|
|
@@ -3520,9 +3552,7 @@ const {
|
|
|
3520
3552
|
row
|
|
3521
3553
|
}) : [showProgress ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3522
3554
|
class: 'vxe-gantt-view--chart-progress',
|
|
3523
|
-
style:
|
|
3524
|
-
width: `${progressValue || 0}%`
|
|
3525
|
-
}
|
|
3555
|
+
style: vpStyle
|
|
3526
3556
|
}) : renderEmptyElement($xeGantt), showContent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
3527
3557
|
class: 'vxe-gantt-view--chart-content'
|
|
3528
3558
|
}, title) : renderEmptyElement($xeGantt)])]);
|
|
@@ -4151,47 +4181,47 @@ const maxYHeight = 5e6;
|
|
|
4151
4181
|
year: {
|
|
4152
4182
|
field: yyyy,
|
|
4153
4183
|
title: yyyy,
|
|
4154
|
-
|
|
4184
|
+
dateObj
|
|
4155
4185
|
},
|
|
4156
4186
|
quarter: {
|
|
4157
4187
|
field: `${yyyy}_q${q}`,
|
|
4158
|
-
title: q
|
|
4159
|
-
|
|
4188
|
+
title: `${q}`,
|
|
4189
|
+
dateObj
|
|
4160
4190
|
},
|
|
4161
4191
|
month: {
|
|
4162
4192
|
field: `${yyyy}_${MM}`,
|
|
4163
4193
|
title: MM,
|
|
4164
|
-
|
|
4194
|
+
dateObj
|
|
4165
4195
|
},
|
|
4166
4196
|
week: {
|
|
4167
4197
|
field: `${yyyy}_W${W}`,
|
|
4168
|
-
title: W
|
|
4169
|
-
|
|
4198
|
+
title: `${W}`,
|
|
4199
|
+
dateObj
|
|
4170
4200
|
},
|
|
4171
4201
|
day: {
|
|
4172
4202
|
field: `${yyyy}_${MM}_${dd}_E${E}`,
|
|
4173
|
-
title: E
|
|
4174
|
-
|
|
4203
|
+
title: `${E}`,
|
|
4204
|
+
dateObj
|
|
4175
4205
|
},
|
|
4176
4206
|
date: {
|
|
4177
4207
|
field: `${yyyy}_${MM}_${dd}`,
|
|
4178
4208
|
title: dd,
|
|
4179
|
-
|
|
4209
|
+
dateObj
|
|
4180
4210
|
},
|
|
4181
4211
|
hour: {
|
|
4182
4212
|
field: `${yyyy}_${MM}_${dd}_${HH}`,
|
|
4183
4213
|
title: HH,
|
|
4184
|
-
|
|
4214
|
+
dateObj
|
|
4185
4215
|
},
|
|
4186
4216
|
minute: {
|
|
4187
4217
|
field: `${yyyy}_${MM}_${dd}_${HH}_${mm}`,
|
|
4188
4218
|
title: mm,
|
|
4189
|
-
|
|
4219
|
+
dateObj
|
|
4190
4220
|
},
|
|
4191
4221
|
second: {
|
|
4192
4222
|
field: `${yyyy}_${MM}_${dd}_${HH}_${mm}_${ss}`,
|
|
4193
4223
|
title: ss,
|
|
4194
|
-
|
|
4224
|
+
dateObj
|
|
4195
4225
|
}
|
|
4196
4226
|
};
|
|
4197
4227
|
const minCol = colMaps[minSType];
|
|
@@ -5174,7 +5204,7 @@ function getViewTypeLevel(type) {
|
|
|
5174
5204
|
stys.maxHeight = maxHeight === 'auto' || maxHeight === '100%' ? '100%' : toCssUnit(maxHeight);
|
|
5175
5205
|
}
|
|
5176
5206
|
}
|
|
5177
|
-
if (barStyle) {
|
|
5207
|
+
if (barStyle && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(barStyle)) {
|
|
5178
5208
|
const {
|
|
5179
5209
|
bgColor,
|
|
5180
5210
|
completedBgColor
|