@mat3ra/wode 2026.7.29-0 → 2026.8.13-0

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.
Files changed (102) hide show
  1. package/dist/js/Subworkflow.d.ts +21 -20
  2. package/dist/js/Subworkflow.js +8 -7
  3. package/dist/js/Workflow.d.ts +11 -10
  4. package/dist/js/Workflow.js +7 -3
  5. package/dist/js/context/mixins/MaterialContextMixin.d.ts +1 -4
  6. package/dist/js/context/providers/CollinearMagnetizationDataManager.js +1 -1
  7. package/dist/js/context/providers/Hubbard/HubbardContextProvider.d.ts +6 -4
  8. package/dist/js/context/providers/Hubbard/HubbardContextProvider.js +12 -7
  9. package/dist/js/context/providers/NonCollinearMagnetizationDataManager.js +1 -1
  10. package/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.d.ts +6 -4
  11. package/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.js +10 -5
  12. package/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.d.ts +3 -4
  13. package/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.js +3 -2
  14. package/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.js +2 -1
  15. package/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.js +1 -1
  16. package/dist/js/generated/AssertionUnitSchemaMixin.d.ts +2 -2
  17. package/dist/js/generated/AssignmentUnitSchemaMixin.d.ts +2 -2
  18. package/dist/js/generated/BaseUnitSchemaMixin.d.ts +2 -2
  19. package/dist/js/generated/BaseUnitSchemaMixin.js +6 -18
  20. package/dist/js/generated/ConditionUnitSchemaMixin.d.ts +2 -2
  21. package/dist/js/generated/ErrorUnitSchemaMixin.d.ts +2 -2
  22. package/dist/js/generated/ExecutionUnitInputSchemaMixin.d.ts +2 -2
  23. package/dist/js/generated/ExecutionUnitSchemaMixin.d.ts +2 -2
  24. package/dist/js/generated/IOUnitSchemaMixin.d.ts +2 -2
  25. package/dist/js/generated/MapUnitSchemaMixin.d.ts +2 -2
  26. package/dist/js/generated/ReduceUnitSchemaMixin.d.ts +2 -2
  27. package/dist/js/generated/StatusTrackSchemaMixin.d.ts +5 -0
  28. package/dist/js/generated/{StatusSchemaMixin.js → StatusTrackSchemaMixin.js} +2 -8
  29. package/dist/js/generated/SubworkflowSchemaMixin.d.ts +2 -2
  30. package/dist/js/generated/SubworkflowUnitSchemaMixin.d.ts +2 -2
  31. package/dist/js/generated/WorkflowSchemaMixin.d.ts +2 -2
  32. package/dist/js/units/AssertionUnit.d.ts +4 -7
  33. package/dist/js/units/AssignmentUnit.d.ts +4 -7
  34. package/dist/js/units/BaseUnit.d.ts +13 -12
  35. package/dist/js/units/BaseUnit.js +14 -11
  36. package/dist/js/units/ConditionUnit.d.ts +4 -7
  37. package/dist/js/units/ErrorUnit.d.ts +4 -7
  38. package/dist/js/units/ExecutionUnit.d.ts +4 -7
  39. package/dist/js/units/ExecutionUnit.js +6 -6
  40. package/dist/js/units/ExecutionUnitInput.d.ts +3 -7
  41. package/dist/js/units/ExecutionUnitInput.js +12 -2
  42. package/dist/js/units/IOUnit.d.ts +4 -7
  43. package/dist/js/units/MapUnit.d.ts +4 -7
  44. package/dist/js/units/MapUnit.js +1 -1
  45. package/dist/js/units/ReduceUnit.d.ts +4 -7
  46. package/dist/js/units/SubworkflowUnit.d.ts +4 -7
  47. package/package.json +8 -9
  48. package/src/js/Subworkflow.ts +42 -32
  49. package/src/js/Workflow.ts +28 -16
  50. package/src/js/context/mixins/MaterialContextMixin.ts +1 -2
  51. package/src/js/context/providers/CollinearMagnetizationDataManager.ts +1 -1
  52. package/src/js/context/providers/Hubbard/HubbardContextProvider.ts +17 -8
  53. package/src/js/context/providers/NonCollinearMagnetizationDataManager.ts +1 -1
  54. package/src/js/context/providers/PointsGrid/PointsGridFormDataProvider.ts +14 -12
  55. package/src/js/context/providers/PointsPath/PointsPathFormDataProvider.ts +9 -6
  56. package/src/js/context/providers/by_application/espresso/QEPWXInputDataManager.ts +4 -3
  57. package/src/js/context/providers/by_application/nwchem/NWChemInputDataManager.ts +1 -1
  58. package/src/js/generated/AssertionUnitSchemaMixin.ts +11 -6
  59. package/src/js/generated/AssignmentUnitSchemaMixin.ts +12 -7
  60. package/src/js/generated/BaseUnitSchemaMixin.ts +17 -26
  61. package/src/js/generated/ConditionUnitSchemaMixin.ts +15 -10
  62. package/src/js/generated/ErrorUnitSchemaMixin.ts +7 -5
  63. package/src/js/generated/ExecutionUnitInputSchemaMixin.ts +12 -8
  64. package/src/js/generated/ExecutionUnitSchemaMixin.ts +14 -9
  65. package/src/js/generated/IOUnitSchemaMixin.ts +7 -7
  66. package/src/js/generated/MapUnitSchemaMixin.ts +6 -6
  67. package/src/js/generated/ReduceUnitSchemaMixin.ts +8 -6
  68. package/src/js/generated/StatusTrackSchemaMixin.ts +24 -0
  69. package/src/js/generated/SubworkflowSchemaMixin.ts +12 -10
  70. package/src/js/generated/SubworkflowUnitSchemaMixin.ts +9 -4
  71. package/src/js/generated/WorkflowSchemaMixin.ts +10 -10
  72. package/src/js/units/AssertionUnit.ts +3 -7
  73. package/src/js/units/AssignmentUnit.ts +4 -7
  74. package/src/js/units/BaseUnit.ts +39 -29
  75. package/src/js/units/ConditionUnit.ts +3 -7
  76. package/src/js/units/ErrorUnit.ts +3 -7
  77. package/src/js/units/ExecutionUnit.ts +10 -15
  78. package/src/js/units/ExecutionUnitInput.ts +16 -13
  79. package/src/js/units/IOUnit.ts +3 -7
  80. package/src/js/units/MapUnit.ts +4 -10
  81. package/src/js/units/ReduceUnit.ts +3 -7
  82. package/src/js/units/SubworkflowUnit.ts +3 -7
  83. package/dist/js/WorkflowDesignerMaterial.d.ts +0 -21
  84. package/dist/js/WorkflowDesignerMaterial.js +0 -26
  85. package/dist/js/generated/StatusSchemaMixin.d.ts +0 -5
  86. package/dist/js/repair/createErrorUnitData.d.ts +0 -3
  87. package/dist/js/repair/createErrorUnitData.js +0 -25
  88. package/dist/js/repair/formatRepairReason.d.ts +0 -1
  89. package/dist/js/repair/formatRepairReason.js +0 -22
  90. package/dist/js/repair/types.d.ts +0 -16
  91. package/dist/js/repair/types.js +0 -2
  92. package/dist/js/subworkflows/convergence/enums.js +0 -15
  93. package/dist/js/subworkflows/convergence/factory.js +0 -36
  94. package/dist/js/subworkflows/subworkflow.js +0 -285
  95. package/dist/js/utils/subworkflow.d.ts +0 -2
  96. package/dist/js/utils/subworkflow.js +0 -29
  97. package/dist/js/utils/underscoreStringSlugify.d.ts +0 -6
  98. package/dist/js/utils/underscoreStringSlugify.js +0 -32
  99. package/dist/js/utils.js +0 -87
  100. package/dist/js/workflows/workflow.d.ts +0 -4404
  101. package/dist/js/workflows/workflow.js +0 -315
  102. package/src/js/generated/StatusSchemaMixin.ts +0 -28
