@davincihealthcare/elty-design-system-vue 1.49.1 → 1.50.1
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/ElButton.vue.d.ts +9 -21
- package/dist/ElIconButton.vue.d.ts +5 -0
- package/dist/ElListItem.vue.d.ts +47 -0
- package/dist/ElTabs.vue.d.ts +4 -4
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10893 -9604
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +22 -22
- package/dist/index.umd.cjs.map +1 -1
- package/dist/table/ElMobileTable.vue.d.ts +158 -0
- package/dist/table/ElResponsiveTable.vue.d.ts +141 -0
- package/dist/table/ElServerSideMobileTable.vue.d.ts +48 -0
- package/dist/table/ElServerSideResponsiveTable.vue.d.ts +67 -0
- package/dist/table/ElServerSideTable.vue.d.ts +6 -2
- package/dist/table/responsive-table-utils.d.ts +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { OptionType } from '../types';
|
|
2
|
+
import { ElTagColor } from '../ElTag.vue';
|
|
3
|
+
import { default as ElButton, ElButtonProps } from '../ElButton.vue';
|
|
4
|
+
import { ElListItemProps } from '../ElListItem.vue';
|
|
5
|
+
|
|
6
|
+
export type SelectOptions = OptionType[];
|
|
7
|
+
export type MobileTableFiltersStatus = {
|
|
8
|
+
freeSearch?: string;
|
|
9
|
+
fromDate?: number;
|
|
10
|
+
multiSelect: {
|
|
11
|
+
mainText?: string[];
|
|
12
|
+
secondaryRow?: string[];
|
|
13
|
+
tertiaryRow?: string[];
|
|
14
|
+
tags?: string[];
|
|
15
|
+
time?: string[];
|
|
16
|
+
amount?: string[];
|
|
17
|
+
avatar?: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type MobileTableFilter = {
|
|
21
|
+
freeSearch?: {
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
filterOn: ('mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'tags' | 'time' | 'avatar')[];
|
|
24
|
+
};
|
|
25
|
+
multiValue?: {
|
|
26
|
+
mainText?: {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
label: string;
|
|
29
|
+
selectOptions?: SelectOptions;
|
|
30
|
+
};
|
|
31
|
+
secondaryRow?: {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
label: string;
|
|
34
|
+
selectOptions?: SelectOptions;
|
|
35
|
+
};
|
|
36
|
+
tertiaryRow?: {
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
label: string;
|
|
39
|
+
selectOptions?: SelectOptions;
|
|
40
|
+
};
|
|
41
|
+
amount?: {
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
label: string;
|
|
44
|
+
selectOptions?: SelectOptions;
|
|
45
|
+
};
|
|
46
|
+
tags?: {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
label: string;
|
|
49
|
+
selectOptions?: SelectOptions;
|
|
50
|
+
};
|
|
51
|
+
time?: {
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
label: string;
|
|
54
|
+
selectOptions?: SelectOptions;
|
|
55
|
+
};
|
|
56
|
+
avatar?: {
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
label: string;
|
|
59
|
+
selectOptions?: SelectOptions;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
dateRange?: {
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
label: string;
|
|
65
|
+
};
|
|
66
|
+
resetButton?: boolean;
|
|
67
|
+
managed?: boolean;
|
|
68
|
+
};
|
|
69
|
+
export type MobileTableRow = Omit<ElListItemProps, 'color'> & {
|
|
70
|
+
id: string;
|
|
71
|
+
rowNotSelectable?: boolean;
|
|
72
|
+
relatedObject?: any;
|
|
73
|
+
clickAction?: (payload: PointerEvent) => void;
|
|
74
|
+
actions?: {
|
|
75
|
+
primary: InstanceType<typeof ElButton>['$props'];
|
|
76
|
+
secondary?: InstanceType<typeof ElButton>['$props'];
|
|
77
|
+
};
|
|
78
|
+
sortableAndFilterableValue?: string;
|
|
79
|
+
details: {
|
|
80
|
+
label: string;
|
|
81
|
+
value: {
|
|
82
|
+
type: 'default';
|
|
83
|
+
text: string;
|
|
84
|
+
} | {
|
|
85
|
+
type: 'tag';
|
|
86
|
+
text: string;
|
|
87
|
+
color?: ElTagColor;
|
|
88
|
+
} | {
|
|
89
|
+
type: 'avatar';
|
|
90
|
+
label?: string;
|
|
91
|
+
picture?: string;
|
|
92
|
+
};
|
|
93
|
+
}[];
|
|
94
|
+
};
|
|
95
|
+
export interface ElMobileTableProps {
|
|
96
|
+
color: 'primary' | 'secondary';
|
|
97
|
+
filters: MobileTableFilter;
|
|
98
|
+
loading?: boolean;
|
|
99
|
+
selection?: {
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
selectionMode?: 'single' | 'multiple';
|
|
102
|
+
destructiveAction?: {
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
button: Omit<ElButtonProps, 'variant' | 'type' | 'label' | 'error' | 'onClick'> & {
|
|
105
|
+
label?: (count: number) => string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
bulkActionButton: Omit<ElButtonProps, 'variant' | 'type' | 'label' | 'error' | 'onClick'> & {
|
|
109
|
+
label: (count: number) => string;
|
|
110
|
+
};
|
|
111
|
+
selectedLabel?: (selectionCount: number) => string;
|
|
112
|
+
cancelText?: (selectionCount: number) => string;
|
|
113
|
+
};
|
|
114
|
+
sortBy?: {
|
|
115
|
+
on: 'mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'tags' | 'time' | 'avatar';
|
|
116
|
+
order: 'asc' | 'desc';
|
|
117
|
+
};
|
|
118
|
+
data: MobileTableRow[];
|
|
119
|
+
}
|
|
120
|
+
declare function __VLS_template(): {
|
|
121
|
+
default?(_: {}): any;
|
|
122
|
+
"after-list"?(_: {}): any;
|
|
123
|
+
};
|
|
124
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<ElMobileTableProps>, {
|
|
125
|
+
filteredData: import('vue').ComputedRef<MobileTableRow[]>;
|
|
126
|
+
selectRows: (rowsIds: string[]) => void;
|
|
127
|
+
unselectAllRows: () => void;
|
|
128
|
+
getDataRows: () => MobileTableRow[];
|
|
129
|
+
getSelectedRows: () => MobileTableRow[];
|
|
130
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
131
|
+
"destructive:click": (selectedItems: MobileTableRow[]) => void;
|
|
132
|
+
"bulk:click": (selectedItems: MobileTableRow[]) => void;
|
|
133
|
+
"selection:exit": () => void;
|
|
134
|
+
"rows-selected": (selectedItems: MobileTableRow[]) => void;
|
|
135
|
+
"filters-updated": (filters: MobileTableFiltersStatus) => void;
|
|
136
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ElMobileTableProps>>> & {
|
|
137
|
+
"onRows-selected"?: ((selectedItems: MobileTableRow[]) => any) | undefined;
|
|
138
|
+
"onDestructive:click"?: ((selectedItems: MobileTableRow[]) => any) | undefined;
|
|
139
|
+
"onBulk:click"?: ((selectedItems: MobileTableRow[]) => any) | undefined;
|
|
140
|
+
"onSelection:exit"?: (() => any) | undefined;
|
|
141
|
+
"onFilters-updated"?: ((filters: MobileTableFiltersStatus) => any) | undefined;
|
|
142
|
+
}, {}, {}>;
|
|
143
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
144
|
+
export default _default;
|
|
145
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
146
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
147
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
148
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
149
|
+
} : {
|
|
150
|
+
type: import('vue').PropType<T[K]>;
|
|
151
|
+
required: true;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
155
|
+
new (): {
|
|
156
|
+
$slots: S;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { DefaultCell } from './ElTableCell.vue';
|
|
2
|
+
import { default as ElDropdown } from '../ElDropdown.vue';
|
|
3
|
+
import { default as ElIconButton } from '../ElIconButton.vue';
|
|
4
|
+
import { default as ElButton } from '../ElButton.vue';
|
|
5
|
+
import { default as ElAvatar } from '../ElAvatar.vue';
|
|
6
|
+
import { ElIconProps } from '../ElIcon.vue';
|
|
7
|
+
import { ElTextCellColor, ElTextCellStyle } from '../ElTextCell.vue';
|
|
8
|
+
import { ElTagColor } from '../ElTag.vue';
|
|
9
|
+
import { ElMobileTableProps, MobileTableRow } from './ElMobileTable.vue';
|
|
10
|
+
import { DataRow, FilterType } from './commonTypes';
|
|
11
|
+
|
|
12
|
+
export type ResponsiveDataCell = ResponsiveDefaultDataCell | ResponsiveTagDataCell | ResponsiveActionDataCell;
|
|
13
|
+
export type ResponsiveDefaultDataCell = {
|
|
14
|
+
type: 'default';
|
|
15
|
+
sortableAndFilterableValue?: string;
|
|
16
|
+
mainText: string;
|
|
17
|
+
mainTextStyle?: ElTextCellStyle;
|
|
18
|
+
mainTextColor?: ElTextCellColor;
|
|
19
|
+
subText?: string;
|
|
20
|
+
avatar?: Pick<InstanceType<typeof ElAvatar>['$props'], 'picture' | 'label'>;
|
|
21
|
+
clickAction?: (payload?: PointerEvent) => void;
|
|
22
|
+
desktopBehaviour?: Pick<DefaultCell, 'mainIcon' | 'subIcon' | 'longText' | 'truncateSubText'>;
|
|
23
|
+
mobileBehaviour?: {
|
|
24
|
+
tertiaryText?: string;
|
|
25
|
+
amountText?: string;
|
|
26
|
+
timeText?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type ResponsiveTagDataCell = {
|
|
30
|
+
type: 'tag';
|
|
31
|
+
text: string;
|
|
32
|
+
color?: ElTagColor;
|
|
33
|
+
desktopBehaviour?: {
|
|
34
|
+
subText?: string;
|
|
35
|
+
truncateSubText?: boolean;
|
|
36
|
+
};
|
|
37
|
+
sortableAndFilterableValue?: string;
|
|
38
|
+
};
|
|
39
|
+
export type ResponsiveActionDataCell = {
|
|
40
|
+
type: 'action';
|
|
41
|
+
buttons?: InstanceType<typeof ElButton>['$props'][];
|
|
42
|
+
iconButtons?: InstanceType<typeof ElIconButton>['$props'][];
|
|
43
|
+
dropdown?: InstanceType<typeof ElDropdown>['$props'];
|
|
44
|
+
mobileBehaviour?: {
|
|
45
|
+
primary: number;
|
|
46
|
+
secondary?: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type ResponsiveDataRow<T = any> = {
|
|
50
|
+
id: string;
|
|
51
|
+
rowNotSelectable?: boolean;
|
|
52
|
+
relatedObject?: T;
|
|
53
|
+
cells: ResponsiveDataCell[];
|
|
54
|
+
mobileBehaviour?: {
|
|
55
|
+
trailingIcon?: ElIconProps;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export type ResponsiveTableColumn = {
|
|
59
|
+
title: string;
|
|
60
|
+
filter?: {
|
|
61
|
+
type: FilterType;
|
|
62
|
+
placeholder?: string;
|
|
63
|
+
mobileBehaviour?: {
|
|
64
|
+
/**
|
|
65
|
+
* Used only if filter type === 'MULTI_VALUE' and column.mobileBehaviour.position is an array
|
|
66
|
+
*/
|
|
67
|
+
position?: 'mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'time' | 'tags' | 'avatar';
|
|
68
|
+
};
|
|
69
|
+
} | {
|
|
70
|
+
type: 'RESET_FILTERS_BUTTON';
|
|
71
|
+
};
|
|
72
|
+
desktopBehaviour?: {
|
|
73
|
+
alignRight?: boolean;
|
|
74
|
+
noSort?: boolean;
|
|
75
|
+
};
|
|
76
|
+
mobileBehaviour?: {
|
|
77
|
+
position: 'mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'time' | 'tags' | 'avatar' | ({
|
|
78
|
+
take: keyof Pick<ResponsiveDefaultDataCell, 'mainText' | 'subText'>;
|
|
79
|
+
to: 'mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'time';
|
|
80
|
+
withLabel: string;
|
|
81
|
+
} | {
|
|
82
|
+
withLabel: string;
|
|
83
|
+
to: 'avatar';
|
|
84
|
+
})[];
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export interface ElResponsiveTableProps {
|
|
88
|
+
columns: ResponsiveTableColumn[];
|
|
89
|
+
data: ResponsiveDataRow[];
|
|
90
|
+
tableId?: number | string;
|
|
91
|
+
noFilters?: boolean;
|
|
92
|
+
rowsSelectionMode?: 'single' | 'multiple';
|
|
93
|
+
rowsSelectionDisabled?: boolean;
|
|
94
|
+
color: 'primary' | 'secondary';
|
|
95
|
+
loading?: boolean;
|
|
96
|
+
sortBy?: {
|
|
97
|
+
column?: number;
|
|
98
|
+
order?: 'asc' | 'desc';
|
|
99
|
+
};
|
|
100
|
+
desktopBehaviour?: {
|
|
101
|
+
noFooter?: boolean;
|
|
102
|
+
initialRows?: number;
|
|
103
|
+
};
|
|
104
|
+
mobileBehaviour?: {
|
|
105
|
+
selection?: Pick<NonNullable<ElMobileTableProps['selection']>, 'destructiveAction' | 'bulkActionButton' | 'selectedLabel' | 'cancelText'>;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<ElResponsiveTableProps>, {
|
|
109
|
+
filteredData: import('vue').ComputedRef<DataRow<any>[] | MobileTableRow[] | undefined>;
|
|
110
|
+
selectRows: (rowsIds: string[]) => Promise<void>;
|
|
111
|
+
unselectAllRows: () => void;
|
|
112
|
+
getDataRows: () => ResponsiveDataRow<any>[];
|
|
113
|
+
getSelectedRows: () => ResponsiveDataRow<any>[];
|
|
114
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
115
|
+
"rows-selected": (rows: ResponsiveDataRow<any>[]) => void;
|
|
116
|
+
"mobile:bulk:click": (rows: ResponsiveDataRow<any>[]) => void;
|
|
117
|
+
"mobile:destructive:click": (rows: ResponsiveDataRow<any>[]) => void;
|
|
118
|
+
"mobile:selection:exit": () => void;
|
|
119
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ElResponsiveTableProps>>> & {
|
|
120
|
+
"onRows-selected"?: ((rows: ResponsiveDataRow<any>[]) => any) | undefined;
|
|
121
|
+
"onMobile:bulk:click"?: ((rows: ResponsiveDataRow<any>[]) => any) | undefined;
|
|
122
|
+
"onMobile:destructive:click"?: ((rows: ResponsiveDataRow<any>[]) => any) | undefined;
|
|
123
|
+
"onMobile:selection:exit"?: (() => any) | undefined;
|
|
124
|
+
}, {}, {}>, {
|
|
125
|
+
mobile?(_: {}): any;
|
|
126
|
+
}>;
|
|
127
|
+
export default _default;
|
|
128
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
129
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
130
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
131
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
132
|
+
} : {
|
|
133
|
+
type: import('vue').PropType<T[K]>;
|
|
134
|
+
required: true;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
138
|
+
new (): {
|
|
139
|
+
$slots: S;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { DataControls } from './ElServerSideTable.vue';
|
|
2
|
+
import { ElMobileTableProps, MobileTableFilter, MobileTableFiltersStatus, MobileTableRow } from './ElMobileTable.vue';
|
|
3
|
+
|
|
4
|
+
export type MobileDataControls = Pick<DataControls, 'paginationStatus'> & {
|
|
5
|
+
triggeredEvent: 'paginate' | 'filter' | 'firstLoad';
|
|
6
|
+
filterStatus: MobileTableFiltersStatus;
|
|
7
|
+
};
|
|
8
|
+
export type ElServerSideMobileTableProps = Pick<ElMobileTableProps, 'selection' | 'color'> & {
|
|
9
|
+
filters?: {
|
|
10
|
+
freeSearch?: Omit<NonNullable<MobileTableFilter['freeSearch']>, 'filterOn'>;
|
|
11
|
+
} & Pick<MobileTableFilter, 'dateRange' | 'multiValue' | 'resetButton'>;
|
|
12
|
+
dataController: (args: MobileDataControls) => Promise<{
|
|
13
|
+
data: MobileTableRow[];
|
|
14
|
+
totalRows: number;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<ElServerSideMobileTableProps>, {
|
|
18
|
+
selectRows: (rowsIds: string[]) => void;
|
|
19
|
+
unselectAllRows: () => void | undefined;
|
|
20
|
+
getSelectedRows: () => MobileTableRow[];
|
|
21
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
"bulk:click": (rows: MobileTableRow[]) => void;
|
|
23
|
+
"destructive:click": (rows: MobileTableRow[]) => void;
|
|
24
|
+
"selection:exit": () => void;
|
|
25
|
+
"rows-selected": (rows: MobileTableRow[]) => void;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ElServerSideMobileTableProps>>> & {
|
|
27
|
+
"onRows-selected"?: ((rows: MobileTableRow[]) => any) | undefined;
|
|
28
|
+
"onDestructive:click"?: ((rows: MobileTableRow[]) => any) | undefined;
|
|
29
|
+
"onBulk:click"?: ((rows: MobileTableRow[]) => any) | undefined;
|
|
30
|
+
"onSelection:exit"?: (() => any) | undefined;
|
|
31
|
+
}, {}, {}>, {
|
|
32
|
+
default?(_: {}): any;
|
|
33
|
+
}>;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
36
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
37
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
38
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
39
|
+
} : {
|
|
40
|
+
type: import('vue').PropType<T[K]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { MobileTableFiltersStatus } from './ElMobileTable.vue';
|
|
2
|
+
import { FilterType } from './commonTypes';
|
|
3
|
+
import { default as ElInputSelect } from '../forms/ElInputSelect.vue';
|
|
4
|
+
import { DataControls, TableColumn } from './ElServerSideTable.vue';
|
|
5
|
+
import { ElResponsiveTableProps, ResponsiveTableColumn, ResponsiveDataRow } from './ElResponsiveTable.vue';
|
|
6
|
+
|
|
7
|
+
export type ResponsiveServerSideTableColumn = Pick<TableColumn, 'title'> & {
|
|
8
|
+
desktopBehaviour?: Pick<TableColumn, 'alignRight' | 'noSort'>;
|
|
9
|
+
filter?: {
|
|
10
|
+
type: Exclude<FilterType, 'MULTI_VALUE'>;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
} | {
|
|
13
|
+
type: Extract<FilterType, 'MULTI_VALUE'>;
|
|
14
|
+
selectOptions: InstanceType<typeof ElInputSelect>['$props']['options'];
|
|
15
|
+
mobileBehaviour?: {
|
|
16
|
+
position?: 'mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'time' | 'tags' | 'avatar';
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
type: 'RESET_FILTERS_BUTTON';
|
|
20
|
+
};
|
|
21
|
+
} & Pick<ResponsiveTableColumn, 'mobileBehaviour'>;
|
|
22
|
+
export type ResponsiveDataControls = Pick<DataControls, 'paginationStatus' | 'filterStatus' | 'triggeredEvent'> & ({
|
|
23
|
+
tableType: 'desktop';
|
|
24
|
+
sortStatus: DataControls['sortStatus'];
|
|
25
|
+
} | {
|
|
26
|
+
tableType: 'mobile';
|
|
27
|
+
mobileFiltersStatus: MobileTableFiltersStatus;
|
|
28
|
+
});
|
|
29
|
+
export type ElServerSideResponsiveTableDataController = (args: ResponsiveDataControls) => Promise<{
|
|
30
|
+
data: ResponsiveDataRow[];
|
|
31
|
+
totalRows: number;
|
|
32
|
+
}>;
|
|
33
|
+
export type ElServerSideResponsiveTableProps = Pick<ElResponsiveTableProps, 'mobileBehaviour' | 'desktopBehaviour' | 'sortBy' | 'color' | 'rowsSelectionMode' | 'rowsSelectionDisabled'> & {
|
|
34
|
+
columns: ResponsiveServerSideTableColumn[];
|
|
35
|
+
dataController: ElServerSideResponsiveTableDataController;
|
|
36
|
+
rowsPerPage?: number;
|
|
37
|
+
};
|
|
38
|
+
declare function __VLS_template(): {
|
|
39
|
+
mobile?(_: {}): any;
|
|
40
|
+
};
|
|
41
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<ElServerSideResponsiveTableProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
42
|
+
"rows-selected": (rows: ResponsiveDataRow[]) => void;
|
|
43
|
+
"mobile:bulk:click": (rows: ResponsiveDataRow[]) => void;
|
|
44
|
+
"mobile:destructive:click": (rows: ResponsiveDataRow[]) => void;
|
|
45
|
+
"mobile:selection:exit": () => void;
|
|
46
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ElServerSideResponsiveTableProps>>> & {
|
|
47
|
+
"onRows-selected"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
|
|
48
|
+
"onMobile:bulk:click"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
|
|
49
|
+
"onMobile:destructive:click"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
|
|
50
|
+
"onMobile:selection:exit"?: (() => any) | undefined;
|
|
51
|
+
}, {}, {}>;
|
|
52
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
53
|
+
export default _default;
|
|
54
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
55
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
56
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
57
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
58
|
+
} : {
|
|
59
|
+
type: import('vue').PropType<T[K]>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
64
|
+
new (): {
|
|
65
|
+
$slots: S;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -46,11 +46,15 @@ export interface ServerSideTableProps {
|
|
|
46
46
|
totalRows: number;
|
|
47
47
|
}>;
|
|
48
48
|
}
|
|
49
|
-
type FilterStatus =
|
|
49
|
+
export type FilterStatus = TextFilterStatus | DateFilterStatus;
|
|
50
|
+
export type TextFilterStatus = {
|
|
50
51
|
textSearch: string;
|
|
52
|
+
columnTitle: string;
|
|
51
53
|
type: Extract<FilterType, 'FREE_SEARCH' | 'MULTI_VALUE'>;
|
|
52
|
-
}
|
|
54
|
+
};
|
|
55
|
+
export type DateFilterStatus = {
|
|
53
56
|
dateFrom: number;
|
|
57
|
+
columnTitle: string;
|
|
54
58
|
type: Extract<FilterType, 'DATE_RANGE'>;
|
|
55
59
|
};
|
|
56
60
|
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ServerSideTableProps>, {
|
|
File without changes
|