@katlux/toolkit 0.1.1-alpha.141 → 0.1.1-alpha.142
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/useKatluxForm.mjs +29 -21
- package/dist/module.json +1 -1
- package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +1 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +1 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +1 -1
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.d.vue.ts +1 -1
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +1 -1
- package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +1 -1
- package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +1 -1
- package/dist/runtime/composables/useKatluxForm.d.ts +11 -11
- package/dist/runtime/composables/useKatluxForm.js +29 -21
- package/dist/skills/katlux-components/components/KAreaChart.md +1 -1
- package/dist/skills/katlux-components/components/KBarChart.md +1 -1
- package/dist/skills/katlux-components/components/KBulkActions.md +3 -3
- package/dist/skills/katlux-components/components/KCheckbox.md +2 -2
- package/dist/skills/katlux-components/components/KCombobox.md +3 -3
- package/dist/skills/katlux-components/components/KCompositeInput.md +4 -4
- package/dist/skills/katlux-components/components/KDataIterator.md +3 -3
- package/dist/skills/katlux-components/components/KDatatable.md +7 -7
- package/dist/skills/katlux-components/components/KDatePicker.md +3 -3
- package/dist/skills/katlux-components/components/KGantt.md +12 -12
- package/dist/skills/katlux-components/components/KHeatMap.md +1 -1
- package/dist/skills/katlux-components/components/KLineChart.md +1 -1
- package/dist/skills/katlux-components/components/KPieChart.md +1 -1
- package/dist/skills/katlux-components/components/KScatterChart.md +1 -1
- package/dist/skills/katlux-components/components/KTree.md +8 -8
- package/dist/skills/katlux-components/components/KTreePicker.md +3 -3
- package/dist/skills/katlux-components/components/KTreeView.md +3 -3
- package/dist/skills/katlux-config/SKILL.md +7 -7
- package/dist/skills/katlux-presets/SKILL.md +1 -1
- package/dist/skills/katlux-presets/creating-a-preset.md +1 -1
- package/dist/skills/katlux-providers/providers/ADataProvider.md +3 -3
- package/dist/skills/katlux-providers/providers/CAPIFlatClientDataProvider.md +3 -3
- package/dist/skills/katlux-providers/providers/CAPIFlatServerDataProvider.md +3 -3
- package/dist/skills/katlux-providers/providers/CFlatClientDataProvider.md +4 -4
- package/dist/skills/katlux-providers/providers/CFlatServerDataProvider.md +1 -1
- package/dist/skills/katlux-providers/providers/CTreeClientDataProvider.md +2 -2
- package/dist/skills/katlux-providers/providers/RequestProvider.md +4 -4
- package/dist/skills/katlux-providers/providers/caching.md +11 -11
- package/dist/skills/katlux-providers/providers/encryption-threat-model.md +2 -2
- package/dist/skills/katlux-providers/providers/types.md +5 -5
- package/dist/skills/katlux-providers/providers/useDataProvider.md +1 -1
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| `v-model:search` / `search` | `string` | `''` | Search string with two-way binding |
|
|
12
12
|
| `v-model:page` / `v-model:currentPage` / `page` | `number` | `1` | Current page with two-way binding |
|
|
13
13
|
| `v-model:itemsPerPage` / `v-model:pageSize` / `itemsPerPage` | `number` | `10` | Items per page with two-way binding |
|
|
14
|
-
| `v-model:selectedRows` / `selectedRows` | `
|
|
14
|
+
| `v-model:selectedRows` / `selectedRows` | `Record<string, unknown>[]` | `[]` | Selected rows array with two-way binding |
|
|
15
15
|
| `v-model:selectAll` / `selectAll` | `boolean` | `false` | Select-all boolean state with two-way binding |
|
|
16
16
|
|
|
17
17
|
- **Events / Emits**:
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
| `@update:itemsPerPage`| `(size: number)` | Emitted when page size changes |
|
|
23
23
|
| `@update:pageSize` | `(size: number)` | Emitted when page size changes |
|
|
24
24
|
| `@update:search` | `(search: string)` | Emitted when search changes |
|
|
25
|
-
| `@update:selectedRows`| `(rows:
|
|
25
|
+
| `@update:selectedRows`| `(rows: Record<string, unknown>[])` | Emitted when selection changes |
|
|
26
26
|
| `@update:selectAll` | `(all: boolean)` | Emitted when selectAll toggles |
|
|
27
27
|
|
|
28
28
|
- **Slots**:
|
|
29
29
|
| Slot | Scope | Description |
|
|
30
30
|
| --- | --- | --- |
|
|
31
|
-
| `#row` | `{ row:
|
|
31
|
+
| `#row` | `{ row: Record<string, unknown>, rowActions: IKDatatableAction[] }` | Custom template for each data item |
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
| `columnWidths` | `Record<string, string>` | `{}` | Maps field keys to CSS widths |
|
|
9
9
|
| `rowActions` | `IKDatatableAction[]` | `[]` | Per-row action buttons |
|
|
10
10
|
| `bulkActions` | `IKDatatableAction[]` | `[]` | Global actions for selected rows. **Automatically enables multi-selection checkboxes** on rows and the header select-all toggle when provided |
|
|
11
|
-
| `cellSlots` | `Record<string,
|
|
12
|
-
| `headerSlots` | `Record<string,
|
|
11
|
+
| `cellSlots` | `Record<string, Slot | Component | Function>` | `undefined` | Custom cell slots map (alternative to template slots) |
|
|
12
|
+
| `headerSlots` | `Record<string, Slot | Component | Function>` | `undefined` | Custom header slots map (alternative to template slots) |
|
|
13
13
|
| `emptyStateText` | `string` | `'no result'` | Message when dataset is empty |
|
|
14
14
|
| `emptyFilterStateText`| `string` | `'no result found for filter'` | Message when filtered dataset is empty |
|
|
15
15
|
| `v-model:currentPage` / `currentPage` | `number` | `undefined` | Current page number with two-way sync to provider |
|
|
16
16
|
| `v-model:pageSize` / `pageSize` | `number` | `undefined` | Page size number with two-way sync to provider |
|
|
17
17
|
| `v-model:filter` / `filter` | `IDataFilter \| null` | `undefined` | Active filter object with two-way sync |
|
|
18
18
|
| `v-model:sortList` / `sortList` | `IDataSort[]` | `undefined` | Active sort definitions with two-way sync |
|
|
19
|
-
| `v-model:selectedRows` / `selectedRows`| `
|
|
19
|
+
| `v-model:selectedRows` / `selectedRows`| `Record<string, unknown>[]` | `[]` | Array of currently selected row objects (preserved across page changes) |
|
|
20
20
|
| `v-model:selectAll` / `selectAll` | `boolean` | `false` | Header select-all boolean state |
|
|
21
|
-
| `v-model:unselectedRows` / `unselectedRows` | `
|
|
21
|
+
| `v-model:unselectedRows` / `unselectedRows` | `Record<string, unknown>[]` | `[]` | Excluded row objects when `selectAll: true` in dataset scope |
|
|
22
22
|
| `selectAllScope` | `'page' \| 'dataset'` | `'page'` | Scope for header select-all toggle. Automatically defaults/overrides to `'dataset'` when `virtualScroll: true` |
|
|
23
23
|
| `virtualScroll` | `boolean` | `false` | Enables virtual DOM windowing and sticky headers for large datasets |
|
|
24
24
|
| `itemHeight` | `number` | `40` | Row height in pixels for virtual scroll window calculations |
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
| `@update:pageSize` | `(size: number)` | Emitted when page size changes |
|
|
33
33
|
| `@update:filter` | `(filter: IDataFilter \| null)` | Emitted when filter changes |
|
|
34
34
|
| `@update:sortList` | `(sortList: IDataSort[])` | Emitted when sorting changes |
|
|
35
|
-
| `@update:selectedRows` | `(rows:
|
|
35
|
+
| `@update:selectedRows` | `(rows: Record<string, unknown>[])` | Emitted when selectedRows changes |
|
|
36
36
|
| `@update:selectAll` | `(all: boolean)` | Emitted when selectAll state changes |
|
|
37
|
-
| `@update:unselectedRows` | `(rows:
|
|
37
|
+
| `@update:unselectedRows` | `(rows: Record<string, unknown>[])` | Emitted when unselectedRows changes |
|
|
38
38
|
| `@update:selectAllScope` | `(scope: 'page' \| 'dataset')` | Emitted when selectAllScope changes |
|
|
39
39
|
|
|
40
40
|
> [!NOTE]
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
- **Slots**:
|
|
52
52
|
| Slot | Scope | Description |
|
|
53
53
|
| --- | --- | --- |
|
|
54
|
-
| `#cell-[field]` | `{ row:
|
|
54
|
+
| `#cell-[field]` | `{ row: Record<string, unknown>, value: unknown }` | Custom cell renderer |
|
|
55
55
|
| `#header-[field]`| `{ field: string }` | Custom header renderer |
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
| Prop | Type | Default | Description |
|
|
4
4
|
| --- | --- | --- | --- |
|
|
5
5
|
| `label` | `string` | `''` | There will be a label. |
|
|
6
|
-
| `v-model` | `
|
|
7
|
-
| `v-model:day` | `
|
|
6
|
+
| `v-model` | `string \| Date \| number \| [Date, Date] \| null` | `undefined` | Primary value binding |
|
|
7
|
+
| `v-model:day` | `string \| Date \| number \| null` | `undefined` | Alias for `v-model` (Date/Time) |
|
|
8
8
|
| `v-model:isOpen` | `boolean` | `false` | Controls dropdown visibility |
|
|
9
9
|
| `format` | `string` | *Varies* | Display and mask format |
|
|
10
10
|
| `showClear` | `boolean` | `false` | Show clear icon in the textbox |
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
- **Component Specific Props**:
|
|
19
19
|
| Component | Prop | Type | Default | Description |
|
|
20
20
|
| --- | --- | --- | --- | --- |
|
|
21
|
-
| `KDatePicker` | `v-model:day` | `
|
|
21
|
+
| `KDatePicker` | `v-model:day` | `string \| Date \| number \| null` | `undefined` | Alias for `v-model` |
|
|
22
22
|
| `KHourPicker` | `step` | `number` | `30` | Minute selection interval |
|
|
23
23
|
| `KHourPicker` | `startHour` | `string` | `'00:00'` | Earliest selectable time |
|
|
24
24
|
| `KHourPicker` | `endHour` | `string` | `undefined` | Latest selectable time |
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
| `mode` | `string` | `'date'` | Timeline mode: `'date'` or `'numeric'` |
|
|
13
13
|
| `snapTo` | `string` | `'day'` | Drag snapping unit |
|
|
14
14
|
| `editable` | `boolean` | `true` | Enables interactive dragging and resizing of tasks |
|
|
15
|
-
| `taskMapping` | `
|
|
15
|
+
| `taskMapping` | `Record<string, string>` | `undefined` | Custom mapping definition for task data structure |
|
|
16
16
|
| `resourceTypeField`| `string` | `undefined` | Field identifying resource row classification |
|
|
17
17
|
| `taskTypeField` | `string` | `undefined` | Field identifying individual task classifications |
|
|
18
18
|
| `rowActions` | `IKDatatableAction[]` | `[]` | Per-row action buttons |
|
|
19
19
|
| `bulkActions` | `IKDatatableAction[]` | `[]` | Global actions for selected rows |
|
|
20
20
|
| `loading` | `boolean` | `false` | Manual loading state toggle |
|
|
21
21
|
| `idKey` | `string` | `'id'` | Unique identifier field |
|
|
22
|
-
| `v-model:selectedRows` / `selectedRows` | `
|
|
22
|
+
| `v-model:selectedRows` / `selectedRows` | `Record<string, unknown>[]` | `[]` | Selected resource rows |
|
|
23
23
|
| `v-model:selectAll` / `selectAll` | `boolean` | `false` | Global select all |
|
|
24
|
-
| `v-model:task` | `
|
|
24
|
+
| `v-model:task` | `IGanttTask | null` | `null` | Selected task |
|
|
25
25
|
| `virtualScroll` | `boolean` | `false` | Enables DOM virtualization for large resource datasets |
|
|
26
26
|
| `itemHeight` | `number` | `40` | Fixed height in px for each resource row |
|
|
27
27
|
| `viewportHeight` | `number` | `500` | Height in px of the scrollable viewport |
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
- **Events**:
|
|
39
39
|
| Event | Payload | Description |
|
|
40
40
|
| --- | --- | --- |
|
|
41
|
-
| `@task-click` | `{ task: IGanttTask, row:
|
|
42
|
-
| `@task-dblclick` | `{ task: IGanttTask, row:
|
|
43
|
-
| `@task-contextmenu` / `@task-rightclick` | `{ event: MouseEvent, task: IGanttTask, row:
|
|
44
|
-
| `@update:task` | `{ task: IGanttTask, sourceRow:
|
|
45
|
-
| `@update:selectedRows` | `
|
|
41
|
+
| `@task-click` | `{ task: IGanttTask, row: Record<string, unknown> }` | Triggered when a timeline task bar is clicked (suppressed during drag/resize) |
|
|
42
|
+
| `@task-dblclick` | `{ task: IGanttTask, row: Record<string, unknown> }` | Triggered when a timeline task bar is double-clicked |
|
|
43
|
+
| `@task-contextmenu` / `@task-rightclick` | `{ event: MouseEvent, task: IGanttTask, row: Record<string, unknown>, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, clientX: number, clientY: number }` | Triggered on right-click over a timeline task bar. Includes full `event` and keyboard modifier flags for custom context menus or modifier actions. |
|
|
44
|
+
| `@update:task` | `{ task: IGanttTask, sourceRow: Record<string, unknown>, targetRow?: Record<string, unknown> }` | Triggered when a task bar is dragged, resized, or moved across rows and dropped |
|
|
45
|
+
| `@update:selectedRows` | `Record<string, unknown>[]` | Triggered when row selection checkboxes change |
|
|
46
46
|
| `@update:selectAll` | `boolean` | Triggered when global select all changes |
|
|
47
47
|
|
|
48
48
|
- **Opening a Modal or Custom Context Menu on Task Click / Right-Click (Pug)**:
|
|
@@ -67,16 +67,16 @@ const columns = [{ field: 'resource', header: 'Resource', width: '260px' }]
|
|
|
67
67
|
const isModalOpen = ref(false)
|
|
68
68
|
const isContextMenuOpen = ref(false)
|
|
69
69
|
const menuPos = ref({ x: 0, y: 0 })
|
|
70
|
-
const activeTask = ref(null)
|
|
71
|
-
const activeRow = ref(null)
|
|
70
|
+
const activeTask = ref<IGanttTask | null>(null)
|
|
71
|
+
const activeRow = ref<Record<string, unknown> | null>(null)
|
|
72
72
|
|
|
73
|
-
const handleTaskClick = ({ task, row }: { task:
|
|
73
|
+
const handleTaskClick = ({ task, row }: { task: IGanttTask, row: Record<string, unknown> }) => {
|
|
74
74
|
activeTask.value = task
|
|
75
75
|
activeRow.value = row
|
|
76
76
|
isModalOpen.value = true
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
const handleTaskRightClick = ({ event, task, row, ctrlKey, shiftKey, clientX, clientY }:
|
|
79
|
+
const handleTaskRightClick = ({ event, task, row, ctrlKey, shiftKey, clientX, clientY }: { event: MouseEvent, task: IGanttTask, row: Record<string, unknown>, ctrlKey: boolean, shiftKey: boolean, clientX: number, clientY: number }) => {
|
|
80
80
|
event.preventDefault() // Suppress browser default context menu
|
|
81
81
|
activeTask.value = task
|
|
82
82
|
activeRow.value = row
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
- **Props**:
|
|
4
4
|
| Prop | Type | Default | Description |
|
|
5
5
|
| --- | --- | --- | --- |
|
|
6
|
-
| `dataProvider` | `ADataProvider \|
|
|
6
|
+
| `dataProvider` | `ADataProvider \| Record<string, unknown>[]` | `undefined` | Data source |
|
|
7
7
|
| `rowField` | `string` | `'row'` | Vertical matrix row key |
|
|
8
8
|
| `columnField` | `string` | `'column'` | Horizontal matrix column key |
|
|
9
9
|
| `valueField` | `string` | `'value'` | Numeric matrix cell value key |
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
- **Props**:
|
|
4
4
|
| Prop | Type | Default | Description |
|
|
5
5
|
| --- | --- | --- | --- |
|
|
6
|
-
| `dataProvider` | `ADataProvider \|
|
|
6
|
+
| `dataProvider` | `ADataProvider \| Record<string, unknown>[]` | `undefined` | Data provider or raw array of data points |
|
|
7
7
|
| `xField` | `string` | `'x'` | Key for horizontal X-axis values |
|
|
8
8
|
| `yField` | `string` | `'y'` | Key for vertical Y-axis values |
|
|
9
9
|
| `seriesField` | `string` | `undefined` | Key for multi-series grouping |
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
- **Props**:
|
|
4
4
|
| Prop | Type | Default | Description |
|
|
5
5
|
| --- | --- | --- | --- |
|
|
6
|
-
| `dataProvider` | `ADataProvider \|
|
|
6
|
+
| `dataProvider` | `ADataProvider \| Record<string, unknown>[]` | `undefined` | Data source |
|
|
7
7
|
| `labelField` | `string` | `'label'` | Slice category label key |
|
|
8
8
|
| `valueField` | `string` | `'value'` | Numeric slice magnitude key |
|
|
9
9
|
| `donut` | `boolean` | `false` | When true, renders with an inner cutout ring |
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
- **Props**:
|
|
4
4
|
| Prop | Type | Default | Description |
|
|
5
5
|
| --- | --- | --- | --- |
|
|
6
|
-
| `dataProvider` | `ADataProvider \|
|
|
6
|
+
| `dataProvider` | `ADataProvider \| Record<string, unknown>[]` | `undefined` | Data source |
|
|
7
7
|
| `xField` | `string` | `'x'` | Horizontal coordinate key |
|
|
8
8
|
| `yField` | `string` | `'y'` | Vertical coordinate key |
|
|
9
9
|
| `seriesField` | `string` | `undefined` | Series group key |
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
| `multiSelect` | `boolean` | `false` | Enable node checkboxes |
|
|
11
11
|
| `isNodeSelected`| `Function` | `() => false` | Custom selection logic handler |
|
|
12
12
|
| `selectable` | `boolean` | `false` | Enable node clicking for selection |
|
|
13
|
-
| `v-model` / `v-model:selectedNode` / `selectedNode` | `
|
|
13
|
+
| `v-model` / `v-model:selectedNode` / `selectedNode` | `ITreeNode \| string \| number \| null` | `null` | Selected node with two-way binding |
|
|
14
14
|
| `v-model:expandedNodes` / `expandedNodes` | `Set<string \| number> \| (string \| number)[]` | `undefined` | Expanded node IDs with two-way binding |
|
|
15
15
|
| `v-model:searchtext` / `searchtext` | `string` | `''` | Live filtering search text with two-way binding |
|
|
16
16
|
| `virtualScroll` | `boolean` | `false` | Enable virtual windowing for massive hierarchies (5,000+ nodes) |
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
- **Events / Emits**:
|
|
21
21
|
| Event | Payload | Description |
|
|
22
22
|
| --- | --- | --- |
|
|
23
|
-
| `@update:modelValue` | `node:
|
|
24
|
-
| `@update:selectedNode` | `node:
|
|
25
|
-
| `@select` | `node:
|
|
26
|
-
| `@node-click` | `node:
|
|
23
|
+
| `@update:modelValue` | `node: ITreeNode \| null` | Emitted when selected node changes (`v-model`) |
|
|
24
|
+
| `@update:selectedNode` | `node: ITreeNode \| null` | Emitted when selected node changes (`v-model:selectedNode`) |
|
|
25
|
+
| `@select` | `node: ITreeNode` | Emitted when a node is selected / clicked |
|
|
26
|
+
| `@node-click` | `node: ITreeNode` | Emitted when a node is clicked |
|
|
27
27
|
| `@node-toggle` | `nodeId: string \| number` | Emitted when a node's chevron is toggled |
|
|
28
28
|
| `@update:expandedNodes`| `nodes: Set<string \| number> \| (string \| number)[]` | Emitted when expansion state changes (`v-model:expandedNodes`) |
|
|
29
29
|
| `@update:searchtext` | `text: string` | Emitted when search text changes (`v-model:searchtext`) |
|
|
30
30
|
- **Slots**:
|
|
31
31
|
| Slot | Scope | Description |
|
|
32
32
|
| --- | --- | --- |
|
|
33
|
-
| `#node` | `{ node: ITreeNode, data:
|
|
34
|
-
| `#item` | `{ node: ITreeNode, data:
|
|
35
|
-
| `#default` | `{ node: ITreeNode, data:
|
|
33
|
+
| `#node` | `{ node: ITreeNode, data: Record<string, unknown> }` | Top-priority slot for custom node content |
|
|
34
|
+
| `#item` | `{ node: ITreeNode, data: Record<string, unknown> }` | Custom content for node (falls back to `#node`) |
|
|
35
|
+
| `#default` | `{ node: ITreeNode, data: Record<string, unknown> }` | Fallback for `#item` slot |
|
|
36
36
|
- **WAI-ARIA Tree View Keyboard Accessibility**:
|
|
37
37
|
- `ArrowRight`: On a closed parent, expands the node without moving focus. On an open parent, moves focus to the first child. On a leaf node, does nothing.
|
|
38
38
|
- `ArrowLeft`: On an open parent, collapses the node without moving focus. On a child node or closed node, moves focus to its parent node.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
| Prop | Type | Default | Description |
|
|
5
5
|
| --- | --- | --- | --- |
|
|
6
6
|
| `label` | `string` | `''` | There will be a label. |
|
|
7
|
-
| `v-model` | `
|
|
7
|
+
| `v-model` | `ITreeNode \| string \| number \| null` | `null` | Selected node(s) |
|
|
8
8
|
| `v-model:isOptionsOpen` | `boolean` | `false` | Controls the visibility of the dropdown |
|
|
9
9
|
| `v-model:searchtext` / `searchtext` | `string` | `''` | Live search text with two-way binding |
|
|
10
10
|
| `v-model:expandedNodes` / `expandedNodes` | `(string \| number)[]` | `[]` | Expanded node IDs with two-way binding |
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
- **Events / Emits**:
|
|
28
28
|
| Event | Payload | Description |
|
|
29
29
|
| --- | --- | --- |
|
|
30
|
-
| `@update:modelValue` | `value:
|
|
30
|
+
| `@update:modelValue` | `value: ITreeNode \| string \| number \| null` | Emitted when selected node changes |
|
|
31
31
|
| `@update:isOptionsOpen` | `open: boolean` | Emitted when dropdown opens/closes |
|
|
32
32
|
| `@update:searchtext` | `text: string` | Emitted when search changes (`v-model:searchtext`) |
|
|
33
33
|
| `@update:expandedNodes` | `nodes: (string \| number)[]` | Emitted when expansion changes (`v-model:expandedNodes`) |
|
|
34
|
-
| `@change` | `node:
|
|
34
|
+
| `@change` | `node: ITreeNode \| null` | Emitted on selection change |
|
|
35
35
|
- **Slots**: Forwards all slots to its internal `KTree` (e.g., `#item`, `#default`).
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| `v-model:expandedNodes` / `expandedNodes` | `(string \| number)[]` | `[]` | Array of expanded node IDs with two-way binding |
|
|
12
12
|
| `rowActions` | `IKDatatableAction[]` | `[]` | Per-row action menu |
|
|
13
13
|
| `bulkActions` | `IKDatatableAction[]` | `[]` | Global actions for selected rows |
|
|
14
|
-
| `selectedRows` | `
|
|
14
|
+
| `selectedRows` | `Record<string, unknown>[]` | `[]` | Currently selected rows (supports `v-model:selectedRows`) |
|
|
15
15
|
| `selectAll` | `boolean` | `false` | Header select-all state (supports `v-model:selectAll`) |
|
|
16
16
|
| `loading` | `boolean` | `false` | Manual loading state toggle |
|
|
17
17
|
| `multiSelect` | `boolean` | `false` | Enable node checkboxes |
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
| Event | Payload | Description |
|
|
22
22
|
| --- | --- | --- |
|
|
23
23
|
| `@update:expandedNodes` | `value: (string \| number)[]` | Emitted when node expansion changes (`v-model:expandedNodes`) |
|
|
24
|
-
| `@update:selectedRows` | `value:
|
|
24
|
+
| `@update:selectedRows` | `value: Record<string, unknown>[]` | Emitted when row selection changes (`v-model:selectedRows`) |
|
|
25
25
|
| `@update:selectAll` | `value: boolean` | Emitted when select-all state toggles (`v-model:selectAll`) |
|
|
26
26
|
- **Slots**:
|
|
27
27
|
| Slot | Scope | Description |
|
|
28
28
|
| --- | --- | --- |
|
|
29
|
-
| `#cell-[field]` | `{ row:
|
|
29
|
+
| `#cell-[field]` | `{ row: Record<string, unknown>, field: string, value: unknown }` | Custom cell renderer for a column |
|
|
30
30
|
| `#header-[field]` | `{ field: string }` | Custom header renderer for a column |
|
|
@@ -104,13 +104,13 @@ export default defineAppConfig({
|
|
|
104
104
|
|
|
105
105
|
| Package Name | Current Version | Description | Installation Command |
|
|
106
106
|
| --- | --- | --- | --- |
|
|
107
|
-
| `@katlux/toolkit` | `0.1.1-alpha.
|
|
108
|
-
| `@katlux/providers` | `0.1.1-alpha.
|
|
109
|
-
| `@katlux/preset-modern` | `0.1.1-alpha.
|
|
110
|
-
| `@katlux/preset-dark` | `0.1.1-alpha.
|
|
111
|
-
| `@katlux/block-charts` | `0.1.1-alpha.
|
|
112
|
-
| `@katlux/block-ecommerce` | `0.1.1-alpha.
|
|
113
|
-
| `@katlux/mcp` | `0.1.0-alpha.
|
|
107
|
+
| `@katlux/toolkit` | `0.1.1-alpha.141` | Core Nuxt module, UI toolkit, presets, and components | `npm install @katlux/toolkit@alpha` |
|
|
108
|
+
| `@katlux/providers` | `0.1.1-alpha.129` | Core data providers, client caching, and state structures | `npm install @katlux/providers@alpha` |
|
|
109
|
+
| `@katlux/preset-modern` | `0.1.1-alpha.116` | Modern design preset and styling variables | `npm install @katlux/preset-modern@alpha` |
|
|
110
|
+
| `@katlux/preset-dark` | `0.1.1-alpha.47` | Sleek Dark Mode design preset | `npm install @katlux/preset-dark@alpha` |
|
|
111
|
+
| `@katlux/block-charts` | `0.1.1-alpha.116` | Pre-built charting block components | `npm install @katlux/block-charts@alpha` |
|
|
112
|
+
| `@katlux/block-ecommerce` | `0.1.1-alpha.116` | Pre-built eCommerce block components | `npm install @katlux/block-ecommerce@alpha` |
|
|
113
|
+
| `@katlux/mcp` | `0.1.0-alpha.21` | Model Context Protocol server for AI assistant integration | `npm install @katlux/mcp@alpha` |
|
|
114
114
|
|
|
115
115
|
> [!NOTE]
|
|
116
116
|
> Katlux packages are currently published under the `@alpha` tag on NPM. Always append `@alpha` or the specific version tag when adding dependencies.
|
|
@@ -163,7 +163,7 @@ button.KButton.my-brand(:class="buttonClasses" @click="onClick")
|
|
|
163
163
|
|
|
164
164
|
<script lang="ts" setup>
|
|
165
165
|
defineProps<{
|
|
166
|
-
buttonClasses:
|
|
166
|
+
buttonClasses: string | string[] | Record<string, boolean>
|
|
167
167
|
onClick: (e: MouseEvent) => void
|
|
168
168
|
// ... same props as the default KButton template
|
|
169
169
|
}>()
|
|
@@ -127,7 +127,7 @@ button.KButton.my-brand(
|
|
|
127
127
|
<script lang="ts" setup>
|
|
128
128
|
interface ButtonProps {
|
|
129
129
|
type?: 'button' | 'submit' | 'reset'
|
|
130
|
-
buttonClasses?:
|
|
130
|
+
buttonClasses?: string | string[] | Record<string, boolean>
|
|
131
131
|
disabled?: boolean
|
|
132
132
|
loading?: boolean
|
|
133
133
|
customClasses?: string
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
| `cacheLifetime` | `number` | `undefined` | Cache expiration in milliseconds |
|
|
24
24
|
| `filterDebounce` | `number` | `300` | Debounce time in ms for `setFilter` |
|
|
25
25
|
| `sortDebounce` | `number` | `200` | Debounce time in ms for `setSortList` |
|
|
26
|
-
| `context` | `
|
|
27
|
-
| `nuxtApp` | `
|
|
26
|
+
| `context` | `Record<string, unknown>` | `undefined` | Framework-agnostic SSR context (React SSR state, Next.js context, or Nuxt app instance) |
|
|
27
|
+
| `nuxtApp` | `unknown` | `undefined` | *(Deprecated, use `context`)* Nuxt app instance for backward compatibility |
|
|
28
28
|
| `refreshOnMutation` | `boolean` | `true` | Reload data after `create`/`update`/`delete` |
|
|
29
29
|
|
|
30
30
|
### State Properties (Pure native TypeScript properties)
|
|
31
31
|
- **`pageData`**: `T[]` - Current visible slice of data.
|
|
32
32
|
- **`rowCount`**: `number` - Total results (filtered count or server total).
|
|
33
33
|
- **`loading`**: `boolean` - Active data operation status.
|
|
34
|
-
- **`error`**: `
|
|
34
|
+
- **`error`**: `Error | unknown` - Last error encountered during fetch.
|
|
35
35
|
- **`currentPage`**: `number` - Active page index (1-based).
|
|
36
36
|
- **`pageSize`**: `number` - Items per page.
|
|
37
37
|
- **`filter`**: `IDataFilter | null` - Active filter configuration.
|
|
@@ -7,9 +7,9 @@ Specialized versions that fetch a dataset **once** from an API and then manage i
|
|
|
7
7
|
| `setAPIUrl(url)` | `string` | Sets endpoint and triggers initial fetch |
|
|
8
8
|
| `refresh(hardRefresh?)`| `boolean` | Manually refetch the entire dataset. Cache will only be overridden if `hardRefresh` parameter is true. |
|
|
9
9
|
| `setFilter(filter)` | `IDataFilter \| null` | Applies a structured filter to the locally cached dataset. Filtering runs client-side via `useFilterLogic()`. Resets to page 1. |
|
|
10
|
-
| `create(item)` | `
|
|
11
|
-
| `update(item)` | `
|
|
12
|
-
| `delete(items)` | `
|
|
10
|
+
| `create(item)` | `TRow` | POST to API and update local state |
|
|
11
|
+
| `update(item)` | `TRow` | PUT to API and update local item |
|
|
12
|
+
| `delete(items)` | `TRow[]` | DELETE from API and remove locally |
|
|
13
13
|
- **`filter`**: `Ref<IDataFilter | null>` - The currently active filter configuration.
|
|
14
14
|
|
|
15
15
|
### Tree-Specific methods (Client Providers)
|
|
@@ -16,9 +16,9 @@ Handle full API integration with automatic query generation. Pagination, filteri
|
|
|
16
16
|
| --- | --- | --- |
|
|
17
17
|
| `refresh(hardRefresh?)`| `boolean` | Manual trigger for reload. Cache will only be overridden if `hardRefresh` parameter is true. |
|
|
18
18
|
| `loadPageData(opts)` | `{ disableCache?: boolean }` | Core logic for data retrieval |
|
|
19
|
-
| `create(item)` | `
|
|
20
|
-
| `update(item)` | `
|
|
21
|
-
| `delete(items)` | `
|
|
19
|
+
| `create(item)` | `TRow` | Async POST request to creation endpoint |
|
|
20
|
+
| `update(item)` | `TRow` | Async PUT request to update endpoint |
|
|
21
|
+
| `delete(items)` | `TRow[]` | Async batch deletion via endpoint |
|
|
22
22
|
|
|
23
23
|
#### Server-Side Encrypted Datatable & Search Integration
|
|
24
24
|
When querying backend persistence endpoints (e.g. server-side datatable backends or Cloudflare stateless edge workers) that store and return encrypted records:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
### `CFlatClientDataProvider`
|
|
2
2
|
Manages local arrays with client-side logic, extending `AEncryptedClientProvider`.
|
|
3
|
-
- **`setData(data:
|
|
4
|
-
- **`setDataChunked(data:
|
|
3
|
+
- **`setData(data: TRow[]): Promise<void> | void`**: Ingests dataset into provider. When encryption is enabled, eagerly encrypts designated `fields` before storing in `allData`. Plaintext never persists in `allData`. Pre-encrypted envelopes (`__encrypted: true`) pass through unchanged (idempotent). Zero overhead synchronous fast-path when encryption is disabled.
|
|
4
|
+
- **`setDataChunked(data: TRow[], options?: ISetDataChunkedOptions): Promise<void>`**: Ingests massive datasets in batches, yielding to the event loop between chunks to keep the browser UI responsive (`chunkSize`, `onProgress`, `yieldStrategy`).
|
|
5
5
|
- **`setEncryption(options)` / `clearEncryption()`**: Dynamically updates, rotates, or wipes cryptographic keys and cached ciphers at runtime.
|
|
6
|
-
- **`allData`**: `Ref<
|
|
7
|
-
- **`pageData`**: `Ref<
|
|
6
|
+
- **`allData`**: `Ref<TRow[]>` - The complete source dataset (holds ciphertext for encrypted fields in JS memory).
|
|
7
|
+
- **`pageData`**: `Ref<TRow[]>` - Active visible page slice (lazily decrypted into plaintext on active page render). Only `pageSize` rows are plaintext in JS memory.
|
|
8
8
|
- **`rowMap`**: `readonly TRow[]` - Reference map array maintaining the active filtered & sorted row references. When a page is requested, a portion of this array is served directly in $O(1)$ without re-evaluating filters or sorts.
|
|
9
9
|
- **`updateMap()`**: Explicitly forces recalculation of the `rowMap` if items inside `allData` were modified in-place.
|
|
10
10
|
- **`setFilter(filter: IDataFilter | null, immediate: boolean = false)`**: Applies a structured filter. When `encryption.searchIndex: true`, performs exact match (`==`, `!=`) and substring search (`in`) on encrypted fields using HMAC-SHA256 blind index tokens and trigram sets via `CSearchIndex`. Resets to page 1.
|
|
@@ -15,7 +15,7 @@ Handler-based server-side flat data provider that delegates pagination, filterin
|
|
|
15
15
|
- **Reactive Properties**:
|
|
16
16
|
| Property | Type | Description |
|
|
17
17
|
| --- | --- | --- |
|
|
18
|
-
| `pageData` | `Ref<
|
|
18
|
+
| `pageData` | `Ref<TRow[]>` | Current page slice of records |
|
|
19
19
|
| `rowCount` | `Ref<number>` | Total matching record count returned by the handler |
|
|
20
20
|
| `loading` | `Ref<boolean>` | Reactive fetching indicator |
|
|
21
21
|
| `currentPage` | `Ref<number>` | Current page index (triggers reload when modified) |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
### `CTreeClientDataProvider`
|
|
2
2
|
Builds and manages reactive trees from flat arrays, extending `CFlatClientDataProvider`.
|
|
3
|
-
- **`setData(data:
|
|
4
|
-
- **`setDataChunked(data:
|
|
3
|
+
- **`setData(data: TRow[]): Promise<void> | void`**: Ingests hierarchical items. Encrypts sensitive fields eagerly while preserving structural keys (`idKey`, `parentKey`) in plaintext.
|
|
4
|
+
- **`setDataChunked(data: TRow[], options?: ISetDataChunkedOptions)`**: Non-blocking chunked ingestion for large trees.
|
|
5
5
|
- **Constructor Options (`ITreeDataProviderOptions`)**:
|
|
6
6
|
| Option | Type | Default | Description |
|
|
7
7
|
| --- | --- | --- | --- |
|
|
@@ -7,7 +7,7 @@ The core engine for all HTTP communication, supporting deduplication, tag-based
|
|
|
7
7
|
| `setCacheProvider(provider)` | `ACacheProvider \| ECacheStrategy` | Configures global caching strategy |
|
|
8
8
|
| `setCacheLifetime(ms)` | `number` | Sets default global expiration (milliseconds) |
|
|
9
9
|
| `setDeduplicate(bool)` | `boolean` | Toggle request deduplication |
|
|
10
|
-
| `onDataReceived(cb)` |
|
|
10
|
+
| `onDataReceived(cb)` | `<T = unknown>(data: T, generation?: number) => void` | Registers a callback triggered when data is successfully received (passes request generation if available) |
|
|
11
11
|
| `refresh(hardRefresh)` | `boolean` | Re-runs the last request. Cache will only be overridden if `hardRefresh` parameter is true. |
|
|
12
12
|
|
|
13
13
|
- **Constructor**: `new RequestProvider(provider?, lifetime?, deduplicate?, tags?)`
|
|
@@ -20,8 +20,8 @@ The core engine for all HTTP communication, supporting deduplication, tag-based
|
|
|
20
20
|
| Property | Type | Description |
|
|
21
21
|
| --- | --- | --- |
|
|
22
22
|
| `method` | `string` | HTTP method (`'GET'`, `'POST'`, `'PUT'`, `'DELETE'`, `'PATCH'`. Default: `'GET'`) |
|
|
23
|
-
| `body` | `any` | Request body data |
|
|
24
|
-
| `query` | `Record<string,
|
|
23
|
+
| `body` | `any` | Request body data (transport payload) |
|
|
24
|
+
| `query` | `Record<string, unknown>` | URL query parameters |
|
|
25
25
|
| `headers` | `Record<string, string>` | Custom HTTP headers |
|
|
26
26
|
| `cacheStrategy` | `ECacheStrategy` | Override global strategy for this request |
|
|
27
27
|
| `lifetime` | `number` | Override global expiration for this request |
|
|
@@ -32,7 +32,7 @@ The core engine for all HTTP communication, supporting deduplication, tag-based
|
|
|
32
32
|
| `tags` | `string[]` | Associated tags for invalidation / auto-refresh upon mutation |
|
|
33
33
|
| `queue` | `boolean` | When true (for non-GET requests), enqueues the mutation into `RequestQueue` instead of dispatching immediately |
|
|
34
34
|
| `label` | `string` | Human-readable description for queued mutation display in UI |
|
|
35
|
-
| `nuxtApp` | `
|
|
35
|
+
| `nuxtApp` | `unknown` | Nuxt app instance — enables SSR cookie forwarding via h3 |
|
|
36
36
|
| `_generation` | `number` | Internal request generation counter to discard stale responses |
|
|
37
37
|
|
|
38
38
|
### `RequestProviderRegistry`
|
|
@@ -25,7 +25,7 @@ Standard interface for persistence strategies. **Note**: `ACacheProvider` is an
|
|
|
25
25
|
| Method | Params | Description |
|
|
26
26
|
| --- | --- | --- |
|
|
27
27
|
| `get<T>(key)` | `string` | Retrieves cached value |
|
|
28
|
-
| `set<T>(key, val, life)`| `string,
|
|
28
|
+
| `set<T>(key, val, life)`| `string, T, number`| Persists value with lifetime (ms) |
|
|
29
29
|
| `remove(key)` | `string` | Evicts specific entry |
|
|
30
30
|
| `removeByPrefix(pre)`| `string` | Bulk eviction (e.g., by resource URL) |
|
|
31
31
|
| `getRemainingTime(key)`| `string` | Returns remaining TTL in ms |
|
|
@@ -66,7 +66,7 @@ import { ACacheProvider, type ICacheEntry } from '@katlux/providers'
|
|
|
66
66
|
|
|
67
67
|
export class CMyCustomCache extends ACacheProvider {
|
|
68
68
|
private static instance: CMyCustomCache | null = null
|
|
69
|
-
private storage = new Map<string, ICacheEntry<
|
|
69
|
+
private storage = new Map<string, ICacheEntry<unknown>>()
|
|
70
70
|
|
|
71
71
|
public static getInstance(): CMyCustomCache {
|
|
72
72
|
if (!this.instance) {
|
|
@@ -75,11 +75,11 @@ export class CMyCustomCache extends ACacheProvider {
|
|
|
75
75
|
return this.instance
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
async getKeyList(nuxtApp?:
|
|
78
|
+
async getKeyList(nuxtApp?: unknown): Promise<string[]> {
|
|
79
79
|
return Array.from(this.storage.keys())
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
async get<T>(key: string, nuxtApp?:
|
|
82
|
+
async get<T>(key: string, nuxtApp?: unknown): Promise<T | null> {
|
|
83
83
|
const entry = this.storage.get(key)
|
|
84
84
|
if (!entry) return null
|
|
85
85
|
if (Date.now() > entry.timestamp + entry.lifetime) {
|
|
@@ -89,21 +89,21 @@ export class CMyCustomCache extends ACacheProvider {
|
|
|
89
89
|
return entry.data as T
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
async set<T>(key: string, data: T, lifetime: number, nuxtApp?:
|
|
92
|
+
async set<T>(key: string, data: T, lifetime: number, nuxtApp?: unknown): Promise<void> {
|
|
93
93
|
this.storage.set(key, { data, timestamp: Date.now(), lifetime })
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
async remove(key: string, nuxtApp?:
|
|
96
|
+
async remove(key: string, nuxtApp?: unknown): Promise<void> {
|
|
97
97
|
this.storage.delete(key)
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
async removeByPrefix(prefix: string, nuxtApp?:
|
|
100
|
+
async removeByPrefix(prefix: string, nuxtApp?: unknown): Promise<void> {
|
|
101
101
|
for (const key of this.storage.keys()) {
|
|
102
102
|
if (key.startsWith(prefix)) this.storage.delete(key)
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
async getRemainingTime(key: string, nuxtApp?:
|
|
106
|
+
async getRemainingTime(key: string, nuxtApp?: unknown): Promise<number | null> {
|
|
107
107
|
const entry = this.storage.get(key)
|
|
108
108
|
if (!entry) return null
|
|
109
109
|
const remaining = (entry.timestamp + entry.lifetime) - Date.now()
|
|
@@ -151,14 +151,14 @@ Pass the strategy name to any provider or fetch directly via `CacheProviderFacto
|
|
|
151
151
|
|
|
152
152
|
```typescript
|
|
153
153
|
// 1. With RequestProvider:
|
|
154
|
-
const request = new RequestProvider('MyCustom' as
|
|
154
|
+
const request = new RequestProvider('MyCustom' as unknown as ECacheStrategy, 60_000)
|
|
155
155
|
// or dynamically:
|
|
156
|
-
request.setCacheProvider('MyCustom' as
|
|
156
|
+
request.setCacheProvider('MyCustom' as unknown as ECacheStrategy)
|
|
157
157
|
|
|
158
158
|
// 2. With Data Providers:
|
|
159
159
|
const dataProvider = new CAPIFlatServerDataProvider({
|
|
160
160
|
pageSize: 20,
|
|
161
|
-
cacheStrategy: 'MyCustom' as
|
|
161
|
+
cacheStrategy: 'MyCustom' as unknown as ECacheStrategy,
|
|
162
162
|
cacheLifetime: 300_000
|
|
163
163
|
})
|
|
164
164
|
|
|
@@ -56,7 +56,7 @@ export interface IProviderEncryptionOptions {
|
|
|
56
56
|
keys?: Record<string, TKeyProvider | IKeyPair> // Built-in Keyring dictionary mapping kid to keys
|
|
57
57
|
activeKid?: string // Active key identifier from keys to use for outbound encryption
|
|
58
58
|
kid?: string // Key identifier / version (e.g. 'v1', 'tenant-a-key-2026')
|
|
59
|
-
aad?: string | Uint8Array | ArrayBuffer | ((record:
|
|
59
|
+
aad?: string | Uint8Array | ArrayBuffer | ((record: Record<string, unknown>, field: string) => string | Uint8Array | ArrayBuffer) // AEAD Additional Data or dynamic callback
|
|
60
60
|
aadFields?: string[] // Sibling record fields to deterministically bind into AAD (e.g. ['contact_id', 'version'])
|
|
61
61
|
baseAad?: string // Optional base prefix for AAD context binding
|
|
62
62
|
decryptOnSSR?: boolean // default: false. Prevents SSR decryption unless explicitly enabled with server secrets
|
|
@@ -64,7 +64,7 @@ export interface IProviderEncryptionOptions {
|
|
|
64
64
|
strict?: boolean // Enforces strict decryption: unencrypted plaintext in `fields` triggers injection violation; defaults allowedAlgorithms to ['AES-GCM']
|
|
65
65
|
allowedAlgorithms?: string[] // Whitelist of permitted cipher algorithms (e.g. ['AES-GCM'])
|
|
66
66
|
allowedKids?: string[] // Whitelist of permitted Key Identifiers (kid); defaults to Object.keys(keys)
|
|
67
|
-
onDecryptError?: ((info: IDecryptErrorInfo) =>
|
|
67
|
+
onDecryptError?: ((info: IDecryptErrorInfo) => unknown) | boolean | string // Per-field error hook, safe fallback marker, or true for '[⚠ Decryption Error]'
|
|
68
68
|
searchIndex?: boolean // Enables HMAC-SHA256 blind index and trigram search index on encrypted fields
|
|
69
69
|
preEncrypted?: boolean // Set to true if API endpoints return pre-encrypted ciphertext envelopes; enables in-memory index decryption
|
|
70
70
|
hmacKey?: TKeyProvider // Optional dedicated HMAC key for search indexing (defaults to encryption key)
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
| Interface / Enum | Purpose | Key Properties / Values |
|
|
4
4
|
| --- | --- | --- |
|
|
5
5
|
| `EDataFilterOperator` | Available filter operators | `Equal` (`==`), `NotEqual` (`!=`), `GreaterThan` (`>`), `LessThan` (`<`), `GreaterThanOrEqual` (`>=`), `LessThanOrEqual` (`<=`), `In`, `NotIn`, `And`, `Or`, `Nand`, `Nor` |
|
|
6
|
-
| `IDataFilter` | Structured filter query | `{ operator: EDataFilterOperator, field: string \| IDataFilter[], active: boolean }` |
|
|
6
|
+
| `IDataFilter` | Structured filter query | `{ operator: EDataFilterOperator, field: string \| TDataRow \| IDataFilter \| IDataFilter[], active: boolean }` |
|
|
7
7
|
| `IDataSort` | Sorting configuration | `{ field: string, direction: 'asc' \| 'desc' }` |
|
|
8
|
-
| `IDataResult` | Standardized API response | `{ rowCount: number, rows:
|
|
8
|
+
| `IDataResult` | Standardized API response | `{ rowCount: number, rows: T[] }` |
|
|
9
9
|
| `ECacheStrategy` | Caching persistence tiers | `Memory`, `ServerSession`, `BrowserSession`, `LocalStorage`, `IndexedDB`, `Cookie`, `Application` |
|
|
10
10
|
| `IDataProviderOptions` | Constructor configuration | See table in §3.2 |
|
|
11
11
|
| `IKDatatableAction` | Row/Bulk action config | `{ label: string, action: Function, icon?: string, iconOnly?: boolean, type?: string, visible?: Function }` |
|
|
12
|
-
| `ITreeNode` | Tree node wrapper | `{ data:
|
|
13
|
-
| `ICompositeItem`| Composite input pair | `{ selection:
|
|
12
|
+
| `ITreeNode` | Tree node wrapper | `{ data: Record<string, unknown>, id: string \| number, parentId: string \| number \| null, depth: number, hasChildren: boolean, isExpanded: boolean }` |
|
|
13
|
+
| `ICompositeItem`| Composite input pair | `{ selection: string \| number \| null, value: unknown }` (e.g. `{ selection: 'en', value: 'Hello' }`) |
|
|
14
14
|
|
|
15
15
|
### Standard Data Structure (`IDataResult`)
|
|
16
16
|
All Katlux DataProviders (and components consuming them, such as `KDatatable`, `KLineChart`, `KBarChart`, `KPieChart`, `KCombobox`, etc.) use `IDataResult` as the standard payload format:
|
|
17
17
|
```typescript
|
|
18
|
-
interface IDataResult<T =
|
|
18
|
+
interface IDataResult<T = unknown> {
|
|
19
19
|
rowCount: number // Total record count (for pagination math)
|
|
20
20
|
rows: T[] // Array of row item objects
|
|
21
21
|
}
|
|
@@ -21,7 +21,7 @@ const {
|
|
|
21
21
|
virtualRows, // ShallowRef<T[]> (full ordered array of visible rows for virtual scroll)
|
|
22
22
|
rowCount, // Ref<number>
|
|
23
23
|
loading, // Ref<boolean>
|
|
24
|
-
error, // Ref<
|
|
24
|
+
error, // Ref<Error | unknown>
|
|
25
25
|
currentPage, // Ref<number> (synced with Pinia)
|
|
26
26
|
pageSize, // Ref<number> (synced with Pinia)
|
|
27
27
|
filter, // Ref<IDataFilter | null> (synced with Pinia)
|
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.142",
|
|
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.130",
|
|
58
58
|
"@nuxt/kit": "^3.12.0",
|
|
59
59
|
"@nuxtjs/i18n": "^10.4.0",
|
|
60
60
|
"pug": "^3.0.0",
|