@orderly.network/ui-orders 2.0.3 → 2.0.4
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/dist/index.d.mts +24 -24
- package/dist/index.d.ts +24 -24
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ForwardedRef, FC } from 'react';
|
|
3
|
-
import { SharePnLConfig
|
|
3
|
+
import { SharePnLConfig } from '@orderly.network/ui-share';
|
|
4
4
|
import * as _orderly_network_ui from '@orderly.network/ui';
|
|
5
5
|
import { Table } from '@orderly.network/ui';
|
|
6
6
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
7
|
-
import {
|
|
7
|
+
import { OrderStatus, API, OrderSide } from '@orderly.network/types';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
type OrderListInstance = {
|
|
@@ -16,7 +16,7 @@ type useOrderListScriptOptions = {
|
|
|
16
16
|
symbol?: string;
|
|
17
17
|
enableLoadMore?: boolean;
|
|
18
18
|
onSymbolChange?: (symbol: API.Symbol) => void;
|
|
19
|
-
sharePnLConfig?: SharePnLConfig
|
|
19
|
+
sharePnLConfig?: SharePnLConfig;
|
|
20
20
|
filterConfig?: {
|
|
21
21
|
side?: OrderSide | "all";
|
|
22
22
|
range?: {
|
|
@@ -32,9 +32,9 @@ declare const useOrderListScript: (props: useOrderListScriptOptions) => {
|
|
|
32
32
|
dataSource: any[] | undefined;
|
|
33
33
|
isLoading: boolean;
|
|
34
34
|
loadMore: () => void;
|
|
35
|
-
cancelOrder: (orderId: number, symbol?: string
|
|
35
|
+
cancelOrder: (orderId: number, symbol?: string) => Promise<any>;
|
|
36
36
|
updateOrder: (orderId: string, order: _orderly_network_types.OrderEntity) => Promise<any>;
|
|
37
|
-
cancelAlgoOrder: (orderId: number, symbol?: string
|
|
37
|
+
cancelAlgoOrder: (orderId: number, symbol?: string) => Promise<any>;
|
|
38
38
|
updateAlgoOrder: (orderId: string, order: _orderly_network_types.OrderEntity) => Promise<any>;
|
|
39
39
|
pagination: _orderly_network_ui.PaginationMeta | {
|
|
40
40
|
page: number;
|
|
@@ -51,7 +51,7 @@ declare const useOrderListScript: (props: useOrderListScriptOptions) => {
|
|
|
51
51
|
filterItems: any[];
|
|
52
52
|
onCancelAll: () => void;
|
|
53
53
|
onSymbolChange: ((symbol: API.Symbol) => void) | undefined;
|
|
54
|
-
sharePnLConfig:
|
|
54
|
+
sharePnLConfig: SharePnLConfig | undefined;
|
|
55
55
|
tableInstance: react.MutableRefObject<Table<any> | undefined>;
|
|
56
56
|
symbolsInfo: {
|
|
57
57
|
[x: string]: (key?: keyof API.SymbolExt | undefined, defaultValue?: (string | number) | undefined) => any;
|
|
@@ -73,7 +73,7 @@ declare enum TabType {
|
|
|
73
73
|
type OrdersWidgetProps = {
|
|
74
74
|
current?: TabType;
|
|
75
75
|
pnlNotionalDecimalPrecision?: number;
|
|
76
|
-
sharePnLConfig?: SharePnLConfig
|
|
76
|
+
sharePnLConfig?: SharePnLConfig;
|
|
77
77
|
};
|
|
78
78
|
declare const OrdersWidget: react.ForwardRefExoticComponent<OrdersWidgetProps & react.RefAttributes<OrderListInstance>>;
|
|
79
79
|
|
|
@@ -81,13 +81,13 @@ type UseOrdersScriptOptions = {
|
|
|
81
81
|
current?: TabType;
|
|
82
82
|
pnlNotionalDecimalPrecision?: number;
|
|
83
83
|
ref: ForwardedRef<OrderListInstance>;
|
|
84
|
-
sharePnLConfig?: SharePnLConfig
|
|
84
|
+
sharePnLConfig?: SharePnLConfig;
|
|
85
85
|
};
|
|
86
86
|
declare const useOrdersScript: (props: UseOrdersScriptOptions) => {
|
|
87
87
|
current: TabType | undefined;
|
|
88
88
|
pnlNotionalDecimalPrecision: number | undefined;
|
|
89
89
|
orderListRef: react.RefObject<OrderListInstance>;
|
|
90
|
-
sharePnLConfig:
|
|
90
|
+
sharePnLConfig: SharePnLConfig | undefined;
|
|
91
91
|
};
|
|
92
92
|
type OrdersBuilderState = ReturnType<typeof useOrdersScript>;
|
|
93
93
|
|
|
@@ -112,7 +112,7 @@ type DesktopOrderListWidgetProps = {
|
|
|
112
112
|
symbol?: string;
|
|
113
113
|
onSymbolChange?: (symbol: API.Symbol) => void;
|
|
114
114
|
pnlNotionalDecimalPrecision?: number;
|
|
115
|
-
sharePnLConfig?: SharePnLConfig
|
|
115
|
+
sharePnLConfig?: SharePnLConfig;
|
|
116
116
|
testIds?: {
|
|
117
117
|
tableBody?: string;
|
|
118
118
|
};
|
|
@@ -120,24 +120,24 @@ type DesktopOrderListWidgetProps = {
|
|
|
120
120
|
declare const DesktopOrderListWidget: react.ForwardRefExoticComponent<DesktopOrderListWidgetProps & react.RefAttributes<OrderListInstance>>;
|
|
121
121
|
declare const MobileOrderListWidget: (props: {
|
|
122
122
|
type: TabType;
|
|
123
|
-
ordersStatus?: OrderStatus
|
|
123
|
+
ordersStatus?: OrderStatus;
|
|
124
124
|
/** if has value, will be fetch current symbol orders*/
|
|
125
|
-
symbol?: string
|
|
126
|
-
onSymbolChange?: (
|
|
127
|
-
sharePnLConfig?:
|
|
125
|
+
symbol?: string;
|
|
126
|
+
onSymbolChange?: (symbol: API.Symbol) => void;
|
|
127
|
+
sharePnLConfig?: SharePnLConfig;
|
|
128
128
|
classNames?: {
|
|
129
|
-
root?: string
|
|
130
|
-
cell?: string
|
|
131
|
-
content?: string
|
|
132
|
-
}
|
|
133
|
-
showFilter?: boolean
|
|
129
|
+
root?: string;
|
|
130
|
+
cell?: string;
|
|
131
|
+
content?: string;
|
|
132
|
+
};
|
|
133
|
+
showFilter?: boolean;
|
|
134
134
|
filterConfig?: {
|
|
135
|
-
side?: OrderSide | "all"
|
|
135
|
+
side?: OrderSide | "all";
|
|
136
136
|
range?: {
|
|
137
|
-
from?: Date
|
|
138
|
-
to?: Date
|
|
139
|
-
}
|
|
140
|
-
}
|
|
137
|
+
from?: Date;
|
|
138
|
+
to?: Date;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
141
|
}) => react_jsx_runtime.JSX.Element;
|
|
142
142
|
|
|
143
143
|
export { DesktopOrderList, DesktopOrderListWidget, MobileOrderList, MobileOrderListWidget, type OrderListInstance, type OrdersBuilderState, OrdersWidget, TabType, useOrderListScript, useOrdersScript };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ForwardedRef, FC } from 'react';
|
|
3
|
-
import { SharePnLConfig
|
|
3
|
+
import { SharePnLConfig } from '@orderly.network/ui-share';
|
|
4
4
|
import * as _orderly_network_ui from '@orderly.network/ui';
|
|
5
5
|
import { Table } from '@orderly.network/ui';
|
|
6
6
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
7
|
-
import {
|
|
7
|
+
import { OrderStatus, API, OrderSide } from '@orderly.network/types';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
type OrderListInstance = {
|
|
@@ -16,7 +16,7 @@ type useOrderListScriptOptions = {
|
|
|
16
16
|
symbol?: string;
|
|
17
17
|
enableLoadMore?: boolean;
|
|
18
18
|
onSymbolChange?: (symbol: API.Symbol) => void;
|
|
19
|
-
sharePnLConfig?: SharePnLConfig
|
|
19
|
+
sharePnLConfig?: SharePnLConfig;
|
|
20
20
|
filterConfig?: {
|
|
21
21
|
side?: OrderSide | "all";
|
|
22
22
|
range?: {
|
|
@@ -32,9 +32,9 @@ declare const useOrderListScript: (props: useOrderListScriptOptions) => {
|
|
|
32
32
|
dataSource: any[] | undefined;
|
|
33
33
|
isLoading: boolean;
|
|
34
34
|
loadMore: () => void;
|
|
35
|
-
cancelOrder: (orderId: number, symbol?: string
|
|
35
|
+
cancelOrder: (orderId: number, symbol?: string) => Promise<any>;
|
|
36
36
|
updateOrder: (orderId: string, order: _orderly_network_types.OrderEntity) => Promise<any>;
|
|
37
|
-
cancelAlgoOrder: (orderId: number, symbol?: string
|
|
37
|
+
cancelAlgoOrder: (orderId: number, symbol?: string) => Promise<any>;
|
|
38
38
|
updateAlgoOrder: (orderId: string, order: _orderly_network_types.OrderEntity) => Promise<any>;
|
|
39
39
|
pagination: _orderly_network_ui.PaginationMeta | {
|
|
40
40
|
page: number;
|
|
@@ -51,7 +51,7 @@ declare const useOrderListScript: (props: useOrderListScriptOptions) => {
|
|
|
51
51
|
filterItems: any[];
|
|
52
52
|
onCancelAll: () => void;
|
|
53
53
|
onSymbolChange: ((symbol: API.Symbol) => void) | undefined;
|
|
54
|
-
sharePnLConfig:
|
|
54
|
+
sharePnLConfig: SharePnLConfig | undefined;
|
|
55
55
|
tableInstance: react.MutableRefObject<Table<any> | undefined>;
|
|
56
56
|
symbolsInfo: {
|
|
57
57
|
[x: string]: (key?: keyof API.SymbolExt | undefined, defaultValue?: (string | number) | undefined) => any;
|
|
@@ -73,7 +73,7 @@ declare enum TabType {
|
|
|
73
73
|
type OrdersWidgetProps = {
|
|
74
74
|
current?: TabType;
|
|
75
75
|
pnlNotionalDecimalPrecision?: number;
|
|
76
|
-
sharePnLConfig?: SharePnLConfig
|
|
76
|
+
sharePnLConfig?: SharePnLConfig;
|
|
77
77
|
};
|
|
78
78
|
declare const OrdersWidget: react.ForwardRefExoticComponent<OrdersWidgetProps & react.RefAttributes<OrderListInstance>>;
|
|
79
79
|
|
|
@@ -81,13 +81,13 @@ type UseOrdersScriptOptions = {
|
|
|
81
81
|
current?: TabType;
|
|
82
82
|
pnlNotionalDecimalPrecision?: number;
|
|
83
83
|
ref: ForwardedRef<OrderListInstance>;
|
|
84
|
-
sharePnLConfig?: SharePnLConfig
|
|
84
|
+
sharePnLConfig?: SharePnLConfig;
|
|
85
85
|
};
|
|
86
86
|
declare const useOrdersScript: (props: UseOrdersScriptOptions) => {
|
|
87
87
|
current: TabType | undefined;
|
|
88
88
|
pnlNotionalDecimalPrecision: number | undefined;
|
|
89
89
|
orderListRef: react.RefObject<OrderListInstance>;
|
|
90
|
-
sharePnLConfig:
|
|
90
|
+
sharePnLConfig: SharePnLConfig | undefined;
|
|
91
91
|
};
|
|
92
92
|
type OrdersBuilderState = ReturnType<typeof useOrdersScript>;
|
|
93
93
|
|
|
@@ -112,7 +112,7 @@ type DesktopOrderListWidgetProps = {
|
|
|
112
112
|
symbol?: string;
|
|
113
113
|
onSymbolChange?: (symbol: API.Symbol) => void;
|
|
114
114
|
pnlNotionalDecimalPrecision?: number;
|
|
115
|
-
sharePnLConfig?: SharePnLConfig
|
|
115
|
+
sharePnLConfig?: SharePnLConfig;
|
|
116
116
|
testIds?: {
|
|
117
117
|
tableBody?: string;
|
|
118
118
|
};
|
|
@@ -120,24 +120,24 @@ type DesktopOrderListWidgetProps = {
|
|
|
120
120
|
declare const DesktopOrderListWidget: react.ForwardRefExoticComponent<DesktopOrderListWidgetProps & react.RefAttributes<OrderListInstance>>;
|
|
121
121
|
declare const MobileOrderListWidget: (props: {
|
|
122
122
|
type: TabType;
|
|
123
|
-
ordersStatus?: OrderStatus
|
|
123
|
+
ordersStatus?: OrderStatus;
|
|
124
124
|
/** if has value, will be fetch current symbol orders*/
|
|
125
|
-
symbol?: string
|
|
126
|
-
onSymbolChange?: (
|
|
127
|
-
sharePnLConfig?:
|
|
125
|
+
symbol?: string;
|
|
126
|
+
onSymbolChange?: (symbol: API.Symbol) => void;
|
|
127
|
+
sharePnLConfig?: SharePnLConfig;
|
|
128
128
|
classNames?: {
|
|
129
|
-
root?: string
|
|
130
|
-
cell?: string
|
|
131
|
-
content?: string
|
|
132
|
-
}
|
|
133
|
-
showFilter?: boolean
|
|
129
|
+
root?: string;
|
|
130
|
+
cell?: string;
|
|
131
|
+
content?: string;
|
|
132
|
+
};
|
|
133
|
+
showFilter?: boolean;
|
|
134
134
|
filterConfig?: {
|
|
135
|
-
side?: OrderSide | "all"
|
|
135
|
+
side?: OrderSide | "all";
|
|
136
136
|
range?: {
|
|
137
|
-
from?: Date
|
|
138
|
-
to?: Date
|
|
139
|
-
}
|
|
140
|
-
}
|
|
137
|
+
from?: Date;
|
|
138
|
+
to?: Date;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
141
|
}) => react_jsx_runtime.JSX.Element;
|
|
142
142
|
|
|
143
143
|
export { DesktopOrderList, DesktopOrderListWidget, MobileOrderList, MobileOrderListWidget, type OrderListInstance, type OrdersBuilderState, OrdersWidget, TabType, useOrderListScript, useOrdersScript };
|