@bpmn-nova/studio 0.4.0 → 0.4.1

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.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/dist/flow-tree.d.ts +4 -0
  3. package/dist/flow-tree.js +14 -0
  4. package/dist/modules/flow-tree/controller.js +364 -0
  5. package/dist/modules/flow-tree/index.d.ts +248 -0
  6. package/dist/modules/flow-tree/index.js +5 -0
  7. package/dist/modules/flow-tree/operations.js +484 -0
  8. package/dist/modules/flow-tree/sample.js +445 -0
  9. package/dist/modules/flow-tree/schema.js +588 -0
  10. package/dist/modules/flow-tree/validate.js +125 -0
  11. package/dist/modules/flow-tree-bpmn/compiler.js +547 -0
  12. package/dist/modules/flow-tree-bpmn/decompiler.js +524 -0
  13. package/dist/modules/flow-tree-bpmn/expression.js +135 -0
  14. package/dist/modules/flow-tree-bpmn/index.d.ts +53 -0
  15. package/dist/modules/flow-tree-bpmn/index.js +14 -0
  16. package/dist/modules/flow-tree-renderer/canvas.js +1003 -0
  17. package/dist/modules/flow-tree-renderer/export-svg.js +325 -0
  18. package/dist/modules/flow-tree-renderer/index.d.ts +143 -0
  19. package/dist/modules/flow-tree-renderer/index.js +3 -0
  20. package/dist/modules/flow-tree-renderer/shell.js +970 -0
  21. package/dist/modules/i18n/locales/en-US.js +399 -0
  22. package/dist/modules/i18n/locales/zh-CN.js +399 -0
  23. package/dist/modules/icons/index.js +23 -0
  24. package/dist/modules/properties-flow-tree/index.d.ts +56 -0
  25. package/dist/modules/properties-flow-tree/index.js +2 -0
  26. package/dist/modules/properties-flow-tree/panel.js +1136 -0
  27. package/dist/modules/properties-flow-tree/widgets.js +625 -0
  28. package/dist/modules/viewer/index.js +10 -2
  29. package/dist/styles.css +2368 -0
  30. package/llms-full.txt +353 -9
  31. package/llms.txt +3 -2
  32. package/package.json +6 -1
@@ -820,4 +820,403 @@ export const enUS = {
820
820
  },
821
821
  fileUnavailable: 'Attachment unavailable',
822
822
  },
