@blueking/bkflow-canvas-editor 1.1.0-beta.44 → 1.1.0-beta.45

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 (46) hide show
  1. package/README.md +41 -1
  2. package/dist/advanced.cjs.js +1 -1
  3. package/dist/advanced.d.ts +22 -1
  4. package/dist/advanced.esm.js +1 -1
  5. package/dist/bkflow-canvas-editor_false-B70uLuHL.cjs +1 -0
  6. package/dist/bkflow-canvas-editor_false-BlC281Zg.cjs +1 -0
  7. package/dist/bkflow-canvas-editor_false-Casww7p4.js +5 -0
  8. package/dist/bkflow-canvas-editor_false-i9G8sqQi.js +5 -0
  9. package/dist/context-Bu4mmo1Q.js +1593 -0
  10. package/dist/context-bUpcrt8M.cjs +6 -0
  11. package/dist/index-Bb8gt0ZM.cjs +2 -0
  12. package/dist/index-BynYn4VD.cjs +1 -0
  13. package/dist/index-C1q_QVHM.cjs +1 -0
  14. package/dist/index-C8XJMS_J.js +236 -0
  15. package/dist/index-CddPhY6u.cjs +1 -0
  16. package/dist/{index-DEh6TdMZ.js → index-CgRqOi-E.js} +28949 -29515
  17. package/dist/index-Ci_fP1q2.js +127 -0
  18. package/dist/index-ClbXmmTg.js +168 -0
  19. package/dist/index-DQG9J2SZ.js +137 -0
  20. package/dist/index-FcnoAxWL.cjs +82 -0
  21. package/dist/index-Htumo8sH.cjs +1 -0
  22. package/dist/index-_LhW2Gn_.js +647 -0
  23. package/dist/index-pYNKHhNh.js +73 -0
  24. package/dist/index-rLG78MgZ.cjs +1 -0
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.d.ts +47 -2
  27. package/dist/index.esm.js +42 -33
  28. package/dist/style.css +1 -1
  29. package/package.json +1 -1
  30. package/dist/context-CGIQsuRc.cjs +0 -1
  31. package/dist/context-Ce_Xpx5d.js +0 -724
  32. package/dist/index-B1K53ttM.cjs +0 -1
  33. package/dist/index-B5-BwbW-.js +0 -607
  34. package/dist/index-B7cHQkaD.cjs +0 -2
  35. package/dist/index-BhOE6_v7.cjs +0 -1
  36. package/dist/index-BiOM182-.js +0 -135
  37. package/dist/index-Bit4HgBF.cjs +0 -82
  38. package/dist/index-CLiOiJR2.js +0 -125
  39. package/dist/index-CbEGVZdT.cjs +0 -1
  40. package/dist/index-DVeWB2dR.js +0 -73
  41. package/dist/index-DjIpWxVu.cjs +0 -1
  42. package/dist/index-Dmx7sjvz.cjs +0 -1
  43. package/dist/index-DubPNExB.js +0 -234
  44. package/dist/index-sEixnRd3.js +0 -162
  45. package/dist/index.es.min-BpHMrg2Y.cjs +0 -2
  46. package/dist/index.es.min-DYp0DL9J.js +0 -3543
