vxe-gantt 3.9.4 → 3.9.5

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/es/components.d.ts +2 -1
  2. package/es/components.js +3 -4
  3. package/es/gantt/src/gantt-body.js +103 -79
  4. package/es/gantt/src/gantt-chart.js +376 -252
  5. package/es/gantt/src/gantt-footer.js +22 -14
  6. package/es/gantt/src/gantt-header.js +141 -110
  7. package/es/gantt/src/gantt-view.js +243 -198
  8. package/es/gantt/src/gantt.js +295 -187
  9. package/es/index.esm.js +4 -2
  10. package/es/index.js +4 -2
  11. package/es/ui/index.d.ts +0 -1
  12. package/es/ui/index.js +1 -2
  13. package/es/ui/src/log.js +1 -1
  14. package/es/ui/src/utils.d.ts +1 -1
  15. package/lib/components.js +5 -6
  16. package/lib/gantt/src/gantt-body.js +103 -79
  17. package/lib/gantt/src/gantt-chart.js +376 -252
  18. package/lib/gantt/src/gantt-footer.js +22 -14
  19. package/lib/gantt/src/gantt-header.js +141 -110
  20. package/lib/gantt/src/gantt-view.js +243 -198
  21. package/lib/gantt/src/gantt.js +295 -187
  22. package/lib/index.common.js +4 -2
  23. package/lib/index.js +4 -2
  24. package/lib/index.umd.js +1369 -1029
  25. package/lib/index.umd.min.js +1 -1
  26. package/lib/ui/index.js +1 -2
  27. package/lib/ui/src/log.js +1 -1
  28. package/package.json +7 -7
  29. package/packages/components.ts +21 -22
  30. package/packages/gantt/index.ts +32 -32
  31. package/packages/gantt/src/gantt-body.ts +349 -325
  32. package/packages/gantt/src/gantt-chart.ts +699 -575
  33. package/packages/gantt/src/gantt-footer.ts +81 -73
  34. package/packages/gantt/src/gantt-header.ts +218 -187
  35. package/packages/gantt/src/gantt-view.ts +2861 -2823
  36. package/packages/gantt/src/gantt.ts +3308 -3192
  37. package/packages/gantt/src/static.ts +35 -35
  38. package/packages/gantt/src/util.ts +35 -35
  39. package/packages/index.ts +15 -13
  40. package/packages/ui/index.ts +132 -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 +68 -68
  46. package/packages/ui/src/vn.ts +13 -13
  47. package/types/all.d.ts +29 -29
  48. package/types/index.d.ts +4 -4
@@ -1,5 +1,6 @@
1
1
  import { VueConstructor } from 'vue';
2
- import VxeUI from './ui';
2
+ import { VxeUI } from '@vxe-ui/core';
3
+ import './ui';
3
4
  import type { VxeGlobalConfig } from 'vxe-pc-ui';
4
5
  export declare function install(app: VueConstructor, options?: VxeGlobalConfig): void;
5
6
  export { VxeUI };
package/es/components.js CHANGED
@@ -1,9 +1,8 @@
1
- import VxeUI from "./ui";
1
+ import { VxeUI } from "@vxe-ui/core";
2
2
  import VxeGantt from "./gantt";
3
+ import "./ui";
3
4
  const { setConfig } = VxeUI;
