addAction.js
2 years ago
addComputedField.js
2 years ago
addDetail.js
2 years ago
convertFlow.js
2 years ago
convertListToFieldsMap.js
2 years ago
globalTab.js
2 years ago
withActionLocalizeScript.js
2 years ago
convertFlow.js
25 lines
| 1 | import BaseAction from '../abstract/BaseAction'; |
| 2 | import ActionsFlow from '../abstract/ActionsFlow'; |
| 3 | |
| 4 | /** |
| 5 | * @param flow |
| 6 | * @returns {ActionsFlow} |
| 7 | */ |
| 8 | function convertFlow( flow = [] ) { |
| 9 | const actions = []; |
| 10 | |
| 11 | for ( const flowAction of flow ) { |
| 12 | const current = new BaseAction( flowAction ); |
| 13 | |
| 14 | const settings = current.settings; |
| 15 | current.settings = {}; |
| 16 | |
| 17 | current.selfSettings = settings; |
| 18 | |
| 19 | actions.push( current ); |
| 20 | } |
| 21 | |
| 22 | return new ActionsFlow( actions ); |
| 23 | } |
| 24 | |
| 25 | export default convertFlow; |