Added page layouts
This commit is contained in:
61
frontend/types/page-layout.ts
Normal file
61
frontend/types/page-layout.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
export interface FieldLayoutItem {
|
||||
fieldId: string;
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
}
|
||||
|
||||
export interface PageLayoutConfig {
|
||||
fields: FieldLayoutItem[];
|
||||
}
|
||||
|
||||
export interface PageLayout {
|
||||
id: string;
|
||||
name: string;
|
||||
objectId: string;
|
||||
isDefault: boolean;
|
||||
layoutConfig: PageLayoutConfig;
|
||||
description?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface CreatePageLayoutRequest {
|
||||
name: string;
|
||||
objectId: string;
|
||||
isDefault?: boolean;
|
||||
layoutConfig: PageLayoutConfig;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface UpdatePageLayoutRequest {
|
||||
name?: string;
|
||||
isDefault?: boolean;
|
||||
layoutConfig?: PageLayoutConfig;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface GridStackOptions {
|
||||
column: number;
|
||||
cellHeight: number;
|
||||
minRow: number;
|
||||
float: boolean;
|
||||
acceptWidgets: boolean | string;
|
||||
removable?: boolean | string;
|
||||
animate: boolean;
|
||||
}
|
||||
|
||||
export interface GridStackWidget {
|
||||
id: string;
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
minW?: number;
|
||||
maxW?: number;
|
||||
noResize?: boolean;
|
||||
noMove?: boolean;
|
||||
locked?: boolean;
|
||||
content?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user