@katlux/toolkit 0.1.1-alpha.141 → 0.1.1-alpha.143

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.
Files changed (56) hide show
  1. package/bin/add-ai-reference.mjs +17 -0
  2. package/bin/create-preset.mjs +20 -1
  3. package/dist/compiled/composables/useKatluxForm.mjs +29 -21
  4. package/dist/module.cjs +168 -5
  5. package/dist/module.json +1 -1
  6. package/dist/module.mjs +169 -6
  7. package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
  8. package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
  9. package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +1 -1
  10. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +1 -1
  11. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +1 -1
  12. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +1 -1
  13. package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +1 -1
  14. package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +1 -1
  15. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +1 -1
  16. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +1 -1
  17. package/dist/runtime/components/KRangeSlider/KRangeSlider.global.d.vue.ts +1 -1
  18. package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +1 -1
  19. package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +1 -1
  20. package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +1 -1
  21. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +1 -1
  22. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +1 -1
  23. package/dist/runtime/composables/useKatluxForm.d.ts +11 -11
  24. package/dist/runtime/composables/useKatluxForm.js +29 -21
  25. package/dist/skills/katlux-components/components/KAreaChart.md +1 -1
  26. package/dist/skills/katlux-components/components/KBarChart.md +1 -1
  27. package/dist/skills/katlux-components/components/KBulkActions.md +3 -3
  28. package/dist/skills/katlux-components/components/KCheckbox.md +2 -2
  29. package/dist/skills/katlux-components/components/KCombobox.md +3 -3
  30. package/dist/skills/katlux-components/components/KCompositeInput.md +4 -4
  31. package/dist/skills/katlux-components/components/KDataIterator.md +3 -3
  32. package/dist/skills/katlux-components/components/KDatatable.md +7 -7
  33. package/dist/skills/katlux-components/components/KDatePicker.md +3 -3
  34. package/dist/skills/katlux-components/components/KGantt.md +12 -12
  35. package/dist/skills/katlux-components/components/KHeatMap.md +1 -1
  36. package/dist/skills/katlux-components/components/KLineChart.md +1 -1
  37. package/dist/skills/katlux-components/components/KPieChart.md +1 -1
  38. package/dist/skills/katlux-components/components/KScatterChart.md +1 -1
  39. package/dist/skills/katlux-components/components/KTree.md +8 -8
  40. package/dist/skills/katlux-components/components/KTreePicker.md +3 -3
  41. package/dist/skills/katlux-components/components/KTreeView.md +3 -3
  42. package/dist/skills/katlux-config/SKILL.md +7 -7
  43. package/dist/skills/katlux-presets/SKILL.md +1 -1
  44. package/dist/skills/katlux-presets/creating-a-preset.md +1 -1
  45. package/dist/skills/katlux-providers/providers/ADataProvider.md +3 -3
  46. package/dist/skills/katlux-providers/providers/CAPIFlatClientDataProvider.md +3 -3
  47. package/dist/skills/katlux-providers/providers/CAPIFlatServerDataProvider.md +3 -3
  48. package/dist/skills/katlux-providers/providers/CFlatClientDataProvider.md +4 -4
  49. package/dist/skills/katlux-providers/providers/CFlatServerDataProvider.md +1 -1
  50. package/dist/skills/katlux-providers/providers/CTreeClientDataProvider.md +2 -2
  51. package/dist/skills/katlux-providers/providers/RequestProvider.md +4 -4
  52. package/dist/skills/katlux-providers/providers/caching.md +11 -11
  53. package/dist/skills/katlux-providers/providers/encryption-threat-model.md +2 -2
  54. package/dist/skills/katlux-providers/providers/types.md +5 -5
  55. package/dist/skills/katlux-providers/providers/useDataProvider.md +1 -1
  56. package/package.json +2 -2
@@ -40,10 +40,10 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
40
40
  "onSearch-change"?: ((value: string) => any) | undefined;
