camunda-bpmn-js 0.21.0 → 0.21.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.
@@ -91080,19 +91080,22 @@
91080
91080
  xlinkHref: "#a"
91081
91081
  }))));
91082
91082
 
91083
- const PanelPlaceholderProvider = {
91084
- getEmpty: () => {
91085
- return {
91086
- text: 'Select an element to edit its properties.',
91087
- icon: EmptyIcon
91088
- };
91089
- },
91090
- getMultiple: () => {
91091
- return {
91092
- text: 'Multiple elements are selected. Select a single element to edit its properties.',
91093
- icon: MultipleIcon
91094
- };
91095
- }
91083
+ const PanelPlaceholderProvider = translate => {
91084
+ if (!translate) translate = text => text;
91085
+ return {
91086
+ getEmpty: () => {
91087
+ return {
91088
+ text: translate('Select an element to edit its properties.'),
91089
+ icon: EmptyIcon
91090
+ };
91091
+ },
91092
+ getMultiple: () => {
91093
+ return {
91094
+ text: translate('Multiple elements are selected. Select a single element to edit its properties.'),
91095
+ icon: MultipleIcon
91096
+ };
91097
+ }
91098
+ };
91096
91099
  };
91097
91100
 
91098
91101
  function BpmnPropertiesPanel(props) {
@@ -91106,6 +91109,7 @@
91106
91109
  const canvas = injector.get('canvas');
91107
91110
  const elementRegistry = injector.get('elementRegistry');
91108
91111
  const eventBus = injector.get('eventBus');
91112
+ const translate = injector.get('translate');
91109
91113
  const [state, setState] = l$1({
91110
91114
  selectedElement: element
91111
91115
  });
@@ -91254,7 +91258,7 @@
91254
91258
  children: o$1(PropertiesPanel, {
91255
91259
  element: selectedElement,
91256
91260
  headerProvider: PanelHeaderProvider,
91257
- placeholderProvider: PanelPlaceholderProvider,
91261
+ placeholderProvider: PanelPlaceholderProvider(translate),
91258
91262
  groups: groups,
91259
91263
  layoutConfig: layoutConfig,
91260
91264
  layoutChanged: onLayoutChanged,
@@ -93717,7 +93721,8 @@
93717
93721
  return idPrefix ? idPrefix + id : id;
93718
93722
  }
93719
93723
 
93720
- function GeneralGroup(element) {
93724
+ function GeneralGroup(element, injector) {
93725
+ const translate = injector.get('translate');
93721
93726
  const entries = [...NameProps({
93722
93727
  element
93723
93728
  }), ...IdProps(), ...ProcessProps({
@@ -93727,15 +93732,16 @@
93727
93732
  })];
93728
93733
  return {
93729
93734
  id: 'general',
93730
- label: 'General',
93735
+ label: translate('General'),
93731
93736
  entries,
93732
93737
  component: Group
93733
93738
  };
93734
93739
  }
93735
93740
 
93736
- function CompensationGroup(element) {
93741
+ function CompensationGroup(element, injector) {
93742
+ const translate = injector.get('translate');
93737
93743
  const group = {
93738
- label: 'Compensation',
93744
+ label: translate('Compensation'),
93739
93745
  id: 'compensation',
93740
93746
  component: Group,
93741
93747
  entries: [...CompensationProps({
@@ -93750,22 +93756,24 @@
93750
93756
  return null;
93751
93757
  }
93752
93758
 
93753
- function DocumentationGroup(element) {
93759
+ function DocumentationGroup(element, injector) {
93760
+ const translate = injector.get('translate');
93754
93761
  const entries = [...DocumentationProps({
93755
93762
  element
93756
93763
  })];
93757
93764
  return {
93758
93765
  id: 'documentation',
93759
- label: 'Documentation',
93766
+ label: translate('Documentation'),
93760
93767
  entries,
93761
93768
  component: Group
93762
93769
  };
93763
93770
  }
93764
93771
 
93765
- function ErrorGroup(element) {
93772
+ function ErrorGroup(element, injector) {
93773
+ const translate = injector.get('translate');
93766
93774
  const group = {
93767
93775
  id: 'error',
93768
- label: 'Error',
93776
+ label: translate('Error'),
93769
93777
  component: Group,
93770
93778
  entries: [...ErrorProps$1({
93771
93779
  element
@@ -93779,10 +93787,11 @@
93779
93787
  return null;
93780
93788
  }
93781
93789
 
93782
- function MessageGroup(element) {
93790
+ function MessageGroup(element, injector) {
93791
+ const translate = injector.get('translate');
93783
93792
  const group = {
93784
93793
  id: 'message',
93785
- label: 'Message',
93794
+ label: translate('Message'),
93786
93795
  component: Group,
93787
93796
  entries: [...MessageProps$1({
93788
93797
  element
@@ -93796,10 +93805,11 @@
93796
93805
  return null;
93797
93806
  }
93798
93807
 
93799
- function SignalGroup(element) {
93808
+ function SignalGroup(element, injector) {
93809
+ const translate = injector.get('translate');
93800
93810
  const group = {
93801
93811
  id: 'signal',
93802
- label: 'Signal',
93812
+ label: translate('Signal'),
93803
93813
  component: Group,
93804
93814
  entries: [...SignalProps({
93805
93815
  element
@@ -93813,9 +93823,10 @@
93813
93823
  return null;
93814
93824
  }
93815
93825
 
93816
- function LinkGroup(element) {
93826
+ function LinkGroup(element, injector) {
93827
+ const translate = injector.get('translate');
93817
93828
  const group = {
93818
- label: 'Link',
93829
+ label: translate('Link'),
93819
93830
  id: 'link',
93820
93831
  component: Group,
93821
93832
  entries: [...LinkProps({
@@ -93830,10 +93841,11 @@
93830
93841
  return null;
93831
93842
  }
93832
93843
 
93833
- function EscalationGroup(element) {
93844
+ function EscalationGroup(element, injector) {
93845
+ const translate = injector.get('translate');
93834
93846
  const group = {
93835
93847
  id: 'escalation',
93836
- label: 'Escalation',
93848
+ label: translate('Escalation'),
93837
93849
  component: Group,
93838
93850
  entries: [...EscalationProps$1({
93839
93851
  element
@@ -93847,9 +93859,10 @@
93847
93859
  return null;
93848
93860
  }
93849
93861
 
93850
- function TimerGroup(element) {
93862
+ function TimerGroup(element, injector) {
93863
+ const translate = injector.get('translate');
93851
93864
  const group = {
93852
- label: 'Timer',
93865
+ label: translate('Timer'),
93853
93866
  id: 'timer',
93854
93867
  component: Group,
93855
93868
  entries: [...TimerProps$2({
@@ -93864,9 +93877,10 @@
93864
93877
  return null;
93865
93878
  }
93866
93879
 
93867
- function MultiInstanceGroup(element) {
93880
+ function MultiInstanceGroup(element, injector) {
93881
+ const translate = injector.get('translate');
93868
93882
  const group = {
93869
- label: 'Multi-instance',
93883
+ label: translate('Multi-instance'),
93870
93884
  id: 'multiInstance',
93871
93885
  component: Group,
93872
93886
  entries: [...MultiInstanceProps$2({
@@ -93881,26 +93895,27 @@
93881
93895
  return null;
93882
93896
  }
93883
93897
 
93884
- function getGroups(element) {
93885
- const groups = [GeneralGroup(element), DocumentationGroup(element), CompensationGroup(element), ErrorGroup(element), LinkGroup(element), MessageGroup(element), MultiInstanceGroup(element), SignalGroup(element), EscalationGroup(element), TimerGroup(element)]; // contract: if a group returns null, it should not be displayed at all
93898
+ function getGroups(element, injector) {
93899
+ const groups = [GeneralGroup(element, injector), DocumentationGroup(element, injector), CompensationGroup(element, injector), ErrorGroup(element, injector), LinkGroup(element, injector), MessageGroup(element, injector), MultiInstanceGroup(element, injector), SignalGroup(element, injector), EscalationGroup(element, injector), TimerGroup(element, injector)]; // contract: if a group returns null, it should not be displayed at all
93886
93900
 
93887
93901
  return groups.filter(group => group !== null);
93888
93902
  }
93889
93903
 
93890
93904
  class BpmnPropertiesProvider {
93891
- constructor(propertiesPanel) {
93905
+ constructor(propertiesPanel, injector) {
93892
93906
  propertiesPanel.registerProvider(this);
93907
+ this._injector = injector;
93893
93908
  }
93894
93909
 
93895
93910
  getGroups(element) {
93896
93911
  return groups => {
93897
- groups = groups.concat(getGroups(element));
93912
+ groups = groups.concat(getGroups(element, this._injector));
93898
93913
  return groups;
93899
93914
  };
93900
93915
  }
93901
93916
 
93902
93917
  }
93903
- BpmnPropertiesProvider.$inject = ['propertiesPanel'];
93918
+ BpmnPropertiesProvider.$inject = ['propertiesPanel', 'injector'];
93904
93919
 
93905
93920
  var index$2 = {
93906
93921
  __init__: ['bpmnPropertiesProvider'],
@@ -103175,9 +103190,10 @@
103175
103190
  })];
103176
103191
  }
103177
103192
 
103178
- function ImplementationGroup(element) {
103193
+ function ImplementationGroup(element, injector) {
103194
+ const translate = injector.get('translate');
103179
103195
  const group = {
103180
- label: 'Implementation',
103196
+ label: translate('Implementation'),
103181
103197
  id: 'CamundaPlatform__Implementation',
103182
103198
  component: Group,
103183
103199
  entries: [...ImplementationProps({
@@ -103193,8 +103209,9 @@
103193
103209
  }
103194
103210
 
103195
103211
  function ErrorsGroup(element, injector) {
103212
+ const translate = injector.get('translate');
103196
103213
  const group = {
103197
- label: 'Errors',
103214
+ label: translate('Errors'),
103198
103215
  id: 'CamundaPlatform__Errors',
103199
103216
  component: ListGroup,
103200
103217
  ...ErrorsProps({
@@ -103210,9 +103227,10 @@
103210
103227
  return null;
103211
103228
  }
103212
103229
 
103213
- function UserAssignmentGroup(element) {
103230
+ function UserAssignmentGroup(element, injector) {
103231
+ const translate = injector.get('translate');
103214
103232
  const group = {
103215
- label: 'User assignment',
103233
+ label: translate('User assignment'),
103216
103234
  id: 'CamundaPlatform__UserAssignment',
103217
103235
  component: Group,
103218
103236
  entries: [...UserAssignmentProps({
@@ -103227,9 +103245,10 @@
103227
103245
  return null;
103228
103246
  }
103229
103247
 
103230
- function ScriptGroup(element) {
103248
+ function ScriptGroup(element, injector) {
103249
+ const translate = injector.get('translate');
103231
103250
  const group = {
103232
- label: 'Script',
103251
+ label: translate('Script'),
103233
103252
  id: 'CamundaPlatform__Script',
103234
103253
  component: Group,
103235
103254
  entries: [...ScriptTaskProps({
@@ -103244,9 +103263,10 @@
103244
103263
  return null;
103245
103264
  }
103246
103265
 
103247
- function CallActivityGroup(element) {
103266
+ function CallActivityGroup(element, injector) {
103267
+ const translate = injector.get('translate');
103248
103268
  const group = {
103249
- label: 'Called element',
103269
+ label: translate('Called element'),
103250
103270
  id: 'CamundaPlatform__CallActivity',
103251
103271
  component: Group,
103252
103272
  entries: [...CallActivityProps({
@@ -103261,9 +103281,10 @@
103261
103281
  return null;
103262
103282
  }
103263
103283
 
103264
- function ConditionGroup(element) {
103284
+ function ConditionGroup(element, injector) {
103285
+ const translate = injector.get('translate');
103265
103286
  const group = {
103266
- label: 'Condition',
103287
+ label: translate('Condition'),
103267
103288
  id: 'CamundaPlatform__Condition',
103268
103289
  component: Group,
103269
103290
  entries: [...ConditionProps({
@@ -103278,9 +103299,10 @@
103278
103299
  return null;
103279
103300
  }
103280
103301
 
103281
- function StartInitiatorGroup(element) {
103302
+ function StartInitiatorGroup(element, injector) {
103303
+ const translate = injector.get('translate');
103282
103304
  const group = {
103283
- label: 'Start initiator',
103305
+ label: translate('Start initiator'),
103284
103306
  id: 'CamundaPlatform__StartInitiator',
103285
103307
  component: Group,
103286
103308
  entries: [...InitiatorProps({
@@ -103295,9 +103317,10 @@
103295
103317
  return null;
103296
103318
  }
103297
103319
 
103298
- function ExternalTaskGroup(element) {
103320
+ function ExternalTaskGroup(element, injector) {
103321
+ const translate = injector.get('translate');
103299
103322
  const group = {
103300
- label: 'External task',
103323
+ label: translate('External task'),
103301
103324
  id: 'CamundaPlatform__ExternalTask',
103302
103325
  component: Group,
103303
103326
  entries: [...ExternalTaskPriorityProps({
@@ -103312,9 +103335,10 @@
103312
103335
  return null;
103313
103336
  }
103314
103337
 
103315
- function AsynchronousContinuationsGroup(element) {
103338
+ function AsynchronousContinuationsGroup(element, injector) {
103339
+ const translate = injector.get('translate');
103316
103340
  const group = {
103317
- label: 'Asynchronous continuations',
103341
+ label: translate('Asynchronous continuations'),
103318
103342
  id: 'CamundaPlatform__AsynchronousContinuations',
103319
103343
  component: Group,
103320
103344
  entries: [...AsynchronousContinuationsProps({
@@ -103329,9 +103353,10 @@
103329
103353
  return null;
103330
103354
  }
103331
103355
 
103332
- function JobExecutionGroup(element) {
103356
+ function JobExecutionGroup(element, injector) {
103357
+ const translate = injector.get('translate');
103333
103358
  const group = {
103334
- label: 'Job execution',
103359
+ label: translate('Job execution'),
103335
103360
  id: 'CamundaPlatform__JobExecution',
103336
103361
  component: Group,
103337
103362
  entries: [...JobExecutionProps({
@@ -103346,9 +103371,10 @@
103346
103371
  return null;
103347
103372
  }
103348
103373
 
103349
- function CandidateStarterGroup(element) {
103374
+ function CandidateStarterGroup(element, injector) {
103375
+ const translate = injector.get('translate');
103350
103376
  const group = {
103351
- label: 'Candidate starter',
103377
+ label: translate('Candidate starter'),
103352
103378
  id: 'CamundaPlatform__CandidateStarter',
103353
103379
  component: Group,
103354
103380
  entries: [...CandidateStarterProps({
@@ -103364,8 +103390,9 @@
103364
103390
  }
103365
103391
 
103366
103392
  function FieldInjectionGroup(element, injector) {
103393
+ const translate = injector.get('translate');
103367
103394
  const group = {
103368
- label: 'Field injections',
103395
+ label: translate('Field injections'),
103369
103396
  id: 'CamundaPlatform__FieldInjection',
103370
103397
  component: ListGroup,
103371
103398
  ...FieldInjectionProps({
@@ -103381,9 +103408,10 @@
103381
103408
  return null;
103382
103409
  }
103383
103410
 
103384
- function HistoryCleanupGroup(element) {
103411
+ function HistoryCleanupGroup(element, injector) {
103412
+ const translate = injector.get('translate');
103385
103413
  const group = {
103386
- label: 'History cleanup',
103414
+ label: translate('History cleanup'),
103387
103415
  id: 'CamundaPlatform__HistoryCleanup',
103388
103416
  component: Group,
103389
103417
  entries: [...HistoryCleanupProps({
@@ -103398,9 +103426,10 @@
103398
103426
  return null;
103399
103427
  }
103400
103428
 
103401
- function TasklistGroup(element) {
103429
+ function TasklistGroup(element, injector) {
103430
+ const translate = injector.get('translate');
103402
103431
  const group = {
103403
- label: 'Tasklist',
103432
+ label: translate('Tasklist'),
103404
103433
  id: 'CamundaPlatform__Tasklist',
103405
103434
  component: Group,
103406
103435
  entries: [...TasklistProps({
@@ -103416,8 +103445,9 @@
103416
103445
  }
103417
103446
 
103418
103447
  function InMappingGroup(element, injector) {
103448
+ const translate = injector.get('translate');
103419
103449
  const group = {
103420
- label: 'In mappings',
103450
+ label: translate('In mappings'),
103421
103451
  id: 'CamundaPlatform__InMapping',
103422
103452
  component: ListGroup,
103423
103453
  ...InMappingProps({
@@ -103433,9 +103463,10 @@
103433
103463
  return null;
103434
103464
  }
103435
103465
 
103436
- function InMappingPropagationGroup(element) {
103466
+ function InMappingPropagationGroup(element, injector) {
103467
+ const translate = injector.get('translate');
103437
103468
  const group = {
103438
- label: 'In mapping propagation',
103469
+ label: translate('In mapping propagation'),
103439
103470
  id: 'CamundaPlatform__InMappingPropagation',
103440
103471
  component: Group,
103441
103472
  entries: [...InMappingPropagationProps({
@@ -103451,8 +103482,9 @@
103451
103482
  }
103452
103483
 
103453
103484
  function OutMappingGroup(element, injector) {
103485
+ const translate = injector.get('translate');
103454
103486
  const group = {
103455
- label: 'Out mappings',
103487
+ label: translate('Out mappings'),
103456
103488
  id: 'CamundaPlatform__OutMapping',
103457
103489
  component: ListGroup,
103458
103490
  ...OutMappingProps({
@@ -103468,9 +103500,10 @@
103468
103500
  return null;
103469
103501
  }
103470
103502
 
103471
- function OutMappingPropagationGroup(element) {
103503
+ function OutMappingPropagationGroup(element, injector) {
103504
+ const translate = injector.get('translate');
103472
103505
  const group = {
103473
- label: 'Out mapping propagation',
103506
+ label: translate('Out mapping propagation'),
103474
103507
  id: 'CamundaPlatform__OutMappingPropagation',
103475
103508
  component: Group,
103476
103509
  entries: [...OutMappingPropagationProps({
@@ -103486,8 +103519,9 @@
103486
103519
  }
103487
103520
 
103488
103521
  function ProcessVariablesGroup(element, injector) {
103522
+ const translate = injector.get('translate');
103489
103523
  const group = {
103490
- label: 'Process variables',
103524
+ label: translate('Process variables'),
103491
103525
  id: 'CamundaPlatform__ProcessVariables',
103492
103526
  component: ListGroup,
103493
103527
  ...ProcessVariablesProps({
@@ -103504,8 +103538,9 @@
103504
103538
  }
103505
103539
 
103506
103540
  function FormDataGroup(element, injector) {
103541
+ const translate = injector.get('translate');
103507
103542
  const group = {
103508
- label: 'Form fields',
103543
+ label: translate('Form fields'),
103509
103544
  id: 'CamundaPlatform__FormData',
103510
103545
  component: ListGroup,
103511
103546
  ...FormDataProps({
@@ -103521,9 +103556,10 @@
103521
103556
  return null;
103522
103557
  }
103523
103558
 
103524
- function BusinessKeyGroup(element) {
103559
+ function BusinessKeyGroup(element, injector) {
103560
+ const translate = injector.get('translate');
103525
103561
  const group = {
103526
- label: 'Business key',
103562
+ label: translate('Business key'),
103527
103563
  id: 'CamundaPlatform__BusinessKey',
103528
103564
  component: Group,
103529
103565
  entries: [...BusinessKeyProps$1({
@@ -103538,9 +103574,10 @@
103538
103574
  return null;
103539
103575
  }
103540
103576
 
103541
- function FormGroup(element) {
103577
+ function FormGroup(element, injector) {
103578
+ const translate = injector.get('translate');
103542
103579
  const group = {
103543
- label: 'Forms',
103580
+ label: translate('Forms'),
103544
103581
  id: 'CamundaPlatform__Form',
103545
103582
  component: Group,
103546
103583
  entries: [...FormProps({
@@ -103556,8 +103593,9 @@
103556
103593
  }
103557
103594
 
103558
103595
  function ExecutionListenerGroup(element, injector) {
103596
+ const translate = injector.get('translate');
103559
103597
  const group = {
103560
- label: 'Execution listeners',
103598
+ label: translate('Execution listeners'),
103561
103599
  id: 'CamundaPlatform__ExecutionListener',
103562
103600
  component: ListGroup,
103563
103601
  ...ExecutionListenerProps({
@@ -103574,8 +103612,9 @@
103574
103612
  }
103575
103613
 
103576
103614
  function TaskListenerGroup(element, injector) {
103615
+ const translate = injector.get('translate');
103577
103616
  const group = {
103578
- label: 'Task listeners',
103617
+ label: translate('Task listeners'),
103579
103618
  id: 'CamundaPlatform__TaskListener',
103580
103619
  component: ListGroup,
103581
103620
  ...TaskListenerProps({
@@ -103592,8 +103631,9 @@
103592
103631
  }
103593
103632
 
103594
103633
  function InputGroup(element, injector) {
103634
+ const translate = injector.get('translate');
103595
103635
  const group = {
103596
- label: 'Inputs',
103636
+ label: translate('Inputs'),
103597
103637
  id: 'CamundaPlatform__Input',
103598
103638
  component: ListGroup,
103599
103639
  ...InputProps({
@@ -103610,8 +103650,9 @@
103610
103650
  }
103611
103651
 
103612
103652
  function OutputGroup(element, injector) {
103653
+ const translate = injector.get('translate');
103613
103654
  const group = {
103614
- label: 'Outputs',
103655
+ label: translate('Outputs'),
103615
103656
  id: 'CamundaPlatform__Output',
103616
103657
  component: ListGroup,
103617
103658
  ...OutputProps({
@@ -103628,8 +103669,9 @@
103628
103669
  }
103629
103670
 
103630
103671
  function ConnectorInputGroup(element, injector) {
103672
+ const translate = injector.get('translate');
103631
103673
  const group = {
103632
- label: 'Connector inputs',
103674
+ label: translate('Connector inputs'),
103633
103675
  id: 'CamundaPlatform__ConnectorInput',
103634
103676
  component: ListGroup,
103635
103677
  ...ConnectorInputProps({
@@ -103646,8 +103688,9 @@
103646
103688
  }
103647
103689
 
103648
103690
  function ConnectorOutputGroup(element, injector) {
103691
+ const translate = injector.get('translate');
103649
103692
  const group = {
103650
- label: 'Connector outputs',
103693
+ label: translate('Connector outputs'),
103651
103694
  id: 'CamundaPlatform__ConnectorOutput',
103652
103695
  component: ListGroup,
103653
103696
  ...ConnectorOutputProps({
@@ -103664,8 +103707,9 @@
103664
103707
  }
103665
103708
 
103666
103709
  function ExtensionPropertiesGroup(element, injector) {
103710
+ const translate = injector.get('translate');
103667
103711
  const group = {
103668
- label: 'Extension properties',
103712
+ label: translate('Extension properties'),
103669
103713
  id: 'CamundaPlatform__ExtensionProperties',
103670
103714
  component: ListGroup,
103671
103715
  ...ExtensionPropertiesProps({