vxe-gantt 4.9.3 → 4.9.4

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.
Files changed (48) hide show
  1. package/dist/all.esm.js +1398 -881
  2. package/es/components.js +1 -3
  3. package/es/gantt/src/gantt-body.js +100 -76
  4. package/es/gantt/src/gantt-chart.js +363 -239
  5. package/es/gantt/src/gantt-footer.js +16 -12
  6. package/es/gantt/src/gantt-header.js +135 -104
  7. package/es/gantt/src/gantt-view.js +235 -201
  8. package/es/gantt/src/gantt.js +545 -229
  9. package/es/gantt/src/grid-emits.js +1 -15
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/ui/src/utils.d.ts +1 -1
  13. package/lib/components.js +1 -3
  14. package/lib/gantt/src/gantt-body.js +100 -76
  15. package/lib/gantt/src/gantt-chart.js +363 -239
  16. package/lib/gantt/src/gantt-footer.js +16 -12
  17. package/lib/gantt/src/gantt-header.js +135 -104
  18. package/lib/gantt/src/gantt-view.js +235 -201
  19. package/lib/gantt/src/gantt.js +545 -229
  20. package/lib/gantt/src/grid-emits.js +1 -15
  21. package/lib/index.umd.js +1398 -881
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/ui/index.js +1 -1
  24. package/lib/ui/src/log.js +1 -1
  25. package/package.json +7 -1
  26. package/packages/components.ts +20 -22
  27. package/packages/gantt/index.ts +21 -21
  28. package/packages/gantt/src/emits.ts +25 -25
  29. package/packages/gantt/src/gantt-body.ts +317 -293
  30. package/packages/gantt/src/gantt-chart.ts +655 -531
  31. package/packages/gantt/src/gantt-footer.ts +55 -51
  32. package/packages/gantt/src/gantt-header.ts +193 -162
  33. package/packages/gantt/src/gantt-view.ts +2695 -2663
  34. package/packages/gantt/src/gantt.ts +3317 -2982
  35. package/packages/gantt/src/grid-emits.ts +5 -19
  36. package/packages/gantt/src/static.ts +35 -35
  37. package/packages/gantt/src/table-emits.ts +134 -134
  38. package/packages/gantt/src/util.ts +45 -45
  39. package/packages/index.ts +4 -4
  40. package/packages/ui/index.ts +133 -135
  41. package/packages/ui/src/comp.ts +3 -3
  42. package/packages/ui/src/depend.ts +14 -14
  43. package/packages/ui/src/dom.ts +202 -202
  44. package/packages/ui/src/log.ts +19 -19
  45. package/packages/ui/src/utils.ts +80 -80
  46. package/packages/ui/src/vn.ts +9 -9
  47. package/types/all.d.ts +33 -33
  48. package/types/index.d.ts +4 -4
package/es/components.js CHANGED
@@ -1,9 +1,7 @@
1
1
  import VxeUI from "./ui";
2
2
  import VxeGantt from "./gantt";
3
3
  const { setConfig } = VxeUI;
