@mat3ra/wode 2026.4.9-0 → 2026.5.29-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/.babelrc +1 -1
- package/dist/js/Subworkflow.d.ts +714 -0
- package/dist/js/Subworkflow.js +397 -0
- package/dist/js/Workflow.d.ts +82 -0
- package/dist/js/Workflow.js +286 -0
- package/dist/js/WorkflowDesignerMaterial.d.ts +21 -0
- package/dist/js/WorkflowDesignerMaterial.js +26 -0
- package/dist/js/context/mixins/ApplicationContextMixin.d.ts +10 -0
- package/dist/js/context/mixins/ApplicationContextMixin.js +10 -17
- package/dist/js/context/mixins/MaterialContextMixin.d.ts +18 -0
- package/dist/js/context/mixins/MaterialContextMixin.js +14 -38
- package/dist/js/context/mixins/MaterialsContextMixin.d.ts +10 -0
- package/dist/js/context/mixins/MaterialsContextMixin.js +11 -17
- package/dist/js/context/mixins/MaterialsSetContextMixin.d.ts +14 -0
- package/dist/js/context/mixins/MaterialsSetContextMixin.js +21 -23
- package/dist/js/context/providers/BoundaryConditionsFormDataManager.d.ts +30 -0
- package/dist/js/context/providers/BoundaryConditionsFormDataManager.js +62 -0
- package/dist/js/context/providers/CollinearMagnetizationDataManager.d.ts +42 -0
- package/dist/js/context/providers/CollinearMagnetizationDataManager.js +101 -0
- package/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.d.ts +29 -0
- package/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.js +69 -0
- package/dist/js/context/providers/Hubbard/HubbardContextProvider.d.ts +20 -0
- package/dist/js/context/providers/Hubbard/HubbardContextProvider.js +47 -0
- package/dist/js/context/providers/Hubbard/HubbardJContextManager.d.ts +22 -0
- package/dist/js/context/providers/Hubbard/HubbardJContextManager.js +61 -0
- package/dist/js/context/providers/Hubbard/HubbardUContextManager.d.ts +22 -0
- package/dist/js/context/providers/Hubbard/HubbardUContextManager.js +57 -0
- package/dist/js/context/providers/Hubbard/HubbardVContextManager.d.ts +22 -0
- package/dist/js/context/providers/Hubbard/HubbardVContextManager.js +79 -0
- package/dist/js/context/providers/IonDynamicsDataManager.d.ts +27 -0
- package/dist/js/context/providers/IonDynamicsDataManager.js +48 -0
- package/dist/js/context/providers/MLSettingsDataManager.d.ts +24 -0
- package/dist/js/context/providers/MLSettingsDataManager.js +42 -0
- package/dist/js/context/providers/MLTrainTestSplitDataManager.d.ts +23 -0
- package/dist/js/context/providers/MLTrainTestSplitDataManager.js +40 -0
- package/dist/js/context/providers/NEBFormDataManager.d.ts +23 -0
- package/dist/js/context/providers/NEBFormDataManager.js +39 -0
- package/dist/js/context/providers/NonCollinearMagnetizationDataManager.d.ts +78 -0
- package/dist/js/context/providers/NonCollinearMagnetizationDataManager.js +181 -0
- package/dist/js/context/providers/PlanewaveCutoffDataManager.d.ts +26 -0
- package/dist/js/context/providers/PlanewaveCutoffDataManager.js +69 -0
- package/dist/js/context/providers/PointsGrid/IGridFormDataManager.d.ts +13 -0
- package/dist/js/context/providers/PointsGrid/IGridFormDataManager.js +23 -0
- package/dist/js/context/providers/PointsGrid/KGridFormDataManager.d.ts +15 -0
- package/dist/js/context/providers/PointsGrid/KGridFormDataManager.js +30 -0
- package/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.d.ts +171 -0
- package/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.js +270 -0
- package/dist/js/context/providers/PointsGrid/QGridFormDataManager.d.ts +13 -0
- package/dist/js/context/providers/PointsGrid/QGridFormDataManager.js +23 -0
- package/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.d.ts +10 -0
- package/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.js +19 -0
- package/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.d.ts +9 -0
- package/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.js +18 -0
- package/dist/js/context/providers/PointsPath/IPathFormDataManager.d.ts +8 -0
- package/dist/js/context/providers/PointsPath/IPathFormDataManager.js +17 -0
- package/dist/js/context/providers/PointsPath/KPathFormDataManager.d.ts +8 -0
- package/dist/js/context/providers/PointsPath/KPathFormDataManager.js +17 -0
- package/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.d.ts +40 -0
- package/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.js +125 -0
- package/dist/js/context/providers/PointsPath/QPathFormDataManager.d.ts +8 -0
- package/dist/js/context/providers/PointsPath/QPathFormDataManager.js +17 -0
- package/dist/js/context/providers/base/ContextProvider.d.ts +75 -0
- package/dist/js/context/providers/base/ContextProvider.js +87 -0
- package/dist/js/context/providers/base/JSONSchemaDataProvider.d.ts +16 -0
- package/dist/js/context/providers/base/JSONSchemaDataProvider.js +17 -0
- package/dist/js/context/providers/base/JSONSchemaFormDataProvider.d.ts +19 -0
- package/dist/js/context/providers/base/JSONSchemaFormDataProvider.js +32 -0
- package/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.d.ts +26 -0
- package/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.js +54 -0
- package/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.d.ts +78 -0
- package/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.js +104 -0
- package/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.d.ts +36 -0
- package/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.js +58 -0
- package/dist/js/context/providers/by_application/vasp/VASPInputDataManager.d.ts +36 -0
- package/dist/js/context/providers/by_application/vasp/VASPInputDataManager.js +56 -0
- package/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.d.ts +30 -0
- package/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.js +50 -0
- package/dist/js/context/providers/index.d.ts +92 -0
- package/dist/js/context/providers/index.js +107 -0
- package/dist/js/context/providers/settings.d.ts +7 -0
- package/dist/js/context/providers/settings.js +11 -33
- package/dist/js/convergence/ConvergenceParameter.d.ts +26 -0
- package/dist/js/convergence/ConvergenceParameter.js +13 -0
- package/dist/js/convergence/NonUniformKGridConvergence.d.ts +12 -0
- package/dist/js/convergence/NonUniformKGridConvergence.js +31 -0
- package/dist/js/convergence/UniformKGridConvergence.d.ts +8 -0
- package/dist/js/convergence/UniformKGridConvergence.js +22 -0
- package/dist/js/convergence/factory.d.ts +8 -0
- package/dist/js/convergence/factory.js +18 -0
- package/dist/js/enums.d.ts +62 -0
- package/dist/js/enums.js +66 -61
- package/dist/js/generated/AssertionUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/AssertionUnitSchemaMixin.js +27 -0
- package/dist/js/generated/AssignmentUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/AssignmentUnitSchemaMixin.js +33 -0
- package/dist/js/generated/BaseUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/BaseUnitSchemaMixin.js +57 -0
- package/dist/js/generated/ConditionUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ConditionUnitSchemaMixin.js +51 -0
- package/dist/js/generated/ExecutionUnitInputSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ExecutionUnitInputSchemaMixin.js +27 -0
- package/dist/js/generated/ExecutionUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ExecutionUnitSchemaMixin.js +45 -0
- package/dist/js/generated/IOUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/IOUnitSchemaMixin.js +33 -0
- package/dist/js/generated/MapUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/MapUnitSchemaMixin.js +27 -0
- package/dist/js/generated/ReduceUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/ReduceUnitSchemaMixin.js +27 -0
- package/dist/js/generated/StatusSchemaMixin.d.ts +5 -0
- package/dist/js/generated/StatusSchemaMixin.js +21 -0
- package/dist/js/generated/SubworkflowSchemaMixin.d.ts +5 -0
- package/dist/js/generated/SubworkflowSchemaMixin.js +51 -0
- package/dist/js/generated/SubworkflowUnitSchemaMixin.d.ts +5 -0
- package/dist/js/generated/SubworkflowUnitSchemaMixin.js +15 -0
- package/dist/js/generated/WorkflowSchemaMixin.d.ts +5 -0
- package/dist/js/generated/WorkflowSchemaMixin.js +51 -0
- package/dist/js/index.d.ts +13 -0
- package/dist/js/index.js +66 -176
- package/dist/js/units/AssertionUnit.d.ts +20 -0
- package/dist/js/units/AssertionUnit.js +33 -0
- package/dist/js/units/AssignmentUnit.d.ts +17 -0
- package/dist/js/units/AssignmentUnit.js +35 -0
- package/dist/js/units/BaseUnit.d.ts +39 -0
- package/dist/js/units/BaseUnit.js +70 -0
- package/dist/js/units/ConditionUnit.d.ts +17 -0
- package/dist/js/units/ConditionUnit.js +37 -0
- package/dist/js/units/ExecutionUnit.d.ts +115 -0
- package/dist/js/units/ExecutionUnit.js +181 -0
- package/dist/js/units/ExecutionUnitInput.d.ts +22 -0
- package/dist/js/units/ExecutionUnitInput.js +47 -0
- package/dist/js/units/IOUnit.d.ts +16 -0
- package/dist/js/units/IOUnit.js +31 -0
- package/dist/js/units/MapUnit.d.ts +34 -0
- package/dist/js/units/MapUnit.js +46 -0
- package/dist/js/units/ReduceUnit.d.ts +16 -0
- package/dist/js/units/ReduceUnit.js +30 -0
- package/dist/js/units/SubworkflowUnit.d.ts +16 -0
- package/dist/js/units/SubworkflowUnit.js +28 -0
- package/dist/js/units/factory.d.ts +31 -0
- package/dist/js/units/factory.js +65 -47
- package/dist/js/units/index.d.ts +14 -0
- package/dist/js/units/index.js +25 -81
- package/dist/js/units/mixins/RuntimeItemsUILogicMixin.d.ts +26 -0
- package/dist/js/units/mixins/RuntimeItemsUILogicMixin.js +50 -0
- package/dist/js/utils/baseUnits.d.ts +2 -0
- package/dist/js/utils/baseUnits.js +11 -0
- package/dist/js/utils/index.d.ts +3 -0
- package/dist/js/utils/index.js +39 -0
- package/dist/js/utils/subworkflow.d.ts +2 -0
- package/dist/js/utils/subworkflow.js +29 -0
- package/dist/js/utils/underscoreStringSlugify.d.ts +6 -0
- package/dist/js/utils/underscoreStringSlugify.js +32 -0
- package/dist/js/utils/units.d.ts +4 -0
- package/dist/js/utils/units.js +16 -0
- package/dist/js/utils/workflow.d.ts +9 -0
- package/dist/js/utils/workflow.js +67 -0
- package/dist/js/utils.js +2 -7
- package/dist/js/workflows/default.d.ts +3 -0
- package/dist/js/workflows/default.js +43 -39
- package/dist/js/workflows/workflow.d.ts +4404 -0
- package/dist/js/workflows/workflow.js +310 -306
- package/package.json +56 -44
- package/src/js/Subworkflow.ts +532 -0
- package/src/js/Workflow.ts +390 -0
- package/src/js/context/mixins/ApplicationContextMixin.ts +21 -0
- package/src/js/context/mixins/MaterialContextMixin.ts +35 -0
- package/src/js/context/mixins/MaterialsContextMixin.ts +24 -0
- package/src/js/context/mixins/MaterialsSetContextMixin.ts +42 -0
- package/src/js/context/providers/BoundaryConditionsFormDataManager.ts +88 -0
- package/src/js/context/providers/CollinearMagnetizationDataManager.ts +140 -0
- package/src/js/context/providers/Hubbard/HubbardContextManagerLegacy.ts +93 -0
- package/src/js/context/providers/Hubbard/HubbardContextProvider.ts +85 -0
- package/src/js/context/providers/Hubbard/HubbardJContextManager.ts +82 -0
- package/src/js/context/providers/Hubbard/HubbardUContextManager.ts +78 -0
- package/src/js/context/providers/Hubbard/HubbardVContextManager.ts +100 -0
- package/src/js/context/providers/IonDynamicsDataManager.ts +64 -0
- package/src/js/context/providers/MLSettingsDataManager.ts +61 -0
- package/src/js/context/providers/MLTrainTestSplitDataManager.ts +59 -0
- package/src/js/context/providers/NEBFormDataManager.ts +57 -0
- package/src/js/context/providers/NonCollinearMagnetizationDataManager.ts +229 -0
- package/src/js/context/providers/PlanewaveCutoffDataManager.ts +110 -0
- package/src/js/context/providers/PointsGrid/IGridFormDataManager.ts +36 -0
- package/src/js/context/providers/PointsGrid/KGridFormDataManager.ts +46 -0
- package/src/js/context/providers/PointsGrid/PointsGridFormDataProvider.ts +371 -0
- package/src/js/context/providers/PointsGrid/QGridFormDataManager.ts +36 -0
- package/src/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.ts +26 -0
- package/src/js/context/providers/PointsPath/ExplicitKPathFormDataManager.ts +24 -0
- package/src/js/context/providers/PointsPath/IPathFormDataManager.ts +22 -0
- package/src/js/context/providers/PointsPath/KPathFormDataManager.ts +22 -0
- package/src/js/context/providers/PointsPath/PointsPathFormDataProvider.ts +192 -0
- package/src/js/context/providers/PointsPath/QPathFormDataManager.ts +22 -0
- package/src/js/context/providers/base/ContextProvider.ts +150 -0
- package/src/js/context/providers/base/JSONSchemaDataProvider.ts +31 -0
- package/src/js/context/providers/base/JSONSchemaFormDataProvider.ts +38 -0
- package/src/js/context/providers/by_application/espresso/QENEBInputDataManager.ts +107 -0
- package/src/js/context/providers/by_application/espresso/QEPWXInputDataManager.ts +178 -0
- package/src/js/context/providers/by_application/nwchem/NWChemInputDataManager.ts +93 -0
- package/src/js/context/providers/by_application/vasp/VASPInputDataManager.ts +89 -0
- package/src/js/context/providers/by_application/vasp/VASPNEBInputDataManager.ts +92 -0
- package/src/js/context/providers/index.ts +155 -0
- package/src/js/context/providers/settings.ts +13 -0
- package/src/js/convergence/ConvergenceParameter.ts +37 -0
- package/src/js/convergence/NonUniformKGridConvergence.ts +38 -0
- package/src/js/convergence/UniformKGridConvergence.ts +26 -0
- package/src/js/convergence/factory.ts +18 -0
- package/src/js/{enums.js → enums.ts} +27 -22
- package/src/js/generated/AssertionUnitSchemaMixin.ts +34 -0
- package/src/js/generated/AssignmentUnitSchemaMixin.ts +40 -0
- package/src/js/generated/BaseUnitSchemaMixin.ts +64 -0
- package/src/js/generated/ConditionUnitSchemaMixin.ts +58 -0
- package/src/js/generated/ExecutionUnitInputSchemaMixin.ts +36 -0
- package/src/js/generated/ExecutionUnitSchemaMixin.ts +52 -0
- package/src/js/generated/IOUnitSchemaMixin.ts +40 -0
- package/src/js/generated/MapUnitSchemaMixin.ts +34 -0
- package/src/js/generated/ReduceUnitSchemaMixin.ts +34 -0
- package/src/js/generated/StatusSchemaMixin.ts +28 -0
- package/src/js/generated/SubworkflowSchemaMixin.ts +58 -0
- package/src/js/generated/SubworkflowUnitSchemaMixin.ts +22 -0
- package/src/js/generated/WorkflowSchemaMixin.ts +58 -0
- package/src/js/index.ts +44 -0
- package/src/js/units/AssertionUnit.ts +49 -0
- package/src/js/units/AssignmentUnit.ts +49 -0
- package/src/js/units/BaseUnit.ts +117 -0
- package/src/js/units/ConditionUnit.ts +52 -0
- package/src/js/units/ExecutionUnit.ts +274 -0
- package/src/js/units/ExecutionUnitInput.ts +71 -0
- package/src/js/units/IOUnit.ts +43 -0
- package/src/js/units/MapUnit.ts +59 -0
- package/src/js/units/ReduceUnit.ts +46 -0
- package/src/js/units/SubworkflowUnit.ts +44 -0
- package/src/js/units/factory.ts +131 -0
- package/src/js/units/index.ts +27 -0
- package/src/js/units/mixins/RuntimeItemsUILogicMixin.ts +81 -0
- package/src/js/utils/baseUnits.ts +11 -0
- package/src/js/utils/index.ts +3 -0
- package/src/js/utils/units.ts +23 -0
- package/src/js/utils/workflow.ts +69 -0
- package/src/js/workflows/{default.js → default.ts} +8 -1
- package/build_workflows.js +0 -65
- package/dist/js/context/context.js +0 -49
- package/dist/js/context/mixins/JobContextMixin.js +0 -39
- package/dist/js/context/mixins/MethodDataContextMixin.js +0 -48
- package/dist/js/context/mixins/WorkflowContextMixin.js +0 -28
- package/dist/js/context/providers/BoundaryConditionsFormDataProvider.js +0 -84
- package/dist/js/context/providers/CollinearMagnetizationContextProvider.js +0 -96
- package/dist/js/context/providers/HubbardContextProviderLegacy.js +0 -68
- package/dist/js/context/providers/HubbardJContextProvider.js +0 -67
- package/dist/js/context/providers/HubbardUContextProvider.js +0 -70
- package/dist/js/context/providers/HubbardVContextProvider.js +0 -92
- package/dist/js/context/providers/IonDynamicsContextProvider.js +0 -58
- package/dist/js/context/providers/MLSettingsContextProvider.js +0 -51
- package/dist/js/context/providers/MLTrainTestSplitContextProvider.js +0 -47
- package/dist/js/context/providers/NEBFormDataProvider.js +0 -42
- package/dist/js/context/providers/NonCollinearMagnetizationContextProvider.js +0 -187
- package/dist/js/context/providers/PlanewaveCutoffsContextProvider.js +0 -67
- package/dist/js/context/providers/PointsGridFormDataProvider.js +0 -263
- package/dist/js/context/providers/PointsPathFormDataProvider.js +0 -147
- package/dist/js/context/providers/by_application/ExecutableContextProvider.js +0 -25
- package/dist/js/context/providers/by_application/espresso/QENEBContextProvider.js +0 -61
- package/dist/js/context/providers/by_application/espresso/QEPWXContextProvider.js +0 -150
- package/dist/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.js +0 -85
- package/dist/js/context/providers/by_application/vasp/VASPContextProvider.js +0 -65
- package/dist/js/context/providers/by_application/vasp/VASPNEBContextProvider.js +0 -57
- package/dist/js/context/providers.js +0 -199
- package/dist/js/patch.js +0 -19
- package/dist/js/subworkflows/convergence/non_uniform_kgrid.js +0 -31
- package/dist/js/subworkflows/convergence/parameter.js +0 -70
- package/dist/js/subworkflows/convergence/uniform_kgrid.js +0 -26
- package/dist/js/subworkflows/convergence.js +0 -189
- package/dist/js/subworkflows/create.js +0 -293
- package/dist/js/subworkflows/dynamic/espresso/getQpointIrrep.js +0 -34
- package/dist/js/subworkflows/dynamic/index.js +0 -19
- package/dist/js/subworkflows/dynamic/surfaceEnergy.js +0 -67
- package/dist/js/subworkflows/index.js +0 -19
- package/dist/js/units/assertion.js +0 -37
- package/dist/js/units/assignment.js +0 -42
- package/dist/js/units/base.js +0 -91
- package/dist/js/units/builders/AssertionUnitConfigBuilder.js +0 -34
- package/dist/js/units/builders/AssignmentUnitConfigBuilder.js +0 -41
- package/dist/js/units/builders/ExecutionUnitConfigBuilder.js +0 -67
- package/dist/js/units/builders/IOUnitConfigBuilder.js +0 -54
- package/dist/js/units/builders/UnitConfigBuilder.js +0 -85
- package/dist/js/units/builders/index.js +0 -18
- package/dist/js/units/condition.js +0 -52
- package/dist/js/units/execution.js +0 -225
- package/dist/js/units/io.js +0 -148
- package/dist/js/units/map.js +0 -38
- package/dist/js/units/processing.js +0 -41
- package/dist/js/units/reduce.js +0 -24
- package/dist/js/units/subworkflow.js +0 -23
- package/dist/js/workflows/create.js +0 -318
- package/dist/js/workflows/index.js +0 -113
- package/dist/js/workflows/relaxation.js +0 -38
- package/src/js/context/context.js +0 -47
- package/src/js/context/mixins/ApplicationContextMixin.js +0 -19
- package/src/js/context/mixins/JobContextMixin.js +0 -36
- package/src/js/context/mixins/MaterialContextMixin.js +0 -41
- package/src/js/context/mixins/MaterialsContextMixin.js +0 -18
- package/src/js/context/mixins/MaterialsSetContextMixin.js +0 -24
- package/src/js/context/mixins/MethodDataContextMixin.js +0 -48
- package/src/js/context/mixins/WorkflowContextMixin.js +0 -25
- package/src/js/context/providers/BoundaryConditionsFormDataProvider.js +0 -72
- package/src/js/context/providers/CollinearMagnetizationContextProvider.js +0 -105
- package/src/js/context/providers/HubbardContextProviderLegacy.js +0 -67
- package/src/js/context/providers/HubbardJContextProvider.js +0 -65
- package/src/js/context/providers/HubbardUContextProvider.js +0 -95
- package/src/js/context/providers/HubbardVContextProvider.js +0 -96
- package/src/js/context/providers/IonDynamicsContextProvider.js +0 -44
- package/src/js/context/providers/MLSettingsContextProvider.js +0 -45
- package/src/js/context/providers/MLTrainTestSplitContextProvider.js +0 -43
- package/src/js/context/providers/NEBFormDataProvider.js +0 -33
- package/src/js/context/providers/NonCollinearMagnetizationContextProvider.js +0 -179
- package/src/js/context/providers/PlanewaveCutoffsContextProvider.js +0 -65
- package/src/js/context/providers/PointsGridFormDataProvider.js +0 -271
- package/src/js/context/providers/PointsPathFormDataProvider.js +0 -163
- package/src/js/context/providers/by_application/ExecutableContextProvider.js +0 -17
- package/src/js/context/providers/by_application/espresso/QENEBContextProvider.js +0 -58
- package/src/js/context/providers/by_application/espresso/QEPWXContextProvider.js +0 -168
- package/src/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.js +0 -89
- package/src/js/context/providers/by_application/vasp/VASPContextProvider.js +0 -58
- package/src/js/context/providers/by_application/vasp/VASPNEBContextProvider.js +0 -48
- package/src/js/context/providers/settings.js +0 -38
- package/src/js/context/providers.js +0 -140
- package/src/js/index.js +0 -57
- package/src/js/patch.js +0 -12
- package/src/js/subworkflows/convergence/enums.js +0 -12
- package/src/js/subworkflows/convergence/factory.js +0 -15
- package/src/js/subworkflows/convergence/non_uniform_kgrid.js +0 -28
- package/src/js/subworkflows/convergence/parameter.js +0 -58
- package/src/js/subworkflows/convergence/uniform_kgrid.js +0 -22
- package/src/js/subworkflows/convergence.js +0 -196
- package/src/js/subworkflows/create.js +0 -220
- package/src/js/subworkflows/dynamic/espresso/getQpointIrrep.js +0 -35
- package/src/js/subworkflows/dynamic/index.js +0 -8
- package/src/js/subworkflows/dynamic/surfaceEnergy.js +0 -124
- package/src/js/subworkflows/index.js +0 -2
- package/src/js/subworkflows/subworkflow.js +0 -345
- package/src/js/units/assertion.js +0 -29
- package/src/js/units/assignment.js +0 -34
- package/src/js/units/base.js +0 -97
- package/src/js/units/builders/AssertionUnitConfigBuilder.js +0 -28
- package/src/js/units/builders/AssignmentUnitConfigBuilder.js +0 -36
- package/src/js/units/builders/ExecutionUnitConfigBuilder.js +0 -59
- package/src/js/units/builders/IOUnitConfigBuilder.js +0 -53
- package/src/js/units/builders/UnitConfigBuilder.js +0 -92
- package/src/js/units/builders/index.js +0 -15
- package/src/js/units/condition.js +0 -47
- package/src/js/units/execution.js +0 -267
- package/src/js/units/factory.js +0 -53
- package/src/js/units/index.js +0 -25
- package/src/js/units/io.js +0 -163
- package/src/js/units/map.js +0 -33
- package/src/js/units/processing.js +0 -39
- package/src/js/units/reduce.js +0 -17
- package/src/js/units/subworkflow.js +0 -15
- package/src/js/utils.js +0 -73
- package/src/js/workflows/create.js +0 -227
- package/src/js/workflows/index.js +0 -98
- package/src/js/workflows/relaxation.js +0 -42
- package/src/js/workflows/workflow.js +0 -388
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { WorkflowBaseUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type BaseUnitSchemaMixin = WorkflowBaseUnitMixinSchema;
|
|
5
|
+
|
|
6
|
+
export type BaseUnitInMemoryEntity = InMemoryEntity & BaseUnitSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function baseUnitSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & BaseUnitSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & BaseUnitSchemaMixin = {
|
|
13
|
+
get isDraft() {
|
|
14
|
+
return this.prop<WorkflowBaseUnitMixinSchema["isDraft"]>("isDraft");
|
|
15
|
+
},
|
|
16
|
+
set isDraft(value: WorkflowBaseUnitMixinSchema["isDraft"]) {
|
|
17
|
+
this.setProp("isDraft", value);
|
|
18
|
+
},
|
|
19
|
+
get type() {
|
|
20
|
+
return this.requiredProp<WorkflowBaseUnitMixinSchema["type"]>("type");
|
|
21
|
+
},
|
|
22
|
+
set type(value: WorkflowBaseUnitMixinSchema["type"]) {
|
|
23
|
+
this.setProp("type", value);
|
|
24
|
+
},
|
|
25
|
+
get name() {
|
|
26
|
+
return this.prop<WorkflowBaseUnitMixinSchema["name"]>("name");
|
|
27
|
+
},
|
|
28
|
+
set name(value: WorkflowBaseUnitMixinSchema["name"]) {
|
|
29
|
+
this.setProp("name", value);
|
|
30
|
+
},
|
|
31
|
+
get status() {
|
|
32
|
+
return this.prop<WorkflowBaseUnitMixinSchema["status"]>("status");
|
|
33
|
+
},
|
|
34
|
+
set status(value: WorkflowBaseUnitMixinSchema["status"]) {
|
|
35
|
+
this.setProp("status", value);
|
|
36
|
+
},
|
|
37
|
+
get head() {
|
|
38
|
+
return this.prop<WorkflowBaseUnitMixinSchema["head"]>("head");
|
|
39
|
+
},
|
|
40
|
+
set head(value: WorkflowBaseUnitMixinSchema["head"]) {
|
|
41
|
+
this.setProp("head", value);
|
|
42
|
+
},
|
|
43
|
+
get flowchartId() {
|
|
44
|
+
return this.requiredProp<WorkflowBaseUnitMixinSchema["flowchartId"]>("flowchartId");
|
|
45
|
+
},
|
|
46
|
+
set flowchartId(value: WorkflowBaseUnitMixinSchema["flowchartId"]) {
|
|
47
|
+
this.setProp("flowchartId", value);
|
|
48
|
+
},
|
|
49
|
+
get next() {
|
|
50
|
+
return this.prop<WorkflowBaseUnitMixinSchema["next"]>("next");
|
|
51
|
+
},
|
|
52
|
+
set next(value: WorkflowBaseUnitMixinSchema["next"]) {
|
|
53
|
+
this.setProp("next", value);
|
|
54
|
+
},
|
|
55
|
+
get enableRender() {
|
|
56
|
+
return this.prop<WorkflowBaseUnitMixinSchema["enableRender"]>("enableRender");
|
|
57
|
+
},
|
|
58
|
+
set enableRender(value: WorkflowBaseUnitMixinSchema["enableRender"]) {
|
|
59
|
+
this.setProp("enableRender", value);
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
64
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { ConditionUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type ConditionUnitSchemaMixin = ConditionUnitMixinSchema;
|
|
5
|
+
|
|
6
|
+
export type ConditionUnitInMemoryEntity = InMemoryEntity & ConditionUnitSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function conditionUnitSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & ConditionUnitSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & ConditionUnitSchemaMixin = {
|
|
13
|
+
get type() {
|
|
14
|
+
return this.prop<ConditionUnitMixinSchema["type"]>("type");
|
|
15
|
+
},
|
|
16
|
+
set type(value: ConditionUnitMixinSchema["type"]) {
|
|
17
|
+
this.setProp("type", value);
|
|
18
|
+
},
|
|
19
|
+
get input() {
|
|
20
|
+
return this.requiredProp<ConditionUnitMixinSchema["input"]>("input");
|
|
21
|
+
},
|
|
22
|
+
set input(value: ConditionUnitMixinSchema["input"]) {
|
|
23
|
+
this.setProp("input", value);
|
|
24
|
+
},
|
|
25
|
+
get statement() {
|
|
26
|
+
return this.requiredProp<ConditionUnitMixinSchema["statement"]>("statement");
|
|
27
|
+
},
|
|
28
|
+
set statement(value: ConditionUnitMixinSchema["statement"]) {
|
|
29
|
+
this.setProp("statement", value);
|
|
30
|
+
},
|
|
31
|
+
get then() {
|
|
32
|
+
return this.requiredProp<ConditionUnitMixinSchema["then"]>("then");
|
|
33
|
+
},
|
|
34
|
+
set then(value: ConditionUnitMixinSchema["then"]) {
|
|
35
|
+
this.setProp("then", value);
|
|
36
|
+
},
|
|
37
|
+
get else() {
|
|
38
|
+
return this.requiredProp<ConditionUnitMixinSchema["else"]>("else");
|
|
39
|
+
},
|
|
40
|
+
set else(value: ConditionUnitMixinSchema["else"]) {
|
|
41
|
+
this.setProp("else", value);
|
|
42
|
+
},
|
|
43
|
+
get maxOccurrences() {
|
|
44
|
+
return this.requiredProp<ConditionUnitMixinSchema["maxOccurrences"]>("maxOccurrences");
|
|
45
|
+
},
|
|
46
|
+
set maxOccurrences(value: ConditionUnitMixinSchema["maxOccurrences"]) {
|
|
47
|
+
this.setProp("maxOccurrences", value);
|
|
48
|
+
},
|
|
49
|
+
get throwException() {
|
|
50
|
+
return this.prop<ConditionUnitMixinSchema["throwException"]>("throwException");
|
|
51
|
+
},
|
|
52
|
+
set throwException(value: ConditionUnitMixinSchema["throwException"]) {
|
|
53
|
+
this.setProp("throwException", value);
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
58
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { ExecutionUnitInputItemSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type ExecutionUnitInputSchemaMixin = ExecutionUnitInputItemSchema;
|
|
5
|
+
|
|
6
|
+
export type ExecutionUnitInputInMemoryEntity = InMemoryEntity & ExecutionUnitInputSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function executionUnitInputSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & ExecutionUnitInputSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & ExecutionUnitInputSchemaMixin = {
|
|
13
|
+
get template() {
|
|
14
|
+
return this.requiredProp<ExecutionUnitInputItemSchema["template"]>("template");
|
|
15
|
+
},
|
|
16
|
+
set template(value: ExecutionUnitInputItemSchema["template"]) {
|
|
17
|
+
this.setProp("template", value);
|
|
18
|
+
},
|
|
19
|
+
get rendered() {
|
|
20
|
+
return this.prop<ExecutionUnitInputItemSchema["rendered"]>("rendered");
|
|
21
|
+
},
|
|
22
|
+
set rendered(value: ExecutionUnitInputItemSchema["rendered"]) {
|
|
23
|
+
this.setProp("rendered", value);
|
|
24
|
+
},
|
|
25
|
+
get isManuallyChanged() {
|
|
26
|
+
return this.requiredProp<ExecutionUnitInputItemSchema["isManuallyChanged"]>(
|
|
27
|
+
"isManuallyChanged",
|
|
28
|
+
);
|
|
29
|
+
},
|
|
30
|
+
set isManuallyChanged(value: ExecutionUnitInputItemSchema["isManuallyChanged"]) {
|
|
31
|
+
this.setProp("isManuallyChanged", value);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
36
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { ExecutionUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type ExecutionUnitSchemaMixin = ExecutionUnitMixinSchema;
|
|
5
|
+
|
|
6
|
+
export type ExecutionUnitInMemoryEntity = InMemoryEntity & ExecutionUnitSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function executionUnitSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & ExecutionUnitSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & ExecutionUnitSchemaMixin = {
|
|
13
|
+
get type() {
|
|
14
|
+
return this.requiredProp<ExecutionUnitMixinSchema["type"]>("type");
|
|
15
|
+
},
|
|
16
|
+
set type(value: ExecutionUnitMixinSchema["type"]) {
|
|
17
|
+
this.setProp("type", value);
|
|
18
|
+
},
|
|
19
|
+
get application() {
|
|
20
|
+
return this.requiredProp<ExecutionUnitMixinSchema["application"]>("application");
|
|
21
|
+
},
|
|
22
|
+
set application(value: ExecutionUnitMixinSchema["application"]) {
|
|
23
|
+
this.setProp("application", value);
|
|
24
|
+
},
|
|
25
|
+
get executable() {
|
|
26
|
+
return this.requiredProp<ExecutionUnitMixinSchema["executable"]>("executable");
|
|
27
|
+
},
|
|
28
|
+
set executable(value: ExecutionUnitMixinSchema["executable"]) {
|
|
29
|
+
this.setProp("executable", value);
|
|
30
|
+
},
|
|
31
|
+
get flavor() {
|
|
32
|
+
return this.requiredProp<ExecutionUnitMixinSchema["flavor"]>("flavor");
|
|
33
|
+
},
|
|
34
|
+
set flavor(value: ExecutionUnitMixinSchema["flavor"]) {
|
|
35
|
+
this.setProp("flavor", value);
|
|
36
|
+
},
|
|
37
|
+
get input() {
|
|
38
|
+
return this.requiredProp<ExecutionUnitMixinSchema["input"]>("input");
|
|
39
|
+
},
|
|
40
|
+
set input(value: ExecutionUnitMixinSchema["input"]) {
|
|
41
|
+
this.setProp("input", value);
|
|
42
|
+
},
|
|
43
|
+
get context() {
|
|
44
|
+
return this.requiredProp<ExecutionUnitMixinSchema["context"]>("context");
|
|
45
|
+
},
|
|
46
|
+
set context(value: ExecutionUnitMixinSchema["context"]) {
|
|
47
|
+
this.setProp("context", value);
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
52
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { DataIOUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type IOUnitSchemaMixin = DataIOUnitMixinSchema;
|
|
5
|
+
|
|
6
|
+
export type IOUnitInMemoryEntity = InMemoryEntity & IOUnitSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function iOUnitSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & IOUnitSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & IOUnitSchemaMixin = {
|
|
13
|
+
get type() {
|
|
14
|
+
return this.prop<DataIOUnitMixinSchema["type"]>("type");
|
|
15
|
+
},
|
|
16
|
+
set type(value: DataIOUnitMixinSchema["type"]) {
|
|
17
|
+
this.setProp("type", value);
|
|
18
|
+
},
|
|
19
|
+
get subtype() {
|
|
20
|
+
return this.requiredProp<DataIOUnitMixinSchema["subtype"]>("subtype");
|
|
21
|
+
},
|
|
22
|
+
set subtype(value: DataIOUnitMixinSchema["subtype"]) {
|
|
23
|
+
this.setProp("subtype", value);
|
|
24
|
+
},
|
|
25
|
+
get source() {
|
|
26
|
+
return this.requiredProp<DataIOUnitMixinSchema["source"]>("source");
|
|
27
|
+
},
|
|
28
|
+
set source(value: DataIOUnitMixinSchema["source"]) {
|
|
29
|
+
this.setProp("source", value);
|
|
30
|
+
},
|
|
31
|
+
get input() {
|
|
32
|
+
return this.requiredProp<DataIOUnitMixinSchema["input"]>("input");
|
|
33
|
+
},
|
|
34
|
+
set input(value: DataIOUnitMixinSchema["input"]) {
|
|
35
|
+
this.setProp("input", value);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
40
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { MapUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type MapUnitSchemaMixin = MapUnitMixinSchema;
|
|
5
|
+
|
|
6
|
+
export type MapUnitInMemoryEntity = InMemoryEntity & MapUnitSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function mapUnitSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & MapUnitSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & MapUnitSchemaMixin = {
|
|
13
|
+
get type() {
|
|
14
|
+
return this.prop<MapUnitMixinSchema["type"]>("type");
|
|
15
|
+
},
|
|
16
|
+
set type(value: MapUnitMixinSchema["type"]) {
|
|
17
|
+
this.setProp("type", value);
|
|
18
|
+
},
|
|
19
|
+
get workflowId() {
|
|
20
|
+
return this.requiredProp<MapUnitMixinSchema["workflowId"]>("workflowId");
|
|
21
|
+
},
|
|
22
|
+
set workflowId(value: MapUnitMixinSchema["workflowId"]) {
|
|
23
|
+
this.setProp("workflowId", value);
|
|
24
|
+
},
|
|
25
|
+
get input() {
|
|
26
|
+
return this.requiredProp<MapUnitMixinSchema["input"]>("input");
|
|
27
|
+
},
|
|
28
|
+
set input(value: MapUnitMixinSchema["input"]) {
|
|
29
|
+
this.setProp("input", value);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { ReduceUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type ReduceUnitSchemaMixin = ReduceUnitMixinSchema;
|
|
5
|
+
|
|
6
|
+
export type ReduceUnitInMemoryEntity = InMemoryEntity & ReduceUnitSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function reduceUnitSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & ReduceUnitSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & ReduceUnitSchemaMixin = {
|
|
13
|
+
get type() {
|
|
14
|
+
return this.prop<ReduceUnitMixinSchema["type"]>("type");
|
|
15
|
+
},
|
|
16
|
+
set type(value: ReduceUnitMixinSchema["type"]) {
|
|
17
|
+
this.setProp("type", value);
|
|
18
|
+
},
|
|
19
|
+
get mapFlowchartId() {
|
|
20
|
+
return this.requiredProp<ReduceUnitMixinSchema["mapFlowchartId"]>("mapFlowchartId");
|
|
21
|
+
},
|
|
22
|
+
set mapFlowchartId(value: ReduceUnitMixinSchema["mapFlowchartId"]) {
|
|
23
|
+
this.setProp("mapFlowchartId", value);
|
|
24
|
+
},
|
|
25
|
+
get input() {
|
|
26
|
+
return this.requiredProp<ReduceUnitMixinSchema["input"]>("input");
|
|
27
|
+
},
|
|
28
|
+
set input(value: ReduceUnitMixinSchema["input"]) {
|
|
29
|
+
this.setProp("input", value);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
34
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { StatusSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type StatusSchemaMixin = StatusSchema;
|
|
5
|
+
|
|
6
|
+
export type StatusInMemoryEntity = InMemoryEntity & StatusSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function statusSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & StatusSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & StatusSchemaMixin = {
|
|
13
|
+
get status() {
|
|
14
|
+
return this.prop<StatusSchema["status"]>("status");
|
|
15
|
+
},
|
|
16
|
+
set status(value: StatusSchema["status"]) {
|
|
17
|
+
this.setProp("status", value);
|
|
18
|
+
},
|
|
19
|
+
get statusTrack() {
|
|
20
|
+
return this.prop<StatusSchema["statusTrack"]>("statusTrack");
|
|
21
|
+
},
|
|
22
|
+
set statusTrack(value: StatusSchema["statusTrack"]) {
|
|
23
|
+
this.setProp("statusTrack", value);
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
28
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { SubworkflowMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type SubworkflowSchemaMixin = SubworkflowMixinSchema;
|
|
5
|
+
|
|
6
|
+
export type SubworkflowInMemoryEntity = InMemoryEntity & SubworkflowSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function subworkflowSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & SubworkflowSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & SubworkflowSchemaMixin = {
|
|
13
|
+
get properties() {
|
|
14
|
+
return this.requiredProp<SubworkflowMixinSchema["properties"]>("properties");
|
|
15
|
+
},
|
|
16
|
+
set properties(value: SubworkflowMixinSchema["properties"]) {
|
|
17
|
+
this.setProp("properties", value);
|
|
18
|
+
},
|
|
19
|
+
get compute() {
|
|
20
|
+
return this.prop<SubworkflowMixinSchema["compute"]>("compute");
|
|
21
|
+
},
|
|
22
|
+
set compute(value: SubworkflowMixinSchema["compute"]) {
|
|
23
|
+
this.setProp("compute", value);
|
|
24
|
+
},
|
|
25
|
+
get units() {
|
|
26
|
+
return this.requiredProp<SubworkflowMixinSchema["units"]>("units");
|
|
27
|
+
},
|
|
28
|
+
set units(value: SubworkflowMixinSchema["units"]) {
|
|
29
|
+
this.setProp("units", value);
|
|
30
|
+
},
|
|
31
|
+
get model() {
|
|
32
|
+
return this.requiredProp<SubworkflowMixinSchema["model"]>("model");
|
|
33
|
+
},
|
|
34
|
+
set model(value: SubworkflowMixinSchema["model"]) {
|
|
35
|
+
this.setProp("model", value);
|
|
36
|
+
},
|
|
37
|
+
get application() {
|
|
38
|
+
return this.requiredProp<SubworkflowMixinSchema["application"]>("application");
|
|
39
|
+
},
|
|
40
|
+
set application(value: SubworkflowMixinSchema["application"]) {
|
|
41
|
+
this.setProp("application", value);
|
|
42
|
+
},
|
|
43
|
+
get isMultiMaterial() {
|
|
44
|
+
return this.prop<SubworkflowMixinSchema["isMultiMaterial"]>("isMultiMaterial");
|
|
45
|
+
},
|
|
46
|
+
set isMultiMaterial(value: SubworkflowMixinSchema["isMultiMaterial"]) {
|
|
47
|
+
this.setProp("isMultiMaterial", value);
|
|
48
|
+
},
|
|
49
|
+
get isDraft() {
|
|
50
|
+
return this.prop<SubworkflowMixinSchema["isDraft"]>("isDraft");
|
|
51
|
+
},
|
|
52
|
+
set isDraft(value: SubworkflowMixinSchema["isDraft"]) {
|
|
53
|
+
this.setProp("isDraft", value);
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
58
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { SubworkflowUnitMixinSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type SubworkflowUnitSchemaMixin = SubworkflowUnitMixinSchema;
|
|
5
|
+
|
|
6
|
+
export type SubworkflowUnitInMemoryEntity = InMemoryEntity & SubworkflowUnitSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function subworkflowUnitSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & SubworkflowUnitSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & SubworkflowUnitSchemaMixin = {
|
|
13
|
+
get type() {
|
|
14
|
+
return this.prop<SubworkflowUnitMixinSchema["type"]>("type");
|
|
15
|
+
},
|
|
16
|
+
set type(value: SubworkflowUnitMixinSchema["type"]) {
|
|
17
|
+
this.setProp("type", value);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
22
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { BaseWorkflowSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
|
|
4
|
+
export type WorkflowSchemaMixin = BaseWorkflowSchema;
|
|
5
|
+
|
|
6
|
+
export type WorkflowInMemoryEntity = InMemoryEntity & WorkflowSchemaMixin;
|
|
7
|
+
|
|
8
|
+
export function workflowSchemaMixin<T extends InMemoryEntity>(
|
|
9
|
+
item: InMemoryEntity,
|
|
10
|
+
): asserts item is T & WorkflowSchemaMixin {
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
const properties: InMemoryEntity & WorkflowSchemaMixin = {
|
|
13
|
+
get properties() {
|
|
14
|
+
return this.requiredProp<BaseWorkflowSchema["properties"]>("properties");
|
|
15
|
+
},
|
|
16
|
+
set properties(value: BaseWorkflowSchema["properties"]) {
|
|
17
|
+
this.setProp("properties", value);
|
|
18
|
+
},
|
|
19
|
+
get isUsingDataset() {
|
|
20
|
+
return this.prop<BaseWorkflowSchema["isUsingDataset"]>("isUsingDataset");
|
|
21
|
+
},
|
|
22
|
+
set isUsingDataset(value: BaseWorkflowSchema["isUsingDataset"]) {
|
|
23
|
+
this.setProp("isUsingDataset", value);
|
|
24
|
+
},
|
|
25
|
+
get isMultiMaterial() {
|
|
26
|
+
return this.prop<BaseWorkflowSchema["isMultiMaterial"]>("isMultiMaterial");
|
|
27
|
+
},
|
|
28
|
+
set isMultiMaterial(value: BaseWorkflowSchema["isMultiMaterial"]) {
|
|
29
|
+
this.setProp("isMultiMaterial", value);
|
|
30
|
+
},
|
|
31
|
+
get subworkflows() {
|
|
32
|
+
return this.requiredProp<BaseWorkflowSchema["subworkflows"]>("subworkflows");
|
|
33
|
+
},
|
|
34
|
+
set subworkflows(value: BaseWorkflowSchema["subworkflows"]) {
|
|
35
|
+
this.setProp("subworkflows", value);
|
|
36
|
+
},
|
|
37
|
+
get units() {
|
|
38
|
+
return this.requiredProp<BaseWorkflowSchema["units"]>("units");
|
|
39
|
+
},
|
|
40
|
+
set units(value: BaseWorkflowSchema["units"]) {
|
|
41
|
+
this.setProp("units", value);
|
|
42
|
+
},
|
|
43
|
+
get application() {
|
|
44
|
+
return this.prop<BaseWorkflowSchema["application"]>("application");
|
|
45
|
+
},
|
|
46
|
+
set application(value: BaseWorkflowSchema["application"]) {
|
|
47
|
+
this.setProp("application", value);
|
|
48
|
+
},
|
|
49
|
+
get tags() {
|
|
50
|
+
return this.prop<BaseWorkflowSchema["tags"]>("tags");
|
|
51
|
+
},
|
|
52
|
+
set tags(value: BaseWorkflowSchema["tags"]) {
|
|
53
|
+
this.setProp("tags", value);
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
58
|
+
}
|
package/src/js/index.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import PointsPathFormDataProvider from "./context/providers/PointsPath/PointsPathFormDataProvider";
|
|
2
|
+
import { globalSettings } from "./context/providers/settings";
|
|
3
|
+
import { TAB_NAVIGATION_CONFIG, UNIT_NAME_INVALID_CHARS, WORKFLOW_STATUSES } from "./enums";
|
|
4
|
+
import Subworkflow from "./Subworkflow";
|
|
5
|
+
import {
|
|
6
|
+
AssertionUnit,
|
|
7
|
+
AssignmentUnit,
|
|
8
|
+
BaseUnit,
|
|
9
|
+
ConditionUnit,
|
|
10
|
+
ExecutionUnit,
|
|
11
|
+
IOUnit,
|
|
12
|
+
MapUnit,
|
|
13
|
+
ReduceUnit,
|
|
14
|
+
SubworkflowUnit,
|
|
15
|
+
} from "./units";
|
|
16
|
+
import { UnitFactory } from "./units/factory";
|
|
17
|
+
import { defaultMapConfig } from "./units/MapUnit";
|
|
18
|
+
import * as utils from "./utils";
|
|
19
|
+
import Workflow from "./Workflow";
|
|
20
|
+
|
|
21
|
+
export type { OrderedMaterial } from "./context/mixins/MaterialContextMixin";
|
|
22
|
+
export type { MaterialsSet } from "./context/mixins/MaterialsSetContextMixin";
|
|
23
|
+
export type { AnySubworkflowUnit, DefaultSubworkflowUnitType } from "./units/factory";
|
|
24
|
+
export {
|
|
25
|
+
Subworkflow,
|
|
26
|
+
Workflow,
|
|
27
|
+
UnitFactory,
|
|
28
|
+
TAB_NAVIGATION_CONFIG,
|
|
29
|
+
UNIT_NAME_INVALID_CHARS,
|
|
30
|
+
WORKFLOW_STATUSES,
|
|
31
|
+
BaseUnit,
|
|
32
|
+
ExecutionUnit,
|
|
33
|
+
AssertionUnit,
|
|
34
|
+
AssignmentUnit,
|
|
35
|
+
ConditionUnit,
|
|
36
|
+
IOUnit,
|
|
37
|
+
MapUnit,
|
|
38
|
+
ReduceUnit,
|
|
39
|
+
SubworkflowUnit,
|
|
40
|
+
defaultMapConfig,
|
|
41
|
+
PointsPathFormDataProvider,
|
|
42
|
+
globalSettings,
|
|
43
|
+
utils,
|
|
44
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
3
|
+
import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
|
|
4
|
+
import type { AssertionUnitSchema } from "@mat3ra/esse/dist/js/types";
|
|
5
|
+
|
|
6
|
+
import { UnitType } from "../enums";
|
|
7
|
+
import {
|
|
8
|
+
type AssertionUnitSchemaMixin,
|
|
9
|
+
assertionUnitSchemaMixin,
|
|
10
|
+
} from "../generated/AssertionUnitSchemaMixin";
|
|
11
|
+
import BaseUnit from "./BaseUnit";
|
|
12
|
+
|
|
13
|
+
type Schema = AssertionUnitSchema;
|
|
14
|
+
type Base = typeof BaseUnit<Schema> & Constructor<AssertionUnitSchemaMixin>;
|
|
15
|
+
|
|
16
|
+
export type AssertionUnitConfig = Partial<Schema>;
|
|
17
|
+
|
|
18
|
+
class AssertionUnit extends (BaseUnit as Base) implements Schema {
|
|
19
|
+
declare toJSON: () => Schema & AnyObject;
|
|
20
|
+
|
|
21
|
+
declare _json: Schema & AnyObject;
|
|
22
|
+
|
|
23
|
+
static get jsonSchema() {
|
|
24
|
+
return JSONSchemasInterface.getSchemaById("workflow/unit/assertion");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
constructor(config: AssertionUnitConfig) {
|
|
28
|
+
const schema = {
|
|
29
|
+
name: UnitType.assertion,
|
|
30
|
+
results: [],
|
|
31
|
+
preProcessors: [],
|
|
32
|
+
postProcessors: [],
|
|
33
|
+
monitors: [],
|
|
34
|
+
statement: "true",
|
|
35
|
+
errorMessage: "assertion failed",
|
|
36
|
+
...config,
|
|
37
|
+
type: UnitType.assertion as Schema["type"],
|
|
38
|
+
};
|
|
39
|
+
super(schema);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
getHashObject() {
|
|
43
|
+
return { statement: this.statement, errorMessage: this.errorMessage };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
assertionUnitSchemaMixin(AssertionUnit.prototype);
|
|
48
|
+
|
|
49
|
+
export default AssertionUnit;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
2
|
+
import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface";
|
|
3
|
+
import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
|
|
4
|
+
import type { AssignmentUnitSchema } from "@mat3ra/esse/dist/js/types";
|
|
5
|
+
|
|
6
|
+
import { UnitType } from "../enums";
|
|
7
|
+
import {
|
|
8
|
+
type AssignmentUnitSchemaMixin,
|
|
9
|
+
assignmentUnitSchemaMixin,
|
|
10
|
+
} from "../generated/AssignmentUnitSchemaMixin";
|
|
11
|
+
import BaseUnit from "./BaseUnit";
|
|
12
|
+
|
|
13
|
+
type Schema = AssignmentUnitSchema;
|
|
14
|
+
type Base = typeof BaseUnit<Schema> & Constructor<AssignmentUnitSchemaMixin>;
|
|
15
|
+
export type AssignmentUnitConfig = Partial<Schema>;
|
|
16
|
+
|
|
17
|
+
class AssignmentUnit extends (BaseUnit as Base) implements Schema {
|
|
18
|
+
declare toJSON: () => Schema & AnyObject;
|
|
19
|
+
|
|
20
|
+
declare _json: Schema & AnyObject;
|
|
21
|
+
|
|
22
|
+
static get jsonSchema() {
|
|
23
|
+
return JSONSchemasInterface.getSchemaById("workflow/unit/assignment");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
constructor(config: AssignmentUnitConfig) {
|
|
27
|
+
const schema = {
|
|
28
|
+
input: [],
|
|
29
|
+
results: [],
|
|
30
|
+
preProcessors: [],
|
|
31
|
+
postProcessors: [],
|
|
32
|
+
monitors: [],
|
|
33
|
+
operand: "X",
|
|
34
|
+
value: "1",
|
|
35
|
+
...config,
|
|
36
|
+
name: config.name ?? UnitType.assignment,
|
|
37
|
+
type: UnitType.assignment as Schema["type"],
|
|
38
|
+
};
|
|
39
|
+
super(schema);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
getHashObject(): object {
|
|
43
|
+
return { input: this.input, operand: this.operand, value: this.value };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
assignmentUnitSchemaMixin(AssignmentUnit.prototype);
|
|
48
|
+
|
|
49
|
+
export default AssignmentUnit;
|