@huanban/rulego-editor-react 1.3.2 → 1.3.4
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 +13 -0
- package/dist/components/WorkflowInfoPanel.d.ts +2 -0
- package/dist/index.cjs.js +383 -383
- package/dist/index.esm.js +13761 -13762
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -228,6 +228,19 @@ function InfoPage({ workflow }) {
|
|
|
228
228
|
| `fetcher` | `WorkflowFetcher` | ❌ | 自定义请求适配器,传入后忽略 `apiBase` |
|
|
229
229
|
| `icons` | `WorkflowInfoIcons` | ❌ | 自定义图标 |
|
|
230
230
|
| `theme` | `WorkflowTheme` | ❌ | 自定义主题色 |
|
|
231
|
+
| `showMaintenance` | `boolean` | ❌ | 显示维护验证扩展 Tab,默认 `false` |
|
|
232
|
+
|
|
233
|
+
`showMaintenance` 是扩展能力,不是默认工作流详情的一部分。只有宿主后端已经实现 `validate-upstream`、`schema-diff`、`repair-plan`、`patch-preview` 这组分析接口时才建议开启:
|
|
234
|
+
|
|
235
|
+
```tsx
|
|
236
|
+
<WorkflowInfoPanel
|
|
237
|
+
apiBase={apiBase}
|
|
238
|
+
workflow={workflow}
|
|
239
|
+
showMaintenance
|
|
240
|
+
/>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
如果后台没有这些接口,保持默认关闭,避免用户点击后出现 `404 Not Found`。
|
|
231
244
|
|
|
232
245
|
---
|
|
233
246
|
|
|
@@ -40,6 +40,8 @@ export interface WorkflowInfoPanelProps {
|
|
|
40
40
|
icons?: Partial<WorkflowInfoIcons>;
|
|
41
41
|
/** 默认激活的 Tab,默认 'base' */
|
|
42
42
|
defaultTab?: string;
|
|
43
|
+
/** 显示维护验证扩展 Tab;该能力依赖宿主后端提供 validate-upstream/schema-diff/repair-plan/patch-preview 扩展接口,默认关闭 */
|
|
44
|
+
showMaintenance?: boolean;
|
|
43
45
|
/** 替换基础信息面板 */
|
|
44
46
|
renderBaseInfo?: (workflow: WorkflowItem, defaultPanel: React.ReactNode) => React.ReactNode;
|
|
45
47
|
/** 替换变量/秘钥面板 */
|