vxe-gantt 3.9.0 → 3.9.2

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 (112) hide show
  1. package/es/components.d.ts +6 -0
  2. package/es/components.js +11 -9
  3. package/es/gantt/index.d.ts +1421 -0
  4. package/es/gantt/index.js +27 -22
  5. package/es/gantt/src/gantt-body.d.ts +19 -0
  6. package/es/gantt/src/gantt-body.js +291 -288
  7. package/es/gantt/src/gantt-chart.d.ts +19 -0
  8. package/es/gantt/src/gantt-chart.js +486 -495
  9. package/es/gantt/src/gantt-footer.d.ts +16 -0
  10. package/es/gantt/src/gantt-footer.js +62 -57
  11. package/es/gantt/src/gantt-header.d.ts +16 -0
  12. package/es/gantt/src/gantt-header.js +172 -174
  13. package/es/gantt/src/gantt-view.d.ts +76 -0
  14. package/es/gantt/src/gantt-view.js +2437 -2512
  15. package/es/gantt/src/gantt.d.ts +729 -0
  16. package/es/gantt/src/gantt.js +2815 -2858
  17. package/es/gantt/src/static.d.ts +34 -0
  18. package/es/gantt/src/static.js +16 -36
  19. package/es/gantt/src/util.d.ts +9 -0
  20. package/es/gantt/src/util.js +28 -19
  21. package/es/gantt/style.css +1 -1
  22. package/es/gantt/style.mini.css +1 -0
  23. package/es/index.d.ts +6 -0
  24. package/es/index.esm.js +6 -6
  25. package/es/index.js +6 -0
  26. package/es/ui/index.d.ts +3 -0
  27. package/es/ui/index.js +123 -120
  28. package/es/ui/src/comp.d.ts +2 -0
  29. package/es/ui/src/comp.js +4 -1
  30. package/es/ui/src/depend.d.ts +1 -0
  31. package/es/ui/src/depend.js +14 -12
  32. package/es/ui/src/dom.d.ts +49 -0
  33. package/es/ui/src/dom.js +180 -169
  34. package/es/ui/src/log.d.ts +6 -0
  35. package/es/ui/src/log.js +18 -13
  36. package/es/ui/src/utils.d.ts +21 -0
  37. package/es/ui/src/utils.js +60 -62
  38. package/es/ui/src/vn.d.ts +2 -0
  39. package/es/ui/src/vn.js +12 -9
  40. package/es/vxe-gantt/index.d.ts +3 -0
  41. package/es/vxe-gantt/index.js +6 -3
  42. package/es/vxe-gantt/style.css +1 -1
  43. package/es/vxe-gantt/style.mini.css +1 -0
  44. package/es/vxe-ui/index.d.ts +3 -0
  45. package/es/vxe-ui/index.js +6 -3
  46. package/lib/components.js +39 -35
  47. package/lib/gantt/index.js +50 -36
  48. package/lib/gantt/src/gantt-body.js +240 -245
  49. package/lib/gantt/src/gantt-chart.js +405 -375
  50. package/lib/gantt/src/gantt-footer.js +63 -46
  51. package/lib/gantt/src/gantt-header.js +186 -162
  52. package/lib/gantt/src/gantt-view.js +1554 -1745
  53. package/lib/gantt/src/gantt.js +2455 -2676
  54. package/lib/gantt/src/static.js +34 -40
  55. package/lib/gantt/src/util.js +32 -15
  56. package/lib/gantt/style/index.js +1 -1
  57. package/lib/gantt/style/style.css +1 -1
  58. package/lib/gantt/style/style.mini.css +1 -0
  59. package/lib/index.common.js +35 -23
  60. package/lib/index.js +37 -0
  61. package/lib/index.umd.js +4910 -15882
  62. package/lib/index.umd.min.js +1 -1
  63. package/lib/style.css +989 -1
  64. package/lib/style.mini.css +1 -0
  65. package/lib/ui/index.js +36 -25
  66. package/lib/ui/src/comp.js +22 -7
  67. package/lib/ui/src/depend.js +30 -13
  68. package/lib/ui/src/dom.js +88 -95
  69. package/lib/ui/src/log.js +34 -18
  70. package/lib/ui/src/utils.js +58 -50
  71. package/lib/ui/src/vn.js +35 -9
  72. package/lib/ui/style/index.js +1 -1
  73. package/lib/vxe-gantt/index.js +35 -20
  74. package/lib/vxe-gantt/style/index.js +1 -1
  75. package/lib/vxe-gantt/style/style.css +1 -1
  76. package/lib/vxe-gantt/style/style.mini.css +1 -0
  77. package/lib/vxe-ui/index.js +35 -20
  78. package/lib/vxe-ui/style/index.js +1 -1
  79. package/package.json +7 -4
  80. package/packages/gantt/src/gantt-view.ts +2 -0
  81. package/packages/gantt/src/gantt.ts +4 -0
  82. package/packages/ui/src/utils.ts +3 -12
  83. package/es/gantt/style.min.css +0 -1
  84. package/es/style.css +0 -1
  85. package/es/style.min.css +0 -1
  86. package/es/vxe-gantt/style.min.css +0 -1
  87. package/lib/components.min.js +0 -1
  88. package/lib/gantt/index.min.js +0 -1
  89. package/lib/gantt/src/gantt-body.min.js +0 -1
  90. package/lib/gantt/src/gantt-chart.min.js +0 -1
  91. package/lib/gantt/src/gantt-footer.min.js +0 -1
  92. package/lib/gantt/src/gantt-header.min.js +0 -1
  93. package/lib/gantt/src/gantt-view.min.js +0 -1
  94. package/lib/gantt/src/gantt.min.js +0 -1
  95. package/lib/gantt/src/static.min.js +0 -1
  96. package/lib/gantt/src/util.min.js +0 -1
  97. package/lib/gantt/style/style.min.css +0 -1
  98. package/lib/style.min.css +0 -1
  99. package/lib/ui/index.min.js +0 -1
  100. package/lib/ui/src/comp.min.js +0 -1
  101. package/lib/ui/src/depend.min.js +0 -1
  102. package/lib/ui/src/dom.min.js +0 -1
  103. package/lib/ui/src/log.min.js +0 -1
  104. package/lib/ui/src/utils.min.js +0 -1
  105. package/lib/ui/src/vn.min.js +0 -1
  106. package/lib/vxe-gantt/index.min.js +0 -1
  107. package/lib/vxe-gantt/style/style.min.css +0 -1
  108. package/lib/vxe-ui/index.min.js +0 -1
  109. /package/es/ui/{style.min.css → style.mini.css} +0 -0
  110. /package/es/vxe-ui/{style.min.css → style.mini.css} +0 -0
  111. /package/lib/ui/style/{style.min.css → style.mini.css} +0 -0
  112. /package/lib/vxe-ui/style/{style.min.css → style.mini.css} +0 -0
