@trudb/tru-common-lib 0.2.460 → 0.2.461
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.
|
@@ -7483,6 +7483,7 @@ class TruMergeData {
|
|
|
7483
7483
|
|
|
7484
7484
|
class TruDataChangeParser {
|
|
7485
7485
|
appEnvionment;
|
|
7486
|
+
user;
|
|
7486
7487
|
dataContext;
|
|
7487
7488
|
entity;
|
|
7488
7489
|
tableName;
|
|
@@ -7503,8 +7504,9 @@ class TruDataChangeParser {
|
|
|
7503
7504
|
dataChanged(change) {
|
|
7504
7505
|
this.dataChanged$.next(change);
|
|
7505
7506
|
}
|
|
7506
|
-
constructor(connection, appEnviroment, dataContext, globalDataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, modelTypeLookup, modelPropertyLookup) {
|
|
7507
|
+
constructor(connection, appEnviroment, user, dataContext, globalDataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, modelTypeLookup, modelPropertyLookup) {
|
|
7507
7508
|
this.appEnvionment = appEnviroment;
|
|
7509
|
+
this.user = user;
|
|
7508
7510
|
this.dataContext = dataContext;
|
|
7509
7511
|
this.globalDataContext = globalDataContext;
|
|
7510
7512
|
this.entity = entity;
|
|
@@ -7625,7 +7627,7 @@ class TruDataChangeParser {
|
|
|
7625
7627
|
update = async (payload) => {
|
|
7626
7628
|
await this.isSaving();
|
|
7627
7629
|
var reloadResults = false;
|
|
7628
|
-
payload.changes.forEach(async (change) => {
|
|
7630
|
+
payload.changes.filter((change) => { return change.modifiedRef !== this.user.activeUserRef; }).forEach(async (change) => {
|
|
7629
7631
|
var foundEntities = [];
|
|
7630
7632
|
var localEntity = this.findEntityInCache(change);
|
|
7631
7633
|
var globalEntity = this.findEntityInGlobalCache(change);
|
|
@@ -7758,12 +7760,14 @@ class TruDataChangeParser {
|
|
|
7758
7760
|
class TruConnectionHub {
|
|
7759
7761
|
dataContext;
|
|
7760
7762
|
appEnvironment;
|
|
7763
|
+
user;
|
|
7761
7764
|
modelTypeLookup;
|
|
7762
7765
|
modelPropertyLookup;
|
|
7763
7766
|
connection;
|
|
7764
|
-
constructor(dataContext, appEnvironment, modelTypeLookup, modelPropertyLookup) {
|
|
7767
|
+
constructor(dataContext, appEnvironment, user, modelTypeLookup, modelPropertyLookup) {
|
|
7765
7768
|
this.dataContext = dataContext;
|
|
7766
7769
|
this.appEnvironment = appEnvironment;
|
|
7770
|
+
this.user = user;
|
|
7767
7771
|
this.modelTypeLookup = modelTypeLookup;
|
|
7768
7772
|
this.modelPropertyLookup = modelPropertyLookup;
|
|
7769
7773
|
this.connection = new signalR.HubConnectionBuilder()
|
|
@@ -7797,9 +7801,9 @@ class TruConnectionHub {
|
|
|
7797
7801
|
this.connect();
|
|
7798
7802
|
};
|
|
7799
7803
|
subscribe = (dataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded) => {
|
|
7800
|
-
return new TruDataChangeParser(this.connection, this.appEnvironment, dataContext, this.appEnvironment.globalDataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, this.modelTypeLookup, this.modelPropertyLookup).onDataChanged();
|
|
7804
|
+
return new TruDataChangeParser(this.connection, this.appEnvironment, this.user, dataContext, this.appEnvironment.globalDataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, this.modelTypeLookup, this.modelPropertyLookup).onDataChanged();
|
|
7801
7805
|
};
|
|
7802
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruConnectionHub, deps: [{ token: TruDataContext }, { token: TruAppEnvironment }, { token: TruModelTypeLookup }, { token: TruModelPropertyLookup }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7806
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruConnectionHub, deps: [{ token: TruDataContext }, { token: TruAppEnvironment }, { token: TruUser }, { token: TruModelTypeLookup }, { token: TruModelPropertyLookup }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7803
7807
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruConnectionHub, providedIn: 'root' });
|
|
7804
7808
|
}
|
|
7805
7809
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruConnectionHub, decorators: [{
|
|
@@ -7807,7 +7811,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
7807
7811
|
args: [{
|
|
7808
7812
|
providedIn: 'root',
|
|
7809
7813
|
}]
|
|
7810
|
-
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruAppEnvironment }, { type: TruModelTypeLookup }, { type: TruModelPropertyLookup }] });
|
|
7814
|
+
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruAppEnvironment }, { type: TruUser }, { type: TruModelTypeLookup }, { type: TruModelPropertyLookup }] });
|
|
7811
7815
|
|
|
7812
7816
|
class TruTabGroupEventNotifier {
|
|
7813
7817
|
active$ = new BehaviorSubject(false);
|