@trudb/tru-common-lib 0.0.493 → 0.0.495
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/esm2020/lib/classes/tru-data-change-parser.mjs +278 -0
- package/esm2020/lib/classes/tru-data-change.mjs +7 -0
- package/esm2020/lib/components/data-grid/tru-data-grid.mjs +16 -11
- package/esm2020/lib/services/tru-connection-hub.mjs +21 -13
- package/esm2020/lib/services/tru-model-property-lookup.mjs +1 -1
- package/fesm2015/trudb-tru-common-lib.mjs +353 -61
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +352 -61
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/classes/tru-data-change-parser.d.ts +32 -0
- package/lib/classes/tru-data-change.d.ts +4 -0
- package/lib/components/data-grid/tru-data-grid.d.ts +3 -1
- package/lib/services/tru-connection-hub.d.ts +10 -1
- package/lib/services/tru-model-property-lookup.d.ts +3 -2
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TruModelPropertyLookup } from "../services/tru-model-property-lookup";
|
|
2
|
+
import { Subject } from "rxjs";
|
|
3
|
+
import { TruDataChange } from "./tru-data-change";
|
|
4
|
+
import { TruDataContext } from "../services/tru-data-context";
|
|
5
|
+
export declare class TruDataChangeParser {
|
|
6
|
+
private dataContext;
|
|
7
|
+
private tableName;
|
|
8
|
+
private getLatestResults;
|
|
9
|
+
private getLatestQuery;
|
|
10
|
+
private contextFilters;
|
|
11
|
+
private expandPaths;
|
|
12
|
+
private isLoaded;
|
|
13
|
+
private types;
|
|
14
|
+
private globalDataContext;
|
|
15
|
+
private waitingEntities;
|
|
16
|
+
private dataChanged$;
|
|
17
|
+
onDataChanged(): Subject<TruDataChange>;
|
|
18
|
+
dataChanged(change: TruDataChange): void;
|
|
19
|
+
constructor(connection: any, dataContext: TruDataContext, tableName: string, getLatestResults: any, getLatestQuery: any, contextFilters: [], expandPaths: Array<string>, isLoaded: () => boolean, modelPropertyLookup: TruModelPropertyLookup);
|
|
20
|
+
findEntityInCache: (change: any) => any;
|
|
21
|
+
findEntityInGlobalCache: (change: any) => any;
|
|
22
|
+
checkIfDateTime: (newValue: any, currentValue: any, typeName: string | undefined) => any;
|
|
23
|
+
hasPropertyAlreadyBeenModified: (propertyName: string, entity: any) => any;
|
|
24
|
+
applyPropertyChanges: (change: any, entity: any) => void;
|
|
25
|
+
setWaitingEntitiesToUnchanged: () => void;
|
|
26
|
+
entityFoundByQuery: (change: any) => any;
|
|
27
|
+
getEntityFromCache: (change: any) => any;
|
|
28
|
+
getEntityFromServer: (change: any) => any;
|
|
29
|
+
getEntityFromResults: (results: any, change: any) => any;
|
|
30
|
+
isSaving: () => Promise<unknown>;
|
|
31
|
+
update: (payload: any) => Promise<void>;
|
|
32
|
+
}
|
|
@@ -7,6 +7,7 @@ import { ITruDataGridConfig } from './classes/tru-data-grid-config';
|
|
|
7
7
|
import { TruDataGridTypes } from './enums/tru-data-grid-types';
|
|
8
8
|
import { ITruToolbarDropdownOption } from '../toolbar/classes/tru-toolbar-dropdown-option';
|
|
9
9
|
import { TruSearchResultViewManager } from '../../services/tru-search-result-view-manager';
|
|
10
|
+
import { TruConnectionHub } from '../../services/tru-connection-hub';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class TruDataGrid implements OnInit, OnChanges, AfterViewInit {
|
|
12
13
|
private dataContext;
|
|
@@ -14,6 +15,7 @@ export declare class TruDataGrid implements OnInit, OnChanges, AfterViewInit {
|
|
|
14
15
|
private appEnvironment;
|
|
15
16
|
private searchViewEventHandler;
|
|
16
17
|
private uiNotification;
|
|
18
|
+
private connectionHub;
|
|
17
19
|
config: ITruDataGridConfig;
|
|
18
20
|
entity: any;
|
|
19
21
|
name: any;
|
|
@@ -32,7 +34,7 @@ export declare class TruDataGrid implements OnInit, OnChanges, AfterViewInit {
|
|
|
32
34
|
latestSetupQuery: any;
|
|
33
35
|
gridOptions: any;
|
|
34
36
|
parentToolbarTemplate: TemplateRef<any> | null;
|
|
35
|
-
constructor(dataContext: TruDataContext, searchResultViewManager: TruSearchResultViewManager, appEnvironment: TruAppEnvironment, searchViewEventHandler: TruSearchViewEventHandler, uiNotification: TruUiNotification);
|
|
37
|
+
constructor(dataContext: TruDataContext, searchResultViewManager: TruSearchResultViewManager, appEnvironment: TruAppEnvironment, searchViewEventHandler: TruSearchViewEventHandler, uiNotification: TruUiNotification, connectionHub: TruConnectionHub);
|
|
36
38
|
private enhanceRowDataForEntity;
|
|
37
39
|
private setNoRowsTemplate;
|
|
38
40
|
private subscribeTo;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { TruDataChange } from '../classes/tru-data-change';
|
|
3
|
+
import { TruAppEnvironment } from './tru-app-environment';
|
|
4
|
+
import { TruDataContext } from './tru-data-context';
|
|
5
|
+
import { TruModelPropertyLookup } from './tru-model-property-lookup';
|
|
1
6
|
import * as i0 from "@angular/core";
|
|
2
7
|
export declare class TruConnectionHub {
|
|
3
|
-
|
|
8
|
+
private appEnvironment;
|
|
9
|
+
private modelPropertyLookup;
|
|
10
|
+
private connection;
|
|
11
|
+
constructor(appEnvironment: TruAppEnvironment, modelPropertyLookup: TruModelPropertyLookup);
|
|
4
12
|
start: () => void;
|
|
13
|
+
subscribe: (dataContext: TruDataContext, tableName: string, getLatestResults: () => any, getLatestQuery: () => any, contextFilters: [], expandPaths: Array<string>, isLoaded: () => boolean) => Subject<TruDataChange>;
|
|
5
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<TruConnectionHub, never>;
|
|
6
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<TruConnectionHub>;
|
|
7
16
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { TruPropertyConfigBase } from "../base-classes/tru-property-config-base";
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class TruModelPropertyLookup {
|
|
3
4
|
private _lookup;
|
|
4
5
|
constructor();
|
|
5
|
-
get lookup(): Map<string,
|
|
6
|
-
set lookup(value: Map<string,
|
|
6
|
+
get lookup(): Map<string, TruPropertyConfigBase>;
|
|
7
|
+
set lookup(value: Map<string, TruPropertyConfigBase>);
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<TruModelPropertyLookup, never>;
|
|
8
9
|
static ɵprov: i0.ɵɵInjectableDeclaration<TruModelPropertyLookup>;
|
|
9
10
|
}
|