@blueking/bkflow-canvas-editor 1.1.0-beta.41 → 1.1.0-beta.43

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
@@ -1402,46 +1402,6 @@ resolve: {
1402
1402
  - FlowEdit 会自动将版本相关 props 透传给内嵌的 FlowDebug 组件
1403
1403
  - 版本功能依赖 `fetchFlowDraftDetail` 和 `fetchFlowDetailByVersion` 两个 API 方法
1404
1404
 
1405
- ## 国际化
1406
-
1407
- 包内自带 `zh-cn` 与 `en` 词条,默认 `zh-cn`。宿主在挂载前调用一次 `setLocale` 即可:
1408
-
1409
- ```typescript
1410
- import { setLocale } from '@blueking/bkflow-canvas-editor';
1411
-
1412
- setLocale('en');
1413
- ```
1414
-
1415
- 语言是进程级全局状态,切换后需由宿主刷新页面;不支持同一页面内两个画布实例使用不同语言。
1416
-
1417
- 组件库(bkui-vue / element-plus)的文案由包内自动联动,宿主无需在 `app.use(bkui)` 时额外配置。
1418
-
1419
- `setLocale` 只管前端文案。**后端下发的内容(插件名称、插件表单 schema 标签、接口报错)
1420
- 不受它影响**——bkflow 后端按 `blueking_language` Cookie(`zh-cn` / `en`)判定语言,
1421
- 不读 `Accept-Language` 请求头,宿主需自行设置该 Cookie。
1422
-
1423
- locale 非 `zh-cn` 时本包会改写 bkui-vue 的 `defaultRootConfig.locale` 以覆盖命令式
1424
- `Message` / `InfoBox`,**影响范围是整个宿主应用**。详见
1425
- [docs/usage.md 的国际化章节](./docs/usage.md#国际化)。
1426
-
1427
- 进阶用法:
1428
-
1429
- | API | 用途 |
1430
- | --- | --- |
1431
- | `registerMessages(locale, messages, options?)` | 深合并覆盖个别词条,或注册包内没有的新语言 |
1432
- | `setTranslator(fn)` | 完全接管翻译,桥接宿主已有的 i18n;返回 `undefined` 时回落包内词条 |
1433
- | `getLocale()` | 读取当前语言 |
1434
-
1435
- 注册新语言时可一并提供 bkui-vue 语言包:
1436
-
1437
- ```typescript
1438
- import { registerMessages } from '@blueking/bkflow-canvas-editor';
1439
- import jaMessages from './ja';
1440
- import { jp } from 'bkui-vue/lib/locale';
1441
-
1442
- registerMessages('ja', jaMessages, { bkuiLocale: jp });
1443
- ```
1444
-
1445
1405
  ## License
1446
1406
 
1447
1407
  MIT
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context-C3QIuIf6.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-iqnF_HqS.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,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-De9a4Qek.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-Bg6nsbrK.js";
2
2
  export {
3
3
  r as PLUGIN_GROUP_ICON_MAP,
4
4
  s as SOPS_PLUGIN_GROUP_NAME,