@wix/design-system
Version:
@wix/design-system
189 lines • 9.61 kB
TypeScript
export function createColumns({ tableProps, bulkSelectionContext }: {
tableProps: any;
bulkSelectionContext: any;
}): any[];
export function getDataTableProps(tableProps: any): any;
/**
* Table is a composite component that allows adding SelectionColumn, Toolbar (on top of the TitleBar).
* It is a context provider, and thus the Table.Consumer, Table.TitleBar and Table.Content can be rendered separately.
*/
export class Table extends React.Component<any, any, any> {
static ToolbarContainer: {
(props: any): React.JSX.Element;
displayName: string;
propTypes: {
children: PropTypes.Requireable<any>;
};
};
static Titlebar: {
({ dataHook }: {
dataHook: any;
}): React.JSX.Element;
displayName: string;
propTypes: {
dataHook: PropTypes.Requireable<string>;
};
};
static Content: {
({ titleBarVisible, titleBarDisplay, dataHook, }: {
titleBarVisible?: boolean | undefined;
titleBarDisplay?: boolean | undefined;
dataHook: any;
}): React.JSX.Element;
displayName: string;
propTypes: {
titleBarVisible: PropTypes.Requireable<boolean>;
titleBarDisplay: PropTypes.Requireable<boolean>;
dataHook: PropTypes.Requireable<string>;
};
};
static SubToolbar: {
({ dataHook, children }: {
dataHook: any;
children: any;
}): React.JSX.Element;
displayName: string;
propTypes: {
dataHook: PropTypes.Requireable<string>;
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
};
};
static EmptyState: {
({ image, children, align, ...propsWithNoDefaults }: {
[x: string]: any;
image?: null | undefined;
children?: null | undefined;
align?: "center" | undefined;
}): React.JSX.Element;
displayName: string;
propTypes: {
skin: PropTypes.Requireable<string>;
theme: PropTypes.Requireable<string>;
title: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
subtitle: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
image: PropTypes.Requireable<PropTypes.ReactNodeLike>;
classNames: PropTypes.Requireable<PropTypes.InferProps<{
imageContainer: PropTypes.Requireable<string>;
}>>;
className: PropTypes.Requireable<string>;
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
dataHook: PropTypes.Requireable<string>;
align: PropTypes.Requireable<string>;
};
};
static BulkSelectionCheckbox: ({ dataHook, children }: {
dataHook: any;
children: any;
}) => React.JSX.Element;
constructor(props: any);
constructor(props: any, context: any);
state: {
leftShadowVisible: boolean;
rightShadowVisible: boolean;
};
tableRef: React.RefObject<any>;
scrollElementRef: React.RefObject<any>;
_handleUpdateScrollShadows: (leftShadowVisible: any, rightShadowVisible: any) => void;
shouldComponentUpdate(): boolean;
setSelectedIds(selectedIds: any): void;
renderChildren(): any;
render(): any;
bulkSelection: BulkSelection | null | undefined;
}
export namespace Table {
export let displayName: string;
export { dataTableRowVirtualStyle };
export { dataTableRowStyle };
export let defaultProps: any;
export namespace propTypes {
let children: PropTypes.Requireable<any>;
let dataHook: PropTypes.Requireable<string>;
let onSelectionChanged: PropTypes.Requireable<(...args: any[]) => any>;
let onSelectionStarted: PropTypes.Requireable<(...args: any[]) => any>;
let showSelection: PropTypes.Requireable<boolean>;
let hideBulkSelectionCheckbox: PropTypes.Requireable<boolean>;
let selectedIds: PropTypes.Requireable<NonNullable<(number | null | undefined)[] | (string | null | undefined)[] | null | undefined>>;
let selectionDisabled: PropTypes.Requireable<NonNullable<boolean | ((...args: any[]) => any) | null | undefined>>;
let deselectRowsByDefault: PropTypes.Requireable<boolean>;
let withWrapper: PropTypes.Requireable<boolean>;
let onSortClick: PropTypes.Requireable<(...args: any[]) => any>;
let allowMultiDetailsExpansion: PropTypes.Requireable<boolean>;
let data: PropTypes.Requireable<any[]>;
let columns: PropTypes.Validator<(PropTypes.InferProps<{
title: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
render: PropTypes.Validator<(...args: any[]) => any>;
onCellClick: PropTypes.Requireable<(...args: any[]) => any>;
sortable: PropTypes.Requireable<boolean>;
sortDescending: PropTypes.Requireable<boolean>;
infoTooltipProps: PropTypes.Requireable<PropTypes.InferProps<any>>;
style: PropTypes.Requireable<object>;
align: PropTypes.Requireable<string>;
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
important: PropTypes.Requireable<boolean>;
stickyActionCell: PropTypes.Requireable<boolean>;
/** Column resize configuration - when provided, enables resizing for this column */
resizeProps: PropTypes.Requireable<PropTypes.InferProps<{
/** Required unique identifier for resize tracking */
id: PropTypes.Validator<string>;
/** Disable resize functionality but keep resize styling */
disabled: PropTypes.Requireable<boolean>;
/** Hide resize handle when disabled */
hideDisabledResizeHandle: PropTypes.Requireable<boolean>;
}>>;
}> | null | undefined)[]>;
let dynamicRowClass: PropTypes.Requireable<(...args: any[]) => any>;
let isRowHighlight: PropTypes.Requireable<(...args: any[]) => any>;
let isRowActive: PropTypes.Requireable<(...args: any[]) => any>;
let hasMore: PropTypes.Requireable<boolean>;
let initialLoad: PropTypes.Requireable<boolean>;
let id: PropTypes.Requireable<string>;
let infiniteScroll: PropTypes.Requireable<boolean>;
let totalSelectableCount: PropTypes.Requireable<number>;
let itemsPerPage: PropTypes.Requireable<number>;
let loader: PropTypes.Requireable<PropTypes.ReactNodeLike>;
let loadMore: PropTypes.Requireable<(...args: any[]) => any>;
let onRowClick: PropTypes.Requireable<(...args: any[]) => any>;
let onMouseEnterRow: PropTypes.Requireable<(...args: any[]) => any>;
let onMouseLeaveRow: PropTypes.Requireable<(...args: any[]) => any>;
let useWindow: PropTypes.Requireable<boolean>;
let scrollElement: PropTypes.Requireable<object>;
let rowVerticalPadding: PropTypes.Requireable<string>;
let rowDetails: PropTypes.Requireable<(...args: any[]) => any>;
let removeRowDetailsPadding: PropTypes.Requireable<boolean>;
let rowDataHook: PropTypes.Requireable<NonNullable<string | ((...args: any[]) => any) | null | undefined>>;
let rowClass: PropTypes.Requireable<string>;
let showHeaderWhenEmpty: PropTypes.Requireable<boolean>;
let showLastRowDivider: PropTypes.Requireable<boolean>;
let isApplyColumnWidthStyle: PropTypes.Requireable<boolean>;
let virtualized: PropTypes.Requireable<boolean>;
let virtualizedTableHeight: PropTypes.Requireable<number>;
let virtualizedLineHeight: PropTypes.Requireable<number>;
let virtualizedListRef: PropTypes.Requireable<any>;
let width: PropTypes.Requireable<string>;
let skin: PropTypes.Requireable<string>;
let horizontalScroll: PropTypes.Requireable<boolean>;
let stickyColumns: PropTypes.Requireable<number>;
let isRowDisabled: PropTypes.Requireable<(...args: any[]) => any>;
let dragAndDrop: PropTypes.Requireable<object>;
let onDragEnd: PropTypes.Requireable<(...args: any[]) => any>;
let resizable: PropTypes.Requireable<boolean>;
let resizeProps: PropTypes.Requireable<PropTypes.InferProps<{
/** Callback function called when a column is resized. Signature: `onColumnResize(columnId, newWidth)` */
onColumnResize: PropTypes.Requireable<(...args: any[]) => any>;
/** Callback function called when column resize starts. Signature: `onColumnResizeStart(columnId, startWidth, event)` */
onColumnResizeStart: PropTypes.Requireable<(...args: any[]) => any>;
/** Callback function called when column resize ends. Signature: `onColumnResizeEnd(columnId, endWidth, event)` */
onColumnResizeEnd: PropTypes.Requireable<(...args: any[]) => any>;
/** Minimum width allowed for columns when resizing */
minColumnWidth: PropTypes.Requireable<number>;
/** Maximum width allowed for columns when resizing */
maxColumnWidth: PropTypes.Requireable<number>;
}>>;
}
}
import React from 'react';
import { BulkSelection } from './BulkSelection';
import PropTypes from 'prop-types';
import * as dataTableRowVirtualStyle from './DataTable/components/DataTableRowVirtual.st.css';
import * as dataTableRowStyle from './DataTable/components/DataTableRow.st.css';
//# sourceMappingURL=Table.d.ts.map