camunda-bpmn-js 5.16.0 → 5.18.0

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 (94) hide show
  1. package/dist/base-modeler.development.js +18839 -15666
  2. package/dist/base-modeler.production.min.js +45 -45
  3. package/dist/base-navigated-viewer.development.js +1958 -1314
  4. package/dist/base-navigated-viewer.production.min.js +1 -1
  5. package/dist/base-viewer.development.js +1221 -599
  6. package/dist/base-viewer.production.min.js +1 -1
  7. package/dist/camunda-cloud-modeler.development.js +11497 -7207
  8. package/dist/camunda-cloud-modeler.production.min.js +47 -47
  9. package/dist/camunda-cloud-navigated-viewer.development.js +1850 -1171
  10. package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
  11. package/dist/camunda-cloud-viewer.development.js +1842 -1185
  12. package/dist/camunda-cloud-viewer.production.min.js +1 -1
  13. package/dist/camunda-platform-modeler.development.js +9052 -4379
  14. package/dist/camunda-platform-modeler.production.min.js +45 -45
  15. package/dist/camunda-platform-navigated-viewer.development.js +1839 -1183
  16. package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
  17. package/dist/camunda-platform-viewer.development.js +1818 -1184
  18. package/dist/camunda-platform-viewer.production.min.js +1 -1
  19. package/index.js +1 -0
  20. package/lib/base/Modeler.js +12 -0
  21. package/lib/base/NavigatedViewer.js +10 -0
  22. package/lib/base/Viewer.js +10 -0
  23. package/lib/camunda-cloud/ElementTemplatesValidator.js +10 -0
  24. package/lib/camunda-cloud/Modeler.js +10 -0
  25. package/lib/camunda-cloud/NavigatedViewer.js +10 -0
  26. package/lib/camunda-cloud/Viewer.js +10 -0
  27. package/lib/camunda-cloud/features/external-resources/README.md +1 -1
  28. package/lib/camunda-cloud/features/external-resources/ResourceLoader.d.ts +9 -0
  29. package/lib/camunda-cloud/features/external-resources/ResourceLoader.js +10 -0
  30. package/lib/camunda-cloud/features/external-resources/Resources.d.ts +9 -0
  31. package/lib/camunda-cloud/features/external-resources/Resources.js +10 -0
  32. package/lib/camunda-cloud/features/external-resources/cmd/ComposedCommandHandler.d.ts +9 -0
  33. package/lib/camunda-cloud/features/external-resources/cmd/ComposedCommandHandler.js +10 -0
  34. package/lib/camunda-cloud/features/external-resources/cmd/index.js +10 -0
  35. package/lib/camunda-cloud/features/external-resources/handlers/decision/AppendMenuProvider.js +11 -1
  36. package/lib/camunda-cloud/features/external-resources/handlers/decision/CreateMenuProvider.js +11 -1
  37. package/lib/camunda-cloud/features/external-resources/handlers/decision/ReplaceMenuProvider.js +11 -1
  38. package/lib/camunda-cloud/features/external-resources/handlers/decision/createElement.d.ts +15 -5
  39. package/lib/camunda-cloud/features/external-resources/handlers/decision/createElement.js +29 -4
  40. package/lib/camunda-cloud/features/external-resources/handlers/decision/index.js +10 -0
  41. package/lib/camunda-cloud/features/external-resources/handlers/decision/replaceElement.js +10 -0
  42. package/lib/camunda-cloud/features/external-resources/handlers/decision/searchTerms.d.ts +9 -0
  43. package/lib/camunda-cloud/features/external-resources/handlers/decision/searchTerms.js +10 -0
  44. package/lib/camunda-cloud/features/external-resources/handlers/form/AppendMenuProvider.js +11 -1
  45. package/lib/camunda-cloud/features/external-resources/handlers/form/CreateMenuProvider.js +11 -1
  46. package/lib/camunda-cloud/features/external-resources/handlers/form/ReplaceMenuProvider.js +11 -1
  47. package/lib/camunda-cloud/features/external-resources/handlers/form/createElement.d.ts +15 -1
  48. package/lib/camunda-cloud/features/external-resources/handlers/form/createElement.js +28 -3
  49. package/lib/camunda-cloud/features/external-resources/handlers/form/index.js +10 -0
  50. package/lib/camunda-cloud/features/external-resources/handlers/form/replaceElement.js +10 -0
  51. package/lib/camunda-cloud/features/external-resources/handlers/form/searchTerms.d.ts +9 -0
  52. package/lib/camunda-cloud/features/external-resources/handlers/form/searchTerms.js +10 -0
  53. package/lib/camunda-cloud/features/external-resources/handlers/process/AppendMenuProvider.js +11 -1
  54. package/lib/camunda-cloud/features/external-resources/handlers/process/CreateMenuProvider.js +11 -1
  55. package/lib/camunda-cloud/features/external-resources/handlers/process/ReplaceMenuProvider.js +11 -1
  56. package/lib/camunda-cloud/features/external-resources/handlers/process/createElement.d.ts +14 -5
  57. package/lib/camunda-cloud/features/external-resources/handlers/process/createElement.js +35 -4
  58. package/lib/camunda-cloud/features/external-resources/handlers/process/index.js +10 -0
  59. package/lib/camunda-cloud/features/external-resources/handlers/process/replaceElement.js +10 -0
  60. package/lib/camunda-cloud/features/external-resources/handlers/process/searchTerms.d.ts +9 -0
  61. package/lib/camunda-cloud/features/external-resources/handlers/process/searchTerms.js +10 -0
  62. package/lib/camunda-cloud/features/external-resources/handlers/rpa/AppendMenuProvider.d.ts +6 -0
  63. package/lib/camunda-cloud/features/external-resources/handlers/rpa/AppendMenuProvider.js +41 -0
  64. package/lib/camunda-cloud/features/external-resources/handlers/rpa/CreateMenuProvider.d.ts +6 -0
  65. package/lib/camunda-cloud/features/external-resources/handlers/rpa/CreateMenuProvider.js +41 -0
  66. package/lib/camunda-cloud/features/external-resources/handlers/rpa/ReplaceMenuProvider.d.ts +6 -0
  67. package/lib/camunda-cloud/features/external-resources/handlers/rpa/ReplaceMenuProvider.js +41 -0
  68. package/lib/camunda-cloud/features/external-resources/handlers/rpa/constants.d.ts +12 -0
  69. package/lib/camunda-cloud/features/external-resources/handlers/rpa/constants.js +14 -0
  70. package/lib/camunda-cloud/features/external-resources/handlers/rpa/createElement.d.ts +14 -0
  71. package/lib/camunda-cloud/features/external-resources/handlers/rpa/createElement.js +61 -0
  72. package/lib/camunda-cloud/features/external-resources/handlers/rpa/index.d.ts +8 -0
  73. package/lib/camunda-cloud/features/external-resources/handlers/rpa/index.js +20 -0
  74. package/lib/camunda-cloud/features/external-resources/handlers/rpa/replaceElement.d.ts +15 -0
  75. package/lib/camunda-cloud/features/external-resources/handlers/rpa/replaceElement.js +59 -0
  76. package/lib/camunda-cloud/features/external-resources/handlers/rpa/searchTerms.d.ts +10 -0
  77. package/lib/camunda-cloud/features/external-resources/handlers/rpa/searchTerms.js +11 -0
  78. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseAppendMenuProvider.d.ts +21 -4
  79. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseAppendMenuProvider.js +26 -8
  80. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseCreateMenuProvider.d.ts +19 -3
  81. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseCreateMenuProvider.js +24 -7
  82. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseReplaceMenuProvider.d.ts +6 -2
  83. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseReplaceMenuProvider.js +19 -6
  84. package/lib/camunda-cloud/features/external-resources/index.d.ts +4 -0
  85. package/lib/camunda-cloud/features/external-resources/index.js +13 -1
  86. package/lib/camunda-cloud/features/popup-menu/CamundaDetailsPopupMenuProvider.js +10 -0
  87. package/lib/camunda-cloud/features/popup-menu/index.js +10 -0
  88. package/lib/camunda-cloud/util/commonModules.js +10 -0
  89. package/lib/camunda-platform/Modeler.js +10 -0
  90. package/lib/camunda-platform/NavigatedViewer.js +10 -0
  91. package/lib/camunda-platform/Viewer.js +10 -0
  92. package/lib/camunda-platform/util/commonModules.js +10 -0
  93. package/lib/util/ExtensionElementsUtil.js +10 -0
  94. package/package.json +21 -20
