vxe-gantt 3.4.1 → 3.4.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 (41) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +53 -53
  3. package/es/ui/index.js +1 -1
  4. package/es/ui/src/log.js +1 -1
  5. package/lib/index.umd.js +49 -49
  6. package/lib/index.umd.min.js +1 -1
  7. package/lib/ui/index.js +1 -1
  8. package/lib/ui/index.min.js +1 -1
  9. package/lib/ui/src/log.js +1 -1
  10. package/lib/ui/src/log.min.js +1 -1
  11. package/package.json +88 -88
  12. package/packages/components.ts +22 -22
  13. package/packages/gantt/index.ts +32 -32
  14. package/packages/gantt/src/gantt-body.ts +323 -323
  15. package/packages/gantt/src/gantt-chart.ts +542 -542
  16. package/packages/gantt/src/gantt-footer.ts +73 -73
  17. package/packages/gantt/src/gantt-header.ts +162 -162
  18. package/packages/gantt/src/gantt-view.ts +1954 -1954
  19. package/packages/gantt/src/gantt.ts +2827 -2827
  20. package/packages/gantt/src/static.ts +35 -35
  21. package/packages/gantt/src/util.ts +47 -47
  22. package/packages/index.ts +8 -8
  23. package/packages/ui/index.ts +119 -119
  24. package/packages/ui/src/comp.ts +3 -3
  25. package/packages/ui/src/depend.ts +14 -14
  26. package/packages/ui/src/dom.ts +196 -196
  27. package/packages/ui/src/log.ts +8 -8
  28. package/packages/ui/src/utils.ts +67 -67
  29. package/packages/ui/src/vn.ts +13 -13
  30. package/styles/all.scss +3 -3
  31. package/styles/base.scss +2 -2
  32. package/styles/components/gantt-module/gantt-chart.scss +261 -261
  33. package/styles/components/gantt.scss +707 -707
  34. package/styles/helpers/baseMixin.scss +95 -95
  35. package/styles/helpers/baseVar.scss +3 -3
  36. package/styles/helpers/placement.scss +38 -38
  37. package/styles/theme/base.scss +14 -14
  38. package/styles/theme/dark.scss +8 -8
  39. package/styles/theme/light.scss +8 -8
  40. package/types/all.d.ts +16 -16
  41. package/types/index.d.ts +4 -4
