@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.mjs CHANGED
@@ -3914,7 +3914,8 @@ var Widget = class {
3914
3914
  host
3915
3915
  );
3916
3916
  return this._broker;
3917
- } : void 0
3917
+ } : void 0,
3918
+ custom_indicators_getter: options.customIndicatorsGetter
3918
3919
  };
3919
3920
  this._datafeed = options.datafeed;
3920
3921
  if (chartKey) {
@@ -3926,8 +3927,17 @@ var Widget = class {
3926
3927
  );
3927
3928
  this._adapterSetting = adapterSetting;
3928
3929
  this._savedData = savedData;
3930
+ const mergedOptions = getOptions(
3931
+ widgetOptions,
3932
+ mode,
3933
+ enabled_features,
3934
+ disabled_features
3935
+ );
3929
3936
  this._instance = new TradingView.widget({
3930
- ...getOptions(widgetOptions, mode, enabled_features, disabled_features),
3937
+ ...mergedOptions,
3938
+ ...options.customIndicatorsGetter != null && {
3939
+ custom_indicators_getter: options.customIndicatorsGetter
3940
+ },
3931
3941
  interval: adapterSetting["chart.lastUsedTimeBasedResolution"] ?? widgetOptions.interval,
3932
3942
  saved_data: savedData,
3933
3943
  settings_adapter: {
@@ -3975,7 +3985,8 @@ function useTradingviewScript(props) {
3975
3985
  locale = defaultLocale,
3976
3986
  classNames,
3977
3987
  enabled_features,
3978
- disabled_features
3988
+ disabled_features,
3989
+ customIndicatorsGetter
3979
3990
  } = props;
3980
3991
  const localeCode = useLocaleCode();
3981
3992
  const chart = useRef(null);
@@ -4199,8 +4210,8 @@ function useTradingviewScript(props) {
4199
4210
  getBroker: (instance, host) => {
4200
4211
  brokerHostHandler(instance, host);
4201
4212
  return getBrokerAdapter_default(host, broker);
4202
- }
4203
- // getBroker: undefined,
4213
+ },
4214
+ customIndicatorsGetter
4204
4215
  };
4205
4216
  const chartProps = {
4206
4217
  options,
@@ -4226,7 +4237,8 @@ function useTradingviewScript(props) {
4226
4237
  tradingViewScriptSrc,
4227
4238
  colorConfig,
4228
4239
  locale,
4229
- localeCode
4240
+ localeCode,
4241
+ customIndicatorsGetter
4230
4242
  ]);
4231
4243
  useEffect(() => {
4232
4244
  ws.on(