@brokerize/elements 1.4.2 → 1.5.1
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/CHANGELOG.md +79 -68
- package/dist/bundle.d.ts +434 -3
- package/dist/bundle.es.js +32820 -55856
- package/dist/bundle.umd.js +138 -114
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +3 -5
package/dist/bundle.d.ts
CHANGED
|
@@ -46,29 +46,96 @@ export declare type BrokerizeBaseConfig = {
|
|
|
46
46
|
saveDownloadedFile?: SaveDownloadedFile;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Represents a brokerize UI component instance.
|
|
51
|
+
* Provides methods to manage the component's lifecycle and appearance.
|
|
52
|
+
*/
|
|
49
53
|
export declare type BrokerizeElement = {
|
|
54
|
+
/**
|
|
55
|
+
* The current theme applied to the component.
|
|
56
|
+
* Can be modified to dynamically change the component's styling.
|
|
57
|
+
*/
|
|
50
58
|
theme: Theme;
|
|
59
|
+
/**
|
|
60
|
+
* Destroys the component and cleans up all resources.
|
|
61
|
+
* Must be called when the component is no longer needed to prevent memory leaks.
|
|
62
|
+
*/
|
|
51
63
|
destroy: () => void;
|
|
52
64
|
};
|
|
53
65
|
|
|
54
66
|
export declare type BrokerizeElements = {
|
|
67
|
+
/**
|
|
68
|
+
* Creates the main brokerize component providing a complete trading interface.
|
|
69
|
+
* This is the primary entry point for full-featured trading applications.
|
|
70
|
+
*/
|
|
55
71
|
createBrokerizeMain: (cfg: BrokerizeMainConfig) => BrokerizeMainElement;
|
|
72
|
+
/**
|
|
73
|
+
* Creates an overview component for high-level portfolio and account information.
|
|
74
|
+
*/
|
|
56
75
|
createOverview: (cfg: OverviewConfig) => BrokerizeElement;
|
|
76
|
+
/**
|
|
77
|
+
* Creates a broker list component for selecting and managing broker connections.
|
|
78
|
+
*/
|
|
57
79
|
createBrokerList: (cfg: BrokerListConfig) => BrokerizeElement;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a broker login form for authenticating with specific brokers.
|
|
82
|
+
*/
|
|
58
83
|
createBrokerLoginForm: (cfg: BrokerLoginFormConfig) => BrokerizeElement;
|
|
84
|
+
/**
|
|
85
|
+
* Creates an order form for placing new trading orders.
|
|
86
|
+
*/
|
|
59
87
|
createOrderForm: (cfg: OrderFormConfig) => BrokerizeElement;
|
|
88
|
+
/**
|
|
89
|
+
* Creates a portfolio table displaying user's investment portfolios.
|
|
90
|
+
*/
|
|
60
91
|
createPortfolioTable: (cfg: PortfolioTableConfig) => BrokerizeElement;
|
|
92
|
+
/**
|
|
93
|
+
* Creates a session TAN form for two-factor authentication during broker sessions.
|
|
94
|
+
*/
|
|
61
95
|
createSessionTanForm: (cfg: SessionTanFormConfig) => BrokerizeElement;
|
|
96
|
+
/**
|
|
97
|
+
* Creates an order table for viewing and managing trading orders.
|
|
98
|
+
*/
|
|
62
99
|
createOrderTable: (cfg: OrderTableConfig) => BrokerizeElement;
|
|
100
|
+
/**
|
|
101
|
+
* Creates an order receipt component for displaying order execution details.
|
|
102
|
+
*/
|
|
63
103
|
createOrderReceipt: (cfg: OrderReceiptConfig) => BrokerizeElement;
|
|
104
|
+
/**
|
|
105
|
+
* Creates a positions table showing current portfolio positions.
|
|
106
|
+
*/
|
|
64
107
|
createPositionsTable: (cfg: PositionsTableConfig) => BrokerizeElement;
|
|
108
|
+
/**
|
|
109
|
+
* Creates a change order form for modifying existing orders.
|
|
110
|
+
*/
|
|
65
111
|
createChangeOrderForm: (cfg: ChangeOrderFormConfig) => BrokerizeElement;
|
|
112
|
+
/**
|
|
113
|
+
* Creates a cancel order form for cancelling pending orders.
|
|
114
|
+
*/
|
|
66
115
|
createCancelOrderForm: (cfg: CancelOrderFormConfig) => BrokerizeElement;
|
|
116
|
+
/**
|
|
117
|
+
* Creates a sessions table for managing active broker sessions.
|
|
118
|
+
*/
|
|
67
119
|
createSessionsTable: (cfg: SessionsTableConfig) => BrokerizeElement;
|
|
120
|
+
/**
|
|
121
|
+
* Creates a comprehensive portfolio view with integrated trading capabilities.
|
|
122
|
+
*/
|
|
68
123
|
createPortfolioView: (cfg: PortfolioViewConfig) => BrokerizeElement;
|
|
124
|
+
/**
|
|
125
|
+
* Creates a modal host for displaying dialogs and modals.
|
|
126
|
+
*/
|
|
69
127
|
createModalHost: (cfg: ModalHostConfig) => BrokerizeElement;
|
|
128
|
+
/**
|
|
129
|
+
* Creates a styling UI example component for theme development and testing.
|
|
130
|
+
*/
|
|
70
131
|
createStylingUIExample: (cfg: StylingUIExampleConfig) => BrokerizeElement;
|
|
132
|
+
/**
|
|
133
|
+
* Creates a loader component for displaying loading states.
|
|
134
|
+
*/
|
|
71
135
|
createLoader: (cfg: LoaderConfig) => BrokerizeElement;
|
|
136
|
+
/**
|
|
137
|
+
* Service for managing modal dialogs across the application.
|
|
138
|
+
*/
|
|
72
139
|
modalService: ModalService;
|
|
73
140
|
/**
|
|
74
141
|
* Configure global settings for Brokerize Elements. The global configuration is shared across all instances of Brokerize Elements.
|
|
@@ -97,6 +164,9 @@ export declare type BrokerizeElementsGlobalConfiguration = {
|
|
|
97
164
|
assetsPath?: string;
|
|
98
165
|
};
|
|
99
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Variants for the brokerize loader component.
|
|
169
|
+
*/
|
|
100
170
|
export declare type BrokerizeLoaderVariant = 'brokerize' | 'spinner' | 'order' | 'loading';
|
|
101
171
|
|
|
102
172
|
export declare type BrokerizeMainConfig = BrokerizeBaseConfig & {
|
|
@@ -113,7 +183,14 @@ export declare type BrokerizeMainConfig = BrokerizeBaseConfig & {
|
|
|
113
183
|
preferredExchangeId?: number;
|
|
114
184
|
};
|
|
115
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Represents the main brokerize component with navigation capabilities.
|
|
188
|
+
* Extends BrokerizeElement with navigation functionality for complex trading interfaces.
|
|
189
|
+
*/
|
|
116
190
|
export declare type BrokerizeMainElement = BrokerizeElement & {
|
|
191
|
+
/**
|
|
192
|
+
* Navigation object providing methods to navigate within the brokerize interface.
|
|
193
|
+
*/
|
|
117
194
|
navigation: BrokerizeNavigation;
|
|
118
195
|
};
|
|
119
196
|
|
|
@@ -165,15 +242,24 @@ export declare type BrokerizeRenderConfig = {
|
|
|
165
242
|
assetsPath?: string;
|
|
166
243
|
};
|
|
167
244
|
|
|
168
|
-
export declare type BrokerizeSummaryData = { title: string } & any;
|
|
169
|
-
|
|
170
245
|
export declare type BrokerListConfig = {
|
|
246
|
+
/**
|
|
247
|
+
* Callback triggered when user initiates login to a broker.
|
|
248
|
+
* @param data - Object containing the broker name.
|
|
249
|
+
*/
|
|
171
250
|
onLogin: (data: { brokerName: string }) => void;
|
|
251
|
+
/**
|
|
252
|
+
* Optional storage for user confirmations and agreements.
|
|
253
|
+
*/
|
|
172
254
|
confirmationStorage?: ConfirmationStorage;
|
|
173
255
|
/** brokerize-internal */
|
|
174
256
|
disclaimerPrefixHtml?: string;
|
|
175
257
|
/** brokerize-internal */
|
|
176
258
|
infoPreamble?: string;
|
|
259
|
+
/**
|
|
260
|
+
* Optional: pre-selected broker name to highlight or filter.
|
|
261
|
+
*/
|
|
262
|
+
brokerName?: string;
|
|
177
263
|
} & BrokerizeBaseConfig;
|
|
178
264
|
|
|
179
265
|
export declare type BrokerLoginFormConfig = {
|
|
@@ -185,6 +271,10 @@ export declare type BrokerLoginFormConfig = {
|
|
|
185
271
|
*/
|
|
186
272
|
env?: string;
|
|
187
273
|
|
|
274
|
+
/**
|
|
275
|
+
* Callback triggered when user exits the login form.
|
|
276
|
+
* @param loggedIn - Whether the user successfully logged in.
|
|
277
|
+
*/
|
|
188
278
|
onExit: (loggedIn: boolean) => void;
|
|
189
279
|
|
|
190
280
|
/**
|
|
@@ -211,8 +301,18 @@ export declare type BrokerLoginFormConfig = {
|
|
|
211
301
|
} & BrokerizeBaseConfig;
|
|
212
302
|
|
|
213
303
|
export declare type CancelOrderFormConfig = {
|
|
304
|
+
/**
|
|
305
|
+
* ID of the order to be cancelled.
|
|
306
|
+
*/
|
|
214
307
|
orderId: string;
|
|
308
|
+
/**
|
|
309
|
+
* Callback triggered when user exits the cancel order form.
|
|
310
|
+
*/
|
|
215
311
|
onExit: () => void;
|
|
312
|
+
/**
|
|
313
|
+
* Callback for navigation events.
|
|
314
|
+
* @param linkTarget - The navigation target.
|
|
315
|
+
*/
|
|
216
316
|
onNavigate: (linkTarget: LinkTarget) => void;
|
|
217
317
|
/**
|
|
218
318
|
* Optional `reportingTag` to send with order creates. ReportingTags appear in order reports.
|
|
@@ -221,7 +321,13 @@ export declare type CancelOrderFormConfig = {
|
|
|
221
321
|
} & BrokerizeBaseConfig;
|
|
222
322
|
|
|
223
323
|
export declare type ChangeOrderFormConfig = {
|
|
324
|
+
/**
|
|
325
|
+
* ID of the order to be changed.
|
|
326
|
+
*/
|
|
224
327
|
orderId: string;
|
|
328
|
+
/**
|
|
329
|
+
* Callback triggered when user exits the change order form.
|
|
330
|
+
*/
|
|
225
331
|
onExit: () => void;
|
|
226
332
|
/**
|
|
227
333
|
* Optional `reportingTag` to send with order creates. ReportingTags appear in order reports.
|
|
@@ -238,16 +344,41 @@ export { Client }
|
|
|
238
344
|
export declare const cognitoFacade: Client.CognitoFacade;
|
|
239
345
|
|
|
240
346
|
export declare type ConfirmationStorage = {
|
|
347
|
+
/**
|
|
348
|
+
* Retrieves the acceptance entry for specific terms.
|
|
349
|
+
* @param termsId - Unique identifier for the terms.
|
|
350
|
+
* @returns The acceptance entry or null/undefined if not accepted.
|
|
351
|
+
*/
|
|
241
352
|
getTermsAccepted(termsId: string): ConfirmItemAcceptanceEntry | null | undefined;
|
|
353
|
+
/**
|
|
354
|
+
* Sets or removes the acceptance entry for specific terms.
|
|
355
|
+
* @param termsId - Unique identifier for the terms.
|
|
356
|
+
* @param entry - The acceptance entry to set, or null to remove.
|
|
357
|
+
*/
|
|
242
358
|
setTermsAccepted(termsId: string, entry: ConfirmItemAcceptanceEntry | null);
|
|
243
359
|
};
|
|
244
360
|
|
|
245
361
|
export declare type ConfirmItemAcceptanceEntry = {
|
|
362
|
+
/**
|
|
363
|
+
* Timestamp when the terms were accepted.
|
|
364
|
+
*/
|
|
246
365
|
acceptedAt: number;
|
|
247
366
|
};
|
|
248
367
|
|
|
249
368
|
export declare type CredentialsStore = {
|
|
369
|
+
/**
|
|
370
|
+
* Stores user credentials for a specific broker.
|
|
371
|
+
* @param displayLabel - Human-readable label for the stored credentials.
|
|
372
|
+
* @param brokerName - Name of the broker the credentials are for.
|
|
373
|
+
* @param value - The credential value to store (typically encrypted).
|
|
374
|
+
* @returns Promise that resolves when credentials are stored.
|
|
375
|
+
*/
|
|
250
376
|
storeCredentials: (displayLabel: string, brokerName: string, value: string) => Promise<void>;
|
|
377
|
+
/**
|
|
378
|
+
* Loads stored credentials for a specific broker.
|
|
379
|
+
* @param brokerName - Name of the broker to load credentials for.
|
|
380
|
+
* @returns Promise that resolves to the stored credential value or null if not found.
|
|
381
|
+
*/
|
|
251
382
|
loadCredentials: (brokerName: string) => Promise<string | null>;
|
|
252
383
|
};
|
|
253
384
|
|
|
@@ -369,8 +500,17 @@ export declare type DataCellValueString = {
|
|
|
369
500
|
* headline title, a content text and a list of input boxes where users may enter data.
|
|
370
501
|
*/
|
|
371
502
|
export declare type DialogConfig = {
|
|
503
|
+
/**
|
|
504
|
+
* Optional title for the dialog.
|
|
505
|
+
*/
|
|
372
506
|
title?: string;
|
|
507
|
+
/**
|
|
508
|
+
* Optional content text for the dialog.
|
|
509
|
+
*/
|
|
373
510
|
content?: string;
|
|
511
|
+
/**
|
|
512
|
+
* List of input configurations for the dialog.
|
|
513
|
+
*/
|
|
374
514
|
inputConfigs: InputConfig[];
|
|
375
515
|
};
|
|
376
516
|
|
|
@@ -390,7 +530,13 @@ export declare type DialogResultCancel = { response: 'cancel' };
|
|
|
390
530
|
export declare type DialogResultOk = { response: 'ok'; inputs: InputConfig[] };
|
|
391
531
|
|
|
392
532
|
export declare type DownloadedFile = {
|
|
533
|
+
/**
|
|
534
|
+
* The file blob to be saved.
|
|
535
|
+
*/
|
|
393
536
|
blob: Blob;
|
|
537
|
+
/**
|
|
538
|
+
* The filename for the downloaded file.
|
|
539
|
+
*/
|
|
394
540
|
filename: string;
|
|
395
541
|
};
|
|
396
542
|
|
|
@@ -400,15 +546,39 @@ export declare type DownloadedFile = {
|
|
|
400
546
|
*/
|
|
401
547
|
export declare const Elements: BrokerizeElements;
|
|
402
548
|
|
|
549
|
+
/**
|
|
550
|
+
* Array of header items defining table columns.
|
|
551
|
+
*/
|
|
403
552
|
export declare type Header = HeaderItem[];
|
|
404
553
|
|
|
405
554
|
export declare type HeaderItem = {
|
|
555
|
+
/**
|
|
556
|
+
* Unique identifier for the header column.
|
|
557
|
+
*/
|
|
406
558
|
id: string;
|
|
559
|
+
/**
|
|
560
|
+
* Display label for the header column.
|
|
561
|
+
*/
|
|
407
562
|
label: string;
|
|
563
|
+
/**
|
|
564
|
+
* Text alignment for the column ('left', 'right', or 'center').
|
|
565
|
+
*/
|
|
408
566
|
align?: 'left' | 'right' | 'center';
|
|
567
|
+
/**
|
|
568
|
+
* Width of the column (number in pixels or string with CSS units).
|
|
569
|
+
*/
|
|
409
570
|
width?: number | string;
|
|
571
|
+
/**
|
|
572
|
+
* Whether the column is sortable.
|
|
573
|
+
*/
|
|
410
574
|
sortable?: boolean;
|
|
575
|
+
/**
|
|
576
|
+
* Whether the column should be visually hidden.
|
|
577
|
+
*/
|
|
411
578
|
visuallyHidden?: boolean;
|
|
579
|
+
/**
|
|
580
|
+
* Default sort direction for the column.
|
|
581
|
+
*/
|
|
412
582
|
defaultDirection?: OrderDirection;
|
|
413
583
|
};
|
|
414
584
|
|
|
@@ -419,11 +589,29 @@ declare type Image_2 = {
|
|
|
419
589
|
export { Image_2 as Image }
|
|
420
590
|
|
|
421
591
|
export declare type InputConfig = {
|
|
592
|
+
/**
|
|
593
|
+
* Optional unique identifier for the input field.
|
|
594
|
+
*/
|
|
422
595
|
id?: string;
|
|
596
|
+
/**
|
|
597
|
+
* Default value for the input field.
|
|
598
|
+
*/
|
|
423
599
|
defaultValue?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Label text for the input field.
|
|
602
|
+
*/
|
|
424
603
|
inputLabel: string;
|
|
604
|
+
/**
|
|
605
|
+
* Placeholder text for the input field.
|
|
606
|
+
*/
|
|
425
607
|
placeholder?: string;
|
|
608
|
+
/**
|
|
609
|
+
* Whether the input field is required.
|
|
610
|
+
*/
|
|
426
611
|
required?: boolean;
|
|
612
|
+
/**
|
|
613
|
+
* Current value of the input field.
|
|
614
|
+
*/
|
|
427
615
|
value?: string;
|
|
428
616
|
};
|
|
429
617
|
|
|
@@ -434,40 +622,126 @@ export declare type LinkTarget = {
|
|
|
434
622
|
};
|
|
435
623
|
|
|
436
624
|
export declare type LoaderConfig = {
|
|
625
|
+
/**
|
|
626
|
+
* Visual variant of the loader animation.
|
|
627
|
+
*/
|
|
437
628
|
variant?: BrokerizeLoaderVariant;
|
|
629
|
+
/**
|
|
630
|
+
* Text alignment for the loader.
|
|
631
|
+
*/
|
|
438
632
|
alignment?: string;
|
|
633
|
+
/**
|
|
634
|
+
* Whether to display the loader as an overlay.
|
|
635
|
+
*/
|
|
439
636
|
overlay?: boolean;
|
|
637
|
+
/**
|
|
638
|
+
* Whether the loader animation should repeat.
|
|
639
|
+
*/
|
|
440
640
|
repeat?: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* Size of the loader in pixels.
|
|
643
|
+
*/
|
|
441
644
|
size?: number;
|
|
442
645
|
} & BrokerizeBaseConfig;
|
|
443
646
|
|
|
444
647
|
export declare type LoginFormConfig = {
|
|
648
|
+
/**
|
|
649
|
+
* Callback triggered when user chooses guest login.
|
|
650
|
+
*/
|
|
445
651
|
onGuestLogin: () => void;
|
|
652
|
+
/**
|
|
653
|
+
* The brokerize client instance for authentication.
|
|
654
|
+
*/
|
|
446
655
|
client: Brokerize;
|
|
656
|
+
/**
|
|
657
|
+
* Callback triggered when user successfully logs in.
|
|
658
|
+
* @param authCtxConfiguration - Authentication context configuration.
|
|
659
|
+
*/
|
|
447
660
|
onLogin: (authCtxConfiguration: AuthContextConfiguration) => void;
|
|
448
661
|
} & BrokerizeBaseConfig;
|
|
449
662
|
|
|
450
|
-
export declare type ModalHostConfig = {
|
|
663
|
+
export declare type ModalHostConfig = {
|
|
664
|
+
/**
|
|
665
|
+
* Optional function to display toast notifications.
|
|
666
|
+
*/
|
|
667
|
+
showToast?: ShowToast;
|
|
668
|
+
} & BrokerizeBaseConfig;
|
|
451
669
|
|
|
670
|
+
/**
|
|
671
|
+
* Service interface for managing modal dialogs and user interactions.
|
|
672
|
+
*
|
|
673
|
+
* The ModalService provides a centralized way to display various types of modal dialogs
|
|
674
|
+
* including security information, confirmation prompts, custom dialogs, and session TAN
|
|
675
|
+
* authentication modals. It supports activation/deactivation and method overriding for
|
|
676
|
+
* customization.
|
|
677
|
+
*
|
|
678
|
+
* @interface
|
|
679
|
+
*/
|
|
452
680
|
export declare interface ModalService {
|
|
681
|
+
/**
|
|
682
|
+
* Shows security information in a modal dialog.
|
|
683
|
+
* @param title - The title of the security information dialog.
|
|
684
|
+
* @param content - The content to display in the dialog.
|
|
685
|
+
*/
|
|
453
686
|
showSecurityInformation(title: string, content: string): void;
|
|
454
687
|
|
|
688
|
+
/**
|
|
689
|
+
* Shows a confirmation dialog and returns a promise that resolves to the user's choice.
|
|
690
|
+
* @param msg - The confirmation message to display.
|
|
691
|
+
* @returns A promise that resolves to true if confirmed, false otherwise.
|
|
692
|
+
*/
|
|
455
693
|
showConfirm(msg: string): Promise<boolean>;
|
|
456
694
|
|
|
695
|
+
/**
|
|
696
|
+
* Shows a custom dialog based on the provided configuration.
|
|
697
|
+
* @param dialogConfig - Configuration for the dialog to display.
|
|
698
|
+
* @returns A promise that resolves with the dialog result.
|
|
699
|
+
*/
|
|
457
700
|
showDialog(dialogConfig: DialogConfig): Promise<DialogResult>;
|
|
458
701
|
|
|
702
|
+
/**
|
|
703
|
+
* Shows a session TAN modal for two-factor authentication.
|
|
704
|
+
* @param sessionId - The ID of the session requiring TAN input.
|
|
705
|
+
*/
|
|
459
706
|
showSessionTanModal(sessionId: string): void;
|
|
460
707
|
|
|
708
|
+
/**
|
|
709
|
+
* Activates the modal service for use.
|
|
710
|
+
*/
|
|
461
711
|
activate(): void;
|
|
462
712
|
|
|
713
|
+
/**
|
|
714
|
+
* Deactivates the modal service.
|
|
715
|
+
*/
|
|
463
716
|
deactivate(): void;
|
|
464
717
|
|
|
718
|
+
/**
|
|
719
|
+
* Overrides methods of the modal service with custom implementations.
|
|
720
|
+
* @param overrides - Partial object containing methods to override.
|
|
721
|
+
*/
|
|
465
722
|
override(overrides: Partial<ModalService>): void;
|
|
466
723
|
|
|
724
|
+
/**
|
|
725
|
+
* Shows an order receipt modal.
|
|
726
|
+
* @param data - The receipt data to display.
|
|
727
|
+
* @param showActions - Whether to show action buttons in the receipt.
|
|
728
|
+
* @param handleOrderTableAction - Callback for handling order table actions.
|
|
729
|
+
*/
|
|
467
730
|
showReceipt(data: ReceiptData, showActions: boolean, handleOrderTableAction: (e: any) => void): void;
|
|
468
731
|
|
|
732
|
+
/**
|
|
733
|
+
* Shows a detailed table modal.
|
|
734
|
+
* @param table - The generic table data to display.
|
|
735
|
+
*/
|
|
469
736
|
showDetailedTable(table: Models.GenericTable): void;
|
|
470
737
|
|
|
738
|
+
/**
|
|
739
|
+
* Shows position details in a modal.
|
|
740
|
+
* @param position - The position data to display.
|
|
741
|
+
* @param row - Optional table row data.
|
|
742
|
+
* @param header - Optional table header data.
|
|
743
|
+
* @param handleTableAction - Optional callback for table actions.
|
|
744
|
+
*/
|
|
471
745
|
showPositionDetail(
|
|
472
746
|
position: Models.Position,
|
|
473
747
|
row?: TableRow,
|
|
@@ -475,13 +749,32 @@ export declare interface ModalService {
|
|
|
475
749
|
handleTableAction?: (actionId: string, rowId: string) => void
|
|
476
750
|
): void;
|
|
477
751
|
|
|
752
|
+
/**
|
|
753
|
+
* Shows a login form modal for a specific broker.
|
|
754
|
+
* @param brokerName - The name of the broker.
|
|
755
|
+
* @param returnToUrl - The URL to return to after login.
|
|
756
|
+
* @param redirect - Optional callback for handling redirects.
|
|
757
|
+
*/
|
|
478
758
|
showLoginForm(brokerName: any, returnToUrl: string, redirect: (redirecTo: string) => void): void;
|
|
479
759
|
|
|
760
|
+
/**
|
|
761
|
+
* Shows a toast notification.
|
|
762
|
+
* @param opts - Options for the toast notification.
|
|
763
|
+
*/
|
|
480
764
|
showToast(opts: ToastOptions): void;
|
|
481
765
|
}
|
|
482
766
|
|
|
767
|
+
/**
|
|
768
|
+
* Callback function for opening external links, allowing customization of link opening behavior.
|
|
769
|
+
* @param url - The URL to open.
|
|
770
|
+
* @param target - Optional target attribute for the link (e.g., '_blank').
|
|
771
|
+
* @param windowfeatures - Optional window features for new windows.
|
|
772
|
+
*/
|
|
483
773
|
export declare type openExternalLinkCallback = (url: string, target?: string, windowfeatures?: string) => void;
|
|
484
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Direction for table column sorting.
|
|
777
|
+
*/
|
|
485
778
|
export declare type OrderDirection = 'asc' | 'desc';
|
|
486
779
|
|
|
487
780
|
export declare type OrderFlowParameters = {
|
|
@@ -504,6 +797,9 @@ export declare type OrderFlowParameters = {
|
|
|
504
797
|
};
|
|
505
798
|
|
|
506
799
|
export declare type OrderFormConfig = {
|
|
800
|
+
/**
|
|
801
|
+
* ID of the portfolio to place the order in.
|
|
802
|
+
*/
|
|
507
803
|
portfolioId: string;
|
|
508
804
|
/**
|
|
509
805
|
* The ISIN to show the OrderForm.
|
|
@@ -589,34 +885,77 @@ export declare type OrderFormInitialOrder = Partial<
|
|
|
589
885
|
>;
|
|
590
886
|
|
|
591
887
|
export declare type OrderReceiptConfig = {
|
|
888
|
+
/**
|
|
889
|
+
* Optional ID of the order for the receipt.
|
|
890
|
+
*/
|
|
592
891
|
orderId?: string;
|
|
892
|
+
/**
|
|
893
|
+
* Optional order data for the receipt.
|
|
894
|
+
*/
|
|
593
895
|
orderData?: ReceiptData;
|
|
594
896
|
/**
|
|
595
897
|
* `true` if the receipt is shown in response to an order creation.
|
|
596
898
|
*/
|
|
597
899
|
isOrderConfirmation?: boolean;
|
|
900
|
+
/**
|
|
901
|
+
* Optional callback for navigation events.
|
|
902
|
+
* @param linkTarget - The navigation target.
|
|
903
|
+
*/
|
|
598
904
|
onNavigate?: (linkTarget: LinkTarget) => void;
|
|
599
905
|
} & BrokerizeBaseConfig;
|
|
600
906
|
|
|
601
907
|
export declare type OrderTableConfig = {
|
|
908
|
+
/**
|
|
909
|
+
* ID of the portfolio to display orders for.
|
|
910
|
+
*/
|
|
602
911
|
portfolioId: string;
|
|
603
912
|
|
|
913
|
+
/**
|
|
914
|
+
* Callback triggered when user wants to edit an order.
|
|
915
|
+
* @param params - Object containing the order ID.
|
|
916
|
+
*/
|
|
604
917
|
onEditOrder: ({ orderId }: { orderId: string }) => void;
|
|
918
|
+
/**
|
|
919
|
+
* Callback triggered when user wants to cancel an order.
|
|
920
|
+
* @param params - Object containing the order ID.
|
|
921
|
+
*/
|
|
605
922
|
onCancelOrder: ({ orderId }: { orderId: string }) => void;
|
|
923
|
+
/**
|
|
924
|
+
* Callback triggered when user wants to view order receipt.
|
|
925
|
+
* @param params - Object containing the order ID.
|
|
926
|
+
*/
|
|
606
927
|
onShowReceipt: ({ orderId }: { orderId: string }) => void;
|
|
607
928
|
} & BrokerizeBaseConfig;
|
|
608
929
|
|
|
609
930
|
export declare type OverviewConfig = BrokerizeBaseConfig & {
|
|
931
|
+
/**
|
|
932
|
+
* Callback triggered when user navigates to a specific portfolio.
|
|
933
|
+
* @param portfolio - The portfolio object the user navigated to.
|
|
934
|
+
*/
|
|
610
935
|
onNavigate: (portfolio: Models.Portfolio) => void;
|
|
936
|
+
/**
|
|
937
|
+
* Callback triggered when user initiates login to a broker.
|
|
938
|
+
* @param data - Object containing the broker name.
|
|
939
|
+
*/
|
|
611
940
|
onLogin: (data: { brokerName: string }) => void;
|
|
612
941
|
};
|
|
613
942
|
|
|
614
943
|
export declare type PortfolioTableConfig = {
|
|
944
|
+
/**
|
|
945
|
+
* If true, inactive portfolios will be hidden from the table.
|
|
946
|
+
*/
|
|
615
947
|
hideInactivePortfolios?: boolean;
|
|
948
|
+
/**
|
|
949
|
+
* Callback triggered when user navigates to a specific portfolio.
|
|
950
|
+
* @param portfolio - The portfolio object the user navigated to.
|
|
951
|
+
*/
|
|
616
952
|
onNavigate: (portfolio: Models.Portfolio) => void;
|
|
617
953
|
} & BrokerizeBaseConfig;
|
|
618
954
|
|
|
619
955
|
export declare type PortfolioViewConfig = {
|
|
956
|
+
/**
|
|
957
|
+
* ID of the portfolio to display.
|
|
958
|
+
*/
|
|
620
959
|
portfolioId: string;
|
|
621
960
|
/**
|
|
622
961
|
* Set this to `true` to allow users select a different portfolio inside the widget.
|
|
@@ -627,24 +966,62 @@ export declare type PortfolioViewConfig = {
|
|
|
627
966
|
* Only available if allowChangePortfolio is true.
|
|
628
967
|
*/
|
|
629
968
|
onAddBrokerLogin?: () => void;
|
|
969
|
+
/**
|
|
970
|
+
* Callback for buy orders.
|
|
971
|
+
* @param opts - Object containing security, ISIN, and optional available size.
|
|
972
|
+
*/
|
|
630
973
|
onBuy: (opts: { security: Models.Security; isin: string; availableSize?: number }) => void;
|
|
974
|
+
/**
|
|
975
|
+
* Callback for sell orders.
|
|
976
|
+
* @param opts - Object containing security, ISIN, and available size.
|
|
977
|
+
*/
|
|
631
978
|
onSell: (opts: { security: Models.Security; isin: string; availableSize: number }) => void;
|
|
979
|
+
/**
|
|
980
|
+
* Callback for cancelling orders.
|
|
981
|
+
* @param opts - Object containing the order ID.
|
|
982
|
+
*/
|
|
632
983
|
onCancelOrder: (opts: { orderId: string }) => void;
|
|
984
|
+
/**
|
|
985
|
+
* Callback for changing orders.
|
|
986
|
+
* @param opts - Object containing the order ID.
|
|
987
|
+
*/
|
|
633
988
|
onChangeOrder: (opts: { orderId: string }) => void;
|
|
989
|
+
/**
|
|
990
|
+
* Callback for showing order receipts.
|
|
991
|
+
* @param opts - Object containing the order ID.
|
|
992
|
+
*/
|
|
634
993
|
onShowReceipt: (opts: { orderId: string }) => void;
|
|
635
994
|
} & BrokerizeBaseConfig;
|
|
636
995
|
|
|
637
996
|
export declare type PositionsTableConfig = {
|
|
997
|
+
/**
|
|
998
|
+
* ID of the portfolio to display positions for.
|
|
999
|
+
*/
|
|
638
1000
|
portfolioId: string;
|
|
639
1001
|
|
|
1002
|
+
/**
|
|
1003
|
+
* Callback triggered when user wants to trade an instrument.
|
|
1004
|
+
* @param opts - Object containing security, ISIN, and trade direction.
|
|
1005
|
+
*/
|
|
640
1006
|
onTradeInstrument: (opts: { security: Models.Security; isin: string; direction: Models.Direction }) => void;
|
|
641
1007
|
} & BrokerizeBaseConfig;
|
|
642
1008
|
|
|
643
1009
|
export declare type ReceiptData = {
|
|
1010
|
+
/**
|
|
1011
|
+
* The order data for the receipt.
|
|
1012
|
+
*/
|
|
644
1013
|
order: Models.Order;
|
|
1014
|
+
/**
|
|
1015
|
+
* The portfolio data for the receipt.
|
|
1016
|
+
*/
|
|
645
1017
|
portfolio: Models.Portfolio;
|
|
646
1018
|
};
|
|
647
1019
|
|
|
1020
|
+
/**
|
|
1021
|
+
* Callback function to save a downloaded file.
|
|
1022
|
+
* @param download - The downloaded file to save.
|
|
1023
|
+
* @returns A promise that resolves when the file is saved.
|
|
1024
|
+
*/
|
|
648
1025
|
export declare type SaveDownloadedFile = (download: DownloadedFile) => Promise<void>;
|
|
649
1026
|
|
|
650
1027
|
export declare type SecurityQuote = {
|
|
@@ -695,6 +1072,9 @@ export declare type SecurityQuoteSubscription = { unsubscribe: () => void };
|
|
|
695
1072
|
export declare type SessionsTableConfig = BrokerizeBaseConfig;
|
|
696
1073
|
|
|
697
1074
|
export declare type SessionTanFormConfig = {
|
|
1075
|
+
/**
|
|
1076
|
+
* ID of the session requiring TAN authentication.
|
|
1077
|
+
*/
|
|
698
1078
|
sessionId: string;
|
|
699
1079
|
/**
|
|
700
1080
|
* Called when the SessionTanForm is ended.
|
|
@@ -704,27 +1084,58 @@ export declare type SessionTanFormConfig = {
|
|
|
704
1084
|
onExit: (details: { enabled: boolean }) => void;
|
|
705
1085
|
} & BrokerizeBaseConfig;
|
|
706
1086
|
|
|
1087
|
+
/**
|
|
1088
|
+
* Callback function to display a toast notification.
|
|
1089
|
+
* @param opts - Options for the toast notification.
|
|
1090
|
+
*/
|
|
707
1091
|
export declare type ShowToast = (opts: ToastOptions) => void;
|
|
708
1092
|
|
|
709
1093
|
export declare type StylingUIExampleConfig = {
|
|
1094
|
+
/**
|
|
1095
|
+
* Theme configuration for the styling example.
|
|
1096
|
+
*/
|
|
710
1097
|
theme: Theme;
|
|
1098
|
+
/**
|
|
1099
|
+
* DOM element where the styling example should be rendered.
|
|
1100
|
+
*/
|
|
711
1101
|
renderTo: HTMLElement;
|
|
712
1102
|
};
|
|
713
1103
|
|
|
714
1104
|
export declare type SupportLink = {
|
|
1105
|
+
/**
|
|
1106
|
+
* Email subject line for support requests.
|
|
1107
|
+
*/
|
|
715
1108
|
emailSubject: string;
|
|
716
1109
|
};
|
|
717
1110
|
|
|
1111
|
+
/**
|
|
1112
|
+
* Array of table rows representing the data for a table.
|
|
1113
|
+
*/
|
|
718
1114
|
export declare type TableData = TableRow[];
|
|
719
1115
|
|
|
720
1116
|
export declare type TableOrder = {
|
|
1117
|
+
/**
|
|
1118
|
+
* Field name to sort by.
|
|
1119
|
+
*/
|
|
721
1120
|
field: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* Sort direction ('asc' or 'desc').
|
|
1123
|
+
*/
|
|
722
1124
|
direction: OrderDirection;
|
|
723
1125
|
};
|
|
724
1126
|
|
|
725
1127
|
export declare type TableRow = {
|
|
1128
|
+
/**
|
|
1129
|
+
* Unique identifier for the table row.
|
|
1130
|
+
*/
|
|
726
1131
|
id: string;
|
|
1132
|
+
/**
|
|
1133
|
+
* Map of column IDs to cell values.
|
|
1134
|
+
*/
|
|
727
1135
|
map: Record<string, DataCellValue>;
|
|
1136
|
+
/**
|
|
1137
|
+
* Whether the row should be displayed with reduced opacity.
|
|
1138
|
+
*/
|
|
728
1139
|
showFaded?: boolean;
|
|
729
1140
|
};
|
|
730
1141
|
|
|
@@ -734,11 +1145,25 @@ export declare type TableRowAction = {
|
|
|
734
1145
|
};
|
|
735
1146
|
|
|
736
1147
|
export declare type Theme = {
|
|
1148
|
+
/**
|
|
1149
|
+
* Layout mode for the theme ('block' or 'columns').
|
|
1150
|
+
*/
|
|
737
1151
|
layout: 'block' | 'columns';
|
|
1152
|
+
/**
|
|
1153
|
+
* CSS custom property tokens for styling.
|
|
1154
|
+
*/
|
|
738
1155
|
tokens: ThemeTokens;
|
|
1156
|
+
/**
|
|
1157
|
+
* Logo style variant ('dark' or 'light').
|
|
1158
|
+
*/
|
|
739
1159
|
logoStyle: 'dark' | 'light';
|
|
740
1160
|
};
|
|
741
1161
|
|
|
1162
|
+
/**
|
|
1163
|
+
* Theme tokens define CSS custom properties for styling brokerize elements.
|
|
1164
|
+
* These tokens control colors, spacing, typography, and other visual aspects.
|
|
1165
|
+
* All properties are optional and will fall back to default values if not provided.
|
|
1166
|
+
*/
|
|
742
1167
|
export declare type ThemeTokens = {
|
|
743
1168
|
'zl-app-background-color'?: string;
|
|
744
1169
|
'zl-app-background-image'?: string;
|
|
@@ -1172,7 +1597,13 @@ export declare type ThemeTokens = {
|
|
|
1172
1597
|
};
|
|
1173
1598
|
|
|
1174
1599
|
declare type ToastOptions = {
|
|
1600
|
+
/**
|
|
1601
|
+
* The message to display in the toast notification.
|
|
1602
|
+
*/
|
|
1175
1603
|
message: string;
|
|
1604
|
+
/**
|
|
1605
|
+
* The style of the toast: info, error, or success.
|
|
1606
|
+
*/
|
|
1176
1607
|
style: 'info' | 'error' | 'success';
|
|
1177
1608
|
};
|
|
1178
1609
|
|