@@ -1,35 +1,35 @@
1
- /**
2
- * 依赖线枚举类型
3
- */
4
- export enum VxeGanttDependencyType {
5
- /**
6
- * 结束后才开始,表示一个任务必须在另一个任务开始之前完成
7
- */
8
- FinishToStart = 0,
9
- /**
10
- * 开始到结束,表示从某个过程的开始到结束的整个过程
11
- */
12
- StartToFinish = 1,
13
- /**
14
- * 开始后才开始,表示一个活动结束了,另一个活动才能开始,它们之间按先后顺序进行
15
- */
16
- StartToStart = 2,
17
- /**
18
- * 完成到完成,表示一个任务必须在另一个任务完成之后才能完成
19
- */
20
- FinishToFinish = 3
21
- }
22
-
23
- /**
24
- * 任务渲染类型
25
- */
26
- export enum VxeGanttTaskType {
27
- /**
28
- * 里程碑类型,该类型节点不需要结束日期
29
- */
30
- Milestone = 'milestone',
31
- /**
32
- * 子视图类型,该类型会将子任务渲染到一行,无需开始日期和结束日期
33
- */
34
- Subview = 'subview'
35
- }
1
+ /**
2
+ * 依赖线枚举类型
3
+ */
4
+ export enum VxeGanttDependencyType {
5
+ /**
6
+ * 结束后才开始,表示一个任务必须在另一个任务开始之前完成
7
+ */
8
+ FinishToStart = 0,
9
+ /**
10
+ * 开始到结束,表示从某个过程的开始到结束的整个过程
11
+ */
12
+ StartToFinish = 1,
13
+ /**
14
+ * 开始后才开始,表示一个活动结束了,另一个活动才能开始,它们之间按先后顺序进行
15
+ */
16
+ StartToStart = 2,
17
+ /**
18
+ * 完成到完成,表示一个任务必须在另一个任务完成之后才能完成
19
+ */
20
+ FinishToFinish = 3
21
+ }
22
+
23
+ /**
24
+ * 任务渲染类型
25
+ */
26
+ export enum VxeGanttTaskType {
27
+ /**
28
+ * 里程碑类型,该类型节点不需要结束日期
29
+ */
30
+ Milestone = 'milestone',
31
+ /**
32
+ * 子视图类型,该类型会将子任务渲染到一行,无需开始日期和结束日期
33
+ */
34
+ Subview = 'subview'
35
+ }
@@ -1,47 +1,47 @@
1
- import type { VxeGanttDefines, VxeGanttTaskType } from '../../../types'
2
- import type { VxeTableDefines, VxeTablePropTypes } from 'vxe-table'
3
-
4
- export function getRefElem (refEl: any) {
5
- if (refEl) {
6
- return (refEl.$el || refEl) as HTMLElement
7
- }
8
- return null
9
- }
10
-
11
- export function getCellRestHeight (rowRest: VxeTableDefines.RowCacheItem, cellOpts: VxeTablePropTypes.CellConfig, rowOpts: VxeTablePropTypes.RowConfig, defaultRowHeight: number) {
12
- return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
13
- }
14
-
15
- export function getStandardGapTime (type: VxeGanttDefines.ColumnScaleType) {
16
- switch (type) {
17
- case 'hour':
18
- return 1000 * 60 * 60
19
- case 'minute':
20
- return 1000 * 60
21
- case 'second':
22
- return 1000
23
- }
24
- return 1000 * 60 * 60 * 24
25
- }
26
-
27
- export function getTaskBarLeft (chartRest: VxeGanttDefines.RowCacheItem | null, viewCellWidth: number) {
28
- return chartRest ? viewCellWidth * chartRest.oLeftSize : 0
29
- }
30
-
31
- export function getTaskBarWidth (chartRest: VxeGanttDefines.RowCacheItem | null, viewCellWidth: number) {
32
- return chartRest && chartRest.oWidthSize ? Math.max(1, chartRest ? (Math.floor(viewCellWidth * chartRest.oWidthSize) - 1) : 0) : 0
33
- }
34
-
35
- const taskTypeMaps: Record<VxeGanttTaskType, boolean> = {
36
- milestone: true,
37
- subview: true
38
- }
39
- export function hasMilestoneTask (type: string) {
40
- return type === 'milestone'
41
- }
42
- export function hasSubviewTask (type: string) {
43
- return type === 'subview'
44
- }
45
- export function getTaskType (type: string) {
46
- return taskTypeMaps[type as VxeGanttTaskType] ? type as VxeGanttTaskType : 'default'
47
- }
1
+ import type { VxeGanttDefines, VxeGanttTaskType } from '../../../types'
2
+ import type { VxeTableDefines, VxeTablePropTypes } from 'vxe-table'
3
+
4
+ export function getRefElem (refEl: any) {
5
+ if (refEl) {
6
+ return (refEl.$el || refEl) as HTMLElement
7
+ }
8
+ return null
9
+ }
10
+
11
+ export function getCellRestHeight (rowRest: VxeTableDefines.RowCacheItem, cellOpts: VxeTablePropTypes.CellConfig, rowOpts: VxeTablePropTypes.RowConfig, defaultRowHeight: number) {
12
+ return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
13
+ }
14
+
15
+ export function getStandardGapTime (type: VxeGanttDefines.ColumnScaleType) {
16
+ switch (type) {
17
+ case 'hour':
18
+ return 1000 * 60 * 60
19
+ case 'minute':
20
+ return 1000 * 60
21
+ case 'second':
22
+ return 1000
23
+ }
24
+ return 1000 * 60 * 60 * 24
25
+ }
26
+
27
+ export function getTaskBarLeft (chartRest: VxeGanttDefines.RowCacheItem | null, viewCellWidth: number) {
28
+ return chartRest ? viewCellWidth * chartRest.oLeftSize : 0
29
+ }
30
+
31
+ export function getTaskBarWidth (chartRest: VxeGanttDefines.RowCacheItem | null, viewCellWidth: number) {
32
+ return chartRest && chartRest.oWidthSize ? Math.max(1, chartRest ? (Math.floor(viewCellWidth * chartRest.oWidthSize) - 1) : 0) : 0
33
+ }
34
+
35
+ const taskTypeMaps: Record<VxeGanttTaskType, boolean> = {
36
+ milestone: true,
37
+ subview: true
38
+ }
39
+ export function hasMilestoneTask (type: string) {
40
+ return type === 'milestone'
41
+ }
42
+ export function hasSubviewTask (type: string) {
43
+ return type === 'subview'
44
+ }
45
+ export function getTaskType (type: string) {
46
+ return taskTypeMaps[type as VxeGanttTaskType] ? type as VxeGanttTaskType : 'default'
47
+ }
package/packages/index.ts CHANGED
@@ -1,8 +1,8 @@
1
- import * as VxeUIGanttExport from './components'
2
-
3
- export * from './components'
4
-
5
- /**
6
- * A vue based PC component library
7
- */
8
- export default VxeUIGanttExport
1
+ import * as VxeUIGanttExport from './components'
2
+
3
+ export * from './components'
4
+
5
+ /**
6
+ * A vue based PC component library
7
+ */
8
+ export default VxeUIGanttExport
@@ -1,119 +1,119 @@
1
- import { VxeUI } from '@vxe-ui/core'
2
-
3
- const { setConfig, setIcon } = VxeUI
4
-
5
- VxeUI.ganttVersion = process.env.VUE_APP_VXE_VERSION as string
6
-
7
- const ymdFormat = 'yyyy-MM-dd'
8
- const ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss'
9
-
10
- setConfig({
11
- gantt: {
12
- // size: null,
13
- // zoomConfig: {
14
- // escRestore: true
15
- // },
16
- formConfig: {
17
- enabled: true
18
- },
19
- pagerConfig: {
20
- enabled: true
21
- // perfect: false
22
- },
23
- toolbarConfig: {
24
- enabled: true
25
- // perfect: false
26
- },
27
- proxyConfig: {
28
- enabled: true,
29
- autoLoad: true,
30
- showLoading: true,
31
- showResponseMsg: true,
32
- showActionMsg: true,
33
- response: {
34
- list: null,
35
- result: 'result',
36
- total: 'page.total',
37
- message: 'message'
38
- }
39
- // beforeItem: null,
40
- // beforeColumn: null,
41
- // beforeQuery: null,
42
- // afterQuery: null,
43
- // beforeDelete: null,
44
- // afterDelete: null,
45
- // beforeSave: null,
46
- // afterSave: null
47
- },
48
- taskBarTooltipConfig: {
49
- enterable: true
50
- },
51
- taskLinkConfig: {
52
- enabled: true,
53
- isHover: true,
54
- showArrow: true
55
- },
56
- taskViewScaleConfig: {
57
- year: {
58
- valueFormat: ymdFormat
59
- },
60
- quarter: {
61
- valueFormat: ymdFormat
62
- },
63
- month: {
64
- valueFormat: ymdFormat
65
- },
66
- week: {
67
- startDay: 1,
68
- valueFormat: ymdFormat
69
- },
70
- day: {
71
- valueFormat: ymdFormat
72
- },
73
- date: {
74
- valueFormat: ymdFormat
75
- },
76
- hour: {
77
- valueFormat: ymdhmsFormat
78
- },
79
- minute: {
80
- valueFormat: ymdhmsFormat
81
- },
82
- second: {
83
- valueFormat: ymdhmsFormat
84
- }
85
- },
86
- taskViewConfig: {
87
- showNowLine: true,
88
- gridding: {
89
- leftSpacing: 1,
90
- rightSpacing: 1
91
- }
92
- },
93
- taskSplitConfig: {
94
- enabled: true,
95
- resize: true,
96
- showCollapseTableButton: true,
97
- showCollapseTaskButton: true
98
- },
99
- taskBarSubviewConfig: {
100
- // showOverview: false
101
- }
102
- }
103
- })
104
-
105
- const iconPrefix = 'vxe-icon-'
106
-
107
- setIcon({
108
- // gantt
109
- GANTT_VIEW_LEFT_OPEN: iconPrefix + 'arrow-left',
110
- GANTT_VIEW_LEFT_CLOSE: iconPrefix + 'arrow-right',
111
- GANTT_VIEW_RIGHT_OPEN: iconPrefix + 'arrow-right',
112
- GANTT_VIEW_RIGHT_CLOSE: iconPrefix + 'arrow-left',
113
- GANTT_VIEW_TASK_MILESTONE: iconPrefix + 'square-fill rotate45'
114
- })
115
-
116
- export {
117
- VxeUI
118
- }
119
- export default VxeUI
1
+ import { VxeUI } from '@vxe-ui/core'
2
+
3
+ const { setConfig, setIcon } = VxeUI
4
+
5
+ VxeUI.ganttVersion = process.env.VUE_APP_VXE_VERSION as string
6
+
7
+ const ymdFormat = 'yyyy-MM-dd'
8
+ const ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss'
9
+
10
+ setConfig({
11
+ gantt: {
12
+ // size: null,
13
+ // zoomConfig: {
14
+ // escRestore: true
15
+ // },
16
+ formConfig: {
17
+ enabled: true
18
+ },
19
+ pagerConfig: {
20
+ enabled: true
21
+ // perfect: false
22
+ },
23
+ toolbarConfig: {
24
+ enabled: true
25
+ // perfect: false
26
+ },
27
+ proxyConfig: {
28
+ enabled: true,
29
+ autoLoad: true,
30
+ showLoading: true,
31
+ showResponseMsg: true,
32
+ showActionMsg: true,
33
+ response: {
34
+ list: null,
35
+ result: 'result',
36
+ total: 'page.total',
37
+ message: 'message'
38
+ }
39
+ // beforeItem: null,
40
+ // beforeColumn: null,
41
+ // beforeQuery: null,
42
+ // afterQuery: null,
43
+ // beforeDelete: null,
44
+ // afterDelete: null,
45
+ // beforeSave: null,
46
+ // afterSave: null
47
+ },
48
+ taskBarTooltipConfig: {
49
+ enterable: true
50
+ },
51
+ taskLinkConfig: {
52
+ enabled: true,
53
+ isHover: true,
54
+ showArrow: true
55
+ },
56
+ taskViewScaleConfig: {
57
+ year: {
58
+ valueFormat: ymdFormat
59
+ },
60
+ quarter: {
61
+ valueFormat: ymdFormat
62
+ },
63
+ month: {
64
+ valueFormat: ymdFormat
65
+ },
66
+ week: {
67
+ startDay: 1,
68
+ valueFormat: ymdFormat
69
+ },
70
+ day: {
71
+ valueFormat: ymdFormat
72
+ },
73
+ date: {
74
+ valueFormat: ymdFormat
75
+ },
76
+ hour: {
77
+ valueFormat: ymdhmsFormat
78
+ },
79
+ minute: {
80
+ valueFormat: ymdhmsFormat
81
+ },
82
+ second: {
83
+ valueFormat: ymdhmsFormat
84
+ }
85
+ },
86
+ taskViewConfig: {
87
+ showNowLine: true,
88
+ gridding: {
89
+ leftSpacing: 1,
90
+ rightSpacing: 1
91
+ }
92
+ },
93
+ taskSplitConfig: {
94
+ enabled: true,
95
+ resize: true,
96
+ showCollapseTableButton: true,
97
+ showCollapseTaskButton: true
98
+ },
99
+ taskBarSubviewConfig: {
100
+ // showOverview: false
101
+ }
102
+ }
103
+ })
104
+
105
+ const iconPrefix = 'vxe-icon-'
106
+
107
+ setIcon({
108
+ // gantt
109
+ GANTT_VIEW_LEFT_OPEN: iconPrefix + 'arrow-left',
110
+ GANTT_VIEW_LEFT_CLOSE: iconPrefix + 'arrow-right',
111
+ GANTT_VIEW_RIGHT_OPEN: iconPrefix + 'arrow-right',
112
+ GANTT_VIEW_RIGHT_CLOSE: iconPrefix + 'arrow-left',
113
+ GANTT_VIEW_TASK_MILESTONE: iconPrefix + 'square-fill rotate45'
114
+ })
115
+
116
+ export {
117
+ VxeUI
118
+ }
119
+ export default VxeUI
@@ -1,3 +1,3 @@
1
- import Vue from 'vue'
2
-
3
- export const defineVxeComponent = ((options: any) => options) as typeof Vue.extend
1
+ import Vue from 'vue'
2
+
3
+ export const defineVxeComponent = ((options: any) => options) as typeof Vue.extend
@@ -1,14 +1,14 @@
1
- import { VxeUI } from '@vxe-ui/core'
2
- import { errLog } from './log'
3
-
4
- export function checkDependVersion () {
5
- const pVersion = 3
6
- const sVersion = 19
7
- if (VxeUI.checkVersion) {
8
- if (!VxeUI.checkVersion(VxeUI.tableVersion, pVersion, sVersion)) {
9
- errLog('vxe.error.errorVersion', [`vxe-table@${VxeUI.tableVersion || '?'}`, `vxe-table v${pVersion}.${sVersion}+`])
10
- }
11
- } else {
12
- errLog(`Requires vxe-table v${pVersion}.${sVersion}+`)
13
- }
14
- }
1
+ import { VxeUI } from '@vxe-ui/core'
2
+ import { errLog } from './log'
3
+
4
+ export function checkDependVersion () {
5
+ const pVersion = 3
6
+ const sVersion = 19
7
+ if (VxeUI.checkVersion) {
8
+ if (!VxeUI.checkVersion(VxeUI.tableVersion, pVersion, sVersion)) {
9
+ errLog('vxe.error.errorVersion', [`vxe-table@${VxeUI.tableVersion || '?'}`, `vxe-table v${pVersion}.${sVersion}+`])
10
+ }
11
+ } else {
12
+ errLog(`Requires vxe-table v${pVersion}.${sVersion}+`)
13
+ }
14
+ }