@orderly.network/ui-order-entry 3.1.2 → 3.1.3-alpha.0
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 +39 -2
- package/dist/index.d.ts +39 -2
- package/dist/index.js +296 -240
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +296 -240
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { ReactNode, FC } from 'react';
|
|
1
3
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
2
4
|
import { MarginMode, OrderSide, OrderType, OrderLevel, OrderlyOrder, API } from '@orderly.network/types';
|
|
3
|
-
import * as react from 'react';
|
|
4
|
-
import react__default, { FC } from 'react';
|
|
5
5
|
import * as _orderly_network_hooks from '@orderly.network/hooks';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
+
/** One entry in the order-type dropdown. */
|
|
9
|
+
type OrderTypeOption = {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
/** Props for the Advanced order-type dropdown interceptor target. */
|
|
14
|
+
type OrderTypeAdvancedSelectProps = {
|
|
15
|
+
items: OrderTypeOption[];
|
|
16
|
+
/** Current selection: a real OrderType value, or a custom-type id. */
|
|
17
|
+
value: string;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
onValueChange: (value: string) => void;
|
|
21
|
+
};
|
|
22
|
+
/** Props for the mobile order-type dropdown interceptor target. */
|
|
23
|
+
type MobileTypeSelectProps = {
|
|
24
|
+
items: OrderTypeOption[];
|
|
25
|
+
/** Current selection: a real OrderType value, or a custom-type id. */
|
|
26
|
+
value: string;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
onValueChange: (value: string) => void;
|
|
29
|
+
};
|
|
8
30
|
/** Props exposed for plugin interceptors targeting OrderType tabs area. */
|
|
9
31
|
type OrderEntryTypeTabsProps = {
|
|
10
32
|
type: OrderType;
|
|
@@ -13,12 +35,24 @@ type OrderEntryTypeTabsProps = {
|
|
|
13
35
|
onChange: (type: OrderType) => void;
|
|
14
36
|
marketOrderDisabled?: boolean;
|
|
15
37
|
marketOrderDisabledTooltip?: string;
|
|
38
|
+
/** Active custom order-type id (null for a real OrderType). */
|
|
39
|
+
selectedExtraId?: string | null;
|
|
40
|
+
onExtraSelect?: (id: string | null) => void;
|
|
16
41
|
};
|
|
17
42
|
/** Props exposed for plugin interceptors targeting Buy/Sell switch area. */
|
|
18
43
|
type OrderEntryBuySellSwitchProps = {
|
|
19
44
|
side: OrderSide;
|
|
20
45
|
canTrade: boolean;
|
|
21
46
|
onSideChange: (side: OrderSide) => void;
|
|
47
|
+
/** Active custom order-type id; a plugin can intercept to hide Buy/Sell for its own type. */
|
|
48
|
+
selectedCustomTypeId?: string | null;
|
|
49
|
+
};
|
|
50
|
+
/** Props for the order-entry form-body interceptor target. */
|
|
51
|
+
type OrderEntryBodyProps = {
|
|
52
|
+
symbol: string;
|
|
53
|
+
side: OrderSide;
|
|
54
|
+
selectedCustomTypeId?: string | null;
|
|
55
|
+
children?: ReactNode;
|
|
22
56
|
};
|
|
23
57
|
/** Props exposed for plugin interceptors targeting Available balance row. */
|
|
24
58
|
type OrderEntryAvailableProps = {
|
|
@@ -185,8 +219,11 @@ declare const OrderEntry: react__default.FC<OrderEntryProps>;
|
|
|
185
219
|
declare module "@orderly.network/plugin-core" {
|
|
186
220
|
interface InterceptorTargetPropsMap {
|
|
187
221
|
OrderEntry: OrderEntryProps;
|
|
222
|
+
"Trading.OrderEntry.AdvancedSelect": OrderTypeAdvancedSelectProps;
|
|
188
223
|
"Trading.OrderEntry.Available": OrderEntryAvailableProps;
|
|
224
|
+
"Trading.OrderEntry.Body": OrderEntryBodyProps;
|
|
189
225
|
"Trading.OrderEntry.BuySellSwitch": OrderEntryBuySellSwitchProps;
|
|
226
|
+
"Trading.OrderEntry.MobileTypeSelect": MobileTypeSelectProps;
|
|
190
227
|
"Trading.OrderEntry.QuantitySlider": OrderEntryQuantitySliderProps;
|
|
191
228
|
"Trading.OrderEntry.SubmitSection": OrderEntrySubmitSectionProps;
|
|
192
229
|
"Trading.OrderEntry.TypeTabs": OrderEntryTypeTabsProps;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { ReactNode, FC } from 'react';
|
|
1
3
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
2
4
|
import { MarginMode, OrderSide, OrderType, OrderLevel, OrderlyOrder, API } from '@orderly.network/types';
|
|
3
|
-
import * as react from 'react';
|
|
4
|
-
import react__default, { FC } from 'react';
|
|
5
5
|
import * as _orderly_network_hooks from '@orderly.network/hooks';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
+
/** One entry in the order-type dropdown. */
|
|
9
|
+
type OrderTypeOption = {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
/** Props for the Advanced order-type dropdown interceptor target. */
|
|
14
|
+
type OrderTypeAdvancedSelectProps = {
|
|
15
|
+
items: OrderTypeOption[];
|
|
16
|
+
/** Current selection: a real OrderType value, or a custom-type id. */
|
|
17
|
+
value: string;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
onValueChange: (value: string) => void;
|
|
21
|
+
};
|
|
22
|
+
/** Props for the mobile order-type dropdown interceptor target. */
|
|
23
|
+
type MobileTypeSelectProps = {
|
|
24
|
+
items: OrderTypeOption[];
|
|
25
|
+
/** Current selection: a real OrderType value, or a custom-type id. */
|
|
26
|
+
value: string;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
onValueChange: (value: string) => void;
|
|
29
|
+
};
|
|
8
30
|
/** Props exposed for plugin interceptors targeting OrderType tabs area. */
|
|
9
31
|
type OrderEntryTypeTabsProps = {
|
|
10
32
|
type: OrderType;
|
|
@@ -13,12 +35,24 @@ type OrderEntryTypeTabsProps = {
|
|
|
13
35
|
onChange: (type: OrderType) => void;
|
|
14
36
|
marketOrderDisabled?: boolean;
|
|
15
37
|
marketOrderDisabledTooltip?: string;
|
|
38
|
+
/** Active custom order-type id (null for a real OrderType). */
|
|
39
|
+
selectedExtraId?: string | null;
|
|
40
|
+
onExtraSelect?: (id: string | null) => void;
|
|
16
41
|
};
|
|
17
42
|
/** Props exposed for plugin interceptors targeting Buy/Sell switch area. */
|
|
18
43
|
type OrderEntryBuySellSwitchProps = {
|
|
19
44
|
side: OrderSide;
|
|
20
45
|
canTrade: boolean;
|
|
21
46
|
onSideChange: (side: OrderSide) => void;
|
|
47
|
+
/** Active custom order-type id; a plugin can intercept to hide Buy/Sell for its own type. */
|
|
48
|
+
selectedCustomTypeId?: string | null;
|
|
49
|
+
};
|
|
50
|
+
/** Props for the order-entry form-body interceptor target. */
|
|
51
|
+
type OrderEntryBodyProps = {
|
|
52
|
+
symbol: string;
|
|
53
|
+
side: OrderSide;
|
|
54
|
+
selectedCustomTypeId?: string | null;
|
|
55
|
+
children?: ReactNode;
|
|
22
56
|
};
|
|
23
57
|
/** Props exposed for plugin interceptors targeting Available balance row. */
|
|
24
58
|
type OrderEntryAvailableProps = {
|
|
@@ -185,8 +219,11 @@ declare const OrderEntry: react__default.FC<OrderEntryProps>;
|
|
|
185
219
|
declare module "@orderly.network/plugin-core" {
|
|
186
220
|
interface InterceptorTargetPropsMap {
|
|
187
221
|
OrderEntry: OrderEntryProps;
|
|
222
|
+
"Trading.OrderEntry.AdvancedSelect": OrderTypeAdvancedSelectProps;
|
|
188
223
|
"Trading.OrderEntry.Available": OrderEntryAvailableProps;
|
|
224
|
+
"Trading.OrderEntry.Body": OrderEntryBodyProps;
|
|
189
225
|
"Trading.OrderEntry.BuySellSwitch": OrderEntryBuySellSwitchProps;
|
|
226
|
+
"Trading.OrderEntry.MobileTypeSelect": MobileTypeSelectProps;
|
|
190
227
|
"Trading.OrderEntry.QuantitySlider": OrderEntryQuantitySliderProps;
|
|
191
228
|
"Trading.OrderEntry.SubmitSection": OrderEntrySubmitSectionProps;
|
|
192
229
|
"Trading.OrderEntry.TypeTabs": OrderEntryTypeTabsProps;
|