@trudb/tru-common-lib 0.0.513 → 0.0.514

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Directive, Input, Injectable, Component, Inject, HostListener, NgModule, EventEmitter, ViewEncapsulation, Output, APP_INITIALIZER, InjectionToken } from '@angular/core';
3
3
  import { EntityAspect, MetadataStore, EntityManager, DataService, EntityQuery, Predicate, FetchStrategy, EntityState, BinaryPredicate, AndOrPredicate, breeze } from 'breeze-client';
4
- import { BehaviorSubject, defer, from, of, Observable, Subject, skip, forkJoin, throwError } from 'rxjs';
4
+ import { BehaviorSubject, defer, from, of, Subject, Observable, skip, forkJoin, throwError } from 'rxjs';
5
5
  import * as _ from 'underscore';
6
6
  import * as i1$2 from '@angular/common/http';
7
7
  import { HttpClientModule, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
@@ -852,6 +852,7 @@ class TruDataContext {
852
852
  this.appEnvironment = appEnvironment;
853
853
  this.entityAccessor = entityAccessor;
854
854
  this.uiNotification = uiNotification;
855
+ this._dataChanged$ = new Subject();
855
856
  this._pendingDeleteEntities = [];
856
857
  this._pendingCascadeDeleteEntities = [];
857
858
  this.validationChangeDetection = new Observable((observer) => {
@@ -1044,6 +1045,12 @@ class TruDataContext {
1044
1045
  this._breezeContext = this.breezeContextFactory.createContext();
1045
1046
  this.entityAccessor.context = this;
1046
1047
  }
1048
+ onDataChanged() {
1049
+ return this._dataChanged$;
1050
+ }
1051
+ dataChanged(change) {
1052
+ this._dataChanged$.next(change);
1053
+ }
1047
1054
  get breezeContext() {
1048
1055
  return this._breezeContext;
1049
1056
  }
@@ -2308,6 +2315,7 @@ class TruDataChangeParser {
2308
2315
  dataChangeArgs.dataChanges = payload;
2309
2316
  dataChangeArgs.reload = reloadResults;
2310
2317
  this.dataChanged(dataChangeArgs);
2318
+ this.dataContext.dataChanged(dataChangeArgs);
2311
2319
  };
2312
2320
  this.dataContext = dataContext;
2313
2321
  this.globalDataContext = globalDataContext;