@agendize/design-system
Version:
Agendize web design system
346 lines • 14.4 kB
TypeScript
import { Ref } from "vue";
import { ListProperties } from "../list/viewModel";
import { ListItemProperties } from "../list-item/viewModel";
export interface TableColumnOptions {
label: string;
field: string;
width?: string;
minWidth?: string;
sortable: boolean;
actionColumn?: boolean;
sortOnMounted?: boolean;
translatable?: boolean;
columnClasses?: string;
tooltipLabel?: boolean;
sortCompareFn?: (a: any, b: any) => number;
fixed?: boolean;
right?: number;
}
export interface TableColumnSort {
field: string;
enabled: boolean;
sortCompareFn?: (a: any, b: any) => number;
direction?: 'asc' | 'desc';
}
export interface TableProperties extends ListProperties {
searchDisabled?: boolean;
columnOptions: TableColumnOptions[];
displayHeader?: boolean;
aloneActionBottom?: boolean;
}
/**
* La taille de la column peut être fixé de 2 facon :
* - valeur arbitraire (50px, 12%, ..) et dans ce cas, c'est appliqué via le style
* - repartition par fractionnement ( flex-1, flex-2, ...), c'est appliqué via une classe
*/
export declare function columnStyles(col: {
width?: string;
right?: number;
minWidth?: string;
}): string;
/**
* La taille de la column peut être fixé de 2 facon :
* - valeur arbitraire (50px, 12%, ..) et dans ce cas, c'est appliqué via le style
* - repartition par fractionnement ( flex-1, flex-2, ...), c'est appliqué via une classe
*/
export declare function columnClasses(col: {
width?: string;
columnClasses?: string;
translatable?: boolean;
tooltipLabel?: boolean;
fixed?: boolean;
}, header?: boolean): string;
export declare function StructuredTableViewModel(props: TableProperties, emits: any, searchInput: Ref, localTable: Ref): {
loading: Ref<boolean, boolean>;
scrollLoading: Ref<boolean, boolean>;
page: Ref<number, number>;
pageSize: Ref<number | undefined, number | undefined>;
totalItems: Ref<number, number>;
searchBarInput: Ref<string | undefined, string | undefined>;
quickFilters: Ref<Map<string, boolean> & Omit<Map<string, boolean>, keyof Map<any, any>>, Map<string, boolean> | (Map<string, boolean> & Omit<Map<string, boolean>, keyof Map<any, any>>)>;
allItems: Ref<{
id?: string | undefined;
title?: string | undefined;
subTitle?: string | undefined;
ariaLabel: string;
secondSubTitle?: string | undefined;
hasBorder?: boolean | undefined;
hasPadding?: boolean | undefined;
selectable?: import("../list/viewModel").Selectable | undefined;
checked?: boolean | undefined;
clickable?: boolean | undefined;
object?: any;
type?: string | undefined;
hoverAnimation?: import("../list-item/viewModel").ListItemHoverAnimationType | undefined;
appearAnimation?: import("../list-item/viewModel").ListItemAppearAnimationType | undefined;
background?: import("../list-item/viewModel").ListItemBackgroundType | undefined;
endSlotPosition?: "center" | "start" | "end" | undefined;
disabled?: boolean | undefined;
loading?: boolean | undefined;
index?: number | undefined;
titleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
subtitleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
secondSubtitleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
tags?: {
title: string;
}[] | undefined;
applyTittleAttribute?: boolean | undefined;
applyTitleAsTooltip?: boolean | undefined;
}[], ListItemProperties[] | {
id?: string | undefined;
title?: string | undefined;
subTitle?: string | undefined;
ariaLabel: string;
secondSubTitle?: string | undefined;
hasBorder?: boolean | undefined;
hasPadding?: boolean | undefined;
selectable?: import("../list/viewModel").Selectable | undefined;
checked?: boolean | undefined;
clickable?: boolean | undefined;
object?: any;
type?: string | undefined;
hoverAnimation?: import("../list-item/viewModel").ListItemHoverAnimationType | undefined;
appearAnimation?: import("../list-item/viewModel").ListItemAppearAnimationType | undefined;
background?: import("../list-item/viewModel").ListItemBackgroundType | undefined;
endSlotPosition?: "center" | "start" | "end" | undefined;
disabled?: boolean | undefined;
loading?: boolean | undefined;
index?: number | undefined;
titleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
subtitleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
secondSubtitleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
tags?: {
title: string;
}[] | undefined;
applyTittleAttribute?: boolean | undefined;
applyTitleAsTooltip?: boolean | undefined;
}[]>;
selectAll: Ref<boolean, boolean>;
filteredItemsRow: Ref<{
checked: boolean;
id?: string | undefined;
title?: string | undefined;
subTitle?: string | undefined;
ariaLabel: string;
secondSubTitle?: string | undefined;
hasBorder?: boolean | undefined;
hasPadding?: boolean | undefined;
selectable?: import("../list/viewModel").Selectable | undefined;
clickable?: boolean | undefined;
object?: any;
type?: string | undefined;
hoverAnimation?: import("../list-item/viewModel").ListItemHoverAnimationType | undefined;
appearAnimation?: import("../list-item/viewModel").ListItemAppearAnimationType | undefined;
background?: import("../list-item/viewModel").ListItemBackgroundType | undefined;
endSlotPosition?: "center" | "start" | "end" | undefined;
disabled?: boolean | undefined;
loading?: boolean | undefined;
index?: number | undefined;
titleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
subtitleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
secondSubtitleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
tags?: {
title: string;
}[] | undefined;
applyTittleAttribute?: boolean | undefined;
applyTitleAsTooltip?: boolean | undefined;
}[], import("../list/viewModel").ListItemRow[] | {
checked: boolean;
id?: string | undefined;
title?: string | undefined;
subTitle?: string | undefined;
ariaLabel: string;
secondSubTitle?: string | undefined;
hasBorder?: boolean | undefined;
hasPadding?: boolean | undefined;
selectable?: import("../list/viewModel").Selectable | undefined;
clickable?: boolean | undefined;
object?: any;
type?: string | undefined;
hoverAnimation?: import("../list-item/viewModel").ListItemHoverAnimationType | undefined;
appearAnimation?: import("../list-item/viewModel").ListItemAppearAnimationType | undefined;
background?: import("../list-item/viewModel").ListItemBackgroundType | undefined;
endSlotPosition?: "center" | "start" | "end" | undefined;
disabled?: boolean | undefined;
loading?: boolean | undefined;
index?: number | undefined;
titleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
subtitleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
secondSubtitleProperties?: {
title?: string | undefined;
type?: ("primary" | "secondary") | undefined;
tooltipLabel?: string | undefined;
icon?: string | undefined;
nowrap?: boolean | undefined;
through?: boolean | undefined;
tooltip?: boolean | undefined;
twoLines?: boolean | undefined;
} | undefined;
tags?: {
title: string;
}[] | undefined;
applyTittleAttribute?: boolean | undefined;
applyTitleAsTooltip?: boolean | undefined;
}[]>;
hasCustomAction: import("vue").ComputedRef<boolean>;
hasBulkActionSlot: import("vue").ComputedRef<boolean>;
visibleSelectedCount: import("vue").ComputedRef<number>;
searched: import("vue").ComputedRef<boolean>;
hasQuickFilter: import("vue").ComputedRef<boolean>;
triggerItemClicked: (e: MouseEvent | KeyboardEvent, item: import("../list/viewModel").ListItemRow) => void;
quickFilterAction: (filterId: string, disabledIfAlreadyActive?: boolean) => void;
onBasicSearch: () => void;
onBasicSearchEnter: () => void;
onBasicSearchButton: () => void;
filter: () => void;
convertItemsAndFilter: (items?: ListItemProperties[], initialisation?: boolean) => import("../list/viewModel").ListItemRow[];
clearSelection: () => void;
checkAllUpdate: (value: boolean) => void;
loadAndFetch: (pageParam?: number) => void;
updateSelection: () => void;
focus: () => void;
sortData: Ref<{
field: string;
enabled: boolean;
sortCompareFn?: ((a: any, b: any) => number) | undefined;
direction?: "asc" | "desc" | undefined;
}[], TableColumnSort[] | {
field: string;
enabled: boolean;
sortCompareFn?: ((a: any, b: any) => number) | undefined;
direction?: "asc" | "desc" | undefined;
}[]>;
doSort: (col: TableColumnOptions) => void;
changePage: (newPage: number) => void;
changePageSize: (newPageSize: number) => void;
clearSearch: () => void;
tableColumns: Ref<{
label: string;
field: string;
width?: string | undefined;
minWidth?: string | undefined;
sortable: boolean;
actionColumn?: boolean | undefined;
sortOnMounted?: boolean | undefined;
translatable?: boolean | undefined;
columnClasses?: string | undefined;
tooltipLabel?: boolean | undefined;
sortCompareFn?: ((a: any, b: any) => number) | undefined;
fixed?: boolean | undefined;
right?: number | undefined;
}[], TableColumnOptions[] | {
label: string;
field: string;
width?: string | undefined;
minWidth?: string | undefined;
sortable: boolean;
actionColumn?: boolean | undefined;
sortOnMounted?: boolean | undefined;
translatable?: boolean | undefined;
columnClasses?: string | undefined;
tooltipLabel?: boolean | undefined;
sortCompareFn?: ((a: any, b: any) => number) | undefined;
fixed?: boolean | undefined;
right?: number | undefined;
}[]>;
};
//# sourceMappingURL=viewModel.d.ts.map