@elyx-code/project-logic-tree 0.0.6232 → 0.0.6234

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.
@@ -1,4 +1,4 @@
1
- import { IDataTypeReference, IProperty, IInputMap, IInputMapReference, EntityType, IChildEntity, IChildEntityTransfer, IBaseEntityTransfer, IDataType, IFunctionDeclaration, IFunctionDeclarationTransfer, IBuiltInBaseEntity, IBuiltInBaseEntityTransfer, IDefinitionEntity, IDefinitionEntityTransfer, IOperation, IOperationTransfer, StringAutogenerationOptions, NumberAutogenerationOptions, BooleanAutogenerationOptions, DateAutogenerationOptions, UUIDAutogenerationOptions, ValueAutogenerationOptions, EntityId, IGenericBase, IChildEntityShallowTransfer, IDefinitionEntityReference, IFunctionDeclarationReference, IOperationReference, IBaseEntity_meta, IBaseEntityShallowTransfer, IBuiltInBaseEntityReference, IPrimitiveEntityReference, IBaseEntityGenerationTarget, IChildEntityGenerationTarget, EntityWithValueReference, EntityWithValue, IVariableDeclaration, IArgumentDeclaration, IReturnDeclaration, IValueDescriptor, IOutputMap, IVariableDeclarationReference, IArgumentDeclarationReference, IReturnDeclarationReference, IPropertyReference, IValueDescriptorReference, IOutputMapReference, IVariableInstance, IVariableInstanceReference } from '.';
1
+ import { IDataTypeReference, IProperty, IInputMap, IInputMapReference, EntityType, IChildEntity, IChildEntityTransfer, IBaseEntityTransfer, IDataType, IFunctionDeclaration, IFunctionDeclarationTransfer, IBuiltInBaseEntity, IBuiltInBaseEntityTransfer, IDefinitionEntity, IDefinitionEntityTransfer, StringAutogenerationOptions, NumberAutogenerationOptions, BooleanAutogenerationOptions, DateAutogenerationOptions, UUIDAutogenerationOptions, ValueAutogenerationOptions, EntityId, IGenericBase, IChildEntityShallowTransfer, IDefinitionEntityReference, IFunctionDeclarationReference, IBaseEntity_meta, IBaseEntityShallowTransfer, IBuiltInBaseEntityReference, IPrimitiveEntityReference, IBaseEntityGenerationTarget, IChildEntityGenerationTarget, EntityWithValueReference, EntityWithValue, IVariableDeclaration, IArgumentDeclaration, IReturnDeclaration, IValueDescriptor, IOutputMap, IVariableDeclarationReference, IArgumentDeclarationReference, IReturnDeclarationReference, IPropertyReference, IValueDescriptorReference, IOutputMapReference, IVariableInstance, IVariableInstanceReference, IActionDescriptor, IActionDescriptorReference, IActionDescriptorTransfer, IOperation, IFunctionCall, IOperationReference, IFunctionCallReference, IOperationTransfer, IFunctionCallTransfer } from '.';
2
2
 
3
3
  export declare enum PrimitiveTypes {
4
4
  EntityTemplate = "entity-template",
@@ -23,9 +23,9 @@ export type UntypedObjectValue = {
23
23
  export type UntypedList = UntypedValue[];
24
24
  export type UntypedObjectList = UntypedObjectValue[];
25
25
  export type LiteralValueType = string | number | boolean | null | Date | UntypedValue;
26
- export type LiteralValueAsTypeTransfer = IDefinitionEntity | IDefinitionEntityTransfer | IFunctionDeclaration | IFunctionDeclarationTransfer | IOperation | IOperationTransfer;
27
- export type LiteralValueAsTypeReference = IDefinitionEntityReference | IFunctionDeclarationReference | IOperationReference;
28
- export type LiteralValueAsType = IDefinitionEntity | IFunctionDeclaration | IOperation;
26
+ export type LiteralValueAsTypeTransfer = IDefinitionEntity | IDefinitionEntityTransfer | IFunctionDeclaration | IFunctionDeclarationTransfer | IOperation | IOperationTransfer | IFunctionCall | IFunctionCallTransfer | IActionDescriptor | IActionDescriptorTransfer | IBuiltInBaseEntity | IBuiltInBaseEntityTransfer;
27
+ export type LiteralValueAsTypeReference = IDefinitionEntityReference | IFunctionDeclarationReference | IOperationReference | IFunctionCallReference | IActionDescriptorReference | IBuiltInBaseEntityReference;
28
+ export type LiteralValueAsType = IDefinitionEntity | IFunctionDeclaration | IOperation | IFunctionCall | IActionDescriptor | IBuiltInBaseEntity;
29
29
  export interface ILiteralValue_base {
30
30
  id: EntityId;
31
31
  type: EntityType.LiteralValue;
package/dist/index.js CHANGED
@@ -6461,7 +6461,7 @@ const rA = {
6461
6461
  orChildrenGroup: null,
6462
6462
  isList: !1,
6463
6463
  entity: Rt,
6464
- asType: !1,
6464
+ asType: !0,
6465
6465
  parent: e1
6466
6466
  }, r1 = {
6467
6467
  id: "persisted-built-in-base-entity-database-property-parent-ref-id",
@@ -49917,7 +49917,7 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
49917
49917
  "add-input-declaration"
49918
49918
  )
49919
49919
  )) {
49920
- return this.inputsDeclarations.includes(e) ? (t == null || t.attemptAutoclose("add-input-declaration", this.id), this) : (this.inputsDeclarations.push(e), this.syncInputMaps(t), t == null || t.attemptAutoclose("add-input-declaration", this.id), this);
49920
+ return this.inputsDeclarations.includes(e) ? (t == null || t.attemptAutoclose("add-input-declaration", this.id), this) : (this.inputsDeclarations.push(e), t == null || t.attemptAutoclose("add-input-declaration", this.id), this);
49921
49921
  }
49922
49922
  removeInputDeclaration(e, t = this.project.addChangeSet(
49923
49923
  new E(
@@ -50764,17 +50764,25 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
50764
50764
  h.setParent(this, e), h.initChildren(e), e == null || e.add(h, A.Added), h.addSelfToProject(e), t.push(this), r.push(h);
50765
50765
  }
50766
50766
  }), this.inputs.forEach((o) => {
50767
- if (!this.inputsDeclarations.find(
50768
- (u) => {
50769
- var h;
50770
- return u.id === ((h = o.declaration) == null ? void 0 : h.id);
50767
+ if (o.declaration) {
50768
+ if (!this.inputsDeclarations.find(
50769
+ (u) => {
50770
+ var h;
50771
+ return u.id === ((h = o.declaration) == null ? void 0 : h.id);
50772
+ }
50773
+ )) {
50774
+ const { updated: u, removed: h } = o.remove(
50775
+ { ignoreUpstream: !1 },
50776
+ e
50777
+ );
50778
+ u.push(...u), s.push(...h);
50771
50779
  }
50772
- )) {
50773
- const { updated: u, removed: h } = o.remove(
50780
+ } else {
50781
+ const { updated: l, removed: u } = o.remove(
50774
50782
  { ignoreUpstream: !1 },
50775
50783
  e
50776
50784
  );
50777
- u.push(...u), s.push(...h);
50785
+ t.push(...l), s.push(...u);
50778
50786
  }
50779
50787
  }), e == null || e.attemptAutoclose("sync-input-maps", this.id), {
50780
50788
  updated: p(t),
@@ -56849,15 +56857,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
56849
56857
  // Calls the 'subscribeDependents' method with itself as the only argument on any dependencies the current entity has
56850
56858
  // It could be multiple
56851
56859
  subscribeToDependencies() {
56852
- return !this.valueAsTypeSingle && !this.valueAsTypeList ? this : (this.valueAsTypeList && Array.isArray(this.valueAsTypeList) ? this.valueAsTypeList.forEach(
56853
- (e) => e.subscribeDependents([
56860
+ return !this.valueAsTypeSingle && !this.valueAsTypeList ? this : (this.valueAsTypeList && Array.isArray(this.valueAsTypeList) ? this.valueAsTypeList.forEach((e) => {
56861
+ e.type !== n.BuiltInBaseEntity && e.subscribeDependents([
56854
56862
  {
56855
56863
  entity: this,
56856
56864
  field: "value-as-type-list"
56857
56865
  /* ValueAsTypeList */
56858
56866
  }
56859
- ])
56860
- ) : this.valueAsTypeSingle && this.valueAsTypeSingle.subscribeDependents([
56867
+ ]);
56868
+ }) : this.valueAsTypeSingle && this.valueAsTypeSingle.type !== n.BuiltInBaseEntity && this.valueAsTypeSingle.subscribeDependents([
56861
56869
  {
56862
56870
  entity: this,
56863
56871
  field: "value-as-type-single"
@@ -57400,7 +57408,6 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
57400
57408
  name: this.name,
57401
57409
  autogeneration: this.autogeneration,
57402
57410
  value: this.value,
57403
- // @ts-ignore
57404
57411
  valueAsTypeSingle: this.valueAsTypeSingle ? this.project.getBuiltIn(this.valueAsTypeSingle.id) ? this.valueAsTypeSingle.toJSON() : this.valueAsTypeSingle.toJSONClone({ ...e, newId: null }) : null,
57405
57412
  valueAsTypeList: this.valueAsTypeSingle && Array.isArray(this.valueAsTypeSingle) ? this.valueAsTypeSingle.map(
57406
57413
  (c) => this.project.getBuiltIn(c.id) ? c.toJSON() : c.toJSONClone({ ...e, newId: null })