mdas-jsview-sdk 1.0.13-uat.0 → 1.0.14-uat.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/mdas-sdk.js CHANGED
@@ -4043,9 +4043,11 @@
4043
4043
  } else {
4044
4044
  return 'BlueOcean 20 mins delayed';
4045
4045
  }
4046
- } else if (this.source.toLowerCase().includes('bruce') || this.source.toLowerCase().includes('blueocean')) {
4046
+ } else if (this.source.toLowerCase().includes('bruce') || this.source.toLowerCase().includes('blueocean') || this.source.toLowerCase().includes('onbbo')) {
4047
4047
  if (this.source.toLowerCase() === 'bruce') {
4048
4048
  return 'Bruce Real-time';
4049
+ } else if (this.source.toLowerCase() === 'onbbo') {
4050
+ return 'ONBBO Real-time';
4049
4051
  } else {
4050
4052
  return 'BlueOcean Real-time';
4051
4053
  }
@@ -4081,8 +4083,8 @@
4081
4083
  if (!options.wsManager) {
4082
4084
  throw new Error('WebSocketManager is required for NightSessionWidget');
4083
4085
  }
4084
- if (!options.source || options.source.toLowerCase() !== 'blueocean' && options.source.toLowerCase() !== 'bruce') {
4085
- throw new Error('Source should be either "blueocean" or "bruce"');
4086
+ if (!options.source || options.source.toLowerCase() !== 'blueocean' && options.source.toLowerCase() !== 'bruce' && options.source.toLowerCase() !== 'onbbo') {
4087
+ throw new Error('Source should be either "blueocean", "bruce", or "onbbo"');
4086
4088
  }
4087
4089
  this.type = 'nightsession ' + options.source;
4088
4090
 
@@ -4302,7 +4304,14 @@
4302
4304
  }
4303
4305
  }
4304
4306
  subscribeToData() {
4305
- const subscriptionType = this.source === 'bruce' ? 'querybrucel1' : 'queryblueoceanl1';
4307
+ let subscriptionType;
4308
+ if (this.source === 'bruce') {
4309
+ subscriptionType = 'querybrucel1';
4310
+ } else if (this.source === 'onbbo') {
4311
+ subscriptionType = 'queryonbbol1';
4312
+ } else {
4313
+ subscriptionType = 'queryblueoceanl1';
4314
+ }
4306
4315
 
4307
4316
  // Subscribe with symbol for routing
4308
4317
  this.unsubscribe = this.wsManager.subscribe(this.widgetId, [subscriptionType], this.handleMessage.bind(this), this.symbol // Pass symbol for routing
@@ -4416,9 +4425,12 @@
4416
4425
  }
4417
4426
  }
4418
4427
  // Handle wrapped format
4419
- else if (message.type === 'queryblueoceanl1' || message.type === 'querybrucel1') {
4428
+ else if (message.type === 'queryblueoceanl1' || message.type === 'querybrucel1' || message.type === 'queryonbbol1') {
4420
4429
  if (message['0']?.Symbol === this.symbol) {
4421
- if (message['0'].NotFound === true || !message['0'].MarketName || message['0'].MarketName !== 'BLUE') {
4430
+ // For onbbo source, skip MarketName check
4431
+ const isOnbbo = message.type === 'queryonbbol1';
4432
+ const shouldShowNoData = message['0'].NotFound === true || !isOnbbo && (!message['0'].MarketName || message['0'].MarketName !== 'BLUE');
4433
+ if (shouldShowNoData) {
4422
4434
  // Only show no data state if we don't have cached data
4423
4435
  if (!this.data) {
4424
4436
  this.showNoDataState(message['0']);