forked from shesha-io/shesha-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.ts
More file actions
105 lines (91 loc) · 3.21 KB
/
models.ts
File metadata and controls
105 lines (91 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import { IShaDataTableInlineEditableProps, TableSelectionMode } from '@/components/dataTable/interfaces';
import { IConfigurableActionConfiguration } from '@/providers';
import { IConfigurableColumnsProps } from '@/providers/datatableColumnsConfigurator/models';
import { IConfigurableFormComponent } from '@/providers/form/models';
import { ICommonContainerProps } from '../../container/interfaces';
import { IBorderValue } from '@/designer-components/_settings/utils/border/interfaces';
import { IShadowValue } from '@/designer-components/_settings/utils/shadow/interfaces';
import { ComponentDefinition } from '@/interfaces';
export type RowDroppedMode = 'executeScript' | 'showDialog';
export interface ITableComponentBaseProps extends IShaDataTableInlineEditableProps, Omit<ICommonContainerProps, 'style'> {
items: IConfigurableColumnsProps[];
useMultiselect?: boolean;
selectionMode?: TableSelectionMode;
freezeHeaders?: boolean;
showExpandedView?: boolean;
containerStyle?: string;
tableStyle?: string;
minHeight?: number;
maxHeight?: number;
noDataText?: string;
noDataSecondaryText?: string;
noDataIcon?: string;
dblClickActionConfiguration?: IConfigurableActionConfiguration;
onRowClick?: IConfigurableActionConfiguration;
onRowDoubleClick?: IConfigurableActionConfiguration;
onRowHover?: IConfigurableActionConfiguration;
onRowSelect?: IConfigurableActionConfiguration;
onSelectionChange?: IConfigurableActionConfiguration;
striped?: boolean;
hoverHighlight?: boolean;
stickyHeader?: boolean;
// Header styling
headerFontSize?: string;
headerFontWeight?: string;
headerBackgroundColor?: string;
headerTextColor?: string;
// Table body styling
rowBackgroundColor?: string;
rowAlternateBackgroundColor?: string;
rowHoverBackgroundColor?: string;
rowSelectedBackgroundColor?: string;
// Row dimensions
rowDimensions?: {
height?: string;
minHeight?: string;
maxHeight?: string;
};
// Row padding using styling box
rowStylingBox?: {
margin?: {
top?: string;
right?: string;
bottom?: string;
left?: string;
};
padding?: {
top?: string;
right?: string;
bottom?: string;
left?: string;
};
};
// Row border using standard border controls
rowBorderStyle?: IBorderValue;
// Deprecated properties - kept for backward compatibility
/** @deprecated Use rowDimensions.height instead */
rowHeight?: string;
/** @deprecated Use rowStylingBox.padding instead */
rowPadding?: string;
/** @deprecated Use rowBorderStyle instead */
rowBorder?: string;
// Overall table styling
borderRadius?: string;
border?: IBorderValue;
backgroundColor?: string;
boxShadow?: string;
shadow?: IShadowValue;
sortableIndicatorColor?: string;
enableStyleOnReadonly?: boolean;
// Table settings nested structure for form binding
tableSettings?: {
rowHeight?: string;
rowPadding?: string;
rowBorder?: string;
headerFontSize?: string;
headerFontWeight?: string;
};
}
/** Table component props */
export interface ITableComponentProps extends ITableComponentBaseProps, IConfigurableFormComponent {}
export type TableComponentDefinition = ComponentDefinition<"datatable", ITableComponentProps>;