@vmscloud/moz-ui-gantt-vue 0.1.0 → 0.3.0
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/dist/index.cjs +31 -2
- package/dist/index.d.ts +99 -12
- package/dist/index.js +31 -2
- package/dist/style.css +1089 -9
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2,14 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const mozUiGanttCore = require("@vmscloud/moz-ui-gantt-core");
|
|
5
|
-
const
|
|
5
|
+
const component = vue.defineComponent({
|
|
6
6
|
name: "MozGantt",
|
|
7
7
|
props: { options: { type: Object, required: true } },
|
|
8
8
|
emits: {
|
|
9
9
|
initialized: (_value) => true,
|
|
10
10
|
search: (_value) => true,
|
|
11
11
|
zoom: (_value) => true,
|
|
12
|
-
taskClick: (_value) => true
|
|
12
|
+
taskClick: (_value) => true,
|
|
13
|
+
taskActivate: (_value) => true,
|
|
14
|
+
taskDoubleClick: (_value) => true,
|
|
15
|
+
milestoneClick: (_value) => true,
|
|
16
|
+
milestoneDoubleClick: (_value) => true,
|
|
17
|
+
rowClick: (_value) => true,
|
|
18
|
+
rowDoubleClick: (_value) => true,
|
|
19
|
+
contextMenu: (_value) => true,
|
|
20
|
+
taskContextMenu: (_value) => true,
|
|
21
|
+
milestoneContextMenu: (_value) => true,
|
|
22
|
+
rowContextMenu: (_value) => true,
|
|
23
|
+
menuAction: (_value) => true,
|
|
24
|
+
selectionChange: (_value) => true,
|
|
25
|
+
dataError: (_value) => true,
|
|
26
|
+
metricError: (_value) => true
|
|
13
27
|
},
|
|
14
28
|
setup(props, { emit, expose }) {
|
|
15
29
|
const host = vue.shallowRef();
|
|
@@ -20,6 +34,20 @@ const MozGantt = vue.defineComponent({
|
|
|
20
34
|
core.on("search", (state) => emit("search", state));
|
|
21
35
|
core.on("zoom", (state) => emit("zoom", state));
|
|
22
36
|
core.on("taskClick", (state) => emit("taskClick", state));
|
|
37
|
+
core.on("taskActivate", (state) => emit("taskActivate", state));
|
|
38
|
+
core.on("taskDoubleClick", (state) => emit("taskDoubleClick", state));
|
|
39
|
+
core.on("milestoneClick", (state) => emit("milestoneClick", state));
|
|
40
|
+
core.on("milestoneDoubleClick", (state) => emit("milestoneDoubleClick", state));
|
|
41
|
+
core.on("rowClick", (state) => emit("rowClick", state));
|
|
42
|
+
core.on("rowDoubleClick", (state) => emit("rowDoubleClick", state));
|
|
43
|
+
core.on("contextMenu", (state) => emit("contextMenu", state));
|
|
44
|
+
core.on("taskContextMenu", (state) => emit("taskContextMenu", state));
|
|
45
|
+
core.on("milestoneContextMenu", (state) => emit("milestoneContextMenu", state));
|
|
46
|
+
core.on("rowContextMenu", (state) => emit("rowContextMenu", state));
|
|
47
|
+
core.on("menuAction", (state) => emit("menuAction", state));
|
|
48
|
+
core.on("selectionChange", (state) => emit("selectionChange", state));
|
|
49
|
+
core.on("dataError", (state) => emit("dataError", state));
|
|
50
|
+
core.on("metricError", (state) => emit("metricError", state));
|
|
23
51
|
emit("initialized", core);
|
|
24
52
|
});
|
|
25
53
|
vue.watch(() => props.options, (options) => core == null ? void 0 : core.update(options));
|
|
@@ -31,4 +59,5 @@ const MozGantt = vue.defineComponent({
|
|
|
31
59
|
return () => vue.h("div", { ref: host, style: { height: "100%", minHeight: "180px" } });
|
|
32
60
|
}
|
|
33
61
|
});
|
|
62
|
+
const MozGantt = component;
|
|
34
63
|
exports.MozGantt = MozGantt;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,45 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { MozGantt as GanttCore,
|
|
1
|
+
import { DefineSetupFnComponent, PropType } from 'vue';
|
|
2
|
+
import { MozGantt as GanttCore, GanttContextMenu, GanttContextMenuItems, GanttOptionsInput, GanttEvents } from '@vmscloud/moz-ui-gantt-core';
|
|
3
3
|
export type * from '@vmscloud/moz-ui-gantt-core';
|
|
4
|
-
export interface MozGanttExposed {
|
|
5
|
-
getGantt(): GanttCore | null;
|
|
4
|
+
export interface MozGanttExposed<Menu extends GanttContextMenu = GanttContextMenuItems> {
|
|
5
|
+
getGantt(): GanttCore<Menu> | null;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
/** Menu는 options.contextMenu에서 추론된다. 함수형 메뉴면 contextMenu/menuAction이 대상 union을 전달한다. */
|
|
8
|
+
export type MozGanttEmits<Menu extends GanttContextMenu = GanttContextMenuItems> = {
|
|
9
|
+
initialized: (value: GanttCore<Menu>) => true;
|
|
10
|
+
} & {
|
|
11
|
+
[K in keyof GanttEvents<Menu>]: (value: GanttEvents<Menu>[K]) => true;
|
|
12
|
+
};
|
|
13
|
+
type Events = GanttEvents<GanttContextMenu>;
|
|
14
|
+
declare const component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
8
15
|
options: {
|
|
9
|
-
type: PropType<
|
|
16
|
+
type: PropType<GanttOptionsInput<GanttContextMenu>>;
|
|
10
17
|
required: true;
|
|
11
18
|
};
|
|
12
19
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
13
20
|
[key: string]: any;
|
|
14
21
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
-
initialized: (_value: GanttCore) => true;
|
|
16
|
-
search: (_value:
|
|
17
|
-
zoom: (_value:
|
|
18
|
-
taskClick: (_value:
|
|
22
|
+
initialized: (_value: GanttCore<GanttContextMenu>) => true;
|
|
23
|
+
search: (_value: Events["search"]) => true;
|
|
24
|
+
zoom: (_value: Events["zoom"]) => true;
|
|
25
|
+
taskClick: (_value: Events["taskClick"]) => true;
|
|
26
|
+
taskActivate: (_value: Events["taskActivate"]) => true;
|
|
27
|
+
taskDoubleClick: (_value: Events["taskDoubleClick"]) => true;
|
|
28
|
+
milestoneClick: (_value: Events["milestoneClick"]) => true;
|
|
29
|
+
milestoneDoubleClick: (_value: Events["milestoneDoubleClick"]) => true;
|
|
30
|
+
rowClick: (_value: Events["rowClick"]) => true;
|
|
31
|
+
rowDoubleClick: (_value: Events["rowDoubleClick"]) => true;
|
|
32
|
+
contextMenu: (_value: Events["contextMenu"]) => true;
|
|
33
|
+
taskContextMenu: (_value: Events["taskContextMenu"]) => true;
|
|
34
|
+
milestoneContextMenu: (_value: Events["milestoneContextMenu"]) => true;
|
|
35
|
+
rowContextMenu: (_value: Events["rowContextMenu"]) => true;
|
|
36
|
+
menuAction: (_value: Events["menuAction"]) => true;
|
|
37
|
+
selectionChange: (_value: Events["selectionChange"]) => true;
|
|
38
|
+
dataError: (_value: Events["dataError"]) => true;
|
|
39
|
+
metricError: (_value: Events["metricError"]) => true;
|
|
19
40
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
41
|
options: {
|
|
21
|
-
type: PropType<
|
|
42
|
+
type: PropType<GanttOptionsInput<GanttContextMenu>>;
|
|
22
43
|
required: true;
|
|
23
44
|
};
|
|
24
45
|
}>> & Readonly<{
|
|
@@ -31,5 +52,71 @@ export declare const MozGantt: import('vue').DefineComponent<import('vue').Extra
|
|
|
31
52
|
row: import('@vmscloud/moz-ui-gantt-core').GanttRow;
|
|
32
53
|
event: MouseEvent;
|
|
33
54
|
}) => any) | undefined;
|
|
34
|
-
|
|
55
|
+
onTaskActivate?: ((_value: {
|
|
56
|
+
id: import('@vmscloud/moz-ui-gantt-core').GanttRowId;
|
|
57
|
+
row: import('@vmscloud/moz-ui-gantt-core').GanttRow;
|
|
58
|
+
source: "pointer" | "keyboard";
|
|
59
|
+
event: MouseEvent | KeyboardEvent;
|
|
60
|
+
}) => any) | undefined;
|
|
61
|
+
onTaskDoubleClick?: ((_value: {
|
|
62
|
+
id: import('@vmscloud/moz-ui-gantt-core').GanttRowId;
|
|
63
|
+
row: import('@vmscloud/moz-ui-gantt-core').GanttRow;
|
|
64
|
+
event: MouseEvent;
|
|
65
|
+
}) => any) | undefined;
|
|
66
|
+
onMilestoneClick?: ((_value: {
|
|
67
|
+
id: import('@vmscloud/moz-ui-gantt-core').GanttRowId;
|
|
68
|
+
row: import('@vmscloud/moz-ui-gantt-core').GanttRow;
|
|
69
|
+
event: MouseEvent | KeyboardEvent;
|
|
70
|
+
}) => any) | undefined;
|
|
71
|
+
onMilestoneDoubleClick?: ((_value: {
|
|
72
|
+
id: import('@vmscloud/moz-ui-gantt-core').GanttRowId;
|
|
73
|
+
row: import('@vmscloud/moz-ui-gantt-core').GanttRow;
|
|
74
|
+
event: MouseEvent;
|
|
75
|
+
}) => any) | undefined;
|
|
76
|
+
onRowClick?: ((_value: {
|
|
77
|
+
field: string;
|
|
78
|
+
rowPath: readonly unknown[];
|
|
79
|
+
ids: readonly import('@vmscloud/moz-ui-gantt-core').GanttRowId[];
|
|
80
|
+
event: MouseEvent | KeyboardEvent;
|
|
81
|
+
}) => any) | undefined;
|
|
82
|
+
onRowDoubleClick?: ((_value: {
|
|
83
|
+
field: string;
|
|
84
|
+
rowPath: readonly unknown[];
|
|
85
|
+
ids: readonly import('@vmscloud/moz-ui-gantt-core').GanttRowId[];
|
|
86
|
+
event: MouseEvent | KeyboardEvent;
|
|
87
|
+
}) => any) | undefined;
|
|
88
|
+
onTaskContextMenu?: ((_value: {
|
|
89
|
+
id: import('@vmscloud/moz-ui-gantt-core').GanttRowId;
|
|
90
|
+
row: import('@vmscloud/moz-ui-gantt-core').GanttRow;
|
|
91
|
+
event: MouseEvent | KeyboardEvent;
|
|
92
|
+
}) => any) | undefined;
|
|
93
|
+
onMilestoneContextMenu?: ((_value: {
|
|
94
|
+
id: import('@vmscloud/moz-ui-gantt-core').GanttRowId;
|
|
95
|
+
row: import('@vmscloud/moz-ui-gantt-core').GanttRow;
|
|
96
|
+
event: MouseEvent | KeyboardEvent;
|
|
97
|
+
}) => any) | undefined;
|
|
98
|
+
onRowContextMenu?: ((_value: {
|
|
99
|
+
field: string;
|
|
100
|
+
rowPath: readonly unknown[];
|
|
101
|
+
ids: readonly import('@vmscloud/moz-ui-gantt-core').GanttRowId[];
|
|
102
|
+
event: MouseEvent | KeyboardEvent;
|
|
103
|
+
}) => any) | undefined;
|
|
104
|
+
onContextMenu?: ((_value: import('@vmscloud/moz-ui-gantt-core').GanttMenuTarget & {
|
|
105
|
+
event: MouseEvent | KeyboardEvent;
|
|
106
|
+
}) => any) | undefined;
|
|
107
|
+
onMenuAction?: ((_value: import('@vmscloud/moz-ui-gantt-core').GanttMenuTarget & {
|
|
108
|
+
action: string;
|
|
109
|
+
event: MouseEvent | KeyboardEvent;
|
|
110
|
+
}) => any) | undefined;
|
|
111
|
+
onSelectionChange?: ((_value: import('@vmscloud/moz-ui-gantt-core').GanttSelectionChange) => any) | undefined;
|
|
112
|
+
onDataError?: ((_value: {
|
|
113
|
+
error: unknown;
|
|
114
|
+
}) => any) | undefined;
|
|
115
|
+
onMetricError?: ((_value: import('@vmscloud/moz-ui-gantt-core').GanttMetricError) => any) | undefined;
|
|
116
|
+
onInitialized?: ((_value: GanttCore<GanttContextMenu>) => any) | undefined;
|
|
35
117
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
118
|
+
type MozGanttDefinition<Menu extends GanttContextMenu> = DefineSetupFnComponent<{
|
|
119
|
+
options: GanttOptionsInput<Menu>;
|
|
120
|
+
}, MozGanttEmits<Menu>>;
|
|
121
|
+
/** 런타임은 위 컴포넌트 그대로다. 템플릿 타입만 options.contextMenu에서 Menu를 추론해 이벤트 payload를 정한다. */
|
|
122
|
+
export declare const MozGantt: Omit<typeof component, never> & (new <Menu extends GanttContextMenu = GanttContextMenuItems>(...args: ConstructorParameters<MozGanttDefinition<Menu>>) => InstanceType<MozGanttDefinition<Menu>>);
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { defineComponent, shallowRef, onMounted, watch, onBeforeUnmount, h } from "vue";
|
|
2
2
|
import { MozGantt as MozGantt$1 } from "@vmscloud/moz-ui-gantt-core";
|
|
3
|
-
const
|
|
3
|
+
const component = defineComponent({
|
|
4
4
|
name: "MozGantt",
|
|
5
5
|
props: { options: { type: Object, required: true } },
|
|
6
6
|
emits: {
|
|
7
7
|
initialized: (_value) => true,
|
|
8
8
|
search: (_value) => true,
|
|
9
9
|
zoom: (_value) => true,
|
|
10
|
-
taskClick: (_value) => true
|
|
10
|
+
taskClick: (_value) => true,
|
|
11
|
+
taskActivate: (_value) => true,
|
|
12
|
+
taskDoubleClick: (_value) => true,
|
|
13
|
+
milestoneClick: (_value) => true,
|
|
14
|
+
milestoneDoubleClick: (_value) => true,
|
|
15
|
+
rowClick: (_value) => true,
|
|
16
|
+
rowDoubleClick: (_value) => true,
|
|
17
|
+
contextMenu: (_value) => true,
|
|
18
|
+
taskContextMenu: (_value) => true,
|
|
19
|
+
milestoneContextMenu: (_value) => true,
|
|
20
|
+
rowContextMenu: (_value) => true,
|
|
21
|
+
menuAction: (_value) => true,
|
|
22
|
+
selectionChange: (_value) => true,
|
|
23
|
+
dataError: (_value) => true,
|
|
24
|
+
metricError: (_value) => true
|
|
11
25
|
},
|
|
12
26
|
setup(props, { emit, expose }) {
|
|
13
27
|
const host = shallowRef();
|
|
@@ -18,6 +32,20 @@ const MozGantt = defineComponent({
|
|
|
18
32
|
core.on("search", (state) => emit("search", state));
|
|
19
33
|
core.on("zoom", (state) => emit("zoom", state));
|
|
20
34
|
core.on("taskClick", (state) => emit("taskClick", state));
|
|
35
|
+
core.on("taskActivate", (state) => emit("taskActivate", state));
|
|
36
|
+
core.on("taskDoubleClick", (state) => emit("taskDoubleClick", state));
|
|
37
|
+
core.on("milestoneClick", (state) => emit("milestoneClick", state));
|
|
38
|
+
core.on("milestoneDoubleClick", (state) => emit("milestoneDoubleClick", state));
|
|
39
|
+
core.on("rowClick", (state) => emit("rowClick", state));
|
|
40
|
+
core.on("rowDoubleClick", (state) => emit("rowDoubleClick", state));
|
|
41
|
+
core.on("contextMenu", (state) => emit("contextMenu", state));
|
|
42
|
+
core.on("taskContextMenu", (state) => emit("taskContextMenu", state));
|
|
43
|
+
core.on("milestoneContextMenu", (state) => emit("milestoneContextMenu", state));
|
|
44
|
+
core.on("rowContextMenu", (state) => emit("rowContextMenu", state));
|
|
45
|
+
core.on("menuAction", (state) => emit("menuAction", state));
|
|
46
|
+
core.on("selectionChange", (state) => emit("selectionChange", state));
|
|
47
|
+
core.on("dataError", (state) => emit("dataError", state));
|
|
48
|
+
core.on("metricError", (state) => emit("metricError", state));
|
|
21
49
|
emit("initialized", core);
|
|
22
50
|
});
|
|
23
51
|
watch(() => props.options, (options) => core == null ? void 0 : core.update(options));
|
|
@@ -29,6 +57,7 @@ const MozGantt = defineComponent({
|
|
|
29
57
|
return () => h("div", { ref: host, style: { height: "100%", minHeight: "180px" } });
|
|
30
58
|
}
|
|
31
59
|
});
|
|
60
|
+
const MozGantt = component;
|
|
32
61
|
export {
|
|
33
62
|
MozGantt
|
|
34
63
|
};
|