@journeyapps-labs/reactor-mod-data-browser 3.3.0 → 3.5.0
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 +27 -0
- package/dist/@types/actions/schema-model/ViewHasManyAction.d.ts +12 -0
- package/dist/@types/core/AbstractConnection.d.ts +1 -0
- package/dist/@types/core/SchemaModelDefinition.d.ts +32 -5
- package/dist/@types/core/query/StandardModelFields.d.ts +4 -0
- package/dist/@types/core/query/query-simple/SimpleQueryFilterState.d.ts +4 -6
- package/dist/@types/core/query/widgets/BelongsToDisplayWidget.d.ts +1 -0
- package/dist/@types/core/query/widgets/ColumnDisplayWidget.d.ts +1 -0
- package/dist/@types/core/query/widgets/IDCellDisplayWidget.d.ts +5 -0
- package/dist/@types/core/query/widgets/PeekRelationshipButton.d.ts +1 -0
- package/dist/@types/core/query/widgets/SmartBelongsToDisplayWidget.d.ts +2 -0
- package/dist/@types/core/query/widgets/SmartColumnWidget.d.ts +7 -2
- package/dist/@types/core/query/widgets/SmartFilterWidget.d.ts +6 -0
- package/dist/@types/entities/SchemaModelObjectEntityDefinition.d.ts +2 -1
- package/dist/@types/entities/SchemaModelTreePresenterComponent.d.ts +10 -0
- package/dist/@types/forms/types/belongs-to-filter.d.ts +10 -0
- package/dist/@types/forms/types/shared/type-handler.d.ts +1 -0
- package/dist/@types/index.d.ts +1 -0
- package/dist/@types/preferences/QueryControlPreferences.d.ts +14 -2
- package/dist/@types/preferences/SchemaOrderingPreferences.d.ts +22 -0
- package/dist/DataBrowserModule.js +4 -0
- package/dist/DataBrowserModule.js.map +1 -1
- package/dist/actions/schema-model/ViewHasManyAction.js +112 -0
- package/dist/actions/schema-model/ViewHasManyAction.js.map +1 -0
- package/dist/core/AbstractConnection.js +11 -3
- package/dist/core/AbstractConnection.js.map +1 -1
- package/dist/core/SchemaModelDefinition.js +121 -7
- package/dist/core/SchemaModelDefinition.js.map +1 -1
- package/dist/core/query/StandardModelFields.js +3 -0
- package/dist/core/query/StandardModelFields.js.map +1 -1
- package/dist/core/query/query-simple/SimpleQueryColumns.js +74 -42
- package/dist/core/query/query-simple/SimpleQueryColumns.js.map +1 -1
- package/dist/core/query/query-simple/SimpleQueryFilterState.js +35 -7
- package/dist/core/query/query-simple/SimpleQueryFilterState.js.map +1 -1
- package/dist/core/query/query-simple/SimpleQuerySortState.js +0 -1
- package/dist/core/query/query-simple/SimpleQuerySortState.js.map +1 -1
- package/dist/core/query/widgets/BelongsToDisplayWidget.js +1 -1
- package/dist/core/query/widgets/BelongsToDisplayWidget.js.map +1 -1
- package/dist/core/query/widgets/ColumnDisplayWidget.js +13 -2
- package/dist/core/query/widgets/ColumnDisplayWidget.js.map +1 -1
- package/dist/core/query/widgets/IDCellDisplayWidget.js +38 -0
- package/dist/core/query/widgets/IDCellDisplayWidget.js.map +1 -0
- package/dist/core/query/widgets/PeekRelationshipButton.js +23 -16
- package/dist/core/query/widgets/PeekRelationshipButton.js.map +1 -1
- package/dist/core/query/widgets/SmartBelongsToDisplayWidget.js +1 -1
- package/dist/core/query/widgets/SmartBelongsToDisplayWidget.js.map +1 -1
- package/dist/core/query/widgets/SmartColumnWidget.js +3 -13
- package/dist/core/query/widgets/SmartColumnWidget.js.map +1 -1
- package/dist/core/query/widgets/SmartFilterWidget.js +10 -7
- package/dist/core/query/widgets/SmartFilterWidget.js.map +1 -1
- package/dist/entities/SchemaModelDefinitionEntityDefinition.js +3 -10
- package/dist/entities/SchemaModelDefinitionEntityDefinition.js.map +1 -1
- package/dist/entities/SchemaModelObjectEntityDefinition.js +15 -14
- package/dist/entities/SchemaModelObjectEntityDefinition.js.map +1 -1
- package/dist/entities/SchemaModelTreePresenterComponent.js +23 -0
- package/dist/entities/SchemaModelTreePresenterComponent.js.map +1 -0
- package/dist/forms/SchemaModelForm.js +31 -29
- package/dist/forms/SchemaModelForm.js.map +1 -1
- package/dist/forms/types/attachment-handler.js +1 -0
- package/dist/forms/types/attachment-handler.js.map +1 -1
- package/dist/forms/types/belongs-to-filter.js +57 -0
- package/dist/forms/types/belongs-to-filter.js.map +1 -0
- package/dist/forms/types/boolean-handler.js +34 -1
- package/dist/forms/types/boolean-handler.js.map +1 -1
- package/dist/forms/types/date-handler.js +1 -0
- package/dist/forms/types/date-handler.js.map +1 -1
- package/dist/forms/types/image-handler.js +1 -0
- package/dist/forms/types/image-handler.js.map +1 -1
- package/dist/forms/types/location-handler.js +1 -0
- package/dist/forms/types/location-handler.js.map +1 -1
- package/dist/forms/types/multiple-choice-handler.js +1 -0
- package/dist/forms/types/multiple-choice-handler.js.map +1 -1
- package/dist/forms/types/multiple-choice-integer-handler.js +1 -0
- package/dist/forms/types/multiple-choice-integer-handler.js.map +1 -1
- package/dist/forms/types/number-handler.js +3 -2
- package/dist/forms/types/number-handler.js.map +1 -1
- package/dist/forms/types/single-choice-handler.js +1 -0
- package/dist/forms/types/single-choice-handler.js.map +1 -1
- package/dist/forms/types/single-choice-integer-handler.js +1 -0
- package/dist/forms/types/single-choice-integer-handler.js.map +1 -1
- package/dist/forms/types/text-handler.js +1 -0
- package/dist/forms/types/text-handler.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/panels/query/QueryPanelWidget.js +14 -9
- package/dist/panels/query/QueryPanelWidget.js.map +1 -1
- package/dist/panels/query/table-controls/FilterControlsWidget.js +1 -0
- package/dist/panels/query/table-controls/FilterControlsWidget.js.map +1 -1
- package/dist/preferences/QueryControlPreferences.js +45 -1
- package/dist/preferences/QueryControlPreferences.js.map +1 -1
- package/dist/preferences/SchemaOrderingPreferences.js +76 -0
- package/dist/preferences/SchemaOrderingPreferences.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist-module/bundle.js +51 -35
- package/dist-module/bundle.js.map +1 -1
- package/package.json +7 -6
- package/src/DataBrowserModule.ts +4 -0
- package/src/actions/schema-model/ViewHasManyAction.ts +114 -0
- package/src/core/AbstractConnection.ts +12 -3
- package/src/core/SchemaModelDefinition.ts +165 -9
- package/src/core/query/StandardModelFields.ts +8 -0
- package/src/core/query/query-simple/SimpleQueryColumns.tsx +103 -58
- package/src/core/query/query-simple/SimpleQueryFilterState.ts +42 -9
- package/src/core/query/query-simple/SimpleQuerySortState.ts +0 -1
- package/src/core/query/widgets/BelongsToDisplayWidget.tsx +2 -1
- package/src/core/query/widgets/ColumnDisplayWidget.tsx +17 -4
- package/src/core/query/widgets/IDCellDisplayWidget.tsx +59 -0
- package/src/core/query/widgets/PeekRelationshipButton.tsx +23 -16
- package/src/core/query/widgets/SmartBelongsToDisplayWidget.tsx +3 -0
- package/src/core/query/widgets/SmartColumnWidget.tsx +23 -20
- package/src/core/query/widgets/SmartFilterWidget.tsx +14 -5
- package/src/entities/SchemaModelDefinitionEntityDefinition.ts +3 -13
- package/src/entities/SchemaModelObjectEntityDefinition.ts +17 -15
- package/src/entities/SchemaModelTreePresenterComponent.ts +31 -0
- package/src/forms/SchemaModelForm.tsx +46 -41
- package/src/forms/types/attachment-handler.tsx +1 -0
- package/src/forms/types/belongs-to-filter.tsx +84 -0
- package/src/forms/types/boolean-handler.tsx +46 -2
- package/src/forms/types/date-handler.tsx +1 -0
- package/src/forms/types/image-handler.tsx +1 -0
- package/src/forms/types/location-handler.tsx +1 -0
- package/src/forms/types/multiple-choice-handler.tsx +1 -0
- package/src/forms/types/multiple-choice-integer-handler.tsx +1 -0
- package/src/forms/types/number-handler.tsx +3 -2
- package/src/forms/types/shared/type-handler.ts +1 -0
- package/src/forms/types/single-choice-handler.tsx +1 -0
- package/src/forms/types/single-choice-integer-handler.tsx +1 -0
- package/src/forms/types/text-handler.tsx +1 -0
- package/src/index.ts +1 -0
- package/src/panels/query/QueryPanelWidget.tsx +24 -22
- package/src/panels/query/table-controls/FilterControlsWidget.tsx +1 -0
- package/src/preferences/QueryControlPreferences.ts +51 -2
- package/src/preferences/SchemaOrderingPreferences.ts +82 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @journeyapps-labs/reactor-mod-data-browser
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 794a3d6: Add configurable schema and query display preferences in the data browser.
|
|
8
|
+
- add schema ordering preferences for models and fields, including schema-defined ordering for models and fields/relationships
|
|
9
|
+
- apply shared field ordering consistently across table columns, forms, and filterable schema fields
|
|
10
|
+
- add a query preference to toggle showing the raw ID value in the ID column while keeping the copy button available
|
|
11
|
+
- add a query preference to place table controls at the top, bottom, or both, defaulting to both
|
|
12
|
+
|
|
13
|
+
## 3.4.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 4a150da: Expand Data Browser query tooling with better filtering, relationship workflows, and ID utilities.
|
|
18
|
+
- Show type labels under column headings.
|
|
19
|
+
- Add filtering support for boolean, belongs-to, and `ID` columns.
|
|
20
|
+
- Group Add Filter options into `Fields` and `Belongs to`.
|
|
21
|
+
- Make IDs easier to work with:
|
|
22
|
+
- Add copy actions in ID cells.
|
|
23
|
+
- Add copy support in relationship peek metadata.
|
|
24
|
+
- Allow direct UUID paste in relationship search to resolve records by ID.
|
|
25
|
+
- Improve relationship workflows:
|
|
26
|
+
- Add `View has many` from row context menus to open related records in a pre-filtered query.
|
|
27
|
+
- Add `Filter belongs to` from relationship peek to apply a query filter from the selected related object.
|
|
28
|
+
- Make the `ID` column filterable but no longer sortable.
|
|
29
|
+
|
|
3
30
|
## 3.3.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComboBoxStore2, EntityAction, EntityActionEvent, NotificationStore, WorkspaceStore } from '@journeyapps-labs/reactor-mod';
|
|
2
|
+
import { SchemaModelObject } from '../../core/SchemaModelObject';
|
|
3
|
+
export declare class ViewHasManyAction extends EntityAction<SchemaModelObject> {
|
|
4
|
+
static ID: string;
|
|
5
|
+
accessor comboStore: ComboBoxStore2;
|
|
6
|
+
accessor workspaceStore: WorkspaceStore;
|
|
7
|
+
accessor notifications: NotificationStore;
|
|
8
|
+
constructor();
|
|
9
|
+
fireEvent(event: EntityActionEvent<SchemaModelObject>): Promise<any>;
|
|
10
|
+
private openRelationshipQuery;
|
|
11
|
+
static get(): ViewHasManyAction;
|
|
12
|
+
}
|
|
@@ -44,6 +44,7 @@ export declare abstract class AbstractConnection extends BaseObserver<AbstractCo
|
|
|
44
44
|
waitForSchemaModelDefinitionByName(name: string): Promise<SchemaModelDefinition>;
|
|
45
45
|
abstract getConnection(): Promise<Database>;
|
|
46
46
|
protected getSchema(): Promise<Schema>;
|
|
47
|
+
protected getOrderedSchemaObjects(schema: Schema): ObjectType[];
|
|
47
48
|
reload(): Promise<void>;
|
|
48
49
|
init(): Promise<void>;
|
|
49
50
|
protected connectOnline(): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractConnection } from './AbstractConnection';
|
|
2
2
|
import { ObjectType } from '@journeyapps/parser-schema';
|
|
3
|
-
import { Collection, Query } from '@journeyapps/db';
|
|
3
|
+
import { Collection, Query, Variable } from '@journeyapps/db';
|
|
4
4
|
import { SchemaModelObject } from './SchemaModelObject';
|
|
5
5
|
import { LifecycleModel } from '@journeyapps-labs/lib-reactor-data-layer';
|
|
6
6
|
import { BaseObserver } from '@journeyapps-labs/common-utils';
|
|
@@ -19,6 +19,27 @@ export interface SchemaModelDefinitionOptions {
|
|
|
19
19
|
connection: AbstractConnection;
|
|
20
20
|
definition: ObjectType;
|
|
21
21
|
}
|
|
22
|
+
export interface FilterableField {
|
|
23
|
+
key: string;
|
|
24
|
+
label: string;
|
|
25
|
+
group: 'Fields' | 'Belongs to';
|
|
26
|
+
}
|
|
27
|
+
export declare enum OrderedSchemaFieldType {
|
|
28
|
+
FIELD = "FIELD",
|
|
29
|
+
BELONGS_TO = "BELONGS_TO"
|
|
30
|
+
}
|
|
31
|
+
export type OrderedSchemaFieldOrRelationship = {
|
|
32
|
+
type: OrderedSchemaFieldType.FIELD;
|
|
33
|
+
object: Variable;
|
|
34
|
+
key: string;
|
|
35
|
+
label: string;
|
|
36
|
+
} | {
|
|
37
|
+
type: OrderedSchemaFieldType.BELONGS_TO;
|
|
38
|
+
object: ObjectType['belongsTo'][string];
|
|
39
|
+
key: string;
|
|
40
|
+
label: string;
|
|
41
|
+
variable: Variable;
|
|
42
|
+
};
|
|
22
43
|
export declare class SchemaModelDefinition extends BaseObserver<SchemaModelDefinitionListener> implements LifecycleModel<ObjectType> {
|
|
23
44
|
protected options: SchemaModelDefinitionOptions;
|
|
24
45
|
cache: Map<string, SchemaModelObject>;
|
|
@@ -39,8 +60,14 @@ export declare class SchemaModelDefinition extends BaseObserver<SchemaModelDefin
|
|
|
39
60
|
executeQuery(query: Query): Promise<SchemaModelObject[]>;
|
|
40
61
|
getCollection(): Promise<Collection<import("@journeyapps/db").DatabaseObject>>;
|
|
41
62
|
generateNewModelObject(): Promise<SchemaModelObject>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
63
|
+
getBelongsToIdVariableForRelationship(relationshipName: string): Variable | undefined;
|
|
64
|
+
getBelongsToRelationshipForField(field: string): {
|
|
65
|
+
variable: Variable;
|
|
66
|
+
relationship: ObjectType['belongsTo'][string];
|
|
67
|
+
} | undefined;
|
|
68
|
+
private getSchemaOrderedFields;
|
|
69
|
+
private getSchemaOrderedBelongsToFields;
|
|
70
|
+
private getAlphabeticalOrderedFields;
|
|
71
|
+
getOrderedFieldsAndRelationships(): OrderedSchemaFieldOrRelationship[];
|
|
72
|
+
getFilterableFields(typeEngine: TypeEngine): FilterableField[];
|
|
46
73
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { Variable } from '@journeyapps/db';
|
|
1
2
|
export declare enum StandardModelFields {
|
|
2
3
|
ID = "id",
|
|
3
4
|
UPDATED_AT = "updated_at"
|
|
4
5
|
}
|
|
5
6
|
export declare const STANDARD_MODEL_FIELD_LABELS: Record<StandardModelFields, string>;
|
|
7
|
+
export declare const idVariable: Variable & {
|
|
8
|
+
label?: string;
|
|
9
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Variable } from '@journeyapps/db';
|
|
2
2
|
import { BaseObserver } from '@journeyapps-labs/common-utils';
|
|
3
|
-
import { SchemaModelDefinition } from '../../SchemaModelDefinition';
|
|
3
|
+
import { FilterableField, SchemaModelDefinition } from '../../SchemaModelDefinition';
|
|
4
4
|
import { SerializedSimpleFilter, SimpleFilter } from '../filters';
|
|
5
5
|
import { TypeEngine } from '../../../forms/TypeEngine';
|
|
6
6
|
export interface SimpleQueryFilterStateListener {
|
|
@@ -22,10 +22,7 @@ export declare class SimpleQueryFilterState extends BaseObserver<SimpleQueryFilt
|
|
|
22
22
|
get filters(): SimpleFilter[];
|
|
23
23
|
clear(): void;
|
|
24
24
|
setDefinition(definition: SchemaModelDefinition | undefined): boolean;
|
|
25
|
-
getFilterableFields():
|
|
26
|
-
key: string;
|
|
27
|
-
label: string;
|
|
28
|
-
}[];
|
|
25
|
+
getFilterableFields(): FilterableField[];
|
|
29
26
|
getActiveFilters(): ActiveFilterEntry[];
|
|
30
27
|
getFilter(field: string): SimpleFilter | undefined;
|
|
31
28
|
getSerializedFilters(): SerializedSimpleFilter[];
|
|
@@ -33,5 +30,6 @@ export declare class SimpleQueryFilterState extends BaseObserver<SimpleQueryFilt
|
|
|
33
30
|
setFilter(field: string, filter: SimpleFilter): boolean;
|
|
34
31
|
setupFilterForField(field: string, position?: MouseEvent): Promise<boolean>;
|
|
35
32
|
private addFilter;
|
|
36
|
-
private
|
|
33
|
+
private resolveField;
|
|
34
|
+
private resolveBelongsToField;
|
|
37
35
|
}
|
|
@@ -7,6 +7,7 @@ export interface BelongsToDisplayWidgetProps {
|
|
|
7
7
|
id: string;
|
|
8
8
|
connection: AbstractConnection;
|
|
9
9
|
open: (object: SchemaModelObject) => any;
|
|
10
|
+
filterBelongsTo?: (object: SchemaModelObject) => any;
|
|
10
11
|
className?: any;
|
|
11
12
|
}
|
|
12
13
|
export declare const BelongsToDisplayWidget: React.FC<BelongsToDisplayWidgetProps>;
|
|
@@ -3,5 +3,6 @@ import { SchemaModelObject } from '../../SchemaModelObject';
|
|
|
3
3
|
export interface PeekRelationshipButtonProps {
|
|
4
4
|
object: SchemaModelObject;
|
|
5
5
|
open: (object: SchemaModelObject) => any;
|
|
6
|
+
filterBelongsTo?: (object: SchemaModelObject) => any;
|
|
6
7
|
}
|
|
7
8
|
export declare const PeekRelationshipButton: React.FC<PeekRelationshipButtonProps>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PageRow } from '../Page';
|
|
3
3
|
import { AbstractConnection } from '../../AbstractConnection';
|
|
4
|
+
import { SchemaModelObject } from '../../SchemaModelObject';
|
|
4
5
|
import { Variable } from '@journeyapps/db';
|
|
5
6
|
export interface SmartBelongsToDisplayWidgetProps {
|
|
6
7
|
row: PageRow;
|
|
7
8
|
connection: AbstractConnection;
|
|
8
9
|
variable_id: Variable;
|
|
10
|
+
filterBelongsTo?: (object: SchemaModelObject) => any;
|
|
9
11
|
}
|
|
10
12
|
export declare const SmartBelongsToDisplayWidget: React.FC<SmartBelongsToDisplayWidgetProps>;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Variable } from '@journeyapps/db';
|
|
3
3
|
import { SimpleFilter } from '../filters';
|
|
4
4
|
import { SortDirection } from '../query-simple/SimpleQuery';
|
|
5
5
|
export interface SmartColumnWidgetProps {
|
|
6
6
|
variable: Variable;
|
|
7
|
-
|
|
7
|
+
typeLabel?: string;
|
|
8
8
|
filter?: SimpleFilter;
|
|
9
9
|
sortDirection?: SortDirection;
|
|
10
10
|
onToggleSort?: () => Promise<any> | any;
|
|
11
|
+
setupFilter?: (event: {
|
|
12
|
+
variable: Variable;
|
|
13
|
+
filter?: SimpleFilter;
|
|
14
|
+
position?: MouseEvent;
|
|
15
|
+
}) => Promise<SimpleFilter | null>;
|
|
11
16
|
filterChanged: (filter: SimpleFilter | null) => any;
|
|
12
17
|
}
|
|
13
18
|
export declare const SmartColumnWidget: React.FC<SmartColumnWidgetProps>;
|
|
@@ -4,6 +4,11 @@ import { SimpleFilter } from '../filters';
|
|
|
4
4
|
export interface SmartFilterWidgetProps {
|
|
5
5
|
variable: Variable;
|
|
6
6
|
filter?: SimpleFilter;
|
|
7
|
+
setupFilter: (event: {
|
|
8
|
+
variable: Variable;
|
|
9
|
+
filter?: SimpleFilter;
|
|
10
|
+
position?: MouseEvent;
|
|
11
|
+
}) => Promise<SimpleFilter | null>;
|
|
7
12
|
filterChanged: (filter: SimpleFilter | null) => any;
|
|
8
13
|
}
|
|
9
14
|
export interface SmartFilterMetadataWidgetProps {
|
|
@@ -13,3 +18,4 @@ export interface SmartFilterMetadataWidgetProps {
|
|
|
13
18
|
}
|
|
14
19
|
export declare const SmartFilterMetadataWidget: React.FC<SmartFilterMetadataWidgetProps>;
|
|
15
20
|
export declare const SmartFilterWidget: React.FC<SmartFilterWidgetProps>;
|
|
21
|
+
export declare const SmartTypeEngineFilterWidget: React.FC<Omit<SmartFilterWidgetProps, 'setupFilter'>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityDefinition } from '@journeyapps-labs/reactor-mod';
|
|
1
|
+
import { Action, EntityDefinition } from '@journeyapps-labs/reactor-mod';
|
|
2
2
|
import { ConnectionStore } from '../stores/ConnectionStore';
|
|
3
3
|
import { SchemaModelObject } from '../core/SchemaModelObject';
|
|
4
4
|
export interface SchemaModelObjectEntityDefinitionEncoded {
|
|
@@ -11,4 +11,5 @@ export declare class SchemaModelObjectEntityDefinition extends EntityDefinition<
|
|
|
11
11
|
constructor();
|
|
12
12
|
matchEntity(t: any): boolean;
|
|
13
13
|
getEntityUID(t: SchemaModelObject): string;
|
|
14
|
+
isActionAllowedForEntity(action: Action, entity: SchemaModelObject): boolean;
|
|
14
15
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CachedEntityTreePresenterContext, EntityTreePresenterComponent, ReactorTreeEntity } from '@journeyapps-labs/reactor-mod';
|
|
2
|
+
import { SchemaModelDefinition } from '../core/SchemaModelDefinition';
|
|
3
|
+
declare class SchemaModelTreePresenterContext extends CachedEntityTreePresenterContext<SchemaModelDefinition> {
|
|
4
|
+
getSortedEntities(entities: SchemaModelDefinition[]): SchemaModelDefinition[];
|
|
5
|
+
protected doGenerateTreeNode(entity: SchemaModelDefinition, options: any): ReactorTreeEntity;
|
|
6
|
+
}
|
|
7
|
+
export declare class SchemaModelTreePresenterComponent extends EntityTreePresenterComponent<SchemaModelDefinition> {
|
|
8
|
+
protected _generateContext(): SchemaModelTreePresenterContext;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Variable } from '@journeyapps/db';
|
|
2
|
+
import { Relationship } from '@journeyapps/parser-schema';
|
|
3
|
+
import { SchemaModelDefinition } from '../../core/SchemaModelDefinition';
|
|
4
|
+
import { SimpleFilter } from '../../core/query/filters';
|
|
5
|
+
export declare const setupBelongsToFilter: (options: {
|
|
6
|
+
definition: SchemaModelDefinition;
|
|
7
|
+
relationship: Relationship;
|
|
8
|
+
variable: Variable;
|
|
9
|
+
filter?: SimpleFilter;
|
|
10
|
+
}) => Promise<SimpleFilter>;
|
|
@@ -7,6 +7,7 @@ import { SimpleFilter } from '../../../core/query/filters';
|
|
|
7
7
|
export type ScalarValue = string | number | boolean | null;
|
|
8
8
|
export interface TypeHandler<T extends Type = Type, ENCODED = any, DECODED = any> {
|
|
9
9
|
matches: (type: Type) => boolean;
|
|
10
|
+
getTypeLabel?: (type: T) => string;
|
|
10
11
|
generateField: (event: {
|
|
11
12
|
label: string;
|
|
12
13
|
name: string;
|
package/dist/@types/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './entities/QueryEntityDefinition';
|
|
|
13
13
|
export * from './entities/ConnectionEntityDefinition';
|
|
14
14
|
export * from './entities/ConnectionFactoryEntityDefinition';
|
|
15
15
|
export * from './entities/SchemaModelDefinitionEntityDefinition';
|
|
16
|
+
export * from './entities/SchemaModelTreePresenterComponent';
|
|
16
17
|
export * from './entities/SchemaModelObjectEntityDefinition';
|
|
17
18
|
export * from './panels/query/QueryPanelFactory';
|
|
18
19
|
export * from './panels/model/ModelPanelFactory';
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { PrefsStore } from '@journeyapps-labs/reactor-mod';
|
|
1
|
+
import { PrefsStore, SetSetting } from '@journeyapps-labs/reactor-mod';
|
|
2
2
|
export declare enum QueryControlPreferences {
|
|
3
3
|
SHOW_SORT_CONTROLS = "databrowser/query-controls/show-sort-controls",
|
|
4
4
|
SHOW_FILTER_CONTROLS = "databrowser/query-controls/show-filter-controls",
|
|
5
|
-
FILTER_NULL_FIELDS_IN_RELATIONSHIP_PEEK = "databrowser/query-controls/filter-null-fields-in-relationship-peek"
|
|
5
|
+
FILTER_NULL_FIELDS_IN_RELATIONSHIP_PEEK = "databrowser/query-controls/filter-null-fields-in-relationship-peek",
|
|
6
|
+
SHOW_ID_VALUE_IN_ID_COLUMN = "databrowser/query-controls/show-id-value-in-id-column",
|
|
7
|
+
TABLE_CONTROLS_POSITION = "databrowser/query-controls/table-controls-position"
|
|
8
|
+
}
|
|
9
|
+
export declare enum TableControlsPositionValue {
|
|
10
|
+
TOP = "top",
|
|
11
|
+
BOTTOM = "bottom",
|
|
12
|
+
BOTH = "both"
|
|
13
|
+
}
|
|
14
|
+
export declare class TableControlsPositionPreference extends SetSetting {
|
|
15
|
+
static KEY: QueryControlPreferences;
|
|
16
|
+
constructor();
|
|
17
|
+
static getValue(): TableControlsPositionValue;
|
|
6
18
|
}
|
|
7
19
|
export declare const registerQueryControlPreferences: (prefsStore: PrefsStore) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PrefsStore, SetSetting } from '@journeyapps-labs/reactor-mod';
|
|
2
|
+
export declare enum SchemaModelOrderValue {
|
|
3
|
+
ALPHABETICAL = "alphabetical",
|
|
4
|
+
AS_DEFINED_IN_SCHEMA = "as_defined_in_schema"
|
|
5
|
+
}
|
|
6
|
+
export declare class SchemaModelOrderingPreference extends SetSetting {
|
|
7
|
+
static KEY: string;
|
|
8
|
+
constructor();
|
|
9
|
+
static getValue(): SchemaModelOrderValue;
|
|
10
|
+
}
|
|
11
|
+
export declare enum SchemaFieldOrderValue {
|
|
12
|
+
ALPHABETICAL = "alphabetical",
|
|
13
|
+
BELONGS_TO_FIRST = "belongs_to_first",
|
|
14
|
+
BELONGS_TO_LAST = "belongs_to_last",
|
|
15
|
+
AS_DEFINED_IN_SCHEMA = "as_defined_in_schema"
|
|
16
|
+
}
|
|
17
|
+
export declare class SchemaFieldOrderingPreference extends SetSetting {
|
|
18
|
+
static KEY: string;
|
|
19
|
+
constructor();
|
|
20
|
+
static getValue(): SchemaFieldOrderValue;
|
|
21
|
+
}
|
|
22
|
+
export declare const registerSchemaOrderingPreferences: (prefsStore: PrefsStore) => void;
|
|
@@ -16,6 +16,7 @@ import { SchemaModelObjectEntityDefinition } from './entities/SchemaModelObjectE
|
|
|
16
16
|
import { EditSchemaModelAction } from './actions/schema-model/EditSchemaModelAction';
|
|
17
17
|
import { TypeEngine } from './forms/TypeEngine';
|
|
18
18
|
import { ViewSchemaModelAsJsonAction } from './actions/schema-model/ViewSchemaModelAsJsonAction';
|
|
19
|
+
import { ViewHasManyAction } from './actions/schema-model/ViewHasManyAction';
|
|
19
20
|
import { ModelJsonPanelFactory } from './panels/model-json/ModelJsonPanelFactory';
|
|
20
21
|
import { SchemaModelIndexDefinition } from './entities/SchemaModelIndexDefinition';
|
|
21
22
|
import { SavedQueryStore } from './stores/SavedQueryStore';
|
|
@@ -23,6 +24,7 @@ import { SavedQueryEntityDefinition } from './entities/SavedQueryEntityDefinitio
|
|
|
23
24
|
import { OpenSavedQueryAction } from './actions/saved-queries/OpenSavedQueryAction';
|
|
24
25
|
import { RemoveSavedQueryAction } from './actions/saved-queries/RemoveSavedQueryAction';
|
|
25
26
|
import { registerQueryControlPreferences } from './preferences/QueryControlPreferences';
|
|
27
|
+
import { registerSchemaOrderingPreferences } from './preferences/SchemaOrderingPreferences';
|
|
26
28
|
export class DataBrowserModule extends AbstractReactorModule {
|
|
27
29
|
constructor() {
|
|
28
30
|
super({
|
|
@@ -43,11 +45,13 @@ export class DataBrowserModule extends AbstractReactorModule {
|
|
|
43
45
|
actionStore.registerAction(new CreateModelAction());
|
|
44
46
|
actionStore.registerAction(new EditSchemaModelAction());
|
|
45
47
|
actionStore.registerAction(new ViewSchemaModelAsJsonAction());
|
|
48
|
+
actionStore.registerAction(new ViewHasManyAction());
|
|
46
49
|
actionStore.registerAction(new OpenSavedQueryAction());
|
|
47
50
|
actionStore.registerAction(new RemoveSavedQueryAction());
|
|
48
51
|
system.addStore(ConnectionStore, connectionStore);
|
|
49
52
|
system.addStore(SavedQueryStore, new SavedQueryStore());
|
|
50
53
|
registerQueryControlPreferences(ioc.get(PrefsStore));
|
|
54
|
+
registerSchemaOrderingPreferences(ioc.get(PrefsStore));
|
|
51
55
|
system.registerDefinition(new ConnectionEntityDefinition());
|
|
52
56
|
system.registerDefinition(new ConnectionFactoryEntityDefinition());
|
|
53
57
|
system.registerDefinition(new SchemaModelDefinitionEntityDefinition());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBrowserModule.js","sourceRoot":"","sources":["../src/DataBrowserModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEvH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,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G,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;CACF"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet, __esDecorate, __runInitializers } from "tslib";
|
|
2
|
+
import { ActionStore, ComboBoxStore2, EntityAction, NotificationStore, NotificationType, SimpleComboBoxDirective, WorkspaceStore, inject, ioc } from '@journeyapps-labs/reactor-mod';
|
|
3
|
+
import { DataBrowserEntities } from '../../entities';
|
|
4
|
+
import { QueryPanelModel } from '../../panels/query/QueryPanelFactory';
|
|
5
|
+
import { SimpleQuery } from '../../core/query/query-simple/SimpleQuery';
|
|
6
|
+
import { Condition, SimpleFilter, Statement } from '../../core/query/filters';
|
|
7
|
+
let ViewHasManyAction = (() => {
|
|
8
|
+
var _a, _ViewHasManyAction_comboStore_accessor_storage, _ViewHasManyAction_workspaceStore_accessor_storage, _ViewHasManyAction_notifications_accessor_storage;
|
|
9
|
+
let _classSuper = EntityAction;
|
|
10
|
+
let _comboStore_decorators;
|
|
11
|
+
let _comboStore_initializers = [];
|
|
12
|
+
let _comboStore_extraInitializers = [];
|
|
13
|
+
let _workspaceStore_decorators;
|
|
14
|
+
let _workspaceStore_initializers = [];
|
|
15
|
+
let _workspaceStore_extraInitializers = [];
|
|
16
|
+
let _notifications_decorators;
|
|
17
|
+
let _notifications_initializers = [];
|
|
18
|
+
let _notifications_extraInitializers = [];
|
|
19
|
+
return _a = class ViewHasManyAction extends _classSuper {
|
|
20
|
+
get comboStore() { return __classPrivateFieldGet(this, _ViewHasManyAction_comboStore_accessor_storage, "f"); }
|
|
21
|
+
set comboStore(value) { __classPrivateFieldSet(this, _ViewHasManyAction_comboStore_accessor_storage, value, "f"); }
|
|
22
|
+
get workspaceStore() { return __classPrivateFieldGet(this, _ViewHasManyAction_workspaceStore_accessor_storage, "f"); }
|
|
23
|
+
set workspaceStore(value) { __classPrivateFieldSet(this, _ViewHasManyAction_workspaceStore_accessor_storage, value, "f"); }
|
|
24
|
+
get notifications() { return __classPrivateFieldGet(this, _ViewHasManyAction_notifications_accessor_storage, "f"); }
|
|
25
|
+
set notifications(value) { __classPrivateFieldSet(this, _ViewHasManyAction_notifications_accessor_storage, value, "f"); }
|
|
26
|
+
constructor() {
|
|
27
|
+
super({
|
|
28
|
+
id: _a.ID,
|
|
29
|
+
name: 'View has many',
|
|
30
|
+
icon: 'list',
|
|
31
|
+
target: DataBrowserEntities.SCHEMA_MODEL_OBJECT
|
|
32
|
+
});
|
|
33
|
+
_ViewHasManyAction_comboStore_accessor_storage.set(this, __runInitializers(this, _comboStore_initializers, void 0));
|
|
34
|
+
_ViewHasManyAction_workspaceStore_accessor_storage.set(this, (__runInitializers(this, _comboStore_extraInitializers), __runInitializers(this, _workspaceStore_initializers, void 0)));
|
|
35
|
+
_ViewHasManyAction_notifications_accessor_storage.set(this, (__runInitializers(this, _workspaceStore_extraInitializers), __runInitializers(this, _notifications_initializers, void 0)));
|
|
36
|
+
__runInitializers(this, _notifications_extraInitializers);
|
|
37
|
+
}
|
|
38
|
+
async fireEvent(event) {
|
|
39
|
+
const relationships = Object.values(event.targetEntity.definition.definition.hasMany || {});
|
|
40
|
+
if (relationships.length === 0) {
|
|
41
|
+
this.notifications.showNotification({
|
|
42
|
+
title: 'No relationships',
|
|
43
|
+
description: 'This record has no has-many relationships to view.',
|
|
44
|
+
type: NotificationType.ERROR
|
|
45
|
+
});
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const directive = await this.comboStore.show(new SimpleComboBoxDirective({
|
|
49
|
+
title: 'View has many',
|
|
50
|
+
subtitle: event.targetEntity.data.display || event.targetEntity.id,
|
|
51
|
+
event: event.position,
|
|
52
|
+
items: relationships.map((relationship) => {
|
|
53
|
+
return {
|
|
54
|
+
key: relationship.foreignName || relationship.name,
|
|
55
|
+
title: relationship.foreignName || relationship.name,
|
|
56
|
+
subtitle: relationship.objectType.label || relationship.objectType.name,
|
|
57
|
+
action: async () => { }
|
|
58
|
+
};
|
|
59
|
+
})
|
|
60
|
+
}));
|
|
61
|
+
const selected = directive.getSelectedItem();
|
|
62
|
+
if (!(selected === null || selected === void 0 ? void 0 : selected.key)) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const relationship = relationships.find((entry) => (entry.foreignName || entry.name) === selected.key);
|
|
66
|
+
if (!relationship) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
await this.openRelationshipQuery(event.targetEntity, relationship);
|
|
70
|
+
}
|
|
71
|
+
async openRelationshipQuery(parent, relationship) {
|
|
72
|
+
const definition = await parent.definition.connection.waitForSchemaModelDefinitionByName(relationship.objectType.name);
|
|
73
|
+
const variable = definition.getBelongsToIdVariableForRelationship(relationship.name);
|
|
74
|
+
if (!variable) {
|
|
75
|
+
this.notifications.showNotification({
|
|
76
|
+
title: 'Cannot open relationship',
|
|
77
|
+
description: `No belongs-to field found for ${relationship.name}.`,
|
|
78
|
+
type: NotificationType.ERROR
|
|
79
|
+
});
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
variable.label = relationship.name;
|
|
83
|
+
const query = new SimpleQuery({
|
|
84
|
+
definition,
|
|
85
|
+
limit: 30
|
|
86
|
+
});
|
|
87
|
+
query.filterState.setFilter(variable.name, new SimpleFilter(variable, [new Statement(Condition.EQUALS, parent.id)]));
|
|
88
|
+
this.workspaceStore.addModel(new QueryPanelModel(query));
|
|
89
|
+
}
|
|
90
|
+
static get() {
|
|
91
|
+
return ioc.get(ActionStore).getActionByID(_a.ID);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
_ViewHasManyAction_comboStore_accessor_storage = new WeakMap(),
|
|
95
|
+
_ViewHasManyAction_workspaceStore_accessor_storage = new WeakMap(),
|
|
96
|
+
_ViewHasManyAction_notifications_accessor_storage = new WeakMap(),
|
|
97
|
+
(() => {
|
|
98
|
+
var _b;
|
|
99
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_b = _classSuper[Symbol.metadata]) !== null && _b !== void 0 ? _b : null) : void 0;
|
|
100
|
+
_comboStore_decorators = [inject(ComboBoxStore2)];
|
|
101
|
+
_workspaceStore_decorators = [inject(WorkspaceStore)];
|
|
102
|
+
_notifications_decorators = [inject(NotificationStore)];
|
|
103
|
+
__esDecorate(_a, null, _comboStore_decorators, { kind: "accessor", name: "comboStore", static: false, private: false, access: { has: obj => "comboStore" in obj, get: obj => obj.comboStore, set: (obj, value) => { obj.comboStore = value; } }, metadata: _metadata }, _comboStore_initializers, _comboStore_extraInitializers);
|
|
104
|
+
__esDecorate(_a, null, _workspaceStore_decorators, { kind: "accessor", name: "workspaceStore", static: false, private: false, access: { has: obj => "workspaceStore" in obj, get: obj => obj.workspaceStore, set: (obj, value) => { obj.workspaceStore = value; } }, metadata: _metadata }, _workspaceStore_initializers, _workspaceStore_extraInitializers);
|
|
105
|
+
__esDecorate(_a, null, _notifications_decorators, { kind: "accessor", name: "notifications", static: false, private: false, access: { has: obj => "notifications" in obj, get: obj => obj.notifications, set: (obj, value) => { obj.notifications = value; } }, metadata: _metadata }, _notifications_initializers, _notifications_extraInitializers);
|
|
106
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
107
|
+
})(),
|
|
108
|
+
_a.ID = 'VIEW_HAS_MANY',
|
|
109
|
+
_a;
|
|
110
|
+
})();
|
|
111
|
+
export { ViewHasManyAction };
|
|
112
|
+
//# sourceMappingURL=ViewHasManyAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewHasManyAction.js","sourceRoot":"","sources":["../../../src/actions/schema-model/ViewHasManyAction.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EAEX,cAAc,EACd,YAAY,EAEZ,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,MAAM,EACN,GAAG,EACJ,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,m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
|
2
|
-
import * as _ from 'lodash';
|
|
3
2
|
import { SchemaModelDefinition } from './SchemaModelDefinition';
|
|
4
3
|
import { v4 } from 'uuid';
|
|
5
4
|
import { BaseObserver } from '@journeyapps-labs/common-utils';
|
|
@@ -7,6 +6,8 @@ import { Collection, LifecycleCollection } from '@journeyapps-labs/lib-reactor-d
|
|
|
7
6
|
import { when } from 'mobx';
|
|
8
7
|
import { computed, observable } from 'mobx';
|
|
9
8
|
import { getDefaultConnectionColor } from './connection-colors';
|
|
9
|
+
import { SchemaModelOrderValue, SchemaModelOrderingPreference } from '../preferences/SchemaOrderingPreferences';
|
|
10
|
+
import * as _ from 'lodash';
|
|
10
11
|
export var ConnectionOnlineState;
|
|
11
12
|
(function (ConnectionOnlineState) {
|
|
12
13
|
ConnectionOnlineState["OFFLINE"] = "offline";
|
|
@@ -99,10 +100,17 @@ let AbstractConnection = (() => {
|
|
|
99
100
|
const connection = await this.getConnection();
|
|
100
101
|
return connection.schema;
|
|
101
102
|
}
|
|
103
|
+
getOrderedSchemaObjects(schema) {
|
|
104
|
+
const objects = Object.keys(schema.objects).map((key) => schema.objects[key]);
|
|
105
|
+
if (SchemaModelOrderingPreference.getValue() === SchemaModelOrderValue.ALPHABETICAL) {
|
|
106
|
+
return _.sortBy(objects, (object) => (object.label || object.name || '').toLowerCase());
|
|
107
|
+
}
|
|
108
|
+
return objects;
|
|
109
|
+
}
|
|
102
110
|
async reload() {
|
|
103
111
|
await this.schema_models_collection.load(async () => {
|
|
104
112
|
const schema = await this.getSchema();
|
|
105
|
-
return
|
|
113
|
+
return this.getOrderedSchemaObjects(schema);
|
|
106
114
|
});
|
|
107
115
|
}
|
|
108
116
|
async init() { }
|
|
@@ -133,7 +141,7 @@ let AbstractConnection = (() => {
|
|
|
133
141
|
}
|
|
134
142
|
async getSchemaModelDefinitions() {
|
|
135
143
|
const schema = await this.getSchema();
|
|
136
|
-
return
|
|
144
|
+
return this.getOrderedSchemaObjects(schema).map((o) => {
|
|
137
145
|
return new SchemaModelDefinition({
|
|
138
146
|
definition: o,
|
|
139
147
|
connection: this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractConnection.js","sourceRoot":"","sources":["../../src/core/AbstractConnection.ts"],"names":[],"mappings":";AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"AbstractConnection.js","sourceRoot":"","sources":["../../src/core/AbstractConnection.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAI5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAChH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAa5B,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,0CAAiB,CAAA;AACnB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;IAEqB,kBAAkB;;sBAAS,YAAY;;;;;;;;;;sBAAvC,kBAAmB,SAAQ,WAAwC;YAE3E,IAAS,KAAK,4FAAS;YAAvB,IAAS,KAAK,iGAAS;YACvB,IAAS,WAAW,kGAAwB;YAA5C,IAAS,WAAW,uGAAwB;YAOxD,YAAmB,OAAkC;gBACnD,KAAK,EAAE,CAAC;gBADS,YAAO,IAVN,mDAAkB,EAUnB,OAAO,EAA2B;gBARhC,2GAAc;gBACd,4KAAmC;gBAExD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