@katlux/toolkit 0.1.0-beta.71 → 0.1.0-beta.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
3
  "configKey": "katluxToolkit",
4
- "version": "0.1.0-beta.71",
4
+ "version": "0.1.0-beta.72",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "small" | "large" | "medium" | {
25
+ buttonClasses: import("vue").ComputedRef<("info" | "default" | "small" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "large" | "medium" | {
26
26
  disabled: boolean | undefined;
27
27
  })[]>;
28
28
  onClick: () => void;
@@ -11,8 +11,8 @@ 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
- search: string;
15
14
  bulkActions: IKDatatableAction[];
15
+ search: string;
16
16
  loading: boolean;
17
17
  visibleFields: Array<string> | null;
18
18
  rowActions: IKDatatableAction[];
@@ -11,8 +11,8 @@ 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
- search: string;
15
14
  bulkActions: IKDatatableAction[];
15
+ search: string;
16
16
  loading: boolean;
17
17
  visibleFields: Array<string> | null;
18
18
  rowActions: IKDatatableAction[];
@@ -9,6 +9,8 @@ interface Props {
9
9
  headerSlots?: Record<string, any>;
10
10
  columnHeaders?: Record<string, string>;
11
11
  columnWidths?: Record<string, string>;
12
+ emptyStateText?: string;
13
+ emptyFilterStateText?: string;
12
14
  }
13
15
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
16
  bulkActions: Array<IKDatatableAction>;
@@ -18,6 +20,8 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
18
20
  headerSlots: Record<string, any>;
19
21
  columnHeaders: Record<string, string>;
20
22
  columnWidths: Record<string, string>;
23
+ emptyStateText: string;
24
+ emptyFilterStateText: string;
21
25
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
26
  declare const _default: typeof __VLS_export;
23
27
  export default _default;
@@ -12,7 +12,9 @@ const props = defineProps({
12
12
  cellSlots: { type: Object, required: false, default: void 0 },
13
13
  headerSlots: { type: Object, required: false, default: void 0 },
14
14
  columnHeaders: { type: Object, required: false, default: void 0 },
15
- columnWidths: { type: Object, required: false, default: void 0 }
15
+ columnWidths: { type: Object, required: false, default: void 0 },
16
+ emptyStateText: { type: String, required: false, default: "no result" },
17
+ emptyFilterStateText: { type: String, required: false, default: "no result found for filter" }
16
18
  });
17
19
  const { selectedRows, selectAll } = useKDatatableLogic(props);
18
20
  const presetComponent = usePresetComponent("KDatatable", DatatableDefault);
@@ -31,7 +33,9 @@ const templateProps = computed(() => ({
31
33
  cellSlots: mergedCellSlots.value,
32
34
  headerSlots: props.headerSlots,
33
35
  columnHeaders: props.columnHeaders,
34
- columnWidths: props.columnWidths
36
+ columnWidths: props.columnWidths,
37
+ emptyStateText: props.emptyStateText,
38
+ emptyFilterStateText: props.emptyFilterStateText
35
39
  }));
36
40
  const updateSelectedRows = (val) => {
37
41
  selectedRows.value = val;
@@ -9,6 +9,8 @@ interface Props {
9
9
  headerSlots?: Record<string, any>;
10
10
  columnHeaders?: Record<string, string>;
11
11
  columnWidths?: Record<string, string>;
12
+ emptyStateText?: string;
13
+ emptyFilterStateText?: string;
12
14
  }
13
15
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
16
  bulkActions: Array<IKDatatableAction>;
@@ -18,6 +20,8 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
18
20
  headerSlots: Record<string, any>;
19
21
  columnHeaders: Record<string, string>;
20
22
  columnWidths: Record<string, string>;
23
+ emptyStateText: string;
24
+ emptyFilterStateText: string;
21
25
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
26
  declare const _default: typeof __VLS_export;
23
27
  export default _default;
@@ -2,9 +2,13 @@ import { ADataProvider } from '@katlux/providers';
2
2
  export interface KDatatableProps {
3
3
  dataProvider: ADataProvider;
4
4
  visibleFields?: Array<string> | null;
5
+ emptyStateText?: string;
6
+ emptyFilterStateText?: string;
5
7
  }
6
8
  export declare const KDatatableDefaultProps: {
7
9
  visibleFields: null;
10
+ emptyStateText: string;
11
+ emptyFilterStateText: string;
8
12
  };
9
13
  export declare function useKDatatableLogic(props: KDatatableProps): {
10
14
  selectedRows: import("vue").Ref<any[], any[]>;
@@ -1,6 +1,8 @@
1
1
  import { watch } from "vue";
2
2
  export const KDatatableDefaultProps = {
3
- visibleFields: null
3
+ visibleFields: null,
4
+ emptyStateText: "no result",
5
+ emptyFilterStateText: "no result found for filter"
4
6
  };
5
7
  export function useKDatatableLogic(props) {
6
8
  const selectedRows = props.dataProvider.selectedRows;
@@ -156,8 +156,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
156
156
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
157
157
  "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
158
158
  }>, {
159
- parentKey: string;
160
- idKey: string;
161
159
  disabled: boolean;
162
160
  loading: boolean;
163
161
  validation: "error" | "success" | "warning" | null | undefined;
@@ -172,6 +170,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
172
170
  multiSelect: boolean;
173
171
  valueField: string;
174
172
  iconField: string;
173
+ idKey: string;
174
+ parentKey: string;
175
175
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
176
176
  declare const _default: typeof __VLS_export;
177
177
  export default _default;
@@ -156,8 +156,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
156
156
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
157
157
  "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
158
158
  }>, {
159
- parentKey: string;
160
- idKey: string;
161
159
  disabled: boolean;
162
160
  loading: boolean;
163
161
  validation: "error" | "success" | "warning" | null | undefined;
@@ -172,6 +170,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
172
170
  multiSelect: boolean;
173
171
  valueField: string;
174
172
  iconField: string;
173
+ idKey: string;
174
+ parentKey: string;
175
175
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
176
176
  declare const _default: typeof __VLS_export;
177
177
  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;
87
84
  bulkActions: import("@katlux/providers").IKDatatableAction[];
88
85
  rowActions: import("./KTreeView.logic.js").IRowAction[];
89
86
  cellSlots: Record<string, any>;
90
87
  headerSlots: Record<string, any>;
91
88
  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;
87
84
  bulkActions: import("@katlux/providers").IKDatatableAction[];
88
85
  rowActions: import("./KTreeView.logic.js").IRowAction[];
89
86
  cellSlots: Record<string, any>;
90
87
  headerSlots: Record<string, any>;
91
88
  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;
@@ -11,6 +11,8 @@ type __VLS_Props = {
11
11
  headerSlots?: Record<string, any>;
12
12
  columnHeaders?: Record<string, string>;
13
13
  columnWidths?: Record<string, string>;
14
+ emptyStateText?: string;
15
+ emptyFilterStateText?: string;
14
16
  };
15
17
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
16
18
  "update:selectedRows": (value: any[]) => any;
@@ -21,8 +21,8 @@
21
21
  tbody
22
22
  tr.empty-row(v-if="!isLoading && (!props.dataProvider.pageData.value || props.dataProvider.pageData.value.length === 0)")
23
23
  td.empty-state(:colspan="(visibleFields || props.dataProvider.fields || []).length + (props.bulkActions && props.bulkActions.length > 0 ? 1 : 0) + (props.rowActions && props.rowActions.length > 0 ? 1 : 0)")
24
- span(v-if="props.dataProvider.filter.value?.active") no result found for filter
25
- span(v-else) no result
24
+ span(v-if="props.dataProvider.filter.value?.active") {{ props.emptyFilterStateText || 'no result found for filter' }}
25
+ span(v-else) {{ props.emptyStateText || 'no result' }}
26
26
  tr(v-for="(row, index) in props.dataProvider.pageData.value" :key="index")
27
27
  td.check(v-if="props.bulkActions && props.bulkActions.length>0")
28
28
  KCheckbox(:value="row" v-model="selectedRows")
@@ -57,6 +57,8 @@ const props = defineProps<{
57
57
  headerSlots?: Record<string, any>
58
58
  columnHeaders?: Record<string, string>
59
59
  columnWidths?: Record<string, string>
60
+ emptyStateText?: string
61
+ emptyFilterStateText?: string
60
62
  }>()
61
63
 
62
64
  const emit = defineEmits<{
@@ -11,6 +11,8 @@ type __VLS_Props = {
11
11
  headerSlots?: Record<string, any>;
12
12
  columnHeaders?: Record<string, string>;
13
13
  columnWidths?: Record<string, string>;
14
+ emptyStateText?: string;
15
+ emptyFilterStateText?: string;
14
16
  };
15
17
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
16
18
  "update:selectedRows": (value: any[]) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.0-beta.71",
3
+ "version": "0.1.0-beta.72",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "MIT",