@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,16 @@
|
|
|
1
|
+
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
2
|
+
import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
|
|
3
|
+
import type { ReduceUnitSchema } from "@mat3ra/esse/dist/js/types";
|
|
4
|
+
import { type ReduceUnitSchemaMixin } from "../generated/ReduceUnitSchemaMixin";
|
|
5
|
+
import BaseUnit from "./BaseUnit";
|
|
6
|
+
type Schema = ReduceUnitSchema;
|
|
7
|
+
type Base = typeof BaseUnit<Schema> & Constructor<ReduceUnitSchemaMixin>;
|
|
8
|
+
export type ReduceUnitConfig = Partial<Omit<Schema, "type" | "flowchartId">> & Pick<Schema, "flowchartId">;
|
|
9
|
+
declare const ReduceUnit_base: Base;
|
|
10
|
+
declare class ReduceUnit extends ReduceUnit_base implements Schema {
|
|
11
|
+
toJSON: () => Schema & AnyObject;
|
|
12
|
+
_json: Schema & AnyObject;
|
|
13
|
+
static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
|
|
14
|
+
constructor(config: ReduceUnitConfig);
|
|
15
|
+
}
|
|
16
|
+
export default ReduceUnit;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
7
|
+
const enums_1 = require("../enums");
|
|
8
|
+
const ReduceUnitSchemaMixin_1 = require("../generated/ReduceUnitSchemaMixin");
|
|
9
|
+
const BaseUnit_1 = __importDefault(require("./BaseUnit"));
|
|
10
|
+
class ReduceUnit extends BaseUnit_1.default {
|
|
11
|
+
static get jsonSchema() {
|
|
12
|
+
return JSONSchemasInterface_1.default.getSchemaById("workflow/unit/flowchart");
|
|
13
|
+
}
|
|
14
|
+
constructor(config) {
|
|
15
|
+
const schema = {
|
|
16
|
+
name: enums_1.UnitType.reduce,
|
|
17
|
+
mapFlowchartId: "",
|
|
18
|
+
input: [],
|
|
19
|
+
results: [],
|
|
20
|
+
preProcessors: [],
|
|
21
|
+
postProcessors: [],
|
|
22
|
+
monitors: [],
|
|
23
|
+
...config,
|
|
24
|
+
type: enums_1.UnitType.reduce,
|
|
25
|
+
};
|
|
26
|
+
super(schema);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
(0, ReduceUnitSchemaMixin_1.reduceUnitSchemaMixin)(ReduceUnit.prototype);
|
|
30
|
+
exports.default = ReduceUnit;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Constructor } from "@mat3ra/code/dist/js/utils/types";
|
|
2
|
+
import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
|
|
3
|
+
import type { SubworkflowUnitSchema } from "@mat3ra/esse/dist/js/types";
|
|
4
|
+
import { type SubworkflowUnitSchemaMixin } from "../generated/SubworkflowUnitSchemaMixin";
|
|
5
|
+
import BaseUnit from "./BaseUnit";
|
|
6
|
+
type Schema = SubworkflowUnitSchema;
|
|
7
|
+
type Base = typeof BaseUnit<Schema> & Constructor<SubworkflowUnitSchemaMixin>;
|
|
8
|
+
export type SubworkflowUnitConfig = Partial<Omit<Schema, "flowchartId">> & Pick<Schema, "flowchartId">;
|
|
9
|
+
declare const SubworkflowUnit_base: Base;
|
|
10
|
+
declare class SubworkflowUnit extends SubworkflowUnit_base implements Schema {
|
|
11
|
+
toJSON: () => Schema & AnyObject;
|
|
12
|
+
_json: Schema & AnyObject;
|
|
13
|
+
static get jsonSchema(): import("json-schema").JSONSchema7 | undefined;
|
|
14
|
+
constructor(config: SubworkflowUnitConfig);
|
|
15
|
+
}
|
|
16
|
+
export default SubworkflowUnit;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface"));
|
|
7
|
+
const enums_1 = require("../enums");
|
|
8
|
+
const SubworkflowUnitSchemaMixin_1 = require("../generated/SubworkflowUnitSchemaMixin");
|
|
9
|
+
const BaseUnit_1 = __importDefault(require("./BaseUnit"));
|
|
10
|
+
class SubworkflowUnit extends BaseUnit_1.default {
|
|
11
|
+
static get jsonSchema() {
|
|
12
|
+
return JSONSchemasInterface_1.default.getSchemaById("workflow/unit/subworkflow");
|
|
13
|
+
}
|
|
14
|
+
constructor(config) {
|
|
15
|
+
const schema = {
|
|
16
|
+
name: "New Subworkflow",
|
|
17
|
+
results: [],
|
|
18
|
+
preProcessors: [],
|
|
19
|
+
postProcessors: [],
|
|
20
|
+
monitors: [],
|
|
21
|
+
...config,
|
|
22
|
+
type: enums_1.UnitType.subworkflow,
|
|
23
|
+
};
|
|
24
|
+
super(schema);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
(0, SubworkflowUnitSchemaMixin_1.subworkflowUnitSchemaMixin)(SubworkflowUnit.prototype);
|
|
28
|
+
exports.default = SubworkflowUnit;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AssertionUnitSchema, AssignmentUnitSchema, ConditionUnitSchema, DataIOUnitSchema, ExecutionUnitSchema, MapUnitSchema, ReduceUnitSchema, SubworkflowUnitSchema, WorkflowUnitSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import AssertionUnit, { type AssertionUnitConfig } from "./AssertionUnit";
|
|
3
|
+
import AssignmentUnit, { type AssignmentUnitConfig } from "./AssignmentUnit";
|
|
4
|
+
import ConditionUnit, { type ConditionUnitConfig } from "./ConditionUnit";
|
|
5
|
+
import ExecutionUnit, { type ExecutionUnitConfig } from "./ExecutionUnit";
|
|
6
|
+
import IOUnit, { type IOUnitConfig } from "./IOUnit";
|
|
7
|
+
import MapUnit from "./MapUnit";
|
|
8
|
+
import ReduceUnit from "./ReduceUnit";
|
|
9
|
+
import SubworkflowUnit from "./SubworkflowUnit";
|
|
10
|
+
export type AnyWorkflowUnit = MapUnit | SubworkflowUnit | ReduceUnit;
|
|
11
|
+
export type AnyWorkflowUnitSchema = MapUnitSchema | SubworkflowUnitSchema | ReduceUnitSchema;
|
|
12
|
+
export type AnySubworkflowUnit = ExecutionUnit | AssignmentUnit | ConditionUnit | IOUnit | AssertionUnit;
|
|
13
|
+
export type AnySubworkflowUnitSchema = ExecutionUnitSchema | AssertionUnitSchema | AssignmentUnitSchema | ConditionUnitSchema | DataIOUnitSchema;
|
|
14
|
+
type ExcutionConfig = ExecutionUnitConfig & Pick<ExecutionUnitSchema, "type">;
|
|
15
|
+
type AssignmentConfig = AssignmentUnitConfig & Pick<AssignmentUnitSchema, "type">;
|
|
16
|
+
type ConditionConfig = ConditionUnitConfig & Pick<ConditionUnitSchema, "type">;
|
|
17
|
+
type IOConfig = IOUnitConfig & Pick<DataIOUnitSchema, "type">;
|
|
18
|
+
type AssertionConfig = AssertionUnitConfig & Pick<AssertionUnitSchema, "type">;
|
|
19
|
+
/** Subworkflow unit kinds supported by {@link UnitFactory.createDefaultSubworkflowUnit}. */
|
|
20
|
+
export type DefaultSubworkflowUnitType = "execution" | "assignment" | "condition" | "io" | "assertion";
|
|
21
|
+
export declare class UnitFactory {
|
|
22
|
+
/**
|
|
23
|
+
* Create a new subworkflow unit with fresh `flowchartId` and constructor defaults.
|
|
24
|
+
* For execution units, pass the subworkflow (or parent) `application` JSON.
|
|
25
|
+
*/
|
|
26
|
+
static createDefaultSubworkflowUnit(type: "execution", application: ExecutionUnitSchema["application"]): AnySubworkflowUnit;
|
|
27
|
+
static createDefaultSubworkflowUnit(type: "assignment" | "condition" | "io" | "assertion"): AnySubworkflowUnit;
|
|
28
|
+
static createInWorkflow(config: WorkflowUnitSchema): AnyWorkflowUnit;
|
|
29
|
+
static createInSubworkflow(config: ExcutionConfig | AssignmentConfig | ConditionConfig | IOConfig | AssertionConfig): AnySubworkflowUnit;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
package/dist/js/units/factory.js
CHANGED
|
@@ -1,53 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.UnitFactory = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _subworkflow = require("./subworkflow");
|
|
17
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
19
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
const enums_1 = require("../enums");
|
|
8
|
+
const AssertionUnit_1 = __importDefault(require("./AssertionUnit"));
|
|
9
|
+
const AssignmentUnit_1 = __importDefault(require("./AssignmentUnit"));
|
|
10
|
+
const ConditionUnit_1 = __importDefault(require("./ConditionUnit"));
|
|
11
|
+
const ExecutionUnit_1 = __importDefault(require("./ExecutionUnit"));
|
|
12
|
+
const IOUnit_1 = __importDefault(require("./IOUnit"));
|
|
13
|
+
const MapUnit_1 = __importDefault(require("./MapUnit"));
|
|
14
|
+
const ReduceUnit_1 = __importDefault(require("./ReduceUnit"));
|
|
15
|
+
const SubworkflowUnit_1 = __importDefault(require("./SubworkflowUnit"));
|
|
20
16
|
class UnitFactory {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
17
|
+
static createDefaultSubworkflowUnit(type, application) {
|
|
18
|
+
if (type === "execution") {
|
|
19
|
+
if (application === undefined) {
|
|
20
|
+
throw new Error("UnitFactory.createDefaultSubworkflowUnit: application is required when type is execution");
|
|
21
|
+
}
|
|
22
|
+
return new ExecutionUnit_1.default({
|
|
23
|
+
type: enums_1.UnitType.execution,
|
|
24
|
+
application,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
switch (type) {
|
|
28
|
+
case "assignment":
|
|
29
|
+
return new AssignmentUnit_1.default({ type: enums_1.UnitType.assignment });
|
|
30
|
+
case "condition":
|
|
31
|
+
return new ConditionUnit_1.default({ type: enums_1.UnitType.condition });
|
|
32
|
+
case "io":
|
|
33
|
+
return new IOUnit_1.default({ type: enums_1.UnitType.io });
|
|
34
|
+
case "assertion":
|
|
35
|
+
return new AssertionUnit_1.default({ type: enums_1.UnitType.assertion });
|
|
36
|
+
default: {
|
|
37
|
+
const unreachable = type;
|
|
38
|
+
throw new Error(`Unexpected unit type: ${String(unreachable)}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
static createInWorkflow(config) {
|
|
43
|
+
switch (config.type) {
|
|
44
|
+
case enums_1.UnitType.map:
|
|
45
|
+
return new MapUnit_1.default(config);
|
|
46
|
+
case enums_1.UnitType.subworkflow:
|
|
47
|
+
return new SubworkflowUnit_1.default(config);
|
|
48
|
+
case enums_1.UnitType.reduce:
|
|
49
|
+
return new ReduceUnit_1.default(config);
|
|
50
|
+
default:
|
|
51
|
+
throw new Error(`Unknown unit type: ${config.type}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static createInSubworkflow(config) {
|
|
55
|
+
switch (config.type) {
|
|
56
|
+
case enums_1.UnitType.execution:
|
|
57
|
+
return new ExecutionUnit_1.default(config);
|
|
58
|
+
case enums_1.UnitType.assignment:
|
|
59
|
+
return new AssignmentUnit_1.default(config);
|
|
60
|
+
case enums_1.UnitType.condition:
|
|
61
|
+
return new ConditionUnit_1.default(config);
|
|
62
|
+
case enums_1.UnitType.io:
|
|
63
|
+
return new IOUnit_1.default(config);
|
|
64
|
+
case enums_1.UnitType.assertion:
|
|
65
|
+
return new AssertionUnit_1.default(config);
|
|
66
|
+
default:
|
|
67
|
+
throw new Error(`Unknown unit type: ${config.type}`);
|
|
68
|
+
}
|
|
41
69
|
}
|
|
42
|
-
}
|
|
43
70
|
}
|
|
44
71
|
exports.UnitFactory = UnitFactory;
|
|
45
|
-
_defineProperty(UnitFactory, "AssertionUnit", _assertion.AssertionUnit);
|
|
46
|
-
_defineProperty(UnitFactory, "AssignmentUnit", _assignment.AssignmentUnit);
|
|
47
|
-
_defineProperty(UnitFactory, "BaseUnit", _base.BaseUnit);
|
|
48
|
-
_defineProperty(UnitFactory, "ConditionUnit", _condition.ConditionUnit);
|
|
49
|
-
_defineProperty(UnitFactory, "ExecutionUnit", _execution.ExecutionUnit);
|
|
50
|
-
_defineProperty(UnitFactory, "IOUnit", _io.IOUnit);
|
|
51
|
-
_defineProperty(UnitFactory, "MapUnit", _map.MapUnit);
|
|
52
|
-
_defineProperty(UnitFactory, "ProcessingUnit", _processing.ProcessingUnit);
|
|
53
|
-
_defineProperty(UnitFactory, "SubworkflowUnit", _subworkflow.SubworkflowUnit);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import AssertionUnit from "./AssertionUnit";
|
|
2
|
+
import AssignmentUnit from "./AssignmentUnit";
|
|
3
|
+
import BaseUnit from "./BaseUnit";
|
|
4
|
+
import ConditionUnit from "./ConditionUnit";
|
|
5
|
+
import ExecutionUnit from "./ExecutionUnit";
|
|
6
|
+
import { UnitFactory } from "./factory";
|
|
7
|
+
import IOUnit from "./IOUnit";
|
|
8
|
+
import MapUnit from "./MapUnit";
|
|
9
|
+
import ReduceUnit from "./ReduceUnit";
|
|
10
|
+
import SubworkflowUnit from "./SubworkflowUnit";
|
|
11
|
+
export type { ReduceUnitConfig } from "./ReduceUnit";
|
|
12
|
+
export type { SubworkflowUnitConfig } from "./SubworkflowUnit";
|
|
13
|
+
export { BaseUnit, AssertionUnit, AssignmentUnit, ConditionUnit, ExecutionUnit, IOUnit, MapUnit, ReduceUnit, SubworkflowUnit, UnitFactory, };
|
|
14
|
+
export type { DefaultSubworkflowUnitType } from "./factory";
|
package/dist/js/units/index.js
CHANGED
|
@@ -1,82 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Object.defineProperty(exports, "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return _condition.ConditionUnit;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "ExecutionUnit", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _execution.ExecutionUnit;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "IOUnit", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _io.IOUnit;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "MapUnit", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _map.MapUnit;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "ProcessingUnit", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _processing.ProcessingUnit;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "ReduceUnit", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _reduce.ReduceUnit;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "SubworkflowUnit", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _subworkflow.SubworkflowUnit;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "UnitFactory", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _factory.UnitFactory;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
var _assertion = require("./assertion");
|
|
73
|
-
var _assignment = require("./assignment");
|
|
74
|
-
var _base = require("./base");
|
|
75
|
-
var _condition = require("./condition");
|
|
76
|
-
var _execution = require("./execution");
|
|
77
|
-
var _factory = require("./factory");
|
|
78
|
-
var _io = require("./io");
|
|
79
|
-
var _map = require("./map");
|
|
80
|
-
var _processing = require("./processing");
|
|
81
|
-
var _reduce = require("./reduce");
|
|
82
|
-
var _subworkflow = require("./subworkflow");
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UnitFactory = exports.SubworkflowUnit = exports.ReduceUnit = exports.MapUnit = exports.IOUnit = exports.ExecutionUnit = exports.ConditionUnit = exports.AssignmentUnit = exports.AssertionUnit = exports.BaseUnit = void 0;
|
|
7
|
+
const AssertionUnit_1 = __importDefault(require("./AssertionUnit"));
|
|
8
|
+
exports.AssertionUnit = AssertionUnit_1.default;
|
|
9
|
+
const AssignmentUnit_1 = __importDefault(require("./AssignmentUnit"));
|
|
10
|
+
exports.AssignmentUnit = AssignmentUnit_1.default;
|
|
11
|
+
const BaseUnit_1 = __importDefault(require("./BaseUnit"));
|
|
12
|
+
exports.BaseUnit = BaseUnit_1.default;
|
|
13
|
+
const ConditionUnit_1 = __importDefault(require("./ConditionUnit"));
|
|
14
|
+
exports.ConditionUnit = ConditionUnit_1.default;
|
|
15
|
+
const ExecutionUnit_1 = __importDefault(require("./ExecutionUnit"));
|
|
16
|
+
exports.ExecutionUnit = ExecutionUnit_1.default;
|
|
17
|
+
const factory_1 = require("./factory");
|
|
18
|
+
Object.defineProperty(exports, "UnitFactory", { enumerable: true, get: function () { return factory_1.UnitFactory; } });
|
|
19
|
+
const IOUnit_1 = __importDefault(require("./IOUnit"));
|
|
20
|
+
exports.IOUnit = IOUnit_1.default;
|
|
21
|
+
const MapUnit_1 = __importDefault(require("./MapUnit"));
|
|
22
|
+
exports.MapUnit = MapUnit_1.default;
|
|
23
|
+
const ReduceUnit_1 = __importDefault(require("./ReduceUnit"));
|
|
24
|
+
exports.ReduceUnit = ReduceUnit_1.default;
|
|
25
|
+
const SubworkflowUnit_1 = __importDefault(require("./SubworkflowUnit"));
|
|
26
|
+
exports.SubworkflowUnit = SubworkflowUnit_1.default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { RuntimeItems } from "@mat3ra/code/dist/js/entity/mixins/RuntimeItemsMixin";
|
|
3
|
+
import type { NameResultSchema } from "@mat3ra/code/dist/js/utils/object";
|
|
4
|
+
import type { RuntimeItemsSchema } from "@mat3ra/esse/dist/js/types";
|
|
5
|
+
type ItemKey = "results" | "monitors" | "preProcessors" | "postProcessors";
|
|
6
|
+
export type RuntimeItemsUILogic = {
|
|
7
|
+
_initRuntimeItems(config?: Partial<RuntimeItemsSchema>): void;
|
|
8
|
+
toggleRuntimeItem(key: ItemKey, data: NameResultSchema, isAdding: boolean): void;
|
|
9
|
+
toggleResult(data: NameResultSchema, isAdding: boolean): void;
|
|
10
|
+
toggleMonitor(data: NameResultSchema, isAdding: boolean): void;
|
|
11
|
+
togglePreProcessor(data: NameResultSchema, isAdding: boolean): void;
|
|
12
|
+
togglePostProcessor(data: NameResultSchema, isAdding: boolean): void;
|
|
13
|
+
getResultByName(name: string): NameResultSchema | undefined;
|
|
14
|
+
get resultNames(): string[];
|
|
15
|
+
get monitorNames(): string[];
|
|
16
|
+
get postProcessorNames(): string[];
|
|
17
|
+
get preProcessorNames(): string[];
|
|
18
|
+
};
|
|
19
|
+
interface RuntimeItemsUILogicMixinBase extends InMemoryEntity, RuntimeItems {
|
|
20
|
+
defaultResults: NameResultSchema[];
|
|
21
|
+
defaultMonitors: NameResultSchema[];
|
|
22
|
+
defaultPreProcessors: NameResultSchema[];
|
|
23
|
+
defaultPostProcessors: NameResultSchema[];
|
|
24
|
+
}
|
|
25
|
+
export declare function runtimeItemsUILogicMixin<T extends RuntimeItemsUILogicMixinBase>(item: T): void;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runtimeItemsUILogicMixin = runtimeItemsUILogicMixin;
|
|
4
|
+
// @ts-expect-error
|
|
5
|
+
const propertiesMixin = {
|
|
6
|
+
_initRuntimeItems(config) {
|
|
7
|
+
this.results = (config === null || config === void 0 ? void 0 : config.results) || this.defaultResults;
|
|
8
|
+
this.monitors = (config === null || config === void 0 ? void 0 : config.monitors) || this.defaultMonitors;
|
|
9
|
+
this.preProcessors = (config === null || config === void 0 ? void 0 : config.preProcessors) || this.defaultPreProcessors;
|
|
10
|
+
this.postProcessors = (config === null || config === void 0 ? void 0 : config.postProcessors) || this.defaultPostProcessors;
|
|
11
|
+
},
|
|
12
|
+
toggleRuntimeItem(key, data, isAdding) {
|
|
13
|
+
if (isAdding) {
|
|
14
|
+
this[key] = [...this[key], data];
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
this[key] = this[key].filter((x) => x.name !== data.name);
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
toggleResult(data, isAdding) {
|
|
21
|
+
this.toggleRuntimeItem("results", data, isAdding);
|
|
22
|
+
},
|
|
23
|
+
toggleMonitor(data, isAdding) {
|
|
24
|
+
this.toggleRuntimeItem("monitors", data, isAdding);
|
|
25
|
+
},
|
|
26
|
+
togglePreProcessor(data, isAdding) {
|
|
27
|
+
this.toggleRuntimeItem("preProcessors", data, isAdding);
|
|
28
|
+
},
|
|
29
|
+
togglePostProcessor(data, isAdding) {
|
|
30
|
+
this.toggleRuntimeItem("postProcessors", data, isAdding);
|
|
31
|
+
},
|
|
32
|
+
get resultNames() {
|
|
33
|
+
return this.results.map((r) => r.name);
|
|
34
|
+
},
|
|
35
|
+
get monitorNames() {
|
|
36
|
+
return this.monitors.map((r) => r === null || r === void 0 ? void 0 : r.name);
|
|
37
|
+
},
|
|
38
|
+
get postProcessorNames() {
|
|
39
|
+
return this.postProcessors.map((r) => r.name);
|
|
40
|
+
},
|
|
41
|
+
get preProcessorNames() {
|
|
42
|
+
return this.preProcessors.map((r) => r.name);
|
|
43
|
+
},
|
|
44
|
+
getResultByName(name) {
|
|
45
|
+
return this.results.find((r) => r.name === name);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
function runtimeItemsUILogicMixin(item) {
|
|
49
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(propertiesMixin));
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resetStatus = resetStatus;
|
|
4
|
+
const enums_1 = require("../enums");
|
|
5
|
+
function resetStatus(unit) {
|
|
6
|
+
return {
|
|
7
|
+
...unit,
|
|
8
|
+
status: enums_1.UnitStatus.idle,
|
|
9
|
+
statusTrack: [],
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.baseUnits = exports.workflow = exports.units = void 0;
|
|
37
|
+
exports.units = __importStar(require("./units"));
|
|
38
|
+
exports.workflow = __importStar(require("./workflow"));
|
|
39
|
+
exports.baseUnits = __importStar(require("./baseUnits"));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateHash = calculateHash;
|
|
4
|
+
const mode_1 = require("@mat3ra/mode");
|
|
5
|
+
const utils_1 = require("@mat3ra/utils");
|
|
6
|
+
const units_1 = require("./units");
|
|
7
|
+
function calculateModelHash(config) {
|
|
8
|
+
const modelInstance = mode_1.ModelFactory.create({
|
|
9
|
+
...config.model,
|
|
10
|
+
application: config.application,
|
|
11
|
+
});
|
|
12
|
+
const { model } = config;
|
|
13
|
+
if (modelInstance.Method.omitInHashCalculation) {
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
+
const { data: _data, ...method } = model.method;
|
|
16
|
+
return utils_1.Utils.hash.calculateHashFromObject({
|
|
17
|
+
...model,
|
|
18
|
+
method,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return utils_1.Utils.hash.calculateHashFromObject(model);
|
|
22
|
+
}
|
|
23
|
+
function calculateHash(config) {
|
|
24
|
+
return utils_1.Utils.hash.calculateHashFromObject({
|
|
25
|
+
application: config.application,
|
|
26
|
+
model: calculateModelHash(config),
|
|
27
|
+
units: config.units.map(units_1.calculateHash).join(),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Same behavior as `underscore.string` slugify (v3.3.x): cleanDiacritics, replace
|
|
3
|
+
* non-word chars except whitespace and hyphen, lowercase, dasherize, trim hyphens.
|
|
4
|
+
* @see https://github.com/esamattis/underscore.string/blob/master/slugify.js
|
|
5
|
+
*/
|
|
6
|
+
export declare function underscoreStringSlugify(value: unknown): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Same behavior as `underscore.string` slugify (v3.3.x): cleanDiacritics, replace
|
|
4
|
+
* non-word chars except whitespace and hyphen, lowercase, dasherize, trim hyphens.
|
|
5
|
+
* @see https://github.com/esamattis/underscore.string/blob/master/slugify.js
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.underscoreStringSlugify = underscoreStringSlugify;
|
|
9
|
+
function cleanDiacritics(str) {
|
|
10
|
+
let from = "ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșşšŝťțţŭùúüűûñÿýçżźž";
|
|
11
|
+
let to = "aaaaaaaaaccceeeeeghiiiijllnnoooooooossssstttuuuuuunyyczzz";
|
|
12
|
+
from += from.toUpperCase();
|
|
13
|
+
to += to.toUpperCase();
|
|
14
|
+
const toChars = to.split("");
|
|
15
|
+
from += "ß";
|
|
16
|
+
toChars.push("ss");
|
|
17
|
+
return str.replace(/./g, (ch) => {
|
|
18
|
+
const i = from.indexOf(ch);
|
|
19
|
+
return i === -1 ? ch : toChars[i];
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function dasherize(str) {
|
|
23
|
+
return str
|
|
24
|
+
.trim()
|
|
25
|
+
.replace(/([A-Z])/g, "-$1")
|
|
26
|
+
.replace(/[-_\s]+/g, "-")
|
|
27
|
+
.toLowerCase();
|
|
28
|
+
}
|
|
29
|
+
function underscoreStringSlugify(value) {
|
|
30
|
+
const str = value == null ? "" : String(value);
|
|
31
|
+
return dasherize(cleanDiacritics(str).replace(/[^\w\s-]/g, "-").toLowerCase()).replace(/^-+|-+$/g, "");
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateHash = calculateHash;
|
|
4
|
+
const enums_1 = require("../enums");
|
|
5
|
+
const factory_1 = require("../units/factory");
|
|
6
|
+
function isWorkflowLevelUnit(unit) {
|
|
7
|
+
return (unit.type === enums_1.UnitType.map ||
|
|
8
|
+
unit.type === enums_1.UnitType.reduce ||
|
|
9
|
+
unit.type === enums_1.UnitType.subworkflow);
|
|
10
|
+
}
|
|
11
|
+
function calculateHash(unit) {
|
|
12
|
+
if (isWorkflowLevelUnit(unit)) {
|
|
13
|
+
return factory_1.UnitFactory.createInWorkflow(unit).calculateHash();
|
|
14
|
+
}
|
|
15
|
+
return factory_1.UnitFactory.createInSubworkflow(unit).calculateHash();
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ApplicationSchema, WorkflowSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
export declare function getUsedApplications(workflow: WorkflowSchema): ApplicationSchema[];
|
|
3
|
+
export declare function getSystemName(workflow: WorkflowSchema): string;
|
|
4
|
+
export declare function getUsedModels(workflow: WorkflowSchema): ("dft" | "ml" | "unknown")[];
|
|
5
|
+
export declare function getDefaultDescription(workflow: WorkflowSchema): string;
|
|
6
|
+
export declare function getProperties(workflow: WorkflowSchema): string[];
|
|
7
|
+
export declare function getHumanReadableProperties(workflow: WorkflowSchema): string[];
|
|
8
|
+
export declare function getHumanReadableUsedModels(workflow: WorkflowSchema): string[];
|
|
9
|
+
export declare function resetUnitsStatuses(workflow: WorkflowSchema): WorkflowSchema;
|