@katlux/toolkit 0.1.0-beta.14 → 0.1.0-beta.17
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.cjs +11 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +11 -2
- 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/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +72 -0
- 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/KDatatable/KDataIterator.logic.d.ts +20 -0
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +12 -0
- package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +1 -1
- package/dist/runtime/components/KLoader/KLoader.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/components/KTreePicker/KTreePicker.logic.d.ts +77 -0
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
- package/package.json +2 -2
package/dist/module.cjs
CHANGED
|
@@ -10,8 +10,17 @@ const module$1 = kit.defineNuxtModule({
|
|
|
10
10
|
},
|
|
11
11
|
setup(options, nuxt) {
|
|
12
12
|
const { resolve } = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('module.cjs', document.baseURI).href)));
|
|
13
|
-
|
|
14
|
-
nuxt.options.
|
|
13
|
+
const runtimePath = resolve("./runtime");
|
|
14
|
+
nuxt.options.build.transpile.push(runtimePath);
|
|
15
|
+
nuxt.options.css.push(resolve("./runtime/presets/default/assets/scss/index.scss"));
|
|
16
|
+
nuxt.hook("vite:extendConfig", (config) => {
|
|
17
|
+
const server = config.server || (config.server = {});
|
|
18
|
+
const fs = server.fs || (server.fs = {});
|
|
19
|
+
const allow = fs.allow || (fs.allow = []);
|
|
20
|
+
if (!allow.includes(runtimePath)) {
|
|
21
|
+
allow.push(runtimePath);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
15
24
|
kit.addComponentsDir({
|
|
16
25
|
path: resolve("./runtime/components"),
|
|
17
26
|
pathPrefix: false,
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,8 +7,17 @@ const module$1 = defineNuxtModule({
|
|
|
7
7
|
},
|
|
8
8
|
setup(options, nuxt) {
|
|
9
9
|
const { resolve } = createResolver(import.meta.url);
|
|
10
|
-
|
|
11
|
-
nuxt.options.
|
|
10
|
+
const runtimePath = resolve("./runtime");
|
|
11
|
+
nuxt.options.build.transpile.push(runtimePath);
|
|
12
|
+
nuxt.options.css.push(resolve("./runtime/presets/default/assets/scss/index.scss"));
|
|
13
|
+
nuxt.hook("vite:extendConfig", (config) => {
|
|
14
|
+
const server = config.server || (config.server = {});
|
|
15
|
+
const fs = server.fs || (server.fs = {});
|
|
16
|
+
const allow = fs.allow || (fs.allow = []);
|
|
17
|
+
if (!allow.includes(runtimePath)) {
|
|
18
|
+
allow.push(runtimePath);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
12
21
|
addComponentsDir({
|
|
13
22
|
path: resolve("./runtime/components"),
|
|
14
23
|
pathPrefix: false,
|
|
@@ -46,7 +46,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
46
46
|
}>> & Readonly<{
|
|
47
47
|
onClick?: (() => any) | undefined;
|
|
48
48
|
}>, {
|
|
49
|
-
size: "
|
|
49
|
+
size: "large" | "medium" | "small" | undefined;
|
|
50
50
|
type: "info" | "default" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | undefined;
|
|
51
51
|
disabled: boolean;
|
|
52
52
|
href: string;
|
|
@@ -46,7 +46,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
46
46
|
}>> & Readonly<{
|
|
47
47
|
onClick?: (() => any) | undefined;
|
|
48
48
|
}>, {
|
|
49
|
-
size: "
|
|
49
|
+
size: "large" | "medium" | "small" | undefined;
|
|
50
50
|
type: "info" | "default" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | undefined;
|
|
51
51
|
disabled: boolean;
|
|
52
52
|
href: string;
|
|
@@ -22,7 +22,7 @@ export interface KButtonEmits {
|
|
|
22
22
|
export declare function useKButtonLogic(props: KButtonProps, emit: KButtonEmits): {
|
|
23
23
|
isLink: import("vue").ComputedRef<boolean>;
|
|
24
24
|
isDisabled: import("vue").ComputedRef<boolean | undefined>;
|
|
25
|
-
buttonClasses: import("vue").ComputedRef<("info" | "default" | "
|
|
25
|
+
buttonClasses: import("vue").ComputedRef<("info" | "default" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "large" | "medium" | "small" | {
|
|
26
26
|
disabled: boolean | undefined;
|
|
27
27
|
})[]>;
|
|
28
28
|
onClick: () => void;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ADataProvider } from '@katlux/providers';
|
|
2
|
+
import { type TDataRow } from '@katlux/providers';
|
|
3
|
+
export type ComboboxItem = TDataRow;
|
|
4
|
+
export interface KComboboxProps {
|
|
5
|
+
dataProvider: ADataProvider;
|
|
6
|
+
closeOnSelect?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
multiSelect?: boolean;
|
|
9
|
+
maxSelectedDisplay?: number | string | false;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
searchbox?: boolean;
|
|
12
|
+
visibleFields?: Array<String> | null;
|
|
13
|
+
labelField: string;
|
|
14
|
+
modelValue?: ComboboxItem | ComboboxItem[] | null;
|
|
15
|
+
}
|
|
16
|
+
export interface KComboboxEmits {
|
|
17
|
+
(e: 'update:modelValue', value: ComboboxItem | ComboboxItem[] | null): void;
|
|
18
|
+
}
|
|
19
|
+
export declare const KComboboxDefaultProps: {
|
|
20
|
+
dataProvider: {
|
|
21
|
+
type: PropType<ADataProvider>;
|
|
22
|
+
required: boolean;
|
|
23
|
+
};
|
|
24
|
+
closeOnSelect: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
disabled: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
multiSelect: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
maxSelectedDisplay: {
|
|
37
|
+
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
placeholder: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
searchbox: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
visibleFields: {
|
|
49
|
+
type: PropType<Array<String>>;
|
|
50
|
+
default: null;
|
|
51
|
+
};
|
|
52
|
+
labelField: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
required: boolean;
|
|
55
|
+
};
|
|
56
|
+
modelValue: {
|
|
57
|
+
type: PropType<ComboboxItem | ComboboxItem[] | null>;
|
|
58
|
+
default: null;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export declare function useKComboboxLogic(props: KComboboxProps, emit: KComboboxEmits): {
|
|
62
|
+
selectedItems: import("vue").Ref<TDataRow[] | null, TDataRow[] | null>;
|
|
63
|
+
isOptionsOpen: import("vue").Ref<boolean, boolean>;
|
|
64
|
+
searchtext: import("vue").Ref<string, string>;
|
|
65
|
+
selectItem: (option: ComboboxItem) => void;
|
|
66
|
+
isSelected: (option: ComboboxItem) => boolean | undefined;
|
|
67
|
+
getSelectedContent: () => TDataRow[];
|
|
68
|
+
toggleDropdown: () => void;
|
|
69
|
+
closeDropdown: () => void;
|
|
70
|
+
filteredOptions: import("vue").ComputedRef<TDataRow[]>;
|
|
71
|
+
loading: import("vue").Ref<Boolean, Boolean>;
|
|
72
|
+
};
|
|
@@ -11,9 +11,9 @@ interface Props {
|
|
|
11
11
|
page?: number;
|
|
12
12
|
}
|
|
13
13
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
14
|
-
bulkActions: IKDatatableAction[];
|
|
15
14
|
search: string;
|
|
16
15
|
loading: boolean;
|
|
16
|
+
bulkActions: IKDatatableAction[];
|
|
17
17
|
visibleFields: Array<string> | null;
|
|
18
18
|
rowActions: IKDatatableAction[];
|
|
19
19
|
itemsPerPage: number;
|
|
@@ -11,9 +11,9 @@ interface Props {
|
|
|
11
11
|
page?: number;
|
|
12
12
|
}
|
|
13
13
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
14
|
-
bulkActions: IKDatatableAction[];
|
|
15
14
|
search: string;
|
|
16
15
|
loading: boolean;
|
|
16
|
+
bulkActions: IKDatatableAction[];
|
|
17
17
|
visibleFields: Array<string> | null;
|
|
18
18
|
rowActions: IKDatatableAction[];
|
|
19
19
|
itemsPerPage: number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ADataProvider } from '@katlux/providers';
|
|
2
|
+
export interface KDataIteratorProps {
|
|
3
|
+
dataProvider: ADataProvider;
|
|
4
|
+
visibleFields?: Array<string> | null;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
search?: string;
|
|
7
|
+
itemsPerPage?: number;
|
|
8
|
+
page?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const KDataIteratorDefaultProps: {
|
|
11
|
+
visibleFields: null;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
search: string;
|
|
14
|
+
itemsPerPage: number;
|
|
15
|
+
page: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function useKDataIteratorLogic(props: KDataIteratorProps): {
|
|
18
|
+
selectedRows: import("vue").Ref<any[], any[]>;
|
|
19
|
+
selectAll: import("vue").Ref<boolean, boolean>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ADataProvider } from '@katlux/providers';
|
|
2
|
+
export interface KDatatableProps {
|
|
3
|
+
dataProvider: ADataProvider;
|
|
4
|
+
visibleFields?: Array<string> | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const KDatatableDefaultProps: {
|
|
7
|
+
visibleFields: null;
|
|
8
|
+
};
|
|
9
|
+
export declare function useKDatatableLogic(props: KDatatableProps): {
|
|
10
|
+
selectedRows: import("vue").Ref<any[], any[]>;
|
|
11
|
+
selectAll: import("vue").Ref<boolean, boolean>;
|
|
12
|
+
};
|
|
@@ -25,7 +25,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
25
25
|
default: string;
|
|
26
26
|
};
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
|
-
size: "
|
|
28
|
+
size: "large" | "medium" | "small";
|
|
29
29
|
overlay: boolean;
|
|
30
30
|
loading: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -25,7 +25,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
25
25
|
default: string;
|
|
26
26
|
};
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
|
-
size: "
|
|
28
|
+
size: "large" | "medium" | "small";
|
|
29
29
|
overlay: boolean;
|
|
30
30
|
loading: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -105,6 +105,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
105
105
|
}>, {
|
|
106
106
|
disabled: boolean;
|
|
107
107
|
loading: boolean;
|
|
108
|
+
parentKey: string;
|
|
109
|
+
idKey: string;
|
|
108
110
|
modelValue: any;
|
|
109
111
|
searchbox: boolean;
|
|
110
112
|
placeholder: string;
|
|
@@ -112,8 +114,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
112
114
|
closeOnSelect: boolean;
|
|
113
115
|
multiSelect: boolean;
|
|
114
116
|
iconField: string;
|
|
115
|
-
idKey: string;
|
|
116
|
-
parentKey: string;
|
|
117
117
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
118
118
|
declare const _default: typeof __VLS_export;
|
|
119
119
|
export default _default;
|
|
@@ -105,6 +105,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
105
105
|
}>, {
|
|
106
106
|
disabled: boolean;
|
|
107
107
|
loading: boolean;
|
|
108
|
+
parentKey: string;
|
|
109
|
+
idKey: string;
|
|
108
110
|
modelValue: any;
|
|
109
111
|
searchbox: boolean;
|
|
110
112
|
placeholder: string;
|
|
@@ -112,8 +114,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
112
114
|
closeOnSelect: boolean;
|
|
113
115
|
multiSelect: boolean;
|
|
114
116
|
iconField: string;
|
|
115
|
-
idKey: string;
|
|
116
|
-
parentKey: string;
|
|
117
117
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
118
118
|
declare const _default: typeof __VLS_export;
|
|
119
119
|
export default _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { ADataProvider } from '@katlux/providers';
|
|
2
|
+
export interface KTreePickerProps {
|
|
3
|
+
modelValue?: any;
|
|
4
|
+
dataProvider: ADataProvider;
|
|
5
|
+
labelField: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
closeOnSelect?: boolean;
|
|
9
|
+
idKey?: string;
|
|
10
|
+
parentKey?: string;
|
|
11
|
+
iconField?: string;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
multiSelect?: boolean;
|
|
14
|
+
searchbox?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const KTreePickerDefaultProps: {
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: PropType<any>;
|
|
19
|
+
default: null;
|
|
20
|
+
};
|
|
21
|
+
dataProvider: {
|
|
22
|
+
type: PropType<ADataProvider>;
|
|
23
|
+
required: boolean;
|
|
24
|
+
};
|
|
25
|
+
labelField: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
required: boolean;
|
|
28
|
+
};
|
|
29
|
+
placeholder: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
disabled: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
closeOnSelect: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
idKey: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
parentKey: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
iconField: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
53
|
+
loading: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
multiSelect: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
searchbox: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export declare function useKTreePickerLogic(props: KTreePickerProps, emit: any): {
|
|
67
|
+
selectedItems: import("vue").Ref<import("@katlux/providers").TDataRow[] | null, import("@katlux/providers").TDataRow[] | null>;
|
|
68
|
+
isOptionsOpen: import("vue").Ref<boolean, boolean>;
|
|
69
|
+
searchtext: import("vue").Ref<string, string>;
|
|
70
|
+
selectItem: (option: import("../KCombobox/KCombobox.logic.js").ComboboxItem) => void;
|
|
71
|
+
isSelected: (option: import("../KCombobox/KCombobox.logic.js").ComboboxItem) => boolean | undefined;
|
|
72
|
+
getSelectedContent: () => import("@katlux/providers").TDataRow[];
|
|
73
|
+
toggleDropdown: () => void;
|
|
74
|
+
closeDropdown: () => void;
|
|
75
|
+
filteredOptions: import("vue").ComputedRef<import("@katlux/providers").TDataRow[]>;
|
|
76
|
+
loading: import("vue").Ref<Boolean, Boolean>;
|
|
77
|
+
};
|
|
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
default: () => {};
|
|
82
82
|
};
|
|
83
83
|
}>> & Readonly<{}>, {
|
|
84
|
+
parentKey: string;
|
|
85
|
+
idKey: string;
|
|
86
|
+
expandedByDefault: boolean;
|
|
84
87
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
85
88
|
rowActions: import("./KTreeView.logic.js").IRowAction[];
|
|
86
89
|
cellSlots: Record<string, any>;
|
|
87
90
|
headerSlots: Record<string, any>;
|
|
88
91
|
treeColumnIndex: number;
|
|
89
|
-
idKey: string;
|
|
90
|
-
parentKey: string;
|
|
91
|
-
expandedByDefault: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
93
|
declare const _default: typeof __VLS_export;
|
|
94
94
|
export default _default;
|
|
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
default: () => {};
|
|
82
82
|
};
|
|
83
83
|
}>> & Readonly<{}>, {
|
|
84
|
+
parentKey: string;
|
|
85
|
+
idKey: string;
|
|
86
|
+
expandedByDefault: boolean;
|
|
84
87
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
85
88
|
rowActions: import("./KTreeView.logic.js").IRowAction[];
|
|
86
89
|
cellSlots: Record<string, any>;
|
|
87
90
|
headerSlots: Record<string, any>;
|
|
88
91
|
treeColumnIndex: number;
|
|
89
|
-
idKey: string;
|
|
90
|
-
parentKey: string;
|
|
91
|
-
expandedByDefault: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
93
|
declare const _default: typeof __VLS_export;
|
|
94
94
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@katlux/toolkit",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.17",
|
|
4
4
|
"description": "Core UI toolkit and utilities for the Katlux ecosystem",
|
|
5
5
|
"author": "Katlux",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@katlux/providers": "*",
|
|
39
|
-
"@nuxt/kit": "^3.
|
|
39
|
+
"@nuxt/kit": "^3.12.0",
|
|
40
40
|
"pug": "^3.0.0",
|
|
41
41
|
"sass": "^1.80.0"
|
|
42
42
|
},
|