@@ -1,5 +1,5 @@
1
1
  import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
- import type { ExecutionUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
2
+ import type { BaseInMemoryEntitySchema, ExecutionUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
3
3
  export type ExecutionUnitSchemaMixin = ExecutionUnitMixinSchema;
4
- export type ExecutionUnitInMemoryEntity = InMemoryEntity & ExecutionUnitSchemaMixin;
4
+ export type ExecutionUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & ExecutionUnitSchemaMixin>;
5
5
  export declare function executionUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & ExecutionUnitSchemaMixin;
@@ -1,5 +1,5 @@
1
1
  import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
- import type { DataIOUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
2
+ import type { BaseInMemoryEntitySchema, DataIOUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
3
3
  export type IOUnitSchemaMixin = DataIOUnitMixinSchema;
4
- export type IOUnitInMemoryEntity = InMemoryEntity & IOUnitSchemaMixin;
4
+ export type IOUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & IOUnitSchemaMixin>;
5
5
  export declare function iOUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & IOUnitSchemaMixin;
@@ -1,5 +1,5 @@
1
1
  import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
- import type { MapUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
2
+ import type { BaseInMemoryEntitySchema, MapUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
3
3
  export type MapUnitSchemaMixin = MapUnitMixinSchema;
4
- export type MapUnitInMemoryEntity = InMemoryEntity & MapUnitSchemaMixin;
4
+ export type MapUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & MapUnitSchemaMixin>;
5
5
  export declare function mapUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & MapUnitSchemaMixin;
@@ -1,5 +1,5 @@
1
1
  import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
- import type { ReduceUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
2
+ import type { BaseInMemoryEntitySchema, ReduceUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
3
3
  export type ReduceUnitSchemaMixin = ReduceUnitMixinSchema;
4
- export type ReduceUnitInMemoryEntity = InMemoryEntity & ReduceUnitSchemaMixin;
4
+ export type ReduceUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & ReduceUnitSchemaMixin>;
5
5
  export declare function reduceUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & ReduceUnitSchemaMixin;
@@ -0,0 +1,5 @@
1
+ import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
+ import type { BaseInMemoryEntitySchema, StatusTrackSchema } from "@mat3ra/esse/dist/js/types";
3
+ export type StatusTrackSchemaMixin = StatusTrackSchema;
4
+ export type StatusTrackInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & StatusTrackSchemaMixin>;
5
+ export declare function statusTrackSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & StatusTrackSchemaMixin;
@@ -1,15 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.statusSchemaMixin = statusSchemaMixin;
4
- function statusSchemaMixin(item) {
3
+ exports.statusTrackSchemaMixin = statusTrackSchemaMixin;
4
+ function statusTrackSchemaMixin(item) {
5
5
  // @ts-expect-error
6
6
  const properties = {
7
- get status() {
8
- return this.prop("status");
9
- },
10
- set status(value) {
11
- this.setProp("status", value);
12
- },
13
7
  get statusTrack() {
14
8
  return this.prop("statusTrack");
15
9
  },
@@ -1,5 +1,5 @@
1
1
  import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
- import type { SubworkflowMixinSchema } from "@mat3ra/esse/dist/js/types";
2
+ import type { BaseInMemoryEntitySchema, SubworkflowMixinSchema } from "@mat3ra/esse/dist/js/types";
3
3
  export type SubworkflowSchemaMixin = SubworkflowMixinSchema;
4
- export type SubworkflowInMemoryEntity = InMemoryEntity & SubworkflowSchemaMixin;
4
+ export type SubworkflowInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & SubworkflowSchemaMixin>;
5
5
  export declare function subworkflowSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & SubworkflowSchemaMixin;
@@ -1,5 +1,5 @@
1
1
  import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
- import type { SubworkflowUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
2
+ import type { BaseInMemoryEntitySchema, SubworkflowUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
3
3
  export type SubworkflowUnitSchemaMixin = SubworkflowUnitMixinSchema;
4
- export type SubworkflowUnitInMemoryEntity = InMemoryEntity & SubworkflowUnitSchemaMixin;
4
+ export type SubworkflowUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & SubworkflowUnitSchemaMixin>;
5
5
  export declare function subworkflowUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & SubworkflowUnitSchemaMixin;
@@ -1,5 +1,5 @@
1
1
  import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
- import type { BaseWorkflowSchema } from "@mat3ra/esse/dist/js/types";
2
+ import type { BaseInMemoryEntitySchema, BaseWorkflowSchema } from "@mat3ra/esse/dist/js/types";
3
3
  export type WorkflowSchemaMixin = BaseWorkflowSchema;
4
- export type WorkflowInMemoryEntity = InMemoryEntity & WorkflowSchemaMixin;
4
+ export type WorkflowInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & WorkflowSchemaMixin>;
5
5
  export declare function workflowSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & WorkflowSchemaMixin;
@@ -1,15 +1,12 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { AssertionUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { type AssertionUnitSchemaMixin } from "../generated/AssertionUnitSchemaMixin";
5
4
  import BaseUnit from "./BaseUnit";
6
5
  type Schema = AssertionUnitSchema;
7
- type Base = typeof BaseUnit<Schema> & Constructor<AssertionUnitSchemaMixin>;
8
6
  export type AssertionUnitConfig = Partial<Schema>;
9
- declare const AssertionUnit_base: Base;
10
- declare class AssertionUnit extends AssertionUnit_base implements Schema {
11
- toJSON: () => Schema & AnyObject;
12
- _json: Schema & AnyObject;
7
+ interface AssertionUnit extends AssertionUnitSchemaMixin, Taggable {
8
+ }
9
+ declare class AssertionUnit extends BaseUnit<Schema> implements Schema {
13
10
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
14
11
  constructor(config: AssertionUnitConfig);
15
12
  getHashObject(): {
@@ -1,15 +1,12 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { AssignmentUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { type AssignmentUnitSchemaMixin } from "../generated/AssignmentUnitSchemaMixin";
5
4
  import BaseUnit from "./BaseUnit";
6
5
  type Schema = AssignmentUnitSchema;
7
- type Base = typeof BaseUnit<Schema> & Constructor<AssignmentUnitSchemaMixin>;
8
6
  export type AssignmentUnitConfig = Partial<Schema>;
9
- declare const AssignmentUnit_base: Base;
10
- declare class AssignmentUnit extends AssignmentUnit_base implements Schema {
11
- toJSON: () => Schema & AnyObject;
12
- _json: Schema & AnyObject;
7
+ interface AssignmentUnit extends AssignmentUnitSchemaMixin, Taggable {
8
+ }
9
+ declare class AssignmentUnit extends BaseUnit<Schema> implements Schema {
13
10
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
14
11
  constructor(config: AssignmentUnitConfig);
15
12
  getHashObject(): object;
@@ -1,22 +1,19 @@
1
1
  import { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
2
2
  import { type Defaultable } from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin";
3
- import { HashedEntity } from "@mat3ra/code/dist/js/entity/mixins/HashedEntityMixin";
3
+ import { type HashedEntity } from "@mat3ra/code/dist/js/entity/mixins/HashedEntityMixin";
4
4
  import { type NamedEntity } from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin";
5
5
  import { type RuntimeItems } from "@mat3ra/code/dist/js/entity/mixins/RuntimeItemsMixin";
6
- import { Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
6
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
7
7
  import type { NameResultSchema } from "@mat3ra/code/dist/js/utils/object";
8
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
9
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
10
- import type { StatusSchema, WorkflowBaseUnitSchema } from "@mat3ra/esse/dist/js/types";
8
+ import type { BaseInMemoryEntitySchema, StatusSchema, WorkflowBaseUnitSchema } from "@mat3ra/esse/dist/js/types";
11
9
  import { type BaseUnitSchemaMixin } from "../generated/BaseUnitSchemaMixin";
12
- import { type StatusSchemaMixin } from "../generated/StatusSchemaMixin";
10
+ import { type StatusTrackSchemaMixin } from "../generated/StatusTrackSchemaMixin";
13
11
  import { type RuntimeItemsUILogic } from "./mixins/RuntimeItemsUILogicMixin";
14
12
  type Schema = WorkflowBaseUnitSchema;
15
- type Base = typeof InMemoryEntity & Constructor<NamedEntity> & Constructor<Defaultable> & Constructor<Taggable> & Constructor<HashedEntity> & Constructor<RuntimeItems> & Constructor<RuntimeItemsUILogic> & Constructor<BaseUnitSchemaMixin> & Constructor<StatusSchemaMixin>;
16
- declare const BaseUnit_base: Base;
17
- declare class BaseUnit<S extends Schema = Schema> extends BaseUnit_base implements Schema {
18
- toJSON: () => Schema & AnyObject;
19
- _json: Schema & AnyObject;
13
+ export type UnitEntity<S extends Schema = Schema> = S & BaseInMemoryEntitySchema;
14
+ interface BaseUnitCore extends BaseUnitSchemaMixin, NamedEntity, StatusTrackSchemaMixin, Defaultable, Taggable, HashedEntity, RuntimeItems, RuntimeItemsUILogic {
15
+ }
16
+ declare class BaseUnitCore extends InMemoryEntity<UnitEntity<Schema>> {
20
17
  defaultResults: NameResultSchema[];
21
18
  defaultMonitors: NameResultSchema[];
22
19
  defaultPostProcessors: NameResultSchema[];
@@ -25,7 +22,7 @@ declare class BaseUnit<S extends Schema = Schema> extends BaseUnit_base implemen
25
22
  /**
26
23
  * @param config — `flowchartId` is optional; when absent, a new UUID is generated.
27
24
  */
28
- constructor(config: Partial<S> & Pick<S, "name">);
25
+ constructor(config: Partial<Schema> & Pick<Schema, "name">);
29
26
  get lastStatusUpdate(): {
30
27
  trackedAt: number;
31
28
  status: string;
@@ -36,4 +33,8 @@ declare class BaseUnit<S extends Schema = Schema> extends BaseUnit_base implemen
36
33
  clone(extraContext: object): this;
37
34
  setRepetition(repetition: number): void;
38
35
  }
36
+ declare class BaseUnit<S extends Schema = Schema> extends BaseUnitCore {
37
+ _json: UnitEntity<S>;
38
+ toJSON: (exclude?: (keyof UnitEntity<S>)[]) => UnitEntity<S>;
39
+ }
39
40
  export default BaseUnit;
@@ -9,9 +9,9 @@ const TaggableMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/TaggableMixi
9
9
  const utils_1 = require("@mat3ra/utils");
10
10
  const enums_1 = require("../enums");
11
11
  const BaseUnitSchemaMixin_1 = require("../generated/BaseUnitSchemaMixin");
12
- const StatusSchemaMixin_1 = require("../generated/StatusSchemaMixin");
12
+ const StatusTrackSchemaMixin_1 = require("../generated/StatusTrackSchemaMixin");
13
13
  const RuntimeItemsUILogicMixin_1 = require("./mixins/RuntimeItemsUILogicMixin");
14
- class BaseUnit extends entity_1.InMemoryEntity {
14
+ class BaseUnitCore extends entity_1.InMemoryEntity {
15
15
  /**
16
16
  * @param config — `flowchartId` is optional; when absent, a new UUID is generated.
17
17
  */
@@ -43,7 +43,8 @@ class BaseUnit extends entity_1.InMemoryEntity {
43
43
  return sortedStatusTrack[sortedStatusTrack.length - 1];
44
44
  }
45
45
  getHashObject() {
46
- return { ...this.hashObjectFromRuntimeItems, type: this.type };
46
+ const { type } = this._json;
47
+ return { ...this.hashObjectFromRuntimeItems, ...(type !== undefined ? { type } : {}) };
47
48
  }
48
49
  isInStatus(status) {
49
50
  return this.status === status;
@@ -59,12 +60,14 @@ class BaseUnit extends entity_1.InMemoryEntity {
59
60
  this.repetition = repetition;
60
61
  }
61
62
  }
62
- (0, TaggableMixin_1.taggableMixin)(BaseUnit.prototype);
63
- (0, HashedEntityMixin_1.hashedEntityMixin)(BaseUnit.prototype);
64
- (0, RuntimeItemsMixin_1.runtimeItemsMixin)(BaseUnit.prototype);
65
- (0, RuntimeItemsUILogicMixin_1.runtimeItemsUILogicMixin)(BaseUnit.prototype);
66
- (0, BaseUnitSchemaMixin_1.baseUnitSchemaMixin)(BaseUnit.prototype);
67
- (0, StatusSchemaMixin_1.statusSchemaMixin)(BaseUnit.prototype);
68
- (0, NamedEntityMixin_1.namedEntityMixin)(BaseUnit.prototype);
69
- (0, DefaultableMixin_1.defaultableEntityMixin)(BaseUnit);
63
+ (0, TaggableMixin_1.taggableMixin)(BaseUnitCore.prototype);
64
+ (0, HashedEntityMixin_1.hashedEntityMixin)(BaseUnitCore.prototype);
65
+ (0, RuntimeItemsMixin_1.runtimeItemsMixin)(BaseUnitCore.prototype);
66
+ (0, RuntimeItemsUILogicMixin_1.runtimeItemsUILogicMixin)(BaseUnitCore.prototype);
67
+ (0, BaseUnitSchemaMixin_1.baseUnitSchemaMixin)(BaseUnitCore.prototype);
68
+ (0, StatusTrackSchemaMixin_1.statusTrackSchemaMixin)(BaseUnitCore.prototype);
69
+ (0, NamedEntityMixin_1.namedEntityMixin)(BaseUnitCore.prototype);
70
+ (0, DefaultableMixin_1.defaultableEntityMixin)(BaseUnitCore);
71
+ class BaseUnit extends BaseUnitCore {
72
+ }
70
73
  exports.default = BaseUnit;
@@ -1,15 +1,12 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { ConditionUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { type ConditionUnitSchemaMixin } from "../generated/ConditionUnitSchemaMixin";
5
4
  import BaseUnit from "./BaseUnit";
6
5
  type Schema = ConditionUnitSchema;
7
- type Base = typeof BaseUnit<Schema> & Constructor<ConditionUnitSchemaMixin>;
8
6
  export type ConditionUnitConfig = Partial<Schema>;
9
- declare const ConditionUnit_base: Base;
10
- declare class ConditionUnit extends ConditionUnit_base implements Schema {
11
- toJSON: () => Schema & AnyObject;
12
- _json: Schema & AnyObject;
7
+ interface ConditionUnit extends ConditionUnitSchemaMixin, Taggable {
8
+ }
9
+ declare class ConditionUnit extends BaseUnit<Schema> implements Schema {
13
10
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
14
11
  constructor(config: ConditionUnitConfig);
15
12
  getHashObject(): object;
@@ -1,15 +1,12 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { ErrorUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { type ErrorUnitSchemaMixin } from "../generated/ErrorUnitSchemaMixin";
5
4
  import BaseUnit from "./BaseUnit";
6
5
  type Schema = ErrorUnitSchema;
7
- type Base = typeof BaseUnit<Schema> & Constructor<ErrorUnitSchemaMixin>;
8
6
  export type ErrorUnitConfig = Partial<Schema>;
9
- declare const ErrorUnit_base: Base;
10
- declare class ErrorUnit extends ErrorUnit_base implements Schema {
11
- toJSON: () => Schema & AnyObject;
12
- _json: Schema & AnyObject;
7
+ interface ErrorUnit extends ErrorUnitSchemaMixin, Taggable {
8
+ }
9
+ declare class ErrorUnit extends BaseUnit<Schema> implements Schema {
13
10
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
14
11
  constructor(config: ErrorUnitConfig);
15
12
  }
@@ -1,5 +1,4 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { ExecutionUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { type AnyContextProvider, type ExternalContext } from "../context/providers";
5
4
  import type ConvergenceParameter from "../convergence/ConvergenceParameter";
@@ -7,20 +6,18 @@ import { type ExecutionUnitSchemaMixin } from "../generated/ExecutionUnitSchemaM
7
6
  import BaseUnit from "./BaseUnit";
8
7
  import ExecutionUnitInput from "./ExecutionUnitInput";
9
8
  type Schema = ExecutionUnitSchema;
10
- type Base = typeof BaseUnit & Constructor<ExecutionUnitSchemaMixin>;
11
9
  export type ExecutionUnitConfig = Omit<Partial<Schema>, "application"> & SetApplicationProps;
12
10
  type SetApplicationProps = Pick<Schema, "application"> & Pick<Partial<Schema>, "executable" | "flavor"> & SetExecutableProps;
13
11
  type SetExecutableProps = {
14
12
  executableName?: string;
15
13
  flavorName?: string;
16
14
  };
17
- declare const ExecutionUnit_base: Base;
18
- declare class ExecutionUnit extends ExecutionUnit_base implements Schema {
15
+ interface ExecutionUnit extends ExecutionUnitSchemaMixin, Taggable {
16
+ }
17
+ declare class ExecutionUnit extends BaseUnit<Schema> implements Schema {
19
18
  inputInstances: ExecutionUnitInput[];
20
19
  renderingContext: Partial<ExternalContext>;
21
20
  contextProvidersInstances: AnyContextProvider[];
22
- toJSON: () => Schema & AnyObject;
23
- _json: Schema & AnyObject;
24
21
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
25
22
  constructor(config: ExecutionUnitConfig);
26
23
  setApplication({ application, executable, flavor, executableName, flavorName, }: SetApplicationProps): void;
@@ -36,9 +36,9 @@ class ExecutionUnit extends BaseUnit_1.default {
36
36
  }
37
37
  setApplication({ application, executable, flavor, executableName, flavorName, }) {
38
38
  var _a, _b;
39
- const currentExecutable = this.prop("executable");
40
- const currentFlavor = this.prop("flavor");
41
- this.setProp("application", application);
39
+ const currentExecutable = this._json.executable;
40
+ const currentFlavor = this._json.flavor;
41
+ this.application = application;
42
42
  this.setExecutable({
43
43
  executableName: (_a = executableName !== null && executableName !== void 0 ? executableName : executable === null || executable === void 0 ? void 0 : executable.name) !== null && _a !== void 0 ? _a : currentExecutable === null || currentExecutable === void 0 ? void 0 : currentExecutable.name,
44
44
  flavorName: (_b = flavorName !== null && flavorName !== void 0 ? flavorName : flavor === null || flavor === void 0 ? void 0 : flavor.name) !== null && _b !== void 0 ? _b : currentFlavor === null || currentFlavor === void 0 ? void 0 : currentFlavor.name,
@@ -53,7 +53,7 @@ class ExecutionUnit extends BaseUnit_1.default {
53
53
  if (!executable) {
54
54
  throw new Error(`Executable ${executableName} not found`);
55
55
  }
56
- this.setProp("executable", executable);
56
+ this.executable = executable;
57
57
  this.setFlavor(flavorName);
58
58
  }
59
59
  setFlavor(flavorName) {
@@ -68,14 +68,14 @@ class ExecutionUnit extends BaseUnit_1.default {
68
68
  this.defaultPreProcessors = flavor.preProcessors;
69
69
  this.defaultPostProcessors = flavor.postProcessors;
70
70
  // flavor is missing on the first run, so do not use getter this.flavor with requiredProperty
71
- const previousFlavor = this.prop("flavor");
71
+ const previousFlavor = this._json.flavor;
72
72
  if ((previousFlavor === null || previousFlavor === void 0 ? void 0 : previousFlavor.name) !== flavor.name) {
73
73
  this.results = flavor.results;
74
74
  this.monitors = flavor.monitors;
75
75
  this.preProcessors = flavor.preProcessors;
76
76
  this.postProcessors = flavor.postProcessors;
77
77
  }
78
- this.setProp("flavor", flavor);
78
+ this.flavor = flavor;
79
79
  this.setDefaultInput();
80
80
  }
81
81
  /**
@@ -1,19 +1,15 @@
1
1
  import { Template } from "@mat3ra/ade";
2
2
  import { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
3
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
4
- import type { TemplateSchema } from "@mat3ra/esse/dist/js/types";
3
+ import type { BaseInMemoryEntitySchema, TemplateSchema } from "@mat3ra/esse/dist/js/types";
5
4
  import { type ExecutionUnitInputSchemaMixin } from "../generated/ExecutionUnitInputSchemaMixin";
6
5
  type Schema = ExecutionUnitInputSchemaMixin;
7
- type JSON = Schema & AnyObject;
6
+ type ExecutionUnitInputEntity = Schema & BaseInMemoryEntitySchema;
8
7
  type ConstructorConfig = Schema | (Omit<Schema, "template"> & {
9
8
  template: Template;
10
9
  });
11
10
  interface ExecutionUnitInput extends ExecutionUnitInputSchemaMixin {
12
11
  }
13
- declare class ExecutionUnitInput extends InMemoryEntity implements Schema {
14
- _json: JSON;
15
- toJSON: () => JSON;
16
- toJSONQuick: () => JSON;
12
+ declare class ExecutionUnitInput extends InMemoryEntity<ExecutionUnitInputEntity> implements Schema {
17
13
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
18
14
  static createFromTemplate(template: Template | TemplateSchema): ExecutionUnitInput;
19
15
  constructor(config: ConstructorConfig);
@@ -33,14 +33,24 @@ class ExecutionUnitInput extends entity_1.InMemoryEntity {
33
33
  try {
34
34
  const rendered = nunjucks_1.default.compile(this.template.content, env).render(renderingContext);
35
35
  this.rendered = rendered || this.template.content;
36
- return this;
37
36
  }
38
37
  catch (error) {
38
+ // Can happen transiently right after switching to a multi-material workflow (e.g.
39
+ // interface left/right units keyed by MATERIAL_INDEX "1"/"2"), before the job's
40
+ // materials have been updated to match: `input.perMaterial[MATERIAL_INDEX]` is
41
+ // undefined until enough materials are assigned. This throwing used to propagate out
42
+ // of `ExecutionUnit.render()` and up through the JOB_WORKFLOW_SYNC/JOB_UPDATE
43
+ // reducers, aborting the whole dispatch - so the workflow selection itself silently
44
+ // never applied to the job (job-designer's `onSelectWorkflowsSubmit` just logs the
45
+ // rejected promise). Fall back to the raw template so the reducer can complete;
46
+ // render() runs again on the next job/material update and renders correctly once
47
+ // materials line up.
39
48
  console.error("Error rendering template", this.template.content);
40
49
  console.error("Rendering context: ", JSON.stringify(renderingContext));
41
50
  console.error("Error", error);
42
- throw error;
51
+ this.rendered = this.template.content;
43
52
  }
53
+ return this;
44
54
  }
45
55
  }
46
56
  (0, ExecutionUnitInputSchemaMixin_1.executionUnitInputSchemaMixin)(ExecutionUnitInput.prototype);
@@ -1,15 +1,12 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { DataIOUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { type IOUnitSchemaMixin } from "../generated/IOUnitSchemaMixin";
5
4
  import BaseUnit from "./BaseUnit";
6
5
  type Schema = DataIOUnitSchema;
7
- type Base = typeof BaseUnit<Schema> & Constructor<IOUnitSchemaMixin>;
8
6
  export type IOUnitConfig = Partial<Schema>;
9
- declare const IOUnit_base: Base;
10
- declare class IOUnit extends IOUnit_base implements Schema {
11
- toJSON: () => Schema & AnyObject;
12
- _json: Schema & AnyObject;
7
+ interface IOUnit extends IOUnitSchemaMixin, Taggable {
8
+ }
9
+ declare class IOUnit extends BaseUnit<Schema> implements Schema {
13
10
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
14
11
  constructor(config: IOUnitConfig);
15
12
  }
@@ -1,5 +1,4 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { MapUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { UnitType } from "../enums";
5
4
  import { type MapUnitSchemaMixin } from "../generated/MapUnitSchemaMixin";
@@ -21,12 +20,10 @@ export declare const defaultMapConfig: {
21
20
  preProcessors: never[];
22
21
  postProcessors: never[];
23
22
  };
24
- type Base = typeof BaseUnit<Schema> & Constructor<MapUnitSchemaMixin>;
25
23
  export type MapUnitConfig = Partial<Omit<Schema, "type">>;
26
- declare const MapUnit_base: Base;
27
- declare class MapUnit extends MapUnit_base implements Schema {
28
- toJSON: () => Schema & AnyObject;
29
- _json: Schema & AnyObject;
24
+ interface MapUnit extends MapUnitSchemaMixin, Taggable {
25
+ }
26
+ declare class MapUnit extends BaseUnit<Schema> implements Schema {
30
27
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
31
28
  constructor(config: MapUnitConfig);
32
29
  setWorkflowId(id: string): void;
@@ -39,7 +39,7 @@ class MapUnit extends BaseUnit_1.default {
39
39
  super(schema);
40
40
  }
41
41
  setWorkflowId(id) {
42
- this.setProp("workflowId", id);
42
+ this.workflowId = id;
43
43
  }
44
44
  }
45
45
  (0, MapUnitSchemaMixin_1.mapUnitSchemaMixin)(MapUnit.prototype);
@@ -1,15 +1,12 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { ReduceUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { type ReduceUnitSchemaMixin } from "../generated/ReduceUnitSchemaMixin";
5
4
  import BaseUnit from "./BaseUnit";
6
5
  type Schema = ReduceUnitSchema;
7
- type Base = typeof BaseUnit<Schema> & Constructor<ReduceUnitSchemaMixin>;
8
6
  export type ReduceUnitConfig = Partial<Omit<Schema, "type" | "flowchartId">> & Pick<Schema, "flowchartId">;
9
- declare const ReduceUnit_base: Base;
10
- declare class ReduceUnit extends ReduceUnit_base implements Schema {
11
- toJSON: () => Schema & AnyObject;
12
- _json: Schema & AnyObject;
7
+ interface ReduceUnit extends ReduceUnitSchemaMixin, Taggable {
8
+ }
9
+ declare class ReduceUnit extends BaseUnit<Schema> implements Schema {
13
10
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
14
11
  constructor(config: ReduceUnitConfig);
15
12
  }
@@ -1,15 +1,12 @@
1
- import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
2
- import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
1
+ import { type Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
3
2
  import type { SubworkflowUnitSchema } from "@mat3ra/esse/dist/js/types";
4
3
  import { type SubworkflowUnitSchemaMixin } from "../generated/SubworkflowUnitSchemaMixin";
5
4
  import BaseUnit from "./BaseUnit";
6
5
  type Schema = SubworkflowUnitSchema;
7
- type Base = typeof BaseUnit<Schema> & Constructor<SubworkflowUnitSchemaMixin>;
8
6
  export type SubworkflowUnitConfig = Partial<Omit<Schema, "flowchartId">> & Pick<Schema, "flowchartId">;
9
- declare const SubworkflowUnit_base: Base;
10
- declare class SubworkflowUnit extends SubworkflowUnit_base implements Schema {
11
- toJSON: () => Schema & AnyObject;
12
- _json: Schema & AnyObject;
7
+ interface SubworkflowUnit extends SubworkflowUnitSchemaMixin, Taggable {
8
+ }
9
+ declare class SubworkflowUnit extends BaseUnit<Schema> implements Schema {
13
10
  static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
14
11
  constructor(config: SubworkflowUnitConfig);
15
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/wode",
3
- "version": "2026.7.29-0",
3
+ "version": "2026.8.13-0",
4
4
  "description": "WOrkflow DEfinitions",
5
5
  "scripts": {
6
6
  "test": "mocha --recursive --bail --require ts-node/register 'tests/js/**/*.ts'",
@@ -40,19 +40,18 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@exabyte-io/eslint-config": "2025.5.13-0",
43
- "@mat3ra/ade": "2026.5.28-0",
44
- "@mat3ra/code": "2026.5.27-0",
45
- "@mat3ra/esse": "2026.6.16-0",
43
+ "@mat3ra/ade": "2026.8.13-0",
44
+ "@mat3ra/code": "2026.8.13-0",
45
+ "@mat3ra/esse": "2026.8.13-0",
46
46
  "@mat3ra/ide": "2026.5.28-0",
47
- "@mat3ra/made": "2026.7.29-0",
48
- "@mat3ra/mode": "2026.5.29-1",
49
- "@mat3ra/prode": "2026.5.28-0",
47
+ "@mat3ra/made": "2026.8.13-0",
48
+ "@mat3ra/mode": "2026.8.13-0",
49
+ "@mat3ra/prode": "2026.8.13-0",
50
50
  "@mat3ra/standata": "2026.5.28-0",
51
51
  "@mat3ra/tsconfig": "^2024.6.3-0",
52
- "@mat3ra/utils": "2026.7.9-0",
52
+ "@mat3ra/utils": "^2026.7.9-0",
53
53
  "@typescript-eslint/eslint-plugin": "^5.62.0",
54
54
  "@typescript-eslint/parser": "^5.62.0",
55
- "@types/nunjucks": "^3.2.6",
56
55
  "chai": "^4.3.4",
57
56
  "eslint": "^7.32.0",
58
57
  "eslint-config-airbnb": "^19.0.2",