@katlux/toolkit 0.1.0-beta.48 → 0.1.0-beta.49
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/module.json +1 -1
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- 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/KDatatable/KDataIterator.logic.d.ts +0 -20
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +0 -12
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +3 -7
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.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/KTreeView/KTreeView.global.d.vue.ts +3 -3
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -22,7 +22,7 @@ export interface KButtonEmits {
|
|
|
22
22
|
export declare function useKButtonLogic(props: KButtonProps, emit: KButtonEmits): {
|
|
23
23
|
isLink: import("vue").ComputedRef<boolean>;
|
|
24
24
|
isDisabled: import("vue").ComputedRef<boolean | undefined>;
|
|
25
|
-
buttonClasses: import("vue").ComputedRef<("info" | "default" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "
|
|
25
|
+
buttonClasses: import("vue").ComputedRef<("info" | "default" | "small" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "large" | "medium" | {
|
|
26
26
|
disabled: boolean | undefined;
|
|
27
27
|
})[]>;
|
|
28
28
|
onClick: () => void;
|
|
@@ -9,19 +9,19 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
9
9
|
default: number;
|
|
10
10
|
};
|
|
11
11
|
definedDays: {
|
|
12
|
-
type: PropType<import("./types.js").IDefinedDay[]>;
|
|
12
|
+
type: import("vue").PropType<import("./types.js").IDefinedDay[]>;
|
|
13
13
|
default: () => never[];
|
|
14
14
|
};
|
|
15
15
|
markedDays: {
|
|
16
|
-
type: PropType<import("./types.js").IMarkedDay[]>;
|
|
16
|
+
type: import("vue").PropType<import("./types.js").IMarkedDay[]>;
|
|
17
17
|
default: () => never[];
|
|
18
18
|
};
|
|
19
19
|
day: {
|
|
20
|
-
type: PropType<Date | String>;
|
|
20
|
+
type: import("vue").PropType<Date | String>;
|
|
21
21
|
required: boolean;
|
|
22
22
|
};
|
|
23
23
|
selectedDay: {
|
|
24
|
-
type: PropType<Date | String>;
|
|
24
|
+
type: import("vue").PropType<Date | String>;
|
|
25
25
|
default: null;
|
|
26
26
|
};
|
|
27
27
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -38,19 +38,19 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
38
38
|
default: number;
|
|
39
39
|
};
|
|
40
40
|
definedDays: {
|
|
41
|
-
type: PropType<import("./types.js").IDefinedDay[]>;
|
|
41
|
+
type: import("vue").PropType<import("./types.js").IDefinedDay[]>;
|
|
42
42
|
default: () => never[];
|
|
43
43
|
};
|
|
44
44
|
markedDays: {
|
|
45
|
-
type: PropType<import("./types.js").IMarkedDay[]>;
|
|
45
|
+
type: import("vue").PropType<import("./types.js").IMarkedDay[]>;
|
|
46
46
|
default: () => never[];
|
|
47
47
|
};
|
|
48
48
|
day: {
|
|
49
|
-
type: PropType<Date | String>;
|
|
49
|
+
type: import("vue").PropType<Date | String>;
|
|
50
50
|
required: boolean;
|
|
51
51
|
};
|
|
52
52
|
selectedDay: {
|
|
53
|
-
type: PropType<Date | String>;
|
|
53
|
+
type: import("vue").PropType<Date | String>;
|
|
54
54
|
default: null;
|
|
55
55
|
};
|
|
56
56
|
}>> & Readonly<{
|
|
@@ -59,10 +59,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
59
59
|
}>, {
|
|
60
60
|
view: string;
|
|
61
61
|
viewCount: number;
|
|
62
|
-
definedDays:
|
|
63
|
-
markedDays:
|
|
64
|
-
|
|
65
|
-
selectedDay: any;
|
|
62
|
+
definedDays: import("./types.js").IDefinedDay[];
|
|
63
|
+
markedDays: import("./types.js").IMarkedDay[];
|
|
64
|
+
selectedDay: String | Date;
|
|
66
65
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
67
66
|
declare const _default: typeof __VLS_export;
|
|
68
67
|
export default _default;
|
|
@@ -9,19 +9,19 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
9
9
|
default: number;
|
|
10
10
|
};
|
|
11
11
|
definedDays: {
|
|
12
|
-
type: PropType<import("./types.js").IDefinedDay[]>;
|
|
12
|
+
type: import("vue").PropType<import("./types.js").IDefinedDay[]>;
|
|
13
13
|
default: () => never[];
|
|
14
14
|
};
|
|
15
15
|
markedDays: {
|
|
16
|
-
type: PropType<import("./types.js").IMarkedDay[]>;
|
|
16
|
+
type: import("vue").PropType<import("./types.js").IMarkedDay[]>;
|
|
17
17
|
default: () => never[];
|
|
18
18
|
};
|
|
19
19
|
day: {
|
|
20
|
-
type: PropType<Date | String>;
|
|
20
|
+
type: import("vue").PropType<Date | String>;
|
|
21
21
|
required: boolean;
|
|
22
22
|
};
|
|
23
23
|
selectedDay: {
|
|
24
|
-
type: PropType<Date | String>;
|
|
24
|
+
type: import("vue").PropType<Date | String>;
|
|
25
25
|
default: null;
|
|
26
26
|
};
|
|
27
27
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -38,19 +38,19 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
38
38
|
default: number;
|
|
39
39
|
};
|
|
40
40
|
definedDays: {
|
|
41
|
-
type: PropType<import("./types.js").IDefinedDay[]>;
|
|
41
|
+
type: import("vue").PropType<import("./types.js").IDefinedDay[]>;
|
|
42
42
|
default: () => never[];
|
|
43
43
|
};
|
|
44
44
|
markedDays: {
|
|
45
|
-
type: PropType<import("./types.js").IMarkedDay[]>;
|
|
45
|
+
type: import("vue").PropType<import("./types.js").IMarkedDay[]>;
|
|
46
46
|
default: () => never[];
|
|
47
47
|
};
|
|
48
48
|
day: {
|
|
49
|
-
type: PropType<Date | String>;
|
|
49
|
+
type: import("vue").PropType<Date | String>;
|
|
50
50
|
required: boolean;
|
|
51
51
|
};
|
|
52
52
|
selectedDay: {
|
|
53
|
-
type: PropType<Date | String>;
|
|
53
|
+
type: import("vue").PropType<Date | String>;
|
|
54
54
|
default: null;
|
|
55
55
|
};
|
|
56
56
|
}>> & Readonly<{
|
|
@@ -59,10 +59,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
59
59
|
}>, {
|
|
60
60
|
view: string;
|
|
61
61
|
viewCount: number;
|
|
62
|
-
definedDays:
|
|
63
|
-
markedDays:
|
|
64
|
-
|
|
65
|
-
selectedDay: any;
|
|
62
|
+
definedDays: import("./types.js").IDefinedDay[];
|
|
63
|
+
markedDays: import("./types.js").IMarkedDay[];
|
|
64
|
+
selectedDay: String | Date;
|
|
66
65
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
67
66
|
declare const _default: typeof __VLS_export;
|
|
68
67
|
export default _default;
|
|
@@ -33,14 +33,30 @@ export function useKCalendarLogic(props, emit) {
|
|
|
33
33
|
const actualWeek = ref();
|
|
34
34
|
const actualYear = ref();
|
|
35
35
|
const currentView = computed(() => props.view ?? "month");
|
|
36
|
+
function initViewFromDate(dateInput) {
|
|
37
|
+
if (!dateInput) return false;
|
|
38
|
+
const date = typeof dateInput === "string" ? new Date(dateInput) : dateInput;
|
|
39
|
+
if (!isNaN(date.getTime())) {
|
|
40
|
+
actualMonth.value = date.getMonth() + 1;
|
|
41
|
+
actualYear.value = date.getFullYear();
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
36
46
|
watch(
|
|
37
47
|
() => props.day,
|
|
38
48
|
(newVal) => {
|
|
39
49
|
if (!newVal) return;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
initViewFromDate(newVal);
|
|
51
|
+
},
|
|
52
|
+
{ immediate: true }
|
|
53
|
+
);
|
|
54
|
+
watch(
|
|
55
|
+
() => props.selectedDay,
|
|
56
|
+
(newValue) => {
|
|
57
|
+
monthSelectedDay.value = newValue ?? "";
|
|
58
|
+
if (!props.day && actualYear.value === void 0) {
|
|
59
|
+
initViewFromDate(newValue);
|
|
44
60
|
}
|
|
45
61
|
},
|
|
46
62
|
{ immediate: true }
|
|
@@ -52,14 +68,13 @@ export function useKCalendarLogic(props, emit) {
|
|
|
52
68
|
emit("update:selectedDay", newValue);
|
|
53
69
|
}
|
|
54
70
|
);
|
|
55
|
-
watch(
|
|
56
|
-
() => props.selectedDay,
|
|
57
|
-
(newValue) => {
|
|
58
|
-
monthSelectedDay.value = newValue;
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
71
|
onMounted(() => {
|
|
62
72
|
monthSelectedDay.value = props.selectedDay || "";
|
|
73
|
+
if (actualYear.value === void 0) {
|
|
74
|
+
const now = /* @__PURE__ */ new Date();
|
|
75
|
+
actualMonth.value = now.getMonth() + 1;
|
|
76
|
+
actualYear.value = now.getFullYear();
|
|
77
|
+
}
|
|
63
78
|
});
|
|
64
79
|
const months = [
|
|
65
80
|
"January",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ADataProvider } from '@katlux/providers';
|
|
2
|
-
export interface KDataIteratorProps {
|
|
3
|
-
dataProvider: ADataProvider;
|
|
4
|
-
visibleFields?: Array<string> | null;
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
search?: string;
|
|
7
|
-
itemsPerPage?: number;
|
|
8
|
-
page?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const KDataIteratorDefaultProps: {
|
|
11
|
-
visibleFields: null;
|
|
12
|
-
loading: boolean;
|
|
13
|
-
search: string;
|
|
14
|
-
itemsPerPage: number;
|
|
15
|
-
page: number;
|
|
16
|
-
};
|
|
17
|
-
export declare function useKDataIteratorLogic(props: KDataIteratorProps): {
|
|
18
|
-
selectedRows: import("vue").Ref<any[], any[]>;
|
|
19
|
-
selectAll: import("vue").Ref<boolean, boolean>;
|
|
20
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ADataProvider } from '@katlux/providers';
|
|
2
|
-
export interface KDatatableProps {
|
|
3
|
-
dataProvider: ADataProvider;
|
|
4
|
-
visibleFields?: Array<string> | null;
|
|
5
|
-
}
|
|
6
|
-
export declare const KDatatableDefaultProps: {
|
|
7
|
-
visibleFields: null;
|
|
8
|
-
};
|
|
9
|
-
export declare function useKDatatableLogic(props: KDatatableProps): {
|
|
10
|
-
selectedRows: import("vue").Ref<any[], any[]>;
|
|
11
|
-
selectAll: import("vue").Ref<boolean, boolean>;
|
|
12
|
-
};
|
|
@@ -78,8 +78,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
78
78
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
79
79
|
}>, {
|
|
80
80
|
isOpen: boolean;
|
|
81
|
-
day: string | Date;
|
|
82
81
|
modelValue: string | Date;
|
|
82
|
+
day: string | Date;
|
|
83
83
|
teleportTo: string;
|
|
84
84
|
format: string;
|
|
85
85
|
showClear: boolean;
|
|
@@ -78,8 +78,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
78
78
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
79
79
|
}>, {
|
|
80
80
|
isOpen: boolean;
|
|
81
|
-
day: string | Date;
|
|
82
81
|
modelValue: string | Date;
|
|
82
|
+
day: string | Date;
|
|
83
83
|
teleportTo: string;
|
|
84
84
|
format: string;
|
|
85
85
|
showClear: boolean;
|
|
@@ -46,18 +46,14 @@ export function useKDatePickerLogic(props) {
|
|
|
46
46
|
}
|
|
47
47
|
const format = props.format;
|
|
48
48
|
let day = "", month = "", year = "";
|
|
49
|
-
let rawIdx = 0;
|
|
50
49
|
for (let i = 0; i < format.length; i++) {
|
|
51
50
|
const char = format[i];
|
|
52
51
|
if (char === "M") {
|
|
53
|
-
month += newVal[
|
|
54
|
-
rawIdx++;
|
|
52
|
+
month += newVal[i] || "";
|
|
55
53
|
} else if (char === "D") {
|
|
56
|
-
day += newVal[
|
|
57
|
-
rawIdx++;
|
|
54
|
+
day += newVal[i] || "";
|
|
58
55
|
} else if (char === "Y") {
|
|
59
|
-
year += newVal[
|
|
60
|
-
rawIdx++;
|
|
56
|
+
year += newVal[i] || "";
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
59
|
if (month.length === 2 && day.length === 2 && year.length === 4) {
|
|
@@ -92,8 +92,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
92
92
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
93
93
|
}>, {
|
|
94
94
|
isOpen: boolean;
|
|
95
|
-
day: string | Date;
|
|
96
95
|
modelValue: string | Date;
|
|
96
|
+
day: string | Date;
|
|
97
97
|
teleportTo: string;
|
|
98
98
|
format: string;
|
|
99
99
|
showClear: boolean;
|
|
@@ -92,8 +92,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
92
92
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
93
93
|
}>, {
|
|
94
94
|
isOpen: boolean;
|
|
95
|
-
day: string | Date;
|
|
96
95
|
modelValue: string | Date;
|
|
96
|
+
day: string | Date;
|
|
97
97
|
teleportTo: string;
|
|
98
98
|
format: string;
|
|
99
99
|
showClear: boolean;
|
|
@@ -103,8 +103,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
103
103
|
onChange?: ((value: any) => any) | undefined;
|
|
104
104
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
105
105
|
}>, {
|
|
106
|
-
parentKey: string;
|
|
107
|
-
idKey: string;
|
|
108
106
|
disabled: boolean;
|
|
109
107
|
loading: boolean;
|
|
110
108
|
modelValue: any;
|
|
@@ -114,6 +112,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
114
112
|
closeOnSelect: boolean;
|
|
115
113
|
multiSelect: boolean;
|
|
116
114
|
iconField: string;
|
|
115
|
+
idKey: string;
|
|
116
|
+
parentKey: string;
|
|
117
117
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
118
118
|
declare const _default: typeof __VLS_export;
|
|
119
119
|
export default _default;
|
|
@@ -103,8 +103,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
103
103
|
onChange?: ((value: any) => any) | undefined;
|
|
104
104
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
105
105
|
}>, {
|
|
106
|
-
parentKey: string;
|
|
107
|
-
idKey: string;
|
|
108
106
|
disabled: boolean;
|
|
109
107
|
loading: boolean;
|
|
110
108
|
modelValue: any;
|
|
@@ -114,6 +112,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
114
112
|
closeOnSelect: boolean;
|
|
115
113
|
multiSelect: boolean;
|
|
116
114
|
iconField: string;
|
|
115
|
+
idKey: string;
|
|
116
|
+
parentKey: string;
|
|
117
117
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
118
118
|
declare const _default: typeof __VLS_export;
|
|
119
119
|
export default _default;
|
|
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
default: () => {};
|
|
82
82
|
};
|
|
83
83
|
}>> & Readonly<{}>, {
|
|
84
|
-
parentKey: string;
|
|
85
|
-
idKey: string;
|
|
86
|
-
expandedByDefault: boolean;
|
|
87
84
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
88
85
|
rowActions: import("./KTreeView.logic.js").IRowAction[];
|
|
89
86
|
cellSlots: Record<string, any>;
|
|
90
87
|
headerSlots: Record<string, any>;
|
|
91
88
|
treeColumnIndex: number;
|
|
89
|
+
idKey: string;
|
|
90
|
+
parentKey: string;
|
|
91
|
+
expandedByDefault: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
93
|
declare const _default: typeof __VLS_export;
|
|
94
94
|
export default _default;
|
|
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
default: () => {};
|
|
82
82
|
};
|
|
83
83
|
}>> & Readonly<{}>, {
|
|
84
|
-
parentKey: string;
|
|
85
|
-
idKey: string;
|
|
86
|
-
expandedByDefault: boolean;
|
|
87
84
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
88
85
|
rowActions: import("./KTreeView.logic.js").IRowAction[];
|
|
89
86
|
cellSlots: Record<string, any>;
|
|
90
87
|
headerSlots: Record<string, any>;
|
|
91
88
|
treeColumnIndex: number;
|
|
89
|
+
idKey: string;
|
|
90
|
+
parentKey: string;
|
|
91
|
+
expandedByDefault: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
93
|
declare const _default: typeof __VLS_export;
|
|
94
94
|
export default _default;
|