@blueking/bkflow-canvas-editor 1.2.0-beta.1 → 1.2.0-beta.3

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/README.md CHANGED
@@ -56,7 +56,7 @@ npm install @blueking/bkflow-canvas-editor @blueking/flow-canvas
56
56
  mode: 'legacy',
57
57
  fetchUserApi: `${window.BK_COMPONENT_API_URL}/api/c/compapi/v2/usermanage/fs_list_users/`,
58
58
  };
59
- // tenant 模式:使用 @blueking/bk-user-selector(需接入方单独安装该 npm 包)
59
+ // tenant 模式:使用 @blueking/bk-user-selector(peer 依赖 ^0.1.15,由接入方安装)
60
60
  // const memberSelectorConfig = {
61
61
  // mode: 'tenant',
62
62
  // tenantId: 'default',
@@ -1202,7 +1202,7 @@ type MemberSelectorConfig =
1202
1202
  }" />
1203
1203
  ```
1204
1204
 
1205
- > 提示:选择 `tenant` 模式时,接入方需安装可选 peer 依赖 `@blueking/bk-user-selector`。它仅在 tenant 模式下被动态加载,legacy 模式下未安装也不会报错。
1205
+ > 提示:`@blueking/bk-user-selector` 是本包的**必需 peer 依赖**(`^0.1.15`,非 optional),由接入方安装。它仅在 tenant 模式下被动态加载,legacy 模式不会触发加载(加载时机与安装约束相互独立)。
1206
1206
 
1207
1207
  组件内部会自动实现所有 API 方法,包括:
1208
1208
 
@@ -56,7 +56,7 @@ type PortOrientation = 'Top' | 'Right' | 'Bottom' | 'Left';
56
56
 
57
57
  type GatewayType = 'ExclusiveGateway' | 'ParallelGateway' | 'ConditionalParallelGateway' | 'ConvergeGateway';
58
58
 
59
- type NodeType = StartEvent | EndEvent | Activity | SubProcessActivity | Gateway;
59
+ type NodeType = StartEvent | EndEvent | Activity | SubProcessActivity | SubCanvasActivity | Gateway;
60
60
 
61
61
  interface PluginInputDataItem {
62
62
  value:
@@ -125,6 +125,7 @@ interface Activity {
125
125
  loop?: number | null;
126
126
  /** 执行态:生命周期阶段 */
127
127
  phase?: number;
128
+ parent?: string | null;
128
129
  }
129
130
 
130
131
  /**
@@ -216,7 +217,51 @@ interface SubProcessActivity {
216
217
  phase?: number;
217
218
  }
218
219
 
219
- type ActivityUnion = Activity | SubProcessActivity;
220
+ /**
221
+ * 循环体容器节点(SubCanvas)节点。
222
+ */
223
+ interface SubCanvasActivity {
224
+ id: string;
225
+ name: string;
226
+ stage_name?: string;
227
+ type: 'SubCanvas';
228
+ incoming: string[];
229
+ outgoing: string;
230
+ optional?: boolean;
231
+ /** 循环执行配置 */
232
+ loop_config?: LoopConfig;
233
+ /** 嵌套的完整子流程 */
234
+ pipeline: PipelineTree;
235
+ /** 节点标签 */
236
+ labels?: string[];
237
+ status?: NodeExecutionStatus;
238
+ /** 执行态:循环执行次数(未执行时为 null) */
239
+ loop?: number | null;
240
+ error_ignorable?: boolean;
241
+ retryable?: boolean;
242
+ skippable?: boolean;
243
+ auto_retry?: {
244
+ enable: boolean;
245
+ interval: number;
246
+ times: number;
247
+ };
248
+ timeout_config?: {
249
+ enable: boolean;
250
+ seconds: number;
251
+ action: string;
252
+ };
253
+ /** 执行态:实际重试次数 */
254
+ retry?: number;
255
+ /** 执行态:是否被跳过 */
256
+ skip?: boolean;
257
+ /** 执行态:是否自动忽略错误 */
258
+ error_ignored?: boolean;
259
+ /** 执行态:生命周期阶段 */
260
+ phase?: number;
261
+ parent?: string | null;
262
+ }
263
+
264
+ type ActivityUnion = Activity | SubProcessActivity | SubCanvasActivity;
220
265
 
221
266
  interface StartEvent {
222
267
  id: string;
@@ -259,6 +304,7 @@ interface Gateway {
259
304
  parse_lang?: 'boolrule' | 'FEEL' | 'MAKO';
260
305
  };
261
306
  status?: NodeExecutionStatus;
307
+ parent?: string | null;
262
308
  }
263
309
 
264
310
  interface Flow {
@@ -275,15 +321,20 @@ interface Location {
275
321
  | 'endpoint'
276
322
  | 'tasknode'
277
323
  | 'subflow'
324
+ | 'SubCanvas'
278
325
  | 'branchgateway'
279
326
  | 'convergegateway'
280
327
  | 'parallelgateway'
281
328
  | 'conditionalparallelgateway';
282
329
  x: number;
283
330
  y: number;
331
+ /** 容器节点(SubCanvas)resize 后持久化的尺寸 */
332
+ width?: number;
333
+ height?: number;
284
334
  group?: string;
285
335
  icon?: string;
286
336
  name?: string;
337
+ parent?: string | boolean;
287
338
  }
288
339
 
289
340
  interface Line {