@process-analytics/bpmn-visualization-addons 0.8.0 → 0.9.2
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.
- package/lib/bpmn-elements.d.ts +3 -2
- package/lib/bpmn-elements.js +6 -0
- package/lib/paths.d.ts +4 -4
- package/lib/plugins-support.d.ts +2 -2
- package/package.json +11 -13
package/lib/bpmn-elements.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { ShapeBpmnElementKind, ShapeUtil as BaseShapeUtil } from 'bpmn-visualiza
|
|
|
3
3
|
/**
|
|
4
4
|
* Options to deduplicate elements when several names match.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface DeduplicateNamesOptions {
|
|
7
7
|
/** If not set, use all `BpmnElementKind` values. */
|
|
8
8
|
kinds?: BpmnElementKind[];
|
|
9
9
|
/** Apply custom function to filter duplicates. */
|
|
10
10
|
filter?: (bpmnSemantic: BpmnSemantic) => boolean;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
/**
|
|
13
13
|
* Provides workarounds for {@link https://github.com/process-analytics/bpmn-visualization-js/issues/2453}.
|
|
14
14
|
*/
|
|
@@ -56,4 +56,5 @@ export declare class BpmnElementsIdentifier {
|
|
|
56
56
|
}
|
|
57
57
|
export declare class ShapeUtil extends BaseShapeUtil {
|
|
58
58
|
static isBpmnArtifact(kind: ShapeBpmnElementKind | string): boolean;
|
|
59
|
+
static isFlowNode(kind: ShapeBpmnElementKind | string): boolean;
|
|
59
60
|
}
|
package/lib/bpmn-elements.js
CHANGED
|
@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// eslint-disable-next-line unicorn/prevent-abbreviations -- ShapeUtil is a common name in bpmn-visualization, and changing it would break compatibility
|
|
16
17
|
import { FlowKind, ShapeBpmnElementKind, ShapeUtil as BaseShapeUtil } from 'bpmn-visualization';
|
|
17
18
|
const allBpmnElementKinds = [...Object.values(ShapeBpmnElementKind), ...Object.values(FlowKind)];
|
|
18
19
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -115,8 +116,13 @@ export class BpmnElementsIdentifier {
|
|
|
115
116
|
return false;
|
|
116
117
|
}
|
|
117
118
|
}
|
|
119
|
+
// eslint-disable-next-line unicorn/prevent-abbreviations -- ShapeUtil is a common name in bpmn-visualization, and changing it would break compatibility
|
|
118
120
|
export class ShapeUtil extends BaseShapeUtil {
|
|
119
121
|
static isBpmnArtifact(kind) {
|
|
120
122
|
return kind === ShapeBpmnElementKind.GROUP || kind === ShapeBpmnElementKind.TEXT_ANNOTATION;
|
|
121
123
|
}
|
|
124
|
+
static isFlowNode(kind) {
|
|
125
|
+
// there is currently a bug in bpmn-visualization (at least in version 0.44.0). It includes artifacts in flowNodeKinds.
|
|
126
|
+
return ShapeUtil.flowNodeKinds().includes(kind) && !ShapeUtil.isBpmnArtifact(kind);
|
|
127
|
+
}
|
|
122
128
|
}
|
package/lib/paths.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare class CasePathResolver {
|
|
|
26
26
|
constructor(elementsRegistry: ElementsRegistry);
|
|
27
27
|
compute(input: CasePathResolverInput): CasePathResolverOutput;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export interface CasePathResolverInput {
|
|
30
30
|
/**
|
|
31
31
|
* The IDs of elements (flowNodes/shapes and flows/edges) that are already completed. Non-existing ids will be silently ignored.
|
|
32
32
|
*
|
|
@@ -34,8 +34,8 @@ export type CasePathResolverInput = {
|
|
|
34
34
|
* No further user action or automation will update the element.
|
|
35
35
|
*/
|
|
36
36
|
completedIds: string[];
|
|
37
|
-
}
|
|
38
|
-
export
|
|
37
|
+
}
|
|
38
|
+
export interface CasePathResolverOutput {
|
|
39
39
|
/**
|
|
40
40
|
* The `BpmnSemantic` objects retrieved from the model that relate to the ids passed in {@link CasePathResolverInput}.
|
|
41
41
|
*/
|
|
@@ -51,4 +51,4 @@ export type CasePathResolverOutput = {
|
|
|
51
51
|
edges: EdgeBpmnSemantic[];
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
|
-
}
|
|
54
|
+
}
|
package/lib/plugins-support.d.ts
CHANGED
|
@@ -31,9 +31,9 @@ export interface Plugin {
|
|
|
31
31
|
*
|
|
32
32
|
* If you don't extend `GlobalOptions`, use {@link GlobalOptions} directly.
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export interface PluginOptionExtension {
|
|
35
35
|
plugins?: PluginConstructor[];
|
|
36
|
-
}
|
|
36
|
+
}
|
|
37
37
|
export type GlobalOptions = BaseGlobalOptions & PluginOptionExtension;
|
|
38
38
|
/**
|
|
39
39
|
* The identifiers of the plugins provided by `bpmn-visualization-addons`.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@process-analytics/bpmn-visualization-addons",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Add-ons for bpmn-visualization",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"analytics",
|
|
10
10
|
"bpmn",
|
|
@@ -46,19 +46,17 @@
|
|
|
46
46
|
"test-check": "tsc --noEmit --project tsconfig.test.json"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"bpmn-visualization": ">=0.42.0"
|
|
49
|
+
"bpmn-visualization": ">=0.42.0 <0.48.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@jest/globals": "~
|
|
53
|
-
"@swc/core": "~1.
|
|
54
|
-
"@swc/jest": "~0.2.
|
|
55
|
-
"@testing-library/jest-dom": "~6.
|
|
56
|
-
"cross-env": "~
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"jest": "~29.7.0",
|
|
60
|
-
"jest-environment-jsdom": "~29.7.0",
|
|
52
|
+
"@jest/globals": "~30.2.0",
|
|
53
|
+
"@swc/core": "~1.15.11",
|
|
54
|
+
"@swc/jest": "~0.2.39",
|
|
55
|
+
"@testing-library/jest-dom": "~6.9.1",
|
|
56
|
+
"cross-env": "~10.1.0",
|
|
57
|
+
"jest": "~30.2.0",
|
|
58
|
+
"jest-environment-jsdom": "~30.2.0",
|
|
61
59
|
"npm-run-all": "~4.1.5",
|
|
62
|
-
"rimraf": "~6.
|
|
60
|
+
"rimraf": "~6.1.2"
|
|
63
61
|
}
|
|
64
62
|
}
|