@katlux/toolkit 0.1.0-beta.5 → 0.1.0-beta.50
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/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/KCombobox/KCombobox.global.d.vue.ts +18 -10
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +6 -2
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +18 -10
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +78 -0
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +8 -3
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +149 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +65 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +149 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +116 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +149 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +56 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +23 -3
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +56 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +22 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +89 -7
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +54 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +23 -3
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +54 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +22 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +148 -7
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +18 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.vue +13 -4
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +18 -0
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +28 -1
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +85 -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 +20 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +25 -12
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +20 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +14 -3
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +25 -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/KLoader/KLoader.global.d.vue.ts +3 -3
- package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +3 -3
- package/dist/runtime/components/KLoader/KLoader.logic.d.ts +8 -1
- package/dist/runtime/components/KLoader/KLoader.logic.js +1 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +1 -1
- package/dist/runtime/components/KModal/KModal.global.vue +4 -1
- package/dist/runtime/components/KModal/KModal.logic.d.ts +3 -1
- package/dist/runtime/components/KModal/KModal.logic.js +6 -2
- 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/KTextbox/KTextbox.global.d.vue.ts +15 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +5 -4
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +15 -2
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +10 -4
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +12 -5
- package/dist/runtime/components/KTree/KTree.global.d.vue.ts +1 -1
- package/dist/runtime/components/KTree/KTree.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +77 -0
- 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 +72 -13
- package/dist/runtime/presets/default/assets/scss/index.scss +12 -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.vue +46 -36
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +90 -70
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +78 -60
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +27 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +190 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +27 -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 +3 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +44 -25
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +68 -52
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +46 -25
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +8 -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 +6 -2
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +44 -28
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +6 -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 +53 -47
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +113 -84
- package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KModal/KModal.vue +64 -35
- package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +1 -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 +95 -34
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +30 -29
- 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.vue +23 -20
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +2 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +49 -36
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +2 -1
- package/dist/runtime/presets/default/components/KTree/KTree.vue +102 -80
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +55 -34
- 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
|
@@ -36,91 +36,113 @@
|
|
|
36
36
|
.default-item
|
|
37
37
|
KIcon(v-if="iconField && row[iconField]" :iconname="row[iconField]" :width="16" :height="16")
|
|
38
38
|
span {{ row[labelField] }}
|
|
39
|
+
|
|
39
40
|
</template>
|
|
40
41
|
|
|
41
|
-
<script setup>
|
|
42
|
-
import { computed } from
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
<script lang="ts" setup>
|
|
43
|
+
import { computed, type Ref } from 'vue'
|
|
44
|
+
|
|
45
|
+
const props = defineProps<{
|
|
46
|
+
visibleRows: any[] // Rows with __treeNode attached
|
|
47
|
+
expandedNodes: Set<string | number>
|
|
48
|
+
labelField: string
|
|
49
|
+
iconField: string
|
|
50
|
+
disabled: boolean
|
|
51
|
+
multiSelect: boolean
|
|
52
|
+
isNodeSelected: (node: any) => boolean
|
|
53
|
+
toggleNode: (id: string | number) => void
|
|
54
|
+
selectable: boolean
|
|
55
|
+
dataProvider?: {
|
|
56
|
+
loading: Ref<boolean>
|
|
57
|
+
initialLoad?: Ref<boolean>
|
|
58
|
+
}
|
|
59
|
+
}>()
|
|
60
|
+
|
|
61
|
+
// Helper to get ID if needed, but we use row[idKey] or row.id in key
|
|
62
|
+
const idKey = 'id' // Simplify for now, or pass as prop if needed. usually id.
|
|
63
|
+
|
|
64
|
+
const emit = defineEmits<{
|
|
65
|
+
(e: 'select', row: any): void
|
|
66
|
+
}>()
|
|
67
|
+
|
|
68
|
+
function onNodeClick(row: any) {
|
|
69
|
+
if (!props.disabled) {
|
|
70
|
+
emit('select', row)
|
|
71
|
+
}
|
|
61
72
|
}
|
|
62
|
-
|
|
73
|
+
|
|
74
|
+
const isLoading = computed(() => props.dataProvider?.loading?.value || props.dataProvider?.initialLoad?.value || false)
|
|
63
75
|
</script>
|
|
64
76
|
|
|
65
|
-
<style scoped>
|
|
77
|
+
<style lang="scss" scoped>
|
|
66
78
|
.KTree {
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
79
|
+
width: 100%;
|
|
80
|
+
position: relative; // Ensure loader overlay is contained
|
|
81
|
+
|
|
82
|
+
.tree-list {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.tree-node {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
padding: 4px 8px;
|
|
91
|
+
min-height: 32px;
|
|
92
|
+
transition: background-color 0.2s;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
background-color: var(--hover-bg, #f5f5f5);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.node-content {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
width: 100%;
|
|
102
|
+
gap: 4px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tree-toggle {
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
display: inline-flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
width: 20px;
|
|
111
|
+
height: 20px;
|
|
112
|
+
border-radius: 4px;
|
|
113
|
+
flex-shrink: 0;
|
|
114
|
+
|
|
115
|
+
&:hover {
|
|
116
|
+
background-color: var(--hover-light, #e0e0e0);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.tree-spacer {
|
|
121
|
+
width: 20px;
|
|
122
|
+
height: 20px;
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.node-label {
|
|
127
|
+
flex: 1;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
text-overflow: ellipsis;
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.selection-control {
|
|
136
|
+
margin-right: 8px;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.default-item {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: 6px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
125
147
|
}
|
|
126
148
|
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
KCombobox(
|
|
3
|
+
:dataProvider="dataProvider"
|
|
3
4
|
:disabled="disabled"
|
|
4
5
|
:isOptionsOpen="isOptionsOpen"
|
|
5
6
|
:labelField="labelField"
|
|
@@ -37,44 +38,64 @@ KCombobox(
|
|
|
37
38
|
)
|
|
38
39
|
</template>
|
|
39
40
|
|
|
40
|
-
<script setup>
|
|
41
|
-
import { computed } from
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
<script lang="ts" setup>
|
|
42
|
+
import { computed } from 'vue'
|
|
43
|
+
// Props passed from global component (which handles the logic)
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
// Tree specific
|
|
46
|
+
dataProvider: any
|
|
47
|
+
idKey?: string
|
|
48
|
+
parentKey?: string
|
|
49
|
+
iconField?: string
|
|
50
|
+
|
|
51
|
+
// Combobox Logic Props
|
|
52
|
+
disabled: boolean
|
|
53
|
+
isOptionsOpen: boolean
|
|
54
|
+
labelField: string
|
|
55
|
+
placeholder: string
|
|
56
|
+
searchbox: boolean
|
|
57
|
+
multiSelect: boolean
|
|
58
|
+
searchtext: string
|
|
59
|
+
filteredOptions: any[]
|
|
60
|
+
getSelectedContent: () => any[]
|
|
61
|
+
toggleDropdown: () => void
|
|
62
|
+
closeDropdown: () => void
|
|
63
|
+
selectItem: (option: any) => void
|
|
64
|
+
isSelected: (option: any) => boolean
|
|
65
|
+
loading: boolean
|
|
66
|
+
closeOnSelect: boolean
|
|
67
|
+
}>()
|
|
68
|
+
|
|
69
|
+
const emit = defineEmits<{
|
|
70
|
+
(e: 'update:searchtext', value: string): void
|
|
71
|
+
}>()
|
|
72
|
+
|
|
64
73
|
const searchtextModel = computed({
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
get: () => props.searchtext,
|
|
75
|
+
set: (value) => emit('update:searchtext', value)
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
function onTreeSelect(node: any) {
|
|
79
|
+
// Call the selectItem method from logic
|
|
80
|
+
props.selectItem(node)
|
|
81
|
+
|
|
82
|
+
// If closeOnSelect is true, we should close the dropdown
|
|
83
|
+
// but selectItem might have already toggled it if it was a distinct action?
|
|
84
|
+
// In KCombobox.logic.ts: selectItem sets isOptionsOpen = !closeOnSelect
|
|
85
|
+
// So it should be handled there!
|
|
86
|
+
|
|
87
|
+
// However, selectItem expects a ComboboxItem (TDataRow).
|
|
88
|
+
// KTree returns a node object which should be compatible.
|
|
70
89
|
}
|
|
71
90
|
</script>
|
|
72
91
|
|
|
73
|
-
<style scoped>
|
|
92
|
+
<style lang="scss" scoped>
|
|
74
93
|
.KTreePicker__tree-container {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
94
|
+
padding: 10px;
|
|
95
|
+
max-height: 400px;
|
|
96
|
+
overflow-y: auto;
|
|
97
|
+
min-width: 250px; // Ensure tree has some width
|
|
79
98
|
}
|
|
99
|
+
|
|
100
|
+
|
|
80
101
|
</style>
|
|
@@ -6,47 +6,48 @@
|
|
|
6
6
|
span.tree-content {{ value }}
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
|
-
<script setup>
|
|
10
|
-
defineProps
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
defineProps<{
|
|
11
|
+
value: any
|
|
12
|
+
depth: number
|
|
13
|
+
hasChildren: boolean
|
|
14
|
+
isExpanded: boolean
|
|
15
|
+
toggle: () => void
|
|
16
|
+
}>()
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<style scoped>
|
|
19
|
+
<style lang="scss" scoped>
|
|
20
20
|
.tree-cell {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 4px;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.tree-toggle {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
width: 20px;
|
|
32
|
+
height: 20px;
|
|
33
|
+
border-radius: 2px;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
background-color: var(--hover-light, #e0e0e0);
|
|
38
|
+
}
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
.tree-spacer {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
width: 20px;
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
display: inline-block;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.tree-content {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
flex: 1;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
white-space: nowrap;
|
|
51
52
|
}
|
|
52
53
|
</style>
|
|
@@ -21,35 +21,42 @@
|
|
|
21
21
|
)
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
|
-
<script setup>
|
|
25
|
-
import { computed } from
|
|
26
|
-
import KTreeCell from
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
24
|
+
<script lang="ts" setup>
|
|
25
|
+
import { computed } from 'vue'
|
|
26
|
+
import KTreeCell from './KTreeCell.vue'
|
|
27
|
+
import type { ITreeViewColumn, IRowAction } from '../../../../components/KTreeView/KTreeView.logic'
|
|
28
|
+
import type { IKDatatableAction } from '@katlux/providers'
|
|
29
|
+
|
|
30
|
+
const props = defineProps<{
|
|
31
|
+
dataProvider: any
|
|
32
|
+
columns: ITreeViewColumn[]
|
|
33
|
+
treeColumnIndex?: number
|
|
34
|
+
bulkActions?: IKDatatableAction[]
|
|
35
|
+
rowActions?: IRowAction[]
|
|
36
|
+
showCheckboxes: boolean
|
|
37
|
+
selectedRows: any[]
|
|
38
|
+
selectAll: boolean
|
|
39
|
+
expandedNodes: Set<string | number>
|
|
40
|
+
toggleNode: (id: string | number) => void
|
|
41
|
+
toggleRowSelection: (row: any) => void
|
|
42
|
+
toggleSelectAll: () => void
|
|
43
|
+
isRowSelected: (row: any) => boolean
|
|
44
|
+
// Merged cell slots from global (external slots like gantt timeline)
|
|
45
|
+
cellSlots?: Record<string, any>
|
|
46
|
+
headerSlots?: Record<string, any>
|
|
47
|
+
columnHeaders?: Record<string, string>
|
|
48
|
+
columnWidths?: Record<string, string>
|
|
49
|
+
}>()
|
|
50
|
+
|
|
51
|
+
const visibleFields = computed(() => (props.columns as ITreeViewColumn[]).map(col => col.field))
|
|
52
|
+
|
|
53
|
+
// Compute the tree column field and the dynamic slot name
|
|
54
|
+
const treeColumnField = computed(() => (props.columns as ITreeViewColumn[])[props.treeColumnIndex ?? 0]?.field)
|
|
55
|
+
const treeCellSlotName = computed(() => treeColumnField.value ? `cell-${treeColumnField.value}` : null)
|
|
49
56
|
</script>
|
|
50
57
|
|
|
51
|
-
<style scoped>
|
|
58
|
+
<style lang="scss" scoped>
|
|
52
59
|
.KTreeView {
|
|
53
|
-
|
|
60
|
+
width: 100%;
|
|
54
61
|
}
|
|
55
62
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@katlux/toolkit",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.50",
|
|
4
4
|
"description": "Core UI toolkit and utilities for the Katlux ecosystem",
|
|
5
5
|
"author": "Katlux",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
},
|
|
10
10
|
"main": "./dist/module.mjs",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "nuxt-module-build build && unbuild",
|
|
12
|
+
"build": "nuxt-module-build build && unbuild && mkdir -p dist/runtime && cp -r src/runtime/presets dist/runtime/",
|
|
13
13
|
"dev": "nuxt-module-build build --stub",
|
|
14
14
|
"prepare": "nuxi prepare",
|
|
15
15
|
"prepublishOnly": "npm run build"
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
|
-
"types": "./dist/types.d.
|
|
19
|
+
"types": "./dist/types.d.mts",
|
|
20
20
|
"import": "./dist/module.mjs",
|
|
21
|
-
"require": "./dist/module.
|
|
21
|
+
"require": "./dist/module.mjs"
|
|
22
22
|
},
|
|
23
23
|
"./package.json": "./package.json",
|
|
24
24
|
"./components/*": "./dist/runtime/components/*",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@katlux/providers": "*",
|
|
39
|
-
"@nuxt/kit": "^3.
|
|
39
|
+
"@nuxt/kit": "^3.12.0",
|
|
40
40
|
"pug": "^3.0.0",
|
|
41
41
|
"sass": "^1.80.0"
|
|
42
42
|
},
|