Skip to content

Commit

Permalink
rename TableNext to Table (finos#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
heswell authored Dec 8, 2023
1 parent 5935e8c commit d314642
Show file tree
Hide file tree
Showing 76 changed files with 50 additions and 2,647 deletions.
2,601 changes: 3 additions & 2,598 deletions vuu-ui/packages/vuu-data/src/inlined-worker.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FilterBar, FilterBarProps } from "@finos/vuu-filters";
import { TableNext, TableProps } from "@finos/vuu-table";
import { Table, TableProps } from "@finos/vuu-table";
import { HTMLAttributes } from "react";
import cx from "classnames";

Expand All @@ -22,7 +22,7 @@ export const FilterTable = ({
return (
<div {...htmlAttributes} className={cx(classBase)}>
<FilterBar {...FilterBarProps} />
<TableNext {...TableProps} />
<Table {...TableProps} />
</div>
);
};
4 changes: 2 additions & 2 deletions vuu-ui/packages/vuu-datatable/src/json-table/JsonTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TableProps } from "@finos/vuu-table";
import { JsonData } from "@finos/vuu-utils";
import { TableNext } from "@finos/vuu-table";
import { Table } from "@finos/vuu-table";
import { JsonDataSource } from "@finos/vuu-data";
import { useEffect, useMemo, useRef } from "react";
import { TableConfig } from "@finos/vuu-datagrid-types";
Expand Down Expand Up @@ -45,7 +45,7 @@ export const JsonTable = ({
}

return (
<TableNext
<Table
{...tableProps}
config={tableConfig}
dataSource={dataSourceRef.current}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import {
HeaderCell,
} from "./header-cell";
import { Row as DefaultRow, RowProps } from "./Row";
import { useTable } from "./useTableNext";
import { useTable } from "./useTable";

import "./TableNext.css";
import "./Table.css";

const classBase = "vuuTableNext";

Expand Down Expand Up @@ -278,7 +278,7 @@ const TableCore = ({
);
};

export const TableNext = forwardRef(function TableNext(
export const Table = forwardRef(function TableNext(
{
Row,
allowDragDrop,
Expand Down
11 changes: 9 additions & 2 deletions vuu-ui/packages/vuu-table/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
export * from "./table-next";
export { updateTableConfig } from "./table-next/table-config";
export { GroupHeaderCellNext } from "./header-cell";
export * from "./header-cell";
export * from "./Table";
export * from "./table-config";
export * from "./cell-renderers";
export type { RowProps } from "./Row";
export * from "./useControlledTableNavigation";
export * from "./useTableModel";
export * from "./useTableViewport";
9 changes: 0 additions & 9 deletions vuu-ui/packages/vuu-table/src/table-next/index.ts

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {
useMemo,
useState,
} from "react";
import { TableProps } from "./TableNext";
import { TableProps } from "./Table";
import { TableColumnResizeHandler } from "./column-resizing";
import { updateTableConfig } from "./table-config";
import { useDataSource } from "./useDataSource";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TableSchema } from "@finos/vuu-data";
import { DataSourceRow } from "@finos/vuu-data-types";
import { useId } from "@finos/vuu-layout";
import { TableNext, TableProps, TableRowSelectHandler } from "@finos/vuu-table";
import { Table, TableProps, TableRowSelectHandler } from "@finos/vuu-table";
import { ColumnMap } from "@finos/vuu-utils";
import { Input } from "@salt-ds/core";
import { ForwardedRef, forwardRef, HTMLAttributes, useMemo } from "react";
Expand Down Expand Up @@ -100,7 +100,7 @@ export const InstrumentPicker = forwardRef(function InstrumentPicker(
value={value}
/>

<TableNext
<Table
rowHeight={25}
renderBufferSize={100}
{...tableProps}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TableConfig } from "@finos/vuu-datagrid-types";
import { registerComponent } from "@finos/vuu-layout";

import {
TableNext,
Table,
TableProps,
useControlledTableNavigation,
} from "@finos/vuu-table";
Expand Down Expand Up @@ -85,7 +85,7 @@ export const InstrumentSearch = ({
</div>

{dataSource ? (
<TableNext
<Table
disableFocus
id="instrument-search"
rowHeight={25}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TableSchema } from "@finos/vuu-data";
import { TableConfig } from "@finos/vuu-datagrid-types";
import { TableNext, TableProps } from "@finos/vuu-table";
import { Table, TableProps } from "@finos/vuu-table";
import {
ContextMenuConfiguration,
ContextMenuProvider,
Expand Down Expand Up @@ -38,7 +38,7 @@ export const BasketTableEdit = ({

return (
<ContextMenuProvider {...contextMenuConfig}>
<TableNext
<Table
{...props}
allowDragDrop="drop-only"
dataSource={dataSource}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TableSchema } from "@finos/vuu-data";
import { TableConfig } from "@finos/vuu-datagrid-types";
import { TableNext, TableProps } from "@finos/vuu-table";
import { Table, TableProps } from "@finos/vuu-table";
import { useMemo } from "react";
import { ProgressCell, SpreadCell, StatusCell } from "../cell-renderers";
import columns from "./basketConstituentLiveColumns";
Expand Down Expand Up @@ -34,7 +34,7 @@ export const BasketTableLive = ({
);

return (
<TableNext
<Table
{...props}
renderBufferSize={20}
className={classBase}
Expand Down
4 changes: 2 additions & 2 deletions vuu-ui/showcase/src/examples/Table/BasketTables.examples.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TableNext, TableProps } from "@finos/vuu-table";
import { Table, TableProps } from "@finos/vuu-table";
import { useMemo } from "react";
import { BasketsTableName, getSchema, vuuModule } from "@finos/vuu-data-test";
import { useVuuMenuActions } from "@finos/vuu-data-react";
Expand Down Expand Up @@ -31,7 +31,7 @@ const BasketTable = ({ tableName }: { tableName: BasketsTableName }) => {
menuActionHandler={handleMenuAction}
menuBuilder={buildViewserverMenuOptions}
>
<TableNext {...tableProps} renderBufferSize={50} />
<Table {...tableProps} renderBufferSize={50} />
</ContextMenuProvider>
);
};
Expand Down
4 changes: 2 additions & 2 deletions vuu-ui/showcase/src/examples/Table/SIMUL.examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useVuuMenuActions } from "@finos/vuu-data-react";
import { getSchema, SimulTableName, vuuModule } from "@finos/vuu-data-test";
import { ContextMenuProvider } from "@finos/vuu-popups";
import { DefaultColumnConfiguration } from "@finos/vuu-shell";
import { TableNext, TableProps } from "@finos/vuu-table";
import { Table, TableProps } from "@finos/vuu-table";
import { applyDefaultColumnConfig } from "@finos/vuu-utils";
import { useCallback, useMemo } from "react";

Expand Down Expand Up @@ -81,7 +81,7 @@ const SimulTable = ({
menuActionHandler={handleMenuAction}
menuBuilder={buildViewserverMenuOptions}
>
<TableNext
<Table
{...tableProps}
onConfigChange={handleConfigChange}
renderBufferSize={0}
Expand Down
4 changes: 2 additions & 2 deletions vuu-ui/showcase/src/examples/Table/TableList.examples.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TableNext } from "@finos/vuu-table";
import { Table } from "@finos/vuu-table";
import { ArrayDataSource } from "@finos/vuu-data";
import { useMemo } from "react";
import { ColumnDescriptor } from "@finos/vuu-datagrid-types";
Expand Down Expand Up @@ -36,7 +36,7 @@ export const DefaultTableList = () => {

return (
<div style={{ display: "flex", gap: 12 }}>
<TableNext
<Table
config={{
columns,
}}
Expand Down
32 changes: 16 additions & 16 deletions vuu-ui/showcase/src/examples/Table/TableNext.examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
applyDefaultColumnConfig,
registerComponent as registerCellRenderer,
} from "@finos/vuu-utils";
import { HeaderCellProps, TableNext, TableProps } from "@finos/vuu-table";
import { HeaderCellProps, Table, TableProps } from "@finos/vuu-table";
import {
ColumnSettingsPanel,
TableSettingsPanel,
Expand Down Expand Up @@ -64,7 +64,7 @@ export const NavigationStyle = () => {
}, []);

return (
<TableNext
<Table
{...tableProps}
height={645}
navigationStyle="row"
Expand Down Expand Up @@ -114,7 +114,7 @@ export const ControlledNavigation = () => {
Next
</Button>
</Toolbar>
<TableNext
<Table
{...tableProps}
height={645}
highlightedIndex={highlightedIndex}
Expand Down Expand Up @@ -215,7 +215,7 @@ export const EditableTableNextArrayData = () => {
}, [getDefaultColumnConfig]);

return (
<TableNext {...tableProps} height={645} renderBufferSize={10} width={500} />
<Table {...tableProps} height={645} renderBufferSize={10} width={500} />
);
};
EditableTableNextArrayData.displaySequence = displaySequence++;
Expand All @@ -234,7 +234,7 @@ export const TableNextVuuInstruments = () => {
}

return (
<TableNext
<Table
config={tableConfig}
dataSource={dataSource}
height={645}
Expand Down Expand Up @@ -265,20 +265,20 @@ export const FlexLayoutTables = () => {
>
<FlexboxLayout resizeable style={{ flexDirection: "row", flex: 1 }}>
<View resizeable style={{ flex: 1 }}>
<TableNext {...config1} />
<Table {...config1} />
</View>

<View resizeable style={{ flex: 1 }}>
<TableNext {...config2} />
<Table {...config2} />
</View>
</FlexboxLayout>
<FlexboxLayout resizeable style={{ flexDirection: "row", flex: 1 }}>
<View resizeable style={{ flex: 1 }}>
<TableNext {...config3} />
<Table {...config3} />
</View>

<View resizeable style={{ flex: 1 }}>
<TableNext {...config4} />
<Table {...config4} />
</View>
</FlexboxLayout>
</FlexboxLayout>
Expand All @@ -304,7 +304,7 @@ export const TableNextInLayoutWithContextPanel = () => {
return (
<LayoutProvider>
<FlexboxLayout style={{ height: 645, width: "100%" }}>
<TableNext {...props} config={config} renderBufferSize={30} />
<Table {...props} config={config} renderBufferSize={30} />
<ContextPanel id="context-panel" overlay></ContextPanel>
</FlexboxLayout>
</LayoutProvider>
Expand All @@ -325,7 +325,7 @@ export const AutoTableNext = () => {
const [config] = useState(configProp);

return (
<TableNext
<Table
{...props}
config={{
...config,
Expand Down Expand Up @@ -364,7 +364,7 @@ export const AutoTableNextAsFlexChild = () => {
}}
>
<div style={{ flex: "1 1 auto" }}>
<TableNext
<Table
{...props}
config={{
...config,
Expand Down Expand Up @@ -425,7 +425,7 @@ export const AutoTableNextBasketOrders = () => {
};

return (
<TableNext
<Table
{...props}
config={{
...config,
Expand Down Expand Up @@ -456,7 +456,7 @@ export const AutoTableNextBasketDefinitions = () => {
};

return (
<TableNext
<Table
{...props}
config={{
...config,
Expand Down Expand Up @@ -540,7 +540,7 @@ export const VuuTableNextCalculatedColumns = () => {
}

return (
<TableNext
<Table
config={tableConfig}
dataSource={dataSource}
height={645}
Expand Down Expand Up @@ -811,7 +811,7 @@ export const CustomColumnRenderer = () => {
}, []);

return (
<TableNext
<Table
{...tableProps}
height={645}
navigationStyle="row"
Expand Down

0 comments on commit d314642

Please sign in to comment.