@katlux/toolkit 0.1.0-beta.6 → 0.1.0-beta.66
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/compiled/composables/usePresetComponent.mjs +21 -16
- package/dist/module.cjs +52 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +52 -0
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.d.ts +9 -2
- package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +11 -12
- package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +11 -12
- package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +1 -0
- package/dist/runtime/components/KCalendar/KCalendar.logic.js +25 -10
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +30 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +4 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +30 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +17 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +16 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +75 -8
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +18 -4
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +75 -8
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +46 -8
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +77 -9
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +169 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +46 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +169 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +127 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +160 -0
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +2 -2
- package/dist/runtime/components/KDatatable/KDatatable.global.vue +1 -1
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +2 -2
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +95 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +27 -3
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +95 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +43 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +106 -7
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +84 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +26 -3
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +84 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +38 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +161 -7
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +27 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.vue +14 -4
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +27 -0
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +36 -1
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +92 -4
- package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +7 -56
- package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
- package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +41 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +27 -12
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +41 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +26 -3
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +34 -10
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +4 -1
- package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.logic.js +13 -8
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +21 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +4 -2
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +21 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +11 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +9 -0
- package/dist/runtime/components/KModal/KModal.global.d.vue.ts +14 -2
- package/dist/runtime/components/KModal/KModal.global.vue +5 -1
- package/dist/runtime/components/KModal/KModal.global.vue.d.ts +14 -2
- package/dist/runtime/components/KModal/KModal.logic.d.ts +10 -2
- package/dist/runtime/components/KModal/KModal.logic.js +12 -3
- package/dist/runtime/components/KPagination/KPagination.global.vue +1 -1
- package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
- package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
- package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
- package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
- package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +21 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +3 -1
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +21 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +11 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +9 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +21 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.vue +3 -1
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +21 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +11 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.js +9 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +35 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +7 -4
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +35 -2
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +21 -4
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +21 -5
- package/dist/runtime/components/KToast/KToast.global.d.vue.ts +57 -0
- package/dist/runtime/components/KToast/KToast.global.vue +32 -0
- package/dist/runtime/components/KToast/KToast.global.vue.d.ts +57 -0
- package/dist/runtime/components/KToast/KToast.logic.d.ts +34 -0
- package/dist/runtime/components/KToast/KToast.logic.js +47 -0
- package/dist/runtime/components/KTree/KTree.logic.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +63 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +15 -3
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +63 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +37 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +32 -1
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +5 -5
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +5 -5
- package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +1 -1
- package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
- package/dist/runtime/composables/usePresetComponent.js +21 -16
- package/dist/runtime/presets/default/assets/scss/css-variables.css +64 -13
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +286 -0
- package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
- package/dist/runtime/presets/default/assets/scss/index.css +99 -13
- package/dist/runtime/presets/default/assets/scss/index.scss +42 -0
- package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
- package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
- package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
- package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
- package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +59 -42
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +108 -79
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +79 -61
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +29 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +202 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +29 -0
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +58 -25
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +6 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +81 -52
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +6 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +10 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +57 -25
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +10 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +337 -241
- package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
- package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +8 -2
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +48 -28
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +8 -2
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
- package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue +65 -48
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +117 -84
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KModal/KModal.vue +85 -35
- package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
- package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue +97 -34
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +40 -35
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
- package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
- package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +40 -21
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +76 -37
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KToast/KToast.d.vue.ts +17 -0
- package/dist/runtime/presets/default/components/KToast/KToast.vue +118 -0
- package/dist/runtime/presets/default/components/KToast/KToast.vue.d.ts +17 -0
- package/dist/runtime/presets/default/components/KTree/KTree.vue +103 -80
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +6 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +88 -55
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +6 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
- package/package.json +5 -5
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
KButton(
|
|
25
25
|
v-for="rowAction in rowActions"
|
|
26
26
|
:key="rowAction.label"
|
|
27
|
-
:type="rowAction.type || '
|
|
27
|
+
:type="rowAction.type || 'default'"
|
|
28
28
|
size="small"
|
|
29
29
|
@click="rowAction.action(row)"
|
|
30
30
|
) {{ rowAction.label }}
|
|
@@ -53,252 +53,348 @@
|
|
|
53
53
|
)
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
|
-
<script setup>
|
|
57
|
-
import { computed, ref } from
|
|
58
|
-
import KGanttRuler from
|
|
59
|
-
import KGanttTimeline from
|
|
60
|
-
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
56
|
+
<script lang="ts" setup>
|
|
57
|
+
import { computed, ref } from 'vue'
|
|
58
|
+
import KGanttRuler from './KGanttRuler.vue'
|
|
59
|
+
import KGanttTimeline from './KGanttTimeline.vue'
|
|
60
|
+
import type { ITreeViewColumn, IRowAction } from '#toolkit/components/KTreeView/KTreeView.logic'
|
|
61
|
+
import type { IKDatatableAction } from '@katlux/providers'
|
|
62
|
+
import type { IGanttTask } from '#toolkit/components/KGantt/KGantt.logic'
|
|
63
|
+
import { getSnapMs, isTaskOverlapping, calculateGanttMinWidth } from '#toolkit/components/KGantt/KGantt.logic'
|
|
64
|
+
|
|
65
|
+
const props = defineProps<{
|
|
66
|
+
dataProvider: any
|
|
67
|
+
columns: ITreeViewColumn[]
|
|
68
|
+
treeColumnIndex?: number
|
|
69
|
+
bulkActions?: IKDatatableAction[]
|
|
70
|
+
rowActions?: IRowAction[]
|
|
71
|
+
|
|
72
|
+
globalDateRange: { start: number, end: number }
|
|
73
|
+
totalDuration: number
|
|
74
|
+
resolvedMapping: any
|
|
75
|
+
getTasksForRow: (row: any) => IGanttTask[]
|
|
76
|
+
getTaskStyle: (task: any) => any
|
|
77
|
+
|
|
78
|
+
editable?: boolean
|
|
79
|
+
snapTo?: string
|
|
80
|
+
resourceTypeField?: string
|
|
81
|
+
taskTypeField?: string
|
|
82
|
+
|
|
83
|
+
selectedRows?: any[]
|
|
84
|
+
selectAll?: boolean
|
|
85
|
+
cellSlots?: any
|
|
86
|
+
headerSlots?: any
|
|
87
|
+
|
|
88
|
+
endingPoint?: Date | string | number
|
|
89
|
+
mode?: 'date' | 'numeric'
|
|
90
|
+
|
|
91
|
+
moveTime?: (amount: number) => void
|
|
92
|
+
zoom?: (factor: number) => void
|
|
93
|
+
}>()
|
|
94
|
+
|
|
95
|
+
const emit = defineEmits<{
|
|
96
|
+
(e: 'update:task', payload: { task: IGanttTask; sourceRow: any; targetRow?: any }): void
|
|
97
|
+
(e: 'update:selectedRows', value: any[]): void
|
|
98
|
+
(e: 'update:selectAll', value: boolean): void
|
|
99
|
+
}>()
|
|
100
|
+
|
|
101
|
+
// ── Drag state (owned here so all rows can share it) ─────────────
|
|
102
|
+
interface ActiveDrag {
|
|
103
|
+
taskId: string | number
|
|
104
|
+
task: IGanttTask
|
|
105
|
+
sourceRow: any
|
|
106
|
+
sourceRowId: string | number
|
|
107
|
+
currentHoverRow: any
|
|
108
|
+
mode: 'move' | 'resize-left' | 'resize-right'
|
|
109
|
+
startX: number
|
|
110
|
+
wrapperWidth: number
|
|
111
|
+
originalStartMs: number
|
|
112
|
+
originalEndMs: number
|
|
113
|
+
currentStartMs: number
|
|
114
|
+
currentEndMs: number
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const activeDragState = ref<ActiveDrag | null>(null)
|
|
118
|
+
const scrollContainer = ref<HTMLElement | null>(null)
|
|
119
|
+
|
|
120
|
+
// ── Drag to pan state ─────────────
|
|
121
|
+
const isDraggingGantt = ref(false)
|
|
122
|
+
let ganttDragStartX = 0
|
|
123
|
+
|
|
124
|
+
const onMouseDown = (e: MouseEvent) => {
|
|
125
|
+
// Only initiate drag if left button and target is not a task bar or its resize handles
|
|
126
|
+
if (e.button !== 0) return
|
|
127
|
+
const target = e.target as HTMLElement
|
|
128
|
+
if (target.closest('.gantt-bar')) return
|
|
129
|
+
|
|
130
|
+
// MUST be inside the timeline cell to start panning
|
|
131
|
+
if (!target.closest('[data-field="ganttTimeline"]')) return
|
|
132
|
+
|
|
133
|
+
isDraggingGantt.value = true
|
|
134
|
+
ganttDragStartX = e.clientX
|
|
135
|
+
|
|
136
|
+
window.addEventListener('mousemove', onGanttMouseMove)
|
|
137
|
+
window.addEventListener('mouseup', onGanttMouseUp)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const onGanttMouseMove = (e: MouseEvent) => {
|
|
141
|
+
if (!isDraggingGantt.value) return
|
|
142
|
+
e.preventDefault()
|
|
143
|
+
|
|
144
|
+
const deltaX = e.clientX - ganttDragStartX
|
|
145
|
+
ganttDragStartX = e.clientX
|
|
146
|
+
|
|
147
|
+
if (scrollContainer.value) {
|
|
148
|
+
const wrapperWidth = scrollContainer.value.clientWidth || 1000
|
|
149
|
+
const viewportDuration = props.globalDateRange.end - props.globalDateRange.start
|
|
150
|
+
const msPerPx = viewportDuration / wrapperWidth
|
|
151
|
+
|
|
152
|
+
// If we drag mouse left (deltaX < 0), time moves forward (moveTime > 0)
|
|
153
|
+
props.moveTime?.(-deltaX * msPerPx)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
112
157
|
const onGanttMouseUp = () => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
const onWheel = (e) => {
|
|
118
|
-
const viewportDuration = props.globalDateRange.end - props.globalDateRange.start;
|
|
119
|
-
if (e.ctrlKey) {
|
|
120
|
-
e.preventDefault();
|
|
121
|
-
const factor = e.deltaY > 0 ? -0.1 : 0.1;
|
|
122
|
-
props.zoom?.(factor);
|
|
123
|
-
} else if (e.shiftKey) {
|
|
124
|
-
e.preventDefault();
|
|
125
|
-
const direction = e.deltaY > 0 ? 1 : -1;
|
|
126
|
-
const delta = viewportDuration * 0.1 * direction;
|
|
127
|
-
props.moveTime?.(delta);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
const onTaskDragStart = ({ event, task, rowId, mode, wrapperEl }, row) => {
|
|
131
|
-
console.log("[KGantt] onTaskDragStart called", { editable: props.editable, mode, taskId: task.id, wrapperElFound: !!wrapperEl });
|
|
132
|
-
if (!props.editable) {
|
|
133
|
-
console.warn("[KGantt] ABORT: not editable");
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
event.preventDefault();
|
|
137
|
-
const wrapperRect = wrapperEl?.getBoundingClientRect();
|
|
138
|
-
const wrapperWidth = wrapperRect?.width ?? 1e3;
|
|
139
|
-
const startField = props.resolvedMapping?.startDate ?? "startDate";
|
|
140
|
-
const endField = props.resolvedMapping?.endDate ?? "endDate";
|
|
141
|
-
const originalStartMs = new Date(task[startField]).getTime();
|
|
142
|
-
const originalEndMs = new Date(task[endField]).getTime();
|
|
143
|
-
activeDragState.value = {
|
|
144
|
-
taskId: task.id,
|
|
145
|
-
task,
|
|
146
|
-
sourceRow: row,
|
|
147
|
-
sourceRowId: row?.id,
|
|
148
|
-
currentHoverRow: row,
|
|
149
|
-
mode,
|
|
150
|
-
startX: event.clientX,
|
|
151
|
-
wrapperWidth,
|
|
152
|
-
originalStartMs,
|
|
153
|
-
originalEndMs,
|
|
154
|
-
currentStartMs: originalStartMs,
|
|
155
|
-
currentEndMs: originalEndMs
|
|
156
|
-
};
|
|
157
|
-
window.addEventListener("mousemove", onMouseMove);
|
|
158
|
-
window.addEventListener("mouseup", onMouseUp);
|
|
159
|
-
};
|
|
160
|
-
const onCellMouseEnter = (rowId, row) => {
|
|
161
|
-
if (!activeDragState.value) return;
|
|
162
|
-
if (activeDragState.value.mode === "move") {
|
|
163
|
-
activeDragState.value.currentHoverRow = row;
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
const onMouseMove = (e) => {
|
|
167
|
-
if (!activeDragState.value) return;
|
|
168
|
-
const state = activeDragState.value;
|
|
169
|
-
const msPerPx = (props.globalDateRange.end - props.globalDateRange.start) / state.wrapperWidth;
|
|
170
|
-
const deltaX = e.clientX - state.startX;
|
|
171
|
-
const deltaMs = deltaX * msPerPx;
|
|
172
|
-
const snapMs = getSnapMs(props.snapTo || "day");
|
|
173
|
-
let newStart = state.originalStartMs;
|
|
174
|
-
let newEnd = state.originalEndMs;
|
|
175
|
-
if (state.mode === "move") {
|
|
176
|
-
const snappedDelta = Math.round(deltaMs / snapMs) * snapMs;
|
|
177
|
-
newStart = state.originalStartMs + snappedDelta;
|
|
178
|
-
newEnd = state.originalEndMs + snappedDelta;
|
|
179
|
-
} else if (state.mode === "resize-left") {
|
|
180
|
-
const snappedDelta = Math.round(deltaMs / snapMs) * snapMs;
|
|
181
|
-
newStart = Math.min(state.originalStartMs + snappedDelta, state.originalEndMs - snapMs);
|
|
182
|
-
} else if (state.mode === "resize-right") {
|
|
183
|
-
const snappedDelta = Math.round(deltaMs / snapMs) * snapMs;
|
|
184
|
-
newEnd = Math.max(state.originalEndMs + snappedDelta, state.originalStartMs + snapMs);
|
|
185
|
-
}
|
|
186
|
-
state.currentStartMs = newStart;
|
|
187
|
-
state.currentEndMs = newEnd;
|
|
188
|
-
};
|
|
189
|
-
const onMouseUp = () => {
|
|
190
|
-
window.removeEventListener("mousemove", onMouseMove);
|
|
191
|
-
window.removeEventListener("mouseup", onMouseUp);
|
|
192
|
-
if (!activeDragState.value) {
|
|
193
|
-
console.warn("[KGantt] onMouseUp: no activeDragState");
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
const state = activeDragState.value;
|
|
197
|
-
const startField = props.resolvedMapping?.startDate ?? "startDate";
|
|
198
|
-
const endField = props.resolvedMapping?.endDate ?? "endDate";
|
|
199
|
-
const tasksField = props.resolvedMapping?.tasksField ?? "tasks";
|
|
200
|
-
const updatedTask = {
|
|
201
|
-
...state.task,
|
|
202
|
-
[startField]: state.currentStartMs,
|
|
203
|
-
[endField]: state.currentEndMs
|
|
204
|
-
};
|
|
205
|
-
console.log("[KGantt] onMouseUp", {
|
|
206
|
-
mode: state.mode,
|
|
207
|
-
originalStart: new Date(state.originalStartMs).toISOString(),
|
|
208
|
-
currentStart: new Date(state.currentStartMs).toISOString(),
|
|
209
|
-
sameTime: state.currentStartMs === state.originalStartMs,
|
|
210
|
-
wrapperWidth: state.wrapperWidth
|
|
211
|
-
});
|
|
212
|
-
let targetRow = state.sourceRow;
|
|
213
|
-
if (state.mode === "move" && state.currentHoverRow !== state.sourceRow) {
|
|
214
|
-
const hoverRow = state.currentHoverRow;
|
|
215
|
-
const resourceTypeField = props.resourceTypeField || "type";
|
|
216
|
-
const taskTypeField = props.resolvedMapping?.taskTypeField || "type";
|
|
217
|
-
const taskType = state.task[taskTypeField];
|
|
218
|
-
if (resourceTypeField) {
|
|
219
|
-
const myType = state.sourceRow?.[resourceTypeField];
|
|
220
|
-
const theirType = hoverRow?.[resourceTypeField];
|
|
221
|
-
console.log("[KGantt] cross-row check", { myType, theirType, taskType, taskTypeField });
|
|
222
|
-
if (taskType && theirType && taskType !== theirType) {
|
|
223
|
-
console.warn("[KGantt] CANCEL: task type mismatch with target resource");
|
|
224
|
-
activeDragState.value = null;
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
if (myType && theirType && myType !== theirType) {
|
|
228
|
-
console.warn("[KGantt] CANCEL: resource type mismatch");
|
|
229
|
-
activeDragState.value = null;
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
targetRow = hoverRow;
|
|
234
|
-
}
|
|
235
|
-
const targetTasks = targetRow === state.sourceRow ? props.getTasksForRow(targetRow) : targetRow?.[tasksField] || [];
|
|
236
|
-
const overlapping = isTaskOverlapping(updatedTask, targetTasks, startField, endField);
|
|
237
|
-
console.log("[KGantt] overlap check", {
|
|
238
|
-
updatedTask: { id: updatedTask.id, start: updatedTask[startField], end: updatedTask[endField] },
|
|
239
|
-
targetTaskCount: targetTasks.length,
|
|
240
|
-
overlapping
|
|
241
|
-
});
|
|
242
|
-
if (overlapping) {
|
|
243
|
-
console.warn("[KGantt] CANCEL: overlap detected");
|
|
244
|
-
activeDragState.value = null;
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
console.log("[KGantt] COMMIT: emitting update:task");
|
|
248
|
-
emit("update:task", {
|
|
249
|
-
task: updatedTask,
|
|
250
|
-
sourceRow: state.sourceRow,
|
|
251
|
-
targetRow: targetRow !== state.sourceRow ? targetRow : void 0
|
|
252
|
-
});
|
|
253
|
-
activeDragState.value = null;
|
|
254
|
-
};
|
|
255
|
-
const ganttColumns = computed(() => {
|
|
256
|
-
const cols = props.columns.map((col) => ({ ...col, width: col.width ?? "1%" }));
|
|
257
|
-
cols.push({
|
|
258
|
-
field: "ganttTimeline",
|
|
259
|
-
header: "Timeline",
|
|
260
|
-
width: calculateGanttMinWidth(props.globalDateRange.start, props.globalDateRange.end, 80, props.mode)
|
|
261
|
-
});
|
|
262
|
-
if (props.rowActions && props.rowActions.length > 0) {
|
|
263
|
-
cols.push({
|
|
264
|
-
field: "_ganttActions",
|
|
265
|
-
header: "Actions",
|
|
266
|
-
width: "1%"
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
return cols;
|
|
270
|
-
});
|
|
271
|
-
</script>
|
|
158
|
+
isDraggingGantt.value = false
|
|
159
|
+
window.removeEventListener('mousemove', onGanttMouseMove)
|
|
160
|
+
window.removeEventListener('mouseup', onGanttMouseUp)
|
|
161
|
+
}
|
|
272
162
|
|
|
273
|
-
|
|
274
|
-
.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
163
|
+
const onWheel = (e: WheelEvent) => {
|
|
164
|
+
const viewportDuration = props.globalDateRange.end - props.globalDateRange.start
|
|
165
|
+
|
|
166
|
+
if (e.ctrlKey) {
|
|
167
|
+
// Ctrl + Scroll = Zoom
|
|
168
|
+
e.preventDefault()
|
|
169
|
+
const factor = e.deltaY > 0 ? -0.1 : 0.1
|
|
170
|
+
props.zoom?.(factor)
|
|
171
|
+
} else if (e.shiftKey) {
|
|
172
|
+
// Shift + Scroll = Horizontal Move
|
|
173
|
+
e.preventDefault()
|
|
174
|
+
const direction = e.deltaY > 0 ? 1 : -1
|
|
175
|
+
const delta = viewportDuration * 0.1 * direction
|
|
176
|
+
props.moveTime?.(delta)
|
|
177
|
+
}
|
|
178
|
+
// Let normal scroll through for vertical scrolling
|
|
280
179
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
180
|
+
|
|
181
|
+
const onTaskDragStart = (
|
|
182
|
+
{ event, task, rowId, mode, wrapperEl }: { event: MouseEvent; task: IGanttTask; rowId: any; mode: string; wrapperEl: HTMLElement | null },
|
|
183
|
+
row: any
|
|
184
|
+
) => {
|
|
185
|
+
console.log('[KGantt] onTaskDragStart called', { editable: props.editable, mode, taskId: task.id, wrapperElFound: !!wrapperEl })
|
|
186
|
+
if (!props.editable) { console.warn('[KGantt] ABORT: not editable'); return }
|
|
187
|
+
event.preventDefault()
|
|
188
|
+
|
|
189
|
+
const wrapperRect = wrapperEl?.getBoundingClientRect()
|
|
190
|
+
const wrapperWidth = wrapperRect?.width ?? 1000
|
|
191
|
+
|
|
192
|
+
const startField = props.resolvedMapping?.startDate ?? 'startDate'
|
|
193
|
+
const endField = props.resolvedMapping?.endDate ?? 'endDate'
|
|
194
|
+
const originalStartMs = new Date(task[startField]).getTime()
|
|
195
|
+
const originalEndMs = new Date(task[endField]).getTime()
|
|
196
|
+
|
|
197
|
+
activeDragState.value = {
|
|
198
|
+
taskId: task.id,
|
|
199
|
+
task,
|
|
200
|
+
sourceRow: row,
|
|
201
|
+
sourceRowId: row?.id,
|
|
202
|
+
currentHoverRow: row,
|
|
203
|
+
mode: mode as ActiveDrag['mode'],
|
|
204
|
+
startX: event.clientX,
|
|
205
|
+
wrapperWidth,
|
|
206
|
+
originalStartMs,
|
|
207
|
+
originalEndMs,
|
|
208
|
+
currentStartMs: originalStartMs,
|
|
209
|
+
currentEndMs: originalEndMs
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
window.addEventListener('mousemove', onMouseMove)
|
|
213
|
+
window.addEventListener('mouseup', onMouseUp)
|
|
287
214
|
}
|
|
288
|
-
|
|
289
|
-
|
|
215
|
+
|
|
216
|
+
const onCellMouseEnter = (rowId: any, row: any) => {
|
|
217
|
+
if (!activeDragState.value) return
|
|
218
|
+
// Track which row the mouse is hovering over during a move drag
|
|
219
|
+
if (activeDragState.value.mode === 'move') {
|
|
220
|
+
activeDragState.value.currentHoverRow = row
|
|
221
|
+
}
|
|
290
222
|
}
|
|
291
|
-
|
|
292
|
-
|
|
223
|
+
|
|
224
|
+
const onMouseMove = (e: MouseEvent) => {
|
|
225
|
+
if (!activeDragState.value) return
|
|
226
|
+
|
|
227
|
+
const state = activeDragState.value
|
|
228
|
+
const msPerPx = (props.globalDateRange.end - props.globalDateRange.start) / state.wrapperWidth
|
|
229
|
+
const deltaX = e.clientX - state.startX
|
|
230
|
+
const deltaMs = deltaX * msPerPx
|
|
231
|
+
const snapMs = getSnapMs(props.snapTo || 'day')
|
|
232
|
+
|
|
233
|
+
let newStart = state.originalStartMs
|
|
234
|
+
let newEnd = state.originalEndMs
|
|
235
|
+
|
|
236
|
+
if (state.mode === 'move') {
|
|
237
|
+
const snappedDelta = Math.round(deltaMs / snapMs) * snapMs
|
|
238
|
+
newStart = state.originalStartMs + snappedDelta
|
|
239
|
+
newEnd = state.originalEndMs + snappedDelta
|
|
240
|
+
} else if (state.mode === 'resize-left') {
|
|
241
|
+
const snappedDelta = Math.round(deltaMs / snapMs) * snapMs
|
|
242
|
+
newStart = Math.min(state.originalStartMs + snappedDelta, state.originalEndMs - snapMs)
|
|
243
|
+
} else if (state.mode === 'resize-right') {
|
|
244
|
+
const snappedDelta = Math.round(deltaMs / snapMs) * snapMs
|
|
245
|
+
newEnd = Math.max(state.originalEndMs + snappedDelta, state.originalStartMs + snapMs)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
state.currentStartMs = newStart
|
|
249
|
+
state.currentEndMs = newEnd
|
|
293
250
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
251
|
+
|
|
252
|
+
const onMouseUp = () => {
|
|
253
|
+
window.removeEventListener('mousemove', onMouseMove)
|
|
254
|
+
window.removeEventListener('mouseup', onMouseUp)
|
|
255
|
+
|
|
256
|
+
if (!activeDragState.value) { console.warn('[KGantt] onMouseUp: no activeDragState'); return }
|
|
257
|
+
|
|
258
|
+
const state = activeDragState.value
|
|
259
|
+
const startField = props.resolvedMapping?.startDate ?? 'startDate'
|
|
260
|
+
const endField = props.resolvedMapping?.endDate ?? 'endDate'
|
|
261
|
+
const tasksField = props.resolvedMapping?.tasksField ?? 'tasks'
|
|
262
|
+
|
|
263
|
+
const updatedTask = {
|
|
264
|
+
...state.task,
|
|
265
|
+
[startField]: state.currentStartMs,
|
|
266
|
+
[endField]: state.currentEndMs
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
console.log('[KGantt] onMouseUp', {
|
|
270
|
+
mode: state.mode,
|
|
271
|
+
originalStart: new Date(state.originalStartMs).toISOString(),
|
|
272
|
+
currentStart: new Date(state.currentStartMs).toISOString(),
|
|
273
|
+
sameTime: state.currentStartMs === state.originalStartMs,
|
|
274
|
+
wrapperWidth: state.wrapperWidth
|
|
275
|
+
})
|
|
276
|
+
|
|
277
|
+
let targetRow = state.sourceRow
|
|
278
|
+
|
|
279
|
+
// Check if the task was moved to a different row
|
|
280
|
+
if (state.mode === 'move' && state.currentHoverRow !== state.sourceRow) {
|
|
281
|
+
const hoverRow = state.currentHoverRow
|
|
282
|
+
|
|
283
|
+
// Enforce resource type compatibility
|
|
284
|
+
const resourceTypeField = props.resourceTypeField || 'type'
|
|
285
|
+
const taskTypeField = props.resolvedMapping?.taskTypeField || 'type'
|
|
286
|
+
const taskType = state.task[taskTypeField]
|
|
287
|
+
|
|
288
|
+
if (resourceTypeField) {
|
|
289
|
+
const myType = state.sourceRow?.[resourceTypeField]
|
|
290
|
+
const theirType = hoverRow?.[resourceTypeField]
|
|
291
|
+
console.log('[KGantt] cross-row check', { myType, theirType, taskType, taskTypeField })
|
|
292
|
+
|
|
293
|
+
// If task has a specific type, it MUST match the target resource type
|
|
294
|
+
if (taskType && theirType && taskType !== theirType) {
|
|
295
|
+
console.warn('[KGantt] CANCEL: task type mismatch with target resource')
|
|
296
|
+
activeDragState.value = null
|
|
297
|
+
return
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Original logic: if source resource has a type, target must match (if resourceTypeField is set)
|
|
301
|
+
// This covers the case where the task doesn't have a type, but we still want to keep it within the same resource group
|
|
302
|
+
if (myType && theirType && myType !== theirType) {
|
|
303
|
+
console.warn('[KGantt] CANCEL: resource type mismatch')
|
|
304
|
+
activeDragState.value = null
|
|
305
|
+
return
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
targetRow = hoverRow
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Overlap check on target row (excluding the task itself)
|
|
313
|
+
const targetTasks: IGanttTask[] = targetRow === state.sourceRow
|
|
314
|
+
? props.getTasksForRow(targetRow)
|
|
315
|
+
: (targetRow?.[tasksField] || [])
|
|
316
|
+
|
|
317
|
+
const overlapping = isTaskOverlapping(updatedTask, targetTasks, startField, endField)
|
|
318
|
+
console.log('[KGantt] overlap check', {
|
|
319
|
+
updatedTask: { id: updatedTask.id, start: updatedTask[startField], end: updatedTask[endField] },
|
|
320
|
+
targetTaskCount: targetTasks.length,
|
|
321
|
+
overlapping
|
|
322
|
+
})
|
|
323
|
+
|
|
324
|
+
if (overlapping) {
|
|
325
|
+
console.warn('[KGantt] CANCEL: overlap detected')
|
|
326
|
+
activeDragState.value = null
|
|
327
|
+
return
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
console.log('[KGantt] COMMIT: emitting update:task')
|
|
331
|
+
emit('update:task', {
|
|
332
|
+
|
|
333
|
+
task: updatedTask,
|
|
334
|
+
sourceRow: state.sourceRow,
|
|
335
|
+
targetRow: targetRow !== state.sourceRow ? targetRow : undefined
|
|
336
|
+
})
|
|
337
|
+
|
|
338
|
+
activeDragState.value = null
|
|
297
339
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
340
|
+
|
|
341
|
+
// User columns shrink to content; timeline fills remaining space
|
|
342
|
+
const ganttColumns = computed(() => {
|
|
343
|
+
const cols = props.columns.map(col => ({ ...col, width: col.width ?? '1%' }))
|
|
344
|
+
|
|
345
|
+
cols.push({
|
|
346
|
+
field: 'ganttTimeline',
|
|
347
|
+
header: 'Timeline',
|
|
348
|
+
width: calculateGanttMinWidth(props.globalDateRange.start, props.globalDateRange.end, 80, props.mode)
|
|
349
|
+
})
|
|
350
|
+
|
|
351
|
+
if (props.rowActions && props.rowActions.length > 0) {
|
|
352
|
+
cols.push({
|
|
353
|
+
field: '_ganttActions',
|
|
354
|
+
header: 'Actions',
|
|
355
|
+
width: '1%'
|
|
356
|
+
})
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
return cols
|
|
360
|
+
})
|
|
361
|
+
|
|
362
|
+
</script>
|
|
363
|
+
|
|
364
|
+
<style lang="scss" scoped>
|
|
365
|
+
.KGantt {
|
|
366
|
+
width: 100%;
|
|
367
|
+
height: 100%;
|
|
368
|
+
overflow: hidden;
|
|
369
|
+
display: flex;
|
|
370
|
+
flex-direction: column;
|
|
371
|
+
|
|
372
|
+
&__scroll-container {
|
|
373
|
+
flex: 1;
|
|
374
|
+
width: 100%;
|
|
375
|
+
overflow-x: auto;
|
|
376
|
+
overflow-y: auto;
|
|
377
|
+
cursor: grab;
|
|
378
|
+
|
|
379
|
+
&:active {
|
|
380
|
+
cursor: grabbing;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
&__inner {
|
|
385
|
+
min-width: 100%;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
:deep(th[data-field="ganttTimeline"]),
|
|
389
|
+
:deep(td[data-field="ganttTimeline"]) {
|
|
390
|
+
padding: 0;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.gantt-actions {
|
|
394
|
+
display: flex;
|
|
395
|
+
gap: 8px;
|
|
396
|
+
justify-content: flex-end;
|
|
397
|
+
white-space: nowrap;
|
|
398
|
+
}
|
|
303
399
|
}
|
|
304
400
|
</style>
|
|
@@ -9,43 +9,48 @@
|
|
|
9
9
|
.gantt-ruler__line
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
<script setup>
|
|
13
|
-
import { computed } from
|
|
14
|
-
import { getGanttMarkers } from
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import { getGanttMarkers } from '#toolkit/components/KGantt/KGantt.logic'
|
|
15
|
+
|
|
16
|
+
const props = defineProps<{
|
|
17
|
+
startMs: number
|
|
18
|
+
endMs: number
|
|
19
|
+
mode?: 'date' | 'numeric'
|
|
20
|
+
}>()
|
|
21
|
+
|
|
22
|
+
const markers = computed(() => getGanttMarkers(props.startMs, props.endMs, props.mode))
|
|
21
23
|
</script>
|
|
22
24
|
|
|
23
|
-
<style scoped>
|
|
25
|
+
<style lang="scss" scoped>
|
|
24
26
|
.gantt-ruler {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
position: relative;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 32px;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
|
|
32
|
+
&__marker {
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
bottom: 0;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
align-items: flex-start;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__label {
|
|
42
|
+
font-size: 0.68rem;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
color: var(--text-color-secondary, #64748b);
|
|
45
|
+
padding: 4px 4px 0;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
line-height: 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__line {
|
|
51
|
+
flex: 1;
|
|
52
|
+
width: 1px;
|
|
53
|
+
background: var(--border-color, #cbd5e1);
|
|
54
|
+
}
|
|
50
55
|
}
|
|
51
56
|
</style>
|