@journeyapps-labs/reactor-mod-data-browser 3.1.0 → 3.1.2
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/CHANGELOG.md +12 -0
- package/dist/@types/core/query/AbstractQuery.d.ts +1 -0
- package/dist/@types/core/query/query-changed/ChangedModelQuery.d.ts +1 -0
- package/dist/@types/core/query/query-simple/SimpleQuery.d.ts +2 -1
- package/dist/@types/panels/query/QueryPanelFactory.d.ts +1 -0
- package/dist/core/query/AbstractQuery.js.map +1 -1
- package/dist/core/query/query-changed/ChangedModelQuery.js +7 -0
- package/dist/core/query/query-changed/ChangedModelQuery.js.map +1 -1
- package/dist/core/query/query-simple/SimpleQuery.js +7 -1
- package/dist/core/query/query-simple/SimpleQuery.js.map +1 -1
- package/dist/entities/ConnectionEntityDefinition.js +3 -2
- package/dist/entities/ConnectionEntityDefinition.js.map +1 -1
- package/dist/entities/SchemaModelDefinitionEntityDefinition.js +7 -1
- package/dist/entities/SchemaModelDefinitionEntityDefinition.js.map +1 -1
- package/dist/panels/query/QueryPanelFactory.js +3 -0
- package/dist/panels/query/QueryPanelFactory.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist-module/bundle.js +3 -3
- package/dist-module/bundle.js.map +1 -1
- package/package.json +3 -3
- package/src/core/query/AbstractQuery.ts +2 -0
- package/src/core/query/query-changed/ChangedModelQuery.ts +8 -0
- package/src/core/query/query-simple/SimpleQuery.tsx +9 -2
- package/src/entities/ConnectionEntityDefinition.tsx +3 -1
- package/src/entities/SchemaModelDefinitionEntityDefinition.ts +7 -1
- package/src/panels/query/QueryPanelFactory.tsx +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@journeyapps-labs/reactor-mod-data-browser",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "./dist/@types/index",
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@journeyapps-labs/common-sdk": "^1.0.3",
|
|
22
22
|
"@journeyapps-labs/common-utils": "^1.0.1",
|
|
23
23
|
"@journeyapps-labs/lib-reactor-data-layer": "1.0.10",
|
|
24
|
-
"@journeyapps-labs/reactor-mod": "5.0.
|
|
25
|
-
"@journeyapps-labs/reactor-mod-editor": "2.0.
|
|
24
|
+
"@journeyapps-labs/reactor-mod": "5.0.2",
|
|
25
|
+
"@journeyapps-labs/reactor-mod-editor": "2.0.2",
|
|
26
26
|
"@journeyapps/db": "^8.1.1",
|
|
27
27
|
"@journeyapps/parser-schema": "^8.2.5",
|
|
28
28
|
"@projectstorm/react-workspaces-core": "4.2.3",
|
|
@@ -3,6 +3,7 @@ import { SchemaModelObject } from '../../SchemaModelObject';
|
|
|
3
3
|
import { AbstractQuery } from '../AbstractQuery';
|
|
4
4
|
import { Page } from '../Page';
|
|
5
5
|
import { SimpleQuery } from '../query-simple/SimpleQuery';
|
|
6
|
+
import * as _ from 'lodash';
|
|
6
7
|
|
|
7
8
|
export class ChangedModelQuery extends AbstractQuery {
|
|
8
9
|
constructor(protected query: SimpleQuery) {
|
|
@@ -32,4 +33,11 @@ export class ChangedModelQuery extends AbstractQuery {
|
|
|
32
33
|
page.models = this.query.getDirtyObjects();
|
|
33
34
|
return page;
|
|
34
35
|
}
|
|
36
|
+
|
|
37
|
+
matches(query: AbstractQuery): boolean {
|
|
38
|
+
if (query instanceof ChangedModelQuery) {
|
|
39
|
+
return _.isEqual(query.query.serialize(), this.query.serialize());
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
35
43
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { inject, ioc, TableColumn } from '@journeyapps-labs/reactor-mod';
|
|
2
2
|
import { ConnectionStore } from '../../../stores/ConnectionStore';
|
|
3
3
|
import { Promise } from '@journeyapps/db';
|
|
4
|
-
import * as _ from 'lodash';
|
|
5
4
|
import { Page } from '../Page';
|
|
6
5
|
import { SchemaModelDefinition } from '../../SchemaModelDefinition';
|
|
7
6
|
import { action, observable } from 'mobx';
|
|
@@ -15,6 +14,8 @@ import { applyFiltersAndSorts } from './SimpleQueryPlanner';
|
|
|
15
14
|
import { buildSimpleQueryColumns } from './SimpleQueryColumns';
|
|
16
15
|
import { SimpleQuerySortState } from './SimpleQuerySortState';
|
|
17
16
|
import { SimpleQueryFilterState } from './SimpleQueryFilterState';
|
|
17
|
+
import { AbstractQuery } from '../AbstractQuery';
|
|
18
|
+
import * as _ from 'lodash';
|
|
18
19
|
|
|
19
20
|
export interface SimpleQueryOptions {
|
|
20
21
|
definition?: SchemaModelDefinition;
|
|
@@ -23,7 +24,6 @@ export interface SimpleQueryOptions {
|
|
|
23
24
|
|
|
24
25
|
export interface SimpleQueryEncoded extends AbstractQueryEncoded {
|
|
25
26
|
limit: number;
|
|
26
|
-
definition: string;
|
|
27
27
|
filters?: SerializedSimpleFilter[];
|
|
28
28
|
sorts?: SerializedSimpleQuerySort[];
|
|
29
29
|
}
|
|
@@ -83,6 +83,13 @@ export class SimpleQuery extends AbstractSerializableQuery<SimpleQueryEncoded> {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
matches(query: AbstractQuery): boolean {
|
|
87
|
+
if (query instanceof SimpleQuery) {
|
|
88
|
+
return _.isEqual(this.serialize(), query.serialize());
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
|
|
86
93
|
@action async load() {
|
|
87
94
|
this._pages = [];
|
|
88
95
|
const collection = await this.options.definition.getCollection();
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
EntityPanelComponent,
|
|
7
7
|
inject,
|
|
8
8
|
InlineTreePresenterComponent,
|
|
9
|
+
SearchableTreeSearchScope,
|
|
9
10
|
SimpleEntitySearchEngineComponent
|
|
10
11
|
} from '@journeyapps-labs/reactor-mod';
|
|
11
12
|
import { DataBrowserEntities } from '../entities';
|
|
@@ -54,7 +55,8 @@ export class ConnectionEntityDefinition extends EntityDefinition<AbstractConnect
|
|
|
54
55
|
this.registerComponent(
|
|
55
56
|
new InlineTreePresenterComponent<AbstractConnection>({
|
|
56
57
|
loadChildrenAsNodesAreOpened: true,
|
|
57
|
-
cacheTreeEntities:
|
|
58
|
+
cacheTreeEntities: true,
|
|
59
|
+
searchScope: SearchableTreeSearchScope.VISIBLE_ONLY
|
|
58
60
|
})
|
|
59
61
|
);
|
|
60
62
|
|
|
@@ -79,7 +79,13 @@ export class SchemaModelDefinitionEntityDefinition extends EntityDefinition<Sche
|
|
|
79
79
|
|
|
80
80
|
this.registerComponent(
|
|
81
81
|
new InlineTreePresenterComponent({
|
|
82
|
-
loadChildrenAsNodesAreOpened: true
|
|
82
|
+
loadChildrenAsNodesAreOpened: true,
|
|
83
|
+
cacheTreeEntities: true,
|
|
84
|
+
augmentTreeNodeProps: () => {
|
|
85
|
+
return {
|
|
86
|
+
openOnSingleClick: false
|
|
87
|
+
};
|
|
88
|
+
}
|
|
83
89
|
})
|
|
84
90
|
);
|
|
85
91
|
|
|
@@ -80,6 +80,10 @@ export class QueryPanelFactory extends SharedConnectionPanelFactory<QueryPanelMo
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
matchesModel(m1: QueryPanelModel, m2: QueryPanelModel) {
|
|
84
|
+
return m1.query.matches(m2.query);
|
|
85
|
+
}
|
|
86
|
+
|
|
83
87
|
getSimpleName(model: QueryPanelModel): string {
|
|
84
88
|
return model.query?.getSimpleName();
|
|
85
89
|
}
|