package/index.js ADDED
@@ -0,0 +1 @@
1
+ // This file is left intentionally empty. Use nested imports instead.
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import inherits from 'inherits-browser';
2
12
 
3
13
  import BpmnModeler from 'bpmn-js/lib/Modeler';
@@ -9,6 +19,7 @@ import diagramOriginModule from 'diagram-js-origin';
9
19
  import alignToOriginModule from '@bpmn-io/align-to-origin';
10
20
 
11
21
  import executableFixModule from 'bpmn-js-executable-fix';
22
+ import nativeCopyPasteModule from 'bpmn-js-native-copy-paste';
12
23
 
13
24
  import {
14
25
  BpmnPropertiesPanelModule as propertiesPanelModule,
@@ -56,6 +67,7 @@ Modeler.prototype.getModules = function(options = {}) {
56
67
  Modeler.prototype._extensionModules = [
57
68
  minimapModule,
58
69
  executableFixModule,
70
+ nativeCopyPasteModule,
59
71
  propertiesPanelModule,
60
72
  bpmnPropertiesProviderModule
61
73
  ];
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import NavigatedViewer from 'bpmn-js/lib/NavigatedViewer';
2
12
 
3
13
  export default NavigatedViewer;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import Viewer from 'bpmn-js/lib/Viewer';
2
12
 
3
13
  export default Viewer;
@@ -1 +1,11 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  export { CloudElementTemplatesValidator } from 'bpmn-js-element-templates';
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import inherits from 'inherits-browser';
2
12
 
3
13
  import BaseModeler from '../base/Modeler';
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import inherits from 'inherits-browser';
2
12
 
3
13
  import BaseViewer from '../base/NavigatedViewer';
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import inherits from 'inherits-browser';
2
12
 
3
13
  import BaseViewer from '../base/Viewer';
@@ -10,5 +10,5 @@ Then, register a resources provider to pass the resources to the handlers.
10
10
  ## Principles
11
11
 
12
12
  * The module is extensible. You can pass any resources, and define handlers for them.
13
- You can also override the default handlers.
13
+ You can also override the default handlers.
14
14
  * User is in control. Unlike in element templates, the user can still decide to override any properties set in the handler. The built-in resource handlers are merely helpers to create standard BPMN elements.
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
1
10
  export class ResourceLoader {
2
11
  static $inject: string[];
3
12
  constructor(eventBus: any, resources: any);
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  export class ResourceLoader {
2
12
  static $inject = [ 'eventBus', 'resources' ];
3
13
 
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
1
10
  export class Resources {
2
11
  static $inject: string[];
3
12
  constructor(resources: any);
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  export class Resources {
2
12
  static $inject = [ 'config.resources' ];
3
13
 
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
1
10
  /**
2
11
  * Command handler to compose multiple commands into a single command.
3
12
  * It allows to use facades like `BpmnReplace` and `Modeling` while retaining
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  /**
2
12
  * Command handler to compose multiple commands into a single command.
3
13
  * It allows to use facades like `BpmnReplace` and `Modeling` while retaining
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import {
2
12
  forEach
3
13
  } from 'min-dash';
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { createElement } from './createElement.js';
2
12
  import { searchTerms } from './searchTerms.js';
3
13
  import { BaseAppendMenuProvider } from '../util/BaseAppendMenuProvider.js';
@@ -12,7 +22,7 @@ export class AppendMenuProvider extends BaseAppendMenuProvider {
12
22
  resourceType: 'dmnDecision',
13
23
  groupName: 'Decisions',
14
24
  className: 'bpmn-icon-business-rule-task',
15
- createElement: (resource, bpmnFactory) => createElement(resource, bpmnFactory),
25
+ createElement,
16
26
  search: searchTerms
17
27
  });
18
28
  }
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { createElement } from './createElement.js';
2
12
  import { searchTerms } from './searchTerms.js';
3
13
  import { BaseCreateMenuProvider } from '../util/BaseCreateMenuProvider.js';
@@ -12,7 +22,7 @@ export class CreateMenuProvider extends BaseCreateMenuProvider {
12
22
  resourceType: 'dmnDecision',
13
23
  groupName: 'Decisions',
14
24
  className: 'bpmn-icon-business-rule-task',
15
- createElement: (resource, bpmnFactory) => createElement(resource, bpmnFactory),
25
+ createElement,
16
26
  search: searchTerms
17
27
  });
18
28
  }
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { replaceElement } from './replaceElement.js';
2
12
  import { searchTerms } from './searchTerms.js';
3
13
  import { BaseReplaceMenuProvider } from '../util/BaseReplaceMenuProvider.js';
@@ -12,7 +22,7 @@ export class ReplaceMenuProvider extends BaseReplaceMenuProvider {
12
22
  resourceType: 'dmnDecision',
13
23
  groupName: 'Decisions',
14
24
  className: 'bpmn-icon-business-rule-task',
15
- replaceElement: (element, resource, injector) => replaceElement(element, resource, injector),
25
+ replaceElement,
16
26
  search: searchTerms
17
27
  });
18
28
  }
@@ -1,11 +1,21 @@
1
1
  /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+ /**
11
+ * Create a new BPMN element for the given decision resource.
12
+ *
2
13
  * @param resource
3
- * @param bpmnFactory
14
+ * @param injector
15
+ *
16
+ * @returns
4
17
  */
5
- export function createElement(
6
- resource: Decision,
7
- bpmnFactory: import("bpmn-js/lib/features/modeling/BpmnFactory").default
8
- ): any;
18
+ export function createElement(resource: Decision, injector: import("didi").Injector): import("bpmn-js/lib/model/Types").ModdleElement;
9
19
  export type Decision = {
10
20
  type: "dmnDecision";
11
21
  name: string;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  /**
2
12
  * @typedef {{
3
13
  * type: 'dmnDecision',
@@ -7,15 +17,30 @@
7
17
  */
8
18
 
9
19
  /**
20
+ * Create a new BPMN element for the given decision resource.
21
+ *
10
22
  * @param {Decision} resource
11
- * @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
23
+ * @param {import('didi').Injector} injector
24
+ *
25
+ * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
12
26
  */
13
- export function createElement(resource, bpmnFactory) {
14
- return createDecisionTask(resource, bpmnFactory);
27
+ export function createElement(resource, injector) {
28
+ return createDecisionTask(resource, injector);
15
29
  }
16
30
 
17
- function createDecisionTask(resource, bpmnFactory) {
31
+ /**
32
+ * Create a new BPMN Business Rule Task for the given decision resource.
33
+ *
34
+ * @param {Decision} resource
35
+ * @param {import('didi').Injector} injector
36
+ *
37
+ * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
38
+ */
39
+ function createDecisionTask(resource, injector) {
40
+ const bpmnFactory = injector.get('bpmnFactory');
41
+
18
42
  const calledElement = createCalledDecision(resource, bpmnFactory);
43
+
19
44
  const extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
20
45
  values: [
21
46
  calledElement
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { CreateMenuProvider } from './CreateMenuProvider';
2
12
  import { AppendMenuProvider } from './AppendMenuProvider';
3
13
  import { ReplaceMenuProvider } from './ReplaceMenuProvider';
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { getBusinessObject, is } from 'bpmn-js/lib/util/ModelUtil';
2
12
 
3
13
  /**
@@ -1 +1,10 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
1
10
  export const searchTerms: string;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  export const searchTerms = [
2
12
  'resource',
3
13
  'dmn',
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { createElement } from './createElement.js';
2
12
  import { searchTerms } from './searchTerms.js';
3
13
  import { BaseAppendMenuProvider } from '../util/BaseAppendMenuProvider.js';
@@ -12,7 +22,7 @@ export class AppendMenuProvider extends BaseAppendMenuProvider {
12
22
  resourceType: 'form',
13
23
  groupName: 'Forms',
14
24
  className: 'bpmn-icon-user-task',
15
- createElement: (resource, bpmnFactory) => createElement(resource, bpmnFactory),
25
+ createElement,
16
26
  search: searchTerms
17
27
  });
18
28
  }
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { createElement } from './createElement.js';
2
12
  import { searchTerms } from './searchTerms.js';
3
13
  import { BaseCreateMenuProvider } from '../util/BaseCreateMenuProvider.js';
@@ -12,7 +22,7 @@ export class CreateMenuProvider extends BaseCreateMenuProvider {
12
22
  resourceType: 'form',
13
23
  groupName: 'Forms',
14
24
  className: 'bpmn-icon-user-task',
15
- createElement: (resource, bpmnFactory) => createElement(resource, bpmnFactory),
25
+ createElement,
16
26
  search: searchTerms
17
27
  });
18
28
  }
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { replaceElement } from './replaceElement.js';
2
12
  import { searchTerms } from './searchTerms.js';
3
13
  import { BaseReplaceMenuProvider } from '../util/BaseReplaceMenuProvider.js';
@@ -12,7 +22,7 @@ export class ReplaceMenuProvider extends BaseReplaceMenuProvider {
12
22
  resourceType: 'form',
13
23
  groupName: 'Forms',
14
24
  className: 'bpmn-icon-user-task',
15
- replaceElement: (element, resource, injector) => replaceElement(element, resource, injector),
25
+ replaceElement,
16
26
  search: searchTerms
17
27
  });
18
28
  }
@@ -1,7 +1,21 @@
1
1
  /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+ /**
11
+ * Create a new BPMN element for the given form resource.
12
+ *
2
13
  * @param resource
14
+ * @param injector
15
+ *
16
+ * @returns
3
17
  */
4
- export function createElement(resource: Form): any;
18
+ export function createElement(resource: Form, injector: import("didi").Injector): import("bpmn-js/lib/model/Types").ModdleElement;
5
19
  export type Form = {
6
20
  type: "form";
7
21
  name: string;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  /**
2
12
  * @typedef {{
3
13
  * type: 'form',
@@ -7,13 +17,28 @@
7
17
  */
8
18
 
9
19
  /**
20
+ * Create a new BPMN element for the given form resource.
21
+ *
10
22
  * @param {Form} resource
23
+ * @param {import('didi').Injector} injector
24
+ *
25
+ * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
11
26
  */
12
- export function createElement(resource, bpmnFactory) {
13
- return createFormTask(resource, bpmnFactory);
27
+ export function createElement(resource, injector) {
28
+ return createFormTask(resource, injector);
14
29
  }
15
30
 
16
- function createFormTask(resource, bpmnFactory) {
31
+ /**
32
+ * Create a new BPMN User Task for the given form resource.
33
+ *
34
+ * @param {Form} resource
35
+ * @param {import('didi').Injector} injector
36
+ *
37
+ * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
38
+ */
39
+ function createFormTask(resource, injector) {
40
+ const bpmnFactory = injector.get('bpmnFactory');
41
+
17
42
  const formDefinition = createFormDefinition(resource, bpmnFactory);
18
43
  const extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
19
44
  values: [
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { CreateMenuProvider } from './CreateMenuProvider';
2
12
  import { AppendMenuProvider } from './AppendMenuProvider';
3
13
  import { ReplaceMenuProvider } from './ReplaceMenuProvider';
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { getBusinessObject, is } from 'bpmn-js/lib/util/ModelUtil';
2
12
 
3
13
  /**
@@ -1 +1,10 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
1
10
  export const searchTerms: string;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  export const searchTerms = [
2
12
  'resource',
3
13
  'form',
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information regarding copyright
5
+ * ownership.
6
+ *
7
+ * Camunda licenses this file to you under the MIT; you may not use this file
8
+ * except in compliance with the MIT License.
9
+ */
10
+
1
11
  import { createElement } from './createElement.js';
2
12
  import { searchTerms } from './searchTerms.js';
3
13
  import { BaseAppendMenuProvider } from '../util/BaseAppendMenuProvider.js';
@@ -12,7 +22,7 @@ export class AppendMenuProvider extends BaseAppendMenuProvider {
12
22
  resourceType: 'bpmnProcess',
13
23
  groupName: 'Processes',
14
24
  className: 'bpmn-icon-call-activity',
15
- createElement: (resource, bpmnFactory) => createElement(resource, bpmnFactory),
25
+ createElement,
16
26
  search: searchTerms
17
27
  });
18
28
  }