@elyx-code/project-logic-tree 0.0.6059 → 0.0.6060

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
@@ -36875,6 +36875,10 @@ const Ie = class Ie {
36875
36875
  c(this, "project");
36876
36876
  // Meta
36877
36877
  c(this, "initialized", !1);
36878
+ // Always false at this level
36879
+ // But it can be set to true in the extending class
36880
+ // Or when the full project state is loaded
36881
+ c(this, "autoexecutable", !1);
36878
36882
  this.initialData = e, this.project = t, this.id = e.id, this.version = e.version, this.name = e.name, this.description = e.description;
36879
36883
  }
36880
36884
  /*
@@ -45310,57 +45314,58 @@ class kk extends te {
45310
45314
  }
45311
45315
  }
45312
45316
  class qk extends te {
45313
- constructor(e) {
45314
- super(Zr, e);
45317
+ constructor(t) {
45318
+ super(Zr, t);
45319
+ c(this, "autoexecutable", !0);
45315
45320
  }
45316
- getEntityToMatchInputMap(e) {
45317
- return e.inputs.find(
45318
- (t) => {
45319
- var i;
45320
- return ((i = t.declaration) == null ? void 0 : i.id) === w.operation[Se.Validate].inputs.entityToMatch.id;
45321
+ getEntityToMatchInputMap(t) {
45322
+ return t.inputs.find(
45323
+ (i) => {
45324
+ var a;
45325
+ return ((a = i.declaration) == null ? void 0 : a.id) === w.operation[Se.Validate].inputs.entityToMatch.id;
45321
45326
  }
45322
45327
  ) || null;
45323
45328
  }
45324
- getDataToValidateInputMap(e) {
45325
- return e.inputs.find(
45326
- (t) => {
45327
- var i;
45328
- return ((i = t.declaration) == null ? void 0 : i.id) === w.operation[Se.Validate].inputs.dataToValidate.id;
45329
+ getDataToValidateInputMap(t) {
45330
+ return t.inputs.find(
45331
+ (i) => {
45332
+ var a;
45333
+ return ((a = i.declaration) == null ? void 0 : a.id) === w.operation[Se.Validate].inputs.dataToValidate.id;
45329
45334
  }
45330
45335
  ) || null;
45331
45336
  }
45332
- getOutputDataOutputMap(e) {
45333
- return e.outputs.find(
45334
- (t) => {
45335
- var i;
45336
- return ((i = t.declaration) == null ? void 0 : i.id) === w.operation[Se.Validate].outputs.outputEntity.id;
45337
+ getOutputDataOutputMap(t) {
45338
+ return t.outputs.find(
45339
+ (i) => {
45340
+ var a;
45341
+ return ((a = i.declaration) == null ? void 0 : a.id) === w.operation[Se.Validate].outputs.outputEntity.id;
45337
45342
  }
45338
45343
  ) || null;
45339
45344
  }
45340
- getEntityToMatch(e) {
45341
- let t = null;
45342
- if (e.readsValue) {
45343
- const a = e.readsValue.getDataType();
45344
- a && a.entity && a.entity.type === n.CustomEntity && (t = a.entity);
45345
+ getEntityToMatch(t) {
45346
+ let i = null;
45347
+ if (t.readsValue) {
45348
+ const s = t.readsValue.getDataType();
45349
+ s && s.entity && s.entity.type === n.CustomEntity && (i = s.entity);
45345
45350
  }
45346
- const i = e.getDefaultValue();
45347
- return !t && i && i.valueAsType && !Array.isArray(i.valueAsType) && i.valueAsType.type === n.CustomEntity && (t = i.valueAsType), t;
45348
- }
45349
- syncOperationInstance(e) {
45350
- const t = this.getEntityToMatchInputMap(e);
45351
- t && this.syncEntityToMatchInputMapDataType(t);
45352
- const i = this.getDataToValidateInputMap(e);
45353
- i && this.syncDataToValidateInputMapDataType(i);
45354
- const a = this.getOutputDataOutputMap(e);
45355
- return a && this.syncOutputDataOutputMapDataType(a), e;
45356
- }
45357
- syncEntityToMatchInputMapDataType(e) {
45358
- var i, a, s;
45359
- if (((i = e.declaration) == null ? void 0 : i.id) !== w.operation[Se.Validate].inputs.entityToMatch.id)
45351
+ const a = t.getDefaultValue();
45352
+ return !i && a && a.valueAsType && !Array.isArray(a.valueAsType) && a.valueAsType.type === n.CustomEntity && (i = a.valueAsType), i;
45353
+ }
45354
+ syncOperationInstance(t) {
45355
+ const i = this.getEntityToMatchInputMap(t);
45356
+ i && this.syncEntityToMatchInputMapDataType(i);
45357
+ const a = this.getDataToValidateInputMap(t);
45358
+ a && this.syncDataToValidateInputMapDataType(a);
45359
+ const s = this.getOutputDataOutputMap(t);
45360
+ return s && this.syncOutputDataOutputMapDataType(s), t;
45361
+ }
45362
+ syncEntityToMatchInputMapDataType(t) {
45363
+ var a, s, o;
45364
+ if (((a = t.declaration) == null ? void 0 : a.id) !== w.operation[Se.Validate].inputs.entityToMatch.id)
45360
45365
  return null;
45361
- if (!e.dataType) {
45362
- const o = {
45363
- id: e.id + "--infered-data-type",
45366
+ if (!t.dataType) {
45367
+ const l = {
45368
+ id: t.id + "--infered-data-type",
45364
45369
  version: 1,
45365
45370
  type: n.DataType,
45366
45371
  isList: !1,
@@ -45373,33 +45378,33 @@ class qk extends te {
45373
45378
  like: !0,
45374
45379
  inferred: !0,
45375
45380
  defaultValue: null,
45376
- parent: e.toReference()
45377
- }, l = E(
45378
- o,
45379
- e.project
45381
+ parent: t.toReference()
45382
+ }, u = E(
45383
+ l,
45384
+ t.project
45380
45385
  );
45381
- l.setParent(e), l.initChildren(), e.setDataType(l);
45386
+ u.setParent(t), u.initChildren(), t.setDataType(u);
45382
45387
  }
45383
- (a = e.dataType) == null || a.sync({
45388
+ (s = t.dataType) == null || s.sync({
45384
45389
  inferred: !0,
45385
45390
  like: !1,
45386
45391
  asType: !0
45387
45392
  });
45388
- const t = this.getEntityToMatch(e);
45389
- return (s = e.dataType) == null || s.setEntity(t), e.dataType;
45393
+ const i = this.getEntityToMatch(t);
45394
+ return (o = t.dataType) == null || o.setEntity(i), t.dataType;
45390
45395
  }
45391
- syncDataToValidateInputMapDataType(e) {
45392
- var s, o, l;
45393
- if (((s = e.declaration) == null ? void 0 : s.id) !== w.operation[Se.Validate].inputs.dataToValidate.id)
45396
+ syncDataToValidateInputMapDataType(t) {
45397
+ var o, l, u;
45398
+ if (((o = t.declaration) == null ? void 0 : o.id) !== w.operation[Se.Validate].inputs.dataToValidate.id)
45394
45399
  return null;
45395
- const t = this.getEntityToMatchInputMap(
45396
- e.parent
45400
+ const i = this.getEntityToMatchInputMap(
45401
+ t.parent
45397
45402
  );
45398
- if (!t || !this.getEntityToMatch(t))
45403
+ if (!i || !this.getEntityToMatch(i))
45399
45404
  return null;
45400
- if (!e.dataType) {
45401
- const u = {
45402
- id: e.id + "--infered-data-type",
45405
+ if (!t.dataType) {
45406
+ const p = {
45407
+ id: t.id + "--infered-data-type",
45403
45408
  version: 1,
45404
45409
  type: n.DataType,
45405
45410
  isList: !1,
@@ -45412,35 +45417,35 @@ class qk extends te {
45412
45417
  like: !0,
45413
45418
  inferred: !0,
45414
45419
  defaultValue: null,
45415
- parent: e.toReference()
45416
- }, p = E(
45417
- u,
45418
- e.project
45420
+ parent: t.toReference()
45421
+ }, h = E(
45422
+ p,
45423
+ t.project
45419
45424
  );
45420
- p.setParent(e), p.initChildren(), e.setDataType(p);
45425
+ h.setParent(t), h.initChildren(), t.setDataType(h);
45421
45426
  }
45422
- (o = e.dataType) == null || o.sync({
45427
+ (l = t.dataType) == null || l.sync({
45423
45428
  inferred: !0,
45424
45429
  like: !0,
45425
45430
  asType: !1
45426
45431
  });
45427
- const a = this.getEntityToMatch(
45428
- t
45432
+ const s = this.getEntityToMatch(
45433
+ i
45429
45434
  );
45430
- return (l = e.dataType) == null || l.setEntity(a), e.dataType;
45435
+ return (u = t.dataType) == null || u.setEntity(s), t.dataType;
45431
45436
  }
45432
- syncOutputDataOutputMapDataType(e) {
45433
- var s, o, l;
45434
- if (((s = e.declaration) == null ? void 0 : s.id) !== w.operation[Se.Validate].outputs.outputEntity.id)
45437
+ syncOutputDataOutputMapDataType(t) {
45438
+ var o, l, u;
45439
+ if (((o = t.declaration) == null ? void 0 : o.id) !== w.operation[Se.Validate].outputs.outputEntity.id)
45435
45440
  return null;
45436
- const t = this.getEntityToMatchInputMap(
45437
- e.parent
45441
+ const i = this.getEntityToMatchInputMap(
45442
+ t.parent
45438
45443
  );
45439
- if (!t || !this.getEntityToMatch(t))
45444
+ if (!i || !this.getEntityToMatch(i))
45440
45445
  return null;
45441
- if (!e.dataType) {
45442
- const u = {
45443
- id: e.id + "--infered-data-type",
45446
+ if (!t.dataType) {
45447
+ const p = {
45448
+ id: t.id + "--infered-data-type",
45444
45449
  version: 1,
45445
45450
  type: n.DataType,
45446
45451
  isList: !1,
@@ -45453,34 +45458,34 @@ class qk extends te {
45453
45458
  like: !0,
45454
45459
  inferred: !0,
45455
45460
  defaultValue: null,
45456
- parent: e.toReference()
45457
- }, p = E(
45458
- u,
45459
- e.project
45461
+ parent: t.toReference()
45462
+ }, h = E(
45463
+ p,
45464
+ t.project
45460
45465
  );
45461
- p.setParent(e), p.initChildren(), e.setDataType(p);
45466
+ h.setParent(t), h.initChildren(), t.setDataType(h);
45462
45467
  }
45463
- (o = e.dataType) == null || o.sync({
45468
+ (l = t.dataType) == null || l.sync({
45464
45469
  inferred: !0,
45465
45470
  like: !0,
45466
45471
  asType: !1
45467
45472
  });
45468
- const a = this.getEntityToMatch(
45469
- t
45473
+ const s = this.getEntityToMatch(
45474
+ i
45470
45475
  );
45471
- return (l = e.dataType) == null || l.setEntity(a), e.dataType;
45476
+ return (u = t.dataType) == null || u.setEntity(s), t.dataType;
45472
45477
  }
45473
45478
  /*
45474
45479
  Based on the entity that the input map is declaration,
45475
45480
  we dynamically infer its data type
45476
45481
  */
