Socket
Book a DemoInstallSign in
Socket

@opuscapita/fsm-workflow-editor

Package Overview
Dependencies
Maintainers
29
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opuscapita/fsm-workflow-editor

Fsm workflow crud editor

latest
npmnpm
Version
3.0.1
Version published
Weekly downloads
0
-100%
Maintainers
29
Weekly downloads
 
Created
Source

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',
  ...
}

Keywords

editor

FAQs

Package last updated on 28 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts