@logicflow/extension 1.1.12 → 1.2.0-alpha.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.
Files changed (70) hide show
  1. package/cjs/NodeResize/Control/Control.js +8 -8
  2. package/cjs/NodeResize/Control/Util.js +11 -11
  3. package/cjs/bpmn-adapter/index.js +124 -76
  4. package/cjs/bpmn-adapter/json2xml.js +5 -2
  5. package/cjs/bpmn-adapter/xml2json.js +38 -284
  6. package/cjs/components/context-menu/index.js +2 -2
  7. package/cjs/components/menu/index.js +23 -23
  8. package/cjs/components/mini-map/index.js +2 -2
  9. package/cjs/components/selection-select/index.js +5 -5
  10. package/cjs/insert-node-in-polyline/edge.js +4 -4
  11. package/cjs/insert-node-in-polyline/index.js +1 -1
  12. package/cjs/materials/group/GroupNode.js +2 -2
  13. package/cjs/materials/group/index.js +3 -3
  14. package/cjs/tools/auto-layout/index.js +9 -9
  15. package/cjs/tools/snapshot/index.js +47 -46
  16. package/cjs/turbo-adapter/index.js +2 -2
  17. package/es/NodeResize/Control/Control.d.ts +1 -1
  18. package/es/NodeResize/Control/Control.js +9 -9
  19. package/es/NodeResize/Control/Util.d.ts +3 -3
  20. package/es/NodeResize/Control/Util.js +7 -7
  21. package/es/bpmn-adapter/index.d.ts +41 -33
  22. package/es/bpmn-adapter/index.js +124 -76
  23. package/es/bpmn-adapter/json2xml.js +5 -2
  24. package/es/bpmn-adapter/xml2json.js +38 -284
  25. package/es/components/context-menu/index.js +2 -2
  26. package/es/components/menu/index.js +23 -23
  27. package/es/components/mini-map/index.js +2 -2
  28. package/es/components/selection-select/index.d.ts +1 -1
  29. package/es/components/selection-select/index.js +5 -5
  30. package/es/insert-node-in-polyline/edge.d.ts +3 -3
  31. package/es/insert-node-in-polyline/edge.js +3 -3
  32. package/es/insert-node-in-polyline/index.js +2 -2
  33. package/es/materials/group/GroupNode.d.ts +1 -1
  34. package/es/materials/group/GroupNode.js +2 -2
  35. package/es/materials/group/index.d.ts +1 -1
  36. package/es/materials/group/index.js +3 -3
  37. package/es/tools/auto-layout/index.d.ts +2 -2
  38. package/es/tools/auto-layout/index.js +9 -9
  39. package/es/tools/snapshot/index.d.ts +15 -7
  40. package/es/tools/snapshot/index.js +47 -46
  41. package/es/turbo-adapter/index.js +2 -2
  42. package/lib/AutoLayout.js +1 -1
  43. package/lib/BpmnAdapter.js +1 -1
  44. package/lib/BpmnElement.js +1 -1
  45. package/lib/ContextMenu.js +1 -1
  46. package/lib/Control.js +1 -1
  47. package/lib/CurvedEdge.js +1 -1
  48. package/lib/DndPanel.js +1 -1
  49. package/lib/FlowPath.js +1 -1
  50. package/lib/Group.js +1 -1
  51. package/lib/InsertNodeInPolyline.js +1 -1
  52. package/lib/Menu.js +1 -1
  53. package/lib/MiniMap.js +1 -1
  54. package/lib/NodeResize.js +1 -1
  55. package/lib/RectLabelNode.js +1 -1
  56. package/lib/SelectionSelect.js +1 -1
  57. package/lib/Snapshot.js +1 -1
  58. package/lib/TurboAdapter.js +1 -1
  59. package/lib/lfJson2Xml.js +1 -1
  60. package/lib/lfXml2Json.js +1 -1
  61. package/package.json +2 -2
  62. package/types/NodeResize/Control/Control.d.ts +1 -1
  63. package/types/NodeResize/Control/Util.d.ts +3 -3
  64. package/types/bpmn-adapter/index.d.ts +41 -33
  65. package/types/components/selection-select/index.d.ts +1 -1
  66. package/types/insert-node-in-polyline/edge.d.ts +3 -3
  67. package/types/materials/group/GroupNode.d.ts +1 -1
  68. package/types/materials/group/index.d.ts +1 -1
  69. package/types/tools/auto-layout/index.d.ts +2 -2
  70. package/types/tools/snapshot/index.d.ts +15 -7
