@katlux/toolkit 0.1.1-alpha.130 → 0.1.1-alpha.131
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/bin/add-ai-reference.mjs +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +1 -1
- package/dist/runtime/components/KGantt/KGantt.global.d.vue.ts +8 -0
- package/dist/runtime/components/KGantt/KGantt.global.vue +15 -1
- package/dist/runtime/components/KGantt/KGantt.global.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.d.vue.ts +20 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +26 -1
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue.d.ts +20 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.d.vue.ts +60 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +23 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue.d.ts +60 -0
- package/dist/skills/KATLUX_INDEX.md +1 -0
- package/dist/skills/katlux-components/components/KGantt.md +59 -0
- package/dist/skills/katlux-config/SKILL.md +1 -1
- package/package.json +3 -3
package/bin/add-ai-reference.mjs
CHANGED
|
@@ -53,7 +53,7 @@ function copyDirRecursive(src, dest) {
|
|
|
53
53
|
const destPath = join(dest, entry.name)
|
|
54
54
|
if (entry.isDirectory()) {
|
|
55
55
|
count += copyDirRecursive(srcPath, destPath)
|
|
56
|
-
} else if (entry.name.endsWith('.md')
|
|
56
|
+
} else if (entry.name.endsWith('.md')) {
|
|
57
57
|
writeFileSync(destPath, readFileSync(srcPath, 'utf-8'), 'utf-8')
|
|
58
58
|
count++
|
|
59
59
|
}
|
package/dist/module.json
CHANGED
|
@@ -55,7 +55,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
55
55
|
onClick?: (() => any) | undefined;
|
|
56
56
|
}>, {
|
|
57
57
|
size: "small" | "large" | "medium" | undefined;
|
|
58
|
-
type: "default" | "
|
|
58
|
+
type: "default" | "info" | "success" | "warning" | "danger" | "primary" | "light" | "dark" | undefined;
|
|
59
59
|
iconOnly: boolean;
|
|
60
60
|
disabled: boolean;
|
|
61
61
|
href: string;
|
|
@@ -55,7 +55,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
55
55
|
onClick?: (() => any) | undefined;
|
|
56
56
|
}>, {
|
|
57
57
|
size: "small" | "large" | "medium" | undefined;
|
|
58
|
-
type: "default" | "
|
|
58
|
+
type: "default" | "info" | "success" | "warning" | "danger" | "primary" | "light" | "dark" | undefined;
|
|
59
59
|
iconOnly: boolean;
|
|
60
60
|
disabled: boolean;
|
|
61
61
|
href: string;
|
|
@@ -23,7 +23,7 @@ export interface KButtonEmits {
|
|
|
23
23
|
export declare function useKButtonLogic(props: KButtonProps, emit: KButtonEmits): {
|
|
24
24
|
isLink: import("vue").ComputedRef<boolean>;
|
|
25
25
|
isDisabled: import("vue").ComputedRef<boolean | undefined>;
|
|
26
|
-
buttonClasses: import("vue").ComputedRef<("small" | "default" | "
|
|
26
|
+
buttonClasses: import("vue").ComputedRef<("small" | "default" | "info" | "success" | "warning" | "danger" | "primary" | "light" | "dark" | "large" | "medium" | {
|
|
27
27
|
disabled: boolean | undefined;
|
|
28
28
|
'icon-only': boolean | undefined;
|
|
29
29
|
})[]>;
|
|
@@ -66,8 +66,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
66
66
|
teleportTo: string;
|
|
67
67
|
fullWidth: boolean;
|
|
68
68
|
maxHeight: number;
|
|
69
|
-
align: import("./KDropdown.logic.js").KDropdownAlign;
|
|
70
69
|
anchorEl: HTMLElement;
|
|
70
|
+
align: import("./KDropdown.logic.js").KDropdownAlign;
|
|
71
71
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
72
72
|
declare const _default: typeof __VLS_export;
|
|
73
73
|
export default _default;
|
|
@@ -66,8 +66,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
66
66
|
teleportTo: string;
|
|
67
67
|
fullWidth: boolean;
|
|
68
68
|
maxHeight: number;
|
|
69
|
-
align: import("./KDropdown.logic.js").KDropdownAlign;
|
|
70
69
|
anchorEl: HTMLElement;
|
|
70
|
+
align: import("./KDropdown.logic.js").KDropdownAlign;
|
|
71
71
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
72
72
|
declare const _default: typeof __VLS_export;
|
|
73
73
|
export default _default;
|
|
@@ -89,6 +89,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
89
89
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
90
90
|
"update:selectedRows": (...args: any[]) => void;
|
|
91
91
|
"update:selectAll": (...args: any[]) => void;
|
|
92
|
+
"task-click": (...args: any[]) => void;
|
|
93
|
+
"task-dblclick": (...args: any[]) => void;
|
|
94
|
+
"task-contextmenu": (...args: any[]) => void;
|
|
95
|
+
"task-rightclick": (...args: any[]) => void;
|
|
92
96
|
"update:task": (...args: any[]) => void;
|
|
93
97
|
"update:startingPoint": (...args: any[]) => void;
|
|
94
98
|
"update:endingPoint": (...args: any[]) => void;
|
|
@@ -180,6 +184,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
180
184
|
}>> & Readonly<{
|
|
181
185
|
"onUpdate:selectedRows"?: ((...args: any[]) => any) | undefined;
|
|
182
186
|
"onUpdate:selectAll"?: ((...args: any[]) => any) | undefined;
|
|
187
|
+
"onTask-click"?: ((...args: any[]) => any) | undefined;
|
|
188
|
+
"onTask-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
189
|
+
"onTask-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
190
|
+
"onTask-rightclick"?: ((...args: any[]) => any) | undefined;
|
|
183
191
|
"onUpdate:task"?: ((...args: any[]) => any) | undefined;
|
|
184
192
|
"onUpdate:startingPoint"?: ((...args: any[]) => any) | undefined;
|
|
185
193
|
"onUpdate:endingPoint"?: ((...args: any[]) => any) | undefined;
|
|
@@ -15,7 +15,17 @@ const {
|
|
|
15
15
|
selectedRows,
|
|
16
16
|
selectAll
|
|
17
17
|
} = useKGanttLogic(props);
|
|
18
|
-
const emit = defineEmits([
|
|
18
|
+
const emit = defineEmits([
|
|
19
|
+
"update:startingPoint",
|
|
20
|
+
"update:endingPoint",
|
|
21
|
+
"update:task",
|
|
22
|
+
"update:selectedRows",
|
|
23
|
+
"update:selectAll",
|
|
24
|
+
"task-click",
|
|
25
|
+
"task-dblclick",
|
|
26
|
+
"task-contextmenu",
|
|
27
|
+
"task-rightclick"
|
|
28
|
+
]);
|
|
19
29
|
const moveTime = (amount) => {
|
|
20
30
|
const result = moveTimeLogic(amount, props.startingPoint, props.endingPoint);
|
|
21
31
|
if (result) {
|
|
@@ -73,5 +83,9 @@ component(
|
|
|
73
83
|
@update:task="$emit('update:task', $event)"
|
|
74
84
|
@update:selectedRows="$emit('update:selectedRows', $event)"
|
|
75
85
|
@update:selectAll="$emit('update:selectAll', $event)"
|
|
86
|
+
@task-click="$emit('task-click', $event)"
|
|
87
|
+
@task-dblclick="$emit('task-dblclick', $event)"
|
|
88
|
+
@task-contextmenu="$emit('task-contextmenu', $event)"
|
|
89
|
+
@task-rightclick="$emit('task-rightclick', $event)"
|
|
76
90
|
)
|
|
77
91
|
</template>
|
|
@@ -89,6 +89,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
89
89
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
90
90
|
"update:selectedRows": (...args: any[]) => void;
|
|
91
91
|
"update:selectAll": (...args: any[]) => void;
|
|
92
|
+
"task-click": (...args: any[]) => void;
|
|
93
|
+
"task-dblclick": (...args: any[]) => void;
|
|
94
|
+
"task-contextmenu": (...args: any[]) => void;
|
|
95
|
+
"task-rightclick": (...args: any[]) => void;
|
|
92
96
|
"update:task": (...args: any[]) => void;
|
|
93
97
|
"update:startingPoint": (...args: any[]) => void;
|
|
94
98
|
"update:endingPoint": (...args: any[]) => void;
|
|
@@ -180,6 +184,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
180
184
|
}>> & Readonly<{
|
|
181
185
|
"onUpdate:selectedRows"?: ((...args: any[]) => any) | undefined;
|
|
182
186
|
"onUpdate:selectAll"?: ((...args: any[]) => any) | undefined;
|
|
187
|
+
"onTask-click"?: ((...args: any[]) => any) | undefined;
|
|
188
|
+
"onTask-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
189
|
+
"onTask-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
190
|
+
"onTask-rightclick"?: ((...args: any[]) => any) | undefined;
|
|
183
191
|
"onUpdate:task"?: ((...args: any[]) => any) | undefined;
|
|
184
192
|
"onUpdate:startingPoint"?: ((...args: any[]) => any) | undefined;
|
|
185
193
|
"onUpdate:endingPoint"?: ((...args: any[]) => any) | undefined;
|
|
@@ -35,6 +35,16 @@ type __VLS_Props = {
|
|
|
35
35
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
36
36
|
"update:selectedRows": (value: any[]) => any;
|
|
37
37
|
"update:selectAll": (value: boolean) => any;
|
|
38
|
+
"task-click": (payload: {
|
|
39
|
+
task: IGanttTask;
|
|
40
|
+
row: any;
|
|
41
|
+
}) => any;
|
|
42
|
+
"task-dblclick": (payload: {
|
|
43
|
+
task: IGanttTask;
|
|
44
|
+
row: any;
|
|
45
|
+
}) => any;
|
|
46
|
+
"task-contextmenu": (payload: any) => any;
|
|
47
|
+
"task-rightclick": (payload: any) => any;
|
|
38
48
|
"update:task": (payload: {
|
|
39
49
|
task: IGanttTask;
|
|
40
50
|
sourceRow: any;
|
|
@@ -43,6 +53,16 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
43
53
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
44
54
|
"onUpdate:selectedRows"?: ((value: any[]) => any) | undefined;
|
|
45
55
|
"onUpdate:selectAll"?: ((value: boolean) => any) | undefined;
|
|
56
|
+
"onTask-click"?: ((payload: {
|
|
57
|
+
task: IGanttTask;
|
|
58
|
+
row: any;
|
|
59
|
+
}) => any) | undefined;
|
|
60
|
+
"onTask-dblclick"?: ((payload: {
|
|
61
|
+
task: IGanttTask;
|
|
62
|
+
row: any;
|
|
63
|
+
}) => any) | undefined;
|
|
64
|
+
"onTask-contextmenu"?: ((payload: any) => any) | undefined;
|
|
65
|
+
"onTask-rightclick"?: ((payload: any) => any) | undefined;
|
|
46
66
|
"onUpdate:task"?: ((payload: {
|
|
47
67
|
task: IGanttTask;
|
|
48
68
|
sourceRow: any;
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
:activeDrag="activeDragState && activeDragState.sourceRowId === row?.id ? activeDragState : null"
|
|
55
55
|
@task-dragstart="onTaskDragStart($event, row)"
|
|
56
56
|
@cell-mouseenter="onCellMouseEnter($event, row)"
|
|
57
|
+
@task-click="onTaskClick"
|
|
58
|
+
@task-dblclick="$emit('task-dblclick', $event)"
|
|
59
|
+
@task-contextmenu="$emit('task-contextmenu', $event)"
|
|
60
|
+
@task-rightclick="$emit('task-rightclick', $event)"
|
|
57
61
|
)
|
|
58
62
|
</template>
|
|
59
63
|
|
|
@@ -105,6 +109,10 @@ const emit = defineEmits<{
|
|
|
105
109
|
(e: 'update:task', payload: { task: IGanttTask; sourceRow: any; targetRow?: any }): void
|
|
106
110
|
(e: 'update:selectedRows', value: any[]): void
|
|
107
111
|
(e: 'update:selectAll', value: boolean): void
|
|
112
|
+
(e: 'task-click', payload: { task: IGanttTask; row: any }): void
|
|
113
|
+
(e: 'task-dblclick', payload: { task: IGanttTask; row: any }): void
|
|
114
|
+
(e: 'task-contextmenu', payload: any): void
|
|
115
|
+
(e: 'task-rightclick', payload: any): void
|
|
108
116
|
}>()
|
|
109
117
|
|
|
110
118
|
// ── Drag state (owned here so all rows can share it) ─────────────
|
|
@@ -187,10 +195,18 @@ const onWheel = (e: WheelEvent) => {
|
|
|
187
195
|
// Let normal scroll through for vertical scrolling
|
|
188
196
|
}
|
|
189
197
|
|
|
198
|
+
let wasDragging = false
|
|
199
|
+
|
|
200
|
+
const onTaskClick = (payload: { task: IGanttTask; row: any }) => {
|
|
201
|
+
if (wasDragging) return
|
|
202
|
+
emit('task-click', payload)
|
|
203
|
+
}
|
|
204
|
+
|
|
190
205
|
const onTaskDragStart = (
|
|
191
206
|
{ event, task, rowId, mode, wrapperEl }: { event: MouseEvent; task: IGanttTask; rowId: any; mode: string; wrapperEl: HTMLElement | null },
|
|
192
207
|
row: any
|
|
193
208
|
) => {
|
|
209
|
+
wasDragging = false
|
|
194
210
|
if (!props.editable) { return }
|
|
195
211
|
event.preventDefault()
|
|
196
212
|
|
|
@@ -233,8 +249,11 @@ const onMouseMove = (e: MouseEvent) => {
|
|
|
233
249
|
if (!activeDragState.value) return
|
|
234
250
|
|
|
235
251
|
const state = activeDragState.value
|
|
236
|
-
const msPerPx = (props.globalDateRange.end - props.globalDateRange.start) / state.wrapperWidth
|
|
237
252
|
const deltaX = e.clientX - state.startX
|
|
253
|
+
if (Math.abs(deltaX) > 4) {
|
|
254
|
+
wasDragging = true
|
|
255
|
+
}
|
|
256
|
+
const msPerPx = (props.globalDateRange.end - props.globalDateRange.start) / state.wrapperWidth
|
|
238
257
|
const deltaMs = deltaX * msPerPx
|
|
239
258
|
const snapMs = getSnapMs(props.snapTo || 'day')
|
|
240
259
|
|
|
@@ -261,6 +280,12 @@ const onMouseUp = () => {
|
|
|
261
280
|
window.removeEventListener('mousemove', onMouseMove)
|
|
262
281
|
window.removeEventListener('mouseup', onMouseUp)
|
|
263
282
|
|
|
283
|
+
if (wasDragging) {
|
|
284
|
+
setTimeout(() => {
|
|
285
|
+
wasDragging = false
|
|
286
|
+
}, 60)
|
|
287
|
+
}
|
|
288
|
+
|
|
264
289
|
if (!activeDragState.value) { console.warn('[KGantt] onMouseUp: no activeDragState'); return }
|
|
265
290
|
|
|
266
291
|
const state = activeDragState.value
|
|
@@ -35,6 +35,16 @@ type __VLS_Props = {
|
|
|
35
35
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
36
36
|
"update:selectedRows": (value: any[]) => any;
|
|
37
37
|
"update:selectAll": (value: boolean) => any;
|
|
38
|
+
"task-click": (payload: {
|
|
39
|
+
task: IGanttTask;
|
|
40
|
+
row: any;
|
|
41
|
+
}) => any;
|
|
42
|
+
"task-dblclick": (payload: {
|
|
43
|
+
task: IGanttTask;
|
|
44
|
+
row: any;
|
|
45
|
+
}) => any;
|
|
46
|
+
"task-contextmenu": (payload: any) => any;
|
|
47
|
+
"task-rightclick": (payload: any) => any;
|
|
38
48
|
"update:task": (payload: {
|
|
39
49
|
task: IGanttTask;
|
|
40
50
|
sourceRow: any;
|
|
@@ -43,6 +53,16 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
43
53
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
44
54
|
"onUpdate:selectedRows"?: ((value: any[]) => any) | undefined;
|
|
45
55
|
"onUpdate:selectAll"?: ((value: boolean) => any) | undefined;
|
|
56
|
+
"onTask-click"?: ((payload: {
|
|
57
|
+
task: IGanttTask;
|
|
58
|
+
row: any;
|
|
59
|
+
}) => any) | undefined;
|
|
60
|
+
"onTask-dblclick"?: ((payload: {
|
|
61
|
+
task: IGanttTask;
|
|
62
|
+
row: any;
|
|
63
|
+
}) => any) | undefined;
|
|
64
|
+
"onTask-contextmenu"?: ((payload: any) => any) | undefined;
|
|
65
|
+
"onTask-rightclick"?: ((payload: any) => any) | undefined;
|
|
46
66
|
"onUpdate:task"?: ((payload: {
|
|
47
67
|
task: IGanttTask;
|
|
48
68
|
sourceRow: any;
|
|
@@ -27,6 +27,36 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
27
27
|
wrapperEl: HTMLElement | null;
|
|
28
28
|
}) => any;
|
|
29
29
|
"cell-mouseenter": (rowId: any) => any;
|
|
30
|
+
"task-click": (payload: {
|
|
31
|
+
task: IGanttTask;
|
|
32
|
+
row: any;
|
|
33
|
+
}) => any;
|
|
34
|
+
"task-dblclick": (payload: {
|
|
35
|
+
task: IGanttTask;
|
|
36
|
+
row: any;
|
|
37
|
+
}) => any;
|
|
38
|
+
"task-contextmenu": (payload: {
|
|
39
|
+
event: MouseEvent;
|
|
40
|
+
task: IGanttTask;
|
|
41
|
+
row: any;
|
|
42
|
+
ctrlKey: boolean;
|
|
43
|
+
shiftKey: boolean;
|
|
44
|
+
altKey: boolean;
|
|
45
|
+
metaKey: boolean;
|
|
46
|
+
clientX: number;
|
|
47
|
+
clientY: number;
|
|
48
|
+
}) => any;
|
|
49
|
+
"task-rightclick": (payload: {
|
|
50
|
+
event: MouseEvent;
|
|
51
|
+
task: IGanttTask;
|
|
52
|
+
row: any;
|
|
53
|
+
ctrlKey: boolean;
|
|
54
|
+
shiftKey: boolean;
|
|
55
|
+
altKey: boolean;
|
|
56
|
+
metaKey: boolean;
|
|
57
|
+
clientX: number;
|
|
58
|
+
clientY: number;
|
|
59
|
+
}) => any;
|
|
30
60
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
61
|
"onTask-dragstart"?: ((payload: {
|
|
32
62
|
event: MouseEvent;
|
|
@@ -36,6 +66,36 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
36
66
|
wrapperEl: HTMLElement | null;
|
|
37
67
|
}) => any) | undefined;
|
|
38
68
|
"onCell-mouseenter"?: ((rowId: any) => any) | undefined;
|
|
69
|
+
"onTask-click"?: ((payload: {
|
|
70
|
+
task: IGanttTask;
|
|
71
|
+
row: any;
|
|
72
|
+
}) => any) | undefined;
|
|
73
|
+
"onTask-dblclick"?: ((payload: {
|
|
74
|
+
task: IGanttTask;
|
|
75
|
+
row: any;
|
|
76
|
+
}) => any) | undefined;
|
|
77
|
+
"onTask-contextmenu"?: ((payload: {
|
|
78
|
+
event: MouseEvent;
|
|
79
|
+
task: IGanttTask;
|
|
80
|
+
row: any;
|
|
81
|
+
ctrlKey: boolean;
|
|
82
|
+
shiftKey: boolean;
|
|
83
|
+
altKey: boolean;
|
|
84
|
+
metaKey: boolean;
|
|
85
|
+
clientX: number;
|
|
86
|
+
clientY: number;
|
|
87
|
+
}) => any) | undefined;
|
|
88
|
+
"onTask-rightclick"?: ((payload: {
|
|
89
|
+
event: MouseEvent;
|
|
90
|
+
task: IGanttTask;
|
|
91
|
+
row: any;
|
|
92
|
+
ctrlKey: boolean;
|
|
93
|
+
shiftKey: boolean;
|
|
94
|
+
altKey: boolean;
|
|
95
|
+
metaKey: boolean;
|
|
96
|
+
clientX: number;
|
|
97
|
+
clientY: number;
|
|
98
|
+
}) => any) | undefined;
|
|
39
99
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
100
|
declare const _default: typeof __VLS_export;
|
|
41
101
|
export default _default;
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
:title="task[titleField] || ''"
|
|
19
19
|
:class="[{ 'is-dragging': isDraggingThisTask(task.id) }, 'gantt-bar--' + getTaskAppearance(task)]"
|
|
20
20
|
@mousedown="editable ? $emit('task-dragstart', { event: $event, task, rowId: row?.id, mode: 'move', wrapperEl: wrapperRef }) : null"
|
|
21
|
+
@click.stop="$emit('task-click', { task, row })"
|
|
22
|
+
@dblclick.stop="$emit('task-dblclick', { task, row })"
|
|
23
|
+
@contextmenu.stop="onContextMenu($event, task)"
|
|
21
24
|
)
|
|
22
25
|
.gantt-resize-handle.left(
|
|
23
26
|
v-if="editable"
|
|
@@ -58,8 +61,28 @@ const props = defineProps<{
|
|
|
58
61
|
const emit = defineEmits<{
|
|
59
62
|
(e: 'task-dragstart', payload: { event: MouseEvent; task: IGanttTask; rowId: any; mode: string; wrapperEl: HTMLElement | null }): void
|
|
60
63
|
(e: 'cell-mouseenter', rowId: any): void
|
|
64
|
+
(e: 'task-click', payload: { task: IGanttTask; row: any }): void
|
|
65
|
+
(e: 'task-dblclick', payload: { task: IGanttTask; row: any }): void
|
|
66
|
+
(e: 'task-contextmenu', payload: { event: MouseEvent; task: IGanttTask; row: any; ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean; clientX: number; clientY: number }): void
|
|
67
|
+
(e: 'task-rightclick', payload: { event: MouseEvent; task: IGanttTask; row: any; ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean; clientX: number; clientY: number }): void
|
|
61
68
|
}>()
|
|
62
69
|
|
|
70
|
+
const onContextMenu = (event: MouseEvent, task: IGanttTask) => {
|
|
71
|
+
const payload = {
|
|
72
|
+
event,
|
|
73
|
+
task,
|
|
74
|
+
row: props.row,
|
|
75
|
+
ctrlKey: event.ctrlKey,
|
|
76
|
+
shiftKey: event.shiftKey,
|
|
77
|
+
altKey: event.altKey,
|
|
78
|
+
metaKey: event.metaKey,
|
|
79
|
+
clientX: event.clientX,
|
|
80
|
+
clientY: event.clientY
|
|
81
|
+
}
|
|
82
|
+
emit('task-contextmenu', payload)
|
|
83
|
+
emit('task-rightclick', payload)
|
|
84
|
+
}
|
|
85
|
+
|
|
63
86
|
const wrapperRef = ref<HTMLElement | null>(null)
|
|
64
87
|
|
|
65
88
|
const onCellMouseEnter = () => {
|
|
@@ -27,6 +27,36 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
27
27
|
wrapperEl: HTMLElement | null;
|
|
28
28
|
}) => any;
|
|
29
29
|
"cell-mouseenter": (rowId: any) => any;
|
|
30
|
+
"task-click": (payload: {
|
|
31
|
+
task: IGanttTask;
|
|
32
|
+
row: any;
|
|
33
|
+
}) => any;
|
|
34
|
+
"task-dblclick": (payload: {
|
|
35
|
+
task: IGanttTask;
|
|
36
|
+
row: any;
|
|
37
|
+
}) => any;
|
|
38
|
+
"task-contextmenu": (payload: {
|
|
39
|
+
event: MouseEvent;
|
|
40
|
+
task: IGanttTask;
|
|
41
|
+
row: any;
|
|
42
|
+
ctrlKey: boolean;
|
|
43
|
+
shiftKey: boolean;
|
|
44
|
+
altKey: boolean;
|
|
45
|
+
metaKey: boolean;
|
|
46
|
+
clientX: number;
|
|
47
|
+
clientY: number;
|
|
48
|
+
}) => any;
|
|
49
|
+
"task-rightclick": (payload: {
|
|
50
|
+
event: MouseEvent;
|
|
51
|
+
task: IGanttTask;
|
|
52
|
+
row: any;
|
|
53
|
+
ctrlKey: boolean;
|
|
54
|
+
shiftKey: boolean;
|
|
55
|
+
altKey: boolean;
|
|
56
|
+
metaKey: boolean;
|
|
57
|
+
clientX: number;
|
|
58
|
+
clientY: number;
|
|
59
|
+
}) => any;
|
|
30
60
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
61
|
"onTask-dragstart"?: ((payload: {
|
|
32
62
|
event: MouseEvent;
|
|
@@ -36,6 +66,36 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
36
66
|
wrapperEl: HTMLElement | null;
|
|
37
67
|
}) => any) | undefined;
|
|
38
68
|
"onCell-mouseenter"?: ((rowId: any) => any) | undefined;
|
|
69
|
+
"onTask-click"?: ((payload: {
|
|
70
|
+
task: IGanttTask;
|
|
71
|
+
row: any;
|
|
72
|
+
}) => any) | undefined;
|
|
73
|
+
"onTask-dblclick"?: ((payload: {
|
|
74
|
+
task: IGanttTask;
|
|
75
|
+
row: any;
|
|
76
|
+
}) => any) | undefined;
|
|
77
|
+
"onTask-contextmenu"?: ((payload: {
|
|
78
|
+
event: MouseEvent;
|
|
79
|
+
task: IGanttTask;
|
|
80
|
+
row: any;
|
|
81
|
+
ctrlKey: boolean;
|
|
82
|
+
shiftKey: boolean;
|
|
83
|
+
altKey: boolean;
|
|
84
|
+
metaKey: boolean;
|
|
85
|
+
clientX: number;
|
|
86
|
+
clientY: number;
|
|
87
|
+
}) => any) | undefined;
|
|
88
|
+
"onTask-rightclick"?: ((payload: {
|
|
89
|
+
event: MouseEvent;
|
|
90
|
+
task: IGanttTask;
|
|
91
|
+
row: any;
|
|
92
|
+
ctrlKey: boolean;
|
|
93
|
+
shiftKey: boolean;
|
|
94
|
+
altKey: boolean;
|
|
95
|
+
metaKey: boolean;
|
|
96
|
+
clientX: number;
|
|
97
|
+
clientY: number;
|
|
98
|
+
}) => any) | undefined;
|
|
39
99
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
100
|
declare const _default: typeof __VLS_export;
|
|
41
101
|
export default _default;
|
|
@@ -38,3 +38,4 @@ If the Katlux MCP server is unavailable in the environment, or when deep archite
|
|
|
38
38
|
2. **Icon & Token Lookup**: Use `katlux_list_icons` to verify icon names and `katlux_get_tokens` for theme variables instead of guessing or hardcoding styles.
|
|
39
39
|
3. **Self-Validation**: Run `katlux_validate_code` on newly generated Pug/Vue templates to self-correct issues before delivering code.
|
|
40
40
|
4. **Atomic Skills**: Component and Provider skills are divided into atomic, per-component and per-provider markdown files under `components/` and `providers/`. Read only the specific atomic spec required for your task to preserve tokens.
|
|
41
|
+
5. **Never Inspect node_modules**: Never search or open files in `node_modules/@katlux/*` or `node_modules/`. All component APIs, props, slots, events, providers, and types are documented in Katlux MCP tools and atomic skill files.
|
|
@@ -26,3 +26,62 @@
|
|
|
26
26
|
| `itemHeight` | `number` | `40` | Fixed height in px for each resource row |
|
|
27
27
|
| `viewportHeight` | `number` | `500` | Height in px of the scrollable viewport |
|
|
28
28
|
| `buffer` | `number` | `5` | Number of off-screen buffer rows rendered above/below |
|
|
29
|
+
|
|
30
|
+
- **Events**:
|
|
31
|
+
| Event | Payload | Description |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `@task-click` | `{ task: IGanttTask, row: any }` | Triggered when a timeline task bar is clicked (suppressed during drag/resize) |
|
|
34
|
+
| `@task-dblclick` | `{ task: IGanttTask, row: any }` | Triggered when a timeline task bar is double-clicked |
|
|
35
|
+
| `@task-contextmenu` / `@task-rightclick` | `{ event: MouseEvent, task: IGanttTask, row: any, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, clientX: number, clientY: number }` | Triggered on right-click over a timeline task bar. Includes full `event` and keyboard modifier flags for custom context menus or modifier actions. |
|
|
36
|
+
| `@update:task` | `{ task: IGanttTask, sourceRow: any, targetRow?: any }` | Triggered when a task bar is dragged, resized, or moved across rows and dropped |
|
|
37
|
+
| `@update:selectedRows` | `any[]` | Triggered when row selection checkboxes change |
|
|
38
|
+
| `@update:selectAll` | `boolean` | Triggered when global select all changes |
|
|
39
|
+
|
|
40
|
+
- **Opening a Modal or Custom Context Menu on Task Click / Right-Click (Pug)**:
|
|
41
|
+
```pug
|
|
42
|
+
KGantt(
|
|
43
|
+
:dataProvider="ganttProvider"
|
|
44
|
+
:columns="columns"
|
|
45
|
+
@task-click="handleTaskClick"
|
|
46
|
+
@task-contextmenu="handleTaskRightClick"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
//- Custom Context Menu or Modal
|
|
50
|
+
KContextMenu(v-model:isOpen="isContextMenuOpen" :x="menuPos.x" :y="menuPos.y")
|
|
51
|
+
div Menu Content
|
|
52
|
+
|
|
53
|
+
KModal(v-model="isModalOpen" :title="activeTask?.title || 'Task Details'")
|
|
54
|
+
p(v-if="activeTask") Task ID: \#{{ activeTask.id }}
|
|
55
|
+
p(v-if="activeTask") Resource: \#{{ activeRow?.name }}
|
|
56
|
+
```
|
|
57
|
+
```typescript
|
|
58
|
+
const isModalOpen = ref(false)
|
|
59
|
+
const isContextMenuOpen = ref(false)
|
|
60
|
+
const menuPos = ref({ x: 0, y: 0 })
|
|
61
|
+
const activeTask = ref(null)
|
|
62
|
+
const activeRow = ref(null)
|
|
63
|
+
|
|
64
|
+
const handleTaskClick = ({ task, row }: { task: any, row: any }) => {
|
|
65
|
+
activeTask.value = task
|
|
66
|
+
activeRow.value = row
|
|
67
|
+
isModalOpen.value = true
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const handleTaskRightClick = ({ event, task, row, ctrlKey, shiftKey, clientX, clientY }: any) => {
|
|
71
|
+
event.preventDefault() // Suppress browser default context menu
|
|
72
|
+
activeTask.value = task
|
|
73
|
+
activeRow.value = row
|
|
74
|
+
|
|
75
|
+
if (ctrlKey || shiftKey) {
|
|
76
|
+
// Modifier-specific action (e.g. multi-select or quick inspect)
|
|
77
|
+
console.log('Modifier right click', { ctrlKey, shiftKey })
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Position and open custom context menu
|
|
82
|
+
menuPos.value = { x: clientX, y: clientY }
|
|
83
|
+
isContextMenuOpen.value = true
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
|
|
@@ -104,7 +104,7 @@ export default defineAppConfig({
|
|
|
104
104
|
|
|
105
105
|
| Package Name | Current Version | Description | Installation Command |
|
|
106
106
|
| --- | --- | --- | --- |
|
|
107
|
-
| `@katlux/toolkit` | `0.1.1-alpha.
|
|
107
|
+
| `@katlux/toolkit` | `0.1.1-alpha.130` | Core Nuxt module, UI toolkit, presets, and components | `npm install @katlux/toolkit@alpha` |
|
|
108
108
|
| `@katlux/providers` | `0.1.1-alpha.117` | Core data providers, client caching, and state structures | `npm install @katlux/providers@alpha` |
|
|
109
109
|
| `@katlux/preset-modern` | `0.1.1-alpha.105` | Modern design preset and styling variables | `npm install @katlux/preset-modern@alpha` |
|
|
110
110
|
| `@katlux/preset-dark` | `0.1.1-alpha.36` | Sleek Dark Mode design preset | `npm install @katlux/preset-dark@alpha` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@katlux/toolkit",
|
|
3
|
-
"version": "0.1.1-alpha.
|
|
3
|
+
"version": "0.1.1-alpha.131",
|
|
4
4
|
"description": "Core UI toolkit and utilities for the Katlux ecosystem",
|
|
5
5
|
"author": "Katlux",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"katlux-add-ref": "./bin/add-ai-reference.mjs"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "nuxt-module-build build && unbuild && node -e \"const fs=require('fs'); fs.mkdirSync('dist/runtime', {recursive:true}); fs.cpSync('src/runtime/presets', 'dist/runtime/presets', {recursive:true}); const clean=(d)=>{if(!fs.existsSync(d))return;for(const f of fs.readdirSync(d,{withFileTypes:true})){const p=d+'/'+f.name;if(f.isDirectory())clean(p);else if(f.name.includes('.spec.'))fs.unlinkSync(p);}};clean('dist'); const sRoot='../../.agents/skills'; if(fs.existsSync(sRoot)){fs.mkdirSync('dist/skills', {recursive:true}); fs.cpSync(sRoot, 'dist/skills', {recursive:true, filter:(s)=>!s.includes('
|
|
18
|
+
"build": "nuxt-module-build build && unbuild && node -e \"const fs=require('fs'); fs.mkdirSync('dist/runtime', {recursive:true}); fs.cpSync('src/runtime/presets', 'dist/runtime/presets', {recursive:true}); const clean=(d)=>{if(!fs.existsSync(d))return;for(const f of fs.readdirSync(d,{withFileTypes:true})){const p=d+'/'+f.name;if(f.isDirectory())clean(p);else if(f.name.includes('.spec.'))fs.unlinkSync(p);}};clean('dist'); const sRoot='../../.agents/skills'; if(fs.existsSync(sRoot)){fs.mkdirSync('dist/skills', {recursive:true}); fs.cpSync(sRoot, 'dist/skills', {recursive:true, filter:(s)=>!s.includes('.DS_Store')});}\"",
|
|
19
19
|
"dev": "nuxt-module-build build --stub",
|
|
20
20
|
"prepare": "nuxi prepare",
|
|
21
21
|
"prepublishOnly": "npm run build"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"**/*.sass"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@katlux/providers": "^0.1.1-alpha.
|
|
57
|
+
"@katlux/providers": "^0.1.1-alpha.118",
|
|
58
58
|
"@nuxt/kit": "^3.12.0",
|
|
59
59
|
"@nuxtjs/i18n": "^10.4.0",
|
|
60
60
|
"pug": "^3.0.0",
|