@sunbird-cb/utils-v2 0.0.21 → 0.0.22

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.
@@ -1958,6 +1958,7 @@ var EventService = (function () {
1958
1958
  this.utilitySvc = utilitySvc;
1959
1959
  this.todaysEvents = [];
1960
1960
  this.todaysLiveEvents = [];
1961
+ this.keySpeakerEvents = [];
1961
1962
  this.eventsSubject = new Subject();
1962
1963
  this.events$ = this.eventsSubject.asObservable();
1963
1964
  this.eventsChatbotSubject = new Subject();
@@ -2107,6 +2108,7 @@ var EventService = (function () {
2107
2108
  if (eventObj !== undefined) {
2108
2109
  this.todaysEvents = [];
2109
2110
  this.todaysLiveEvents = [];
2111
+ this.keySpeakerEvents = [];
2110
2112
  var data_1 = eventObj;
2111
2113
  var isEventLive_1 = false;
2112
2114
  var isEventRecording_1 = false;
@@ -2188,8 +2190,10 @@ var EventService = (function () {
2188
2190
  if (isToday && isEventLive_1) {
2189
2191
  _this.todaysLiveEvents.push(eventDataObj);
2190
2192
  }
2193
+ _this.keySpeakerEvents.push(eventDataObj);
2191
2194
  }));
2192
2195
  this.todaysLiveEvents = this.sortItemByTime(this.todaysLiveEvents);
2196
+ this.keySpeakerEvents = this.getKeySpeakerEvents(this.keySpeakerEvents);
2193
2197
  this.todaysEvents = this.getTodaysEvents(this.todaysEvents);
2194
2198
  }
2195
2199
  };
@@ -2206,6 +2210,19 @@ var EventService = (function () {
2206
2210
  this.todaysEvents = __spread(liveEvents, futureEvents, pastEvents);
2207
2211
  return this.todaysEvents;
2208
2212
  };
2213
+ EventService.prototype.getKeySpeakerEvents = function (eventData) {
2214
+ var liveEvents = [];
2215
+ var pastEvents = [];
2216
+ var futureEvents = [];
2217
+ liveEvents = this.todaysLiveEvents;
2218
+ pastEvents = eventData.filter((function (pastEvent) { return pastEvent.isEventPast; }));
2219
+ futureEvents = eventData.filter((function (futureEvent) { return futureEvent.isEventFuture; }));
2220
+ liveEvents = this.sortItemByTimeAsc(liveEvents);
2221
+ futureEvents = this.sortItemByTimeAsc(futureEvents);
2222
+ pastEvents = this.sortItemByTime(pastEvents);
2223
+ this.keySpeakerEvents = __spread(liveEvents, futureEvents, pastEvents);
2224
+ return this.keySpeakerEvents;
2225
+ };
2209
2226
  EventService.decorators = [
2210
2227
  { type: Injectable, args: [{
2211
2228
  providedIn: 'root',
@@ -2221,6 +2238,7 @@ var EventService = (function () {
2221
2238
  if (false) {
2222
2239
  EventService.prototype.todaysEvents;
2223
2240
  EventService.prototype.todaysLiveEvents;
2241
+ EventService.prototype.keySpeakerEvents;
2224
2242
  EventService.prototype.eventsSubject;
2225
2243
  EventService.prototype.events$;
2226
2244
  EventService.prototype.eventsChatbotSubject;