@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
package/dist/js/Subworkflow.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Application } from "@mat3ra/ade";
|
|
2
|
-
import {
|
|
2
|
+
import { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
3
|
+
import { type Defaultable } from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin";
|
|
3
4
|
import { type HashedEntity } from "@mat3ra/code/dist/js/entity/mixins/HashedEntityMixin";
|
|
4
|
-
import type
|
|
5
|
-
import type { JobSchema, SubworkflowSchema } from "@mat3ra/esse/dist/js/types";
|
|
5
|
+
import { type NamedEntity } from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin";
|
|
6
|
+
import type { BaseInMemoryEntitySchema, JobSchema, SubworkflowSchema } from "@mat3ra/esse/dist/js/types";
|
|
6
7
|
import { type ComputedEntityMixin } from "@mat3ra/ide/dist/js/compute";
|
|
7
8
|
import type { Material } from "@mat3ra/made";
|
|
8
9
|
import { Model, ModelFactory } from "@mat3ra/mode";
|
|
@@ -24,10 +25,12 @@ type ConvergenceConfig = {
|
|
|
24
25
|
maxOccurrences: number;
|
|
25
26
|
externalContext: SubworkflowExternalContext;
|
|
26
27
|
};
|
|
27
|
-
interface Subworkflow extends
|
|
28
|
+
interface Subworkflow extends Defaultable, NamedEntity, SubworkflowSchemaMixin, HashedEntity, Omit<ComputedEntityMixin, "compute"> {
|
|
28
29
|
}
|
|
29
30
|
type SubworkflowExternalContext = WorkflowRenderContext & WorkflowExternalContext;
|
|
30
|
-
|
|
31
|
+
export type SubworkflowEntity = SubworkflowSchema & BaseInMemoryEntitySchema;
|
|
32
|
+
type Schema = SubworkflowEntity;
|
|
33
|
+
declare class Subworkflow<S extends Schema = Schema> extends InMemoryEntity<S> {
|
|
31
34
|
private ModelFactory;
|
|
32
35
|
private applicationInstance;
|
|
33
36
|
unitsInstances: AnySubworkflowUnit[];
|
|
@@ -35,10 +38,8 @@ declare class Subworkflow extends InMemoryEntity implements SubworkflowSchema {
|
|
|
35
38
|
properties: string[];
|
|
36
39
|
repetition: number;
|
|
37
40
|
static createDefault: () => Subworkflow;
|
|
38
|
-
toJSON: () => SubworkflowSchema & AnyObject;
|
|
39
|
-
_json: SubworkflowSchema & AnyObject;
|
|
40
41
|
static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
|
|
41
|
-
constructor(config:
|
|
42
|
+
constructor(config: NoInfer<S>, _ModelFactory?: typeof ModelFactory);
|
|
42
43
|
static get defaultConfig(): {
|
|
43
44
|
_id: any;
|
|
44
45
|
name: string;
|
|
@@ -109,18 +110,18 @@ declare class Subworkflow extends InMemoryEntity implements SubworkflowSchema {
|
|
|
109
110
|
[k: string]: unknown;
|
|
110
111
|
}[];
|
|
111
112
|
tags?: string[];
|
|
112
|
-
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
113
113
|
statusTrack?: {
|
|
114
114
|
trackedAt: number;
|
|
115
115
|
status: string;
|
|
116
116
|
repetition?: number;
|
|
117
117
|
}[];
|
|
118
118
|
isDraft?: boolean;
|
|
119
|
-
type: "io";
|
|
120
119
|
head?: boolean;
|
|
121
120
|
flowchartId: string;
|
|
122
121
|
next?: string;
|
|
123
122
|
enableRender?: boolean;
|
|
123
|
+
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
124
|
+
type?: "io";
|
|
124
125
|
subtype: "input" | "output" | "dataFrame";
|
|
125
126
|
source: "api" | "object_storage";
|
|
126
127
|
input: ({
|
|
@@ -167,18 +168,18 @@ declare class Subworkflow extends InMemoryEntity implements SubworkflowSchema {
|
|
|
167
168
|
[k: string]: unknown;
|
|
168
169
|
}[];
|
|
169
170
|
tags?: string[];
|
|
170
|
-
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
171
171
|
statusTrack?: {
|
|
172
172
|
trackedAt: number;
|
|
173
173
|
status: string;
|
|
174
174
|
repetition?: number;
|
|
175
175
|
}[];
|
|
176
176
|
isDraft?: boolean;
|
|
177
|
-
type: "condition";
|
|
178
177
|
head?: boolean;
|
|
179
178
|
flowchartId: string;
|
|
180
179
|
next?: string;
|
|
181
180
|
enableRender?: boolean;
|
|
181
|
+
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
182
|
+
type?: "condition";
|
|
182
183
|
input: {
|
|
183
184
|
scope: string;
|
|
184
185
|
name: string;
|
|
@@ -212,18 +213,18 @@ declare class Subworkflow extends InMemoryEntity implements SubworkflowSchema {
|
|
|
212
213
|
[k: string]: unknown;
|
|
213
214
|
}[];
|
|
214
215
|
tags?: string[];
|
|
215
|
-
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
216
216
|
statusTrack?: {
|
|
217
217
|
trackedAt: number;
|
|
218
218
|
status: string;
|
|
219
219
|
repetition?: number;
|
|
220
220
|
}[];
|
|
221
221
|
isDraft?: boolean;
|
|
222
|
-
type: "assertion";
|
|
223
222
|
head?: boolean;
|
|
224
223
|
flowchartId: string;
|
|
225
224
|
next?: string;
|
|
226
225
|
enableRender?: boolean;
|
|
226
|
+
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
227
|
+
type?: "assertion";
|
|
227
228
|
statement: string;
|
|
228
229
|
errorMessage?: string;
|
|
229
230
|
} | {
|
|
@@ -250,18 +251,18 @@ declare class Subworkflow extends InMemoryEntity implements SubworkflowSchema {
|
|
|
250
251
|
[k: string]: unknown;
|
|
251
252
|
}[];
|
|
252
253
|
tags?: string[];
|
|
253
|
-
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
254
254
|
statusTrack?: {
|
|
255
255
|
trackedAt: number;
|
|
256
256
|
status: string;
|
|
257
257
|
repetition?: number;
|
|
258
258
|
}[];
|
|
259
259
|
isDraft?: boolean;
|
|
260
|
-
type: "execution";
|
|
261
260
|
head?: boolean;
|
|
262
261
|
flowchartId: string;
|
|
263
262
|
next?: string;
|
|
264
263
|
enableRender?: boolean;
|
|
264
|
+
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
265
|
+
type: "execution";
|
|
265
266
|
application: {
|
|
266
267
|
_id?: string;
|
|
267
268
|
slug?: string;
|
|
@@ -676,19 +677,19 @@ declare class Subworkflow extends InMemoryEntity implements SubworkflowSchema {
|
|
|
676
677
|
[k: string]: unknown;
|
|
677
678
|
}[];
|
|
678
679
|
tags?: string[];
|
|
679
|
-
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
680
680
|
statusTrack?: {
|
|
681
681
|
trackedAt: number;
|
|
682
682
|
status: string;
|
|
683
683
|
repetition?: number;
|
|
684
684
|
}[];
|
|
685
685
|
isDraft?: boolean;
|
|
686
|
-
type: "assignment";
|
|
687
686
|
head?: boolean;
|
|
688
687
|
flowchartId: string;
|
|
689
688
|
next?: string;
|
|
690
689
|
enableRender?: boolean;
|
|
690
|
+
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
691
691
|
scope?: string;
|
|
692
|
+
type?: "assignment";
|
|
692
693
|
input?: {
|
|
693
694
|
scope: string;
|
|
694
695
|
name: string;
|
|
@@ -719,18 +720,18 @@ declare class Subworkflow extends InMemoryEntity implements SubworkflowSchema {
|
|
|
719
720
|
[k: string]: unknown;
|
|
720
721
|
}[];
|
|
721
722
|
tags?: string[];
|
|
722
|
-
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
723
723
|
statusTrack?: {
|
|
724
724
|
trackedAt: number;
|
|
725
725
|
status: string;
|
|
726
726
|
repetition?: number;
|
|
727
727
|
}[];
|
|
728
728
|
isDraft?: boolean;
|
|
729
|
-
type: "error";
|
|
730
729
|
head?: boolean;
|
|
731
730
|
flowchartId: string;
|
|
732
731
|
next?: string;
|
|
733
732
|
enableRender?: boolean;
|
|
733
|
+
status?: "idle" | "active" | "warning" | "error" | "finished";
|
|
734
|
+
type?: "error";
|
|
734
735
|
reason: string;
|
|
735
736
|
} | undefined;
|
|
736
737
|
findUnitKeyById(id: string): string;
|
package/dist/js/Subworkflow.js
CHANGED
|
@@ -17,10 +17,14 @@ const factory_1 = require("./convergence/factory");
|
|
|
17
17
|
const enums_1 = require("./enums");
|
|
18
18
|
const SubworkflowSchemaMixin_1 = require("./generated/SubworkflowSchemaMixin");
|
|
19
19
|
const units_1 = require("./units");
|
|
20
|
+
function isAssignmentUnitSchema(unit) {
|
|
21
|
+
return unit.type === enums_1.UnitType.assignment;
|
|
22
|
+
}
|
|
20
23
|
class Subworkflow extends entity_1.InMemoryEntity {
|
|
21
24
|
static get jsonSchema() {
|
|
22
25
|
return JSONSchemasInterface_1.default.getSchemaById("workflow/subworkflow");
|
|
23
26
|
}
|
|
27
|
+
// NoInfer: keep default S (or an explicit type arg) instead of inferring S from the config literal.
|
|
24
28
|
constructor(config, _ModelFactory = mode_1.ModelFactory) {
|
|
25
29
|
super(config);
|
|
26
30
|
this.properties = [];
|
|
@@ -62,7 +66,8 @@ class Subworkflow extends entity_1.InMemoryEntity {
|
|
|
62
66
|
postProcessors: [],
|
|
63
67
|
monitors: [],
|
|
64
68
|
results: [],
|
|
65
|
-
|
|
69
|
+
// Concrete id for graph linking ("" is a valid string but not a usable node id).
|
|
70
|
+
flowchartId: utils_1.Utils.uuid.getUUID(),
|
|
66
71
|
});
|
|
67
72
|
}
|
|
68
73
|
setApplication(application) {
|
|
@@ -93,9 +98,7 @@ class Subworkflow extends entity_1.InMemoryEntity {
|
|
|
93
98
|
this.model = model.toJSON();
|
|
94
99
|
}
|
|
95
100
|
buildExternalContext(context) {
|
|
96
|
-
const subworkflowContext = this.units
|
|
97
|
-
.filter((u) => u.type === enums_1.UnitType.assignment)
|
|
98
|
-
.reduce((acc, u) => {
|
|
101
|
+
const subworkflowContext = this.units.filter(isAssignmentUnitSchema).reduce((acc, u) => {
|
|
99
102
|
return {
|
|
100
103
|
...acc,
|
|
101
104
|
[u.operand]: u.value,
|
|
@@ -187,9 +190,7 @@ class Subworkflow extends entity_1.InMemoryEntity {
|
|
|
187
190
|
return `units.${index}`;
|
|
188
191
|
}
|
|
189
192
|
findAssignmentUnitWithTag(tag) {
|
|
190
|
-
return this.units
|
|
191
|
-
.filter((unit) => unit.type === enums_1.UnitType.assignment)
|
|
192
|
-
.find((unit) => { var _a; return (_a = unit.tags) === null || _a === void 0 ? void 0 : _a.includes(tag); });
|
|
193
|
+
return this.units.filter(isAssignmentUnitSchema).find((unit) => { var _a; return (_a = unit.tags) === null || _a === void 0 ? void 0 : _a.includes(tag); });
|
|
193
194
|
}
|
|
194
195
|
get hasConvergence() {
|
|
195
196
|
return !!this.convergenceParam && !!this.convergenceResult;
|
package/dist/js/Workflow.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
2
|
import { type Defaultable } from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin";
|
|
3
3
|
import { type HasDescription } from "@mat3ra/code/dist/js/entity/mixins/HasDescriptionMixin";
|
|
4
4
|
import { type HashedEntity } from "@mat3ra/code/dist/js/entity/mixins/HashedEntityMixin";
|
|
5
|
+
import { type NamedEntity } from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin";
|
|
5
6
|
import { Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin";
|
|
6
|
-
import type {
|
|
7
|
-
import type { ApplicationSchema } from "@mat3ra/esse/dist/js/types";
|
|
7
|
+
import type { ApplicationSchema, BaseInMemoryEntitySchema } from "@mat3ra/esse/dist/js/types";
|
|
8
8
|
import { ComputedEntityMixin } from "@mat3ra/ide/dist/js/compute";
|
|
9
9
|
import type { Material } from "@mat3ra/made";
|
|
10
10
|
import type { MetaPropertyHolder } from "@mat3ra/prode";
|
|
@@ -18,17 +18,18 @@ import Subworkflow from "./Subworkflow";
|
|
|
18
18
|
import { MapUnit } from "./units";
|
|
19
19
|
import { type AnyWorkflowUnit } from "./units/factory";
|
|
20
20
|
import type { WorkflowSchema } from "./workflows/types";
|
|
21
|
-
|
|
21
|
+
export type WorkflowEntity = WorkflowSchema & BaseInMemoryEntitySchema;
|
|
22
|
+
type Schema = WorkflowEntity;
|
|
23
|
+
interface Workflow extends Defaultable, NamedEntity, WorkflowSchemaMixin, Taggable, HashedEntity, ComputedEntityMixin, HasDescription {
|
|
22
24
|
compute: WorkflowSchema["compute"];
|
|
23
25
|
}
|
|
24
26
|
/** Context passed to Workflow.render(); subworkflows also receive `workflowHasRelaxation`. */
|
|
25
27
|
export type WorkflowRenderContext = MaterialExternalContext & MaterialsExternalContext & MaterialsSetExternalContext & JobExternalContext & {
|
|
26
28
|
scopeGlobal?: Record<string, unknown>;
|
|
27
29
|
};
|
|
28
|
-
declare class Workflow extends InMemoryEntity implements WorkflowSchema {
|
|
30
|
+
declare class Workflow<S extends Schema = Schema> extends InMemoryEntity<S> implements WorkflowSchema {
|
|
29
31
|
createDefault: () => Workflow;
|
|
30
32
|
static readonly defaultConfig: WorkflowSchema;
|
|
31
|
-
_json: WorkflowSchema & AnyObject;
|
|
32
33
|
static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
|
|
33
34
|
subworkflowInstances: Subworkflow[];
|
|
34
35
|
unitInstances: AnyWorkflowUnit[];
|
|
@@ -37,8 +38,8 @@ declare class Workflow extends InMemoryEntity implements WorkflowSchema {
|
|
|
37
38
|
totalRepetitions: number;
|
|
38
39
|
setTotalRepetitions(totalRepetition: number): void;
|
|
39
40
|
setRepetition(repetition: number): void;
|
|
40
|
-
static fromSubworkflow(subworkflow: Subworkflow): Workflow
|
|
41
|
-
constructor(config:
|
|
41
|
+
static fromSubworkflow(subworkflow: Subworkflow): Workflow<WorkflowEntity>;
|
|
42
|
+
constructor(config: NoInfer<S> & {
|
|
42
43
|
applicationName?: string;
|
|
43
44
|
});
|
|
44
45
|
get workflows(): WorkflowSchema[];
|
|
@@ -62,7 +63,7 @@ declare class Workflow extends InMemoryEntity implements WorkflowSchema {
|
|
|
62
63
|
get usedApplicationNamesWithVersions(): string[];
|
|
63
64
|
getUsedModels(): ("dft" | "ml" | "unknown")[];
|
|
64
65
|
getHumanReadableUsedModels(): string[];
|
|
65
|
-
toJSON():
|
|
66
|
+
toJSON(): S;
|
|
66
67
|
getHumanReadableProperties(): string[];
|
|
67
68
|
getProperties(): string[];
|
|
68
69
|
getSystemName(): string;
|
|
@@ -71,7 +72,7 @@ declare class Workflow extends InMemoryEntity implements WorkflowSchema {
|
|
|
71
72
|
removeUnit(flowchartId: string): void;
|
|
72
73
|
addUnitType(type: UnitType, head?: boolean, index?: number): void;
|
|
73
74
|
addMapUnit(mapUnit: MapUnit, mapWorkflow: Workflow): void;
|
|
74
|
-
get allSubworkflows(): Subworkflow[];
|
|
75
|
+
get allSubworkflows(): Subworkflow<import("./Subworkflow").SubworkflowEntity>[];
|
|
75
76
|
get hasRelaxation(): boolean;
|
|
76
77
|
toggleRelaxation(): void;
|
|
77
78
|
getHashObject(): {
|
package/dist/js/Workflow.js
CHANGED
|
@@ -44,11 +44,15 @@ class Workflow extends entity_1.InMemoryEntity {
|
|
|
44
44
|
};
|
|
45
45
|
return new this(config);
|
|
46
46
|
}
|
|
47
|
+
// NoInfer: keep default S (or an explicit type arg) instead of inferring S from the config literal.
|
|
47
48
|
constructor(config) {
|
|
48
49
|
var _a;
|
|
50
|
+
// Strip applicationName (fromSubworkflow helper); not part of WorkflowEntity.
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
52
|
+
const { applicationName, ...rest } = config;
|
|
49
53
|
super({
|
|
50
|
-
...
|
|
51
|
-
_id:
|
|
54
|
+
...rest,
|
|
55
|
+
_id: rest._id || utils_1.Utils.uuid.getUUID(),
|
|
52
56
|
});
|
|
53
57
|
this.repetition = 0;
|
|
54
58
|
this.totalRepetitions = 1;
|
|
@@ -60,7 +64,7 @@ class Workflow extends entity_1.InMemoryEntity {
|
|
|
60
64
|
return this.requiredProp("workflows");
|
|
61
65
|
}
|
|
62
66
|
set workflows(value) {
|
|
63
|
-
this.
|
|
67
|
+
this._json.workflows = value;
|
|
64
68
|
}
|
|
65
69
|
addSubworkflow(subworkflow, head = false, index = -1) {
|
|
66
70
|
const subworkflowUnit = subworkflow.getAsUnit();
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import type { OrderedInMemoryEntityInSet } from "@mat3ra/code/dist/js/entity/set/ordered/OrderedInMemoryEntityInSetMixin";
|
|
2
|
-
import { Material } from "@mat3ra/made
|
|
2
|
+
import type { Material } from "@mat3ra/made";
|
|
3
3
|
import type ContextProvider from "../providers/base/ContextProvider";
|
|
4
4
|
export type OrderedMaterial = OrderedInMemoryEntityInSet & Material;
|
|
5
5
|
export type MaterialContextMixin = {
|
|
6
6
|
readonly isMaterialCreatedDefault: boolean;
|
|
7
7
|
readonly isMaterialUpdated: boolean;
|
|
8
8
|
material: OrderedMaterial;
|
|
9
|
-
extraData?: {
|
|
10
|
-
materialHash?: string;
|
|
11
|
-
};
|
|
12
9
|
initMaterialContextMixin(externalContext: MaterialExternalContext): void;
|
|
13
10
|
updateMaterialHash(): void;
|
|
14
11
|
};
|
|
@@ -25,7 +25,7 @@ class CollinearMagnetizationDataManager extends JSONSchemaDataProvider_1.default
|
|
|
25
25
|
this.entityName = "unit";
|
|
26
26
|
this.initMaterialContextMixin(externalContext);
|
|
27
27
|
this.uniqueElementsWithLabels = [
|
|
28
|
-
...new Set(((_b = (_a = this.material) === null || _a === void 0 ? void 0 : _a.
|
|
28
|
+
...new Set(((_b = (_a = this.material) === null || _a === void 0 ? void 0 : _a.getBasis()) === null || _b === void 0 ? void 0 : _b.elementsWithLabelsArray) || []),
|
|
29
29
|
];
|
|
30
30
|
this.firstElement =
|
|
31
31
|
((_c = this.uniqueElementsWithLabels) === null || _c === void 0 ? void 0 : _c.length) > 0 ? this.uniqueElementsWithLabels[0] : "";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
2
1
|
import type { HubbardJContextItemSchema, HubbardLegacyContextItemSchema, HubbardUContextItemSchema, HubbardVContextItemSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
2
|
import { type MaterialContextMixin, type MaterialExternalContext } from "../../mixins/MaterialContextMixin";
|
|
4
3
|
import JSONSchemaDataProvider, { type JinjaExternalContext } from "../base/JSONSchemaDataProvider";
|
|
5
4
|
type Schema = HubbardJContextItemSchema | HubbardUContextItemSchema | HubbardVContextItemSchema | HubbardLegacyContextItemSchema;
|
|
6
5
|
export type HubbardExternalContext = JinjaExternalContext & MaterialExternalContext;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
declare abstract class
|
|
6
|
+
interface MixinsHubbardContextProvider extends MaterialContextMixin, MaterialExternalContext {
|
|
7
|
+
}
|
|
8
|
+
declare abstract class MixinsHubbardContextProvider extends JSONSchemaDataProvider<Schema, HubbardExternalContext> {
|
|
9
|
+
constructor(contextItem: Partial<Schema>, externalContext: HubbardExternalContext);
|
|
10
|
+
}
|
|
11
|
+
declare abstract class HubbardContextProvider<S extends Schema, EC extends HubbardExternalContext = HubbardExternalContext> extends MixinsHubbardContextProvider {
|
|
10
12
|
abstract readonly name: S["name"];
|
|
11
13
|
abstract getDefaultData(): S["data"];
|
|
12
14
|
readonly domain: "important";
|
|
@@ -5,9 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const MaterialContextMixin_1 = __importDefault(require("../../mixins/MaterialContextMixin"));
|
|
7
7
|
const JSONSchemaDataProvider_1 = __importDefault(require("../base/JSONSchemaDataProvider"));
|
|
8
|
-
class
|
|
8
|
+
class MixinsHubbardContextProvider extends JSONSchemaDataProvider_1.default {
|
|
9
9
|
constructor(contextItem, externalContext) {
|
|
10
|
-
|
|
10
|
+
super(contextItem, externalContext);
|
|
11
|
+
this.initMaterialContextMixin(externalContext);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
(0, MaterialContextMixin_1.default)(MixinsHubbardContextProvider.prototype);
|
|
15
|
+
class HubbardContextProvider extends MixinsHubbardContextProvider {
|
|
16
|
+
constructor(contextItem, externalContext) {
|
|
17
|
+
var _a, _b;
|
|
11
18
|
super(contextItem, externalContext);
|
|
12
19
|
this.domain = "important";
|
|
13
20
|
this.entityName = "unit";
|
|
@@ -31,17 +38,15 @@ class HubbardContextProvider extends JSONSchemaDataProvider_1.default {
|
|
|
31
38
|
"7p",
|
|
32
39
|
"7d",
|
|
33
40
|
];
|
|
34
|
-
this.initMaterialContextMixin(externalContext);
|
|
35
41
|
this.uniqueElementsWithLabels = [
|
|
36
|
-
...new Set((
|
|
42
|
+
...new Set((this.material.getBasis().elements || []).map((element) => String(element.value))),
|
|
37
43
|
];
|
|
38
44
|
this.firstElement =
|
|
39
|
-
((
|
|
45
|
+
((_a = this.uniqueElementsWithLabels) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.uniqueElementsWithLabels[0] : "";
|
|
40
46
|
this.secondSpecies =
|
|
41
|
-
((
|
|
47
|
+
((_b = this.uniqueElementsWithLabels) === null || _b === void 0 ? void 0 : _b.length) > 1
|
|
42
48
|
? this.uniqueElementsWithLabels[1]
|
|
43
49
|
: this.firstElement;
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
|
-
(0, MaterialContextMixin_1.default)(HubbardContextProvider.prototype);
|
|
47
52
|
exports.default = HubbardContextProvider;
|
|
@@ -46,7 +46,7 @@ class NonCollinearMagnetizationDataManager extends JSONSchemaDataProvider_1.defa
|
|
|
46
46
|
constrainType: "atomic direction",
|
|
47
47
|
};
|
|
48
48
|
this.uniqueElementsWithLabels = [
|
|
49
|
-
...new Set(((_p = (_o = this.material) === null || _o === void 0 ? void 0 : _o.
|
|
49
|
+
...new Set(((_p = (_o = this.material) === null || _o === void 0 ? void 0 : _o.getBasis()) === null || _p === void 0 ? void 0 : _p.elementsWithLabelsArray) || []),
|
|
50
50
|
];
|
|
51
51
|
const jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, {
|
|
52
52
|
isExistingChargeDensity: { default: defaultData.isExistingChargeDensity },
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
2
1
|
import type { GridContextItemSchema, PointsGridDataProviderSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
2
|
import type { JSONSchema7 } from "json-schema";
|
|
4
3
|
import { type MaterialContextMixin, type MaterialExternalContext } from "../../mixins/MaterialContextMixin";
|
|
@@ -7,10 +6,13 @@ import JSONSchemaFormDataProvider from "../base/JSONSchemaFormDataProvider";
|
|
|
7
6
|
type Schema = GridContextItemSchema;
|
|
8
7
|
type Data = PointsGridDataProviderSchema;
|
|
9
8
|
export type ExternalContext = JinjaExternalContext & MaterialExternalContext;
|
|
10
|
-
type Base = typeof JSONSchemaFormDataProvider<Schema, ExternalContext> & Constructor<MaterialContextMixin>;
|
|
11
9
|
type GridMetricType = Data["gridMetricType"];
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
interface MixinsContextProvider extends MaterialContextMixin, MaterialExternalContext {
|
|
11
|
+
}
|
|
12
|
+
declare abstract class MixinsContextProvider extends JSONSchemaFormDataProvider<Schema, ExternalContext> {
|
|
13
|
+
constructor(contextItem: Partial<Schema>, externalContext: ExternalContext);
|
|
14
|
+
}
|
|
15
|
+
declare abstract class PointsGridFormDataProvider<N extends Schema["name"]> extends MixinsContextProvider {
|
|
14
16
|
abstract readonly name: N;
|
|
15
17
|
readonly domain: "important";
|
|
16
18
|
readonly entityName: "unit";
|
|
@@ -10,6 +10,13 @@ const made_1 = require("@mat3ra/made");
|
|
|
10
10
|
const MaterialContextMixin_1 = __importDefault(require("../../mixins/MaterialContextMixin"));
|
|
11
11
|
const JSONSchemaFormDataProvider_1 = __importDefault(require("../base/JSONSchemaFormDataProvider"));
|
|
12
12
|
const settings_1 = require("../settings");
|
|
13
|
+
class MixinsContextProvider extends JSONSchemaFormDataProvider_1.default {
|
|
14
|
+
constructor(contextItem, externalContext) {
|
|
15
|
+
super(contextItem, externalContext);
|
|
16
|
+
this.initMaterialContextMixin(externalContext);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
(0, MaterialContextMixin_1.default)(MixinsContextProvider.prototype);
|
|
13
20
|
const vector = (defaultValue, isStringType = false) => {
|
|
14
21
|
const isArray = Array.isArray(defaultValue);
|
|
15
22
|
return {
|
|
@@ -25,14 +32,13 @@ const vector = (defaultValue, isStringType = false) => {
|
|
|
25
32
|
};
|
|
26
33
|
const defaultShift = 0;
|
|
27
34
|
const defaultShifts = [defaultShift, defaultShift, defaultShift];
|
|
28
|
-
class PointsGridFormDataProvider extends
|
|
35
|
+
class PointsGridFormDataProvider extends MixinsContextProvider {
|
|
29
36
|
constructor(contextItem, externalContext, divisor) {
|
|
30
37
|
super(contextItem, externalContext);
|
|
31
38
|
this.domain = "important";
|
|
32
39
|
this.entityName = "unit";
|
|
33
40
|
this.jsonSchemaId = "context-providers-directory/points-grid-data-provider";
|
|
34
41
|
this.divisor = divisor;
|
|
35
|
-
this.initMaterialContextMixin(externalContext);
|
|
36
42
|
this.initInstanceFields();
|
|
37
43
|
}
|
|
38
44
|
initInstanceFields() {
|
|
@@ -224,7 +230,7 @@ class PointsGridFormDataProvider extends JSONSchemaFormDataProvider_1.default {
|
|
|
224
230
|
calculateDimensions(gridMetricType, gridMetricValue) {
|
|
225
231
|
switch (gridMetricType) {
|
|
226
232
|
case "KPPRA": {
|
|
227
|
-
const nAtoms = this.material ? this.material.
|
|
233
|
+
const nAtoms = this.material ? this.material.getBasis().nAtoms : 1;
|
|
228
234
|
return this.reciprocalLattice.getDimensionsFromPointsCount(gridMetricValue / nAtoms);
|
|
229
235
|
}
|
|
230
236
|
case "spacing":
|
|
@@ -236,7 +242,7 @@ class PointsGridFormDataProvider extends JSONSchemaFormDataProvider_1.default {
|
|
|
236
242
|
calculateGridMetric(gridMetricType, dimensions) {
|
|
237
243
|
switch (gridMetricType) {
|
|
238
244
|
case "KPPRA": {
|
|
239
|
-
const nAtoms = this.material ? this.material.
|
|
245
|
+
const nAtoms = this.material ? this.material.getBasis().nAtoms : 1;
|
|
240
246
|
return dimensions.reduce((a, b) => a * b) * nAtoms;
|
|
241
247
|
}
|
|
242
248
|
case "spacing":
|
|
@@ -278,5 +284,4 @@ class PointsGridFormDataProvider extends JSONSchemaFormDataProvider_1.default {
|
|
|
278
284
|
return super.setData(data);
|
|
279
285
|
}
|
|
280
286
|
}
|
|
281
|
-
(0, MaterialContextMixin_1.default)(PointsGridFormDataProvider.prototype);
|
|
282
287
|
exports.default = PointsGridFormDataProvider;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
2
1
|
import type { JSONSchema } from "@mat3ra/esse/dist/js/esse/utils";
|
|
3
2
|
import type { PathContextItemSchema, PointsPathDataProviderRenderingSchema, PointsPathDataProviderSchema } from "@mat3ra/esse/dist/js/types";
|
|
4
3
|
import { type ApplicationContextMixin, type ApplicationExternalContext } from "../../mixins/ApplicationContextMixin";
|
|
@@ -11,9 +10,9 @@ type Data = PointsPathFormDataProviderData;
|
|
|
11
10
|
type RenderingData = PointsPathFormDataProviderRenderingData;
|
|
12
11
|
type Schema = PathContextItemSchema;
|
|
13
12
|
type ExternalContext = PointsPathFormDataProviderExternalContext;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
declare abstract class MixinsContextProvider extends
|
|
13
|
+
interface MixinsContextProvider extends MaterialContextMixin, ApplicationContextMixin {
|
|
14
|
+
}
|
|
15
|
+
declare abstract class MixinsContextProvider extends JSONSchemaDataProvider<Schema, ExternalContext, RenderingData> {
|
|
17
16
|
constructor(contextItem: Partial<Schema>, externalContext: ExternalContext);
|
|
18
17
|
}
|
|
19
18
|
declare abstract class PointsPathFormDataProvider<N extends Schema["name"]> extends MixinsContextProvider {
|
|
@@ -40,13 +40,14 @@ class PointsPathFormDataProvider extends MixinsContextProvider {
|
|
|
40
40
|
return this.reciprocalLattice.defaultKpointPath;
|
|
41
41
|
}
|
|
42
42
|
updateMaterialHash() {
|
|
43
|
-
var _a;
|
|
43
|
+
var _a, _b;
|
|
44
44
|
const previousMaterialHash = (_a = this.extraData) === null || _a === void 0 ? void 0 : _a.materialHash;
|
|
45
45
|
super.updateMaterialHash();
|
|
46
|
+
const currentMaterialHash = (_b = this.extraData) === null || _b === void 0 ? void 0 : _b.materialHash;
|
|
46
47
|
// Reset path only when the material actually changed (hash). Do not clear `isEdited` just
|
|
47
48
|
// because the material has no id (common default material in designers): that ran every
|
|
48
49
|
// render, wiped isEdited, and savePersistentContext dropped k-path/Q-path from `unit.context`.
|
|
49
|
-
if (previousMaterialHash && previousMaterialHash !==
|
|
50
|
+
if (previousMaterialHash && previousMaterialHash !== currentMaterialHash) {
|
|
50
51
|
this.isEdited = false;
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -33,7 +33,8 @@ class QEPWXInputDataManager extends JSONSchemaDataProvider_1.default {
|
|
|
33
33
|
this.jsonSchema = jsonSchema;
|
|
34
34
|
}
|
|
35
35
|
buildQEPWXContext(material) {
|
|
36
|
-
const
|
|
36
|
+
const basis = material.getBasis();
|
|
37
|
+
const lattice = material.getLattice();
|
|
37
38
|
const { jobHasParent, workflowHasRelaxation } = this;
|
|
38
39
|
const ATOMIC_SPECIES = basis.uniqueElements.map((symbol) => {
|
|
39
40
|
var _a;
|
|
@@ -31,7 +31,7 @@ class NWChemInputDataManager extends JSONSchemaDataProvider_1.default {
|
|
|
31
31
|
* TODO: Create ability for user to define CHARGE, MULT, BASIS and FUNCTIONAL parameters.
|
|
32
32
|
*/
|
|
33
33
|
getDefaultData() {
|
|
34
|
-
const basis = this.material.
|
|
34
|
+
const basis = this.material.getBasis();
|
|
35
35
|
const NTYP = basis.uniqueElements.length;
|
|
36
36
|
const ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS = basis.atomicPositions.join("\n") || "";
|
|
37
37
|
const ATOMIC_SPECIES = basis.uniqueElements
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import type { AssertionUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import type { AssertionUnitMixinSchema, BaseInMemoryEntitySchema } from "@mat3ra/esse/dist/js/types";
|
|
3
3
|
export type AssertionUnitSchemaMixin = AssertionUnitMixinSchema;
|
|
4
|
-
export type AssertionUnitInMemoryEntity = InMemoryEntity & AssertionUnitSchemaMixin
|
|
4
|
+
export type AssertionUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & AssertionUnitSchemaMixin>;
|
|
5
5
|
export declare function assertionUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & AssertionUnitSchemaMixin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import type { AssignmentUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import type { AssignmentUnitMixinSchema, BaseInMemoryEntitySchema } from "@mat3ra/esse/dist/js/types";
|
|
3
3
|
export type AssignmentUnitSchemaMixin = AssignmentUnitMixinSchema;
|
|
4
|
-
export type AssignmentUnitInMemoryEntity = InMemoryEntity & AssignmentUnitSchemaMixin
|
|
4
|
+
export type AssignmentUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & AssignmentUnitSchemaMixin>;
|
|
5
5
|
export declare function assignmentUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & AssignmentUnitSchemaMixin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import type { WorkflowBaseUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import type { BaseInMemoryEntitySchema, WorkflowBaseUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
3
|
export type BaseUnitSchemaMixin = WorkflowBaseUnitMixinSchema;
|
|
4
|
-
export type BaseUnitInMemoryEntity = InMemoryEntity & BaseUnitSchemaMixin
|
|
4
|
+
export type BaseUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & BaseUnitSchemaMixin>;
|
|
5
5
|
export declare function baseUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & BaseUnitSchemaMixin;
|
|
@@ -10,24 +10,6 @@ function baseUnitSchemaMixin(item) {
|
|
|
10
10
|
set isDraft(value) {
|
|
11
11
|
this.setProp("isDraft", value);
|
|
12
12
|
},
|
|
13
|
-
get type() {
|
|
14
|
-
return this.requiredProp("type");
|
|
15
|
-
},
|
|
16
|
-
set type(value) {
|
|
17
|
-
this.setProp("type", value);
|
|
18
|
-
},
|
|
19
|
-
get name() {
|
|
20
|
-
return this.prop("name");
|
|
21
|
-
},
|
|
22
|
-
set name(value) {
|
|
23
|
-
this.setProp("name", value);
|
|
24
|
-
},
|
|
25
|
-
get status() {
|
|
26
|
-
return this.prop("status");
|
|
27
|
-
},
|
|
28
|
-
set status(value) {
|
|
29
|
-
this.setProp("status", value);
|
|
30
|
-
},
|
|
31
13
|
get head() {
|
|
32
14
|
return this.prop("head");
|
|
33
15
|
},
|
|
@@ -52,6 +34,12 @@ function baseUnitSchemaMixin(item) {
|
|
|
52
34
|
set enableRender(value) {
|
|
53
35
|
this.setProp("enableRender", value);
|
|
54
36
|
},
|
|
37
|
+
get status() {
|
|
38
|
+
return this.prop("status");
|
|
39
|
+
},
|
|
40
|
+
set status(value) {
|
|
41
|
+
this.setProp("status", value);
|
|
42
|
+
},
|
|
55
43
|
};
|
|
56
44
|
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
57
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import type { ConditionUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import type { BaseInMemoryEntitySchema, ConditionUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
3
|
export type ConditionUnitSchemaMixin = ConditionUnitMixinSchema;
|
|
4
|
-
export type ConditionUnitInMemoryEntity = InMemoryEntity & ConditionUnitSchemaMixin
|
|
4
|
+
export type ConditionUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & ConditionUnitSchemaMixin>;
|
|
5
5
|
export declare function conditionUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & ConditionUnitSchemaMixin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import type { ErrorUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import type { BaseInMemoryEntitySchema, ErrorUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
3
|
export type ErrorUnitSchemaMixin = ErrorUnitMixinSchema;
|
|
4
|
-
export type ErrorUnitInMemoryEntity = InMemoryEntity & ErrorUnitSchemaMixin
|
|
4
|
+
export type ErrorUnitInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & ErrorUnitSchemaMixin>;
|
|
5
5
|
export declare function errorUnitSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & ErrorUnitSchemaMixin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import type { ExecutionUnitInputItemSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import type { BaseInMemoryEntitySchema, ExecutionUnitInputItemSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
3
|
export type ExecutionUnitInputSchemaMixin = ExecutionUnitInputItemSchema;
|
|
4
|
-
export type ExecutionUnitInputInMemoryEntity = InMemoryEntity & ExecutionUnitInputSchemaMixin
|
|
4
|
+
export type ExecutionUnitInputInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & ExecutionUnitInputSchemaMixin>;
|
|
5
5
|
export declare function executionUnitInputSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & ExecutionUnitInputSchemaMixin;
|