45477
- inferInputMapDataType(e) {
45478
- var t, i;
45479
- return ((t = e.declaration) == null ? void 0 : t.id) === w.operation[Se.Validate].inputs.entityToMatch.id ? this.syncEntityToMatchInputMapDataType(e) : ((i = e.declaration) == null ? void 0 : i.id) === w.operation[Se.Validate].inputs.dataToValidate.id ? this.syncDataToValidateInputMapDataType(e) : null;
45482
+ inferInputMapDataType(t) {
45483
+ var i, a;
45484
+ return ((i = t.declaration) == null ? void 0 : i.id) === w.operation[Se.Validate].inputs.entityToMatch.id ? this.syncEntityToMatchInputMapDataType(t) : ((a = t.declaration) == null ? void 0 : a.id) === w.operation[Se.Validate].inputs.dataToValidate.id ? this.syncDataToValidateInputMapDataType(t) : null;
45480
45485
  }
45481
- inferOutputMapDataType(e) {
45482
- var t;
45483
- return ((t = e.declaration) == null ? void 0 : t.id) === w.operation[Se.Validate].outputs.outputEntity.id ? this.syncOutputDataOutputMapDataType(e) : null;
45486
+ inferOutputMapDataType(t) {
45487
+ var i;
45488
+ return ((i = t.declaration) == null ? void 0 : i.id) === w.operation[Se.Validate].outputs.outputEntity.id ? this.syncOutputDataOutputMapDataType(t) : null;
45484
45489
  }
45485
45490
  }
45486
45491
  class Jk extends te {