@elyx-code/project-logic-tree 0.0.6431 → 0.0.6433

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/index.js CHANGED
@@ -34878,7 +34878,7 @@ const Nt = class Nt extends Vr {
34878
34878
  // Meta
34879
34879
  g(this, "initialized", !1);
34880
34880
  g(this, "startedInitialization", !1);
34881
- this.initialData = i, this.project = a, this.id = i.id, this.isList = i.isList, this.asType = i.asType, this.options = i.options, this.index = i.index || null, this.parentRelationType = i.parentRelationType, this.inferred = i.inferred || !1, this.like = i.like || !1, this.implementationChooseOne = i.implementationChooseOne || !1, this.staticEntities = i.staticEntities, this.interactiveEntities = i.interactiveEntities, this.actionEntities = i.actionEntities;
34881
+ this.initialData = i, this.project = a, this.id = i.id, this.isList = i.isList, this.asType = i.asType, this.options = i.options, this.index = i.index ?? null, this.parentRelationType = i.parentRelationType, this.inferred = i.inferred || !1, this.like = i.like || !1, this.implementationChooseOne = i.implementationChooseOne || !1, this.staticEntities = i.staticEntities, this.interactiveEntities = i.interactiveEntities, this.actionEntities = i.actionEntities;
34882
34882
  }
34883
34883
  // Creates a new empty entity transfer object
34884
34884
  static new(i = null) {
@@ -35278,7 +35278,7 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
35278
35278
  if (this.metaSync(i, a), this.version = i.version, this.createdAt = i.createdAt, this.author = i.author, this.deleted = i.deleted, this.previousVersion = i.previousVersion, this.unsubscribeFromDependencies(), i.parent) {
35279
35279
  const o = Z(i.parent), p = this.project.get(o), e = this.parent;
35280
35280
  if (e && e.id !== (p == null ? void 0 : p.id) && this.removeFromParent(a), p)
35281
- this.setParent(p, a);
35281
+ this.setParent(p, a), this.addSelfToProject(a);
35282
35282
  else
35283
35283
  throw a == null || a.attemptAutoclose("update-with-shallow-transfer", this.id), new Error(
35284
35284
  `${this.type} with id '${this.id}' has a 'parent' reference '${o}' that isn't found in the project`
@@ -35289,7 +35289,23 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
35289
35289
  const o = Z(i.entity), p = this.project.get(o);
35290
35290
  p && (p.type === f.DefinitionEntity && p.parent === this || this.setEntity(p, null));
35291
35291
  }
35292
- return this.captureVersion(), this.subscribeToDependencies(), a == null || a.attemptAutoclose("update-with-shallow-transfer", this.id), this;
35292
+ return i.andChildrenGroup && (this.andChildrenGroup = i.andChildrenGroup.map(
35293
+ (o) => {
35294
+ const p = Z(o), e = this.project.get(p);
35295
+ if (e && !(e.type === f.DataType && e.parent === this))
35296
+ return e;
35297
+ }
35298
+ ).filter(
35299
+ (o) => !!o
35300
+ )), i.orChildrenGroup && (this.orChildrenGroup = i.orChildrenGroup.map(
35301
+ (o) => {
35302
+ const p = Z(o), e = this.project.get(p);
35303
+ if (e && !(e.type === f.DataType && e.parent === this))
35304
+ return e;
35305
+ }
35306
+ ).filter(
35307
+ (o) => !!o
35308
+ )), this.captureVersion(), this.subscribeToDependencies(), a == null || a.attemptAutoclose("update-with-shallow-transfer", this.id), this;
35293
35309
  }
35294
35310
  hydrateAncestors() {
35295
35311
  const i = [], a = [], o = [], p = [];
@@ -47091,7 +47107,7 @@ const Jt = class Jt extends Vr {
47091
47107
  // Meta
47092
47108
  g(this, "initialized", !1);
47093
47109
  g(this, "startedInitialization", !1);
47094
- this.initialData = i, this.project = a, this.id = i.id, this.x = i.x, this.y = i.y, this.index = i.index || null;
47110
+ this.initialData = i, this.project = a, this.id = i.id, this.x = i.x, this.y = i.y, this.index = i.index ?? null;
47095
47111
  }
47096
47112
  // Creates a new empty entity transfer object
47097
47113
  static new(i = null) {
@@ -47469,7 +47485,7 @@ If an entity is called by another, they must be in the same scope, which means t
47469
47485
  if (this.metaSync(i, a), this.version = i.version, this.createdAt = i.createdAt, this.author = i.author, this.deleted = i.deleted, this.previousVersion = i.previousVersion, i.parent) {
47470
47486
  const o = Z(i.parent), p = this.project.get(o), e = this.parent;
47471
47487
  if (e && e.id !== (p == null ? void 0 : p.id) && this.removeFromParent(a), p)
47472
- this.setParent(p, a);
47488
+ this.setParent(p, a), this.addSelfToProject(a);
47473
47489
  else
47474
47490
  throw a == null || a.attemptAutoclose("update-with-shallow-transfer", this.id), new Error(
47475
47491
  `${this.type} with id '${this.id}' has a 'parent' reference '${o}' that isn't found in the project`
@@ -47484,7 +47500,15 @@ If an entity is called by another, they must be in the same scope, which means t
47484
47500
  );
47485
47501
  p && this.setDeclaration(p);
47486
47502
  }
47487
- return i.calledByEntry.forEach((o) => {
47503
+ return i.andChildrenGroup && (this.andChildrenGroup = i.andChildrenGroup.map((o) => {
47504
+ const p = Z(o), e = this.project.get(p);
47505
+ if (e && !(e.type === f.Condition && e.parent === this))
47506
+ return e;
47507
+ }).filter((o) => !!o)), i.orChildrenGroup && (this.orChildrenGroup = i.orChildrenGroup.map((o) => {
47508
+ const p = Z(o), e = this.project.get(p);
47509
+ if (e && !(e.type === f.Condition && e.parent === this))
47510
+ return e;
47511
+ }).filter((o) => !!o)), i.calledByEntry.forEach((o) => {
47488
47512
  const p = Z(o), e = this.project.get(p);
47489
47513
  e && (this.addEntryCaller(e, a), e.addCall(this, a));
47490
47514
  }), [...this.calledByEntry].forEach((o) => {
@@ -112530,7 +112554,7 @@ class GRt extends mt {
112530
112554
  staticEntities: ((x = i.declaration.dataType) == null ? void 0 : x.staticEntities) ?? null,
112531
112555
  interactiveEntities: ((G = i.declaration.dataType) == null ? void 0 : G.interactiveEntities) ?? null,
112532
112556
  actionEntities: ((K = i.declaration.dataType) == null ? void 0 : K.actionEntities) ?? null,
112533
- index: ((q = i.declaration.dataType) == null ? void 0 : q.index) || null,
112557
+ index: ((q = i.declaration.dataType) == null ? void 0 : q.index) ?? null,
112534
112558
  isList: ((re = i.declaration.dataType) == null ? void 0 : re.isList) || !1,
112535
112559
  andChildrenGroup: null,
112536
112560
  orChildrenGroup: null,