@orderly.network/ui-tradingview 2.9.0 → 2.9.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/dist/index.js CHANGED
@@ -3920,7 +3920,8 @@ var Widget = class {
3920
3920
  host
3921
3921
  );
3922
3922
  return this._broker;
3923
- } : void 0
3923
+ } : void 0,
3924
+ custom_indicators_getter: options.customIndicatorsGetter
3924
3925
  };
3925
3926
  this._datafeed = options.datafeed;
3926
3927
  if (chartKey) {
@@ -3932,8 +3933,17 @@ var Widget = class {
3932
3933
  );
3933
3934
  this._adapterSetting = adapterSetting;
3934
3935
  this._savedData = savedData;
3936
+ const mergedOptions = getOptions(
3937
+ widgetOptions,
3938
+ mode,
3939
+ enabled_features,
3940
+ disabled_features
3941
+ );
3935
3942
  this._instance = new TradingView.widget({
3936
- ...getOptions(widgetOptions, mode, enabled_features, disabled_features),
3943
+ ...mergedOptions,
3944
+ ...options.customIndicatorsGetter != null && {
3945
+ custom_indicators_getter: options.customIndicatorsGetter
3946
+ },
3937
3947
  interval: adapterSetting["chart.lastUsedTimeBasedResolution"] ?? widgetOptions.interval,
3938
3948
  saved_data: savedData,
3939
3949
  settings_adapter: {
@@ -3981,7 +3991,8 @@ function useTradingviewScript(props) {
3981
3991
  locale = defaultLocale,
3982
3992
  classNames,
3983
3993
  enabled_features,
3984
- disabled_features
3994
+ disabled_features,
3995
+ customIndicatorsGetter
3985
3996
  } = props;
3986
3997
  const localeCode = i18n.useLocaleCode();
3987
3998
  const chart = React3.useRef(null);
@@ -4205,8 +4216,8 @@ function useTradingviewScript(props) {
4205
4216
  getBroker: (instance, host) => {
4206
4217
  brokerHostHandler(instance, host);
4207
4218
  return getBrokerAdapter_default(host, broker);
4208
- }
4209
- // getBroker: undefined,
4219
+ },
4220
+ customIndicatorsGetter
4210
4221
  };
4211
4222
  const chartProps = {
4212
4223
  options,
@@ -4232,7 +4243,8 @@ function useTradingviewScript(props) {
4232
4243
  tradingViewScriptSrc,
4233
4244
  colorConfig,
4234
4245
  locale,
4235
- localeCode
4246
+ localeCode,
4247
+ customIndicatorsGetter
4236
4248
  ]);
4237
4249
  React3.useEffect(() => {
4238
4250
  ws.on(