@elyx-code/project-logic-tree 0.0.6113 → 0.0.6115
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/dist/definitions/built-in-base-entities/conditions/index.d.ts +1 -0
- package/dist/definitions/built-in-base-entities/entities/execution/index.d.ts +1 -1
- package/dist/definitions/built-in-base-entities/entities/index.d.ts +3 -0
- package/dist/definitions/built-in-base-entities/global-events/index.d.ts +1 -0
- package/dist/definitions/built-in-base-entities/index.d.ts +2 -0
- package/dist/definitions/built-in-base-entities/loops/index.d.ts +3 -0
- package/dist/definitions/built-in-base-entities/operations/index.d.ts +1 -0
- package/dist/definitions/built-in-base-entities/primitive-entities.d.ts +1 -0
- package/dist/definitions/built-in-base-entities/value-descriptors/index.d.ts +3 -0
- package/dist/definitions/mock/default-mock/entities/alt-relational-database/properties.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/default-relational-database/properties.d.ts +2 -2
- package/dist/definitions/mock/default-mock/entities/get-company-by-id-endpoint/properties.d.ts +3 -3
- package/dist/definitions/mock/default-mock/events/project-loaded/get-bitcoin-price/get-bitcoin-price-http-call.d.ts +2 -2
- package/dist/definitions/mock/default-mock/functions/concurrency-and-waits/wait.d.ts +2 -2
- package/dist/definitions/mock/default-mock/functions/manual-hello-world-loop/loop/break-statement.d.ts +1 -2
- package/dist/definitions/mock/default-mock/functions/manual-hello-world-loop/loop/loop.d.ts +2 -2
- package/dist/definitions/types/index.d.ts +4 -0
- package/dist/definitions/types/variable.d.ts +2 -2
- package/dist/index.js +25358 -21568
- package/dist/index.umd.cjs +253 -253
- package/dist/tree/state/action-descriptor/action-descriptor.d.ts +18 -14
- package/dist/tree/state/argument-declaration/argument-declaration.d.ts +16 -12
- package/dist/tree/state/argument-declaration/validation/validation-schema.d.ts +4 -4
- package/dist/tree/state/base.d.ts +34 -8
- package/dist/tree/state/break-statement/break-statement.d.ts +17 -14
- package/dist/tree/state/built-in-base-entity/built-in-base-entity.d.ts +10 -10
- package/dist/tree/state/built-in-base-entity/validation-schema.d.ts +10 -10
- package/dist/tree/state/condition/condition.d.ts +18 -13
- package/dist/tree/state/continue-statement/continue-statement.d.ts +17 -14
- package/dist/tree/state/custom-entity/custom-entity.d.ts +21 -13
- package/dist/tree/state/custom-entity/validation/validation-schema.d.ts +12 -12
- package/dist/tree/state/data-type/data-type.d.ts +16 -12
- package/dist/tree/state/function-call/function-call.d.ts +18 -13
- package/dist/tree/state/function-declaration/function-declaration.d.ts +17 -13
- package/dist/tree/state/function-declaration/validation/validation-schema.d.ts +4 -4
- package/dist/tree/state/global-event/global-event.d.ts +18 -13
- package/dist/tree/state/input-map/input-map.d.ts +19 -15
- package/dist/tree/state/installed-project/installed-project.d.ts +17 -13
- package/dist/tree/state/internal-call/internal-call.d.ts +22 -13
- package/dist/tree/state/literal-value/literal-value.d.ts +16 -12
- package/dist/tree/state/loop/loop.d.ts +18 -13
- package/dist/tree/state/operation/operation.d.ts +18 -13
- package/dist/tree/state/output-map/output-map.d.ts +20 -16
- package/dist/tree/state/primitive-entity/primitive-entity.d.ts +10 -10
- package/dist/tree/state/primitive-entity/validation/validation-schema.d.ts +10 -10
- package/dist/tree/state/project/project.d.ts +17 -12
- package/dist/tree/state/project/project.test.d.ts +1 -0
- package/dist/tree/state/property/property.d.ts +17 -12
- package/dist/tree/state/property/validation/validation-schema.d.ts +12 -12
- package/dist/tree/state/return-declaration/return-declaration.d.ts +16 -12
- package/dist/tree/state/return-statement/return-statement.d.ts +17 -14
- package/dist/tree/state/search/search.d.ts +17 -13
- package/dist/tree/state/store.d.ts +1 -0
- package/dist/tree/state/value-descriptor/value-descriptor.d.ts +17 -13
- package/dist/tree/state/variable-declaration/validation/validation-schema.d.ts +4 -4
- package/dist/tree/state/variable-declaration/variable-declaration.d.ts +17 -13
- package/dist/tree/state/variable-instance/validation/validation-schema.d.ts +4 -4
- package/dist/tree/state/variable-instance/variable-instance.d.ts +17 -13
- package/dist/tree/utils/index.d.ts +96 -4
- package/dist/tree/utils/traverser.d.ts +17 -0
- package/dist/tree/utils/traverser.test.d.ts +1 -0
- package/dist/tree/utils/uuid.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementGenerationTarget, ElementShallowTransfer, EntityId, EntityType, EntityVersion, IVariableInstance, IVariableInstanceGenerationTarget, IVariableInstanceReference, IVariableInstanceShallowTransfer, IVariableInstanceTransfer, VariableInstanceTypesUnion } from '../../../definitions';
|
|
2
2
|
import { ZodError } from 'zod';
|
|
3
|
-
import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithValueClass, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality, ValueReadingEntityClass, ValueWritingEntityClass } from '../base';
|
|
3
|
+
import { BaseCanvasDraggableState, BaseState, CallableEntityClass, ChildEntityState, EntityWithValueClass, IEditableEntityPersistanceRepository, IEntityJSONCloneOptions, IEntityPersistanceOptions, IEntityRecursionOptions, PassThroughCallableEntityClass, UserManagedEntityStateFunctionality, ValueReadingEntityClass, ValueWritingEntityClass } from '../base';
|
|
4
4
|
import { CallableEntityState, CallerEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, IChangeSet, PassThroughCallableEntityState, ValueReadingEntityState, ValueWritingEntityState } from '../types';
|
|
5
5
|
import { ProjectState } from '../project';
|
|
6
6
|
import { VariableInputMapState } from '../input-map';
|
|
@@ -36,6 +36,7 @@ export declare class VariableInstanceState implements IVariableInstance, BaseSta
|
|
|
36
36
|
initialized: boolean;
|
|
37
37
|
suggestion: boolean;
|
|
38
38
|
constructor(initialVariableDeclarationData: IVariableInstance | IVariableInstanceTransfer, parentProjectState: ProjectState);
|
|
39
|
+
static repository: IEditableEntityPersistanceRepository;
|
|
39
40
|
static MUTABLE_BASE_PROPERTIES: string[];
|
|
40
41
|
static INMUTABLE_BASE_PROPERTIES: string[];
|
|
41
42
|
static BASE_PROPERTIES: string[];
|
|
@@ -58,6 +59,8 @@ export declare class VariableInstanceState implements IVariableInstance, BaseSta
|
|
|
58
59
|
errors: EntityGenerationError[];
|
|
59
60
|
modifiedData: Partial<IVariableInstanceGenerationTarget>;
|
|
60
61
|
};
|
|
62
|
+
hydrateAncestors(): IChangeSet<VariableInstanceState>;
|
|
63
|
+
afterAllChildrenInitialized(): IChangeSet<VariableInstanceState>;
|
|
61
64
|
addSelfToProject(): IChangeSet<VariableInstanceState>;
|
|
62
65
|
get calledBy(): CallerEntityState[];
|
|
63
66
|
get usedInputs(): VariableInputMapState[];
|
|
@@ -86,10 +89,10 @@ export declare class VariableInstanceState implements IVariableInstance, BaseSta
|
|
|
86
89
|
subscribe(): VariableInstanceState;
|
|
87
90
|
unsubscribe(): VariableInstanceState;
|
|
88
91
|
sync(data: Partial<IVariableInstance>): VariableInstanceState;
|
|
89
|
-
load(): Promise<VariableInstanceState>;
|
|
90
|
-
create(): Promise<VariableInstanceState>;
|
|
91
|
-
update(
|
|
92
|
-
delete(): Promise<VariableInstanceState>;
|
|
92
|
+
load(_?: IEntityPersistanceOptions): Promise<VariableInstanceState>;
|
|
93
|
+
create(_?: IEntityPersistanceOptions): Promise<VariableInstanceState>;
|
|
94
|
+
update(_?: IEntityPersistanceOptions): Promise<VariableInstanceState>;
|
|
95
|
+
delete(_?: IEntityPersistanceOptions): Promise<VariableInstanceState>;
|
|
93
96
|
remove({ ignoreUpstream, seenEntities, }?: {
|
|
94
97
|
ignoreUpstream: boolean;
|
|
95
98
|
seenEntities: Set<string>;
|
|
@@ -103,14 +106,15 @@ export declare class VariableInstanceState implements IVariableInstance, BaseSta
|
|
|
103
106
|
affected: EntityState[];
|
|
104
107
|
self: VariableInstanceState;
|
|
105
108
|
};
|
|
106
|
-
toFlat(seenEntities?: Set<
|
|
107
|
-
toFlatIds(seenEntities?: Set<
|
|
108
|
-
toJSON(): IVariableInstanceTransfer;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
toFlat(seenEntities?: Set<EntityId>): EntityState[];
|
|
110
|
+
toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
|
|
111
|
+
toJSON(seenEntities?: Set<EntityId>): IVariableInstanceTransfer | IVariableInstanceReference;
|
|
112
|
+
toJSONClone(options?: IEntityJSONCloneOptions): IVariableInstanceTransfer | IVariableInstanceReference;
|
|
113
|
+
toReference(options?: IEntityRecursionOptions): IVariableInstanceReference;
|
|
114
|
+
toShallowJSON(options?: IEntityRecursionOptions): IVariableInstanceShallowTransfer;
|
|
115
|
+
toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
|
|
112
116
|
toGenerationTarget(): IVariableInstanceGenerationTarget;
|
|
113
|
-
toFlatGenerationTarget(seenEntities?: Set<
|
|
117
|
+
toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
|
|
114
118
|
clearErrors(): VariableInstanceState;
|
|
115
119
|
validate(): {
|
|
116
120
|
success: boolean;
|
|
@@ -121,7 +125,7 @@ export declare class VariableInstanceState implements IVariableInstance, BaseSta
|
|
|
121
125
|
getShallowErrors(): EntityError[];
|
|
122
126
|
getDefaultValue(): LiteralValueState | null;
|
|
123
127
|
setDefaultValue(value: LiteralValueState): VariableInstanceState;
|
|
124
|
-
clone(
|
|
128
|
+
clone(parent?: EntryPointEntityState | ProjectState | null, newId?: string | null, subscribe?: boolean): VariableInstanceState;
|
|
125
129
|
addInternalCall(internalCall: InternalCallState): VariableInstanceState;
|
|
126
130
|
setDeclaration(declaration: VariableDeclarationState): VariableInstanceState;
|
|
127
131
|
generateUnusedInputs(): VariableInputMapState[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEntityNames, ElementGenerationTarget, ElementShallowTransfer, ElementTransfer, EntityType, Element, IGenericReference, ValueReadingEntityTypesUnion } from '../../definitions';
|
|
1
|
+
import { BaseEntityNames, ElementGenerationTarget, ElementShallowTransfer, ElementTransfer, EntityType, Element, IGenericReference, EntityId, ValueReadingEntityTypesUnion, ValueReadingEntity, IActionDescriptor, IActionDescriptorTransfer, IArgumentDeclaration, IArgumentDeclarationTransfer, DraggableElement, Reference, IBreakStatement, IBreakStatementTransfer, IBuiltInBaseEntity, IBuiltInBaseEntityTransfer, ICondition, IConditionTransfer, IContinueStatement, IContinueStatementTransfer, CallableEntity, CallableEntityTransfer, CallerEntity, CallerEntityTransfer, ICustomEntity, ICustomEntityTransfer, IDataType, IDataTypeTransfer, IFunctionCall, IFunctionCallTransfer, IFunctionDeclaration, IFunctionDeclarationTransfer, IGlobalEvent, IGlobalEventTransfer, IInputMap, IInputMapTransfer, IInstalledProject, IInstalledProjectTransfer, IInternalCall, IInternalCallTransfer, ILiteralValue, ILiteralValueTransfer, ILoop, ILoopTransfer, IOperation, IOperationTransfer, IOutputMap, IOutputMapTransfer, IPrimitiveEntity, IPrimitiveEntityTransfer, IProject, IProjectTransfer, IProperty, IPropertyTransfer, IReturnDeclaration, IReturnDeclarationTransfer, IReturnStatement, IReturnStatementTransfer, ISearch, ISearchTransfer, IValueDescriptor, IValueDescriptorTransfer, IVariableDeclarationTransfer, IVariableDeclaration, IVariableInstance, IVariableInstanceTransfer, DraggableElementTransfer, ValueReadingEntityTransfer } from '../../definitions';
|
|
2
2
|
import { DraggableCallableEntityState, CanvasEntityState, EntityState, EntityWithLogicScopeState, EntryPointEntityState, DraggableExecutableEntityState, DraggablePassThroughCallableEntityState, ValueReadingEntityState, ValueWritingEntityState, EntityWithValueState, VariableState, BuiltInBaseEntityState, TerminationState, InstalledProjectState, ExecutableEntityState, ValueDescriptorState, CallableEntityState, CallerEntityState, PassThroughCallableEntityState, PrimitiveEntityState, InternalCallState } from '../state';
|
|
3
3
|
import { FunctionCallState } from '../state/function-call';
|
|
4
4
|
import { InputMapState } from '../state/input-map';
|
|
@@ -28,12 +28,13 @@ export declare function flattenCanvasAncestorsUntil(entity: CanvasEntityState, u
|
|
|
28
28
|
list: CanvasEntityState[];
|
|
29
29
|
last: CanvasEntityState | null;
|
|
30
30
|
};
|
|
31
|
-
export declare function getCommonChildren(entityA: CanvasEntityState, entityB: CanvasEntityState, seenEntities?: Set<
|
|
31
|
+
export declare function getCommonChildren(entityA: CanvasEntityState, entityB: CanvasEntityState, seenEntities?: Set<EntityId>): CanvasEntityState[];
|
|
32
32
|
export declare function checkIsBranchDependentButNotDirectlyOnBranch(branchA: CanvasEntityState, branchB: CanvasEntityState): boolean;
|
|
33
33
|
export declare function checkIsBranchDependentOnBranch(branchA: CanvasEntityState, branchB: CanvasEntityState): boolean;
|
|
34
34
|
export declare function getParentEntryPoint(entity: EntityState): EntryPointEntityState | null;
|
|
35
35
|
export declare function getCommonAncestor(entityA: EntityState, entityB: EntityState): EntityState | null;
|
|
36
36
|
export declare function getParentCanvasEntity(entity: EntityState): CanvasEntityState | null;
|
|
37
|
+
export declare function getParentCanvasEntityFromTransfer(entity: Element | ElementTransfer | IGenericReference, allKnownEntities: Record<EntityId, Element | ElementTransfer>): DraggableElement | DraggableElementTransfer | null;
|
|
37
38
|
export declare function getParentCallableEntity(entity: EntityState): CallableEntityState | null;
|
|
38
39
|
export declare function getParentPassthroughCallableEntity(entity: EntityState): PassThroughCallableEntityState | null;
|
|
39
40
|
export declare function getParentCallerEntity(entity: EntityState): CallerEntityState | null;
|
|
@@ -59,12 +60,101 @@ export declare function flattenElementCallsOnTheSameScope(element: CallerEntityS
|
|
|
59
60
|
export declare function flattenVariableWrites(variable: VariableState, seenVariables?: Set<string>): VariableState[];
|
|
60
61
|
export declare function flattenVariableReads(variable: VariableState, seenVariables?: Set<string>): VariableState[];
|
|
61
62
|
export declare function flattenVariables(element: CanvasEntityState, seenVariables?: Set<string>): VariableState[];
|
|
62
|
-
export declare function flattenDerivedCanvasEntities(entity: CanvasEntityState, seenEntities?: Set<
|
|
63
|
+
export declare function flattenDerivedCanvasEntities(entity: CanvasEntityState, seenEntities?: Set<EntityId>): CanvasEntityState[];
|
|
63
64
|
export declare function flattenCalls(entities: CallableEntityState[]): CallableEntityState[];
|
|
64
65
|
export declare function flattenProjectElements(project: ProjectState): EntityState[];
|
|
65
66
|
export declare function findReferenceToSelfInList(element: EntityState, elements: EntityState[]): EntityState[];
|
|
66
67
|
export declare function findReferencesToSelfInProject(element: EntityState): EntityState[];
|
|
68
|
+
export declare function enrichFromKnownEntities(entity: ElementTransfer | Element | IGenericReference | EntityId, allKnownEntities: Record<EntityId, Element | ElementTransfer>): Element | ElementTransfer | null;
|
|
69
|
+
export declare function getRelatedCanvasElementsOnTheLeftFromTransfer(entity: DraggableElement | DraggableElementTransfer, allKnownEntities: Record<EntityId, Element | ElementTransfer>): (DraggableElement | DraggableElementTransfer)[];
|
|
67
70
|
export declare function getRelatedCanvasElementsOnTheLeft(entity: CanvasEntityState): CanvasEntityState[];
|
|
71
|
+
export declare function getCalledBy(entity: CallableEntityState | CallableEntity | CallableEntityTransfer): (CallerEntityState | CallerEntity | CallerEntityTransfer)[];
|
|
72
|
+
export declare function flattenActionDescriptor(entity: IActionDescriptor | IActionDescriptorTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
73
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
74
|
+
}): (Element | ElementTransfer)[];
|
|
75
|
+
export declare function flattenArgumentDeclaration(entity: IArgumentDeclaration | IArgumentDeclarationTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
76
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
77
|
+
}): (Element | ElementTransfer)[];
|
|
78
|
+
export declare function flattenBreakStatement(entity: IBreakStatement | IBreakStatementTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
79
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
80
|
+
}): (Element | ElementTransfer)[];
|
|
81
|
+
export declare function flattenBuiltInBaseEntity(entity: IBuiltInBaseEntity | IBuiltInBaseEntityTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
82
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
83
|
+
}): (Element | ElementTransfer)[];
|
|
84
|
+
export declare function flattenCondition(entity: ICondition | IConditionTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
85
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
86
|
+
}): (Element | ElementTransfer)[];
|
|
87
|
+
export declare function flattenContinueStatement(entity: IContinueStatement | IContinueStatementTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
88
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
89
|
+
}): (Element | ElementTransfer)[];
|
|
90
|
+
export declare function flattenCustomEntity(entity: ICustomEntity | ICustomEntityTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
91
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
92
|
+
}): (Element | ElementTransfer)[];
|
|
93
|
+
export declare function flattenDataType(entity: IDataType | IDataTypeTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
94
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
95
|
+
}): (Element | ElementTransfer)[];
|
|
96
|
+
export declare function flattenFunctionCall(entity: IFunctionCall | IFunctionCallTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
97
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
98
|
+
}): (Element | ElementTransfer)[];
|
|
99
|
+
export declare function flattenFunctionDeclaration(entity: IFunctionDeclaration | IFunctionDeclarationTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
100
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
101
|
+
}): (Element | ElementTransfer)[];
|
|
102
|
+
export declare function flattenGlobalEvent(entity: IGlobalEvent | IGlobalEventTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
103
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
104
|
+
}): (Element | ElementTransfer)[];
|
|
105
|
+
export declare function flattenInputMap(entity: IInputMap | IInputMapTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
106
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
107
|
+
}): (Element | ElementTransfer)[];
|
|
108
|
+
export declare function flattenInstalledProject(entity: IInstalledProject | IInstalledProjectTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
109
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
110
|
+
}): (Element | ElementTransfer)[];
|
|
111
|
+
export declare function flattenInternalCall(entity: IInternalCall | IInternalCallTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
112
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
113
|
+
}): (Element | ElementTransfer)[];
|
|
114
|
+
export declare function flattenLiteralValue(entity: ILiteralValue | ILiteralValueTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
115
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
116
|
+
}): (Element | ElementTransfer)[];
|
|
117
|
+
export declare function flattenLoop(entity: ILoop | ILoopTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
118
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
119
|
+
}): (Element | ElementTransfer)[];
|
|
120
|
+
export declare function flattenOperation(entity: IOperation | IOperationTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
121
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
122
|
+
}): (Element | ElementTransfer)[];
|
|
123
|
+
export declare function flattenOutputMap(entity: IOutputMap | IOutputMapTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
124
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
125
|
+
}): (Element | ElementTransfer)[];
|
|
126
|
+
export declare function flattenPrimitiveEntity(entity: IPrimitiveEntity | IPrimitiveEntityTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
127
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
128
|
+
}): (Element | ElementTransfer)[];
|
|
129
|
+
export declare function flattenProject(entity: IProject | IProjectTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
130
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
131
|
+
}): (Element | ElementTransfer)[];
|
|
132
|
+
export declare function flattenProperty(entity: IProperty | IPropertyTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
133
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
134
|
+
}): (Element | ElementTransfer)[];
|
|
135
|
+
export declare function flattenReturnDeclaration(entity: IReturnDeclaration | IReturnDeclarationTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
136
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
137
|
+
}): (Element | ElementTransfer)[];
|
|
138
|
+
export declare function flattenReturnStatement(entity: IReturnStatement | IReturnStatementTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
139
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
140
|
+
}): (Element | ElementTransfer)[];
|
|
141
|
+
export declare function flattenSearch(entity: ISearch | ISearchTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
142
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
143
|
+
}): (Element | ElementTransfer)[];
|
|
144
|
+
export declare function flattenValueDescriptor(entity: IValueDescriptor | IValueDescriptorTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
145
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
146
|
+
}): (Element | ElementTransfer)[];
|
|
147
|
+
export declare function flattenVariableDeclaration(entity: IVariableDeclaration | IVariableDeclarationTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
148
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
149
|
+
}): (Element | ElementTransfer)[];
|
|
150
|
+
export declare function flattenVariableInstance(entity: IVariableInstance | IVariableInstanceTransfer, seenEntities?: Set<EntityId>, options?: {
|
|
151
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
152
|
+
}): (Element | ElementTransfer)[];
|
|
153
|
+
export declare const ALL_BUILT_IN_ENTITY_IDS: EntityId[];
|
|
154
|
+
export declare function flattenEntity(entity: Element | ElementTransfer | Reference, seenEntities?: Set<EntityId>, options?: {
|
|
155
|
+
ignoreBuiltInBaseEntities?: boolean;
|
|
156
|
+
}): (Element | ElementTransfer)[];
|
|
157
|
+
export declare function getDependencyIds(element: ElementTransfer, allKnownEntities: Record<EntityId, ElementTransfer>): Set<EntityId>;
|
|
68
158
|
export declare function getEntityArgumentDeclarations(entity: ExecutableEntityState): (ArgumentDeclarationState | ValueDescriptorState)[];
|
|
69
159
|
export declare function getUsedArgFromDeclaration(argumentDeclaration: ArgumentDeclarationState, entity: ConditionState | FunctionCallState | OperationState): InputMapState | null;
|
|
70
160
|
export declare function getEntityInputMaps(entity: DraggablePassThroughCallableEntityState): InputMapState[];
|
|
@@ -72,6 +162,7 @@ export declare function getEntityReturnDeclarations(entity: TerminationState | F
|
|
|
72
162
|
export declare function getUsedReturnFromDeclaration(returnDeclaration: ReturnDeclarationState, entity: ConditionState | FunctionCallState | OperationState): OutputMapState | null;
|
|
73
163
|
export declare function getEntityOutputMaps(entity: DraggablePassThroughCallableEntityState): OutputMapState[];
|
|
74
164
|
export declare function getCanvasEntityDerivedFromValueReadingEntity(valueReadingEntity: ValueReadingEntityState): CanvasEntityState | null;
|
|
165
|
+
export declare function getCanvasEntityDerivedFromValueReadingEntityFromTransfer(valueReadingEntity: ValueReadingEntity | ValueReadingEntityTransfer, allKnownEntities: Record<EntityId, ElementTransfer>): DraggableElement | DraggableElementTransfer | null;
|
|
75
166
|
export declare function getCanvasEntitiesDerivedFromInternalCalls(entity: VariableState): CanvasEntityState[];
|
|
76
167
|
export declare function getCanvasEntitiesDerivedFromWrites(valueWrittingEntity: ValueWritingEntityState): CanvasEntityState[];
|
|
77
168
|
export declare function filterOutDuplicateEntities(entities: (EntityState | Element | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget)[]): (Element | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget | EntityState)[];
|
|
@@ -97,7 +188,7 @@ export declare function getHeadIfPartOfDetachedBranch(entity: CanvasEntityState,
|
|
|
97
188
|
export declare function flattenDetachedBranch(entity: CanvasEntityState): CanvasEntityState[];
|
|
98
189
|
export declare function checkIsMethod(entity: EntityState): boolean;
|
|
99
190
|
export declare function mergeListOfEntities(oldErrors: EntityState[], newErrors: EntityState[]): EntityState[];
|
|
100
|
-
export declare function getPrototypeByType(type: EntityType): typeof
|
|
191
|
+
export declare function getPrototypeByType(type: EntityType): typeof ProjectState | typeof InputMapState | typeof OutputMapState | typeof SearchState | typeof ReturnDeclarationState | typeof ConditionState | typeof OperationState | typeof InstalledProjectState | typeof CustomEntityState | typeof PropertyState | typeof FunctionDeclarationState | typeof FunctionCallState | typeof VariableDeclarationState | typeof VariableInstanceState | typeof ArgumentDeclarationState | typeof LoopState | typeof ReturnStatementState | typeof BuiltInBaseEntityState | null;
|
|
101
192
|
export declare function getScopeOwner(entity: EntityState | Element | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | ProjectState | null;
|
|
102
193
|
export declare function getRootEntryPointScopeOwner(entity: EntityState | Element | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | null;
|
|
103
194
|
export declare function checkIsNestedScope(parent: EntityWithLogicScopeState | ProjectState, child: EntityWithLogicScopeState | ProjectState, project: ProjectState): boolean;
|
|
@@ -173,3 +264,4 @@ export declare function getDatabaseEntities(project: ProjectState): CustomEntity
|
|
|
173
264
|
export declare function resolvePrimaryKeyProperty(entity: CustomEntityState): PropertyState | null;
|
|
174
265
|
export declare function getColumnProperties(entity: CustomEntityState): PropertyState[];
|
|
175
266
|
export declare function getDatabaseEntity(entity: CustomEntityState): CustomEntityState | null;
|
|
267
|
+
export declare function resolveClonedEntityProject(newParent: EntityState | null, self: EntityState): ProjectState;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementTransfer, Element, EntityId } from '../../definitions';
|
|
2
|
+
|
|
3
|
+
export declare enum TraverseStrategy {
|
|
4
|
+
Hirarchy = "hirarchy",
|
|
5
|
+
ReverseHirarchy = "reverse-hirarchy"
|
|
6
|
+
}
|
|
7
|
+
export declare class Traverser {
|
|
8
|
+
private strategy;
|
|
9
|
+
order: EntityId[];
|
|
10
|
+
flatRecord: Record<EntityId, Element | ElementTransfer>;
|
|
11
|
+
constructor(root: Element | ElementTransfer, strategy?: TraverseStrategy);
|
|
12
|
+
private flatten;
|
|
13
|
+
private moveEntityAfterDependencies;
|
|
14
|
+
private orderEntities;
|
|
15
|
+
private visitEntities;
|
|
16
|
+
visit(callback: (entity: Element | ElementTransfer) => void): Traverser;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ElementGenerationTarget, EntityType } from '../../definitions';
|
|
2
|
+
import { EntityState } from '../state';
|
|
2
3
|
import { ProjectState } from '../state/project/project';
|
|
3
4
|
|
|
4
5
|
export declare function createSemanticId(entityName: string, entityType: EntityType, project: ProjectState): string;
|
|
5
6
|
export declare function suggestNewIdForEntity(generatedEntity: ElementGenerationTarget, projectState: ProjectState): string;
|
|
7
|
+
export declare function generateIdFromStrategy(entity: EntityState, project: ProjectState, strategy?: 'uuid' | 'semantic'): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elyx-code/project-logic-tree",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6115",
|
|
4
4
|
"author": "Sergio Herrero",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",
|