@@ -0,0 +1,16 @@
1
+ import { CreateElement } from 'vue';
2
+ import type { VxeGanttViewPrivateMethods, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types';
3
+ declare const _default: import("vue/types/vue").ExtendedVue<import("vue").default, unknown, {
4
+ renderVN(h: CreateElement): import("vue").VNode;
5
+ }, {
6
+ $xeGantt: import("vxe-pc-ui").VxeComponentBaseOptions & {
7
+ reactData: import("vxe-pc-ui/types/components/gantt").GanttReactData<any>;
8
+ internalData: import("vxe-pc-ui/types/components/gantt").GanttInternalData;
9
+ } & import("vxe-pc-ui/types/components/gantt").VxeGanttMethods<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttPrivateComputed<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttProps<any> & import("vue").default & VxeGanttPrivateMethods<any>;
10
+ $xeGanttView: import("vxe-pc-ui").VxeComponentBaseOptions & {
11
+ reactData: import("vxe-pc-ui/types/components/gantt-module").GanttViewReactData;
12
+ internalData: import("vxe-pc-ui/types/components/gantt-module").GanttViewInternalData;
13
+ $xeGantt: VxeGanttConstructor;
14
+ } & import("vxe-pc-ui/types/components/gantt-module").VxeGanttViewMethods & import("vxe-pc-ui/types/components/gantt-module").GanttViewPrivateComputed & import("vxe-pc-ui/types/components/gantt-module").VxeGanttViewProps & import("vue").default & VxeGanttViewPrivateMethods;
15
+ }, unknown>;
16
+ export default _default;
@@ -1,60 +1,65 @@
1
- import { defineVxeComponent } from '../../ui/src/comp';
2
- const sourceType = 'gantt';
3
- const viewType = 'footer';
4
- export default defineVxeComponent({
5
- name: 'VxeGanttViewHeader',
6
- inject: {
7
- $xeGantt: {
8
- default: null
9
- },
10
- $xeGanttView: {
11
- default: null
12
- }
1
+ import { defineVxeComponent } from "../../ui/src/comp";
2
+ const sourceType = "gantt";
3
+ const viewType = "footer";
4
+ var gantt_footer_default = defineVxeComponent({
5
+ name: "VxeGanttViewHeader",
6
+ inject: {
7
+ $xeGantt: {
8
+ default: null
13
9
  },
14
- props: {},
15
- computed: Object.assign({}, {}),
16
- methods: {
17
- //
18
- // Render
19
- //
20
- renderVN(h) {
21
- const _vm = this;
22
- const $xeGantt = _vm.$xeGantt;
23
- return h('div', {
24
- ref: 'refElem',
25
- class: 'vxe-gantt-view--footer-wrapper'
26
- }, [
27
- h('div', {
28
- ref: 'refHeaderScroll',
29
- class: 'vxe-gantt-view--footer-inner-wrapper',
30
- on: {
31
- contextmenu(evnt) {
32
- $xeGantt.handleTaskFooterContextmenuEvent(evnt, { source: sourceType, type: viewType, $rowIndex: -1 });
33
- }
34
- }
35
- }, [])
36
- ]);
37
- }
38
- },
39
- mounted() {
40
- const _vm = this;
41
- const $xeGanttView = _vm.$xeGanttView;
42
- const { internalData } = $xeGanttView;
43
- const { elemStore } = internalData;
44
- const prefix = 'main-footer-';
45
- elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
46
- elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
47
- },
48
- destroyed() {
49
- const _vm = this;
50
- const $xeGanttView = _vm.$xeGanttView;
51
- const { internalData } = $xeGanttView;
52
- const { elemStore } = internalData;
53
- const prefix = 'main-headefooterr-';
54
- elemStore[`${prefix}wrapper`] = null;
55
- elemStore[`${prefix}scroll`] = null;
56
- },
57
- render(h) {
58
- return this.renderVN(h);
10
+ $xeGanttView: {
11
+ default: null
12
+ }
13
+ },
14
+ props: {},
15
+ computed: {
16
+ ...{}
17
+ },
18
+ methods: {
19
+ //
20
+ // Render
21
+ //
22
+ renderVN(h) {
23
+ const _vm = this;
24
+ const $xeGantt = _vm.$xeGantt;
25
+ return h("div", {
26
+ ref: "refElem",
27
+ class: "vxe-gantt-view--footer-wrapper"
28
+ }, [
29
+ h("div", {
30
+ ref: "refHeaderScroll",
31
+ class: "vxe-gantt-view--footer-inner-wrapper",
32
+ on: {
33
+ contextmenu(evnt) {
34
+ $xeGantt.handleTaskFooterContextmenuEvent(evnt, { source: sourceType, type: viewType, $rowIndex: -1 });
35
+ }
36
+ }
37
+ }, [])
38
+ ]);
59
39
  }
40
+ },
41
+ mounted() {
42
+ const _vm = this;
43
+ const $xeGanttView = _vm.$xeGanttView;
44
+ const { internalData } = $xeGanttView;
45
+ const { elemStore } = internalData;
46
+ const prefix = "main-footer-";
47
+ elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
48
+ elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
49
+ },
50
+ destroyed() {
51
+ const _vm = this;
52
+ const $xeGanttView = _vm.$xeGanttView;
53
+ const { internalData } = $xeGanttView;
54
+ const { elemStore } = internalData;
55
+ const prefix = "main-headefooterr-";
56
+ elemStore[`${prefix}wrapper`] = null;
57
+ elemStore[`${prefix}scroll`] = null;
58
+ },
59
+ render(h) {
60
+ return this.renderVN(h);
61
+ }
60
62
  });
63
+ export {
64
+ gantt_footer_default as default
65
+ };
@@ -0,0 +1,16 @@
1
+ import { CreateElement } from 'vue';
2
+ import type { VxeGanttViewPrivateMethods, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types';
3
+ declare const _default: import("vue/types/vue").ExtendedVue<import("vue").default, unknown, {
4
+ renderVN(h: CreateElement): import("vue").VNode;
5
+ }, {
6
+ $xeGantt: import("vxe-pc-ui").VxeComponentBaseOptions & {
7
+ reactData: import("vxe-pc-ui/types/components/gantt").GanttReactData<any>;
8
+ internalData: import("vxe-pc-ui/types/components/gantt").GanttInternalData;
9
+ } & import("vxe-pc-ui/types/components/gantt").VxeGanttMethods<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttPrivateComputed<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttProps<any> & import("vue").default & VxeGanttPrivateMethods<any>;
10
+ $xeGanttView: import("vxe-pc-ui").VxeComponentBaseOptions & {
11
+ reactData: import("vxe-pc-ui/types/components/gantt-module").GanttViewReactData;
12
+ internalData: import("vxe-pc-ui/types/components/gantt-module").GanttViewInternalData;
13
+ $xeGantt: VxeGanttConstructor;
14
+ } & import("vxe-pc-ui/types/components/gantt-module").VxeGanttViewMethods & import("vxe-pc-ui/types/components/gantt-module").GanttViewPrivateComputed & import("vxe-pc-ui/types/components/gantt-module").VxeGanttViewProps & import("vue").default & VxeGanttViewPrivateMethods;
15
+ }, Record<never, any>>;
16
+ export default _default;
@@ -1,179 +1,177 @@
1
- import { defineVxeComponent } from '../../ui/src/comp';
2
- import { VxeUI } from '@vxe-ui/core';
3
- import XEUtils from 'xe-utils';
1
+ import { defineVxeComponent } from "../../ui/src/comp";
2
+ import { VxeUI } from "@vxe-ui/core";
3
+ import XEUtils from "xe-utils";
4
4
  const { getI18n } = VxeUI;
5
- const sourceType = 'gantt';
6
- const viewType = 'header';
7
- export default defineVxeComponent({
8
- name: 'VxeGanttViewHeader',
9
- inject: {
10
- $xeGantt: {
11
- default: null
12
- },
13
- $xeGanttView: {
14
- default: null
15
- }
5
+ const sourceType = "gantt";
6
+ const viewType = "header";
7
+ var gantt_header_default = defineVxeComponent({
8
+ name: "VxeGanttViewHeader",
9
+ inject: {
10
+ $xeGantt: {
11
+ default: null
16
12
  },
17
- computed: Object.assign({}, {}),
18
- methods: {
19
- //
20
- // Render
21
- //
22
- renderVN(h) {
23
- const _vm = this;
24
- const $xeGantt = _vm.$xeGantt;
25
- const $xeGanttView = _vm.$xeGanttView;
26
- const reactData = $xeGanttView.reactData;
27
- const internalData = $xeGanttView.internalData;
28
- const { headerGroups, viewCellWidth } = reactData;
29
- const { todayDateMaps, visibleColumn } = internalData;
30
- const taskViewOpts = $xeGantt.computeTaskViewOpts;
31
- const minScale = $xeGantt.computeMinScale;
32
- const scaleStep = $xeGantt.computeScaleStep;
33
- const { showNowLine } = taskViewOpts;
34
- return h('div', {
35
- ref: 'refElem',
36
- class: 'vxe-gantt-view--header-wrapper'
37
- }, [
38
- h('div', {
39
- ref: 'refHeaderScroll',
40
- class: 'vxe-gantt-view--header-inner-wrapper',
41
- on: {
42
- scroll: $xeGanttView.triggerHeaderScrollEvent
13
+ $xeGanttView: {
14
+ default: null
15
+ }
16
+ },
17
+ computed: {
18
+ ...{}
19
+ },
20
+ methods: {
21
+ //
22
+ // Render
23
+ //
24
+ renderVN(h) {
25
+ const _vm = this;
26
+ const $xeGantt = _vm.$xeGantt;
27
+ const $xeGanttView = _vm.$xeGanttView;
28
+ const reactData = $xeGanttView.reactData;
29
+ const internalData = $xeGanttView.internalData;
30
+ const { headerGroups, viewCellWidth } = reactData;
31
+ const { todayDateMaps, visibleColumn } = internalData;
32
+ const taskViewOpts = $xeGantt.computeTaskViewOpts;
33
+ const minScale = $xeGantt.computeMinScale;
34
+ const scaleStep = $xeGantt.computeScaleStep;
35
+ const { showNowLine } = taskViewOpts;
36
+ return h("div", {
37
+ ref: "refElem",
38
+ class: "vxe-gantt-view--header-wrapper"
39
+ }, [
40
+ h("div", {
41
+ ref: "refHeaderScroll",
42
+ class: "vxe-gantt-view--header-inner-wrapper",
43
+ on: {
44
+ scroll: $xeGanttView.triggerHeaderScrollEvent
45
+ }
46
+ }, [
47
+ h("div", {
48
+ ref: "refHeaderXSpace",
49
+ class: "vxe-body--x-space"
50
+ }),
51
+ h("table", {
52
+ ref: "refHeaderTable",
53
+ class: "vxe-gantt-view--header-table"
54
+ }, [
55
+ h("colgroup", {}, visibleColumn.map((column, cIndex) => {
56
+ return h("col", {
57
+ key: cIndex,
58
+ style: {
59
+ width: `${viewCellWidth}px`
60
+ }
61
+ });
62
+ })),
63
+ h("thead", {}, headerGroups.map(({ scaleItem, columns }, $rowIndex) => {
64
+ const { type, titleFormat, titleMethod, headerCellStyle, slots } = scaleItem;
65
+ const titleSlot = slots ? slots.title : null;
66
+ const isLast = $rowIndex === headerGroups.length - 1;
67
+ const todayValue = isLast && showNowLine ? todayDateMaps[type] : null;
68
+ return h("tr", {
69
+ key: $rowIndex
70
+ }, columns.map((column, cIndex) => {
71
+ const { field, childCount, dateObj, startDateObj, endDateObj } = column;
72
+ let label = `${column.title}`;
73
+ if ((isLast || minScale && (minScale.type === "date" || minScale.type === "day") && (type === "date" || type === "day")) && scaleStep > 1) {
74
+ label = getI18n(`vxe.gantt.stepFormat.${type}`, {
75
+ start: startDateObj,
76
+ end: endDateObj,
77
+ eStartLabel: getI18n(`vxe.gantt.dayss.w${startDateObj.e}`),
78
+ eEndLabel: getI18n(`vxe.gantt.dayss.w${endDateObj.e}`)
79
+ });
80
+ } else {
81
+ if (type === "day") {
82
+ if ($rowIndex) {
83
+ label = getI18n(`vxe.gantt.tSimpleFormat.${type}`, {
84
+ eLabel: getI18n(`vxe.gantt.dayss.w${dateObj.e}`)
85
+ });
86
+ } else {
87
+ label = getI18n(`vxe.gantt.tFullFormat.${type}`, {
88
+ eLabel: getI18n(`vxe.gantt.dayss.w${dateObj.e}`)
89
+ });
43
90
  }
44
- }, [
45
- h('div', {
46
- ref: 'refHeaderXSpace',
47
- class: 'vxe-body--x-space'
48
- }),
49
- h('table', {
50
- ref: 'refHeaderTable',
51
- class: 'vxe-gantt-view--header-table'
52
- }, [
53
- h('colgroup', {}, visibleColumn.map((column, cIndex) => {
54
- return h('col', {
55
- key: cIndex,
56
- style: {
57
- width: `${viewCellWidth}px`
58
- }
59
- });
60
- })),
61
- h('thead', {}, headerGroups.map(({ scaleItem, columns }, $rowIndex) => {
62
- const { type, titleFormat, titleMethod, headerCellStyle, slots } = scaleItem;
63
- const titleSlot = slots ? slots.title : null;
64
- const isLast = $rowIndex === headerGroups.length - 1;
65
- const todayValue = isLast && showNowLine ? todayDateMaps[type] : null;
66
- return h('tr', {
67
- key: $rowIndex
68
- }, columns.map((column, cIndex) => {
69
- const { field, childCount, dateObj, startDateObj, endDateObj } = column;
70
- let label = `${column.title}`;
71
- if ((isLast || (minScale && (minScale.type === 'date' || minScale.type === 'day') && (type === 'date' || type === 'day'))) && scaleStep > 1) {
72
- label = getI18n(`vxe.gantt.stepFormat.${type}`, {
73
- start: startDateObj,
74
- end: endDateObj,
75
- eStartLabel: getI18n(`vxe.gantt.dayss.w${startDateObj.e}`),
76
- eEndLabel: getI18n(`vxe.gantt.dayss.w${endDateObj.e}`)
77
- });
78
- }
79
- else {
80
- if (type === 'day') {
81
- if ($rowIndex) {
82
- label = getI18n(`vxe.gantt.tSimpleFormat.${type}`, {
83
- eLabel: getI18n(`vxe.gantt.dayss.w${dateObj.e}`)
84
- });
85
- }
86
- else {
87
- label = getI18n(`vxe.gantt.tFullFormat.${type}`, {
88
- eLabel: getI18n(`vxe.gantt.dayss.w${dateObj.e}`)
89
- });
90
- }
91
- }
92
- else {
93
- if ($rowIndex) {
94
- label = getI18n(`vxe.gantt.tSimpleFormat.${type}`, dateObj);
95
- }
96
- else {
97
- label = getI18n(`vxe.gantt.tFullFormat.${type}`, dateObj);
98
- }
99
- }
100
- }
101
- let cellVNs = label;
102
- const ctParams = {
103
- source: sourceType,
104
- type: viewType,
105
- column,
106
- scaleObj: scaleItem,
107
- title: label,
108
- dateObj,
109
- startDateObj,
110
- endDateObj,
111
- $rowIndex
112
- };
113
- if (titleSlot) {
114
- cellVNs = $xeGantt.callSlot(titleSlot, ctParams, h);
115
- }
116
- else if (titleMethod) {
117
- cellVNs = `${titleMethod(ctParams)}`;
118
- }
119
- else if (titleFormat) {
120
- cellVNs = XEUtils.toDateString(dateObj.date, titleFormat);
121
- }
122
- let cellStys = {};
123
- if (headerCellStyle) {
124
- if (XEUtils.isFunction(headerCellStyle)) {
125
- cellStys = headerCellStyle(ctParams) || null;
126
- }
127
- else {
128
- cellStys = headerCellStyle;
129
- }
130
- }
131
- return h('th', {
132
- key: cIndex,
133
- class: ['vxe-gantt-view--header-column', {
134
- 'is--now': showNowLine && todayValue && todayValue === field
135
- }],
136
- attrs: {
137
- colspan: childCount || null,
138
- title: titleSlot ? null : label
139
- },
140
- style: cellStys || undefined,
141
- on: {
142
- contextmenu(evnt) {
143
- $xeGantt.handleTaskHeaderContextmenuEvent(evnt, ctParams);
144
- }
145
- }
146
- }, cellVNs);
147
- }));
148
- }))
149
- ])
150
- ])
151
- ]);
152
- }
153
- },
154
- mounted() {
155
- const _vm = this;
156
- const $xeGanttView = _vm.$xeGanttView;
157
- const { internalData } = $xeGanttView;
158
- const { elemStore } = internalData;
159
- const prefix = 'main-header-';
160
- elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
161
- elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
162
- elemStore[`${prefix}table`] = _vm.$refs.refHeaderTable;
163
- elemStore[`${prefix}xSpace`] = _vm.$refs.refHeaderXSpace;
164
- },
165
- destroyed() {
166
- const _vm = this;
167
- const $xeGanttView = _vm.$xeGanttView;
168
- const { internalData } = $xeGanttView;
169
- const { elemStore } = internalData;
170
- const prefix = 'main-header-';
171
- elemStore[`${prefix}wrapper`] = null;
172
- elemStore[`${prefix}scroll`] = null;
173
- elemStore[`${prefix}table`] = null;
174
- elemStore[`${prefix}xSpace`] = null;
175
- },
176
- render(h) {
177
- return this.renderVN(h);
91
+ } else {
92
+ if ($rowIndex) {
93
+ label = getI18n(`vxe.gantt.tSimpleFormat.${type}`, dateObj);
94
+ } else {
95
+ label = getI18n(`vxe.gantt.tFullFormat.${type}`, dateObj);
96
+ }
97
+ }
98
+ }
99
+ let cellVNs = label;
100
+ const ctParams = {
101
+ source: sourceType,
102
+ type: viewType,
103
+ column,
104
+ scaleObj: scaleItem,
105
+ title: label,
106
+ dateObj,
107
+ startDateObj,
108
+ endDateObj,
109
+ $rowIndex
110
+ };
111
+ if (titleSlot) {
112
+ cellVNs = $xeGantt.callSlot(titleSlot, ctParams, h);
113
+ } else if (titleMethod) {
114
+ cellVNs = `${titleMethod(ctParams)}`;
115
+ } else if (titleFormat) {
116
+ cellVNs = XEUtils.toDateString(dateObj.date, titleFormat);
117
+ }
118
+ let cellStys = {};
119
+ if (headerCellStyle) {
120
+ if (XEUtils.isFunction(headerCellStyle)) {
121
+ cellStys = headerCellStyle(ctParams) || null;
122
+ } else {
123
+ cellStys = headerCellStyle;
124
+ }
125
+ }
126
+ return h("th", {
127
+ key: cIndex,
128
+ class: ["vxe-gantt-view--header-column", {
129
+ "is--now": showNowLine && todayValue && todayValue === field
130
+ }],
131
+ attrs: {
132
+ colspan: childCount || null,
133
+ title: titleSlot ? null : label
134
+ },
135
+ style: cellStys || void 0,
136
+ on: {
137
+ contextmenu(evnt) {
138
+ $xeGantt.handleTaskHeaderContextmenuEvent(evnt, ctParams);
139
+ }
140
+ }
141
+ }, cellVNs);
142
+ }));
143
+ }))
144
+ ])
145
+ ])
146
+ ]);
178
147
  }
148
+ },
149
+ mounted() {
150
+ const _vm = this;
151
+ const $xeGanttView = _vm.$xeGanttView;
152
+ const { internalData } = $xeGanttView;
153
+ const { elemStore } = internalData;
154
+ const prefix = "main-header-";
155
+ elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
156
+ elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
157
+ elemStore[`${prefix}table`] = _vm.$refs.refHeaderTable;
158
+ elemStore[`${prefix}xSpace`] = _vm.$refs.refHeaderXSpace;
159
+ },
160
+ destroyed() {
161
+ const _vm = this;
162
+ const $xeGanttView = _vm.$xeGanttView;
163
+ const { internalData } = $xeGanttView;
164
+ const { elemStore } = internalData;
165
+ const prefix = "main-header-";
166
+ elemStore[`${prefix}wrapper`] = null;
167
+ elemStore[`${prefix}scroll`] = null;
168
+ elemStore[`${prefix}table`] = null;
169
+ elemStore[`${prefix}xSpace`] = null;
170
+ },
171
+ render(h) {
172
+ return this.renderVN(h);
173
+ }
179
174
  });
175
+ export {
176
+ gantt_header_default as default
177
+ };
@@ -0,0 +1,76 @@
1
+ import { VNode, CreateElement } from 'vue';
2
+ import type { VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods, VxeTablePropTypes } from 'vxe-table';
3
+ import type { VxeScrollbarProps } from 'vxe-pc-ui';
4
+ import type { VxeGanttViewConstructor, GanttViewReactData, VxeGanttPropTypes, VxeGanttViewPrivateMethods, GanttViewInternalData, VxeGanttPrivateMethods } from '../../../types';
5
+ export declare function handleCriticalPath($xeGanttView: VxeGanttViewConstructor & VxeGanttViewPrivateMethods, data: any[], links: VxeGanttPropTypes.Links): void;
6
+ declare const _default: import("vue/types/vue").ExtendedVue<import("vue").default, {
7
+ xID: string;
8
+ reactData: GanttViewReactData;
9
+ internalData: GanttViewInternalData;
10
+ scrollDefaultConf: VxeScrollbarProps;
11
+ reScrollFlag: number;
12
+ }, {
13
+ getScrollViewElem(): HTMLElement | null;
14
+ refreshData(): Promise<void>;
15
+ updateViewData(force?: boolean): Promise<void>;
16
+ connectUpdate({ $table }: {
17
+ $table: VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods;
18
+ }): Promise<void>;
19
+ handleUpdateStyle(): Promise<[void, void | null]> | undefined;
20
+ handleLazyRecalculate(): Promise<void>;
21
+ handleUpdateCurrentRow(row: any): void;
22
+ handleUpdateHoverRow(row: any): void;
23
+ handleSyncScrollTop(params: {
24
+ scrollTop: number;
25
+ }): void;
26
+ handleScrollEvent(evnt: Event, isRollY: boolean, isRollX: boolean, scrollTop: number, scrollLeft: number): void;
27
+ triggerHeaderScrollEvent(evnt: Event): void;
28
+ triggerBodyScrollEvent(evnt: Event): void;
29
+ triggerVirtualScrollXEvent(evnt: Event): void;
30
+ triggerVirtualScrollYEvent(evnt: Event): void;
31
+ handleUpdateSXSpace(): Promise<void>;
32
+ handleUpdateSYSpace(): Promise<void>;
33
+ handleUpdateSYStatus(sYLoad: boolean): void;
34
+ /**
35
+ * @private
36
+ */
37
+ updateScrollbar(): Promise<void>;
38
+ handleGlobalResizeEvent(): void;
39
+ bindScrollbarResize(): void;
40
+ renderScrollX(h: CreateElement): VNode;
41
+ renderScrollY(h: CreateElement): VNode;
42
+ renderViewport(h: CreateElement): VNode;
43
+ renderNativeBody(h: CreateElement): VNode;
44
+ renderVirtualBody(h: CreateElement): VNode;
45
+ renderVN(h: CreateElement): VNode;
46
+ }, {
47
+ computeGanttIsVScrollbar: import("vxe-pc-ui").VxeComponentIsVScrollbar;
48
+ computeScrollbarXOpts: VxeTablePropTypes.ScrollbarXConfig;
49
+ computeScrollbarYOpts: VxeTablePropTypes.ScrollbarYConfig;
50
+ computeScrollXHeight: number;
51
+ computeScrollYWidth: number;
52
+ computeScrollXVisible: boolean | "auto" | "hidden" | "visible" | undefined;
53
+ computeScrollYVisible: boolean | "auto" | "hidden" | "visible" | undefined;
54
+ computeScrollXAutoHide: boolean | undefined;
55
+ computeScrollYAutoHide: boolean | undefined;
56
+ computeScrollbarXToTop: boolean;
57
+ computeScrollbarYToLeft: boolean;
58
+ computeScrollbarWrapperClss: string;
59
+ computeScaleDateList: Date[];
60
+ computeNowLineLeft: number;
61
+ computeSize: import("vxe-pc-ui").VxeComponentSizeType;
62
+ updateThumbSize: () => void;
63
+ updateThumbOffset: () => void;
64
+ clickTrackXEvent: (evnt: MouseEvent) => void;
65
+ clickTrackYEvent: (evnt: MouseEvent) => void;
66
+ pointerdownThumbXEvent: (evnt: PointerEvent) => void;
67
+ pointermoveThumbXEvent: (evnt: PointerEvent) => void;
68
+ cleatPointerThumbEvent: (evnt: PointerEvent) => void;
69
+ pointerdownThumbYEvent: (evnt: PointerEvent) => void;
70
+ pointermoveThumbYEvent: (evnt: PointerEvent) => void;
71
+ $xeGantt: import("vxe-pc-ui").VxeComponentBaseOptions & {
72
+ reactData: import("vxe-pc-ui/types/components/gantt").GanttReactData<any>;
73
+ internalData: import("vxe-pc-ui/types/components/gantt").GanttInternalData;
74
+ } & import("vxe-pc-ui/types/components/gantt").VxeGanttMethods<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttPrivateComputed<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttProps<any> & import("vue").default & VxeGanttPrivateMethods<any>;
75
+ }, unknown>;
76
+ export default _default;