@davincihealthcare/elty-design-system-vue 1.33.0 → 1.34.0
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/README.md +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6715 -6209
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +21 -21
- package/dist/index.umd.cjs.map +1 -1
- package/dist/table/ElServerSideTable.vue.d.ts +92 -0
- package/dist/table/ElServerSideTablePagination.vue.d.ts +44 -0
- package/dist/{ElTable.vue.d.ts → table/ElTable.vue.d.ts} +1 -8
- package/dist/{ElTableCell.vue.d.ts → table/ElTableCell.vue.d.ts} +3 -3
- package/dist/table/commonTypes.d.ts +9 -0
- package/package.json +2 -2
- package/dist/ElTextCell.vue.d.ts +0 -36
- /package/dist/{ElTablePagination.vue.d.ts → table/ElTablePagination.vue.d.ts} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { DataRow, FilterType } from './commonTypes';
|
|
2
|
+
import { default as ElInputSelect } from '../forms/ElInputSelect.vue';
|
|
3
|
+
|
|
4
|
+
interface TableColumn {
|
|
5
|
+
title: string;
|
|
6
|
+
filter?: {
|
|
7
|
+
type: Exclude<FilterType, 'MULTI_VALUE'>;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: Extract<FilterType, 'MULTI_VALUE'>;
|
|
11
|
+
selectOptions: InstanceType<typeof ElInputSelect>['$props']['options'];
|
|
12
|
+
} | {
|
|
13
|
+
type: 'RESET_FILTERS_BUTTON';
|
|
14
|
+
};
|
|
15
|
+
alignRight?: boolean;
|
|
16
|
+
noSort?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface DataControls {
|
|
19
|
+
sortStatus: {
|
|
20
|
+
columnToSort: number;
|
|
21
|
+
order: 'asc' | 'desc';
|
|
22
|
+
};
|
|
23
|
+
paginationStatus: {
|
|
24
|
+
currentPage: number;
|
|
25
|
+
};
|
|
26
|
+
filterStatus: FilterStatus[];
|
|
27
|
+
triggeredEvent: 'paginate' | 'filter' | 'sort' | 'firstLoad';
|
|
28
|
+
}
|
|
29
|
+
export interface ServerSideTableProps {
|
|
30
|
+
columns: TableColumn[];
|
|
31
|
+
sortByCol?: number;
|
|
32
|
+
sortByColAsc?: boolean;
|
|
33
|
+
noFilters?: boolean;
|
|
34
|
+
noFooter?: boolean;
|
|
35
|
+
rowsSelectionMode?: 'single' | 'multiple';
|
|
36
|
+
rowsSelectionDisabled?: boolean;
|
|
37
|
+
rowsPerPage?: number;
|
|
38
|
+
dataController: (args: DataControls) => Promise<{
|
|
39
|
+
data: DataRow[];
|
|
40
|
+
totalRows: number;
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
43
|
+
type FilterStatus = {
|
|
44
|
+
textSearch: string;
|
|
45
|
+
dateFrom: number;
|
|
46
|
+
columnTitle: string;
|
|
47
|
+
};
|
|
48
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ServerSideTableProps>, {
|
|
49
|
+
sortByCol: number;
|
|
50
|
+
sortByColAsc: boolean;
|
|
51
|
+
rowsSelectionMode: undefined;
|
|
52
|
+
rowsPerPage: number;
|
|
53
|
+
}>, {
|
|
54
|
+
selectRows: (rowsIds: string[]) => Promise<void>;
|
|
55
|
+
unselectAllRows: () => void;
|
|
56
|
+
getDataRows: () => DataRow[];
|
|
57
|
+
getSelectedRows: () => DataRow[];
|
|
58
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
59
|
+
"rows-selected": (rows: DataRow<any>[]) => void;
|
|
60
|
+
newPageSelected: (pageNumber: number) => void;
|
|
61
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ServerSideTableProps>, {
|
|
62
|
+
sortByCol: number;
|
|
63
|
+
sortByColAsc: boolean;
|
|
64
|
+
rowsSelectionMode: undefined;
|
|
65
|
+
rowsPerPage: number;
|
|
66
|
+
}>>> & {
|
|
67
|
+
"onRows-selected"?: ((rows: DataRow<any>[]) => any) | undefined;
|
|
68
|
+
onNewPageSelected?: ((pageNumber: number) => any) | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
rowsPerPage: number;
|
|
71
|
+
sortByCol: number;
|
|
72
|
+
sortByColAsc: boolean;
|
|
73
|
+
rowsSelectionMode: "multiple" | "single";
|
|
74
|
+
}, {}>;
|
|
75
|
+
export default _default;
|
|
76
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
77
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
78
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
79
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
80
|
+
} : {
|
|
81
|
+
type: import('vue').PropType<T[K]>;
|
|
82
|
+
required: true;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
type __VLS_WithDefaults<P, D> = {
|
|
86
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
87
|
+
default: D[K];
|
|
88
|
+
}> : P[K];
|
|
89
|
+
};
|
|
90
|
+
type __VLS_Prettify<T> = {
|
|
91
|
+
[K in keyof T]: T[K];
|
|
92
|
+
} & {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
totalRowsCount: number;
|
|
3
|
+
rowsPerPage?: number;
|
|
4
|
+
pagesBeforeDots?: number;
|
|
5
|
+
hideFooter?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
8
|
+
rowsPerPage: number;
|
|
9
|
+
pagesBeforeDots: number;
|
|
10
|
+
hideFooter: boolean;
|
|
11
|
+
}>, {
|
|
12
|
+
currentPage: import('vue').Ref<number>;
|
|
13
|
+
goToPage: (pageNumber: number) => void;
|
|
14
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
"update:currentPage": (page: number) => void;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
17
|
+
rowsPerPage: number;
|
|
18
|
+
pagesBeforeDots: number;
|
|
19
|
+
hideFooter: boolean;
|
|
20
|
+
}>>> & {
|
|
21
|
+
"onUpdate:currentPage"?: ((page: number) => any) | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
rowsPerPage: number;
|
|
24
|
+
pagesBeforeDots: number;
|
|
25
|
+
hideFooter: boolean;
|
|
26
|
+
}, {}>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
30
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
+
} : {
|
|
33
|
+
type: import('vue').PropType<T[K]>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
type __VLS_WithDefaults<P, D> = {
|
|
38
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
39
|
+
default: D[K];
|
|
40
|
+
}> : P[K];
|
|
41
|
+
};
|
|
42
|
+
type __VLS_Prettify<T> = {
|
|
43
|
+
[K in keyof T]: T[K];
|
|
44
|
+
} & {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataRow, FilterType } from './commonTypes';
|
|
2
2
|
|
|
3
|
-
export type FilterType = 'FREE_SEARCH' | 'DATE_RANGE' | 'MULTI_VALUE';
|
|
4
3
|
interface TableColumn {
|
|
5
4
|
title: string;
|
|
6
5
|
filter?: {
|
|
@@ -12,12 +11,6 @@ interface TableColumn {
|
|
|
12
11
|
alignRight?: boolean;
|
|
13
12
|
noSort?: boolean;
|
|
14
13
|
}
|
|
15
|
-
interface DataRow<RelatedObjectType = any> {
|
|
16
|
-
id: string;
|
|
17
|
-
rowNotSelectable?: boolean;
|
|
18
|
-
cells: DataCell[];
|
|
19
|
-
relatedObject?: RelatedObjectType;
|
|
20
|
-
}
|
|
21
14
|
export interface TableProps {
|
|
22
15
|
columns: TableColumn[];
|
|
23
16
|
data: DataRow[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as ElIconButton } from '
|
|
2
|
-
import { default as ElButton } from '
|
|
3
|
-
import { default as ElTag } from '
|
|
1
|
+
import { default as ElIconButton } from '../ElIconButton.vue';
|
|
2
|
+
import { default as ElButton } from '../ElButton.vue';
|
|
3
|
+
import { default as ElTag } from '../ElTag.vue';
|
|
4
4
|
|
|
5
5
|
export declare const dataCellTypes: readonly ["default", "tag", "action"];
|
|
6
6
|
export type DataCellType = (typeof dataCellTypes)[number];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataCell } from './ElTableCell.vue';
|
|
2
|
+
|
|
3
|
+
export type FilterType = 'FREE_SEARCH' | 'DATE_RANGE' | 'MULTI_VALUE';
|
|
4
|
+
export interface DataRow<RelatedObjectType = any> {
|
|
5
|
+
id: string;
|
|
6
|
+
rowNotSelectable?: boolean;
|
|
7
|
+
cells: DataCell[];
|
|
8
|
+
relatedObject?: RelatedObjectType;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@davincihealthcare/elty-design-system-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"main": "dist/index.umd.cjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"vite-plugin-dts": "^3.6.3",
|
|
72
72
|
"vitest": "^0.34.6",
|
|
73
73
|
"vue": "^3.4.21",
|
|
74
|
-
"vue-tsc": "^
|
|
74
|
+
"vue-tsc": "^2.0.22"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@faker-js/faker": "^8.4.1",
|
package/dist/ElTextCell.vue.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare const elTextCellStyles: readonly ["normal", "semibold", "underline"];
|
|
2
|
-
export type ElTextCellStyle = (typeof elTextCellStyles)[number];
|
|
3
|
-
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
-
label?: string | undefined;
|
|
5
|
-
style?: "normal" | "semibold" | "underline" | undefined;
|
|
6
|
-
}>, {
|
|
7
|
-
label: string;
|
|
8
|
-
style: string;
|
|
9
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
-
label?: string | undefined;
|
|
11
|
-
style?: "normal" | "semibold" | "underline" | undefined;
|
|
12
|
-
}>, {
|
|
13
|
-
label: string;
|
|
14
|
-
style: string;
|
|
15
|
-
}>>>, {
|
|
16
|
-
label: string;
|
|
17
|
-
style: ElTextCellStyle;
|
|
18
|
-
}, {}>;
|
|
19
|
-
export default _default;
|
|
20
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('vue').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
type __VLS_WithDefaults<P, D> = {
|
|
30
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
31
|
-
default: D[K];
|
|
32
|
-
}> : P[K];
|
|
33
|
-
};
|
|
34
|
-
type __VLS_Prettify<T> = {
|
|
35
|
-
[K in keyof T]: T[K];
|
|
36
|
-
} & {};
|
|
File without changes
|