@vuu-ui/vuu-data-test 0.8.12 → 0.8.13-debug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +8267 -1
- package/cjs/index.js.map +4 -4
- package/esm/index.js +8257 -1
- package/esm/index.js.map +4 -4
- package/package.json +3 -3
- package/types/vuu-data-react/src/hooks/index.d.ts +7 -0
- package/types/vuu-data-react/src/hooks/useDataSource.d.ts +24 -0
- package/types/vuu-data-react/src/hooks/useLookupValues.d.ts +5 -0
- package/types/vuu-data-react/src/hooks/useServerConnectionQuality.d.ts +1 -0
- package/types/vuu-data-react/src/hooks/useServerConnectionStatus.d.ts +1 -0
- package/types/vuu-data-react/src/hooks/useTypeaheadSuggestions.d.ts +4 -0
- package/types/vuu-data-react/src/hooks/useVuuMenuActions.d.ts +50 -0
- package/types/vuu-data-react/src/hooks/useVuuTables.d.ts +4 -0
- package/types/vuu-data-react/src/index.d.ts +1 -0
- package/types/vuu-data-test/src/Table.d.ts +23 -0
- package/types/vuu-data-test/src/TickingArrayDataSource.d.ts +26 -0
- package/types/vuu-data-test/src/UpdateGenerator.d.ts +18 -0
- package/types/vuu-data-test/src/basket/basket-module.d.ts +7 -0
- package/types/vuu-data-test/src/basket/basket-schemas.d.ts +3 -0
- package/types/vuu-data-test/src/basket/reference-data/constituents.d.ts +3 -0
- package/types/vuu-data-test/src/basket/reference-data/ftse100.d.ts +2 -0
- package/types/vuu-data-test/src/basket/reference-data/hsi.d.ts +2 -0
- package/types/vuu-data-test/src/basket/reference-data/nasdaq100.d.ts +2 -0
- package/types/vuu-data-test/src/basket/reference-data/prices.d.ts +25 -0
- package/types/vuu-data-test/src/basket/reference-data/sp500.d.ts +2 -0
- package/types/vuu-data-test/src/data-utils.d.ts +6 -0
- package/types/vuu-data-test/src/generatorTemplate.d.ts +5 -0
- package/types/vuu-data-test/src/index.d.ts +7 -0
- package/types/vuu-data-test/src/makeSuggestions.d.ts +2 -0
- package/types/vuu-data-test/src/rowUpdates.d.ts +15 -0
- package/types/vuu-data-test/src/schemas.d.ts +7 -0
- package/types/vuu-data-test/src/simul/index.d.ts +0 -0
- package/types/vuu-data-test/src/simul/reference-data/currencies.d.ts +1 -0
- package/types/vuu-data-test/src/simul/reference-data/index.d.ts +5 -0
- package/types/vuu-data-test/src/simul/reference-data/instrument-prices.d.ts +54 -0
- package/types/vuu-data-test/src/simul/reference-data/instruments-extended.d.ts +3 -0
- package/types/vuu-data-test/src/simul/reference-data/instruments.d.ts +31 -0
- package/types/vuu-data-test/src/simul/reference-data/locations.d.ts +4 -0
- package/types/vuu-data-test/src/simul/reference-data/lotsizes.d.ts +1 -0
- package/types/vuu-data-test/src/simul/reference-data/priceStrategies.d.ts +1 -0
- package/types/vuu-data-test/src/simul/reference-data/prices.d.ts +27 -0
- package/types/vuu-data-test/src/simul/simul-module.d.ts +4 -0
- package/types/vuu-data-test/src/simul/simul-schemas.d.ts +12 -0
- package/types/vuu-data-test/src/vuu-modules.d.ts +8 -0
- package/types/vuu-data-test/src/vuu-row-generator.d.ts +14 -0
- package/LICENSE +0 -201
- package/types/index.d.ts +0 -1
- package/types/tableSchemas.d.ts +0 -14
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-data-test",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.13-debug",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-data": "0.8.
|
|
8
|
-
"@vuu-ui/vuu-
|
|
7
|
+
"@vuu-ui/vuu-data": "0.8.13-debug",
|
|
8
|
+
"@vuu-ui/vuu-table-types": "0.8.13-debug"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"cjs",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./useDataSource";
|
|
2
|
+
export * from "./useLookupValues";
|
|
3
|
+
export * from "./useServerConnectionStatus";
|
|
4
|
+
export * from "./useServerConnectionQuality";
|
|
5
|
+
export * from "./useTypeaheadSuggestions";
|
|
6
|
+
export * from "./useVuuMenuActions";
|
|
7
|
+
export * from "./useVuuTables";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DataSource } from "@vuu-ui/vuu-data";
|
|
2
|
+
import { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
3
|
+
import { VuuRange } from "@vuu-ui/vuu-protocol-types";
|
|
4
|
+
export interface DataSourceHookProps {
|
|
5
|
+
dataSource: DataSource;
|
|
6
|
+
renderBufferSize?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function useDataSource({ dataSource, renderBufferSize, }: DataSourceHookProps): [
|
|
9
|
+
DataSourceRow[],
|
|
10
|
+
number,
|
|
11
|
+
VuuRange,
|
|
12
|
+
(range: VuuRange) => void
|
|
13
|
+
];
|
|
14
|
+
export declare class MovingWindow {
|
|
15
|
+
data: DataSourceRow[];
|
|
16
|
+
rowCount: number;
|
|
17
|
+
private range;
|
|
18
|
+
constructor({ from, to }: VuuRange);
|
|
19
|
+
setRowCount: (rowCount: number) => void;
|
|
20
|
+
add(data: DataSourceRow): void;
|
|
21
|
+
getAtIndex(index: number): DataSourceRow | undefined;
|
|
22
|
+
isWithinRange(index: number): boolean;
|
|
23
|
+
setRange(from: number, to: number): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useServerConnectionQuality: () => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useServerConnectionStatus: () => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TypeaheadParams, VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
+
export type SuggestionFetcher = (params: TypeaheadParams) => Promise<string[]>;
|
|
3
|
+
export declare const getTypeaheadParams: (table: VuuTable, column: string, text?: string, selectedValues?: string[]) => TypeaheadParams;
|
|
4
|
+
export declare const useTypeaheadSuggestions: () => SuggestionFetcher;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DataSource, DataSourceVisualLinkCreatedMessage, MenuRpcResponse, ViewportRpcResponse, VuuUIMessageInRPCEditReject, VuuUIMessageInRPCEditResponse } from "@vuu-ui/vuu-data";
|
|
2
|
+
import { DataSourceRow, MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
|
|
3
|
+
import { LinkDescriptorWithLabel, VuuMenu, VuuMenuItem, VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
4
|
+
import { ColumnMap } from "@vuu-ui/vuu-utils";
|
|
5
|
+
export declare const addRowsFromInstruments = "addRowsFromInstruments";
|
|
6
|
+
export interface VuuCellMenuItem extends VuuMenuItem {
|
|
7
|
+
rowKey: string;
|
|
8
|
+
field: string;
|
|
9
|
+
value: VuuRowDataItemType;
|
|
10
|
+
}
|
|
11
|
+
export interface VuuRowMenuItem extends VuuMenuItem {
|
|
12
|
+
rowKey: string;
|
|
13
|
+
row: {
|
|
14
|
+
[key: string]: VuuRowDataItemType;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export type VuuMenuActionHandler = (type: string, options: unknown) => boolean;
|
|
18
|
+
export interface ViewServerHookResult {
|
|
19
|
+
buildViewserverMenuOptions: MenuBuilder;
|
|
20
|
+
handleMenuAction: MenuActionHandler;
|
|
21
|
+
}
|
|
22
|
+
export interface MenuActionConfig {
|
|
23
|
+
vuuMenu?: VuuMenu;
|
|
24
|
+
visualLink?: DataSourceVisualLinkCreatedMessage;
|
|
25
|
+
visualLinks?: LinkDescriptorWithLabel[];
|
|
26
|
+
}
|
|
27
|
+
export type RpcResponseHandler = (response: MenuRpcResponse | VuuUIMessageInRPCEditReject | VuuUIMessageInRPCEditResponse | ViewportRpcResponse) => void;
|
|
28
|
+
export interface VuuMenuActionHookProps {
|
|
29
|
+
/**
|
|
30
|
+
* By default, vuuMenuActions will be handled automatically. When activated, a
|
|
31
|
+
* message will be sent to server and response will be handled here too.
|
|
32
|
+
* This prop allows client to provide a custom handler for a menu Item. This will
|
|
33
|
+
* take priority and if handler returns true, no further processing for the menu
|
|
34
|
+
* item will be handled by Vuu. This can also be used to prevent an item from being
|
|
35
|
+
* actioned, even when no custom handling is intended. If the handler returns false,
|
|
36
|
+
* Vuu will process the menuItem.
|
|
37
|
+
*/
|
|
38
|
+
clientSideMenuActionHandler?: VuuMenuActionHandler;
|
|
39
|
+
dataSource: DataSource;
|
|
40
|
+
menuActionConfig?: MenuActionConfig;
|
|
41
|
+
onRpcResponse?: RpcResponseHandler;
|
|
42
|
+
}
|
|
43
|
+
export type VuuServerMenuOptions = {
|
|
44
|
+
columnMap: ColumnMap;
|
|
45
|
+
columnName: string;
|
|
46
|
+
row: DataSourceRow;
|
|
47
|
+
selectedRows: DataSourceRow[];
|
|
48
|
+
viewport: string;
|
|
49
|
+
};
|
|
50
|
+
export declare const useVuuMenuActions: ({ clientSideMenuActionHandler, dataSource, menuActionConfig, onRpcResponse, }: VuuMenuActionHookProps) => ViewServerHookResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hooks";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TableSchema } from "@vuu-ui/vuu-data";
|
|
2
|
+
import { VuuRowDataItemType, VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
+
import { ColumnMap, EventEmitter } from "@vuu-ui/vuu-utils";
|
|
4
|
+
import { UpdateGenerator } from "./rowUpdates";
|
|
5
|
+
export type TableEvents = {
|
|
6
|
+
delete: (row: VuuRowDataItemType[]) => void;
|
|
7
|
+
insert: (row: VuuRowDataItemType[]) => void;
|
|
8
|
+
update: (row: VuuRowDataItemType[], columnName?: string) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare class Table extends EventEmitter<TableEvents> {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(schema: TableSchema, data: VuuRowDataItemType[][], dataMap: ColumnMap, updateGenerator?: UpdateGenerator);
|
|
13
|
+
private buildIndex;
|
|
14
|
+
get data(): VuuRowDataItemType[][];
|
|
15
|
+
get map(): ColumnMap;
|
|
16
|
+
get schema(): TableSchema;
|
|
17
|
+
insert(row: VuuRowDataItemType[]): void;
|
|
18
|
+
findByKey(key: string): VuuRowDataItemType[];
|
|
19
|
+
update(key: string, columnName: string, value: VuuRowDataItemType): void;
|
|
20
|
+
updateRow(row: VuuRowDataItemType[]): void;
|
|
21
|
+
}
|
|
22
|
+
export declare const buildDataColumnMap: (schema: TableSchema) => ColumnMap;
|
|
23
|
+
export declare const joinTables: (joinTable: VuuTable, table1: Table, table2: Table, joinColumn: string) => Table;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ArrayDataSource, ArrayDataSourceConstructorProps, MenuRpcResponse, RpcResponse, SubscribeCallback, SubscribeProps, VuuUIMessageInRPCEditReject, VuuUIMessageInRPCEditResponse } from "@vuu-ui/vuu-data";
|
|
2
|
+
import { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
3
|
+
import { ClientToServerEditRpc, ClientToServerMenuRPC, ClientToServerViewportRpcCall, VuuMenu, VuuRange, VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
4
|
+
import { Table } from "./Table";
|
|
5
|
+
export type RpcService = {
|
|
6
|
+
rpcName: string;
|
|
7
|
+
service: (rpcRequest: any) => Promise<any>;
|
|
8
|
+
};
|
|
9
|
+
export interface TickingArrayDataSourceConstructorProps extends Omit<ArrayDataSourceConstructorProps, "data"> {
|
|
10
|
+
data?: Array<VuuRowDataItemType[]>;
|
|
11
|
+
menu?: VuuMenu;
|
|
12
|
+
menuRpcServices?: RpcService[];
|
|
13
|
+
rpcServices?: RpcService[];
|
|
14
|
+
table?: Table;
|
|
15
|
+
}
|
|
16
|
+
export declare class TickingArrayDataSource extends ArrayDataSource {
|
|
17
|
+
#private;
|
|
18
|
+
constructor({ data, menuRpcServices, rpcServices, table, menu, ...arrayDataSourceProps }: TickingArrayDataSourceConstructorProps);
|
|
19
|
+
subscribe(subscribeProps: SubscribeProps, callback: SubscribeCallback): Promise<void>;
|
|
20
|
+
set range(range: VuuRange);
|
|
21
|
+
get range(): VuuRange;
|
|
22
|
+
private getSelectedRows;
|
|
23
|
+
applyEdit(row: DataSourceRow, columnName: string, value: VuuRowDataItemType): Promise<true>;
|
|
24
|
+
rpcCall<T extends RpcResponse = RpcResponse>(rpcRequest: Omit<ClientToServerViewportRpcCall, "vpId">): Promise<T | undefined>;
|
|
25
|
+
menuRpcCall(rpcRequest: Omit<ClientToServerMenuRPC, "vpId"> | ClientToServerEditRpc): Promise<MenuRpcResponse | VuuUIMessageInRPCEditReject | VuuUIMessageInRPCEditResponse | undefined>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VuuRange } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
+
import type { UpdateGenerator } from "./rowUpdates";
|
|
3
|
+
import { Table } from "./Table";
|
|
4
|
+
export declare class BaseUpdateGenerator implements UpdateGenerator {
|
|
5
|
+
private table;
|
|
6
|
+
private range;
|
|
7
|
+
private updating;
|
|
8
|
+
private timer;
|
|
9
|
+
private tickingColumns;
|
|
10
|
+
constructor(tickingColumns: {
|
|
11
|
+
[key: string]: number;
|
|
12
|
+
});
|
|
13
|
+
setRange(range: VuuRange): void;
|
|
14
|
+
setTable(table: Table): void;
|
|
15
|
+
private startUpdating;
|
|
16
|
+
private stopUpdating;
|
|
17
|
+
update: () => void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Table } from "../Table";
|
|
2
|
+
import { VuuModule } from "../vuu-modules";
|
|
3
|
+
import { BasketsTableName } from "./basket-schemas";
|
|
4
|
+
export declare const createBasketTradingRow: (basketId: string, basketName: string, side?: string, status?: string) => (string | number)[];
|
|
5
|
+
export declare const tables: Record<BasketsTableName, Table>;
|
|
6
|
+
declare const basketModule: VuuModule<BasketsTableName>;
|
|
7
|
+
export default basketModule;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TableSchema } from "@vuu-ui/vuu-data";
|
|
2
|
+
export type BasketsTableName = "algoType" | "basket" | "basketConstituent" | "basketTrading" | "basketTradingConstituent" | "basketTradingConstituentJoin" | "priceStrategyType";
|
|
3
|
+
export declare const schemas: Readonly<Record<BasketsTableName, Readonly<TableSchema>>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Table } from "../../Table";
|
|
2
|
+
export type ask = number;
|
|
3
|
+
export type askSize = number;
|
|
4
|
+
export type bid = number;
|
|
5
|
+
export type bidSize = number;
|
|
6
|
+
export type close = number;
|
|
7
|
+
export type last = number;
|
|
8
|
+
export type open = number;
|
|
9
|
+
export type phase = "C";
|
|
10
|
+
export type ric = string;
|
|
11
|
+
export type scenario = "close";
|
|
12
|
+
export type PricesDataRow = [
|
|
13
|
+
ask,
|
|
14
|
+
askSize,
|
|
15
|
+
bid,
|
|
16
|
+
bidSize,
|
|
17
|
+
close,
|
|
18
|
+
last,
|
|
19
|
+
open,
|
|
20
|
+
phase,
|
|
21
|
+
ric,
|
|
22
|
+
scenario
|
|
23
|
+
];
|
|
24
|
+
declare const pricesTable: Table;
|
|
25
|
+
export default pricesTable;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function random(min: number, max: number): number;
|
|
2
|
+
export declare function randomPercentage(value: number): number;
|
|
3
|
+
export type PriceGenerator = (min: number, max: number) => number;
|
|
4
|
+
export declare const nextRandomDouble: PriceGenerator;
|
|
5
|
+
export declare const initBidAsk: (priceMaxDelta: number, nextRandomDouble: PriceGenerator) => number[];
|
|
6
|
+
export declare const generateNextBidAsk: (bid: number, ask: number, spreadMultipler: number, priceMaxDelta: number, nextRandomDouble: PriceGenerator) => number[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ColumnMap } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { VuuDataRow } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
+
import { ColumnGeneratorFn, RowGeneratorFactory } from "./vuu-row-generator";
|
|
4
|
+
import { VuuTableName } from "./schemas";
|
|
5
|
+
export declare const getGenerators: (tableName: VuuTableName, columnMap: ColumnMap, data: VuuDataRow[]) => [RowGeneratorFactory, ColumnGeneratorFn];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./schemas";
|
|
2
|
+
export * from "./TickingArrayDataSource";
|
|
3
|
+
export * from "./vuu-row-generator";
|
|
4
|
+
export * from "./vuu-modules";
|
|
5
|
+
export { type BasketsTableName } from "./basket/basket-schemas";
|
|
6
|
+
export { createBasketTradingRow } from "./basket/basket-module";
|
|
7
|
+
export { type SimulTableName } from "./simul/simul-schemas";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VuuRange, VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
+
import { Table } from "./Table";
|
|
3
|
+
export type UpdateHandler = (updates: (RowUpdates | RowInsert | RowDelete)[]) => void;
|
|
4
|
+
export interface UpdateGenerator {
|
|
5
|
+
setTable: (table: Table) => void;
|
|
6
|
+
setRange: (range: VuuRange) => void;
|
|
7
|
+
}
|
|
8
|
+
export type UpdateType = "I" | "D" | "U";
|
|
9
|
+
type MAXIMUM_ALLOWED_BOUNDARY = 20;
|
|
10
|
+
type RepeatingTuple<Tuple extends Array<unknown>, Result extends Array<unknown> = [], Count extends ReadonlyArray<number> = []> = Count["length"] extends MAXIMUM_ALLOWED_BOUNDARY ? Result : Tuple extends [] ? [] : Result extends [] ? RepeatingTuple<Tuple, Tuple, [...Count, 1]> : RepeatingTuple<Tuple, Result | [...Result, ...Tuple], [...Count, 1]>;
|
|
11
|
+
type UpdatePairs = RepeatingTuple<[number, VuuRowDataItemType]>;
|
|
12
|
+
export type RowUpdates = ["U", number, ...UpdatePairs];
|
|
13
|
+
export type RowInsert = ["I", ...VuuRowDataItemType[]];
|
|
14
|
+
export type RowDelete = ["D", string];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableSchema } from "@vuu-ui/vuu-data";
|
|
2
|
+
import { type BasketsTableName } from "./basket/basket-schemas";
|
|
3
|
+
import { type SimulTableName } from "./simul/simul-schemas";
|
|
4
|
+
export type VuuTableName = BasketsTableName | SimulTableName;
|
|
5
|
+
export declare const schemas: Record<VuuTableName, TableSchema>;
|
|
6
|
+
export declare const getAllSchemas: () => Record<VuuTableName, TableSchema>;
|
|
7
|
+
export declare const getSchema: (tableName: VuuTableName) => Readonly<TableSchema>;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const currencies: string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./currencies";
|
|
2
|
+
export { default as InstrumentReferenceData, InstrumentColumnMap, } from "./instruments";
|
|
3
|
+
export { default as InstrumentPricesReferenceData, InstrumentPricesColumnMap, } from "./instrument-prices";
|
|
4
|
+
export { default as PriceReferenceData } from "./prices";
|
|
5
|
+
export * from "./locations";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type ask = number;
|
|
2
|
+
export type askSize = number;
|
|
3
|
+
export type bbg = string;
|
|
4
|
+
export type bid = number;
|
|
5
|
+
export type bidSize = number;
|
|
6
|
+
export type close = number;
|
|
7
|
+
export type currency = string;
|
|
8
|
+
export type description = string;
|
|
9
|
+
export type exchange = string;
|
|
10
|
+
export type isin = string;
|
|
11
|
+
export type last = number;
|
|
12
|
+
export type lotSize = number;
|
|
13
|
+
export type open = number;
|
|
14
|
+
export type phase = string;
|
|
15
|
+
export type ric = string;
|
|
16
|
+
export type scenario = string;
|
|
17
|
+
export type InstrumentPricesDataRow = [
|
|
18
|
+
ask,
|
|
19
|
+
askSize,
|
|
20
|
+
bbg,
|
|
21
|
+
bid,
|
|
22
|
+
bidSize,
|
|
23
|
+
close,
|
|
24
|
+
currency,
|
|
25
|
+
description,
|
|
26
|
+
exchange,
|
|
27
|
+
isin,
|
|
28
|
+
last,
|
|
29
|
+
lotSize,
|
|
30
|
+
open,
|
|
31
|
+
phase,
|
|
32
|
+
ric,
|
|
33
|
+
scenario
|
|
34
|
+
];
|
|
35
|
+
export declare const InstrumentPricesColumnMap: {
|
|
36
|
+
ask: number;
|
|
37
|
+
askSize: number;
|
|
38
|
+
bbg: number;
|
|
39
|
+
bid: number;
|
|
40
|
+
bidSize: number;
|
|
41
|
+
close: number;
|
|
42
|
+
currency: number;
|
|
43
|
+
description: number;
|
|
44
|
+
exchange: number;
|
|
45
|
+
isin: number;
|
|
46
|
+
last: number;
|
|
47
|
+
lotSize: number;
|
|
48
|
+
open: number;
|
|
49
|
+
phase: number;
|
|
50
|
+
ric: number;
|
|
51
|
+
scenari: number;
|
|
52
|
+
};
|
|
53
|
+
declare const instrumentPrices: InstrumentPricesDataRow[];
|
|
54
|
+
export default instrumentPrices;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Table } from "../../Table";
|
|
2
|
+
export type bbg = string;
|
|
3
|
+
export type currency = string;
|
|
4
|
+
export type ric = string;
|
|
5
|
+
export type description = string;
|
|
6
|
+
export type exchange = string;
|
|
7
|
+
export type price = number;
|
|
8
|
+
export type InstrumentsDataRow = [
|
|
9
|
+
bbg,
|
|
10
|
+
currency,
|
|
11
|
+
description,
|
|
12
|
+
exchange,
|
|
13
|
+
string,
|
|
14
|
+
number,
|
|
15
|
+
ric,
|
|
16
|
+
price
|
|
17
|
+
];
|
|
18
|
+
export declare const InstrumentColumnMap: {
|
|
19
|
+
readonly bbg: 0;
|
|
20
|
+
readonly currency: 1;
|
|
21
|
+
readonly description: 2;
|
|
22
|
+
readonly exchange: 3;
|
|
23
|
+
readonly string: 4;
|
|
24
|
+
readonly number: 5;
|
|
25
|
+
readonly ric: 6;
|
|
26
|
+
readonly price: 7;
|
|
27
|
+
};
|
|
28
|
+
declare const instrumentsData: InstrumentsDataRow[];
|
|
29
|
+
declare const instrumentsTable: Table;
|
|
30
|
+
export { instrumentsData };
|
|
31
|
+
export default instrumentsTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const lotsizes: number[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const priceStrategies: string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Table } from "../../Table";
|
|
2
|
+
export type ask = number;
|
|
3
|
+
export type askSize = number;
|
|
4
|
+
export type bid = number;
|
|
5
|
+
export type bidSize = number;
|
|
6
|
+
export type close = number;
|
|
7
|
+
export type last = number;
|
|
8
|
+
export type open = number;
|
|
9
|
+
export type phase = "C";
|
|
10
|
+
export type ric = string;
|
|
11
|
+
export type scenario = "close";
|
|
12
|
+
export type PricesDataRow = [
|
|
13
|
+
ask,
|
|
14
|
+
askSize,
|
|
15
|
+
bid,
|
|
16
|
+
bidSize,
|
|
17
|
+
close,
|
|
18
|
+
last,
|
|
19
|
+
open,
|
|
20
|
+
phase,
|
|
21
|
+
ric,
|
|
22
|
+
scenario
|
|
23
|
+
];
|
|
24
|
+
declare const pricesData: Array<PricesDataRow>;
|
|
25
|
+
declare const pricesTable: Table;
|
|
26
|
+
export { pricesData };
|
|
27
|
+
export default pricesTable;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TableSchema } from "@vuu-ui/vuu-data";
|
|
2
|
+
import type { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
3
|
+
export type SimulTableName = "instruments" | "instrumentsExtended" | "instrumentPrices" | "orders" | "childOrders" | "parentOrders" | "prices";
|
|
4
|
+
export declare const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>>;
|
|
5
|
+
export type ColumnState = {
|
|
6
|
+
[key: string]: TableSchema;
|
|
7
|
+
};
|
|
8
|
+
export interface ColumnActionUpdate {
|
|
9
|
+
type: "updateColumn";
|
|
10
|
+
column: ColumnDescriptor;
|
|
11
|
+
}
|
|
12
|
+
export type ColumnAction = ColumnActionUpdate;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataSource } from "@vuu-ui/vuu-data";
|
|
2
|
+
import { SuggestionFetcher } from "packages/vuu-data-react/src";
|
|
3
|
+
export type VuuModuleName = "BASKET" | "SIMUL";
|
|
4
|
+
export interface VuuModule<T extends string = string> {
|
|
5
|
+
createDataSource: (tableName: T) => DataSource;
|
|
6
|
+
typeaheadHook: () => SuggestionFetcher;
|
|
7
|
+
}
|
|
8
|
+
export declare const vuuModule: <T extends string = string>(moduleName: VuuModuleName) => VuuModule<T>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
2
|
+
import { VuuRowDataItemType, VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
+
import { UpdateGenerator } from "./rowUpdates";
|
|
4
|
+
type RowAtIndexFunc<T = unknown> = (index: number) => T | undefined;
|
|
5
|
+
export declare const VuuColumnGenerator: (columnCount: number) => string[];
|
|
6
|
+
export type RowGeneratorFactory<T = VuuRowDataItemType> = (columns: string[]) => RowAtIndexFunc<T[]>;
|
|
7
|
+
export type ColumnGeneratorFn = (columns?: number | string[], columnConfig?: {
|
|
8
|
+
[key: string]: Partial<ColumnDescriptor>;
|
|
9
|
+
}) => ColumnDescriptor[];
|
|
10
|
+
export declare const DefaultRowGenerator: RowGeneratorFactory<string>;
|
|
11
|
+
export declare const DefaultColumnGenerator: ColumnGeneratorFn;
|
|
12
|
+
export declare const getColumnAndRowGenerator: (table?: VuuTable) => [ColumnGeneratorFn, RowGeneratorFactory] | [ColumnGeneratorFn, RowGeneratorFactory, () => UpdateGenerator];
|
|
13
|
+
export declare const populateArray: (count: number, colGen: ColumnGeneratorFn, rowGen: RowGeneratorFactory, columns?: number | string[]) => VuuRowDataItemType[][];
|
|
14
|
+
export {};
|