4
- const components = [
5
- VxeGantt
6
- ];
5
+ const components = [VxeGantt];
7
6
  function install(app, options) {
8
7
  setConfig(options);
9
8
  components.forEach((component) => app.use(component));
@@ -98,32 +98,36 @@ var gantt_body_default = defineVxeComponent({
98
98
  rowIndex,
99
99
  _rowIndex
100
100
  };
101
- return h("td", {
102
- key: cellClassName || cellStyle ? field : $columnIndex,
103
- class: [
104
- "vxe-gantt-view--body-column",
105
- {
106
- "is--now": showNowLine && todayValue === field
107
- },
108
- getClass(cellClassName, ctParams)
109
- ],
110
- style: cellStyle ? Object.assign({}, XEUtils.isFunction(cellStyle) ? cellStyle(ctParams) : cellStyle, {
111
- height: `${cellHeight}px`
112
- }) : {
113
- height: `${cellHeight}px`
114
- },
115
- on: {
116
- click(evnt) {
117
- $xeGantt.handleTaskCellClickEvent(evnt, { row, column });
118
- },
119
- dblclick(evnt) {
120
- $xeGantt.handleTaskCellDblclickEvent(evnt, { row, column });
101
+ return h(
102
+ "td",
103
+ {
104
+ key: cellClassName || cellStyle ? field : $columnIndex,
105
+ class: [
106
+ "vxe-gantt-view--body-column",
107
+ {
108
+ "is--now": showNowLine && todayValue === field
109
+ },
110
+ getClass(cellClassName, ctParams)
111
+ ],
112
+ style: cellStyle ? Object.assign({}, XEUtils.isFunction(cellStyle) ? cellStyle(ctParams) : cellStyle, {
113
+ height: `${cellHeight}px`
114
+ }) : {
115
+ height: `${cellHeight}px`
121
116
  },
122
- contextmenu(evnt) {
123
- $xeGantt.handleTaskBodyContextmenuEvent(evnt, ctParams);
117
+ on: {
118
+ click(evnt) {
119
+ $xeGantt.handleTaskCellClickEvent(evnt, { row, column });
120
+ },
121
+ dblclick(evnt) {
122
+ $xeGantt.handleTaskCellDblclickEvent(evnt, { row, column });
123
+ },
124
+ contextmenu(evnt) {
125
+ $xeGantt.handleTaskBodyContextmenuEvent(evnt, ctParams);
126
+ }
124
127
  }
125
- }
126
- }, tdVNs);
128
+ },
129
+ tdVNs
130
+ );
127
131
  },
128
132
  renderRows(h, $xeTable, tableData) {
129
133
  const _vm = this;
@@ -186,25 +190,29 @@ var gantt_body_default = defineVxeComponent({
186
190
  _rowIndex
187
191
  };
188
192
  trVNs.push(
189
- h("tr", {
190
- key: rowClassName || rowStyle || cellClassName || cellStyle ? rowid : $rowIndex,
191
- class: [
192
- "vxe-gantt-view--body-row",
193
- {
194
- "row--stripe": stripe && (_rowIndex + 1) % 2 === 0,
195
- "is--new": isNewRow,
196
- "row--radio": radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
197
- "row--checked": checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
198
- "row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid]
193
+ h(
194
+ "tr",
195
+ {
196
+ key: rowClassName || rowStyle || cellClassName || cellStyle ? rowid : $rowIndex,
197
+ class: [
198
+ "vxe-gantt-view--body-row",
199
+ {
200
+ "row--stripe": stripe && (_rowIndex + 1) % 2 === 0,
201
+ "is--new": isNewRow,
202
+ "row--radio": radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
203
+ "row--checked": checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
204
+ "row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid]
205
+ },
206
+ getClass(rowClassName, rowParams)
207
+ ],
208
+ style: rowStyle ? XEUtils.isFunction(rowStyle) ? rowStyle(rowParams) || void 0 : rowStyle : void 0,
209
+ attrs: {
210
+ rowid
199
211
  },
200
- getClass(rowClassName, rowParams)
201
- ],
202
- style: rowStyle ? XEUtils.isFunction(rowStyle) ? rowStyle(rowParams) || void 0 : rowStyle : void 0,
203
- attrs: {
204
- rowid
212
+ on: trOns
205
213
  },
206
- on: trOns
207
- }, tableColumn.map((column, $columnIndex) => _vm.renderColumn(h, $xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex, column, $columnIndex)))
214
+ tableColumn.map((column, $columnIndex) => _vm.renderColumn(h, $xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex, column, $columnIndex))
215
+ )
208
216
  );
209
217
  let isExpandTree = false;
210
218
  let rowChildren = [];
@@ -225,45 +233,61 @@ var gantt_body_default = defineVxeComponent({
225
233
  const { reactData } = $xeGanttView;
226
234
  const $xeTable = $xeGanttView.internalData.xeTable;
227
235
  const { tableData, tableColumn, viewCellWidth } = reactData;
228
- return h("div", {
229
- ref: "refElem",
230
- class: "vxe-gantt-view--body-wrapper"
231
- }, [
232
- h("div", {
233
- ref: "refBodyScroll",
234
- class: "vxe-gantt-view--body-inner-wrapper",
235
- on: {
236
- scroll: $xeGanttView.triggerBodyScrollEvent,
237
- contextmenu(evnt) {
238
- $xeGantt.handleTaskBodyContextmenuEvent(evnt, { source: sourceType, type: viewType, rowIndex: -1, $rowIndex: -1, _rowIndex: -1 });
239
- }
240
- }
241
- }, [
242
- h("div", {
243
- ref: "refBodyXSpace",
244
- class: "vxe-body--x-space"
245
- }),
246
- h("div", {
247
- ref: "refBodyYSpace",
248
- class: "vxe-body--y-space"
249
- }),
250
- h("table", {
251
- ref: "refBodyTable",
252
- class: "vxe-gantt-view--body-table"
253
- }, [
254
- h("colgroup", {}, tableColumn.map((column, cIndex) => {
255
- return h("col", {
256
- key: cIndex,
257
- style: {
258
- width: `${viewCellWidth}px`
236
+ return h(
237
+ "div",
238
+ {
239
+ ref: "refElem",
240
+ class: "vxe-gantt-view--body-wrapper"
241
+ },
242
+ [
243
+ h(
244
+ "div",
245
+ {
246
+ ref: "refBodyScroll",
247
+ class: "vxe-gantt-view--body-inner-wrapper",
248
+ on: {
249
+ scroll: $xeGanttView.triggerBodyScrollEvent,
250
+ contextmenu(evnt) {
251
+ $xeGantt.handleTaskBodyContextmenuEvent(evnt, { source: sourceType, type: viewType, rowIndex: -1, $rowIndex: -1, _rowIndex: -1 });
259
252
  }
260
- });
261
- })),
262
- h("tbody", {}, $xeTable ? _vm.renderRows(h, $xeTable, tableData) : [])
263
- ]),
264
- h(GanttViewChartComponent)
265
- ])
266
- ]);
253
+ }
254
+ },
255
+ [
256
+ h("div", {
257
+ ref: "refBodyXSpace",
258
+ class: "vxe-body--x-space"
259
+ }),
260
+ h("div", {
261
+ ref: "refBodyYSpace",
262
+ class: "vxe-body--y-space"
263
+ }),
264
+ h(
265
+ "table",
266
+ {
267
+ ref: "refBodyTable",
268
+ class: "vxe-gantt-view--body-table"
269
+ },
270
+ [
271
+ h(
272
+ "colgroup",
273
+ {},
274
+ tableColumn.map((column, cIndex) => {
275
+ return h("col", {
276
+ key: cIndex,
277
+ style: {
278
+ width: `${viewCellWidth}px`
279
+ }
280
+ });
281
+ })
282
+ ),
283
+ h("tbody", {}, $xeTable ? _vm.renderRows(h, $xeTable, tableData) : [])
284
+ ]
285
+ ),
286
+ h(GanttViewChartComponent)
287
+ ]
288
+ )
289
+ ]
290
+ );
267
291
  }
268
292
  },
269
293
  mounted() {