package/README.md CHANGED
@@ -464,7 +464,7 @@ interface SelectPanelConfig {
464
464
  - **单节点 Mock**:配置 Mock 输出结果后执行(内部顺序:保存 Mock → 单步执行 mock);执行时跳过该节点并以 Mock 输出替代实际输出,Mock 节点在后续全流程中保留 `MOCK` 标签。
465
465
  - **取消 Mock**:清除节点的持久 Mock 配置。
466
466
  - **终止**:全流程终止不传 `node_id`;单步调试进入运行/等待态时,传当前 `active_node_id` 终止该节点。
467
- - **保存联动**:`canDebug` 且 `context` 空闲时,保存成功后会查询 `reset_impact` 并自动清理失效节点的调试结果。
467
+ - **保存联动**:`canDebug` 时保存成功后刷新 `debug_context`;最后一次 `debug_snapshot` 会保留,直接修改或删除的节点分别由 `config_changed` / `node_deleted` 标记为已失效。
468
468
 
469
469
  #### 版本管理(`enableVersionManagement=true`)
470
470
 
@@ -1419,6 +1419,46 @@ resolve: {
1419
1419
  - FlowEdit 会自动将版本相关 props 透传给内嵌的 FlowDebug 组件
1420
1420
  - 版本功能依赖 `fetchFlowDraftDetail` 和 `fetchFlowDetailByVersion` 两个 API 方法
1421
1421
 
1422
+ ## 国际化
1423
+
1424
+ 包内自带 `zh-cn` 与 `en` 词条,默认 `zh-cn`。宿主在挂载前调用一次 `setLocale` 即可:
1425
+
1426
+ ```typescript
1427
+ import { setLocale } from '@blueking/bkflow-canvas-editor';
1428
+
1429
+ setLocale('en');
1430
+ ```
1431
+
1432
+ 语言是进程级全局状态,切换后需由宿主刷新页面;不支持同一页面内两个画布实例使用不同语言。
1433
+
1434
+ 组件库(bkui-vue / element-plus)的文案由包内自动联动,宿主无需在 `app.use(bkui)` 时额外配置。
1435
+
1436
+ `setLocale` 只管前端文案。**后端下发的内容(插件名称、插件表单 schema 标签、接口报错)
1437
+ 不受它影响**——bkflow 后端按 `blueking_language` Cookie(`zh-cn` / `en`)判定语言,
1438
+ 不读 `Accept-Language` 请求头,宿主需自行设置该 Cookie。
1439
+
1440
+ locale 非 `zh-cn` 时本包会改写 bkui-vue 的 `defaultRootConfig.locale` 以覆盖命令式
1441
+ `Message` / `InfoBox`,**影响范围是整个宿主应用**。详见
1442
+ [docs/usage.md 的国际化章节](./docs/usage.md#国际化)。
1443
+
1444
+ 进阶用法:
1445
+
1446
+ | API | 用途 |
1447
+ | --- | --- |
1448
+ | `registerMessages(locale, messages, options?)` | 深合并覆盖个别词条,或注册包内没有的新语言 |
1449
+ | `setTranslator(fn)` | 完全接管翻译,桥接宿主已有的 i18n;返回 `undefined` 时回落包内词条 |
1450
+ | `getLocale()` | 读取当前语言 |
1451
+
1452
+ 注册新语言时可一并提供 bkui-vue 语言包:
1453
+
1454
+ ```typescript
1455
+ import { registerMessages } from '@blueking/bkflow-canvas-editor';
1456
+ import jaMessages from './ja';
1457
+ import { jp } from 'bkui-vue/lib/locale';
1458
+
1459
+ registerMessages('ja', jaMessages, { bkuiLocale: jp });
1460
+ ```
1461
+
1422
1462
  ## License
1423
1463
 
1424
1464
  MIT
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context-CGIQsuRc.cjs");exports.PLUGIN_GROUP_ICON_MAP=e.PLUGIN_GROUP_ICON_MAP;exports.SOPS_PLUGIN_GROUP_NAME=e.SOPS_PLUGIN_GROUP_NAME;exports.provideVariableInputCreateVariable=e.provideVariableInputCreateVariable;exports.resolveSopsPluginSources=e.resolveSopsPluginSources;exports.useFlowApi=e.useFlowApi;exports.useVariableInputCreateVariable=e.useVariableInputCreateVariable;exports.withSopsPluginGroup=e.withSopsPluginGroup;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context-bUpcrt8M.cjs");exports.PLUGIN_GROUP_ICON_MAP=e.PLUGIN_GROUP_ICON_MAP;exports.SOPS_PLUGIN_GROUP_NAME=e.SOPS_PLUGIN_GROUP_NAME;exports.provideVariableInputCreateVariable=e.provideVariableInputCreateVariable;exports.resolveSopsPluginSources=e.resolveSopsPluginSources;exports.useFlowApi=e.useFlowApi;exports.useVariableInputCreateVariable=e.useVariableInputCreateVariable;exports.withSopsPluginGroup=e.withSopsPluginGroup;
@@ -846,6 +846,26 @@ interface DebugContextNode {
846
846
  /** 条件网关每个分支的表达式与命中结果。 */
847
847
  condition_results?: DebugConditionResult[];
848
848
  }
849
+ interface DebugSnapshotNode {
850
+ node_id: string;
851
+ node_name: string;
852
+ node_type: string;
853
+ execution_mode: DebugExecutionMode;
854
+ status: DebugNodeStatus;
855
+ waiting_reason?: string | null;
856
+ inputs: Record<string, unknown>;
857
+ outputs: Record<string, unknown>;
858
+ duration_ms?: number | null;
859
+ error_detail?: DebugErrorDetail | string | null;
860
+ log_ref?: DebugContextNode['log_ref'];
861
+ operator: string;
862
+ last_run_at?: string | null;
863
+ config_changed: boolean;
864
+ node_deleted: boolean;
865
+ }
866
+ interface DebugSnapshot {
867
+ nodes: DebugSnapshotNode[];
868
+ }
849
869
  /**
850
870
  * /debug_context/ 顶层结构。
851
871
  *
@@ -869,6 +889,7 @@ interface DebugContext {
869
889
  global_vars: Record<string, unknown>;
870
890
  missing_vars?: DebugMissingVar[];
871
891
  nodes: DebugContextNode[];
892
+ debug_snapshot: DebugSnapshot | null;
872
893
  }
873
894
  interface DebugInputSchemaField {
874
895
  key: string;
@@ -1321,4 +1342,4 @@ declare const provideVariableInputCreateVariable: (handler: VariableInputCreateV
1321
1342
  declare const useVariableInputCreateVariable: () => VariableInputCreateVariableHandler | null;
1322
1343
 
1323
1344
  export { PLUGIN_GROUP_ICON_MAP, SOPS_PLUGIN_GROUP_NAME, provideVariableInputCreateVariable, resolveSopsPluginSources, useFlowApi, useVariableInputCreateVariable, withSopsPluginGroup };
1324
- export type { CreateVariablePayload, CreateVariableRequest, CustomVariableType, DebugApiServices, DebugConditionResult, DebugContext, DebugContextNode, DebugContextStatus, DebugErrorDetail, DebugExecutionMode, DebugInputSchema, DebugMissingVar, DebugNodeStatus, DebugRunStatus, DebugRunType, EndEvent, Flow, FlowDetailApiConfig, FlowEditApiConfig, FlowListItem, FlowVersionApiServices, FlowVersionListResult, FlowVersionSnapshot, FlowViewApiConfig, GatewayType, Line, Location, NodeConfigData, NodeType, NotifyConfig, PluginGroupConfig, PluginOutputItem, PortOrientation, ReleaseFlowVersionParams, RollbackFlowVersionParams, SelectRelatedSourceContext, SopsPluginCategory, SopsPluginCategoryParams, SopsPluginDetail, SopsPluginDetailParams, SopsPluginFormDescriptor, SopsPluginItem, SopsPluginListParams, SopsPluginListResult, SopsPluginSourceItem, SpaceUniformApiEntry, StartEvent, TemplateConfigs, UniformApiPluginConfig, UniformApiPluginInputsItem, VariableInputCreateVariableHandler, VariableOption, VariableRefRequestParams };
1345
+ export type { CreateVariablePayload, CreateVariableRequest, CustomVariableType, DebugApiServices, DebugConditionResult, DebugContext, DebugContextNode, DebugContextStatus, DebugErrorDetail, DebugExecutionMode, DebugInputSchema, DebugMissingVar, DebugNodeStatus, DebugRunStatus, DebugRunType, DebugSnapshot, DebugSnapshotNode, EndEvent, Flow, FlowDetailApiConfig, FlowEditApiConfig, FlowListItem, FlowVersionApiServices, FlowVersionListResult, FlowVersionSnapshot, FlowViewApiConfig, GatewayType, Line, Location, NodeConfigData, NodeType, NotifyConfig, PluginGroupConfig, PluginOutputItem, PortOrientation, ReleaseFlowVersionParams, RollbackFlowVersionParams, SelectRelatedSourceContext, SopsPluginCategory, SopsPluginCategoryParams, SopsPluginDetail, SopsPluginDetailParams, SopsPluginFormDescriptor, SopsPluginItem, SopsPluginListParams, SopsPluginListResult, SopsPluginSourceItem, SpaceUniformApiEntry, StartEvent, TemplateConfigs, UniformApiPluginConfig, UniformApiPluginInputsItem, VariableInputCreateVariableHandler, VariableOption, VariableRefRequestParams };
@@ -1,4 +1,4 @@
1
- import { P as r, S as s, p as i, r as o, u as p, a as u, w as P } from "./context-Ce_Xpx5d.js";
1
+ import { P as r, S as s, p as i, r as o, u as p, a as u, w as P } from "./context-Bu4mmo1Q.js";
2
2
  export {
3
3
  r as PLUGIN_GROUP_ICON_MAP,
4
4
  s as SOPS_PLUGIN_GROUP_NAME,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={};throw new Error('Could not resolve "@blueking/bk-user-selector/vue3/vue3.css" imported by "@blueking/bkflow-canvas-editor".');exports.default=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={};throw new Error('Could not resolve "@blueking/bk-user-selector" imported by "@blueking/bkflow-canvas-editor".');exports.default=e;
@@ -0,0 +1,5 @@
1
+ const e = {};
2
+ throw new Error('Could not resolve "@blueking/bk-user-selector/vue3/vue3.css" imported by "@blueking/bkflow-canvas-editor".');
3
+ export {
4
+ e as default
5
+ };
@@ -0,0 +1,5 @@
1
+ const e = {};
2
+ throw new Error('Could not resolve "@blueking/bk-user-selector" imported by "@blueking/bkflow-canvas-editor".');
3
+ export {
4
+ e as default
5
+ };