@tumaet/apollon 4.2.0-alpha.0 → 4.2.2-alpha.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.
@@ -65,10 +65,9 @@ export type BPMNGroupProps = DefaultNodeProps;
65
65
  export type ReachabilityGraphMarkingProps = DefaultNodeProps & {
66
66
  isInitialMarking: boolean;
67
67
  };
68
- export type SfcActionRow = {
68
+ export type SfcActionRow = DefaultNodeProps & {
69
69
  id: string;
70
70
  identifier: string;
71
- description: string;
72
71
  };
73
72
  export type SfcActionTableProps = DefaultNodeProps & {
74
73
  actionRows: SfcActionRow[];
package/dist/typings.d.ts CHANGED
@@ -46,8 +46,8 @@ export type ApollonEdge = {
46
46
  targetHandle: string;
47
47
  data: {
48
48
  [key: string]: unknown;
49
+ points: IPoint[];
49
50
  };
50
- points: IPoint[];
51
51
  };
52
52
  export type UMLModel = {
53
53
  version: `4.${number}.${number}`;
@@ -0,0 +1,32 @@
1
+ import { Node, Edge } from '@xyflow/react';
2
+ export interface ClipboardData {
3
+ nodes: Node[];
4
+ edges: Edge[];
5
+ parentChildRelations: Array<{
6
+ parentId: string;
7
+ childId: string;
8
+ relativePosition: {
9
+ x: number;
10
+ y: number;
11
+ };
12
+ }>;
13
+ timestamp: number;
14
+ }
15
+ export declare const calculateRelativePosition: (childNode: Node, parentNode: Node) => {
16
+ x: number;
17
+ y: number;
18
+ };
19
+ export declare const getAllDescendants: (nodeIds: string[], allNodes: Node[]) => Node[];
20
+ export declare const getAllNodesToInclude: (selectedElementIds: string[], allNodes: Node[]) => Node[];
21
+ export declare const getRelevantEdges: (selectedElementIds: string[], allEdges: Edge[]) => Edge[];
22
+ export declare const buildParentChildRelations: (nodesToInclude: Node[], nodeIds: string[]) => {
23
+ parentId: string;
24
+ childId: string;
25
+ relativePosition: {
26
+ x: number;
27
+ y: number;
28
+ };
29
+ }[];
30
+ export declare const getEdgesToRemove: (selectedElementIds: string[], expandedNodeIds: string[], allEdges: Edge[]) => Set<string>;
31
+ export declare const createClipboardData: (selectedElementIds: string[], allNodes: Node[], allEdges: Edge[]) => ClipboardData;
32
+ export declare const createNewNodeDataWithNewIds: (originalNodeData: any) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tumaet/apollon",
3
- "version": "4.2.0-alpha.0",
3
+ "version": "4.2.2-alpha.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- import { PopoverProps } from '../types';
2
- export declare const SfcEditPopover: React.FC<PopoverProps>;
@@ -1,3 +0,0 @@
1
- export declare const useAssessmentSelectionMode: () => {
2
- onPaneClicked: () => void;
3
- };