823
+ flowTree: {
824
+ brandTitle: 'Approval Flow',
825
+ defaultProcessName: 'Approval Process',
826
+ defaultStarterName: 'Initiator',
827
+ defaultEndName: 'End',
828
+ nodeTypes: {
829
+ starter: 'Initiator',
830
+ approver: 'Approver',
831
+ cc: 'CC',
832
+ handler: 'Handler',
833
+ conditionRoute: 'Condition Branch',
834
+ conditionBranch: 'Condition',
835
+ parallelRoute: 'Parallel Branch',
836
+ parallelBranch: 'Parallel Branch',
837
+ inclusiveRoute: 'Inclusive Branch',
838
+ inclusiveBranch: 'Inclusive Branch',
839
+ delay: 'Delay',
840
+ trigger: 'Trigger',
841
+ subFlow: 'Subflow',
842
+ end: 'End',
843
+ },
844
+ nodeDescriptions: {
845
+ approver: 'Assign people, managers, or roles to approve',
846
+ cc: 'Automatically notify recipients of approval progress',
847
+ handler: 'Fill in fields or perform operational handling',
848
+ conditionRoute: 'Take the first matching branch by priority',
849
+ parallelRoute: 'Run branches concurrently and join when all finish',
850
+ inclusiveRoute: 'Run all matching condition branches in parallel',
851
+ delay: 'Wait for a duration or scheduled date before continuing',
852
+ trigger: 'Call a Webhook, Java delegate, or expression',
853
+ subFlow: 'Invoke an external process or run embedded steps',
854
+ },
855
+ addMenu: {
856
+ title: 'Add Node',
857
+ groups: {
858
+ approval: 'Approval & Handling',
859
+ routing: 'Branch Routing',
860
+ automation: 'Automation & Subflow',
861
+ custom: 'Custom Nodes',
862
+ },
863
+ wrapFollowing: 'Move following steps into first branch',
864
+ },
865
+ canvas: {
866
+ addNodeAria: 'Insert node here',
867
+ addConditionBranch: 'Add Condition',
868
+ addParallelBranch: 'Add Parallel Branch',
869
+ addInclusiveBranch: 'Add Inclusive Branch',
870
+ priorityBadge: ({ priority }) => `Priority ${priority}`,
871
+ defaultBranchBadge: 'Default',
872
+ defaultBranchName: 'Default',
873
+ branchName: ({ index }) => `Condition ${index}`,
874
+ parallelBranchName: ({ index }) => `Parallel ${index}`,
875
+ inclusiveBranchName: ({ index }) => `Inclusive ${index}`,
876
+ moveLeft: 'Increase priority (move left)',
877
+ moveRight: 'Decrease priority (move right)',
878
+ collapseBranch: 'Collapse branch',
879
+ expandBranch: 'Expand branch',
880
+ collapsedCount: ({ count }) => `${count} hidden steps`,
881
+ duplicateNode: 'Duplicate node',
882
+ deleteNode: 'Delete node',
883
+ dropHere: 'Drop here',
884
+ dragHint: 'Drag to reorder node',
885
+ emptyBranchHint: 'Flows directly to join when matched',
886
+ unconfigured: 'Click to configure',
887
+ allMembers: 'All members',
888
+ defaultBranchSummary: 'Entered when no other condition matches',
889
+ parallelBranchSummary: 'Runs concurrently with sibling branches',
890
+ endSummary: 'Process terminates here',
891
+ },
892
+ summaries: {
893
+ starterAll: 'All members can submit',
894
+ starterSpecified: ({ count }) => `${count} starter rules configured`,
895
+ assigneeUsers: ({ names }) => `Users: ${names}`,
896
+ assigneeRoles: ({ names }) => `Roles: ${names}`,
897
+ assigneeDepartments: ({ names }) => `Departments: ${names}`,
898
+ assigneeSupervisor: ({ level }) => level === 1 ? 'Direct manager' : `Level ${level} manager`,
899
+ assigneeMultiSupervisor: ({ endLevel }) => `Multi-level managers (up to L${endLevel})`,
900
+ assigneeSelfSelect: 'Selected by initiator',
901
+ assigneeFormUser: ({ field }) => `Form contact: ${field}`,
902
+ assigneeInitiatorSelf: 'Initiator self',
903
+ assigneeExpression: ({ expression }) => `Expr: ${expression}`,
904
+ approvalMode: {
905
+ and: 'All approve',
906
+ or: 'Any approve',
907
+ sequential: 'Sequential',
908
+ percentage: ({ percent }) => `${percent}% approval`,
909
+ },
910
+ ccUnconfigured: 'No CC recipients set',
911
+ ccSelfSelectSuffix: ' (self-select allowed)',
912
+ delayDuration: ({ value, unit }) => `Wait ${value} ${unit}`,
913
+ delayFixedDate: ({ value }) => `Wait until ${value}`,
914
+ delayCron: ({ value }) => `Schedule: ${value}`,
915
+ delayUnconfigured: 'Delay not configured',
916
+ triggerWebhook: ({ method, url }) => `${method} ${url}`,
917
+ triggerService: ({ type, value }) => `${type}: ${value}`,
918
+ triggerUnconfigured: 'Trigger not configured',
919
+ subFlowCall: ({ target }) => `Call: ${target}`,
920
+ subFlowEmbedded: ({ count }) => `Embedded (${count} steps)`,
921
+ subFlowUnconfigured: 'Subflow not configured',
922
+ conditionRulesCount: ({ count }) => `${count} condition rules`,
923
+ conditionExpression: ({ expression }) => expression,
924
+ conditionUnconfigured: 'Configure branch condition',
925
+ },
926
+ shell: {
927
+ modes: {
928
+ design: 'Design',
929
+ viewer: 'Preview',
930
+ instance: 'Trace',
931
+ },
932
+ views: {
933
+ tree: 'Flow Tree',
934
+ bpmn: 'BPMN Diagram',
935
+ timeline: 'Timeline',
936
+ },
937
+ tools: {
938
+ undo: 'Undo',
939
+ redo: 'Redo',
940
+ validate: 'Validate',
941
+ previewXml: 'BPMN XML',
942
+ importLabel: 'Import',
943
+ importBpmn: 'Import BPMN XML',
944
+ importBpmnHint: 'Parse Flowable / Activiti XML into FlowTree',
945
+ importJson: 'Import JSON',
946
+ importJsonHint: 'Load FlowTree JSON definition',
947
+ exportLabel: 'Export',
948
+ exportBpmn: 'Export BPMN 2.0 XML',
949
+ exportBpmnHint: 'Compile executable XML for Flowable / Activiti',
950
+ exportJson: 'Export JSON',
951
+ exportJsonHint: 'Save structured FlowTree document',
952
+ exportSvg: 'Export SVG',
953
+ exportSvgHint: 'Preview and download crisp vector SVG',
954
+ zoomOut: 'Zoom out',
955
+ zoomIn: 'Zoom in',
956
+ actualSize: '1:1',
957
+ fitView: 'Fit View',
958
+ engineLabel: 'Engine',
959
+ },
960
+ status: {
961
+ nodeCount: ({ count }) => `${count} nodes`,
962
+ validPassed: 'Validation passed; ready to compile BPMN 2.0 XML',
963
+ validationIssues: ({ errors, warnings }) => `${errors} errors, ${warnings} warnings`,
964
+ importedSuccess: 'Flow imported successfully',
965
+ exportedXml: 'Exported BPMN 2.0 XML',
966
+ exportedJson: 'Exported FlowTree JSON',
967
+ importIncompatible: 'This BPMN graph uses non-tree topology and cannot be losslessly restored to FlowTree',
968
+ xmlPreviewTitle: 'Compiled BPMN 2.0 XML',
969
+ copyXml: 'Copy XML',
970
+ copiedXml: 'Copied',
971
+ downloadXml: 'Download XML',
972
+ close: 'Close',
973
+ },
974
+ validationPanel: {
975
+ title: 'Validation Issues',
976
+ empty: 'All nodes are properly configured with no issues.',
977
+ locate: 'Locate',
978
+ },
979
+ },
980
+ properties: {
981
+ tabs: {
982
+ basic: 'Basic',
983
+ rules: 'Rules',
984
+ buttons: 'Actions',
985
+ form: 'Form',
986
+ },
987
+ sections: {
988
+ processInfo: 'Process Details',
989
+ compileOptions: 'BPMN 2.0 Compilation & Global Rules',
990
+ starterScope: 'Initiator Scope',
991
+ assignee: 'Approver Assignment',
992
+ handlerAssignee: 'Handler Assignment',
993
+ ccTargets: 'CC Recipients',
994
+ approvalMode: 'Multi-Approver Mode',
995
+ handlerMode: 'Multi-Handler Mode',
996
+ emptyStrategy: 'When Assignee Is Empty',
997
+ sameAsInitiator: 'When Approver Is Initiator',
998
+ dedupStrategy: 'Approver Deduplication',
999
+ timeout: 'Timeout & Reminder',
1000
+ buttons: 'Action Button Permissions',
1001
+ formPermissions: 'Form Field Permission Matrix',
1002
+ conditionMode: 'Condition Mode',
1003
+ conditionBuilder: 'Visual Rule Groups',
1004
+ conditionExpression: 'Advanced Expression (JUEL)',
1005
+ conditionPreview: 'Compiled BPMN Expression',
1006
+ delayConfig: 'Delay Configuration',
1007
+ triggerConfig: 'Trigger Configuration',
1008
+ subFlowConfig: 'Subflow Configuration',
1009
+ endConfig: 'Process End',
1010
+ },
1011
+ fields: {
1012
+ processId: 'Process ID',
1013
+ processName: 'Process Name',
1014
+ engine: 'Target Engine',
1015
+ documentation: 'Documentation',
1016
+ starterCompileMode: 'Starter BPMN Compilation',
1017
+ ccCompileMode: 'CC BPMN Compilation',
1018
+ globalDedup: 'Global Deduplication',
1019
+ allowWithdraw: 'Allow Initiator Withdraw',
1020
+ nodeId: 'Node ID',
1021
+ nodeName: 'Node Name',
1022
+ starterScopeType: 'Who can submit',
1023
+ allowResubmit: 'Allow resubmit after rejection',
1024
+ assigneeType: 'Assignment Type',
1025
+ selectedUsers: 'Users',
1026
+ selectedRoles: 'Roles',
1027
+ selectedDepartments: 'Departments',
1028
+ supervisorLevel: 'Manager Level',
1029
+ supervisorEndLevel: 'Stop At Level',
1030
+ formUserField: 'Form Contact Field',
1031
+ assigneeExpression: 'Assignee Expression (JUEL)',
1032
+ selfSelectMultiple: 'Allow multiple self-selected approvers',
1033
+ approvalMode: 'Approval Mode',
1034
+ passPercentage: 'Pass Percentage (%)',
1035
+ emptyStrategy: 'Empty Assignee Strategy',
1036
+ fallbackUsers: 'Fallback Approvers',
1037
+ sameAsInitiator: 'Same-As-Initiator Strategy',
1038
+ dedupStrategy: 'Deduplication Strategy',
1039
+ timeoutEnabled: 'Enable Timeout Handling',
1040
+ timeoutDuration: 'Duration',
1041
+ timeoutUnit: 'Unit',
1042
+ timeoutAction: 'On Timeout',
1043
+ allowStarterSelfSelectCc: 'Allow initiator to add CC recipients',
1044
+ ccTiming: 'CC Timing',
1045
+ ccDelegateExpression: 'BPMN Delegate Expression',
1046
+ priority: 'Branch Priority',
1047
+ branchConditionMode: 'Mode',
1048
+ delayType: 'Delay Type',
1049
+ delayValue: 'Duration',
1050
+ delayUnit: 'Unit',
1051
+ delayDate: 'Target Date or Expression',
1052
+ delayCron: 'Cron / ISO Cycle',
1053
+ triggerType: 'Execution Type',
1054
+ webhookMethod: 'HTTP Method',
1055
+ webhookUrl: 'Endpoint URL',
1056
+ webhookHeaders: 'HTTP Headers',
1057
+ webhookBody: 'Request Body Template (JSON)',
1058
+ implementation: 'Class / Expression',
1059
+ resultVariable: 'Result Variable',
1060
+ asyncExecution: 'Asynchronous (async)',
1061
+ retryCycle: 'Retry Time Cycle',
1062
+ fieldsInjection: 'Field Injection',
1063
+ subFlowMode: 'Subflow Mode',
1064
+ calledElement: 'Called Process Key',
1065
+ inheritBusinessKey: 'Inherit Business Key',
1066
+ inheritVariables: 'Inherit Process Variables',
1067
+ inParameters: 'Input Variable Mapping',
1068
+ outParameters: 'Output Variable Mapping',
1069
+ embeddedStepsHint: 'Embedded subflows compile to standard bpmn:SubProcess elements. Manage internal steps below.',
1070
+ commentRequiredOnReject: 'Require comment when rejecting',
1071
+ returnMode: 'Return Target Scope',
1072
+ },
1073
+ options: {
1074
+ starterScopeAll: 'All members',
1075
+ starterScopeSpecified: 'Specified users / departments / roles',
1076
+ starterCompileStartAndTask: 'StartEvent + Initiator Task (Recommended, supports return-to-starter)',
1077
+ starterCompileStartEvent: 'StartEvent only (Minimal BPMN)',
1078
+ ccCompileServiceTask: 'ServiceTask (Recommended, traceable in runtime)',
1079
+ ccCompileListener: 'ExecutionListener',
1080
+ dedupNone: 'No deduplication',
1081
+ dedupConsecutive: 'Skip consecutive duplicate approver',
1082
+ dedupAll: 'Approve once across the entire process',
1083
+ dedupInherit: 'Inherit process global setting',
1084
+ assigneeUsers: 'Specified users',
1085
+ assigneeRoles: 'Specified roles',
1086
+ assigneeDepartments: 'Specified departments',
1087
+ assigneeSupervisor: 'Reporting manager',
1088
+ assigneeMultiSupervisor: 'Multi-level managers',
1089
+ assigneeSelfSelect: 'Initiator self-select',
1090
+ assigneeFormUser: 'Form contact field',
1091
+ assigneeInitiatorSelf: 'Initiator self',
1092
+ assigneeExpression: 'Custom expression',
1093
+ modeAnd: 'All approve (Countersign)',
1094
+ modeOr: 'Any approve (Or-sign)',
1095
+ modeSequential: 'Sequential approval',
1096
+ modePercentage: 'Percentage threshold',
1097
+ emptyAutoPass: 'Auto-approve',
1098
+ emptyToAdmin: 'Route to process admin',
1099
+ emptyToSpecified: 'Route to fallback approvers',
1100
+ emptyReject: 'Auto-reject',
1101
+ sameDefault: 'Approve normally',
1102
+ sameAutoPass: 'Auto-skip',
1103
+ sameToSupervisor: 'Route to direct manager',
1104
+ sameToAdmin: 'Route to process admin',
1105
+ unitMinute: 'Minutes',
1106
+ unitHour: 'Hours',
1107
+ unitDay: 'Days',
1108
+ timeoutRemind: 'Send reminder only',
1109
+ timeoutAutoPass: 'Auto-approve',
1110
+ timeoutAutoReject: 'Auto-reject',
1111
+ timeoutTransfer: 'Transfer to admin',
1112
+ ccOnArrive: 'Notify upon arriving at node',
1113
+ ccOnProcessEnd: 'Notify after process completes',
1114
+ returnPrevious: 'Previous approval node',
1115
+ returnStarter: 'Initiator for resubmission',
1116
+ returnAnyPrevious: 'Any previously visited node',
1117
+ returnSpecified: 'Specified nodes',
1118
+ conditionVisual: 'Visual rule builder',
1119
+ conditionExpression: 'Advanced JUEL expression',
1120
+ delayDuration: 'Relative duration',
1121
+ delayFixedDate: 'Fixed date / expression',
1122
+ delayCron: 'Recurring cycle / Cron',
1123
+ triggerWebhook: 'HTTP Webhook',
1124
+ triggerClass: 'Java Delegate Class',
1125
+ triggerDelegateExpression: 'Delegate Expression',
1126
+ triggerExpression: 'JUEL Expression',
1127
+ subFlowCallActivity: 'External Process (CallActivity)',
1128
+ subFlowEmbedded: 'Embedded Subflow (SubProcess)',
1129
+ permEditable: 'Editable',
1130
+ permReadonly: 'Read-only',
1131
+ permHidden: 'Hidden',
1132
+ },
1133
+ buttons: {
1134
+ approve: 'Approve',
1135
+ reject: 'Reject',
1136
+ returnEnabled: 'Return',
1137
+ transfer: 'Transfer',
1138
+ addSign: 'Add-Sign',
1139
+ delegate: 'Delegate',
1140
+ complete: 'Submit',
1141
+ },
1142
+ condition: {
1143
+ groupLogicAnd: 'AND (all rules in group match)',
1144
+ groupLogicOr: 'OR (any rule in group matches)',
1145
+ outerOrHint: 'Groups combine with OR: matching any group enters this branch',
1146
+ addRule: 'Add Rule',
1147
+ addGroup: 'Add OR Group',
1148
+ removeGroup: 'Remove Group',
1149
+ removeRule: 'Remove rule',
1150
+ fieldPlaceholder: 'Field key (e.g. amount)',
1151
+ valuePlaceholder: 'Value',
1152
+ minPlaceholder: 'Min',
1153
+ maxPlaceholder: 'Max',
1154
+ noExpressionYet: 'No condition configured yet',
1155
+ operators: {
1156
+ eq: 'Equals',
1157
+ neq: 'Not equals',
1158
+ gt: 'Greater than',
1159
+ gte: 'Greater or equal',
1160
+ lt: 'Less than',
1161
+ lte: 'Less or equal',
1162
+ between: 'Between',
1163
+ in: 'In list',
1164
+ notIn: 'Not in list',
1165
+ contains: 'Contains',
1166
+ notContains: 'Does not contain',
1167
+ isEmpty: 'Is empty',
1168
+ isNotEmpty: 'Is not empty',
1169
+ belongsToDept: 'In department',
1170
+ hasRole: 'Has role',
1171
+ },
1172
+ },
1173
+ formMatrix: {
1174
+ fieldColumn: 'Form Field',
1175
+ emptyFields: 'No form schema provided. Add field keys manually to configure permissions.',
1176
+ addFieldPlaceholder: 'Field key (e.g. reason)',
1177
+ addFieldButton: 'Add Field',
1178
+ batchAll: 'All',
1179
+ },
1180
+ picker: {
1181
+ searchPlaceholder: 'Search or type ID and press Enter…',
1182
+ addButton: 'Add',
1183
+ emptyHint: 'Nothing selected',
1184
+ loading: 'Searching…',
1185
+ },
1186
+ embeddedSteps: {
1187
+ addApprover: 'Add Approver',
1188
+ addCc: 'Add CC',
1189
+ addHandler: 'Add Handler',
1190
+ addTrigger: 'Add Trigger',
1191
+ empty: 'No steps in embedded subflow',
1192
+ backToSubFlow: 'Back to Subflow: {name}',
1193
+ },
1194
+ params: {
1195
+ source: 'Parent var / expression',
1196
+ target: 'Subflow var',
1197
+ headerKey: 'Header name',
1198
+ headerValue: 'Header value',
1199
+ fieldName: 'Field name',
1200
+ fieldValue: 'Value',
1201
+ addRow: 'Add Row',
1202
+ },
1203
+ },
1204
+ validation: {
1205
+ duplicateNodeId: ({ id }) => `Duplicate node ID: ${id}`,
1206
+ approverMissingTarget: ({ name }) => `Approver "${name}" has no assignee configured`,
1207
+ approverMissingExpression: ({ name }) => `Approver "${name}" is missing an assignee expression`,
1208
+ approverMissingFormField: ({ name }) => `Approver "${name}" has no form contact field specified`,
1209
+ approverMissingFallback: ({ name }) => `Approver "${name}" routes empty assignee to fallback users, but none are selected`,
1210
+ ccMissingTarget: ({ name }) => `CC node "${name}" has no recipients and does not allow initiator self-selection`,
1211
+ handlerMissingTarget: ({ name }) => `Handler "${name}" has no assignee configured`,
1212
+ routeMinBranches: ({ name }) => `Branch container "${name}" requires at least 2 branches`,
1213
+ conditionMissingDefault: ({ name }) => `Condition route "${name}" is missing a default fallback branch`,
1214
+ conditionBranchEmpty: ({ name }) => `Branch "${name}" has no condition configured`,
1215
+ delayMissingValue: ({ name }) => `Delay "${name}" has no valid wait time configured`,
1216
+ triggerMissingTarget: ({ name }) => `Trigger "${name}" is missing a webhook URL or implementation`,
1217
+ subFlowMissingCalledElement: ({ name }) => `Subflow "${name}" has no target process key specified`,
1218
+ subFlowEmptyEmbedded: ({ name }) => `Embedded subflow "${name}" has no internal steps`,
1219
+ activitiInclusiveAdvisory: ({ name }) => `Inclusive route "${name}" may have join limitations in some Activiti 7 builds; verify engine compatibility before deployment`,
1220
+ },
1221
+ },
823
1222
  };