@katlux/toolkit 0.1.1-alpha.127 → 0.1.1-alpha.128
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 +3 -3
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +3 -3
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +6 -6
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +6 -6
- package/dist/runtime/components/KDatatable/KDatatable.logic.js +11 -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/KPagination/KPagination.global.d.vue.ts +1 -1
- package/dist/runtime/components/KPagination/KPagination.global.vue.d.ts +1 -1
- 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/presets/default/components/KDatatable/KDatatable.vue +20 -2
- package/dist/runtime/presets/default/components/KTree/KTree.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KTree/KTree.vue.d.ts +1 -1
- package/package.json +2 -2
package/dist/module.json
CHANGED
|
@@ -227,22 +227,22 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
227
227
|
disabled: boolean;
|
|
228
228
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
229
229
|
validationText: string;
|
|
230
|
+
valueField: string;
|
|
231
|
+
placeholder: string;
|
|
230
232
|
searchbox: boolean;
|
|
233
|
+
teleportTo: string;
|
|
231
234
|
searchtext: string;
|
|
232
235
|
searchPlaceholder: string;
|
|
233
236
|
virtualScroll: boolean;
|
|
234
237
|
itemHeight: number;
|
|
235
238
|
buffer: number;
|
|
236
239
|
isOptionsOpen: boolean;
|
|
237
|
-
placeholder: string;
|
|
238
|
-
teleportTo: string;
|
|
239
240
|
fullWidth: boolean;
|
|
240
241
|
maxHeight: number;
|
|
241
242
|
closeOnSelect: boolean;
|
|
242
243
|
multiSelect: boolean;
|
|
243
244
|
maxSelectedDisplay: string | number | boolean;
|
|
244
245
|
visibleFields: String[];
|
|
245
|
-
valueField: string;
|
|
246
246
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
247
247
|
declare const _default: typeof __VLS_export;
|
|
248
248
|
export default _default;
|
|
@@ -227,22 +227,22 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
227
227
|
disabled: boolean;
|
|
228
228
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
229
229
|
validationText: string;
|
|
230
|
+
valueField: string;
|
|
231
|
+
placeholder: string;
|
|
230
232
|
searchbox: boolean;
|
|
233
|
+
teleportTo: string;
|
|
231
234
|
searchtext: string;
|
|
232
235
|
searchPlaceholder: string;
|
|
233
236
|
virtualScroll: boolean;
|
|
234
237
|
itemHeight: number;
|
|
235
238
|
buffer: number;
|
|
236
239
|
isOptionsOpen: boolean;
|
|
237
|
-
placeholder: string;
|
|
238
|
-
teleportTo: string;
|
|
239
240
|
fullWidth: boolean;
|
|
240
241
|
maxHeight: number;
|
|
241
242
|
closeOnSelect: boolean;
|
|
242
243
|
multiSelect: boolean;
|
|
243
244
|
maxSelectedDisplay: string | number | boolean;
|
|
244
245
|
visibleFields: String[];
|
|
245
|
-
valueField: string;
|
|
246
246
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
247
247
|
declare const _default: typeof __VLS_export;
|
|
248
248
|
export default _default;
|
|
@@ -193,18 +193,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
193
193
|
label: string;
|
|
194
194
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
195
195
|
validationText: string;
|
|
196
|
-
searchbox: boolean;
|
|
197
|
-
labelField: string;
|
|
198
|
-
placeholder: string;
|
|
199
|
-
teleportTo: string;
|
|
200
|
-
mask: string;
|
|
201
|
-
valueField: string;
|
|
202
196
|
inputType: "number" | "search" | "url" | "text" | "password" | "email" | "tel" | undefined;
|
|
203
197
|
selectionValue: string | number | Record<string, any> | unknown[];
|
|
204
198
|
inputValue: string | number | Record<string, any> | unknown[];
|
|
205
199
|
selectionSide: import("./KCompositeInput.logic.js").SelectionSide;
|
|
200
|
+
mask: string;
|
|
201
|
+
labelField: string;
|
|
202
|
+
valueField: string;
|
|
203
|
+
placeholder: string;
|
|
206
204
|
inputPlaceholder: string;
|
|
205
|
+
searchbox: boolean;
|
|
207
206
|
showClear: boolean;
|
|
207
|
+
teleportTo: string;
|
|
208
208
|
inputConfigField: string;
|
|
209
209
|
validateAll: boolean;
|
|
210
210
|
inputFormat: string;
|
|
@@ -193,18 +193,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
193
193
|
label: string;
|
|
194
194
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
195
195
|
validationText: string;
|
|
196
|
-
searchbox: boolean;
|
|
197
|
-
labelField: string;
|
|
198
|
-
placeholder: string;
|
|
199
|
-
teleportTo: string;
|
|
200
|
-
mask: string;
|
|
201
|
-
valueField: string;
|
|
202
196
|
inputType: "number" | "search" | "url" | "text" | "password" | "email" | "tel" | undefined;
|
|
203
197
|
selectionValue: string | number | Record<string, any> | unknown[];
|
|
204
198
|
inputValue: string | number | Record<string, any> | unknown[];
|
|
205
199
|
selectionSide: import("./KCompositeInput.logic.js").SelectionSide;
|
|
200
|
+
mask: string;
|
|
201
|
+
labelField: string;
|
|
202
|
+
valueField: string;
|
|
203
|
+
placeholder: string;
|
|
206
204
|
inputPlaceholder: string;
|
|
205
|
+
searchbox: boolean;
|
|
207
206
|
showClear: boolean;
|
|
207
|
+
teleportTo: string;
|
|
208
208
|
inputConfigField: string;
|
|
209
209
|
validateAll: boolean;
|
|
210
210
|
inputFormat: string;
|
|
@@ -123,6 +123,17 @@ 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
|
+
}
|
|
126
137
|
return pageRows.value;
|
|
127
138
|
};
|
|
128
139
|
watch(() => selectAll.value, (newVal) => {
|
|
@@ -133,8 +133,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
133
133
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
134
134
|
validationText: string;
|
|
135
135
|
placeholder: string;
|
|
136
|
-
teleportTo: string;
|
|
137
136
|
showClear: boolean;
|
|
137
|
+
teleportTo: string;
|
|
138
138
|
align: "left" | "right" | undefined;
|
|
139
139
|
format: string;
|
|
140
140
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -133,8 +133,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
133
133
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
134
134
|
validationText: string;
|
|
135
135
|
placeholder: string;
|
|
136
|
-
teleportTo: string;
|
|
137
136
|
showClear: boolean;
|
|
137
|
+
teleportTo: string;
|
|
138
138
|
align: "left" | "right" | undefined;
|
|
139
139
|
format: string;
|
|
140
140
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -135,8 +135,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
135
135
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
136
136
|
validationText: string;
|
|
137
137
|
placeholder: string;
|
|
138
|
-
teleportTo: string;
|
|
139
138
|
showClear: boolean;
|
|
139
|
+
teleportTo: string;
|
|
140
140
|
format: string;
|
|
141
141
|
timeFormat: string;
|
|
142
142
|
timeStep: number;
|
|
@@ -135,8 +135,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
135
135
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
136
136
|
validationText: string;
|
|
137
137
|
placeholder: string;
|
|
138
|
-
teleportTo: string;
|
|
139
138
|
showClear: boolean;
|
|
139
|
+
teleportTo: string;
|
|
140
140
|
format: string;
|
|
141
141
|
timeFormat: string;
|
|
142
142
|
timeStep: number;
|
|
@@ -62,8 +62,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
62
62
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
63
63
|
}>, {
|
|
64
64
|
isOpen: boolean;
|
|
65
|
-
direction: import("./KDropdown.logic.js").KDropdownDirection;
|
|
66
65
|
teleportTo: string;
|
|
66
|
+
direction: import("./KDropdown.logic.js").KDropdownDirection;
|
|
67
67
|
fullWidth: boolean;
|
|
68
68
|
maxHeight: number;
|
|
69
69
|
align: import("./KDropdown.logic.js").KDropdownAlign;
|
|
@@ -62,8 +62,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
62
62
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
63
63
|
}>, {
|
|
64
64
|
isOpen: boolean;
|
|
65
|
-
direction: import("./KDropdown.logic.js").KDropdownDirection;
|
|
66
65
|
teleportTo: string;
|
|
66
|
+
direction: import("./KDropdown.logic.js").KDropdownDirection;
|
|
67
67
|
fullWidth: boolean;
|
|
68
68
|
maxHeight: number;
|
|
69
69
|
align: import("./KDropdown.logic.js").KDropdownAlign;
|
|
@@ -21,9 +21,9 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
21
21
|
"onPage-click"?: ((value: number) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
modelValue: number;
|
|
24
|
+
dataProvider: ADataProvider;
|
|
24
25
|
currentPage: number;
|
|
25
26
|
pageSize: number;
|
|
26
|
-
dataProvider: ADataProvider;
|
|
27
27
|
totalItems: number;
|
|
28
28
|
maxVisiblePages: number;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -21,9 +21,9 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
21
21
|
"onPage-click"?: ((value: number) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
modelValue: number;
|
|
24
|
+
dataProvider: ADataProvider;
|
|
24
25
|
currentPage: number;
|
|
25
26
|
pageSize: number;
|
|
26
|
-
dataProvider: ADataProvider;
|
|
27
27
|
totalItems: number;
|
|
28
28
|
maxVisiblePages: number;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -153,11 +153,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
153
153
|
modelValue: any;
|
|
154
154
|
disabled: boolean;
|
|
155
155
|
idKey: string;
|
|
156
|
+
labelField: string;
|
|
156
157
|
searchtext: string;
|
|
157
158
|
virtualScroll: boolean;
|
|
158
159
|
itemHeight: number;
|
|
159
160
|
buffer: number;
|
|
160
|
-
labelField: string;
|
|
161
161
|
multiSelect: boolean;
|
|
162
162
|
viewportHeight: number;
|
|
163
163
|
expandedNodes: (string | number)[] | Set<string | number>;
|
|
@@ -153,11 +153,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
153
153
|
modelValue: any;
|
|
154
154
|
disabled: boolean;
|
|
155
155
|
idKey: string;
|
|
156
|
+
labelField: string;
|
|
156
157
|
searchtext: string;
|
|
157
158
|
virtualScroll: boolean;
|
|
158
159
|
itemHeight: number;
|
|
159
160
|
buffer: number;
|
|
160
|
-
labelField: string;
|
|
161
161
|
multiSelect: boolean;
|
|
162
162
|
viewportHeight: number;
|
|
163
163
|
expandedNodes: (string | number)[] | Set<string | number>;
|
|
@@ -238,6 +238,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
238
238
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
239
239
|
validationText: string;
|
|
240
240
|
idKey: string;
|
|
241
|
+
valueField: string;
|
|
242
|
+
placeholder: string;
|
|
241
243
|
searchbox: boolean;
|
|
242
244
|
searchtext: string;
|
|
243
245
|
searchPlaceholder: string;
|
|
@@ -245,11 +247,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
245
247
|
itemHeight: number;
|
|
246
248
|
buffer: number;
|
|
247
249
|
isOptionsOpen: boolean;
|
|
248
|
-
placeholder: string;
|
|
249
250
|
fullWidth: boolean;
|
|
250
251
|
closeOnSelect: boolean;
|
|
251
252
|
multiSelect: boolean;
|
|
252
|
-
valueField: string;
|
|
253
253
|
viewportHeight: number;
|
|
254
254
|
expandedNodes: any;
|
|
255
255
|
parentKey: string;
|
|
@@ -238,6 +238,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
238
238
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
239
239
|
validationText: string;
|
|
240
240
|
idKey: string;
|
|
241
|
+
valueField: string;
|
|
242
|
+
placeholder: string;
|
|
241
243
|
searchbox: boolean;
|
|
242
244
|
searchtext: string;
|
|
243
245
|
searchPlaceholder: string;
|
|
@@ -245,11 +247,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
245
247
|
itemHeight: number;
|
|
246
248
|
buffer: number;
|
|
247
249
|
isOptionsOpen: boolean;
|
|
248
|
-
placeholder: string;
|
|
249
250
|
fullWidth: boolean;
|
|
250
251
|
closeOnSelect: boolean;
|
|
251
252
|
multiSelect: boolean;
|
|
252
|
-
valueField: string;
|
|
253
253
|
viewportHeight: number;
|
|
254
254
|
expandedNodes: any;
|
|
255
255
|
parentKey: string;
|
|
@@ -345,9 +345,27 @@ const isLoading = computed(() => {
|
|
|
345
345
|
return dpLoading.value || dpInitialLoad.value || false
|
|
346
346
|
})
|
|
347
347
|
|
|
348
|
-
// Data source for
|
|
348
|
+
// Data source for virtualization: full items array when virtualScroll is true
|
|
349
349
|
const datatableItems = computed(() => {
|
|
350
|
-
|
|
350
|
+
const currentRows = pageRows.value
|
|
351
|
+
const dp = props.dataProvider as any
|
|
352
|
+
if (props.virtualScroll) {
|
|
353
|
+
// In zero-trust encryption mode with page-level decryption (pageSize > 0), only pageRows is decrypted
|
|
354
|
+
if (dp?.isEncryptionEnabled && (dp?.pageSize > 0 || (isRef(dp?.pageSize) && dp.pageSize.value > 0))) {
|
|
355
|
+
return currentRows
|
|
356
|
+
}
|
|
357
|
+
if (Array.isArray(virtualRows?.value) && virtualRows.value.length > 0) return virtualRows.value
|
|
358
|
+
if (Array.isArray(dp?.rowMap)) return dp.rowMap
|
|
359
|
+
if (Array.isArray(dp?.rowMap?.value)) return dp.rowMap.value
|
|
360
|
+
if (Array.isArray(dp?.allVisibleRows)) return dp.allVisibleRows
|
|
361
|
+
if (Array.isArray(dp?.allVisibleRows?.value)) return dp.allVisibleRows.value
|
|
362
|
+
if (Array.isArray(dp?.allVisibleNodes)) return dp.allVisibleNodes
|
|
363
|
+
if (Array.isArray(dp?.allVisibleNodes?.value)) return dp.allVisibleNodes.value
|
|
364
|
+
if (Array.isArray(dp?.allData?.value)) return dp.allData.value
|
|
365
|
+
if (Array.isArray(dp?.allData)) return dp.allData
|
|
366
|
+
if (Array.isArray(dp?.data)) return dp.data
|
|
367
|
+
}
|
|
368
|
+
return currentRows
|
|
351
369
|
})
|
|
352
370
|
|
|
353
371
|
const {
|
|
@@ -27,11 +27,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
27
27
|
}>, {
|
|
28
28
|
disabled: boolean;
|
|
29
29
|
idKey: string;
|
|
30
|
+
labelField: string;
|
|
30
31
|
searchtext: string;
|
|
31
32
|
virtualScroll: boolean;
|
|
32
33
|
itemHeight: number;
|
|
33
34
|
buffer: number;
|
|
34
|
-
labelField: string;
|
|
35
35
|
multiSelect: boolean;
|
|
36
36
|
viewportHeight: number;
|
|
37
37
|
iconField: string;
|
|
@@ -27,11 +27,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
27
27
|
}>, {
|
|
28
28
|
disabled: boolean;
|
|
29
29
|
idKey: string;
|
|
30
|
+
labelField: string;
|
|
30
31
|
searchtext: string;
|
|
31
32
|
virtualScroll: boolean;
|
|
32
33
|
itemHeight: number;
|
|
33
34
|
buffer: number;
|
|
34
|
-
labelField: string;
|
|
35
35
|
multiSelect: boolean;
|
|
36
36
|
viewportHeight: number;
|
|
37
37
|
iconField: string;
|
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.128",
|
|
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.116",
|
|
58
58
|
"@nuxt/kit": "^3.12.0",
|
|
59
59
|
"@nuxtjs/i18n": "^10.4.0",
|
|
60
60
|
"pug": "^3.0.0",
|