@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
|
@@ -17,41 +17,50 @@
|
|
|
17
17
|
span(v-if="showNoRecord") No record
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
|
-
<script setup>
|
|
21
|
-
import { computed } from
|
|
22
|
-
import { ADataProvider } from
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { computed } from 'vue'
|
|
22
|
+
import { ADataProvider } from '@katlux/providers'
|
|
23
|
+
import type { IKDatatableAction } from '@katlux/providers'
|
|
24
|
+
import KBulkActions from '../KBulkActions/KBulkActions.vue'
|
|
25
|
+
import KPagination from '../KPagination/KPagination.vue'
|
|
26
|
+
import KLoader from '../../../../components/KLoader/KLoader.global.vue'
|
|
27
|
+
|
|
28
|
+
const props = defineProps<{
|
|
29
|
+
dataProvider: ADataProvider
|
|
30
|
+
visibleFields: Array<string> | null
|
|
31
|
+
rowActions: Array<IKDatatableAction>
|
|
32
|
+
bulkActions: Array<IKDatatableAction>
|
|
33
|
+
selectedRows: any[]
|
|
34
|
+
selectAll: boolean
|
|
35
|
+
loading?: boolean
|
|
36
|
+
search?: string
|
|
37
|
+
itemsPerPage?: number
|
|
38
|
+
page?: number
|
|
39
|
+
slots?: any
|
|
40
|
+
}>()
|
|
41
|
+
|
|
42
|
+
const emit = defineEmits<{
|
|
43
|
+
(e: 'update:selectedRows', value: any[]): void
|
|
44
|
+
(e: 'update:selectAll', value: boolean): void
|
|
45
|
+
}>()
|
|
46
|
+
|
|
40
47
|
const selectedRows = computed({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
48
|
+
get: () => props.selectedRows,
|
|
49
|
+
set: (val) => emit('update:selectedRows', val)
|
|
50
|
+
})
|
|
51
|
+
|
|
44
52
|
const selectAll = computed({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const
|
|
53
|
+
get: () => props.selectAll,
|
|
54
|
+
set: (val) => emit('update:selectAll', val)
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const isLoading = computed(() => props.loading || props.dataProvider.loading?.value || (props.dataProvider as any).initialLoad?.value || false)
|
|
58
|
+
const hasData = computed(() => (props.dataProvider.pageData.value?.length || 0) > 0)
|
|
59
|
+
const showNoRecord = computed(() => !isLoading.value && !hasData.value)
|
|
51
60
|
</script>
|
|
52
61
|
|
|
53
|
-
<style scoped>
|
|
62
|
+
<style lang="scss" scoped>
|
|
54
63
|
.k-data-iterator {
|
|
55
|
-
|
|
64
|
+
position: relative;
|
|
56
65
|
}
|
|
57
66
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.k-datatable(:style="{ '--page-size': props.dataProvider?.pageSize?.value || 10 }")
|
|
3
|
-
KGrid(:flex-child="true")
|
|
3
|
+
KGrid(:flex-child="true" align="stretch" direction="column")
|
|
4
4
|
.datatable-container
|
|
5
5
|
KLoader(:loading="isLoading" overlay)
|
|
6
6
|
table
|
|
@@ -37,102 +37,120 @@
|
|
|
37
37
|
KPagination.pagination(:dataProvider="props.dataProvider")
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
|
-
<script setup>
|
|
41
|
-
import { computed } from
|
|
42
|
-
import { ADataProvider } from
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
<script setup lang="ts">
|
|
41
|
+
import { computed } from 'vue'
|
|
42
|
+
import { ADataProvider } from '@katlux/providers'
|
|
43
|
+
import type { IKDatatableAction } from '@katlux/providers'
|
|
44
|
+
|
|
45
|
+
const props = defineProps<{
|
|
46
|
+
dataProvider: ADataProvider
|
|
47
|
+
visibleFields: Array<string> | null
|
|
48
|
+
rowActions: Array<IKDatatableAction>
|
|
49
|
+
bulkActions: Array<IKDatatableAction>
|
|
50
|
+
selectedRows: any[]
|
|
51
|
+
selectAll: boolean
|
|
52
|
+
cellSlots?: Record<string, any>
|
|
53
|
+
headerSlots?: Record<string, any>
|
|
54
|
+
columnHeaders?: Record<string, string>
|
|
55
|
+
columnWidths?: Record<string, string>
|
|
56
|
+
}>()
|
|
57
|
+
|
|
58
|
+
const emit = defineEmits<{
|
|
59
|
+
(e: 'update:selectedRows', value: any[]): void
|
|
60
|
+
(e: 'update:selectAll', value: boolean): void
|
|
61
|
+
}>()
|
|
62
|
+
|
|
63
|
+
// Bi-directional binding helpers
|
|
56
64
|
const selectedRows = computed({
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})
|
|
65
|
+
get: () => props.selectedRows,
|
|
66
|
+
set: (val) => emit('update:selectedRows', val)
|
|
67
|
+
})
|
|
68
|
+
|
|
60
69
|
const selectAll = computed({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
})
|
|
64
|
-
const getCellSlot = (fieldName) => {
|
|
65
|
-
const slotName = "cell-" + fieldName;
|
|
66
|
-
return props.cellSlots?.[slotName];
|
|
67
|
-
};
|
|
68
|
-
const getHeaderSlot = (fieldName) => {
|
|
69
|
-
const slotName = "header-" + fieldName;
|
|
70
|
-
return props.headerSlots?.[slotName] || props.cellSlots?.[slotName];
|
|
71
|
-
};
|
|
72
|
-
const getColumnStyle = (field) => {
|
|
73
|
-
const w = props.columnWidths?.[field];
|
|
74
|
-
if (!w) return void 0;
|
|
75
|
-
return { width: w, whiteSpace: "nowrap" };
|
|
76
|
-
};
|
|
77
|
-
const isLoading = computed(() => {
|
|
78
|
-
return props.dataProvider.loading.value || props.dataProvider.initialLoad?.value || false;
|
|
79
|
-
});
|
|
80
|
-
</script>
|
|
70
|
+
get: () => props.selectAll,
|
|
71
|
+
set: (val) => emit('update:selectAll', val)
|
|
72
|
+
})
|
|
81
73
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
width: 100%;
|
|
86
|
-
}
|
|
87
|
-
.k-datatable .datatable-container {
|
|
88
|
-
min-height: calc(var(--page-height) * (var(--page-size) + 1));
|
|
89
|
-
position: relative;
|
|
90
|
-
}
|
|
91
|
-
.k-datatable table {
|
|
92
|
-
width: 100%;
|
|
93
|
-
border-collapse: collapse;
|
|
94
|
-
border: 1px solid #cccccc;
|
|
95
|
-
}
|
|
96
|
-
.k-datatable table thead tr {
|
|
97
|
-
height: var(--page-height);
|
|
98
|
-
}
|
|
99
|
-
.k-datatable table thead tr th {
|
|
100
|
-
border-bottom: 1px solid #cccccc;
|
|
101
|
-
border-left: 1px solid #cccccc;
|
|
102
|
-
padding: 5px;
|
|
103
|
-
}
|
|
104
|
-
.k-datatable table thead tr th:first-child {
|
|
105
|
-
border-left: none;
|
|
106
|
-
}
|
|
107
|
-
.k-datatable table tbody tr {
|
|
108
|
-
height: 40px;
|
|
109
|
-
background-color: #faf8f8;
|
|
74
|
+
const getCellSlot = (fieldName: string) => {
|
|
75
|
+
const slotName = 'cell-' + fieldName
|
|
76
|
+
return props.cellSlots?.[slotName]
|
|
110
77
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.
|
|
115
|
-
background-color: #f5e2e2;
|
|
116
|
-
}
|
|
117
|
-
.k-datatable table tbody tr td {
|
|
118
|
-
padding: 5px;
|
|
119
|
-
}
|
|
120
|
-
.k-datatable .check {
|
|
121
|
-
width: 30px;
|
|
122
|
-
}
|
|
123
|
-
.k-datatable .rowAction {
|
|
124
|
-
width: 30px;
|
|
125
|
-
}
|
|
126
|
-
.k-datatable .rowAction {
|
|
127
|
-
display: flex;
|
|
128
|
-
gap: 10px;
|
|
78
|
+
|
|
79
|
+
const getHeaderSlot = (fieldName: string) => {
|
|
80
|
+
const slotName = 'header-' + fieldName
|
|
81
|
+
return props.headerSlots?.[slotName] || props.cellSlots?.[slotName]
|
|
129
82
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
83
|
+
|
|
84
|
+
const getColumnStyle = (field: string) => {
|
|
85
|
+
const w = props.columnWidths?.[field]
|
|
86
|
+
if (!w) return undefined
|
|
87
|
+
return { width: w, whiteSpace: 'nowrap' as const }
|
|
134
88
|
}
|
|
135
|
-
|
|
136
|
-
|
|
89
|
+
|
|
90
|
+
const isLoading = computed(() => {
|
|
91
|
+
return props.dataProvider.loading.value || (props.dataProvider as any).initialLoad?.value || false
|
|
92
|
+
})
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<style lang="scss" scoped>
|
|
96
|
+
.k-datatable {
|
|
97
|
+
--page-height: 40px;
|
|
98
|
+
width: 100%;
|
|
99
|
+
.datatable-container {
|
|
100
|
+
min-height: calc(var(--page-height) * (var(--page-size) + 1));
|
|
101
|
+
position: relative; // Ensure loader overlay is contained
|
|
102
|
+
}
|
|
103
|
+
table {
|
|
104
|
+
width: 100%;
|
|
105
|
+
border-collapse: collapse;
|
|
106
|
+
border: 1px solid #cccccc;
|
|
107
|
+
thead {
|
|
108
|
+
tr {
|
|
109
|
+
background-color: color-mix(in srgb, var(--yellow-500), transparent 92%);
|
|
110
|
+
height: var(--page-height);
|
|
111
|
+
th {
|
|
112
|
+
border-bottom: 1px solid #cccccc;
|
|
113
|
+
border-left: 1px solid #cccccc;
|
|
114
|
+
padding: 5px;
|
|
115
|
+
&:first-child {
|
|
116
|
+
border-left: none;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
tbody {
|
|
122
|
+
tr {
|
|
123
|
+
height: 40px;
|
|
124
|
+
background-color: #faf8f8;
|
|
125
|
+
&:nth-child(2n + 1) {
|
|
126
|
+
background-color: #ede9e9;
|
|
127
|
+
}
|
|
128
|
+
&:hover {
|
|
129
|
+
background-color: #f5e2e2;
|
|
130
|
+
}
|
|
131
|
+
td {
|
|
132
|
+
padding: 5px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
.check {
|
|
138
|
+
width: 30px;
|
|
139
|
+
}
|
|
140
|
+
.rowAction {
|
|
141
|
+
width: 30px;
|
|
142
|
+
}
|
|
143
|
+
.rowAction {
|
|
144
|
+
display: flex;
|
|
145
|
+
gap: 10px;
|
|
146
|
+
}
|
|
147
|
+
.footer {
|
|
148
|
+
display: flex;
|
|
149
|
+
justify-content: space-between;
|
|
150
|
+
align-items: center;
|
|
151
|
+
.pagination {
|
|
152
|
+
flex: 1;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
137
155
|
}
|
|
138
156
|
</style>
|
|
@@ -5,10 +5,17 @@ type __VLS_Props = {
|
|
|
5
5
|
_date: any;
|
|
6
6
|
calendarDay: Date | string;
|
|
7
7
|
format: string;
|
|
8
|
+
showClear: boolean;
|
|
8
9
|
calendarDefinedDays: IDefinedDay[];
|
|
9
10
|
calendarMarkedDays: IMarkedDay[];
|
|
10
11
|
textboxClicked: () => void;
|
|
12
|
+
onClear?: () => void;
|
|
11
13
|
dateSelected: (date: Date) => void;
|
|
14
|
+
teleportTo?: string;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
17
|
+
validationText?: string;
|
|
18
|
+
align?: 'left' | 'right';
|
|
12
19
|
};
|
|
13
20
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
21
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,33 +1,66 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KDatePicker
|
|
3
|
-
KMaskTextbox(
|
|
4
|
-
|
|
2
|
+
.KDatePicker(ref="activatorRef")
|
|
3
|
+
KMaskTextbox(
|
|
4
|
+
v-model="maskedModel"
|
|
5
|
+
:key="maskedModel"
|
|
6
|
+
:mask="format"
|
|
7
|
+
:placeholder="placeholder || format"
|
|
8
|
+
@click.stop="textboxClicked"
|
|
9
|
+
:showClear="showClear"
|
|
10
|
+
@clear="onClear"
|
|
11
|
+
:validation="validation"
|
|
12
|
+
:validationText="validationText"
|
|
13
|
+
)
|
|
14
|
+
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo" :align="align")
|
|
5
15
|
KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
|
|
6
16
|
</template>
|
|
7
17
|
|
|
8
|
-
<script setup>
|
|
9
|
-
import { computed, watch } from
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
<script lang="ts" setup>
|
|
19
|
+
import { computed, watch, ref } from 'vue'
|
|
20
|
+
const activatorRef = ref<HTMLElement | null>(null)
|
|
21
|
+
import type {
|
|
22
|
+
IMarkedDay,
|
|
23
|
+
IDefinedDay,
|
|
24
|
+
} from '../../../../components/KCalendar/types'
|
|
25
|
+
|
|
26
|
+
const props = defineProps<{
|
|
27
|
+
maskedModel: string
|
|
28
|
+
calendarShow: boolean
|
|
29
|
+
_date: any
|
|
30
|
+
calendarDay: Date | string
|
|
31
|
+
format: string
|
|
32
|
+
showClear: boolean
|
|
33
|
+
calendarDefinedDays: IDefinedDay[]
|
|
34
|
+
calendarMarkedDays: IMarkedDay[]
|
|
35
|
+
textboxClicked: () => void
|
|
36
|
+
onClear?: () => void
|
|
37
|
+
dateSelected: (date: Date) => void
|
|
38
|
+
teleportTo?: string
|
|
39
|
+
placeholder?: string
|
|
40
|
+
validation?: 'success' | 'warning' | 'error' | null
|
|
41
|
+
validationText?: string
|
|
42
|
+
align?: 'left' | 'right'
|
|
43
|
+
}>()
|
|
44
|
+
|
|
45
|
+
const emit = defineEmits<{
|
|
46
|
+
(e: 'update:maskedModel', value: string): void
|
|
47
|
+
(e: 'update:calendarShow', value: boolean): void
|
|
48
|
+
}>()
|
|
49
|
+
|
|
22
50
|
const maskedModel = computed({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
51
|
+
get: () => props.maskedModel,
|
|
52
|
+
set: (value) => emit('update:maskedModel', value)
|
|
53
|
+
})
|
|
54
|
+
|
|
26
55
|
const calendarShow = computed({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
56
|
+
get: () => props.calendarShow,
|
|
57
|
+
set: (value) => emit('update:calendarShow', value)
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
// Debug: watch prop changes
|
|
30
61
|
watch(() => props.maskedModel, (newVal) => {
|
|
31
|
-
|
|
32
|
-
});
|
|
62
|
+
})
|
|
33
63
|
</script>
|
|
64
|
+
|
|
65
|
+
<style lang="scss" scoped>
|
|
66
|
+
</style>
|
|
@@ -5,10 +5,17 @@ type __VLS_Props = {
|
|
|
5
5
|
_date: any;
|
|
6
6
|
calendarDay: Date | string;
|
|
7
7
|
format: string;
|
|
8
|
+
showClear: boolean;
|
|
8
9
|
calendarDefinedDays: IDefinedDay[];
|
|
9
10
|
calendarMarkedDays: IMarkedDay[];
|
|
10
11
|
textboxClicked: () => void;
|
|
12
|
+
onClear?: () => void;
|
|
11
13
|
dateSelected: (date: Date) => void;
|
|
14
|
+
teleportTo?: string;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
17
|
+
validationText?: string;
|
|
18
|
+
align?: 'left' | 'right';
|
|
12
19
|
};
|
|
13
20
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
21
|
"update:maskedModel": (value: string) => any;
|
|
@@ -10,9 +10,15 @@ type __VLS_Props = {
|
|
|
10
10
|
timeStep: number;
|
|
11
11
|
calendarDefinedDays: IDefinedDay[];
|
|
12
12
|
calendarMarkedDays: IMarkedDay[];
|
|
13
|
+
showClear: boolean;
|
|
13
14
|
textboxClicked: () => void;
|
|
15
|
+
onClear?: () => void;
|
|
14
16
|
dateSelected: (date: Date) => void;
|
|
15
17
|
timeSelected: (time: string) => void;
|
|
18
|
+
teleportTo?: string;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
21
|
+
validationText?: string;
|
|
16
22
|
};
|
|
17
23
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
24
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,66 +1,95 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KDateTimePicker
|
|
3
|
-
KMaskTextbox(
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
.KDateTimePicker(ref="activatorRef" @click.stop="textboxClicked")
|
|
3
|
+
KMaskTextbox(
|
|
4
|
+
v-model="maskedModel"
|
|
5
|
+
:key="maskedModel"
|
|
6
|
+
:mask="format"
|
|
7
|
+
:placeholder="placeholder || (format || 'MM-DD-YYYY HH:mm')"
|
|
8
|
+
@click.stop="textboxClicked"
|
|
9
|
+
:showClear="showClear"
|
|
10
|
+
@clear="onClear"
|
|
11
|
+
:validation="validation"
|
|
12
|
+
:validationText="validationText"
|
|
13
|
+
)
|
|
14
|
+
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo")
|
|
15
|
+
KGrid(direction="row" align="start" :noGap="false" wrap="nowrap").datetime-picker-grid
|
|
6
16
|
.calendar-section
|
|
7
17
|
KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
|
|
8
18
|
.time-section
|
|
9
19
|
KHourSelect(v-model="_time" :format="timeFormat" :step="timeStep" @update:modelValue="timeSelected")
|
|
10
20
|
</template>
|
|
11
21
|
|
|
12
|
-
<script setup>
|
|
13
|
-
import { computed } from
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
<script lang="ts" setup>
|
|
23
|
+
import { computed, watch, ref } from 'vue'
|
|
24
|
+
const activatorRef = ref<HTMLElement | null>(null)
|
|
25
|
+
import type {
|
|
26
|
+
IMarkedDay,
|
|
27
|
+
IDefinedDay,
|
|
28
|
+
} from '../../../../components/KCalendar/types'
|
|
29
|
+
|
|
30
|
+
const props = defineProps<{
|
|
31
|
+
maskedModel: string
|
|
32
|
+
calendarShow: boolean
|
|
33
|
+
_date: any
|
|
34
|
+
_time: string
|
|
35
|
+
calendarDay: Date | string
|
|
36
|
+
format: string
|
|
37
|
+
timeFormat: string
|
|
38
|
+
timeStep: number
|
|
39
|
+
calendarDefinedDays: IDefinedDay[]
|
|
40
|
+
calendarMarkedDays: IMarkedDay[]
|
|
41
|
+
showClear: boolean
|
|
42
|
+
textboxClicked: () => void
|
|
43
|
+
onClear?: () => void
|
|
44
|
+
dateSelected: (date: Date) => void
|
|
45
|
+
timeSelected: (time: string) => void
|
|
46
|
+
teleportTo?: string
|
|
47
|
+
placeholder?: string
|
|
48
|
+
validation?: 'success' | 'warning' | 'error' | null
|
|
49
|
+
validationText?: string
|
|
50
|
+
}>()
|
|
51
|
+
|
|
52
|
+
const emit = defineEmits<{
|
|
53
|
+
(e: 'update:maskedModel', value: string): void
|
|
54
|
+
(e: 'update:calendarShow', value: boolean): void
|
|
55
|
+
}>()
|
|
56
|
+
|
|
30
57
|
const maskedModel = computed({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
58
|
+
get: () => props.maskedModel,
|
|
59
|
+
set: (value) => emit('update:maskedModel', value)
|
|
60
|
+
})
|
|
61
|
+
|
|
34
62
|
const calendarShow = computed({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
63
|
+
get: () => props.calendarShow,
|
|
64
|
+
set: (value) => emit('update:calendarShow', value)
|
|
65
|
+
})
|
|
66
|
+
|
|
38
67
|
const _time = computed({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
68
|
+
get: () => props._time,
|
|
69
|
+
set: (value) => props.timeSelected(value)
|
|
70
|
+
})
|
|
42
71
|
</script>
|
|
43
72
|
|
|
44
|
-
<style scoped>
|
|
45
|
-
.KDateTimePicker
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
73
|
+
<style lang="scss" scoped>
|
|
74
|
+
.KDateTimePicker {
|
|
75
|
+
position: relative;
|
|
76
|
+
.datetime-picker-grid {
|
|
77
|
+
width: max-content;
|
|
78
|
+
padding: 8px;
|
|
79
|
+
|
|
80
|
+
.calendar-section {
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.time-section {
|
|
84
|
+
min-width: 120px;
|
|
85
|
+
|
|
86
|
+
:deep(.KHourSelect) {
|
|
87
|
+
.time-list {
|
|
88
|
+
max-height: 310px;
|
|
89
|
+
overflow-y: auto;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
65
94
|
}
|
|
66
95
|
</style>
|
|
@@ -10,9 +10,15 @@ type __VLS_Props = {
|
|
|
10
10
|
timeStep: number;
|
|
11
11
|
calendarDefinedDays: IDefinedDay[];
|
|
12
12
|
calendarMarkedDays: IMarkedDay[];
|
|
13
|
+
showClear: boolean;
|
|
13
14
|
textboxClicked: () => void;
|
|
15
|
+
onClear?: () => void;
|
|
14
16
|
dateSelected: (date: Date) => void;
|
|
15
17
|
timeSelected: (time: string) => void;
|
|
18
|
+
teleportTo?: string;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
21
|
+
validationText?: string;
|
|
16
22
|
};
|
|
17
23
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
24
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
open: boolean;
|
|
3
3
|
fullWidth: boolean;
|
|
4
|
+
anchorEl?: HTMLElement;
|
|
5
|
+
dropdownRect: {
|
|
6
|
+
top: number;
|
|
7
|
+
left: number;
|
|
8
|
+
right: number;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
4
11
|
clickoutside: () => void;
|
|
12
|
+
teleportTarget: string | null;
|
|
13
|
+
isInModal: boolean;
|
|
14
|
+
align?: 'left' | 'right';
|
|
5
15
|
};
|
|
6
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
17
|
declare const _default: typeof __VLS_export;
|