@elyx-code/project-logic-tree 0.0.6719 → 0.0.6721

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
@@ -129970,9 +129970,7 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
129970
129970
  _.SyncOutputs
129971
129971
  )
129972
129972
  )) {
129973
- if (this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log(
129974
- "[syncOutputs] Starting syncOutputs for variable declaration"
129975
- ), !this.checkCanEdit(this, i))
129973
+ if (!this.checkCanEdit(this, i))
129976
129974
  return ie.warn(
129977
129975
  `[syncOutputs] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
129978
129976
  ), i == null || i.attemptAutoclose(_.SyncOutputs, this.id), {
@@ -129988,27 +129986,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
129988
129986
  if (this.dataType.isObject()) {
129989
129987
  const y = [
129990
129988
  ...this.dataType.entity.properties
129991
- ], m = y.filter((b) => TD(b) ? !this.outputs.find(
129989
+ ];
129990
+ y.filter((b) => TD(b) ? !this.outputs.find(
129992
129991
  (E) => {
129993
129992
  var w;
129994
129993
  return ((w = E.declaration) == null ? void 0 : w.id) === (b == null ? void 0 : b.id);
129995
129994
  }
129996
- ) : !1);
129997
- this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && (console.log(
129998
- "Unused properties for variable declaration:",
129999
- m.map((b) => `${b.id} -- ${b.name}`)
130000
- ), console.log(
130001
- "Existing outputs:",
130002
- this.outputs.map(
130003
- (b) => {
130004
- var E;
130005
- return `${(E = b.declaration) == null ? void 0 : E.id} -- ${b.declaration ? b.declaration.name : "no-declaration"}`;
130006
- }
130007
- )
130008
- ), console.log(
130009
- "All properties:",
130010
- y.map((b) => `${b.id} -- ${b.name}`)
130011
- ), console.log("Data type inferred:", this.dataType.inferred)), m.map((b) => {
129995
+ ) : !1).map((b) => {
130012
129996
  const E = {
130013
129997
  id: x.UUID.uuid(),
130014
129998
  version: x.UUID.uuid(),
@@ -130023,22 +130007,12 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
130023
130007
  declaration: b == null ? void 0 : b.toJSON(),
130024
130008
  index: b.index,
130025
130009
  writesValues: []
130026
- };
130027
- this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log("Creating output for property:", b);
130028
- const w = he(
130010
+ }, w = he(
130029
130011
  E,
130030
130012
  this.project
130031
130013
  );
130032
- return this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log("Created output for property:", w), w.hydrateAncestors(), this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log("Hydrated output for property:", w), i == null || i.add(w, H.Added), this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log("Registered output in cs:", w), w.setParent(this, i), this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log("Set parent, of output for property:", w), w.initChildren(i), this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log("Initialized output for property:", w), this.addOutput(w, i), this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log("Added output for property to parent:", w), w;
130033
- }), this.id === "0f7ef123-9320-4a91-9bb6-32f4e77e52f2" && console.log(
130034
- "Final outputs:",
130035
- this.outputs.map(
130036
- (b) => {
130037
- var E;
130038
- return `${(E = b.declaration) == null ? void 0 : E.id} -- ${b.declaration ? b.declaration.name : "no-declaration"}`;
130039
- }
130040
- )
130041
- ), this.outputs.filter(
130014
+ return w.hydrateAncestors(), i == null || i.add(w, H.Added), w.setParent(this, i), w.initChildren(i), this.addOutput(w, i), w;
130015
+ }), this.outputs.filter(
130042
130016
  (b) => !b.declaration
130043
130017
  ).forEach((b) => {
130044
130018
  const E = y.find(
@@ -170922,8 +170896,6 @@ ${$D}`
170922
170896
  return this.activeVersion = !0, this.project.subscribeInstance(this), this;
170923
170897
  }
170924
170898
  unsubscribe() {
170925
- if (this.id === "3bdd91d6-fa96-403f-af98-532a1110b28a")
170926
- throw console.log("[PropertyState.unsubscribe] debug"), new Error("[PropertyState.unsubscribe] debug");
170927
170899
  return this.project.unsubscribeInstance(this), this;
170928
170900
  }
170929
170901
  metaSync(i, n = this.project.addChangeSet(
@@ -175041,7 +175013,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
175041
175013
  _.RemoveAllPropertiesImplement
175042
175014
  )
175043
175015
  )) {
175044
- return this.checkCanEdit(this, i) ? (this.allPropertiesImplement && (this.allPropertiesImplement.remove({ ignoreUpstream: !0 }, i), i == null || i.add(this, H.Affected), this.allPropertiesImplement = null), i == null || i.attemptAutoclose(
175016
+ return this.checkCanEdit(this, i) ? (this.allPropertiesImplement && (this.properties.find((n) => {
175017
+ var s;
175018
+ return n.id === ((s = this.allPropertiesImplement) == null ? void 0 : s.id);
175019
+ }) || this.allPropertiesImplement.remove({ ignoreUpstream: !0 }, i), i == null || i.add(this, H.Affected), this.allPropertiesImplement = null), i == null || i.attemptAutoclose(
175045
175020
  _.RemoveAllPropertiesImplement,
175046
175021
  this.id
175047
175022
  ), this) : (ie.warn(
@@ -176305,8 +176280,6 @@ const b3 = {
176305
176280
  return (!this.instances[i.id] || this.instances[i.id] !== i) && (this.instances[i.id] = i), this;
176306
176281
  }
176307
176282
  subscribeDeletedInstance(i) {
176308
- if (i.id === "3bdd91d6-fa96-403f-af98-532a1110b28a")
176309
- throw console.log("[ProjectState.subscribeDeletedInstance] Debug"), new Error("[ProjectState.subscribeDeletedInstance] Debug");
176310
176283
  return (!this.deletedInstances[i.id] || this.deletedInstances[i.id] !== i) && (this.deletedInstances[i.id] = i), this;
176311
176284
  }
176312
176285
  subscribeBuiltInInstance(i) {
@@ -176319,8 +176292,6 @@ const b3 = {
176319
176292
  return this;
176320
176293
  }
176321
176294
  unsubscribeInstance(i) {
176322
- if (i.id === "3bdd91d6-fa96-403f-af98-532a1110b28a")
176323
- throw console.log("[ProjectState.unsubscribeInstance] debug"), new Error("[ProjectState.unsubscribeInstance] debug");
176324
176295
  return delete this.instances[i.id], this;
176325
176296
  }
176326
176297
  unsubscribeDeletedInstance(i) {
@@ -182770,18 +182741,7 @@ function _ji(o) {
182770
182741
  ...Ht.includes(o.type) ? o.outputs.flatMap(
182771
182742
  (y) => GD(y)
182772
182743
  ) : []
182773
- ]).filter((y) => y.id !== o.id);
182774
- o.id === "966f3907-ae42-4064-a3b7-8a3e15fef5ca" && console.log(
182775
- `flattenedValueReaders:
182776
- - ${i.map(
182777
- (y) => `${y.id} - ${se(
182778
- y,
182779
- p.project
182780
- )}`
182781
- ).join(`
182782
- - `)}`
182783
- );
182784
- const n = D(
182744
+ ]).filter((y) => y.id !== o.id), n = D(
182785
182745
  i.reduce((y, m) => {
182786
182746
  const v = Rm(m);
182787
182747
  return v ? [...y, v] : y;
@@ -182797,13 +182757,7 @@ function _ji(o) {
182797
182757
  return [y];
182798
182758
  })
182799
182759
  );
182800
- if (o.id === "966f3907-ae42-4064-a3b7-8a3e15fef5ca" && console.log(
182801
- `callers:
182802
- - ${n.map(
182803
- (y) => `${y.id} - ${se(y, p.project)}`
182804
- ).join(`
182805
- - `)}`
182806
- ), n.length === 1) {
182760
+ if (n.length === 1) {
182807
182761
  const y = n[0];
182808
182762
  if (Qt.includes(y.type))
182809
182763
  return y.parent.type === d.Loop ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-code/project-logic-tree",
3
- "version": "0.0.6719",
3
+ "version": "0.0.6721",
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",