@katlux/toolkit 0.1.1-alpha.125 → 0.1.1-alpha.127
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/KButton/KButton.logic.js +5 -2
- package/dist/runtime/components/KDatatable/KDatatable.logic.js +0 -11
- 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/KTooltip/KTooltip.global.d.vue.ts +1 -1
- package/dist/runtime/components/KTooltip/KTooltip.global.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KButton/KButton.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KButton/KButton.vue +2 -2
- package/dist/runtime/presets/default/components/KButton/KButton.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +2 -16
- package/package.json +2 -2
package/dist/module.json
CHANGED
|
@@ -27,7 +27,7 @@ export declare function useKButtonLogic(props: KButtonProps, emit: KButtonEmits)
|
|
|
27
27
|
disabled: boolean | undefined;
|
|
28
28
|
'icon-only': boolean | undefined;
|
|
29
29
|
})[]>;
|
|
30
|
-
onClick: () => void;
|
|
30
|
+
onClick: (e?: MouseEvent) => void;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
33
|
* Default props for KButton
|
|
@@ -7,8 +7,11 @@ export function useKButtonLogic(props, emit) {
|
|
|
7
7
|
props.size || "medium",
|
|
8
8
|
{ disabled: isDisabled.value, "icon-only": props.iconOnly }
|
|
9
9
|
]);
|
|
10
|
-
const onClick = () => {
|
|
11
|
-
if (isDisabled.value)
|
|
10
|
+
const onClick = (e) => {
|
|
11
|
+
if (isDisabled.value) {
|
|
12
|
+
e?.preventDefault();
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
12
15
|
emit("click");
|
|
13
16
|
};
|
|
14
17
|
return {
|
|
@@ -123,17 +123,6 @@ export function useKDatatableLogic(props, emit) {
|
|
|
123
123
|
}, { deep: true });
|
|
124
124
|
let lastSyncedSelectAll = Boolean(selectAll.value);
|
|
125
125
|
const getTargetRows = () => {
|
|
126
|
-
if (props.virtualScroll) {
|
|
127
|
-
const dp = props.dataProvider;
|
|
128
|
-
if (Array.isArray(dp?.rowMap)) return dp.rowMap;
|
|
129
|
-
if (Array.isArray(dp?.rowMap?.value)) return dp.rowMap.value;
|
|
130
|
-
if (Array.isArray(virtualRows?.value) && virtualRows.value.length > 0) return virtualRows.value;
|
|
131
|
-
if (Array.isArray(dp?.allVisibleRows)) return dp.allVisibleRows;
|
|
132
|
-
if (Array.isArray(dp?.allVisibleRows?.value)) return dp.allVisibleRows.value;
|
|
133
|
-
if (Array.isArray(dp?.allData?.value)) return dp.allData.value;
|
|
134
|
-
if (Array.isArray(dp?.allData)) return dp.allData;
|
|
135
|
-
if (Array.isArray(dp?.data)) return dp.data;
|
|
136
|
-
}
|
|
137
126
|
return pageRows.value;
|
|
138
127
|
};
|
|
139
128
|
watch(() => selectAll.value, (newVal) => {
|
|
@@ -135,8 +135,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
135
135
|
placeholder: string;
|
|
136
136
|
teleportTo: string;
|
|
137
137
|
showClear: boolean;
|
|
138
|
-
format: string;
|
|
139
138
|
align: "left" | "right" | undefined;
|
|
139
|
+
format: string;
|
|
140
140
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
141
141
|
declare const _default: typeof __VLS_export;
|
|
142
142
|
export default _default;
|
|
@@ -135,8 +135,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
135
135
|
placeholder: string;
|
|
136
136
|
teleportTo: string;
|
|
137
137
|
showClear: boolean;
|
|
138
|
-
format: string;
|
|
139
138
|
align: "left" | "right" | undefined;
|
|
139
|
+
format: string;
|
|
140
140
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
141
141
|
declare const _default: typeof __VLS_export;
|
|
142
142
|
export default _default;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
28
|
disabled: boolean;
|
|
29
29
|
text: string;
|
|
30
|
-
position: "
|
|
30
|
+
position: "left" | "right" | "top" | "bottom";
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
28
|
disabled: boolean;
|
|
29
29
|
text: string;
|
|
30
|
-
position: "
|
|
30
|
+
position: "left" | "right" | "top" | "bottom";
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
NuxtLink.KButton(v-if="isLink" :to="href" @click
|
|
2
|
+
NuxtLink.KButton(v-if="isLink" :to="href" @click="onClick" :class="buttonClasses")
|
|
3
3
|
span.button-icon(v-if="$slots.icon")
|
|
4
4
|
slot(name="icon")
|
|
5
5
|
span.button-text(v-if="$slots.default")
|
|
@@ -19,7 +19,7 @@ defineProps<{
|
|
|
19
19
|
isLink: boolean
|
|
20
20
|
isDisabled: boolean
|
|
21
21
|
buttonClasses: any
|
|
22
|
-
onClick: () => void
|
|
22
|
+
onClick: (e?: MouseEvent) => void
|
|
23
23
|
href?: string
|
|
24
24
|
loading?: boolean
|
|
25
25
|
}>()
|
|
@@ -345,23 +345,9 @@ const isLoading = computed(() => {
|
|
|
345
345
|
return dpLoading.value || dpInitialLoad.value || false
|
|
346
346
|
})
|
|
347
347
|
|
|
348
|
-
// Data source for
|
|
348
|
+
// Data source for datatable: pageRows contains the prepared, decrypted data from the provider
|
|
349
349
|
const datatableItems = computed(() => {
|
|
350
|
-
|
|
351
|
-
const dp = props.dataProvider as any
|
|
352
|
-
if (props.virtualScroll) {
|
|
353
|
-
if (Array.isArray(virtualRows?.value)) return virtualRows.value
|
|
354
|
-
if (Array.isArray(dp?.rowMap)) return dp.rowMap
|
|
355
|
-
if (Array.isArray(dp?.rowMap?.value)) return dp.rowMap.value
|
|
356
|
-
if (Array.isArray(dp?.allVisibleRows)) return dp.allVisibleRows
|
|
357
|
-
if (Array.isArray(dp?.allVisibleRows?.value)) return dp.allVisibleRows.value
|
|
358
|
-
if (Array.isArray(dp?.allVisibleNodes)) return dp.allVisibleNodes
|
|
359
|
-
if (Array.isArray(dp?.allVisibleNodes?.value)) return dp.allVisibleNodes.value
|
|
360
|
-
if (Array.isArray(dp?.allData?.value)) return dp.allData.value
|
|
361
|
-
if (Array.isArray(dp?.allData)) return dp.allData
|
|
362
|
-
if (Array.isArray(dp?.data)) return dp.data
|
|
363
|
-
}
|
|
364
|
-
return currentRows
|
|
350
|
+
return pageRows.value
|
|
365
351
|
})
|
|
366
352
|
|
|
367
353
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@katlux/toolkit",
|
|
3
|
-
"version": "0.1.1-alpha.
|
|
3
|
+
"version": "0.1.1-alpha.127",
|
|
4
4
|
"description": "Core UI toolkit and utilities for the Katlux ecosystem",
|
|
5
5
|
"author": "Katlux",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"**/*.sass"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@katlux/providers": "^0.1.1-alpha.
|
|
57
|
+
"@katlux/providers": "^0.1.1-alpha.115",
|
|
58
58
|
"@nuxt/kit": "^3.12.0",
|
|
59
59
|
"@nuxtjs/i18n": "^10.4.0",
|
|
60
60
|
"pug": "^3.0.0",
|