@elyx-code/project-logic-tree 0.0.6387 → 0.0.6389

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
@@ -2496,6 +2496,12 @@ export declare const DEFAULT_PROJECT_STATIC_PARENT_CONTEXT: IProjectStaticParent
2496
2496
 
2497
2497
  export declare const DEFAULT_UUID_MODULE: UUIDModule;
2498
2498
 
2499
+ export declare enum DefaultModuleId {
2500
+ UUID = "uuid",
2501
+ BuiltInFunctionImplementations = "built-in-function-implementations",
2502
+ SearchNodeImplementation = "search-node-implementation"
2503
+ }
2504
+
2499
2505
  export declare enum DefinitionEntityDependencyField {
2500
2506
  Extends = "extends",
2501
2507
  Implements = "implements"
@@ -3479,6 +3485,31 @@ export declare interface ExtensionModuleCore {
3479
3485
  }
3480
3486
 
3481
3487
  export declare enum ExtensionPermissions {
3488
+ Star = "*",// Allow all permissions, not recommended for security reasons
3489
+ OnStar = "on:*",// Allow listening to any event
3490
+ EmitStar = "emit:*",// Allow emitting any event
3491
+ ReadStar = "read:*",// Allow reading any state
3492
+ WriteStar = "write:*",// Allow writing any state
3493
+ UpdateStar = "update:*",// Allow updating any state
3494
+ DoStar = "do:*",// Allow performing any action
3495
+ OnLogicStar = "on:logic:*",// Allow listening to any event in the logic context
3496
+ EmitLogicStar = "emit:logic:*",// Allow emitting any event in the logic context
3497
+ ReadLogicStar = "read:logic:*",// Allow reading any state in the logic context
3498
+ WriteLogicStar = "write:logic:*",// Allow writing any state in the logic context
3499
+ UpdateLogicStar = "update:logic:*",// Allow updating any state in the logic context
3500
+ DoLogicStar = "do:logic:*",// Allow performing any action in the logic context
3501
+ OnGUIStar = "on:gui:*",// Allow listening to any event in the GUI context
3502
+ EmitGUIStar = "emit:gui:*",// Allow emitting any event in the GUI context
3503
+ ReadGUIStar = "read:gui:*",// Allow reading any state in the GUI context
3504
+ WriteGUIStar = "write:gui:*",// Allow writing any state in the GUI context
3505
+ UpdateGUIStar = "update:gui:*",// Allow updating any state in the GUI context
3506
+ DoGUIStar = "do:gui:*",// Allow performing any action in the GUI context
3507
+ OnEditorStar = "on:editor:*",// Allow listening to any event in the editor context
3508
+ EmitEditorStar = "emit:editor:*",// Allow emitting any event in the editor context
3509
+ ReadEditorStar = "read:editor:*",// Allow reading any state in the editor context
3510
+ WriteEditorStar = "write:editor:*",// Allow writing any state in the editor context
3511
+ UpdateEditorStar = "update:editor:*",// Allow updating any state in the editor context
3512
+ DoEditorStar = "do:editor:*",// Allow performing any action in the editor context
3482
3513
  OnCompileBefore = "on:compile:before:DefinitionEntity",
3483
3514
  OnCompileDefault = "on:compile:default:DefinitionEntity",
3484
3515
  OnCompileAfter = "on:compile:after:DefinitionEntity",
@@ -8851,7 +8882,7 @@ export declare interface IBaseEventTransfer extends IBaseEvent_meta {
8851
8882
  }
8852
8883
 
8853
8884
  export declare interface IBaseExtensionsContext {
8854
- onRequestModule: <T>(moduleId: string) => T;
8885
+ requestModule: <T>(moduleId: string) => T;
8855
8886
  }
8856
8887
 
8857
8888
  export declare interface IBaseVariable extends IBaseVariableTransfer, IChildEntity {
@@ -9327,7 +9358,7 @@ export declare interface IEditableEntityPersistanceRepository extends IReadOnlyE
9327
9358
  APILoadVersion<T extends Array<any> = any[]>(entityId: EntityId, versionIdOrBeforeEqualDate: EntityVersion | Date, ...otherArgs: T): Promise<ElementShallowTransfer | null>;
9328
9359
  }
9329
9360
 
9330
- export declare interface IEditor extends IUndoableInterface, IValueResolutionContext, IProjectStaticParentContext, IProjectInstanceParentContext {
9361
+ export declare interface IEditor extends IUndoableInterface, IValueResolutionContext, IProjectInstanceParentContext {
9331
9362
  ready: boolean;
9332
9363
  hasLoadedLogic: boolean;
9333
9364
  destroyed: boolean;
@@ -9383,7 +9414,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
9383
9414
  resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
9384
9415
  publish(): Promise<void>;
9385
9416
  loadActivePublication(publicationId: string): Promise<IPublication>;
9386
- requestModule<T = any>(moduleId: string): T | null;
9417
+ requestModule<T = any>(moduleId: string): T;
9387
9418
  }
9388
9419
 
9389
9420
  export declare interface IEntityActionRequestPayload<P extends {
@@ -10607,7 +10638,7 @@ export declare interface IProjectGenerationTarget extends IProject_base {
10607
10638
  }
10608
10639
 
10609
10640
  export declare interface IProjectInstanceParentContext extends IProjectStaticParentContext {
10610
- onRequestActiveDynamicValue: (valueOwner: EntityWithValueState) => IDynamicValue | null;
10641
+ requestActiveDynamicValue: (valueOwner: EntityWithValueState) => IDynamicValue | null;
10611
10642
  events: Events;
10612
10643
  }
10613
10644
 
@@ -13598,6 +13629,8 @@ export declare function resolveDatatypeIconName(dataType: DataTypeState): "defin
13598
13629
 
13599
13630
  export declare function resolveDataTypeLabel(dataType: DataTypeState | null): string;
13600
13631
 
13632
+ export declare function resolveDefaultModule<T = any>(moduleId: string): T | null;
13633
+
13601
13634
  export declare function resolveDefinitionEntityDataTypeLabel(entity: DefinitionEntityState): string;
13602
13635
 
13603
13636
  export declare function resolveDefinitionEntitySubheader(entity: DefinitionEntityState): string;
package/dist/index.js CHANGED
@@ -85603,7 +85603,7 @@ let LEt = class {
85603
85603
  }), this.subscribedEvents = {};
85604
85604
  }
85605
85605
  };
85606
- var PT = /* @__PURE__ */ ((d) => (d[d.High = 1] = "High", d[d.Normal = 5] = "Normal", d[d.Low = 10] = "Low", d))(PT || {}), BEt = /* @__PURE__ */ ((d) => (d.Logic = "logic", d.GUI = "gui", d.Editor = "editor", d.Compile = "compile", d))(BEt || {}), xEt = /* @__PURE__ */ ((d) => (d.OnCompileBefore = "on:compile:before:DefinitionEntity", d.OnCompileDefault = "on:compile:default:DefinitionEntity", d.OnCompileAfter = "on:compile:after:DefinitionEntity", d.EmitCompile = "emit:compile:DefinitionEntity", d.DoEditorPublish = "do:editor:publish", d.PostGUICanvasSlotNewToolbarButton = "write:gui:canvas:slot:toolbar-button", d.ReadGUICanvasSlotToolbarButtons = "read:gui:canvas:slot:toolbar-buttons", d.UpdateGUIGlobalTheme = "update:gui:global:theme", d))(xEt || {}), VT = /* @__PURE__ */ ((d) => (d.UUID = "uuid", d.BuiltInFunctionImplementations = "built-in-function-implementations", d.SearchNodeImplementation = "search-node-implementation", d))(VT || {});
85606
+ var PT = /* @__PURE__ */ ((d) => (d[d.High = 1] = "High", d[d.Normal = 5] = "Normal", d[d.Low = 10] = "Low", d))(PT || {}), BEt = /* @__PURE__ */ ((d) => (d.Logic = "logic", d.GUI = "gui", d.Editor = "editor", d.Compile = "compile", d))(BEt || {}), xEt = /* @__PURE__ */ ((d) => (d.Star = "*", d.OnStar = "on:*", d.EmitStar = "emit:*", d.ReadStar = "read:*", d.WriteStar = "write:*", d.UpdateStar = "update:*", d.DoStar = "do:*", d.OnLogicStar = "on:logic:*", d.EmitLogicStar = "emit:logic:*", d.ReadLogicStar = "read:logic:*", d.WriteLogicStar = "write:logic:*", d.UpdateLogicStar = "update:logic:*", d.DoLogicStar = "do:logic:*", d.OnGUIStar = "on:gui:*", d.EmitGUIStar = "emit:gui:*", d.ReadGUIStar = "read:gui:*", d.WriteGUIStar = "write:gui:*", d.UpdateGUIStar = "update:gui:*", d.DoGUIStar = "do:gui:*", d.OnEditorStar = "on:editor:*", d.EmitEditorStar = "emit:editor:*", d.ReadEditorStar = "read:editor:*", d.WriteEditorStar = "write:editor:*", d.UpdateEditorStar = "update:editor:*", d.DoEditorStar = "do:editor:*", d.OnCompileBefore = "on:compile:before:DefinitionEntity", d.OnCompileDefault = "on:compile:default:DefinitionEntity", d.OnCompileAfter = "on:compile:after:DefinitionEntity", d.EmitCompile = "emit:compile:DefinitionEntity", d.DoEditorPublish = "do:editor:publish", d.PostGUICanvasSlotNewToolbarButton = "write:gui:canvas:slot:toolbar-button", d.ReadGUICanvasSlotToolbarButtons = "read:gui:canvas:slot:toolbar-buttons", d.UpdateGUIGlobalTheme = "update:gui:global:theme", d))(xEt || {}), VT = /* @__PURE__ */ ((d) => (d.UUID = "uuid", d.BuiltInFunctionImplementations = "built-in-function-implementations", d.SearchNodeImplementation = "search-node-implementation", d))(VT || {});
85607
85607
  function UEt(d) {
85608
85608
  switch (d) {
85609
85609
  case "uuid":
@@ -85640,7 +85640,7 @@ function UEt(d) {
85640
85640
  return null;
85641
85641
  }
85642
85642
  const yL = {
85643
- onRequestModule: (d) => {
85643
+ requestModule: (d) => {
85644
85644
  const u = UEt(d);
85645
85645
  if (u)
85646
85646
  return u;
@@ -85713,69 +85713,6 @@ const jEt = {
85713
85713
  ...yL
85714
85714
  };
85715
85715
  class Xn extends ip {
85716
- // static searchImplementation: (
85717
- // entity: SearchState,
85718
- // inputs: IDynamicValue[]
85719
- // ) => Promise<{
85720
- // data:
85721
- // | {
85722
- // [columnName: string]: any;
85723
- // }
85724
- // | null
85725
- // | {
85726
- // [columnName: string]: any;
85727
- // }[];
85728
- // error: string | null;
85729
- // }> = async () => ({
85730
- // data: null,
85731
- // error: 'Search module not implemented',
85732
- // });
85733
- // static builtInFunctionImplementations: Record<
85734
- // BuiltInFunctionIds,
85735
- // (
85736
- // entity: InternalCallState,
85737
- // inputs: IDynamicValue[]
85738
- // ) => Promise<IExecutionResult>
85739
- // > = {
85740
- // [BuiltInFunctionIds.AbortExecution]: async (
85741
- // entity: InternalCallState,
85742
- // _inputs: IDynamicValue[]
85743
- // ) => {
85744
- // return {
85745
- // value: ExecutionTerminationType.Error,
85746
- // entity: entity,
85747
- // error: null,
85748
- // results: [],
85749
- // };
85750
- // },
85751
- // [BuiltInFunctionIds.SavePersistedEntity]: async (
85752
- // entity: InternalCallState,
85753
- // _inputs: IDynamicValue[]
85754
- // ) => {
85755
- // return {
85756
- // value: ExecutionTerminationType.Error,
85757
- // entity: entity,
85758
- // error: null,
85759
- // results: [],
85760
- // };
85761
- // },
85762
- // [BuiltInFunctionIds.DeletePersistedEntity]: async (
85763
- // entity: InternalCallState,
85764
- // _inputs: IDynamicValue[]
85765
- // ) => {
85766
- // return {
85767
- // value: ExecutionTerminationType.Error,
85768
- // entity: entity,
85769
- // error: null,
85770
- // results: [],
85771
- // };
85772
- // },
85773
- // };
85774
- // static builtInFunctionImplementation: (
85775
- // entity: BuiltInFunctionIds,
85776
- // inputs: IDynamicValue[]
85777
- // ) => Promise<IExecutionResult> = {
85778
- // }
85779
85716
  constructor(i, a, l, p = null, t = jEt) {
85780
85717
  super();
85781
85718
  D(this, "project");
@@ -85842,24 +85779,6 @@ class Xn extends ip {
85842
85779
  lastExecutionResults: this.lastExecutionResults
85843
85780
  };
85844
85781
  }
85845
- // static injectSearchImplementation(
85846
- // implementation: (
85847
- // entity: SearchState,
85848
- // inputs: IDynamicValue[]
85849
- // ) => Promise<{
85850
- // data:
85851
- // | {
85852
- // [columnName: string]: any;
85853
- // }
85854
- // | null
85855
- // | {
85856
- // [columnName: string]: any;
85857
- // }[];
85858
- // error: string | null;
85859
- // }>
85860
- // ): void {
85861
- // Execution.searchImplementation = implementation;
85862
- // }
85863
85782
  skip(i) {
85864
85783
  this.hasEntity(i) && (this.skipped.includes(i) || (this.skipped.push(i), this.onAddToSkippedListCallback && this.onAddToSkippedListCallback(i), nn.includes(i.type) && [
85865
85784
  ...i.successCalls || [],
@@ -85985,7 +85904,7 @@ class Xn extends ip {
85985
85904
  ), Object.values(ts).includes(
85986
85905
  i.declaration.id
85987
85906
  )) {
85988
- const R = this.parentContext.onRequestModule(
85907
+ const R = this.parentContext.requestModule(
85989
85908
  VT.BuiltInFunctionImplementations
85990
85909
  )[i.declaration.id];
85991
85910
  R ? T = await R(i, a) : Ge.warn(
@@ -86201,7 +86120,7 @@ class Xn extends ip {
86201
86120
  type: Ee.ExecutionResult,
86202
86121
  inheritanceLink: null
86203
86122
  };
86204
- const T = await this.parentContext.onRequestModule(
86123
+ const T = await this.parentContext.requestModule(
86205
86124
  VT.SearchNodeImplementation
86206
86125
  ).searchImplementation(i, a), R = y == null ? void 0 : y.getDataType(null), I = tt(
86207
86126
  R,
@@ -103255,7 +103174,7 @@ const iB = {
103255
103174
  ...yL,
103256
103175
  events: new ip()
103257
103176
  }, Wbt = {
103258
- onRequestActiveDynamicValue: (d) => null,
103177
+ requestActiveDynamicValue: (d) => null,
103259
103178
  ...iB
103260
103179
  }, et = class et extends Rr {
103261
103180
  constructor(i, a = {
@@ -103329,7 +103248,7 @@ const iB = {
103329
103248
  );
103330
103249
  }
103331
103250
  static get UUID() {
103332
- return this.parentContext.onRequestModule("uuid");
103251
+ return this.parentContext.requestModule("uuid");
103333
103252
  }
103334
103253
  // Creates a new empty entity transfer object
103335
103254
  static new(i = null) {
@@ -104870,7 +104789,7 @@ const iB = {
104870
104789
  }
104871
104790
  requestActiveDynamicValue(i) {
104872
104791
  var l, p;
104873
- const a = (p = (l = this.parentContext).onRequestActiveDynamicValue) == null ? void 0 : p.call(l, i);
104792
+ const a = (p = (l = this.parentContext).requestActiveDynamicValue) == null ? void 0 : p.call(l, i);
104874
104793
  if (!a) {
104875
104794
  const t = i.getDefaultValue();
104876
104795
  return t ? {
@@ -104883,8 +104802,8 @@ const iB = {
104883
104802
  return a || null;
104884
104803
  }
104885
104804
  requestModule(i) {
104886
- if (this.parentContext.onRequestModule) {
104887
- const a = this.parentContext.onRequestModule(i);
104805
+ if (this.parentContext.requestModule) {
104806
+ const a = this.parentContext.requestModule(i);
104888
104807
  return !a && i === "uuid" ? Hh : a || null;
104889
104808
  }
104890
104809
  return i === "uuid" ? Hh : null;
@@ -106486,6 +106405,7 @@ export {
106486
106405
  T4 as DataTypeDependencyField,
106487
106406
  ui as DataTypeParentChildRelation,
106488
106407
  Es as DataTypeState,
106408
+ VT as DefaultModuleId,
106489
106409
  ZT as DefinitionEntityDependencyField,
106490
106410
  Ka as DefinitionEntityState,
106491
106411
  Ee as DynamicValueTypes,
@@ -107502,6 +107422,7 @@ export {
107502
107422
  LL as resolveDataTypeEntityOrNestedChildrenFromLiteralValue,
107503
107423
  lp as resolveDataTypeLabel,
107504
107424
  FAt as resolveDatatypeIconName,
107425
+ UEt as resolveDefaultModule,
107505
107426
  s1t as resolveDefinitionEntityDataTypeLabel,
107506
107427
  EL as resolveDefinitionEntitySubheader,
107507
107428
  M$ as resolveEntityCodeName,