@fudanda/workflow 2.20261024.1-beta.1 → 2.20261107.1-beta.1
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/LICENSE +21 -21
- package/README.md +114 -114
- package/THIRD-PARTY-NOTICES.md +57 -57
- package/dist/{ai-markdown-esl-I5ck.js → ai-markdown--SqEglSn.js} +1 -2
- package/dist/chrome.js +46 -53
- package/dist/core.js +3 -3
- package/dist/flowgram-designer.d.ts +1 -1
- package/dist/graph-scope.d.ts +3 -3
- package/dist/{header-shortcuts-BQZuNfpA.js → header-shortcuts-BcwVJV2g.js} +1 -2
- package/dist/index.js +926 -1001
- package/dist/observation-types.d.ts +1 -1
- package/dist/prompt-kit.d.ts +1 -1
- package/dist/{schema-tree-CTM6hEdm.js → schema-tree-B4yoWS9A.js} +5 -10
- package/dist/{start-form-L6xw9phk.js → start-form-DWlAhZhs.js} +169 -335
- package/dist/styles.css +1 -1
- package/dist/templates.d.ts +1 -1
- package/dist/{test-input-validation-CkORPCfm.js → test-input-validation-Ch9pS4X8.js} +1 -2
- package/package.json +20 -17
- package/vendor/coze/LICENSE-APACHE +177 -177
- package/vendor/coze/UPSTREAM.json +8 -8
- package/vendor/coze/original/base-test-button.tsx +22 -22
- package/vendor/coze/original/comment-container.tsx +68 -68
- package/vendor/coze/original/condition-container.tsx +60 -60
- package/vendor/coze/original/condition-tag.tsx +58 -58
- package/vendor/coze/original/coze-global.less +234 -234
- package/vendor/coze/original/create-loop-function-json.ts +134 -134
- package/vendor/coze/original/create-loop-function.ts +56 -56
- package/vendor/coze/original/end-registry.ts +41 -41
- package/vendor/coze/original/execute-result-panel.less +97 -97
- package/vendor/coze/original/execute-result-panel.tsx +171 -171
- package/vendor/coze/original/form-item.less +39 -39
- package/vendor/coze/original/form-item.tsx +200 -200
- package/vendor/coze/original/http-api-field.tsx +42 -42
- package/vendor/coze/original/http-form-render.tsx +102 -102
- package/vendor/coze/original/icon-add.svg +3 -3
- package/vendor/coze/original/icon-arrow-left.svg +3 -3
- package/vendor/coze/original/icon-auto-layout.svg +18 -18
- package/vendor/coze/original/icon-code.svg +13 -13
- package/vendor/coze/original/icon-condition.svg +12 -12
- package/vendor/coze/original/icon-database.svg +18 -18
- package/vendor/coze/original/icon-delete.svg +5 -5
- package/vendor/coze/original/icon-fullscreen.svg +9 -9
- package/vendor/coze/original/icon-more.svg +11 -11
- package/vendor/coze/original/icon-play-round-outlined.svg +8 -8
- package/vendor/coze/original/icon-plugin-tool.svg +6 -6
- package/vendor/coze/original/icon-standard-copy.svg +8 -8
- package/vendor/coze/original/icon-unknown.svg +7 -7
- package/vendor/coze/original/icon-var.svg +6 -6
- package/vendor/coze/original/icon-workflow-end.svg +5 -5
- package/vendor/coze/original/icon-workflow-start.svg +5 -5
- package/vendor/coze/original/icon-workflow.svg +21 -21
- package/vendor/coze/original/icon-workflows.svg +5 -5
- package/vendor/coze/original/if-form-meta.tsx +88 -88
- package/vendor/coze/original/logic-display.tsx +33 -33
- package/vendor/coze/original/mouse-icon.tsx +35 -35
- package/vendor/coze/original/mouse-pad-selector.tsx +180 -180
- package/vendor/coze/original/node-card.tsx +77 -77
- package/vendor/coze/original/node-category-panel.less +4 -4
- package/vendor/coze/original/node-category-panel.tsx +53 -53
- package/vendor/coze/original/node-config-form.tsx +67 -67
- package/vendor/coze/original/node-header.less +165 -165
- package/vendor/coze/original/node-header.tsx +552 -552
- package/vendor/coze/original/node-panel.less +183 -183
- package/vendor/coze/original/node-render.less +20 -20
- package/vendor/coze/original/node-side-sheet.less +57 -57
- package/vendor/coze/original/node-side-sheet.tsx +214 -214
- package/vendor/coze/original/node-wrapper.tsx +71 -71
- package/vendor/coze/original/pad-icon.tsx +45 -45
- package/vendor/coze/original/resizable-side-panel-constants.ts +18 -18
- package/vendor/coze/original/resizable-side-panel.tsx +42 -42
- package/vendor/coze/original/start-registry.ts +53 -53
- package/vendor/coze/original/sub-canvas-background.less +4 -4
- package/vendor/coze/original/sub-canvas-background.tsx +48 -48
- package/vendor/coze/original/sub-canvas-container.less +16 -16
- package/vendor/coze/original/sub-canvas-container.tsx +97 -97
- package/vendor/coze/original/sub-canvas-header.less +75 -75
- package/vendor/coze/original/sub-canvas-header.tsx +95 -95
- package/vendor/coze/original/test-form-sheet-header.tsx +82 -82
- package/vendor/coze/original/test-form-sheet.less +178 -178
- package/vendor/coze/original/toolbar-add-node.tsx +68 -68
- package/vendor/coze/original/toolbar-auto-layout.tsx +61 -61
- package/vendor/coze/original/toolbar-comment.tsx +121 -121
- package/vendor/coze/original/toolbar-container.tsx +42 -42
- package/vendor/coze/original/toolbar-interactive.tsx +98 -98
- package/vendor/coze/original/toolbar-minimap-switch.tsx +41 -41
- package/vendor/coze/original/toolbar-tools.less +46 -46
- package/vendor/coze/original/toolbar-tools.tsx +89 -89
- package/vendor/coze/original/toolbar-zoom.tsx +134 -134
- package/vendor/coze/original/tree-variable-selector.less +291 -291
- package/vendor/coze/original/tree-variable-selector.tsx +298 -298
- package/vendor/coze/original/workflow-document-custom-options.ts +151 -151
- package/vendor/coze/original/workflow-header.less +65 -65
- package/vendor/coze/original/workflow-header.tsx +85 -85
- package/vendor/coze/source/agent-models/model-option/index.module.less +18 -18
- package/vendor/coze/source/agent-models/model-option/index.tsx +321 -321
- package/vendor/coze/source/agent-models/model-option-avatar/index.tsx +175 -175
- package/vendor/coze/source/agent-models/model-option-group/index.tsx +87 -87
- package/vendor/coze/source/agent-models/model-option-thumb/index.tsx +41 -41
- package/vendor/coze/source/agent-models/model-select-ui/index.tsx +238 -238
- package/vendor/coze/source/agent-models/popover-model-list-view/index.tsx +146 -146
- package/vendor/coze/source/components/code-editor/text-editor.tsx +71 -71
- package/vendor/coze/source/components/comment/components/editor/block.tsx +117 -117
- package/vendor/coze/source/components/comment/components/editor/leaf.tsx +64 -64
- package/vendor/coze/source/components/comment/components/toolbar.tsx +366 -366
- package/vendor/coze/source/components/comment/constant.ts +94 -94
- package/vendor/coze/source/components/editor-container/expand-editor/index.module.less +107 -107
- package/vendor/coze/source/components/editor-container/expand-editor/index.tsx +117 -117
- package/vendor/coze/source/components/model-select/components/model-setting.tsx +300 -300
- package/vendor/coze/source/components/model-select/components/settings.tsx +144 -144
- package/vendor/coze/source/components/model-select/index.module.less +34 -34
- package/vendor/coze/source/components/model-select/utils/index.tsx +100 -100
- package/vendor/coze/source/components/node-render/node-render-new/fields/constants.tsx +79 -79
- package/vendor/coze/source/components/node-render/node-render-new/fields/field-empty.module.less +12 -12
- package/vendor/coze/source/components/node-render/node-render-new/fields/field-empty.tsx +37 -37
- package/vendor/coze/source/components/node-render/node-render-new/fields/field.module.less +19 -19
- package/vendor/coze/source/components/node-render/node-render-new/fields/field.tsx +52 -52
- package/vendor/coze/source/components/node-render/node-render-new/fields/http-api-field/index.tsx +42 -42
- package/vendor/coze/source/components/node-render/node-render-new/fields/overflow-tag-list.module.less +47 -47
- package/vendor/coze/source/components/node-render/node-render-new/fields/overflow-tag-list.tsx +162 -162
- package/vendor/coze/source/components/node-render/node-render-new/fields/variable-tag-list.module.less +48 -48
- package/vendor/coze/source/components/node-render/node-render-new/fields/variable-tag-list.tsx +126 -126
- package/vendor/coze/source/components/node-wrapper/execute-result-panel/index.module.less +97 -97
- package/vendor/coze/source/components/node-wrapper/execute-result-panel/index.tsx +171 -171
- package/vendor/coze/source/components/sub-canvas/components/background/index.module.less +4 -4
- package/vendor/coze/source/components/sub-canvas/components/header/index.module.less +75 -75
- package/vendor/coze/source/components/test-run/test-run-button/single-node.tsx +158 -158
- package/vendor/coze/source/execution-panel/panel.module.less +48 -48
- package/vendor/coze/source/execution-panel/panel.tsx +99 -99
- package/vendor/coze/source/execution-panel/use-resize.ts +79 -79
- package/vendor/coze/source/external/features/log/components/data-viewer/constants.ts +28 -28
- package/vendor/coze/source/external/features/log/components/data-viewer/context/context.ts +21 -21
- package/vendor/coze/source/external/features/log/components/data-viewer/context/create-store.ts +48 -48
- package/vendor/coze/source/external/features/log/components/data-viewer/context/index.ts +19 -19
- package/vendor/coze/source/external/features/log/components/data-viewer/context/provider.tsx +50 -50
- package/vendor/coze/source/external/features/log/components/data-viewer/data-viewer.module.less +26 -26
- package/vendor/coze/source/external/features/log/components/data-viewer/data-viewer.tsx +79 -79
- package/vendor/coze/source/external/features/log/components/data-viewer/hooks/index.ts +18 -18
- package/vendor/coze/source/external/features/log/components/data-viewer/hooks/use-data-viewer-store.ts +29 -29
- package/vendor/coze/source/external/features/log/components/data-viewer/hooks/use-expand.ts +35 -35
- package/vendor/coze/source/external/features/log/components/data-viewer/hooks/use-value.tsx +66 -66
- package/vendor/coze/source/external/features/log/components/data-viewer/index.tsx +21 -21
- package/vendor/coze/source/external/features/log/components/data-viewer/json-field/index.tsx +186 -186
- package/vendor/coze/source/external/features/log/components/data-viewer/json-field/json-field.module.less +79 -79
- package/vendor/coze/source/external/features/log/components/data-viewer/types.ts +50 -50
- package/vendor/coze/source/external/features/log/components/data-viewer/utils/big-number.ts +35 -35
- package/vendor/coze/source/external/features/log/components/data-viewer/utils/generate-field.ts +104 -104
- package/vendor/coze/source/external/features/log/components/log-parser/log-wrap.module.less +27 -27
- package/vendor/coze/source/external/features/log/components/log-parser/log-wrap.tsx +109 -109
- package/vendor/coze/source/external/features/log/components/node-status-bar/node-status-bar.module.less +52 -52
- package/vendor/coze/source/external/features/log/components/node-status-bar/node-status-bar.tsx +113 -113
- package/vendor/coze/source/form/components/field-empty.tsx +45 -45
- package/vendor/coze/source/form/components/section.tsx +91 -91
- package/vendor/coze/source/form-extensions/components/add-item-button/index.tsx +64 -64
- package/vendor/coze/source/form-extensions/components/form-card/index.module.less +131 -131
- package/vendor/coze/source/form-extensions/components/form-card/index.tsx +309 -309
- package/vendor/coze/source/form-extensions/components/form-item/index.module.less +39 -39
- package/vendor/coze/source/form-extensions/components/form-item/index.tsx +200 -200
- package/vendor/coze/source/form-extensions/components/form-item-feedback/index.module.less +7 -7
- package/vendor/coze/source/form-extensions/components/form-item-feedback/index.tsx +39 -39
- package/vendor/coze/source/form-extensions/components/level-line/index.module.less +346 -346
- package/vendor/coze/source/form-extensions/components/level-line/index.ts +17 -17
- package/vendor/coze/source/form-extensions/components/level-line/level-line.tsx +460 -460
- package/vendor/coze/source/form-extensions/components/level-line/types.ts +38 -38
- package/vendor/coze/source/form-extensions/components/level-line/utils.ts +60 -60
- package/vendor/coze/source/form-extensions/components/literal-value-input/constants.ts +61 -61
- package/vendor/coze/source/form-extensions/components/literal-value-input/input-boolean.tsx +80 -80
- package/vendor/coze/source/form-extensions/components/literal-value-input/input-integer.tsx +68 -68
- package/vendor/coze/source/form-extensions/components/literal-value-input/input-number.tsx +62 -62
- package/vendor/coze/source/form-extensions/components/literal-value-input/input-select.tsx +59 -59
- package/vendor/coze/source/form-extensions/components/literal-value-input/input-string.tsx +55 -55
- package/vendor/coze/source/form-extensions/components/literal-value-input/literal-value-input.tsx +35 -35
- package/vendor/coze/source/form-extensions/components/literal-value-input/styles.module.less +46 -46
- package/vendor/coze/source/form-extensions/components/literal-value-input/type.ts +61 -61
- package/vendor/coze/source/form-extensions/components/literal-value-input/utils.tsx +117 -117
- package/vendor/coze/source/form-extensions/components/node-header/components/close-button.tsx +44 -44
- package/vendor/coze/source/form-extensions/components/node-header/description-display.tsx +52 -52
- package/vendor/coze/source/form-extensions/components/node-header/description.tsx +131 -131
- package/vendor/coze/source/form-extensions/components/node-header/index.module.less +165 -165
- package/vendor/coze/source/form-extensions/components/node-header/index.tsx +552 -552
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-btn/index.tsx +43 -43
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-content/default-value-input.tsx +276 -276
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-content/index.module.less +124 -124
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-content/index.tsx +131 -131
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/expand-content/types.ts +32 -32
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-name/index.module.less +38 -38
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-name/index.tsx +101 -101
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-operator/index.module.less +51 -51
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-operator/index.tsx +107 -107
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-required/index.module.less +17 -17
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-required/index.tsx +53 -53
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-type/constants.tsx +77 -77
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-type/index.module.less +97 -97
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/components/param-type/index.tsx +155 -155
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/constants.ts +38 -38
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/index.module.less +138 -138
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/index.tsx +360 -360
- package/vendor/coze/source/form-extensions/components/output-tree/components/custom-tree-node/type.ts +88 -88
- package/vendor/coze/source/form-extensions/components/output-tree/components/header/index.module.less +36 -36
- package/vendor/coze/source/form-extensions/components/output-tree/components/header/index.tsx +104 -104
- package/vendor/coze/source/form-extensions/components/output-tree/constants.ts +22 -22
- package/vendor/coze/source/form-extensions/components/output-tree/context.ts +28 -28
- package/vendor/coze/source/form-extensions/components/output-tree/hooks/use-columns-style.ts +39 -39
- package/vendor/coze/source/form-extensions/components/output-tree/index.module.less +83 -83
- package/vendor/coze/source/form-extensions/components/output-tree/index.tsx +692 -692
- package/vendor/coze/source/form-extensions/components/output-tree/utils.ts +185 -185
- package/vendor/coze/source/form-extensions/components/setting-on-error/components/process-type/index.tsx +97 -97
- package/vendor/coze/source/form-extensions/components/setting-on-error/components/process-type/option-item.tsx +30 -30
- package/vendor/coze/source/form-extensions/components/setting-on-error/components/process-type/types.ts +23 -23
- package/vendor/coze/source/form-extensions/components/setting-on-error/components/retry-times/index.tsx +45 -45
- package/vendor/coze/source/form-extensions/components/setting-on-error/components/timeout/index.tsx +102 -102
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/composite-select-option.tsx +167 -167
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/composite-select-tree-panel.tsx +165 -165
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/composite-select.module.less +96 -96
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/composite-select.tsx +265 -265
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/context.tsx +42 -42
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/expand-icon.tsx +30 -30
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/index.module.less +291 -291
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/node-variable-tree.module.less +48 -48
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/node-variable-tree.tsx +149 -149
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/utils.tsx +500 -500
- package/vendor/coze/source/form-extensions/components/tree-variable-selector/value-display.tsx +130 -130
- package/vendor/coze/source/form-extensions/components/value-expression-input/const.ts +68 -68
- package/vendor/coze/source/form-extensions/components/value-expression-input/context.ts +27 -27
- package/vendor/coze/source/form-extensions/components/value-expression-input/index.module.less +144 -144
- package/vendor/coze/source/form-extensions/components/value-expression-input/value-expression-input.tsx +418 -418
- package/vendor/coze/source/form-extensions/components/variable-type-selector/constants.tsx +77 -77
- package/vendor/coze/source/form-extensions/components/variable-type-selector/index.module.less +31 -31
- package/vendor/coze/source/form-extensions/components/variable-type-selector/index.tsx +17 -17
- package/vendor/coze/source/form-extensions/components/variable-type-selector/utils.tsx +298 -298
- package/vendor/coze/source/form-extensions/components/variable-type-selector/variable-type-selector.tsx +235 -235
- package/vendor/coze/source/form-extensions/components/variable-type-tag/index.tsx +54 -54
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-branch.module.less +9 -9
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-branch.tsx +249 -249
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-header.tsx +50 -50
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-item-logic.module.less +13 -13
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-item-logic.tsx +73 -73
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/delete/index.module.less +10 -10
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/delete/index.tsx +42 -42
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/index.module.less +9 -9
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/index.tsx +254 -254
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/operator/index.module.less +7 -7
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/operator/index.tsx +144 -144
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/condition-params-item/value-expression-with-state/index.tsx +69 -69
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/context.ts +36 -36
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/condition-branch-preview.tsx +44 -44
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/condition-branch.tsx +152 -152
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/container.tsx +19 -19
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/custom-drag-layer.tsx +117 -117
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/draggable/types.ts +18 -18
- package/vendor/coze/source/form-extensions/setters/condition/multi-condition/types.ts +58 -58
- package/vendor/coze/source/node-registries/end/components/terminate-plan-field.tsx +29 -29
- package/vendor/coze/source/node-registries/end/constants.ts +34 -34
- package/vendor/coze/source/node-registries/end/form.tsx +66 -66
- package/vendor/coze/source/node-registries/end/types.ts +45 -45
- package/vendor/coze/source/node-registries/http/components/base-editor/raw-text-editor.tsx +80 -80
- package/vendor/coze/source/node-registries/http/constants.ts +80 -80
- package/vendor/coze/source/node-registries/http/fields/json-import-editor/index.module.less +191 -191
- package/vendor/coze/source/node-registries/http/fields/json-import-editor/json-import-components/json-expand-editor.tsx +141 -141
- package/vendor/coze/source/node-registries/http/fields/json-import-editor/json-import-components/json-import.tsx +99 -99
- package/vendor/coze/source/node-registries/http/form-render.tsx +102 -102
- package/vendor/coze/source/node-registries/http/setters/api/curl-expand-editor.tsx +161 -161
- package/vendor/coze/source/node-registries/http/setters/api/curl-import.tsx +96 -96
- package/vendor/coze/source/node-registries/http/setters/api/index.module.less +199 -199
- package/vendor/coze/source/node-registries/http/setters/api/index.tsx +149 -149
- package/vendor/coze/source/node-registries/http/setters/api/utils.ts +41 -41
- package/vendor/coze/source/node-registries/http/setters/body/index.tsx +201 -201
- package/vendor/coze/source/node-registries/http/setters/constants.ts +83 -83
- package/vendor/coze/source/node-registries/if/components/else/index.tsx +41 -41
- package/vendor/coze/source/node-registries/intent/components/intents/index.module.less +14 -14
- package/vendor/coze/source/node-registries/intent/components/intents/option-item/index.tsx +189 -189
- package/vendor/coze/source/node-registries/json-stringify/constants.ts +32 -32
- package/vendor/coze/source/node-registries/json-stringify/form.tsx +46 -46
- package/vendor/coze/source/node-registries/loop/constants.ts +43 -43
- package/vendor/coze/source/node-registries/loop/loop-fields/loop-settings-section/index.tsx +48 -48
- package/vendor/coze/source/node-registries/loop/loop-fields/loop-type/index.tsx +81 -81
- package/vendor/coze/source/node-registries/loop/loop-fields/loop-type/options.ts +34 -34
- package/vendor/coze/source/node-registries/start/form.tsx +209 -209
- package/vendor/coze/source/node-registries/text-process/components/method-selector/index.tsx +46 -46
- package/vendor/coze/source/node-registries/text-process/constants.ts +132 -132
- package/vendor/coze/source/nodes-v2/components/form-item-feedback/index.module.less +7 -7
- package/vendor/coze/source/nodes-v2/components/form-item-feedback/index.tsx +47 -47
- package/vendor/coze/source/nodes-v2/components/system-prompt/index.module.less +66 -66
- package/vendor/coze/source/nodes-v2/components/system-prompt/prompt-kit-bar.tsx +129 -129
- package/vendor/coze/source/nodes-v2/components/system-prompt/system-prompt-editor.tsx +110 -110
- package/vendor/coze/source/nodes-v2/llm/user-prompt/index.tsx +64 -64
- package/vendor/coze/source/prompt-kit/input-config-popover/index.tsx +80 -80
- package/vendor/coze/source/prompt-kit/input-slot-widget/index.css +34 -34
- package/vendor/coze/source/prompt-kit/input-slot-widget/index.ts +169 -169
- package/vendor/coze/source/prompt-kit/library-item.tsx +141 -141
- package/vendor/coze/source/prompt-kit/prompt-info-input.tsx +90 -90
- package/vendor/coze/source/ui-components/add-operation/index.module.less +19 -19
- package/vendor/coze/source/ui-components/add-operation/index.tsx +67 -67
- package/vendor/coze/source/ui-components/auto-size-tooltip/index.module.less +39 -39
- package/vendor/coze/source/ui-components/auto-size-tooltip/index.tsx +74 -74
- package/vendor/coze/source/ui-components/workflow-sl-input/index.module.less +36 -36
- package/vendor/coze/source/ui-components/workflow-sl-input/index.tsx +194 -194
- package/vendor/coze/source/utils/create-slots/index.tsx +126 -126
- package/vendor/coze/source/utils/create-slots/use-force-update.ts +23 -23
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 coze-dev Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
export interface LineData {
|
|
18
|
-
children?: LineData[];
|
|
19
|
-
helpLineShow?: unknown[];
|
|
20
|
-
isLast?: boolean;
|
|
21
|
-
isFirst?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export enum LineShowResult {
|
|
25
|
-
HalfTopRoot,
|
|
26
|
-
HalfTopRootWithChildren,
|
|
27
|
-
HalfBottomRoot,
|
|
28
|
-
HalfBottomRootWithChildren,
|
|
29
|
-
FullRoot,
|
|
30
|
-
FullRootWithChildren,
|
|
31
|
-
HalfTopChild,
|
|
32
|
-
HalfTopChildWithChildren,
|
|
33
|
-
FullChild,
|
|
34
|
-
FullChildWithChildren,
|
|
35
|
-
EmptyBlock,
|
|
36
|
-
HelpLineBlock,
|
|
37
|
-
RootWithChildren,
|
|
38
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 coze-dev Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface LineData {
|
|
18
|
+
children?: LineData[];
|
|
19
|
+
helpLineShow?: unknown[];
|
|
20
|
+
isLast?: boolean;
|
|
21
|
+
isFirst?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum LineShowResult {
|
|
25
|
+
HalfTopRoot,
|
|
26
|
+
HalfTopRootWithChildren,
|
|
27
|
+
HalfBottomRoot,
|
|
28
|
+
HalfBottomRootWithChildren,
|
|
29
|
+
FullRoot,
|
|
30
|
+
FullRootWithChildren,
|
|
31
|
+
HalfTopChild,
|
|
32
|
+
HalfTopChildWithChildren,
|
|
33
|
+
FullChild,
|
|
34
|
+
FullChildWithChildren,
|
|
35
|
+
EmptyBlock,
|
|
36
|
+
HelpLineBlock,
|
|
37
|
+
RootWithChildren,
|
|
38
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 coze-dev Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { LineShowResult, type LineData } from './types';
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line complexity
|
|
20
|
-
export function getLineShowResult<Data extends LineData>({
|
|
21
|
-
level,
|
|
22
|
-
data,
|
|
23
|
-
}: {
|
|
24
|
-
level: number;
|
|
25
|
-
data: Data;
|
|
26
|
-
}): Array<LineShowResult> {
|
|
27
|
-
const isRootWithChildren = level === 0 && (data.children || []).length > 0;
|
|
28
|
-
const isRootWithoutChildren =
|
|
29
|
-
level === 0 && (data.children || []).length === 0;
|
|
30
|
-
const isChildWithChildren = level > 0 && (data.children || []).length > 0;
|
|
31
|
-
const isChildWithoutChildren =
|
|
32
|
-
level > 0 && (data.children || []).length === 0;
|
|
33
|
-
const res: Array<LineShowResult> = (data.helpLineShow || []).map(item =>
|
|
34
|
-
item ? LineShowResult.HelpLineBlock : LineShowResult.EmptyBlock,
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
if (isRootWithChildren) {
|
|
38
|
-
res.push(LineShowResult.RootWithChildren);
|
|
39
|
-
} else if (!isRootWithoutChildren) {
|
|
40
|
-
// The root node does not need a display line, only non-root nodes need auxiliary lines.
|
|
41
|
-
if (isChildWithChildren) {
|
|
42
|
-
if (data.isLast) {
|
|
43
|
-
res.push(LineShowResult.HalfTopChildWithChildren);
|
|
44
|
-
} else if (data.isFirst) {
|
|
45
|
-
res.push(LineShowResult.FullChildWithChildren);
|
|
46
|
-
} else {
|
|
47
|
-
res.push(LineShowResult.FullChildWithChildren);
|
|
48
|
-
}
|
|
49
|
-
} else if (isChildWithoutChildren) {
|
|
50
|
-
if (data.isLast) {
|
|
51
|
-
res.push(LineShowResult.HalfTopChild);
|
|
52
|
-
} else if (data.isFirst) {
|
|
53
|
-
res.push(LineShowResult.FullChild);
|
|
54
|
-
} else {
|
|
55
|
-
res.push(LineShowResult.FullChild);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return res;
|
|
60
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 coze-dev Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { LineShowResult, type LineData } from './types';
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line complexity
|
|
20
|
+
export function getLineShowResult<Data extends LineData>({
|
|
21
|
+
level,
|
|
22
|
+
data,
|
|
23
|
+
}: {
|
|
24
|
+
level: number;
|
|
25
|
+
data: Data;
|
|
26
|
+
}): Array<LineShowResult> {
|
|
27
|
+
const isRootWithChildren = level === 0 && (data.children || []).length > 0;
|
|
28
|
+
const isRootWithoutChildren =
|
|
29
|
+
level === 0 && (data.children || []).length === 0;
|
|
30
|
+
const isChildWithChildren = level > 0 && (data.children || []).length > 0;
|
|
31
|
+
const isChildWithoutChildren =
|
|
32
|
+
level > 0 && (data.children || []).length === 0;
|
|
33
|
+
const res: Array<LineShowResult> = (data.helpLineShow || []).map(item =>
|
|
34
|
+
item ? LineShowResult.HelpLineBlock : LineShowResult.EmptyBlock,
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
if (isRootWithChildren) {
|
|
38
|
+
res.push(LineShowResult.RootWithChildren);
|
|
39
|
+
} else if (!isRootWithoutChildren) {
|
|
40
|
+
// The root node does not need a display line, only non-root nodes need auxiliary lines.
|
|
41
|
+
if (isChildWithChildren) {
|
|
42
|
+
if (data.isLast) {
|
|
43
|
+
res.push(LineShowResult.HalfTopChildWithChildren);
|
|
44
|
+
} else if (data.isFirst) {
|
|
45
|
+
res.push(LineShowResult.FullChildWithChildren);
|
|
46
|
+
} else {
|
|
47
|
+
res.push(LineShowResult.FullChildWithChildren);
|
|
48
|
+
}
|
|
49
|
+
} else if (isChildWithoutChildren) {
|
|
50
|
+
if (data.isLast) {
|
|
51
|
+
res.push(LineShowResult.HalfTopChild);
|
|
52
|
+
} else if (data.isFirst) {
|
|
53
|
+
res.push(LineShowResult.FullChild);
|
|
54
|
+
} else {
|
|
55
|
+
res.push(LineShowResult.FullChild);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return res;
|
|
60
|
+
}
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 coze-dev Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { memo } from 'react';
|
|
18
|
-
|
|
19
|
-
import { ViewVariableType } from '@coze-workflow/base';
|
|
20
|
-
|
|
21
|
-
import { type InputComponentRegistry } from './type';
|
|
22
|
-
import { InputTime } from './input-time';
|
|
23
|
-
import { InputString } from './input-string';
|
|
24
|
-
import { InputSelect } from './input-select';
|
|
25
|
-
import { InputNumber } from './input-number';
|
|
26
|
-
import { InputJson } from './input-json';
|
|
27
|
-
import { InputInteger } from './input-integer';
|
|
28
|
-
import { InputBoolean } from './input-boolean';
|
|
29
|
-
|
|
30
|
-
export const DEFAULT_COMPONENT_REGISTRY: InputComponentRegistry[] = [
|
|
31
|
-
{
|
|
32
|
-
canHandle: ViewVariableType.String,
|
|
33
|
-
component: memo(InputString),
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
canHandle: ViewVariableType.Number,
|
|
37
|
-
component: memo(InputNumber),
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
canHandle: ViewVariableType.Integer,
|
|
41
|
-
component: memo(InputInteger),
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
canHandle: ViewVariableType.Boolean,
|
|
45
|
-
component: memo(InputBoolean),
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
canHandle: ViewVariableType.Time,
|
|
49
|
-
component: memo(InputTime),
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
canHandle: inputType => ViewVariableType.isJSONInputType(inputType),
|
|
53
|
-
component: memo(InputJson),
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
canHandle: (inputType, optionsList) =>
|
|
57
|
-
[ViewVariableType.String, ViewVariableType.Integer].includes(inputType) &&
|
|
58
|
-
(optionsList ?? []).length > 0,
|
|
59
|
-
component: memo(InputSelect),
|
|
60
|
-
},
|
|
61
|
-
];
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 coze-dev Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { memo } from 'react';
|
|
18
|
+
|
|
19
|
+
import { ViewVariableType } from '@coze-workflow/base';
|
|
20
|
+
|
|
21
|
+
import { type InputComponentRegistry } from './type';
|
|
22
|
+
import { InputTime } from './input-time';
|
|
23
|
+
import { InputString } from './input-string';
|
|
24
|
+
import { InputSelect } from './input-select';
|
|
25
|
+
import { InputNumber } from './input-number';
|
|
26
|
+
import { InputJson } from './input-json';
|
|
27
|
+
import { InputInteger } from './input-integer';
|
|
28
|
+
import { InputBoolean } from './input-boolean';
|
|
29
|
+
|
|
30
|
+
export const DEFAULT_COMPONENT_REGISTRY: InputComponentRegistry[] = [
|
|
31
|
+
{
|
|
32
|
+
canHandle: ViewVariableType.String,
|
|
33
|
+
component: memo(InputString),
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
canHandle: ViewVariableType.Number,
|
|
37
|
+
component: memo(InputNumber),
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
canHandle: ViewVariableType.Integer,
|
|
41
|
+
component: memo(InputInteger),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
canHandle: ViewVariableType.Boolean,
|
|
45
|
+
component: memo(InputBoolean),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
canHandle: ViewVariableType.Time,
|
|
49
|
+
component: memo(InputTime),
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
canHandle: inputType => ViewVariableType.isJSONInputType(inputType),
|
|
53
|
+
component: memo(InputJson),
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
canHandle: (inputType, optionsList) =>
|
|
57
|
+
[ViewVariableType.String, ViewVariableType.Integer].includes(inputType) &&
|
|
58
|
+
(optionsList ?? []).length > 0,
|
|
59
|
+
component: memo(InputSelect),
|
|
60
|
+
},
|
|
61
|
+
];
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 coze-dev Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { type FC, useRef } from 'react';
|
|
18
|
-
|
|
19
|
-
import { I18n } from '@coze-arch/i18n';
|
|
20
|
-
import { Select } from '@coze-arch/coze-design';
|
|
21
|
-
|
|
22
|
-
import { type LiteralValueInputProps } from './type';
|
|
23
|
-
|
|
24
|
-
import styles from './styles.module.less';
|
|
25
|
-
export const InputBoolean: FC<LiteralValueInputProps> = ({
|
|
26
|
-
value,
|
|
27
|
-
defaultValue,
|
|
28
|
-
disabled,
|
|
29
|
-
testId,
|
|
30
|
-
onChange,
|
|
31
|
-
onBlur,
|
|
32
|
-
onFocus,
|
|
33
|
-
placeholder,
|
|
34
|
-
validateStatus,
|
|
35
|
-
style,
|
|
36
|
-
className,
|
|
37
|
-
}) => {
|
|
38
|
-
const val = defaultValue ?? value;
|
|
39
|
-
const valueRef = useRef(val as boolean | undefined | null);
|
|
40
|
-
const handleChange = newVal => {
|
|
41
|
-
if (newVal) {
|
|
42
|
-
const parsed = JSON.parse(newVal || 'false') as boolean;
|
|
43
|
-
onChange?.(parsed);
|
|
44
|
-
valueRef.current = parsed;
|
|
45
|
-
} else {
|
|
46
|
-
onChange?.(null);
|
|
47
|
-
valueRef.current = null;
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
return (
|
|
51
|
-
<div className={styles['input-boolean-wrapper']}>
|
|
52
|
-
<Select
|
|
53
|
-
className={className}
|
|
54
|
-
data-testid={testId}
|
|
55
|
-
placeholder={
|
|
56
|
-
placeholder || I18n.t('workflow_detail_node_input_entervalue')
|
|
57
|
-
}
|
|
58
|
-
size="small"
|
|
59
|
-
optionList={[
|
|
60
|
-
{
|
|
61
|
-
label: 'true',
|
|
62
|
-
value: 'true',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: 'false',
|
|
66
|
-
value: 'false',
|
|
67
|
-
},
|
|
68
|
-
]}
|
|
69
|
-
showClear
|
|
70
|
-
defaultValue={val !== undefined ? JSON.stringify(val) : undefined}
|
|
71
|
-
disabled={disabled}
|
|
72
|
-
validateStatus={validateStatus}
|
|
73
|
-
onChange={handleChange}
|
|
74
|
-
onFocus={onFocus}
|
|
75
|
-
onBlur={() => onBlur?.(valueRef.current)}
|
|
76
|
-
style={style}
|
|
77
|
-
/>
|
|
78
|
-
</div>
|
|
79
|
-
);
|
|
80
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 coze-dev Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { type FC, useRef } from 'react';
|
|
18
|
+
|
|
19
|
+
import { I18n } from '@coze-arch/i18n';
|
|
20
|
+
import { Select } from '@coze-arch/coze-design';
|
|
21
|
+
|
|
22
|
+
import { type LiteralValueInputProps } from './type';
|
|
23
|
+
|
|
24
|
+
import styles from './styles.module.less';
|
|
25
|
+
export const InputBoolean: FC<LiteralValueInputProps> = ({
|
|
26
|
+
value,
|
|
27
|
+
defaultValue,
|
|
28
|
+
disabled,
|
|
29
|
+
testId,
|
|
30
|
+
onChange,
|
|
31
|
+
onBlur,
|
|
32
|
+
onFocus,
|
|
33
|
+
placeholder,
|
|
34
|
+
validateStatus,
|
|
35
|
+
style,
|
|
36
|
+
className,
|
|
37
|
+
}) => {
|
|
38
|
+
const val = defaultValue ?? value;
|
|
39
|
+
const valueRef = useRef(val as boolean | undefined | null);
|
|
40
|
+
const handleChange = newVal => {
|
|
41
|
+
if (newVal) {
|
|
42
|
+
const parsed = JSON.parse(newVal || 'false') as boolean;
|
|
43
|
+
onChange?.(parsed);
|
|
44
|
+
valueRef.current = parsed;
|
|
45
|
+
} else {
|
|
46
|
+
onChange?.(null);
|
|
47
|
+
valueRef.current = null;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return (
|
|
51
|
+
<div className={styles['input-boolean-wrapper']}>
|
|
52
|
+
<Select
|
|
53
|
+
className={className}
|
|
54
|
+
data-testid={testId}
|
|
55
|
+
placeholder={
|
|
56
|
+
placeholder || I18n.t('workflow_detail_node_input_entervalue')
|
|
57
|
+
}
|
|
58
|
+
size="small"
|
|
59
|
+
optionList={[
|
|
60
|
+
{
|
|
61
|
+
label: 'true',
|
|
62
|
+
value: 'true',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'false',
|
|
66
|
+
value: 'false',
|
|
67
|
+
},
|
|
68
|
+
]}
|
|
69
|
+
showClear
|
|
70
|
+
defaultValue={val !== undefined ? JSON.stringify(val) : undefined}
|
|
71
|
+
disabled={disabled}
|
|
72
|
+
validateStatus={validateStatus}
|
|
73
|
+
onChange={handleChange}
|
|
74
|
+
onFocus={onFocus}
|
|
75
|
+
onBlur={() => onBlur?.(valueRef.current)}
|
|
76
|
+
style={style}
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 coze-dev Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { type FC } from 'react';
|
|
18
|
-
|
|
19
|
-
import classNames from 'classnames';
|
|
20
|
-
import { I18n } from '@coze-arch/i18n';
|
|
21
|
-
import { CozInputNumber } from '@coze-arch/coze-design';
|
|
22
|
-
|
|
23
|
-
import { type LiteralValueInputProps } from './type';
|
|
24
|
-
|
|
25
|
-
import styles from './styles.module.less';
|
|
26
|
-
export const InputInteger: FC<LiteralValueInputProps> = ({
|
|
27
|
-
className,
|
|
28
|
-
value,
|
|
29
|
-
defaultValue,
|
|
30
|
-
disabled,
|
|
31
|
-
testId,
|
|
32
|
-
onChange,
|
|
33
|
-
onBlur,
|
|
34
|
-
onFocus,
|
|
35
|
-
placeholder,
|
|
36
|
-
validateStatus,
|
|
37
|
-
config = {},
|
|
38
|
-
style,
|
|
39
|
-
}) => {
|
|
40
|
-
const { min, max } = config;
|
|
41
|
-
return (
|
|
42
|
-
<CozInputNumber
|
|
43
|
-
className={classNames(className, styles['input-number'])}
|
|
44
|
-
data-testid={testId}
|
|
45
|
-
disabled={disabled}
|
|
46
|
-
defaultValue={defaultValue as number}
|
|
47
|
-
value={value as number}
|
|
48
|
-
onChange={onChange}
|
|
49
|
-
onBlur={e => {
|
|
50
|
-
// Get the rounded value
|
|
51
|
-
setTimeout(() => {
|
|
52
|
-
onBlur?.(e.target.value);
|
|
53
|
-
}, 15);
|
|
54
|
-
}}
|
|
55
|
-
onFocus={onFocus}
|
|
56
|
-
placeholder={
|
|
57
|
-
placeholder || I18n.t('workflow_detail_node_input_selectvalue')
|
|
58
|
-
}
|
|
59
|
-
precision={0.1}
|
|
60
|
-
validateStatus={validateStatus}
|
|
61
|
-
style={style}
|
|
62
|
-
min={min}
|
|
63
|
-
max={max}
|
|
64
|
-
size="small"
|
|
65
|
-
hideButtons
|
|
66
|
-
/>
|
|
67
|
-
);
|
|
68
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 coze-dev Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { type FC } from 'react';
|
|
18
|
+
|
|
19
|
+
import classNames from 'classnames';
|
|
20
|
+
import { I18n } from '@coze-arch/i18n';
|
|
21
|
+
import { CozInputNumber } from '@coze-arch/coze-design';
|
|
22
|
+
|
|
23
|
+
import { type LiteralValueInputProps } from './type';
|
|
24
|
+
|
|
25
|
+
import styles from './styles.module.less';
|
|
26
|
+
export const InputInteger: FC<LiteralValueInputProps> = ({
|
|
27
|
+
className,
|
|
28
|
+
value,
|
|
29
|
+
defaultValue,
|
|
30
|
+
disabled,
|
|
31
|
+
testId,
|
|
32
|
+
onChange,
|
|
33
|
+
onBlur,
|
|
34
|
+
onFocus,
|
|
35
|
+
placeholder,
|
|
36
|
+
validateStatus,
|
|
37
|
+
config = {},
|
|
38
|
+
style,
|
|
39
|
+
}) => {
|
|
40
|
+
const { min, max } = config;
|
|
41
|
+
return (
|
|
42
|
+
<CozInputNumber
|
|
43
|
+
className={classNames(className, styles['input-number'])}
|
|
44
|
+
data-testid={testId}
|
|
45
|
+
disabled={disabled}
|
|
46
|
+
defaultValue={defaultValue as number}
|
|
47
|
+
value={value as number}
|
|
48
|
+
onChange={onChange}
|
|
49
|
+
onBlur={e => {
|
|
50
|
+
// Get the rounded value
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
onBlur?.(e.target.value);
|
|
53
|
+
}, 15);
|
|
54
|
+
}}
|
|
55
|
+
onFocus={onFocus}
|
|
56
|
+
placeholder={
|
|
57
|
+
placeholder || I18n.t('workflow_detail_node_input_selectvalue')
|
|
58
|
+
}
|
|
59
|
+
precision={0.1}
|
|
60
|
+
validateStatus={validateStatus}
|
|
61
|
+
style={style}
|
|
62
|
+
min={min}
|
|
63
|
+
max={max}
|
|
64
|
+
size="small"
|
|
65
|
+
hideButtons
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
};
|