@flowgram.ai/free-layout-core 0.2.1 → 0.2.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/dist/esm/index.js +25 -33
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +23 -31
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/esm/index.js
CHANGED
|
@@ -1125,7 +1125,7 @@ import {
|
|
|
1125
1125
|
// src/workflow-lines-manager.ts
|
|
1126
1126
|
import { last } from "lodash-es";
|
|
1127
1127
|
import { inject as inject3, injectable as injectable3 } from "inversify";
|
|
1128
|
-
import {
|
|
1128
|
+
import { DisposableCollection, Emitter as Emitter3 } from "@flowgram.ai/utils";
|
|
1129
1129
|
import { FlowNodeRenderData as FlowNodeRenderData2, FlowNodeTransformData as FlowNodeTransformData3 } from "@flowgram.ai/document";
|
|
1130
1130
|
import { EntityManager as EntityManager2, PlaygroundConfigEntity as PlaygroundConfigEntity2, TransformData as TransformData6 } from "@flowgram.ai/core";
|
|
1131
1131
|
|
|
@@ -1324,17 +1324,15 @@ var WorkflowLinesManager = class {
|
|
|
1324
1324
|
toNode?.removeLine(line);
|
|
1325
1325
|
line.validate();
|
|
1326
1326
|
});
|
|
1327
|
-
line.
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
})
|
|
1337
|
-
);
|
|
1327
|
+
line.onDispose(() => {
|
|
1328
|
+
if (available) {
|
|
1329
|
+
this.onAvailableLinesChangeEmitter.fire({
|
|
1330
|
+
type: "DELETE_LINE" /* DELETE_LINE */,
|
|
1331
|
+
toJSON: () => line.toJSON(),
|
|
1332
|
+
entity: line
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1335
|
+
});
|
|
1338
1336
|
if (available) {
|
|
1339
1337
|
this.onAvailableLinesChangeEmitter.fire({
|
|
1340
1338
|
type: "ADD_LINE" /* ADD_LINE */,
|
|
@@ -1535,7 +1533,7 @@ WorkflowLinesManager = __decorateClass([
|
|
|
1535
1533
|
// src/workflow-document.ts
|
|
1536
1534
|
import { customAlphabet } from "nanoid";
|
|
1537
1535
|
import { inject as inject5, injectable as injectable5, optional, postConstruct } from "inversify";
|
|
1538
|
-
import {
|
|
1536
|
+
import { Emitter as Emitter4 } from "@flowgram.ai/utils";
|
|
1539
1537
|
import { NodeEngineContext } from "@flowgram.ai/form-core";
|
|
1540
1538
|
import { FlowDocument, FlowNodeBaseType, FlowNodeTransformData as FlowNodeTransformData5 } from "@flowgram.ai/document";
|
|
1541
1539
|
import {
|
|
@@ -1827,26 +1825,20 @@ var WorkflowDocument = class extends FlowDocument {
|
|
|
1827
1825
|
entity: node,
|
|
1828
1826
|
toJSON: () => this.toNodeJSON(node)
|
|
1829
1827
|
});
|
|
1830
|
-
node.
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
const parentTransform = node.parent.getData(FlowNodeTransformData5);
|
|
1845
|
-
setTimeout(() => {
|
|
1846
|
-
parentTransform.fireChange();
|
|
1847
|
-
}, 0);
|
|
1848
|
-
})
|
|
1849
|
-
);
|
|
1828
|
+
node.onDispose(() => {
|
|
1829
|
+
if (!node.parent || node.parent.flowNodeType === FlowNodeBaseType.ROOT) {
|
|
1830
|
+
return;
|
|
1831
|
+
}
|
|
1832
|
+
const parentTransform = node.parent.getData(FlowNodeTransformData5);
|
|
1833
|
+
parentTransform.fireChange();
|
|
1834
|
+
});
|
|
1835
|
+
node.onDispose(() => {
|
|
1836
|
+
this.fireContentChange({
|
|
1837
|
+
type: "DELETE_NODE" /* DELETE_NODE */,
|
|
1838
|
+
entity: node,
|
|
1839
|
+
toJSON: () => this.toNodeJSON(node)
|
|
1840
|
+
});
|
|
1841
|
+
});
|
|
1850
1842
|
}
|
|
1851
1843
|
if (json.blocks) {
|
|
1852
1844
|
this.renderJSON(
|