@brokerize/elements 1.4.0 → 1.4.2

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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ # 1.4.1 (released 2025-09-08)
4
+
5
+ - `FIXED` In some environments, `crypto.randomUUID()` is not available. This was used for generating IDs in the previous version and is now replaced with `nanoid`
6
+
7
+ # 1.4.0 (released 2025-08-27)
8
+
9
+ - `ADDED` the new component `Overview` which can replace `BrokerList`, `PortfolioTable` and `SessionsTable` in most applications
10
+ - `ADDED` An improved version of the `BrokerizeMain` component, which encapsulates `Overview` , `PortfolioView` and `OrderForm`.
11
+
12
+ # 1.3.0 (released 2025-05-07)
13
+
14
+ - `ADDED` We have added the new function createCustomWebSocketClient to brokerize client, which allows customizing the WebSocke connection URL and token retrieval. The client can be passed to createAuthorizedContext so that the created client is used in all contexts (including brokerize elements components which rely on WebSockets).
15
+
16
+ # 1.2.1 (released 2025-05-01)
17
+
18
+ - `FIXED` an issue where a relative API basePath lead to wrong WebSocket connection URLs.
19
+
3
20
  # 1.2.0 (released 2025-04-24)
4
21
 
5
22
  - `ADDED` the option to pass a `reportingTag` for `createOrderForm`, `createChangeOrderForm` and `createCancelOrderForm`
package/README.md CHANGED
@@ -267,15 +267,16 @@ createBrokerizeMain({
267
267
 
268
268
  ### properties
269
269
 
270
- | Property | Description | optional |
271
- | :--------------- | -------------------------------------------------------------------------------------------------------------- | :------: |
272
- | apiCtx | Instance of `AuthorizedApiContext` from `@brokerize/client` | ❌ |
273
- | theme | You can use the <a href="https://app.brokerize.com/theming">brokerize theme designer</a> to build a theme JSON | &#9989; |
274
- | useNavigation | Show the default navigation bar on `BrokerizeMain` | &#9989; |
275
- | addFrame | Add a "powered by brokerize" frame to the component. Defaults to true. | &#9989; |
276
- | supportLink | Add a support link to the brokerize frame config, e.g. `{ emailSubject: 'Help needed for trading in XYZ app'}` | &#9989; |
277
- | openExternalLink | A function for handling links to external documents, e.g. cost estimations | &#9989; |
278
- | returnToUrl | URL to return to after login | &#9989; |
270
+ | Property | Description | optional |
271
+ | :------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
272
+ | apiCtx | Instance of `AuthorizedApiContext` from `@brokerize/client` | &#10060; |
273
+ | theme | You can use the <a href="https://app.brokerize.com/theming">brokerize theme designer</a> to build a theme JSON | &#9989; |
274
+ | useNavigation | Show the default navigation bar on `BrokerizeMain` | &#9989; |
275
+ | addFrame | Add a "powered by brokerize" frame to the component. Defaults to true. | &#9989; |
276
+ | supportLink | Add a support link to the brokerize frame config, e.g. `{ emailSubject: 'Help needed for trading in XYZ app'}` | &#9989; |
277
+ | openExternalLink | A function for handling links to external documents, e.g. cost estimations | &#9989; |
278
+ | returnToUrl | URL to return to after login | &#9989; |
279
+ | preferredExchangeId | One of the Exchange IDs as returned by the brokerize API's GetExchanges endpoint, will be set as the default exchange _if_ supported by the broker | &#9989; |
279
280
 
280
281
  ### events
281
282
 
package/dist/bundle.d.ts CHANGED
@@ -106,6 +106,11 @@ export declare type BrokerizeMainConfig = BrokerizeBaseConfig & {
106
106
  * If provided, OAuth broker logins will return to this URL. Defaults to window.location.href.
107
107
  */
108
108
  returnToUrl?: string;
109
+ /**
110
+ * Can be provided to pick a default exchange from the known brokerize exchanges.
111
+ * Note that it may be ignored depending on broker's preferences.
112
+ */
113
+ preferredExchangeId?: number;
109
114
  };
110
115
 
111
116
  export declare type BrokerizeMainElement = BrokerizeElement & {
@@ -586,6 +591,10 @@ export declare type OrderFormInitialOrder = Partial<
586
591
  export declare type OrderReceiptConfig = {
587
592
  orderId?: string;
588
593
  orderData?: ReceiptData;
594
+ /**
595
+ * `true` if the receipt is shown in response to an order creation.
596
+ */
597
+ isOrderConfirmation?: boolean;
589
598
  onNavigate?: (linkTarget: LinkTarget) => void;
590
599
  } & BrokerizeBaseConfig;
591
600
 
@@ -901,6 +910,8 @@ export declare type ThemeTokens = {
901
910
  'zl-font-weight-semibold'?: string;
902
911
  'zl-footer-color'?: string;
903
912
  'zl-footer-font-size'?: string;
913
+ 'zl-brokerlist-font-size'?: string;
914
+ 'zl-brokerlist-checkbox-font-size'?: string;
904
915
  'zl-form-item-background-color'?: string;
905
916
  'zl-form-item-border-radius'?: string;
906
917
  'zl-form-item-border'?: string;