Skip to content

Commit

Permalink
EuiDataGrid type exports (#2640)
Browse files Browse the repository at this point in the history
* type exports

* more exports

* CL
  • Loading branch information
thompsongl authored Dec 13, 2019
1 parent 0cd2dae commit dffd0dc
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 9 deletions.
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';

0 comments on commit dffd0dc

Please sign in to comment.