Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EuiDataGrid type exports #2640

Merged
merged 4 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Improved a11y of `EuiNavDrawer` lock button state via `aria-pressed` ([#2643](https://github.com/elastic/eui/pull/2643))
- Added exports for available types related to `EuiDataGrid` ([#2640](https://github.com/elastic/eui/pull/2640))

**Bug fixes**

Expand Down
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type CommonGridProps = CommonProps &

// This structure forces either aria-label or aria-labelledby to be defined
// making some type of label a requirement
type EuiDataGridProps = Omit<
export type EuiDataGridProps = Omit<
CommonGridProps,
'aria-label' | 'aria-labelledby'
> &
Expand Down
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid_body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
EuiDataGridSchemaDetector,
} from './data_grid_schema';

interface EuiDataGridBodyProps {
export interface EuiDataGridBodyProps {
columnWidths: EuiDataGridColumnWidths;
defaultColumnWidth?: number | null;
columns: EuiDataGridColumn[];
Expand Down
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid_cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ interface EuiDataGridCellState {
popoverIsOpen: boolean;
}

type EuiDataGridCellValueProps = Omit<
export type EuiDataGridCellValueProps = Omit<
EuiDataGridCellProps,
'width' | 'isFocused' | 'interactiveCellId' | 'onCellFocus' | 'popoverContent'
>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid_column_resizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';

const MINIMUM_COLUMN_WIDTH = 40;

interface EuiDataGridColumnResizerProps {
export interface EuiDataGridColumnResizerProps {
columnId: string;
columnWidth: number;
setColumnWidth: (columnId: string, width: number) => void;
Expand Down
4 changes: 2 additions & 2 deletions src/components/datagrid/data_grid_header_row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ interface EuiDataGridHeaderRowPropsSpecificProps {
headerIsInteractive: boolean;
}

type EuiDataGridHeaderRowProps = CommonProps &
export type EuiDataGridHeaderRowProps = CommonProps &
HTMLAttributes<HTMLDivElement> &
EuiDataGridHeaderRowPropsSpecificProps;

interface EuiDataGridHeaderCellProps
export interface EuiDataGridHeaderCellProps
extends Omit<EuiDataGridHeaderRowPropsSpecificProps, 'columns'> {
column: EuiDataGridColumn;
index: number;
Expand Down
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid_inmemory_renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import { EuiDataGridColumn, EuiDataGridInMemory } from './data_grid_types';
import { enqueueStateChange } from '../../services/react';

interface EuiDataGridInMemoryRendererProps {
export interface EuiDataGridInMemoryRendererProps {
inMemory: EuiDataGridInMemory;
columns: EuiDataGridColumn[];
rowCount: number;
Expand Down
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid_schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export interface EuiDataGridSchema {
[columnId: string]: { columnType: string | null };
}

interface SchemaTypeScore {
export interface SchemaTypeScore {
type: string;
score: number;
}
Expand Down
27 changes: 26 additions & 1 deletion src/components/datagrid/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
export { EuiDataGrid } from './data_grid';
export {
EuiDataGridColumnSortingDraggableProps,
} from './column_sorting_draggable';
export { EuiDataGrid, EuiDataGridProps } from './data_grid';
export { EuiDataGridBodyProps } from './data_grid_body';
export {
EuiDataGridCellProps,
EuiDataGridCellValueProps,
EuiDataGridCellValueElementProps,
} from './data_grid_cell';
export { EuiDataGridColumnResizerProps } from './data_grid_column_resizer';
export { EuiDataGridDataRowProps } from './data_grid_data_row';
export {
EuiDataGridHeaderCellProps,
EuiDataGridHeaderRowProps,
} from './data_grid_header_row';
export {
EuiDataGridInMemoryRendererProps,
} from './data_grid_inmemory_renderer';
export {
EuiDataGridSchema,
EuiDataGridSchemaDetector,
SchemaTypeScore,
} from './data_grid_schema';

export * from './data_grid_types';
myasonik marked this conversation as resolved.
Show resolved Hide resolved