@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.
- package/dist/js/Subworkflow.d.ts +21 -20
- package/dist/js/Subworkflow.js +8 -7
- package/dist/js/Workflow.d.ts +11 -10
- package/dist/js/Workflow.js +7 -3
- package/dist/js/context/mixins/MaterialContextMixin.d.ts +1 -4
- package/dist/js/context/providers/CollinearMagnetizationDataManager.js +1 -1
- package/dist/js/context/providers/Hubbard/HubbardContextProvider.d.ts +6 -4
- package/dist/js/context/providers/Hubbard/HubbardContextProvider.js +12 -7
- package/dist/js/context/providers/NonCollinearMagnetizationDataManager.js +1 -1
- package/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.d.ts +6 -4
- package/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.js +10 -5
- package/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.d.ts +3 -4
- package/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.js +3 -2
- package/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.js +2 -1
- package/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.js +1 -1
- package/dist/js/generated/AssertionUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/AssignmentUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/BaseUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/BaseUnitSchemaMixin.js +6 -18
- package/dist/js/generated/ConditionUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/ErrorUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/ExecutionUnitInputSchemaMixin.d.ts +2 -2
- package/dist/js/generated/ExecutionUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/IOUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/MapUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/ReduceUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/StatusTrackSchemaMixin.d.ts +5 -0
- package/dist/js/generated/{StatusSchemaMixin.js → StatusTrackSchemaMixin.js} +2 -8
- package/dist/js/generated/SubworkflowSchemaMixin.d.ts +2 -2
- package/dist/js/generated/SubworkflowUnitSchemaMixin.d.ts +2 -2
- package/dist/js/generated/WorkflowSchemaMixin.d.ts +2 -2
- package/dist/js/units/AssertionUnit.d.ts +4 -7
- package/dist/js/units/AssignmentUnit.d.ts +4 -7
- package/dist/js/units/BaseUnit.d.ts +13 -12
- package/dist/js/units/BaseUnit.js +14 -11
- package/dist/js/units/ConditionUnit.d.ts +4 -7
- package/dist/js/units/ErrorUnit.d.ts +4 -7
- package/dist/js/units/ExecutionUnit.d.ts +4 -7
- package/dist/js/units/ExecutionUnit.js +6 -6
- package/dist/js/units/ExecutionUnitInput.d.ts +3 -7
- package/dist/js/units/ExecutionUnitInput.js +12 -2
- package/dist/js/units/IOUnit.d.ts +4 -7
- package/dist/js/units/MapUnit.d.ts +4 -7
- package/dist/js/units/MapUnit.js +1 -1
- package/dist/js/units/ReduceUnit.d.ts +4 -7
- package/dist/js/units/SubworkflowUnit.d.ts +4 -7
- package/package.json +8 -9
- package/src/js/Subworkflow.ts +42 -32
- package/src/js/Workflow.ts +28 -16
- package/src/js/context/mixins/MaterialContextMixin.ts +1 -2
- package/src/js/context/providers/CollinearMagnetizationDataManager.ts +1 -1
- package/src/js/context/providers/Hubbard/HubbardContextProvider.ts +17 -8
- package/src/js/context/providers/NonCollinearMagnetizationDataManager.ts +1 -1
- package/src/js/context/providers/PointsGrid/PointsGridFormDataProvider.ts +14 -12
- package/src/js/context/providers/PointsPath/PointsPathFormDataProvider.ts +9 -6
- package/src/js/context/providers/by_application/espresso/QEPWXInputDataManager.ts +4 -3
- package/src/js/context/providers/by_application/nwchem/NWChemInputDataManager.ts +1 -1
- package/src/js/generated/AssertionUnitSchemaMixin.ts +11 -6
- package/src/js/generated/AssignmentUnitSchemaMixin.ts +12 -7
- package/src/js/generated/BaseUnitSchemaMixin.ts +17 -26
- package/src/js/generated/ConditionUnitSchemaMixin.ts +15 -10
- package/src/js/generated/ErrorUnitSchemaMixin.ts +7 -5
- package/src/js/generated/ExecutionUnitInputSchemaMixin.ts +12 -8
- package/src/js/generated/ExecutionUnitSchemaMixin.ts +14 -9
- package/src/js/generated/IOUnitSchemaMixin.ts +7 -7
- package/src/js/generated/MapUnitSchemaMixin.ts +6 -6
- package/src/js/generated/ReduceUnitSchemaMixin.ts +8 -6
- package/src/js/generated/StatusTrackSchemaMixin.ts +24 -0
- package/src/js/generated/SubworkflowSchemaMixin.ts +12 -10
- package/src/js/generated/SubworkflowUnitSchemaMixin.ts +9 -4
- package/src/js/generated/WorkflowSchemaMixin.ts +10 -10
- package/src/js/units/AssertionUnit.ts +3 -7
- package/src/js/units/AssignmentUnit.ts +4 -7
- package/src/js/units/BaseUnit.ts +39 -29
- package/src/js/units/ConditionUnit.ts +3 -7
- package/src/js/units/ErrorUnit.ts +3 -7
- package/src/js/units/ExecutionUnit.ts +10 -15
- package/src/js/units/ExecutionUnitInput.ts +16 -13
- package/src/js/units/IOUnit.ts +3 -7
- package/src/js/units/MapUnit.ts +4 -10
- package/src/js/units/ReduceUnit.ts +3 -7
- package/src/js/units/SubworkflowUnit.ts +3 -7
- package/dist/js/WorkflowDesignerMaterial.d.ts +0 -21
- package/dist/js/WorkflowDesignerMaterial.js +0 -26
- package/dist/js/generated/StatusSchemaMixin.d.ts +0 -5
- package/dist/js/repair/createErrorUnitData.d.ts +0 -3
- package/dist/js/repair/createErrorUnitData.js +0 -25
- package/dist/js/repair/formatRepairReason.d.ts +0 -1
- package/dist/js/repair/formatRepairReason.js +0 -22
- package/dist/js/repair/types.d.ts +0 -16
- package/dist/js/repair/types.js +0 -2
- package/dist/js/subworkflows/convergence/enums.js +0 -15
- package/dist/js/subworkflows/convergence/factory.js +0 -36
- package/dist/js/subworkflows/subworkflow.js +0 -285
- package/dist/js/utils/subworkflow.d.ts +0 -2
- package/dist/js/utils/subworkflow.js +0 -29
- package/dist/js/utils/underscoreStringSlugify.d.ts +0 -6
- package/dist/js/utils/underscoreStringSlugify.js +0 -32
- package/dist/js/utils.js +0 -87
- package/dist/js/workflows/workflow.d.ts +0 -4404
- package/dist/js/workflows/workflow.js +0 -315
- 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.
|
|
4
|
-
function
|
|
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
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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 {
|
|
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
|
|
10
|
+
import { type StatusTrackSchemaMixin } from "../generated/StatusTrackSchemaMixin";
|
|
13
11
|
import { type RuntimeItemsUILogic } from "./mixins/RuntimeItemsUILogicMixin";
|
|
14
12
|
type Schema = WorkflowBaseUnitSchema;
|
|
15
|
-
type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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<
|
|
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
|
|
12
|
+
const StatusTrackSchemaMixin_1 = require("../generated/StatusTrackSchemaMixin");
|
|
13
13
|
const RuntimeItemsUILogicMixin_1 = require("./mixins/RuntimeItemsUILogicMixin");
|
|
14
|
-
class
|
|
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
|
-
|
|
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)(
|
|
63
|
-
(0, HashedEntityMixin_1.hashedEntityMixin)(
|
|
64
|
-
(0, RuntimeItemsMixin_1.runtimeItemsMixin)(
|
|
65
|
-
(0, RuntimeItemsUILogicMixin_1.runtimeItemsUILogicMixin)(
|
|
66
|
-
(0, BaseUnitSchemaMixin_1.baseUnitSchemaMixin)(
|
|
67
|
-
(0,
|
|
68
|
-
(0, NamedEntityMixin_1.namedEntityMixin)(
|
|
69
|
-
(0, DefaultableMixin_1.defaultableEntityMixin)(
|
|
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
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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
|
-
|
|
18
|
-
|
|
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.
|
|
40
|
-
const currentFlavor = this.
|
|
41
|
-
this.
|
|
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.
|
|
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.
|
|
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.
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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;
|
package/dist/js/units/MapUnit.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import type
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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.
|
|
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.
|
|
44
|
-
"@mat3ra/code": "2026.
|
|
45
|
-
"@mat3ra/esse": "2026.
|
|
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.
|
|
48
|
-
"@mat3ra/mode": "2026.
|
|
49
|
-
"@mat3ra/prode": "2026.
|
|
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",
|