@elyx-code/project-logic-tree 0.0.6984 → 0.0.6985

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.d.ts CHANGED
@@ -11967,7 +11967,7 @@ export declare enum BaseValueDescriptorIds {
11967
11967
  removeTest(options: YieldOptions & {
11968
11968
  skipValidate?: boolean;
11969
11969
  }): Promise<ITest>;
11970
- copyEntities(entities: UserManagedElementShallowTransfer[], options?: YieldOptions): Promise<ChangeSet>;
11970
+ copyEntities(payload: ICanvasCopyPayload, options?: YieldOptions): Promise<ChangeSet>;
11971
11971
  resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
11972
11972
  publish(): Promise<void>;
11973
11973
  loadGivenPublication(publicationId: string): Promise<IPublication>;
@@ -18177,6 +18177,11 @@ export declare enum BaseValueDescriptorIds {
18177
18177
  calledByEntry: (EntryPointEntity | EntryPointEntityTransfer | EntryPointEntityReference)[];
18178
18178
  }
18179
18179
 
18180
+ export declare interface ICanvasCopyPayload {
18181
+ elyx_entities: UserManagedElementShallowTransfer[];
18182
+ elyx_project_id: string;
18183
+ }
18184
+
18180
18185
  export declare interface IChangeSet<TSelf extends {
18181
18186
  id: string;
18182
18187
  type: EntityType;
@@ -18647,7 +18652,7 @@ export declare enum BaseValueDescriptorIds {
18647
18652
  removeTest(options: YieldOptions & {
18648
18653
  skipValidate?: boolean;
18649
18654
  }): Promise<ITest>;
18650
- copyEntities(entities: UserManagedElementShallowTransfer[], options?: YieldOptions): Promise<ChangeSet>;
18655
+ copyEntities(payload: ICanvasCopyPayload, options: YieldOptions): Promise<ChangeSet>;
18651
18656
  resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
18652
18657
  publish(): Promise<void>;
18653
18658
  loadGivenPublication(publicationId: string): Promise<IPublication>;
package/dist/index.js CHANGED
@@ -105302,9 +105302,9 @@ function* Npi() {
105302
105302
  }
105303
105303
  }
105304
105304
  function Ppi(s, p) {
105305
- const i = new Set(s.map((a) => a.toLowerCase())), r = p > 0 ? "secondary-db" : "main";
105305
+ const i = new Set(s.map((a) => a.toLowerCase())), r = p > 0 ? "secondarydb" : "main";
105306
105306
  for (const a of Npi()) {
105307
- const c = a ? `${r}-${a}` : r;
105307
+ const c = a ? `${r}${a}` : r;
105308
105308
  if (Vpi(c) && !i.has(c))
105309
105309
  return c;
105310
105310
  }
@@ -105318,9 +105318,11 @@ function xpi(s, p) {
105318
105318
  (m) => m.id === ie["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id
105319
105319
  )
105320
105320
  ), r = i.find((h) => {
105321
- const m = h.properties.find((A) => A.implements.find(
105322
- (_) => _.id === ie["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id
105323
- )), b = m == null ? void 0 : m.getDefaultValue();
105321
+ const m = h.properties.find(
105322
+ (A) => A.implements.find(
105323
+ (_) => _.id === ie["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id
105324
+ )
105325
+ ), b = m == null ? void 0 : m.getDefaultValue();
105324
105326
  return (b == null ? void 0 : b.value) === !0;
105325
105327
  });
105326
105328
  if (!r && i.length) {
@@ -105351,7 +105353,10 @@ function xpi(s, p) {
105351
105353
  E,
105352
105354
  s.project
105353
105355
  );
105354
- return A.hydrateAncestors(), A.setParent(m, p), A.addSelfToProject(p), p == null || p.add(A, W.Added), A.initChildren(p), p || A.captureVersion(), {
105356
+ return A.hydrateAncestors(), A.setParent(m, p), A.addSelfToProject(p), p == null || p.add(
105357
+ A,
105358
+ W.Added
105359
+ ), A.initChildren(p), p || A.captureVersion(), {
105355
105360
  newEntities: [A]
105356
105361
  };
105357
105362
  }
@@ -105373,11 +105378,9 @@ function xpi(s, p) {
105373
105378
  return {
105374
105379
  newEntities: []
105375
105380
  };
105376
- const e = c.properties.find(
105377
- (h) => h.implements.find(
105378
- (m) => m.id === ie["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id
105379
- )
105380
- ), f = e == null ? void 0 : e.defaultValue;
105381
+ const e = c.properties.find((h) => h.implements.find(
105382
+ (m) => m.id === ie["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id
105383
+ )), f = e == null ? void 0 : e.defaultValue;
105381
105384
  if (f)
105382
105385
  f.metaSync({ value: !0 }, p);
105383
105386
  else if (e != null && e.dataType) {
@@ -105402,7 +105405,10 @@ function xpi(s, p) {
105402
105405
  h,
105403
105406
  s.project
105404
105407
  );
105405
- m.hydrateAncestors(), m.setParent(e, p), m.addSelfToProject(p), p == null || p.add(m, W.Added), m.initChildren(p), p || m.captureVersion();
105408
+ m.hydrateAncestors(), m.setParent(e, p), m.addSelfToProject(p), p == null || p.add(
105409
+ m,
105410
+ W.Added
105411
+ ), m.initChildren(p), p || m.captureVersion();
105406
105412
  }
105407
105413
  return {
105408
105414
  newEntities: [c]
@@ -105478,7 +105484,10 @@ function $pi(s, p) {
105478
105484
  J,
105479
105485
  s.project
105480
105486
  );
105481
- ee.hydrateAncestors(), ee.setParent(K, p), ee.addSelfToProject(p), p == null || p.add(ee, W.Added), ee.initChildren(p), (K == null ? void 0 : K.defaultValue).setValueAsTypeSingle(U || null, p), r.push(ee), p || ee.captureVersion();
105487
+ ee.hydrateAncestors(), ee.setParent(K, p), ee.addSelfToProject(p), p == null || p.add(
105488
+ ee,
105489
+ W.Added
105490
+ ), ee.initChildren(p), (K == null ? void 0 : K.defaultValue).setValueAsTypeSingle(U || null, p), r.push(ee), p || ee.captureVersion();
105482
105491
  return;
105483
105492
  } else
105484
105493
  K != null && K.defaultValue && !(K != null && K.defaultValue.valueAsTypeSingle) && (K == null || K.defaultValue.setValueAsTypeSingle(
@@ -105513,7 +105522,10 @@ function $pi(s, p) {
105513
105522
  const oe = s.project.getBuiltIn(
105514
105523
  ie["primitive-entity"].number.id
105515
105524
  );
105516
- (m = se.dataType) == null || m.setEntity(oe, p), re && (p || (b = se.dataType) == null || b.captureVersion());
105525
+ (m = se.dataType) == null || m.setEntity(
105526
+ oe,
105527
+ p
105528
+ ), re && (p || (b = se.dataType) == null || b.captureVersion());
105517
105529
  return;
105518
105530
  }
105519
105531
  case ie["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id: {
@@ -105557,7 +105569,10 @@ function $pi(s, p) {
105557
105569
  ae,
105558
105570
  s.project
105559
105571
  );
105560
- ye.hydrateAncestors(), ye.setParent(Y, p), ye.addSelfToProject(p), p == null || p.add(
105572
+ ye.hydrateAncestors(), ye.setParent(
105573
+ Y,
105574
+ p
105575
+ ), ye.addSelfToProject(p), p == null || p.add(
105561
105576
  ye,
105562
105577
  W.Added
105563
105578
  ), ye.initChildren(p), z = !0;
@@ -105581,7 +105596,13 @@ function $pi(s, p) {
105581
105596
  Y,
105582
105597
  s.project
105583
105598
  );
105584
- z.hydrateAncestors(), z.setParent(K, p), z.addSelfToProject(p), p == null || p.add(z, W.Added), z.initChildren(p), re = !0;
105599
+ z.hydrateAncestors(), z.setParent(
105600
+ K,
105601
+ p
105602
+ ), z.addSelfToProject(p), p == null || p.add(
105603
+ z,
105604
+ W.Added
105605
+ ), z.initChildren(p), re = !0;
105585
105606
  }
105586
105607
  const oe = Ppi(
105587
105608
  U,
@@ -105608,7 +105629,10 @@ function $pi(s, p) {
105608
105629
  Y,
105609
105630
  s.project
105610
105631
  );
105611
- z.hydrateAncestors(), z.setParent(J, p), z.addSelfToProject(p), p == null || p.add(
105632
+ z.hydrateAncestors(), z.setParent(
105633
+ J,
105634
+ p
105635
+ ), z.addSelfToProject(p), p == null || p.add(
105612
105636
  z,
105613
105637
  W.Added
105614
105638
  ), z.initChildren(p), r.push(z), ee = !0;
@@ -105636,7 +105660,12 @@ function $pi(s, p) {
105636
105660
  re.parent = M.toReference(), re.name = fe.Date, re.id = x.UUID.uuid(), U = ge(
105637
105661
  re,
105638
105662
  s.project
105639
- ), U.hydrateAncestors(), U.setParent(M, p), U.addSelfToProject(p), U.initChildren(p), p == null || p.add(
105663
+ ), U.hydrateAncestors(), U.setParent(
105664
+ M,
105665
+ p
105666
+ ), U.addSelfToProject(
105667
+ p
105668
+ ), U.initChildren(p), p == null || p.add(
105640
105669
  U,
105641
105670
  W.Added
105642
105671
  );
@@ -105659,9 +105688,11 @@ function $pi(s, p) {
105659
105688
  },
105660
105689
  p
105661
105690
  );
105662
- const K = s.properties.find((re) => re.implements.find(
105663
- (oe) => oe.id === ie["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.definition.id
105664
- ));
105691
+ const K = s.properties.find(
105692
+ (re) => re.implements.find(
105693
+ (oe) => oe.id === ie["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.definition.id
105694
+ )
105695
+ );
105665
105696
  if (!K)
105666
105697
  throw new Error(
105667
105698
  `[handleAfterEntityImplementationSideEffects] Definition property not found for implemented base entity ${ie["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id} with id ${s.id}`
@@ -105675,7 +105706,11 @@ function $pi(s, p) {
105675
105706
  ), se.hydrateAncestors(), se.setParent(
105676
105707
  K,
105677
105708
  p
105678
- ), se.addSelfToProject(p), se.initChildren(p), p == null || p.add(
105709
+ ), se.addSelfToProject(
105710
+ p
105711
+ ), se.initChildren(
105712
+ p
105713
+ ), p == null || p.add(
105679
105714
  se,
105680
105715
  W.Added
105681
105716
  );
@@ -105684,10 +105719,16 @@ function $pi(s, p) {
105684
105719
  }
105685
105720
  }), {
105686
105721
  self: s,
105687
- updated: C(i),
105722
+ updated: C(
105723
+ i
105724
+ ),
105688
105725
  added: C(r),
105689
- removed: C(a),
105690
- affected: C(c)
105726
+ removed: C(
105727
+ a
105728
+ ),
105729
+ affected: C(
105730
+ c
105731
+ )
105691
105732
  };
105692
105733
  }
105693
105734
  function tV(s, p, i, r) {
@@ -105703,7 +105744,11 @@ function tV(s, p, i, r) {
105703
105744
  }
105704
105745
  function VK(s, p) {
105705
105746
  return p.entities.find((a) => {
105706
- const c = a.properties, e = c.map((E) => E.name), f = s.every((E) => e.includes(E)), h = e.filter((E) => !s.includes(E)), m = c.every(
105747
+ const c = a.properties, e = c.map((E) => E.name), f = s.every(
105748
+ (E) => e.includes(E)
105749
+ ), h = e.filter(
105750
+ (E) => !s.includes(E)
105751
+ ), m = c.every(
105707
105752
  (E) => !h.includes(E.name) || !E.required
105708
105753
  );
105709
105754
  return f && m;
@@ -105717,10 +105762,16 @@ function Lpi(s, p, i, r = Ye.OrDataTypeGroup) {
105717
105762
  s.project
105718
105763
  );
105719
105764
  return c.push(b), b.setParent(p, i), b.addSelfToProject(i), i == null || i.add(b, W.Added), b.setEntity(s, i), b.initChildren(i), i || b.captureVersion(), {
105720
- updated: C(a),
105765
+ updated: C(
105766
+ a
105767
+ ),
105721
105768
  added: C(c),
105722
- removed: C(e),
105723
- affected: C(f),
105769
+ removed: C(
105770
+ e
105771
+ ),
105772
+ affected: C(
105773
+ f
105774
+ ),
105724
105775
  self: b
105725
105776
  };
105726
105777
  }
@@ -105777,7 +105828,9 @@ function NK(s, p, i, r, a) {
105777
105828
  r
105778
105829
  ), s.length > 0) {
105779
105830
  const K = s.slice(0, 5).filter((re) => re !== void 0);
105780
- if (K.every((re) => typeof re == typeof K[0]) && (typeof K[0] != "object" || K[0] === null))
105831
+ if (K.every(
105832
+ (re) => typeof re == typeof K[0]
105833
+ ) && (typeof K[0] != "object" || K[0] === null))
105781
105834
  switch (typeof K[0]) {
105782
105835
  case "string":
105783
105836
  p.setEntity(
@@ -105828,7 +105881,13 @@ function NK(s, p, i, r, a) {
105828
105881
  r,
105829
105882
  a
105830
105883
  );
105831
- ye.hasCreated && re.push((le = ye.changeSet) == null ? void 0 : le.self), c.push(...(Y = ye.changeSet) == null ? void 0 : Y.updated), e.push(...(z = ye.changeSet) == null ? void 0 : z.added), f.push(...(ae = ye.changeSet) == null ? void 0 : ae.removed);
105884
+ ye.hasCreated && re.push(
105885
+ (le = ye.changeSet) == null ? void 0 : le.self
105886
+ ), c.push(
105887
+ ...(Y = ye.changeSet) == null ? void 0 : Y.updated
105888
+ ), e.push(...(z = ye.changeSet) == null ? void 0 : z.added), f.push(
105889
+ ...(ae = ye.changeSet) == null ? void 0 : ae.removed
105890
+ );
105832
105891
  }
105833
105892
  });
105834
105893
  const J = C(
@@ -105842,7 +105901,10 @@ function NK(s, p, i, r, a) {
105842
105901
  le,
105843
105902
  p.project
105844
105903
  );
105845
- switch (Y.hydrateAncestors(), Y.setParent(p, r), Y.addSelfToProject(r), r == null || r.add(
105904
+ switch (Y.hydrateAncestors(), Y.setParent(
105905
+ p,
105906
+ r
105907
+ ), Y.addSelfToProject(r), r == null || r.add(
105846
105908
  Y,
105847
105909
  W.Added
105848
105910
  ), Y.initChildren(r), typeof ee) {
@@ -105883,7 +105945,10 @@ function NK(s, p, i, r, a) {
105883
105945
  });
105884
105946
  break;
105885
105947
  } else
105886
- J.length === 1 && !oe ? p.setEntity(J[0], r) : K.forEach((ee) => {
105948
+ J.length === 1 && !oe ? p.setEntity(
105949
+ J[0],
105950
+ r
105951
+ ) : K.forEach((ee) => {
105887
105952
  if (typeof ee == "object" && !Array.isArray(ee) && ee !== null) {
105888
105953
  const le = VK(
105889
105954
  Object.keys(ee),
@@ -105905,7 +105970,10 @@ function NK(s, p, i, r, a) {
105905
105970
  le,
105906
105971
  p.project
105907
105972
  );
105908
- Y.hydrateAncestors(), Y.setParent(p, r), Y.addSelfToProject(r), r == null || r.add(
105973
+ Y.hydrateAncestors(), Y.setParent(
105974
+ p,
105975
+ r
105976
+ ), Y.addSelfToProject(r), r == null || r.add(
105909
105977
  Y,
105910
105978
  W.Added
105911
105979
  ), Y.initChildren(r);
@@ -105933,7 +106001,10 @@ function NK(s, p, i, r, a) {
105933
106001
  r,
105934
106002
  a
105935
106003
  );
105936
- p.setEntity((m = K.changeSet) == null ? void 0 : m.self, r), c.push(...(b = K.changeSet) == null ? void 0 : b.updated), e.push(...(E = K.changeSet) == null ? void 0 : E.added), f.push(...(A = K.changeSet) == null ? void 0 : A.removed);
106004
+ p.setEntity(
106005
+ (m = K.changeSet) == null ? void 0 : m.self,
106006
+ r
106007
+ ), c.push(...(b = K.changeSet) == null ? void 0 : b.updated), e.push(...(E = K.changeSet) == null ? void 0 : E.added), f.push(...(A = K.changeSet) == null ? void 0 : A.removed);
105937
106008
  break;
105938
106009
  }
105939
106010
  else {
@@ -105946,15 +106017,24 @@ function NK(s, p, i, r, a) {
105946
106017
  r,
105947
106018
  a
105948
106019
  );
105949
- p.setEntity((_ = K.changeSet) == null ? void 0 : _.self, r), c.push(...(N = K.changeSet) == null ? void 0 : N.updated), e.push(...(V = K.changeSet) == null ? void 0 : V.added), f.push(...(B = K.changeSet) == null ? void 0 : B.removed);
106020
+ p.setEntity(
106021
+ (_ = K.changeSet) == null ? void 0 : _.self,
106022
+ r
106023
+ ), c.push(...(N = K.changeSet) == null ? void 0 : N.updated), e.push(...(V = K.changeSet) == null ? void 0 : V.added), f.push(...(B = K.changeSet) == null ? void 0 : B.removed);
105950
106024
  break;
105951
106025
  }
105952
106026
  }
105953
106027
  return {
105954
- updated: C(c),
106028
+ updated: C(
106029
+ c
106030
+ ),
105955
106031
  added: C(e),
105956
- removed: C(f),
105957
- affected: C(h),
106032
+ removed: C(
106033
+ f
106034
+ ),
106035
+ affected: C(
106036
+ h
106037
+ ),
105958
106038
  self: p
105959
106039
  };
105960
106040
  }
@@ -106031,9 +106111,15 @@ function vD(s, p, i, r, a) {
106031
106111
  }), r || N.captureVersion(), {
106032
106112
  hasCreated: !0,
106033
106113
  changeSet: {
106034
- updated: C(c),
106035
- added: C(e),
106036
- removed: C(f),
106114
+ updated: C(
106115
+ c
106116
+ ),
106117
+ added: C(
106118
+ e
106119
+ ),
106120
+ removed: C(
106121
+ f
106122
+ ),
106037
106123
  affected: C(
106038
106124
  h
106039
106125
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-code/project-logic-tree",
3
- "version": "0.0.6984",
3
+ "version": "0.0.6985",
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",