4
- const components = [
5
- VxeGantt
6
- ];
4
+ const components = [VxeGantt];
7
5
  function install(app, options) {
8
6
  setConfig(options);
9
7
  components.forEach((component) => app.use(component));
@@ -89,30 +89,34 @@ var gantt_body_default = defineVxeComponent({
89
89
  rowIndex,
90
90
  _rowIndex
91
91
  };
92
- return h("td", {
93
- key: cellClassName || cellStyle ? field : $columnIndex,
94
- class: [
95
- "vxe-gantt-view--body-column",
96
- {
97
- "is--now": showNowLine && todayValue === field
92
+ return h(
93
+ "td",
94
+ {
95
+ key: cellClassName || cellStyle ? field : $columnIndex,
96
+ class: [
97
+ "vxe-gantt-view--body-column",
98
+ {
99
+ "is--now": showNowLine && todayValue === field
100
+ },
101
+ getClass(cellClassName, ctParams)
102
+ ],
103
+ style: cellStyle ? Object.assign({}, XEUtils.isFunction(cellStyle) ? cellStyle(ctParams) : cellStyle, {
104
+ height: `${cellHeight}px`
105
+ }) : {
106
+ height: `${cellHeight}px`
98
107
  },
99
- getClass(cellClassName, ctParams)
100
- ],
101
- style: cellStyle ? Object.assign({}, XEUtils.isFunction(cellStyle) ? cellStyle(ctParams) : cellStyle, {
102
- height: `${cellHeight}px`
103
- }) : {
104
- height: `${cellHeight}px`
105
- },
106
- onClick(evnt) {
107
- $xeGantt.handleTaskCellClickEvent(evnt, { row, column });
108
- },
109
- onDblclick(evnt) {
110
- $xeGantt.handleTaskCellDblclickEvent(evnt, { row, column });
108
+ onClick(evnt) {
109
+ $xeGantt.handleTaskCellClickEvent(evnt, { row, column });
110
+ },
111
+ onDblclick(evnt) {
112
+ $xeGantt.handleTaskCellDblclickEvent(evnt, { row, column });
113
+ },
114
+ onContextmenu(evnt) {
115
+ $xeGantt.handleTaskBodyContextmenuEvent(evnt, ctParams);
116
+ }
111
117
  },
112
- onContextmenu(evnt) {
113
- $xeGantt.handleTaskBodyContextmenuEvent(evnt, ctParams);
114
- }
115
- }, tdVNs);
118
+ tdVNs
119
+ );
116
120
  };
117
121
  const renderRows = ($xeTable, tableData) => {
118
122
  const tableProps = $xeTable.props;
@@ -172,23 +176,27 @@ var gantt_body_default = defineVxeComponent({
172
176
  _rowIndex
173
177
  };
174
178
  trVNs.push(
175
- h("tr", {
176
- key: rowClassName || rowStyle || cellClassName || cellStyle ? rowid : $rowIndex,
177
- class: [
178
- "vxe-gantt-view--body-row",
179
- {
180
- "row--stripe": stripe && (_rowIndex + 1) % 2 === 0,
181
- "is--new": isNewRow,
182
- "row--radio": radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
183
- "row--checked": checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
184
- "row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid]
185
- },
186
- getClass(rowClassName, rowParams)
187
- ],
188
- rowid,
189
- style: rowStyle ? XEUtils.isFunction(rowStyle) ? rowStyle(rowParams) || void 0 : rowStyle : void 0,
190
- ...trOns
191
- }, tableColumn.map((column, $columnIndex) => renderColumn($xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex, column, $columnIndex)))
179
+ h(
180
+ "tr",
181
+ {
182
+ key: rowClassName || rowStyle || cellClassName || cellStyle ? rowid : $rowIndex,
183
+ class: [
184
+ "vxe-gantt-view--body-row",
185
+ {
186
+ "row--stripe": stripe && (_rowIndex + 1) % 2 === 0,
187
+ "is--new": isNewRow,
188
+ "row--radio": radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
189
+ "row--checked": checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
190
+ "row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid]
191
+ },
192
+ getClass(rowClassName, rowParams)
193
+ ],
194
+ rowid,
195
+ style: rowStyle ? XEUtils.isFunction(rowStyle) ? rowStyle(rowParams) || void 0 : rowStyle : void 0,
196
+ ...trOns
197
+ },
198
+ tableColumn.map((column, $columnIndex) => renderColumn($xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex, column, $columnIndex))
199
+ )
192
200
  );
193
201
  let isExpandTree = false;
194
202
  let rowChildren = [];
@@ -205,43 +213,59 @@ var gantt_body_default = defineVxeComponent({
205
213
  const renderVN = () => {
206
214
  const $xeTable = $xeGanttView.internalData.xeTable;
207
215
  const { tableData, tableColumn, viewCellWidth } = reactData;
208
- return h("div", {
209
- ref: refElem,
210
- class: "vxe-gantt-view--body-wrapper"
211
- }, [
212
- h("div", {
213
- ref: refBodyScroll,
214
- class: "vxe-gantt-view--body-inner-wrapper",
215
- onScroll: $xeGanttView.triggerBodyScrollEvent,
216
- onContextmenu(evnt) {
217
- $xeGantt.handleTaskBodyContextmenuEvent(evnt, { source: sourceType, type: viewType, rowIndex: -1, $rowIndex: -1, _rowIndex: -1 });
218
- }
219
- }, [
220
- h("div", {
221
- ref: refBodyXSpace,
222
- class: "vxe-body--x-space"
223
- }),
224
- h("div", {
225
- ref: refBodyYSpace,
226
- class: "vxe-body--y-space"
227
- }),
228
- h("table", {
229
- ref: refBodyTable,
230
- class: "vxe-gantt-view--body-table"
231
- }, [
232
- h("colgroup", {}, tableColumn.map((column, cIndex) => {
233
- return h("col", {
234
- key: cIndex,
235
- style: {
236
- width: `${viewCellWidth}px`
237
- }
238
- });
239
- })),
240
- h("tbody", {}, $xeTable ? renderRows($xeTable, tableData) : [])
241
- ]),
242
- h(GanttViewChartComponent)
243
- ])
244
- ]);
216
+ return h(
217
+ "div",
218
+ {
219
+ ref: refElem,
220
+ class: "vxe-gantt-view--body-wrapper"
221
+ },
222
+ [
223
+ h(
224
+ "div",
225
+ {
226
+ ref: refBodyScroll,
227
+ class: "vxe-gantt-view--body-inner-wrapper",
228
+ onScroll: $xeGanttView.triggerBodyScrollEvent,
229
+ onContextmenu(evnt) {
230
+ $xeGantt.handleTaskBodyContextmenuEvent(evnt, { source: sourceType, type: viewType, rowIndex: -1, $rowIndex: -1, _rowIndex: -1 });
231
+ }
232
+ },
233
+ [
234
+ h("div", {
235
+ ref: refBodyXSpace,
236
+ class: "vxe-body--x-space"
237
+ }),
238
+ h("div", {
239
+ ref: refBodyYSpace,
240
+ class: "vxe-body--y-space"
241
+ }),
242
+ h(
243
+ "table",
244
+ {
245
+ ref: refBodyTable,
246
+ class: "vxe-gantt-view--body-table"
247
+ },
248
+ [
249
+ h(
250
+ "colgroup",
251
+ {},
252
+ tableColumn.map((column, cIndex) => {
253
+ return h("col", {
254
+ key: cIndex,
255
+ style: {
256
+ width: `${viewCellWidth}px`
257
+ }
258
+ });
259
+ })
260
+ ),
261
+ h("tbody", {}, $xeTable ? renderRows($xeTable, tableData) : [])
262
+ ]
263
+ ),
264
+ h(GanttViewChartComponent)
265
+ ]
266
+ )
267
+ ]
268
+ );
245
269
  };
246
270
  onMounted(() => {
247
271
  const { elemStore } = internalData;