Skip to content

Commit

Permalink
typescript fixes (#1081)
Browse files Browse the repository at this point in the history
  • Loading branch information
heswell authored Dec 18, 2023
1 parent ec16112 commit e15b956
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 23 deletions.
5 changes: 4 additions & 1 deletion vuu-ui/packages/vuu-data/src/json-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
VuuSort,
ClientToServerMenuRPC,
ClientToServerEditRpc,
VuuColumnDataType,
VuuRowDataItemType,
} from "@finos/vuu-protocol-types";
import { DataSourceFilter, DataSourceRow } from "@finos/vuu-data-types";
Expand Down Expand Up @@ -285,6 +284,10 @@ export class JsonDataSource
return this.#config;
}

applyConfig() {
return true as const;
}

get selectedRowsCount() {
return this.#selectedRowsCount;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,11 @@ export const NewFilterClause = () => {
const onChange = (filterClause: Partial<FilterClause>) =>
console.log("Filter Change", filterClause);

const onClose = () => console.log("Closing filter component");

return (
<div style={{ padding: "10px" }}>
<FilterClauseEditor
filterClause={EMPTY_FILTER_CLAUSE}
onChange={onChange}
onClose={onClose}
suggestionProvider={typeaheadHook}
tableSchema={tableSchema}
/>
Expand All @@ -206,14 +203,11 @@ export const PartialFilterClauseColumnOnly = () => {
const onChange = (filterClause?: Partial<FilterClause>) =>
console.log("Filter Change", filterClause);

const onClose = () => console.log("Closing filter component");

return (
<div style={{ padding: "10px" }}>
<FilterClauseEditor
filterClause={filterClause}
onChange={onChange}
onClose={onClose}
tableSchema={tableSchema}
/>
</div>
Expand All @@ -232,14 +226,11 @@ export const PartialFilterClauseColumnAndOperator = () => {
const onChange = (filterClause?: Partial<FilterClause>) =>
console.log("Filter Change", filterClause);

const onClose = () => console.log("Closing filter component");

return (
<div style={{ padding: "10px" }}>
<FilterClauseEditor
filterClause={filterClause}
onChange={onChange}
onClose={onClose}
tableSchema={tableSchema}
/>
</div>
Expand All @@ -260,14 +251,11 @@ export const CompleteFilterClauseTextEquals = () => {
const onChange = (filterClause?: Partial<FilterClause>) =>
console.log("Filter Change", filterClause);

const onClose = () => console.log("Closing filter component");

return (
<div style={{ padding: "10px" }}>
<FilterClauseEditor
filterClause={filterClause}
onChange={onChange}
onClose={onClose}
tableSchema={tableSchema}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const DefaultInstrumentPicker = () => {

const itemToString = useCallback(
(row: DataSourceRow) => {
return [row[columnMap.description]];
return String([row[columnMap.description]]);
},
[columnMap.description]
);
Expand Down
4 changes: 2 additions & 2 deletions vuu-ui/showcase/src/examples/UiControls/List.examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export const GroupedList = () => {
);

return (
<List
<List<any>
aria-label="Listbox example"
itemHeight={36}
maxWidth={292}
Expand All @@ -456,7 +456,7 @@ export const GroupedListCollapsibleHeaders = () => {
);

return (
<List
<List<any>
aria-label="Listbox example"
collapsibleHeaders
itemHeight={36}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ export const DefaultBasketSelector = () => {
dataSourceRow: [] as any,
basketId: ".FTSE",
basketName: "Test Basket",
filledPct: 0,
pctFilled: 0,
fxRateToUsd: 1.25,
instanceId: "steve-001",
side: "BUY",
status: "off-market",
totalNotional: 1000,
totalNotionalUsd: 1000,
units: 120,
Expand Down Expand Up @@ -67,9 +69,11 @@ export const OpenBasketSelector = () => {
dataSourceRow: [] as any,
basketId: ".FTSE",
basketName: "Test Basket",
filledPct: 0,
pctFilled: 0,
fxRateToUsd: 1.25,
instanceId: "steve-001",
side: "BUY",
status: "ioff-market",
totalNotional: 1000,
totalNotionalUsd: 1000,
units: 120,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ const testBasket: Basket = {
dataSourceRow: [] as any,
basketId: ".FTSE",
basketName: "Test Basket",
filledPct: 0,
pctFilled: 0,
fxRateToUsd: 1.25,
instanceId: "steve-001",
side: "BUY",
status: "off-market",
totalNotional: 1403513122789,
totalNotionalUsd: 1305517122789,
units: 120,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const DefaultFilterTableFeature = () => {
return (
<div style={{ display: "flex" }}>
<LayoutProvider
layout={applicationLayout}
layout={applicationLayout.layout}
onLayoutChange={handleLayoutChange}
>
<View
Expand All @@ -64,7 +64,7 @@ export const DefaultFilterTableFeature = () => {
rowSeparators: true,
zebraStripes: true,
}}
source={savedLayoutJson}
source={savedLayoutJson as unknown as JsonData}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion vuu-ui/showcase/src/examples/html/GridLayout.examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ export const GridLayoutC = () => {
</GridLayout>
);
};
GridLayoutB.displaySequence = displaySequence++;
GridLayoutC.displaySequence = displaySequence++;
2 changes: 1 addition & 1 deletion vuu-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"global.d.ts"
, "packages/vuu-data-test/src/UpdateGenerator.ts" ],
"exclude": [
// "**/*.cy.*",
"**/*.cy.*",
"**/*.test.*"
],
"references": [
Expand Down

0 comments on commit e15b956

Please sign in to comment.