@@ -1,45 +1,53 @@
1
- declare const BpmnAdapter: {
2
- pluginName: string;
3
- install(lf: any): void;
4
- shapeConfigMap: Map<any, any>;
1
+ declare class BpmnAdapter {
2
+ static pluginName: string;
3
+ static shapeConfigMap: Map<any, any>;
4
+ processAttributes: {
5
+ ['-isExecutable']: string;
6
+ ['-id']: string;
7
+ };
8
+ definitionAttributes: {
9
+ ['-id']: string;
10
+ ['-xmlns:xsi']: string;
11
+ ['-xmlns:bpmn']: string;
12
+ ['-xmlns:bpmndi']: string;
13
+ ['-xmlns:dc']: string;
14
+ ['-xmlns:di']: string;
15
+ ['-targetNamespace']: string;
16
+ ['-exporter']: string;
17
+ ['-exporterVersion']: string;
18
+ [key: string]: any;
19
+ };
20
+ constructor({ lf }: {
21
+ lf: any;
22
+ });
5
23
  setCustomShape(key: any, val: any): void;
6
- adapterOut(data: any): {
24
+ adapterOut: (data: any) => {
7
25
  'bpmn:definitions': {
8
- '-id': string;
9
- '-xmlns:xsi': string;
10
- '-xmlns:bpmn': string;
11
- '-xmlns:bpmndi': string;
12
- '-xmlns:dc': string;
13
- '-xmlns:di': string;
14
- '-targetNamespace': string;
15
- '-exporter': string;
16
- '-exporterVersion': string;
17
- 'bpmn:process': {
18
- '-id': string;
19
- '-isExecutable': string;
20
- };
21
- 'bpmndi:BPMNDiagram': {
22
- '-id': string;
23
- 'bpmndi:BPMNPlane': {
24
- '-id': string;
25
- '-bpmnElement': string;
26
- };
27
- };
26
+ [key: string]: any;
27
+ "-id": string;
28
+ "-xmlns:xsi": string;
29
+ "-xmlns:bpmn": string;
30
+ "-xmlns:bpmndi": string;
31
+ "-xmlns:dc": string;
32
+ "-xmlns:di": string;
33
+ "-targetNamespace": string;
34
+ "-exporter": string;
35
+ "-exporterVersion": string;
28
36
  };
29
37
  };
30
- adapterIn(bpmnData: any): {
38
+ adapterIn: (bpmnData: any) => {
31
39
  nodes: any[];
32
40
  edges: any[];
33
41
  };
34
- };
35
- declare const BpmnXmlAdapter: {
36
- pluginName: string;
37
- install(lf: any): void;
38
- adapterXmlIn(bpmnData: any): {
42
+ }
43
+ declare class BpmnXmlAdapter extends BpmnAdapter {
44
+ static pluginName: string;
45
+ constructor(data: any);
46
+ adapterXmlIn: (bpmnData: any) => {
39
47
  nodes: any[];
40
48
  edges: any[];
41
49
  };
42
- adapterXmlOut(data: any): string;
43
- };
50
+ adapterXmlOut: (data: any) => string;
51
+ }
44
52
  export { BpmnAdapter, BpmnXmlAdapter, };
45
53
  export default BpmnAdapter;
@@ -12,7 +12,7 @@ declare class SelectionSelect {
12
12
  y: number;
13
13
  };
14
14
  __disabled: boolean;
15
- isDefalutStopMoveGraph: boolean;
15
+ isDefaultStopMoveGraph: boolean;
16
16
  isWholeNode: boolean;
17
17
  isWholeEdge: boolean;
18
18
  static pluginName: string;
@@ -1,6 +1,6 @@
1
1
  import { Point, PolylineEdgeModel, BaseNodeModel } from '@logicflow/core';
2
2
  export declare const isInSegment: (point: any, start: any, end: any) => boolean;
3
- export declare const corssPointInSegement: (node: BaseNodeModel, start: Point, end: Point) => {
3
+ export declare const crossPointInSegment: (node: BaseNodeModel, start: Point, end: Point) => {
4
4
  startCrossPoint: {
5
5
  x: number;
6
6
  y: number;
@@ -10,12 +10,12 @@ export declare const corssPointInSegement: (node: BaseNodeModel, start: Point, e
10
10
  y: number;
11
11
  };
12
12
  };
13
- interface SegementCross {
13
+ interface SegmentCross {
14
14
  crossIndex: number;
15
15
  crossPoints: {
16
16
  startCrossPoint: Point;
17
17
  endCrossPoint: Point;
18
18
  };
19
19
  }
20
- export declare const isNodeInSegement: (node: BaseNodeModel, polyline: PolylineEdgeModel) => SegementCross;
20
+ export declare const isNodeInSegment: (node: BaseNodeModel, polyline: PolylineEdgeModel) => SegmentCross;
21
21
  export {};
@@ -101,7 +101,7 @@ declare class GroupNodeModel extends RectResize.model {
101
101
  }
102
102
  declare class GroupNode extends RectResize.view {
103
103
  getControlGroup(): h.JSX.Element;
104
- getAddedableShape(): import("preact").VNode<any>;
104
+ getAddAbleShape(): import("preact").VNode<any>;
105
105
  getFoldIcon(): import("preact").VNode<any>;
106
106
  getResizeShape(): import("preact").VNode<any>;
107
107
  }
@@ -17,7 +17,7 @@ declare class Group {
17
17
  lf: any;
18
18
  });
19
19
  graphRendered: (data: any) => void;
20
- appendNodeToGrop: ({ data }: {
20
+ appendNodeToGroup: ({ data }: {
21
21
  data: any;
22
22
  }) => void;
23
23
  deleteGroupChild: ({ data }: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * 自动布局插件
3
- * 依赖flowpath插件
3
+ * 依赖flow-path插件
4
4
  * 未完善
5
5
  */
6
6
  import LogicFlow from '@logicflow/core';
@@ -26,7 +26,7 @@ declare class AutoLayout {
26
26
  * source一定在target左边。
27
27
  * 1. 如果source和target在同一x, y坐标内容。
28
28
  * 2. 如果source在target左上方。
29
- * 3. 如果souce在target左下方。
29
+ * 3. 如果source在target左下方。
30
30
  */
31
31
  private getRelativePosition;
32
32
  /**
@@ -1,17 +1,25 @@
1
1
  /**
2
2
  * 快照插件,生成视图
3
3
  */
4
- declare const Snapshot: {
5
- pluginName: string;
6
- install(lf: any): void;
4
+ declare class Snapshot {
5
+ static pluginName: string;
6
+ lf: any;
7
+ offsetX: number;
8
+ offsetY: number;
9
+ fileName: string;
10
+ customCssRules: string;
11
+ useGlobalRules: boolean;
12
+ constructor({ lf }: {
13
+ lf: any;
14
+ });
7
15
  getSvgRootElement(lf: any): any;
8
16
  triggerDownload(imgURI: string): void;
9
17
  removeAnchor(element: any): void;
10
- downloadSvg(svg: SVGGraphicsElement, fileName: string, backgroundColor: string): void;
11
- getBase64(svg: SVGGraphicsElement, backgroundColor: string): Promise<unknown>;
12
- getBlob(svg: SVGGraphicsElement, backgroundColor: string): Promise<unknown>;
18
+ getSnapshot(fileName: string, backgroundColor: string): void;
19
+ getSnapshotBase64(backgroundColor: string): Promise<unknown>;
20
+ getSnapshotBlob(backgroundColor: string): Promise<unknown>;
13
21
  getClassRules(): string;
14
22
  getCanvasData(svg: SVGGraphicsElement, backgroundColor: string): Promise<unknown>;
15
- };
23
+ }
16
24
  export default Snapshot;
17
25
  export { Snapshot, };