lecom-modeler 0.1.13 → 0.1.14
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/index.cjs +8 -8
- package/lib/index.d.cts +8 -17
- package/lib/index.d.ts +8 -17
- package/lib/index.js +8 -8
- package/package.json +1 -1
package/lib/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
2
3
|
|
|
3
4
|
declare enum GatewayVariant {
|
|
4
5
|
EXCLUSIVE = "EXCLUSIVE",
|
|
@@ -62,26 +63,16 @@ interface GatewayElement {
|
|
|
62
63
|
targets?: Element[];
|
|
63
64
|
}
|
|
64
65
|
type Element = ActivityElement | RoutingElement | GatewayElement;
|
|
66
|
+
interface ModelerRef {
|
|
67
|
+
selectElement: (id: string) => void;
|
|
68
|
+
}
|
|
65
69
|
interface ModelerProps {
|
|
70
|
+
forwardedRef?: ForwardedRef<ModelerRef>;
|
|
66
71
|
mode?: EditorMode;
|
|
67
72
|
locale?: string;
|
|
68
73
|
onConfigureElement?: (element: Element) => void;
|
|
69
|
-
onHighlightMethods?: (methods: {
|
|
70
|
-
highlightElement: (elementId: string) => void;
|
|
71
|
-
highlightElements: (elementIds: string[]) => void;
|
|
72
|
-
clearHighlight: () => void;
|
|
73
|
-
isElementHighlighted: (elementId: string) => boolean;
|
|
74
|
-
getHighlightedElements: () => string[];
|
|
75
|
-
}) => void;
|
|
76
74
|
}
|
|
77
75
|
|
|
78
|
-
declare const Modeler:
|
|
79
|
-
interface HighlightMethods {
|
|
80
|
-
highlightElement: (elementId: string) => void;
|
|
81
|
-
highlightElements: (elementIds: string[]) => void;
|
|
82
|
-
clearHighlight: () => void;
|
|
83
|
-
isElementHighlighted: (elementId: string) => boolean;
|
|
84
|
-
getHighlightedElements: () => string[];
|
|
85
|
-
}
|
|
76
|
+
declare const Modeler: react.ForwardRefExoticComponent<Omit<ModelerProps, "forwardedRef"> & react.RefAttributes<ModelerRef>>;
|
|
86
77
|
|
|
87
|
-
export { ActivityVariant, ComplexVariant, EditorMode, type Element, ElementType, ExclusiveVariant, GatewayVariant,
|
|
78
|
+
export { ActivityVariant, ComplexVariant, EditorMode, type Element, ElementType, ExclusiveVariant, GatewayVariant, Modeler, type ModelerRef, RoutingVariant };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
2
3
|
|
|
3
4
|
declare enum GatewayVariant {
|
|
4
5
|
EXCLUSIVE = "EXCLUSIVE",
|
|
@@ -62,26 +63,16 @@ interface GatewayElement {
|
|
|
62
63
|
targets?: Element[];
|
|
63
64
|
}
|
|
64
65
|
type Element = ActivityElement | RoutingElement | GatewayElement;
|
|
66
|
+
interface ModelerRef {
|
|
67
|
+
selectElement: (id: string) => void;
|
|
68
|
+
}
|
|
65
69
|
interface ModelerProps {
|
|
70
|
+
forwardedRef?: ForwardedRef<ModelerRef>;
|
|
66
71
|
mode?: EditorMode;
|
|
67
72
|
locale?: string;
|
|
68
73
|
onConfigureElement?: (element: Element) => void;
|
|
69
|
-
onHighlightMethods?: (methods: {
|
|
70
|
-
highlightElement: (elementId: string) => void;
|
|
71
|
-
highlightElements: (elementIds: string[]) => void;
|
|
72
|
-
clearHighlight: () => void;
|
|
73
|
-
isElementHighlighted: (elementId: string) => boolean;
|
|
74
|
-
getHighlightedElements: () => string[];
|
|
75
|
-
}) => void;
|
|
76
74
|
}
|
|
77
75
|
|
|
78
|
-
declare const Modeler:
|
|
79
|
-
interface HighlightMethods {
|
|
80
|
-
highlightElement: (elementId: string) => void;
|
|
81
|
-
highlightElements: (elementIds: string[]) => void;
|
|
82
|
-
clearHighlight: () => void;
|
|
83
|
-
isElementHighlighted: (elementId: string) => boolean;
|
|
84
|
-
getHighlightedElements: () => string[];
|
|
85
|
-
}
|
|
76
|
+
declare const Modeler: react.ForwardRefExoticComponent<Omit<ModelerProps, "forwardedRef"> & react.RefAttributes<ModelerRef>>;
|
|
86
77
|
|
|
87
|
-
export { ActivityVariant, ComplexVariant, EditorMode, type Element, ElementType, ExclusiveVariant, GatewayVariant,
|
|
78
|
+
export { ActivityVariant, ComplexVariant, EditorMode, type Element, ElementType, ExclusiveVariant, GatewayVariant, Modeler, type ModelerRef, RoutingVariant };
|