@katlux/toolkit 0.1.0-beta.57 → 0.1.0-beta.58
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/KCombobox/KCombobox.global.d.vue.ts +9 -0
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +4 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +9 -0
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +5 -0
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +4 -0
- 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/KDateTimePicker/KDateTimePicker.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +9 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +2 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +9 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +5 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +4 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +16 -12
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +2 -1
- package/dist/runtime/presets/default/components/KTree/KTree.vue +1 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +21 -20
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -61,6 +61,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
61
61
|
type: BooleanConstructor;
|
|
62
62
|
default: undefined;
|
|
63
63
|
};
|
|
64
|
+
fullWidth: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
64
68
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
65
69
|
"update:modelValue": (value: any) => any;
|
|
66
70
|
"update:isOptionsOpen": (value: boolean) => any;
|
|
@@ -126,6 +130,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
126
130
|
type: BooleanConstructor;
|
|
127
131
|
default: undefined;
|
|
128
132
|
};
|
|
133
|
+
fullWidth: {
|
|
134
|
+
type: BooleanConstructor;
|
|
135
|
+
default: boolean;
|
|
136
|
+
};
|
|
129
137
|
}>> & Readonly<{
|
|
130
138
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
131
139
|
"onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
|
|
@@ -138,6 +146,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
138
146
|
isOptionsOpen: boolean;
|
|
139
147
|
placeholder: string;
|
|
140
148
|
teleportTo: string;
|
|
149
|
+
fullWidth: boolean;
|
|
141
150
|
closeOnSelect: boolean;
|
|
142
151
|
multiSelect: boolean;
|
|
143
152
|
maxSelectedDisplay: string | number | boolean;
|
|
@@ -38,7 +38,8 @@ const templateProps = computed(() => ({
|
|
|
38
38
|
teleportTo: props.teleportTo,
|
|
39
39
|
valueField: props.valueField,
|
|
40
40
|
validation: props.validation,
|
|
41
|
-
validationText: props.validationText
|
|
41
|
+
validationText: props.validationText,
|
|
42
|
+
fullWidth: props.fullWidth
|
|
42
43
|
}));
|
|
43
44
|
function updateSearchText(val) {
|
|
44
45
|
searchtext.value = val;
|
|
@@ -50,4 +51,6 @@ function updateIsOptionsOpen(val) {
|
|
|
50
51
|
|
|
51
52
|
<template lang="pug">
|
|
52
53
|
component(:is="presetComponent" v-bind="{...templateProps, ...$attrs}" @update:searchtext="updateSearchText" @update:isOptionsOpen="updateIsOptionsOpen")
|
|
54
|
+
template(v-for="(_, slot) in $slots" #[slot]="scope")
|
|
55
|
+
slot(:name="slot" v-bind="scope")
|
|
53
56
|
</template>
|
|
@@ -61,6 +61,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
61
61
|
type: BooleanConstructor;
|
|
62
62
|
default: undefined;
|
|
63
63
|
};
|
|
64
|
+
fullWidth: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
64
68
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
65
69
|
"update:modelValue": (value: any) => any;
|
|
66
70
|
"update:isOptionsOpen": (value: boolean) => any;
|
|
@@ -126,6 +130,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
126
130
|
type: BooleanConstructor;
|
|
127
131
|
default: undefined;
|
|
128
132
|
};
|
|
133
|
+
fullWidth: {
|
|
134
|
+
type: BooleanConstructor;
|
|
135
|
+
default: boolean;
|
|
136
|
+
};
|
|
129
137
|
}>> & Readonly<{
|
|
130
138
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
131
139
|
"onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
|
|
@@ -138,6 +146,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
138
146
|
isOptionsOpen: boolean;
|
|
139
147
|
placeholder: string;
|
|
140
148
|
teleportTo: string;
|
|
149
|
+
fullWidth: boolean;
|
|
141
150
|
closeOnSelect: boolean;
|
|
142
151
|
multiSelect: boolean;
|
|
143
152
|
maxSelectedDisplay: string | number | boolean;
|
|
@@ -16,6 +16,7 @@ export interface KComboboxProps {
|
|
|
16
16
|
modelValue?: any;
|
|
17
17
|
teleportTo?: string;
|
|
18
18
|
isOptionsOpen?: boolean;
|
|
19
|
+
fullWidth?: boolean;
|
|
19
20
|
validation?: 'success' | 'warning' | 'error' | null;
|
|
20
21
|
validationText?: string;
|
|
21
22
|
}
|
|
@@ -85,6 +86,10 @@ export declare const KComboboxDefaultProps: {
|
|
|
85
86
|
type: BooleanConstructor;
|
|
86
87
|
default: undefined;
|
|
87
88
|
};
|
|
89
|
+
fullWidth: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
88
93
|
};
|
|
89
94
|
export declare function useKComboboxLogic(props: KComboboxProps, emit: KComboboxEmits): {
|
|
90
95
|
selectedItems: import("vue").Ref<TDataRow[] | null, TDataRow[] | null>;
|
|
@@ -105,10 +105,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
105
105
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
106
106
|
}>, {
|
|
107
107
|
isOpen: boolean;
|
|
108
|
-
day: string | Date;
|
|
109
108
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
110
109
|
validationText: string;
|
|
111
110
|
modelValue: string | Date;
|
|
111
|
+
day: string | Date;
|
|
112
112
|
teleportTo: string;
|
|
113
113
|
showClear: boolean;
|
|
114
114
|
align: "left" | "right" | undefined;
|
|
@@ -105,10 +105,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
105
105
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
106
106
|
}>, {
|
|
107
107
|
isOpen: boolean;
|
|
108
|
-
day: string | Date;
|
|
109
108
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
110
109
|
validationText: string;
|
|
111
110
|
modelValue: string | Date;
|
|
111
|
+
day: string | Date;
|
|
112
112
|
teleportTo: string;
|
|
113
113
|
showClear: boolean;
|
|
114
114
|
align: "left" | "right" | undefined;
|
|
@@ -111,10 +111,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
111
111
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
112
112
|
}>, {
|
|
113
113
|
isOpen: boolean;
|
|
114
|
-
day: string | Date;
|
|
115
114
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
116
115
|
validationText: string;
|
|
117
116
|
modelValue: string | Date;
|
|
117
|
+
day: string | Date;
|
|
118
118
|
teleportTo: string;
|
|
119
119
|
showClear: boolean;
|
|
120
120
|
format: string;
|
|
@@ -111,10 +111,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
111
111
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
112
112
|
}>, {
|
|
113
113
|
isOpen: boolean;
|
|
114
|
-
day: string | Date;
|
|
115
114
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
116
115
|
validationText: string;
|
|
117
116
|
modelValue: string | Date;
|
|
117
|
+
day: string | Date;
|
|
118
118
|
teleportTo: string;
|
|
119
119
|
showClear: boolean;
|
|
120
120
|
format: string;
|
|
@@ -47,8 +47,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
47
47
|
}>, {
|
|
48
48
|
isOpen: boolean;
|
|
49
49
|
teleportTo: string;
|
|
50
|
-
align: "left" | "right";
|
|
51
50
|
fullWidth: boolean;
|
|
51
|
+
align: "left" | "right";
|
|
52
52
|
anchorEl: HTMLElement;
|
|
53
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
54
|
declare const _default: typeof __VLS_export;
|
|
@@ -47,8 +47,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
47
47
|
}>, {
|
|
48
48
|
isOpen: boolean;
|
|
49
49
|
teleportTo: string;
|
|
50
|
-
align: "left" | "right";
|
|
51
50
|
fullWidth: boolean;
|
|
51
|
+
align: "left" | "right";
|
|
52
52
|
anchorEl: HTMLElement;
|
|
53
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
54
|
declare const _default: typeof __VLS_export;
|
|
@@ -65,6 +65,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
65
65
|
type: BooleanConstructor;
|
|
66
66
|
default: undefined;
|
|
67
67
|
};
|
|
68
|
+
fullWidth: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
68
72
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
69
73
|
change: (value: any) => any;
|
|
70
74
|
"update:modelValue": (value: any) => any;
|
|
@@ -135,6 +139,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
135
139
|
type: BooleanConstructor;
|
|
136
140
|
default: undefined;
|
|
137
141
|
};
|
|
142
|
+
fullWidth: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
138
146
|
}>> & Readonly<{
|
|
139
147
|
onChange?: ((value: any) => any) | undefined;
|
|
140
148
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -150,6 +158,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
150
158
|
searchbox: boolean;
|
|
151
159
|
isOptionsOpen: boolean;
|
|
152
160
|
placeholder: string;
|
|
161
|
+
fullWidth: boolean;
|
|
153
162
|
closeOnSelect: boolean;
|
|
154
163
|
multiSelect: boolean;
|
|
155
164
|
valueField: string;
|
|
@@ -46,7 +46,8 @@ const templateProps = computed(() => ({
|
|
|
46
46
|
closeOnSelect: props.closeOnSelect,
|
|
47
47
|
valueField: props.valueField || props.idKey,
|
|
48
48
|
validation: props.validation,
|
|
49
|
-
validationText: props.validationText
|
|
49
|
+
validationText: props.validationText,
|
|
50
|
+
fullWidth: props.fullWidth
|
|
50
51
|
}));
|
|
51
52
|
function onUpdateModelValue(val) {
|
|
52
53
|
emit("update:modelValue", val);
|
|
@@ -65,6 +65,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
65
65
|
type: BooleanConstructor;
|
|
66
66
|
default: undefined;
|
|
67
67
|
};
|
|
68
|
+
fullWidth: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
68
72
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
69
73
|
change: (value: any) => any;
|
|
70
74
|
"update:modelValue": (value: any) => any;
|
|
@@ -135,6 +139,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
135
139
|
type: BooleanConstructor;
|
|
136
140
|
default: undefined;
|
|
137
141
|
};
|
|
142
|
+
fullWidth: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
138
146
|
}>> & Readonly<{
|
|
139
147
|
onChange?: ((value: any) => any) | undefined;
|
|
140
148
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -150,6 +158,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
150
158
|
searchbox: boolean;
|
|
151
159
|
isOptionsOpen: boolean;
|
|
152
160
|
placeholder: string;
|
|
161
|
+
fullWidth: boolean;
|
|
153
162
|
closeOnSelect: boolean;
|
|
154
163
|
multiSelect: boolean;
|
|
155
164
|
valueField: string;
|
|
@@ -17,6 +17,7 @@ export interface KTreePickerProps {
|
|
|
17
17
|
validation?: 'success' | 'warning' | 'error' | null;
|
|
18
18
|
validationText?: string;
|
|
19
19
|
isOptionsOpen?: boolean;
|
|
20
|
+
fullWidth?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export declare const KTreePickerDefaultProps: {
|
|
22
23
|
modelValue: {
|
|
@@ -84,6 +85,10 @@ export declare const KTreePickerDefaultProps: {
|
|
|
84
85
|
type: BooleanConstructor;
|
|
85
86
|
default: undefined;
|
|
86
87
|
};
|
|
88
|
+
fullWidth: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
87
92
|
};
|
|
88
93
|
export declare function useKTreePickerLogic(props: KTreePickerProps, emit: any): {
|
|
89
94
|
selectedItems: import("vue").Ref<import("@katlux/providers").TDataRow[] | null, import("@katlux/providers").TDataRow[] | null>;
|
|
@@ -10,23 +10,26 @@
|
|
|
10
10
|
) {{ item[labelField] }}
|
|
11
11
|
.KCombobox__selected-content-placeholder(v-else) {{placeholder}}
|
|
12
12
|
KIcon(iconname="chevron" width="20" height="20").chevron
|
|
13
|
-
KDropdown(v-model:isOpen="isOptionsOpenModel" :anchorEl="activatorRef" fullWidth :teleportTo="teleportTo").KCombobox__options
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
KDropdown(v-model:isOpen="isOptionsOpenModel" :anchorEl="activatorRef" :fullWidth="fullWidth" :teleportTo="teleportTo").KCombobox__options
|
|
14
|
+
template(v-if="slots.default")
|
|
15
|
+
slot(name="default")
|
|
16
|
+
KComboboxList(
|
|
17
|
+
v-else
|
|
18
|
+
:searchbox="searchbox"
|
|
19
|
+
v-model:searchtext="searchtextModel"
|
|
20
|
+
:loading="loading"
|
|
21
|
+
:filteredOptions="filteredOptions"
|
|
22
|
+
:labelField="labelField"
|
|
23
|
+
:selectItem="selectItem"
|
|
24
|
+
:isSelected="isSelected"
|
|
25
|
+
)
|
|
24
26
|
span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
|
|
25
27
|
</template>
|
|
26
28
|
|
|
27
29
|
<script lang="ts" setup>
|
|
28
|
-
import { computed, ref } from 'vue'
|
|
30
|
+
import { computed, ref, useSlots } from 'vue'
|
|
29
31
|
const activatorRef = ref<HTMLElement | null>(null)
|
|
32
|
+
const slots = useSlots()
|
|
30
33
|
import KComboboxList from './KComboboxList.vue'
|
|
31
34
|
import type { ComboboxItem } from '../../../../components/KCombobox/KCombobox.logic'
|
|
32
35
|
|
|
@@ -45,6 +48,7 @@ const props = defineProps<{
|
|
|
45
48
|
isSelected: (option: ComboboxItem) => boolean
|
|
46
49
|
loading: boolean
|
|
47
50
|
teleportTo?: string
|
|
51
|
+
fullWidth: boolean
|
|
48
52
|
validation?: 'success' | 'warning' | 'error' | null
|
|
49
53
|
validationText?: string
|
|
50
54
|
}>()
|
|
@@ -34,7 +34,8 @@ const dialogStyle = computed(() => {
|
|
|
34
34
|
const style: any = {
|
|
35
35
|
position: 'absolute',
|
|
36
36
|
top: `${props.dropdownRect.top}px`,
|
|
37
|
-
width: props.fullWidth ?
|
|
37
|
+
width: props.fullWidth ? 'fit-content' : 'fit-content',
|
|
38
|
+
minWidth: props.fullWidth ? `${props.dropdownRect.width}px` : 'auto',
|
|
38
39
|
zIndex: 2000
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -14,30 +14,30 @@ KCombobox(
|
|
|
14
14
|
:selectItem="selectItem"
|
|
15
15
|
:isSelected="isSelected"
|
|
16
16
|
:loading="loading"
|
|
17
|
+
:fullWidth="fullWidth"
|
|
17
18
|
:validation="validation"
|
|
18
19
|
:validationText="validationText"
|
|
19
20
|
)
|
|
20
|
-
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
showClear
|
|
27
|
-
)
|
|
28
|
-
KTree(
|
|
29
|
-
:dataProvider="dataProvider"
|
|
30
|
-
:idKey="idKey"
|
|
31
|
-
:parentKey="parentKey"
|
|
32
|
-
:labelField="labelField"
|
|
33
|
-
:iconField="iconField"
|
|
34
|
-
:loading="loading"
|
|
35
|
-
:multiSelect="multiSelect"
|
|
36
|
-
:isNodeSelected="isSelected"
|
|
37
|
-
:searchtext="searchtext"
|
|
38
|
-
:selectable="true"
|
|
39
|
-
@select="onTreeSelect"
|
|
21
|
+
.KTreePicker__tree-container
|
|
22
|
+
.KTreePicker__search(v-if="searchbox")
|
|
23
|
+
KTextbox(
|
|
24
|
+
v-model="searchtextModel"
|
|
25
|
+
placeholder="Search..."
|
|
26
|
+
showClear
|
|
40
27
|
)
|
|
28
|
+
KTree(
|
|
29
|
+
:dataProvider="dataProvider"
|
|
30
|
+
:idKey="idKey"
|
|
31
|
+
:parentKey="parentKey"
|
|
32
|
+
:labelField="labelField"
|
|
33
|
+
:iconField="iconField"
|
|
34
|
+
:loading="loading"
|
|
35
|
+
:multiSelect="multiSelect"
|
|
36
|
+
:isNodeSelected="isSelected"
|
|
37
|
+
:searchtext="searchtext"
|
|
38
|
+
:selectable="true"
|
|
39
|
+
@select="onTreeSelect"
|
|
40
|
+
)
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script lang="ts" setup>
|
|
@@ -66,6 +66,7 @@ const props = defineProps<{
|
|
|
66
66
|
isSelected: (option: any) => boolean
|
|
67
67
|
loading: boolean
|
|
68
68
|
closeOnSelect: boolean
|
|
69
|
+
fullWidth: boolean
|
|
69
70
|
validation?: 'success' | 'warning' | 'error' | null
|
|
70
71
|
validationText?: string
|
|
71
72
|
}>()
|