41
41
  }>, {
42
42
  search: string;
43
- loading: boolean;
44
43
  selectedRows: any[];
45
44
  bulkActions: IKDatatableAction[];
46
45
  selectAll: boolean;
46
+ loading: boolean;
47
47
  currentPage: number;
48
48
  pageSize: number;
49
49
  virtualScroll: boolean;
@@ -40,10 +40,10 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
40
40
  "onSearch-change"?: ((value: string) => any) | undefined;
41
41
  }>, {
42
42
  search: string;
43
- loading: boolean;
44
43
  selectedRows: any[];
45
44
  bulkActions: IKDatatableAction[];
46
45
  selectAll: boolean;
46
+ loading: boolean;
47
47
  currentPage: number;
48
48
  pageSize: number;
49
49
  virtualScroll: boolean;
@@ -108,8 +108,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
108
108
  }>, {
109
109
  modelValue: string;
110
110
  isOpen: boolean;
111
- disabled: boolean;
112
111
  label: string;
112
+ disabled: boolean;
113
113
  validation: "error" | "success" | "warning" | null | undefined;
114
114
  validationText: string;
115
115
  placeholder: string;
@@ -108,8 +108,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
108
108
  }>, {
109
109
  modelValue: string;
110
110
  isOpen: boolean;
111
- disabled: boolean;
112
111
  label: string;
112
+ disabled: boolean;
113
113
  validation: "error" | "success" | "warning" | null | undefined;
114
114
  validationText: string;
115
115
  placeholder: string;
@@ -74,8 +74,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
74
74
  "onUpdate:maxValue"?: ((value: number | undefined) => any) | undefined;
75
75
  }>, {
76
76
  modelValue: number[] | [number, number];
77
- disabled: boolean;
78
77
  label: string;
78
+ disabled: boolean;
79
79
  step: number;
80
80
  min: number;
81
81
  max: number;
@@ -74,8 +74,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
74
74
  "onUpdate:maxValue"?: ((value: number | undefined) => any) | undefined;
75
75
  }>, {
76
76
  modelValue: number[] | [number, number];
77
- disabled: boolean;
78
77
  label: string;
78
+ disabled: boolean;
79
79
  step: number;
80
80
  min: number;
81
81
  max: number;
@@ -64,8 +64,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
64
64
  "onUpdate:value"?: ((value: number | undefined) => any) | undefined;
65
65
  }>, {
66
66
  modelValue: number;
67
- disabled: boolean;
68
67
  label: string;
68
+ disabled: boolean;
69
69
  value: number;
70
70
  step: number;
71
71
  min: number;
@@ -64,8 +64,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
64
64
  "onUpdate:value"?: ((value: number | undefined) => any) | undefined;
65
65
  }>, {
66
66
  modelValue: number;
67
- disabled: boolean;
68
67
  label: string;
68
+ disabled: boolean;
69
69
  value: number;
70
70
  step: number;
71
71
  min: number;
@@ -232,9 +232,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
232
232
  "onNode-toggle"?: ((nodeId: string | number) => any) | undefined;
233
233
  }>, {
234
234
  modelValue: any;
235
+ label: string;
235
236
  disabled: boolean;
236
237
  loading: boolean;
237
- label: string;
238
238
  validation: "error" | "success" | "warning" | null | undefined;
239
239
  validationText: string;
240
240
  idKey: string;
@@ -232,9 +232,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
232
232
  "onNode-toggle"?: ((nodeId: string | number) => any) | undefined;
233
233
  }>, {
234
234
  modelValue: any;
235
+ label: string;
235
236
  disabled: boolean;
236
237
  loading: boolean;
237
- label: string;
238
238
  validation: "error" | "success" | "warning" | null | undefined;
239
239
  validationText: string;
240
240
  idKey: string;
@@ -34,7 +34,7 @@ export declare namespace StandardSchemaV1 {
34
34
  /**
35
35
  * Zod-compatible schema interface
36
36
  */
37
- export interface ZodLikeSchema<TOutput = any> {
37
+ export interface ZodLikeSchema<TOutput = unknown> {
38
38
  safeParse?: (data: unknown) => {
39
39
  success: true;
40
40
  data: TOutput;
@@ -63,10 +63,10 @@ export interface ZodLikeSchema<TOutput = any> {
63
63
  /**
64
64
  * Custom validation function
65
65
  */
66
- export type CustomValidator<T = any> = (values: T) => Record<string, string> | Promise<Record<string, string>>;
67
- export type KatluxFormSchema<T = any> = StandardSchemaV1<any, T> | ZodLikeSchema<T> | CustomValidator<T>;
66
+ export type CustomValidator<T = unknown> = (values: T) => Record<string, string> | Promise<Record<string, string>>;
67
+ export type KatluxFormSchema<T = unknown> = StandardSchemaV1<unknown, T> | ZodLikeSchema<T> | CustomValidator<T>;
68
68
  export type ValidationMode = 'onBlur' | 'onChange' | 'onSubmit';
69
- export interface UseKatluxFormOptions<TValues extends Record<string, any> = Record<string, any>> {
69
+ export interface UseKatluxFormOptions<TValues extends Record<string, unknown> = Record<string, unknown>> {
70
70
  /**
71
71
  * Initial form values
72
72
  */
@@ -95,7 +95,7 @@ export interface RegisterOptions {
95
95
  /**
96
96
  * Transform value before saving to form state
97
97
  */
98
- transform?: (value: any) => any;
98
+ transform?: (value: unknown) => unknown;
99
99
  /**
100
100
  * Custom validation state override (e.g. 'warning')
101
101
  */
@@ -105,7 +105,7 @@ export interface RegisterOptions {
105
105
  */
106
106
  validationText?: string;
107
107
  }
108
- export interface FieldBinding<T = any> {
108
+ export interface FieldBinding<T = unknown> {
109
109
  name: string;
110
110
  modelValue: T;
111
111
  'onUpdate:modelValue': (value: T) => void;
@@ -121,7 +121,7 @@ export interface FieldBinding<T = any> {
121
121
  * Provides reactive form state, zero-boilerplate component binding (`v-bind="register('fieldName')"`),
122
122
  * standard schema / Zod validation interoperability, granular triggers, and error focus handling.
123
123
  */
124
- export declare function useKatluxForm<TValues extends Record<string, any> = Record<string, any>, TOutput = TValues>(options?: UseKatluxFormOptions<TValues>): {
124
+ export declare function useKatluxForm<TValues extends Record<string, unknown> = Record<string, unknown>, TOutput = TValues>(options?: UseKatluxFormOptions<TValues>): {
125
125
  values: import("vue").Reactive<TValues>;
126
126
  errors: Ref<Record<string, string>, Record<string, string>>;
127
127
  touched: Ref<Record<string, boolean>, Record<string, boolean>>;
@@ -130,16 +130,16 @@ export declare function useKatluxForm<TValues extends Record<string, any> = Reco
130
130
  isValid: ComputedRef<boolean>;
131
131
  isSubmitting: Ref<boolean, boolean>;
132
132
  submitCount: Ref<number, number>;
133
- register: <T = any>(path: string, regOptions?: RegisterOptions) => FieldBinding<T>;
133
+ register: <T = unknown>(path: string, regOptions?: RegisterOptions) => FieldBinding<T>;
134
134
  validate: (targetPath?: string) => boolean | Promise<boolean>;
135
- setValue: (path: string, val: any, opts?: {
135
+ setValue: (path: string, val: unknown, opts?: {
136
136
  shouldDirty?: boolean;
137
137
  shouldValidate?: boolean;
138
138
  }) => void;
139
- getValue: (path: string) => any;
139
+ getValue: (path: string) => unknown;
140
140
  setError: (path: string, message: string) => void;
141
141
  clearErrors: (path?: string) => void;
142
142
  setTouched: (path: string, isTouchedVal?: boolean) => void;
143
143
  reset: (newValues?: Partial<TValues>) => void;
144
- handleSubmit: (onValid: (values: TOutput, event?: Event) => any | Promise<any>, onInvalid?: (errors: Record<string, string>, values: TValues) => any | Promise<any>) => (event?: Event) => Promise<void>;
144
+ handleSubmit: (onValid: (values: TOutput, event?: Event) => unknown | Promise<unknown>, onInvalid?: (errors: Record<string, string>, values: TValues) => unknown | Promise<unknown>) => (event?: Event) => Promise<void>;
145
145
  };
@@ -1,16 +1,16 @@
1
1
  import { ref, reactive, computed, nextTick } from "vue";
2
2
  function getByPath(obj, path) {
3
- if (!obj || !path) return void 0;
3
+ if (!obj || !path || typeof obj !== "object") return void 0;
4
4
  const parts = path.replace(/\[(\w+)\]/g, ".$1").split(".");
5
5
  let current = obj;
6
6
  for (const part of parts) {
7
- if (current == null) return void 0;
7
+ if (current == null || typeof current !== "object") return void 0;
8
8
  current = current[part];
9
9
  }
10
10
  return current;
11
11
  }
12
12
  function setByPath(obj, path, value) {
13
- if (!obj || !path) return;
13
+ if (!obj || !path || typeof obj !== "object") return;
14
14
  const parts = path.replace(/\[(\w+)\]/g, ".$1").split(".");
15
15
  let current = obj;
16
16
  for (let i = 0; i < parts.length - 1; i++) {
@@ -62,26 +62,28 @@ export function useKatluxForm(options = {}) {
62
62
  }
63
63
  function parseValidationResult(rawResult, schemaType, dataToValidate) {
64
64
  if (schemaType === "standard") {
65
- if (rawResult.issues && rawResult.issues.length > 0) {
65
+ const res = rawResult;
66
+ if (res.issues && res.issues.length > 0) {
66
67
  const errorMap = {};
67
- for (const issue of rawResult.issues) {
68
- const pathStr = issue.path && issue.path.length > 0 ? issue.path.map((seg) => typeof seg === "object" && seg !== null && "key" in seg ? seg.key : seg).join(".") : "";
68
+ for (const issue of res.issues) {
69
+ const pathStr = issue.path && issue.path.length > 0 ? issue.path.map((seg) => typeof seg === "object" && seg !== null && "key" in seg ? String(seg.key) : String(seg)).join(".") : "";
69
70
  registerErrorPaths(errorMap, pathStr, issue.message);
70
71
  }
71
72
  return { valid: false, output: dataToValidate, errors: errorMap };
72
73
  }
73
- return { valid: true, output: rawResult.value ?? dataToValidate, errors: {} };
74
+ return { valid: true, output: res.value ?? dataToValidate, errors: {} };
74
75
  }
75
76
  if (schemaType === "zod") {
76
- if (!rawResult.success) {
77
+ const res = rawResult;
78
+ if (!res.success) {
77
79
  const errorMap = {};
78
- for (const issue of rawResult.error.issues) {
80
+ for (const issue of res.error.issues) {
79
81
  const pathStr = issue.path ? issue.path.join(".") : "";
80
82
  registerErrorPaths(errorMap, pathStr, issue.message);
81
83
  }
82
84
  return { valid: false, output: dataToValidate, errors: errorMap };
83
85
  }
84
- return { valid: true, output: rawResult.data ?? dataToValidate, errors: {} };
86
+ return { valid: true, output: res.data ?? dataToValidate, errors: {} };
85
87
  }
86
88
  if (schemaType === "custom") {
87
89
  const errorMap = {};
@@ -99,19 +101,25 @@ export function useKatluxForm(options = {}) {
99
101
  if (!schema) {
100
102
  return { valid: true, output: dataToValidate, errors: {} };
101
103
  }
102
- if ("~standard" in schema && typeof schema["~standard"]?.validate === "function") {
103
- const res = schema["~standard"].validate(dataToValidate);
104
- if (res && typeof res.then === "function") {
105
- return res.then((r) => parseValidationResult(r, "standard", dataToValidate));
104
+ if (typeof schema === "object" && schema !== null && "~standard" in schema) {
105
+ const standardSchema = schema;
106
+ if (typeof standardSchema["~standard"]?.validate === "function") {
107
+ const res = standardSchema["~standard"].validate(dataToValidate);
108
+ if (res && typeof res.then === "function") {
109
+ return res.then((r) => parseValidationResult(r, "standard", dataToValidate));
110
+ }
111
+ return parseValidationResult(res, "standard", dataToValidate);
106
112
  }
107
- return parseValidationResult(res, "standard", dataToValidate);
108
- }
109
- if (typeof schema.safeParse === "function") {
110
- const res = schema.safeParse(dataToValidate);
111
- return parseValidationResult(res, "zod", dataToValidate);
112
113
  }
113
- if (typeof schema.safeParseAsync === "function") {
114
- return schema.safeParseAsync(dataToValidate).then((res) => parseValidationResult(res, "zod", dataToValidate));
114
+ if (typeof schema === "object" && schema !== null) {
115
+ const zodSchema = schema;
116
+ if (typeof zodSchema.safeParse === "function") {
117
+ const res = zodSchema.safeParse(dataToValidate);
118
+ return parseValidationResult(res, "zod", dataToValidate);
119
+ }
120
+ if (typeof zodSchema.safeParseAsync === "function") {
121
+ return zodSchema.safeParseAsync(dataToValidate).then((res) => parseValidationResult(res, "zod", dataToValidate));
122
+ }
115
123
  }
116
124
  if (typeof schema === "function") {
117
125
  const res = schema(dataToValidate);
@@ -3,7 +3,7 @@
3
3
  - **Props**:
4
4
  | Prop | Type | Default | Description |
5
5
  | --- | --- | --- | --- |
6
- | `dataProvider` | `ADataProvider \| any[]` | `undefined` | Data provider or raw data array |
6
+ | `dataProvider` | `ADataProvider \| Record<string, unknown>[]` | `undefined` | Data provider or raw data array |
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 \| any[]` | `undefined` | Data source |
6
+ | `dataProvider` | `ADataProvider \| Record<string, unknown>[]` | `undefined` | Data source |
7
7
  | `categoryField` | `string` | `'category'` | Key for categorical axis labels |
8
8
  | `valueField` | `string` | `'value'` | Key for numeric bar lengths |
9
9
  | `groupField` | `string` | `undefined` | Key for clustering or stacking subgroups |
@@ -4,10 +4,10 @@
4
4
  | Prop | Type | Default | Description |
5
5
  | --- | --- | --- | --- |
6
6
  | `bulkActions` | `IKDatatableAction[]` | **Required** | Defined actions |
7
- | `selectedRows` | `any[]` | **Required** | Current selection array |
7
+ | `selectedRows` | `Record<string, unknown>[]` | **Required** | Current selection array |
8
8
  | `selectAll` | `boolean` | `false` | Global dataset selection flag |
9
- | `unselectedRows` | `any[]` | `[]` | Excluded rows when selectAll is true in dataset scope |
10
- | `filter` | `any` | `undefined` | Active data provider filter to pass to bulk action callbacks |
9
+ | `unselectedRows` | `Record<string, unknown>[]` | `[]` | Excluded rows when selectAll is true in dataset scope |
10
+ | `filter` | `IDataFilter \| IDataFilterGroup` | `undefined` | Active data provider filter to pass to bulk action callbacks |
11
11
  | `idKey` | `string` | `'id'` | Unique identifier field for row key extraction |
12
12
 
13
13
  - **Feature — Interchangeable Row & Bulk Actions & Rich Context**:
@@ -2,9 +2,9 @@
2
2
  - **Props**:
3
3
  | Prop | Type | Default | Description |
4
4
  | --- | --- | --- | --- |
5
- | `v-model` | `any` | `null` | Binding state |
5
+ | `v-model` | `boolean \| string \| number \| unknown[]` | `null` | Binding state |
6
6
  | `label` | `string` | `''` | Label text |
7
- | `value` | `any` | `undefined` | Value when selected |
7
+ | `value` | `string \| number \| boolean \| Record<string, unknown>` | `undefined` | Value when selected |
8
8
  | `disabled` | `boolean` | `false` | Disable input |
9
9
  | `validation` | `'success' \| 'warning' \| 'error' \| null` | `null` | Semantic validation state |
10
10
  | `validationText`| `string` | `''` | message to display below input |
@@ -6,7 +6,7 @@
6
6
  | `dataProvider` | `ADataProvider` | **Required** | Data source |
7
7
  | `labelField` | `string` | **Required** | Field to display as label |
8
8
  | `valueField` | `string` | `null` | Optional. Field to bind v-model with (primitive) |
9
- | `v-model` | `any` | `null` | Selected item(s) (Object or Primitive if valueField is set) |
9
+ | `v-model` | `string \| number \| Record<string, unknown> \| (string \| number \| Record<string, unknown>)[] \| null` | `null` | Selected item(s) (Object or Primitive if valueField is set) |
10
10
  | `v-model:isOptionsOpen` | `boolean` | `undefined` | Controls dropdown visibility externally |
11
11
  | `multiSelect` | `boolean` | `false` | Allow multiple selections |
12
12
  | `searchbox` | `boolean` | `false` | Enable live search |
@@ -27,11 +27,11 @@
27
27
  - **Events / Emits**:
28
28
  | Event | Payload | Description |
29
29
  | --- | --- | --- |
30
- | `@update:modelValue` | `(val: any)` | Emitted when selection changes |
30
+ | `@update:modelValue` | `(val: string \| number \| Record<string, unknown> \| (string \| number \| Record<string, unknown>)[] \| null)` | Emitted when selection changes |
31
31
  | `@update:isOptionsOpen` | `(open: boolean)` | Emitted when dropdown visibility changes |
32
32
  | `@update:searchtext` | `(text: string)` | Emitted when search input changes (`v-model:searchtext`) |
33
33
  | `@scroll-state-change` | `(state: IVirtualScrollState)` | Emitted when virtual scroll window updates (`{ startIndex, endIndex, visibleCount, totalCount, scrollTop }`) |
34
- | `@change` | `(val: any)` | Emitted on option selection |
34
+ | `@change` | `(val: string \| number \| Record<string, unknown> \| null)` | Emitted on option selection |
35
35
  - **Exposed Properties (via `ref`)**:
36
36
  | Property | Type | Description |
37
37
  | --- | --- | --- |
@@ -4,8 +4,8 @@
4
4
  | Prop | Type | Default | Description |
5
5
  | --- | --- | --- | --- |
6
6
  | `label` | `string` | `''` | There will be a label. |
7
- | `selectionValue` | `any` | `null` | Current selection (e.g., language code) |
8
- | `inputValue` | `any` | `''` | Input value for the active selection |
7
+ | `selectionValue` | `string \| number \| null` | `null` | Current selection (e.g., language code) |
8
+ | `inputValue` | `unknown` | `''` | Input value for the active selection |
9
9
  | `modelValue` | `ICompositeItem[]` | `[]` | Collection of active selection-value pairs |
10
10
  | `dataProvider` | `ADataProvider` | **Required** | Data source for the selection combobox |
11
11
  | `type` | `string` | `'textbox'` | Default input type: `'textbox'`, `'textarea'`, `'maskedtextbox'`, `'combobox'`, `'datepicker'`, `'datetimepicker'`, `'hourpicker'`. Can be overridden per-selection via `inputConfig`. |
@@ -47,8 +47,8 @@
47
47
  - **Events**:
48
48
  | Event | Payload | Description |
49
49
  | --- | --- | --- |
50
- | `update:selectionValue`| `any` | Fired when the active selection changes |
51
- | `update:inputValue` | `any` | Fired when the active input value changes |
50
+ | `update:selectionValue`| `string \| number \| null` | Fired when the active selection changes |
51
+ | `update:inputValue` | `unknown` | Fired when the active input value changes |
52
52
  | `update:modelValue` | `ICompositeItem[]` | Fired when the multi-value collection updates |
53
53
 
54
54
  - **Usage Examples**:
@@ -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` | `any[]` | `[]` | Selected rows array with two-way binding |
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: any[])` | Emitted when selection changes |
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: any, rowActions: any[] }` | Custom template for each data item |
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, any>` | `undefined` | Custom cell slots map (alternative to template slots) |
12
- | `headerSlots` | `Record<string, any>` | `undefined` | Custom header slots map (alternative to template slots) |
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`| `any[]` | `[]` | Array of currently selected row objects (preserved across page changes) |
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` | `any[]` | `[]` | Excluded row objects when `selectAll: true` in dataset scope |
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: any[])` | Emitted when selectedRows changes |
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: any[])` | Emitted when unselectedRows changes |
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: any, value: any }` | Custom cell renderer |
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` | `any` | `undefined` | Primary value binding |
7
- | `v-model:day` | `any` | `undefined` | Alias for `v-model` (Date/Time) |
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` | `any` | `undefined` | Alias for `v-model` |
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` | `any` | `undefined` | Custom mapping definition for task data structure |
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` | `any[]` | `[]` | Selected resource rows |
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` | `any` | `null` | Selected 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: any }` | Triggered when a timeline task bar is clicked (suppressed during drag/resize) |
42
- | `@task-dblclick` | `{ task: IGanttTask, row: any }` | Triggered when a timeline task bar is double-clicked |
43
- | `@task-contextmenu` / `@task-rightclick` | `{ event: MouseEvent, task: IGanttTask, row: any, 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: any, targetRow?: any }` | Triggered when a task bar is dragged, resized, or moved across rows and dropped |
45
- | `@update:selectedRows` | `any[]` | Triggered when row selection checkboxes change |
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: any, row: any }) => {
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 }: any) => {
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 \| any[]` | `undefined` | Data source |
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 \| any[]` | `undefined` | Data provider or raw array of data points |
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 \| any[]` | `undefined` | Data source |
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 \| any[]` | `undefined` | Data source |
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` | `any` | `null` | Selected node with two-way binding |
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: any` | Emitted when selected node changes (`v-model`) |
24
- | `@update:selectedNode` | `node: any` | Emitted when selected node changes (`v-model:selectedNode`) |
25
- | `@select` | `node: any` | Emitted when a node is selected / clicked |
26
- | `@node-click` | `node: any` | Emitted when a node is clicked |
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: any }` | Top-priority slot for custom node content |
34
- | `#item` | `{ node: ITreeNode, data: any }` | Custom content for node (falls back to `#node`) |
35
- | `#default` | `{ node: ITreeNode, data: any }` | Fallback for `#item` slot |
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` | `any` | `null` | Selected node(s) |
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: any` | Emitted when selected node changes |
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: any` | Emitted on selection change |
34
+ | `@change` | `node: ITreeNode \| null` | Emitted on selection change |
35
35
  - **Slots**: Forwards all slots to its internal `KTree` (e.g., `#item`, `#default`).