@trudb/tru-common-lib 0.2.505 → 0.2.507
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.
|
@@ -8185,7 +8185,7 @@ class TruDataChangeParser {
|
|
|
8185
8185
|
this.addEntity = null;
|
|
8186
8186
|
this.getLatestResults = null;
|
|
8187
8187
|
}
|
|
8188
|
-
constructor(connection, appEnviroment, user, dataContext, globalDataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, modelTypeLookup, modelPropertyLookup) {
|
|
8188
|
+
constructor(connection, appEnviroment, user, dataContext, globalDataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, modelTypeLookup, modelPropertyLookup, destroyParser = null) {
|
|
8189
8189
|
this.appEnvionment = appEnviroment;
|
|
8190
8190
|
this.user = user;
|
|
8191
8191
|
this.dataContext = dataContext;
|
|
@@ -8203,6 +8203,7 @@ class TruDataChangeParser {
|
|
|
8203
8203
|
connection.on("change", (payload) => {
|
|
8204
8204
|
this.update(payload);
|
|
8205
8205
|
});
|
|
8206
|
+
destroyParser = this.destroy;
|
|
8206
8207
|
}
|
|
8207
8208
|
findEntityInCache = (change) => {
|
|
8208
8209
|
var entityAccessor = this.dataContext?.entityAccess();
|
|
@@ -8485,13 +8486,10 @@ class TruConnectionHub {
|
|
|
8485
8486
|
});
|
|
8486
8487
|
this.connect();
|
|
8487
8488
|
};
|
|
8488
|
-
subscribe = (dataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded) => {
|
|
8489
|
-
this.parser = new TruDataChangeParser(this.connection, this.appEnvironment, this.user, dataContext, this.appEnvironment.globalDataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, this.modelTypeLookup, this.modelPropertyLookup);
|
|
8489
|
+
subscribe = (dataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, destroyParser = null) => {
|
|
8490
|
+
this.parser = new TruDataChangeParser(this.connection, this.appEnvironment, this.user, dataContext, this.appEnvironment.globalDataContext, entity, tableName, addEntity, getLatestResults, getLatestQuery, contextFilters, expandPaths, isLoaded, this.modelTypeLookup, this.modelPropertyLookup, destroyParser);
|
|
8490
8491
|
return this.parser.onDataChanged();
|
|
8491
8492
|
};
|
|
8492
|
-
destroy = () => {
|
|
8493
|
-
this.parser.destroy();
|
|
8494
|
-
};
|
|
8495
8493
|
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 });
|
|
8496
8494
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruConnectionHub, providedIn: 'root' });
|
|
8497
8495
|
}
|