@opuscapita/fsm-workflow-editor

Fsm workflow crud editor

Stats

StarsIssuesVersionUpdatedCreatedSize
@opuscapita/fsm-workflow-editor
2.2.10a year ago4 years agoMinified + gzip package size for @opuscapita/fsm-workflow-editor in KB

Readme

Usage

Editor demo (showroom) - see example schema in props

Actions & conditions paramsSchema definition and usage

i18n

UI labels for states, conditions, actions and params can be translated.

To add translations register an object of the following structure within i18nManager in context of your app:

de: { // locale
    fsmWorkflowEditor: {
      actions: { // here you define translations for actions
        testAction: { // action name like in workflow.actions
          label: 'Test Action', // this text is a UI label for this action
          params: {
            nickname: { // param name in this action's schema
              label: 'Nickname' // UI label for this param
            },
            fullName: {
              label: 'Full Name'
            }
          }
        },
        sendMail: {
          label: 'Send Email',
          params: {
            fromAddress: {
              label: "Sender' address"
            }
          }
        },
        ...
      },
      conditions: { // like in workflow.conditions
        userHasRoles: {
          label: 'User Has Roles',
          params: {
            restrictedRoles: {
              label: 'Only these roles are allowed'
            }
          }
        },
        ...
      },
      states: {
        approved: {
          label: 'Approved'
        },
        inspectionRequired: {
          label: "Inspection Required"
        },
        ...
      }
    }
  },
fi: {
  ...same structure
}

Plain objects are also ok:

de: {
  'fsmWorkflowEditor.states.approved.label': 'Approved',
  'fsmWorkflowEditor.actions.testAction.label': 'Test action',
  'fsmWorkflowEditor.actions.testAction.params.nickname.label': 'Nickname',
  ...
}

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.