@flowgram.ai/document 0.4.16 → 0.4.18
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 +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -134,6 +134,7 @@ interface FlowDocumentOptions {
|
|
|
134
134
|
constants?: Record<string, any>;
|
|
135
135
|
formatNodeLines?: (node: FlowNodeEntity, lines: FlowTransitionLine[]) => FlowTransitionLine[];
|
|
136
136
|
formatNodeLabels?: (node: FlowNodeEntity, lines: FlowTransitionLabel[]) => FlowTransitionLabel[];
|
|
137
|
+
preNodeCreate?: (node: FlowNodeEntity) => void;
|
|
137
138
|
/**
|
|
138
139
|
* 获取默认的节点配置
|
|
139
140
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ interface FlowDocumentOptions {
|
|
|
134
134
|
constants?: Record<string, any>;
|
|
135
135
|
formatNodeLines?: (node: FlowNodeEntity, lines: FlowTransitionLine[]) => FlowTransitionLine[];
|
|
136
136
|
formatNodeLabels?: (node: FlowNodeEntity, lines: FlowTransitionLabel[]) => FlowTransitionLabel[];
|
|
137
|
+
preNodeCreate?: (node: FlowNodeEntity) => void;
|
|
137
138
|
/**
|
|
138
139
|
* 获取默认的节点配置
|
|
139
140
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1868,6 +1868,7 @@ var FlowDocument = class {
|
|
|
1868
1868
|
originParent,
|
|
1869
1869
|
meta
|
|
1870
1870
|
});
|
|
1871
|
+
this.options.preNodeCreate?.(node);
|
|
1871
1872
|
const datas = dataRegistries ? this.nodeDataRegistries.concat(...dataRegistries) : this.nodeDataRegistries;
|
|
1872
1873
|
node.addInitializeData(datas);
|
|
1873
1874
|
node.onDispose(() => this.onNodeDisposeEmitter.fire({ node }));
|