@agentscope-ai/flow 0.0.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/README.zh-CN.md +67 -0
- package/dist/components/base-node/index.d.ts +27 -0
- package/dist/components/base-node/index.js +320 -0
- package/dist/components/base-node/index.less +258 -0
- package/dist/components/branch-title-header/index.d.ts +12 -0
- package/dist/components/branch-title-header/index.js +176 -0
- package/dist/components/branch-title-header/index.less +28 -0
- package/dist/components/check-list-btn/index.d.ts +4 -0
- package/dist/components/check-list-btn/index.js +144 -0
- package/dist/components/check-list-btn/index.less +113 -0
- package/dist/components/code-input/index.d.ts +24 -0
- package/dist/components/code-input/index.js +356 -0
- package/dist/components/code-input/index.less +87 -0
- package/dist/components/condition-item/index.d.ts +13 -0
- package/dist/components/condition-item/index.js +185 -0
- package/dist/components/condition-item/index.less +23 -0
- package/dist/components/custom-connection-line/index.d.ts +4 -0
- package/dist/components/custom-connection-line/index.js +28 -0
- package/dist/components/custom-handle/source-handle.d.ts +10 -0
- package/dist/components/custom-handle/source-handle.js +45 -0
- package/dist/components/custom-handle/target-handle.d.ts +6 -0
- package/dist/components/custom-handle/target-handle.js +21 -0
- package/dist/components/custom-inputs-control/index.d.ts +56 -0
- package/dist/components/custom-inputs-control/index.js +366 -0
- package/dist/components/custom-inputs-control/index.less +28 -0
- package/dist/components/custom-outputs-form/index.d.ts +24 -0
- package/dist/components/custom-outputs-form/index.js +346 -0
- package/dist/components/custom-outputs-form/index.less +51 -0
- package/dist/components/drag-panel/index.d.ts +10 -0
- package/dist/components/drag-panel/index.js +79 -0
- package/dist/components/drag-panel/index.less +23 -0
- package/dist/components/draggable-with-handle/index.d.ts +13 -0
- package/dist/components/draggable-with-handle/index.js +81 -0
- package/dist/components/draggable-with-handle/index.less +23 -0
- package/dist/components/flow-aside/index.d.ts +4 -0
- package/dist/components/flow-aside/index.js +62 -0
- package/dist/components/flow-aside/index.less +84 -0
- package/dist/components/flow-base-edge/index.d.ts +5 -0
- package/dist/components/flow-base-edge/index.js +226 -0
- package/dist/components/flow-base-edge/index.less +28 -0
- package/dist/components/flow-base-edge/linear-gradient-svg.d.ts +21 -0
- package/dist/components/flow-base-edge/linear-gradient-svg.js +32 -0
- package/dist/components/flow-icon/index.d.ts +9 -0
- package/dist/components/flow-icon/index.js +30 -0
- package/dist/components/flow-icon/index.less +20 -0
- package/dist/components/flow-mini-map/index.d.ts +4 -0
- package/dist/components/flow-mini-map/index.js +26 -0
- package/dist/components/flow-mini-map/index.less +22 -0
- package/dist/components/flow-panel/config-panel.d.ts +15 -0
- package/dist/components/flow-panel/config-panel.js +303 -0
- package/dist/components/flow-panel/index.d.ts +7 -0
- package/dist/components/flow-panel/index.js +7 -0
- package/dist/components/flow-panel/index.less +85 -0
- package/dist/components/flow-panel/panel-container.d.ts +12 -0
- package/dist/components/flow-panel/panel-container.js +25 -0
- package/dist/components/flow-tools/add-node-btn.d.ts +3 -0
- package/dist/components/flow-tools/add-node-btn.js +26 -0
- package/dist/components/flow-tools/history-btn.d.ts +3 -0
- package/dist/components/flow-tools/history-btn.js +59 -0
- package/dist/components/flow-tools/index.d.ts +4 -0
- package/dist/components/flow-tools/index.js +29 -0
- package/dist/components/flow-tools/index.less +82 -0
- package/dist/components/flow-tools/layout-btn.d.ts +3 -0
- package/dist/components/flow-tools/layout-btn.js +27 -0
- package/dist/components/flow-tools/mini-map-btn.d.ts +3 -0
- package/dist/components/flow-tools/mini-map-btn.js +32 -0
- package/dist/components/flow-tools/scale-btn.d.ts +3 -0
- package/dist/components/flow-tools/scale-btn.js +101 -0
- package/dist/components/flow-tools/short-key-btn.d.ts +3 -0
- package/dist/components/flow-tools/short-key-btn.js +38 -0
- package/dist/components/flow-tools/short-key-content.d.ts +4 -0
- package/dist/components/flow-tools/short-key-content.js +153 -0
- package/dist/components/flow-tools/short-key-content.less +38 -0
- package/dist/components/flow-tools/touch-mode-btn.d.ts +3 -0
- package/dist/components/flow-tools/touch-mode-btn.js +89 -0
- package/dist/components/input-text-area/index.d.ts +16 -0
- package/dist/components/input-text-area/index.js +74 -0
- package/dist/components/input-text-area/index.less +30 -0
- package/dist/components/judge-form/index.d.ts +13 -0
- package/dist/components/judge-form/index.js +182 -0
- package/dist/components/judge-form/index.less +11 -0
- package/dist/components/node-menu/index.d.ts +35 -0
- package/dist/components/node-menu/index.js +266 -0
- package/dist/components/node-menu/index.less +79 -0
- package/dist/components/node-resizer/index.d.ts +11 -0
- package/dist/components/node-resizer/index.js +46 -0
- package/dist/components/node-resizer/index.less +12 -0
- package/dist/components/node-result-panel/index.d.ts +9 -0
- package/dist/components/node-result-panel/index.js +155 -0
- package/dist/components/node-result-panel/index.less +132 -0
- package/dist/components/node-tree/index.d.ts +4 -0
- package/dist/components/node-tree/index.js +213 -0
- package/dist/components/node-tree/index.less +51 -0
- package/dist/components/output-params-tree/index.d.ts +10 -0
- package/dist/components/output-params-tree/index.js +34 -0
- package/dist/components/output-params-tree/index.less +27 -0
- package/dist/components/script-code-mirror/index.d.ts +14 -0
- package/dist/components/script-code-mirror/index.js +162 -0
- package/dist/components/script-code-mirror/index.less +11 -0
- package/dist/components/script-edit-modal/index.d.ts +30 -0
- package/dist/components/script-edit-modal/index.js +84 -0
- package/dist/components/script-edit-modal/index.less +24 -0
- package/dist/components/select-with-desc/index.d.ts +5 -0
- package/dist/components/select-with-desc/index.js +20 -0
- package/dist/components/select-with-desc/index.less +11 -0
- package/dist/components/task-status/index.d.ts +4 -0
- package/dist/components/task-status/index.js +209 -0
- package/dist/components/task-status/index.less +65 -0
- package/dist/components/var-input-text-area/index.d.ts +17 -0
- package/dist/components/var-input-text-area/index.js +211 -0
- package/dist/components/var-input-text-area/index.less +64 -0
- package/dist/components/var-type-prefix/index.d.ts +17 -0
- package/dist/components/var-type-prefix/index.js +21 -0
- package/dist/components/variable-input/index.d.ts +24 -0
- package/dist/components/variable-input/index.js +163 -0
- package/dist/components/variable-input/index.less +13 -0
- package/dist/components/variable-tree-select/index.d.ts +33 -0
- package/dist/components/variable-tree-select/index.js +160 -0
- package/dist/components/variable-tree-select/index.less +61 -0
- package/dist/constant/index.d.ts +61 -0
- package/dist/constant/index.js +515 -0
- package/dist/flow/animate.css +5 -0
- package/dist/flow/context.d.ts +12 -0
- package/dist/flow/context.js +44 -0
- package/dist/flow/index.d.ts +13 -0
- package/dist/flow/index.js +162 -0
- package/dist/flow/index.less +72 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/use-edges-interaction.d.ts +11 -0
- package/dist/hooks/use-edges-interaction.js +125 -0
- package/dist/hooks/use-flow-debug-interaction.d.ts +5 -0
- package/dist/hooks/use-flow-debug-interaction.js +23 -0
- package/dist/hooks/use-flow-interaction.d.ts +12 -0
- package/dist/hooks/use-flow-interaction.js +173 -0
- package/dist/hooks/use-flow-key-press.d.ts +1 -0
- package/dist/hooks/use-flow-key-press.js +32 -0
- package/dist/hooks/use-flow-save.d.ts +5 -0
- package/dist/hooks/use-flow-save.js +47 -0
- package/dist/hooks/use-flow-view-port.d.ts +7 -0
- package/dist/hooks/use-flow-view-port.js +46 -0
- package/dist/hooks/use-history.d.ts +21 -0
- package/dist/hooks/use-history.js +80 -0
- package/dist/hooks/use-nodes-interaction.d.ts +34 -0
- package/dist/hooks/use-nodes-interaction.js +777 -0
- package/dist/hooks/use-nodes-output-params.d.ts +31 -0
- package/dist/hooks/use-nodes-output-params.js +300 -0
- package/dist/hooks/use-nodes-update.d.ts +9 -0
- package/dist/hooks/use-nodes-update.js +38 -0
- package/dist/hooks/use-work-flow.d.ts +4 -0
- package/dist/hooks/use-work-flow.js +21 -0
- package/dist/i18n/i18n.d.ts +62 -0
- package/dist/i18n/i18n.js +111 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.js +12 -0
- package/dist/i18n/locales/en-us.json +327 -0
- package/dist/i18n/locales/ja-jp.json +300 -0
- package/dist/i18n/locales/zh-cn.json +327 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +47 -0
- package/dist/index.less +1 -0
- package/dist/store/index.d.ts +70 -0
- package/dist/store/index.js +146 -0
- package/dist/tailwind.css +28 -0
- package/dist/types/work-flow.d.ts +188 -0
- package/dist/types/work-flow.js +1 -0
- package/dist/utils/default-values.d.ts +2 -0
- package/dist/utils/default-values.js +16 -0
- package/dist/utils/index.d.ts +39 -0
- package/dist/utils/index.js +273 -0
- package/dist/utils/unique-id.d.ts +2 -0
- package/dist/utils/unique-id.js +39 -0
- package/dist/utils/work-flow.d.ts +17 -0
- package/dist/utils/work-flow.js +44 -0
- package/package.json +78 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["hasProperties", "onChange", "disabled"];
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
10
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
+
import $i18n from "../../i18n";
|
|
16
|
+
import { Empty, Tag } from '@agentscope-ai/design';
|
|
17
|
+
import { SparkRightLine, SparkUpLine } from '@agentscope-ai/icons';
|
|
18
|
+
import { Popover, Typography } from 'antd';
|
|
19
|
+
import classNames from 'classnames';
|
|
20
|
+
import React, { memo, useMemo, useState } from 'react';
|
|
21
|
+
import FlowIcon from "../flow-icon";
|
|
22
|
+
import "./index.less";
|
|
23
|
+
var VariableTree = /*#__PURE__*/memo(function (props) {
|
|
24
|
+
var hasProperties = useMemo(function () {
|
|
25
|
+
return props.list.some(function (item) {
|
|
26
|
+
var _item$children;
|
|
27
|
+
return !!((_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length);
|
|
28
|
+
});
|
|
29
|
+
}, [props.list]);
|
|
30
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, props.list.map(function (item, index) {
|
|
31
|
+
return /*#__PURE__*/React.createElement(VariableTreeItem, _extends({
|
|
32
|
+
onChange: function onChange(val) {
|
|
33
|
+
var _props$onChange;
|
|
34
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, val);
|
|
35
|
+
},
|
|
36
|
+
hasProperties: hasProperties,
|
|
37
|
+
key: index
|
|
38
|
+
}, item));
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
var VariableTreeItem = /*#__PURE__*/memo(function (props) {
|
|
42
|
+
var _props$children, _props$children2, _props$children3;
|
|
43
|
+
var hasProperties = props.hasProperties,
|
|
44
|
+
onChange = props.onChange,
|
|
45
|
+
disabled = props.disabled,
|
|
46
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
47
|
+
var _useState = useState(true),
|
|
48
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
49
|
+
expand = _useState2[0],
|
|
50
|
+
setExpand = _useState2[1];
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: classNames('relative', _defineProperty(_defineProperty(_defineProperty({}, 'pl-3', hasProperties), 'spark-flow-expand-var-tree-item', !!((_props$children = props.children) !== null && _props$children !== void 0 && _props$children.length)), 'spark-flow-expand-var-tree-item-hidden', !expand))
|
|
53
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
onClick: function onClick(e) {
|
|
55
|
+
e.stopPropagation();
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
if (disabled) return;
|
|
58
|
+
onChange === null || onChange === void 0 || onChange(restProps);
|
|
59
|
+
},
|
|
60
|
+
className: classNames('h-[32px] spark-var-tree-item flex-justify-between', _defineProperty({}, 'spark-var-tree-item-disabled', disabled)),
|
|
61
|
+
style: {
|
|
62
|
+
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
63
|
+
opacity: disabled ? 0.5 : 1
|
|
64
|
+
}
|
|
65
|
+
}, /*#__PURE__*/React.createElement(Typography.Text, {
|
|
66
|
+
style: {
|
|
67
|
+
maxWidth: 200
|
|
68
|
+
},
|
|
69
|
+
ellipsis: {
|
|
70
|
+
tooltip: props.label
|
|
71
|
+
}
|
|
72
|
+
}, props.label), /*#__PURE__*/React.createElement(Tag, {
|
|
73
|
+
className: "spark-var-type"
|
|
74
|
+
}, props.type)), !!((_props$children2 = props.children) !== null && _props$children2 !== void 0 && _props$children2.length) && /*#__PURE__*/React.createElement(SparkUpLine, {
|
|
75
|
+
size: 16,
|
|
76
|
+
onClick: function onClick() {
|
|
77
|
+
return setExpand(!expand);
|
|
78
|
+
},
|
|
79
|
+
className: "spark-flow-inputs-expand-btn cursor-pointer"
|
|
80
|
+
}), !!((_props$children3 = props.children) !== null && _props$children3 !== void 0 && _props$children3.length) && expand && /*#__PURE__*/React.createElement(VariableTree, {
|
|
81
|
+
onChange: props.onChange,
|
|
82
|
+
list: props.children
|
|
83
|
+
}));
|
|
84
|
+
});
|
|
85
|
+
export var VariableTreeNodeItem = /*#__PURE__*/memo(function (props) {
|
|
86
|
+
var _useState3 = useState(false),
|
|
87
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
88
|
+
open = _useState4[0],
|
|
89
|
+
setOpen = _useState4[1];
|
|
90
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
91
|
+
rootClassName: "spark-flow-small-padding-popover",
|
|
92
|
+
onOpenChange: setOpen,
|
|
93
|
+
open: open,
|
|
94
|
+
content: /*#__PURE__*/React.createElement(VariableTree, {
|
|
95
|
+
onChange: function onChange(val) {
|
|
96
|
+
var _props$onChange2;
|
|
97
|
+
(_props$onChange2 = props.onChange) === null || _props$onChange2 === void 0 || _props$onChange2.call(props, val);
|
|
98
|
+
setOpen(false);
|
|
99
|
+
},
|
|
100
|
+
list: props.children || []
|
|
101
|
+
}),
|
|
102
|
+
placement: "leftTop"
|
|
103
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: "flex gap-[4px] px-[8px] py-[4px] spark-flow-var-tree-select-node-props items-center"
|
|
105
|
+
}, /*#__PURE__*/React.createElement(FlowIcon, {
|
|
106
|
+
size: "small",
|
|
107
|
+
nodeType: props.nodeType
|
|
108
|
+
}), /*#__PURE__*/React.createElement(Typography.Text, {
|
|
109
|
+
className: "spark-flow-var-tree-select-node-title flex-1 w-[1px]",
|
|
110
|
+
ellipsis: {
|
|
111
|
+
tooltip: props.label
|
|
112
|
+
}
|
|
113
|
+
}, props.label), /*#__PURE__*/React.createElement(SparkRightLine, {
|
|
114
|
+
size: 16
|
|
115
|
+
})));
|
|
116
|
+
});
|
|
117
|
+
var VariableTreeSelect = /*#__PURE__*/memo(function (props) {
|
|
118
|
+
var _props$options, _props$options2;
|
|
119
|
+
var _useState5 = useState(props.defaultOpen || false),
|
|
120
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
121
|
+
open = _useState6[0],
|
|
122
|
+
setOpen = _useState6[1];
|
|
123
|
+
if (props.disabled) return props.children;
|
|
124
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
125
|
+
placement: "bottom",
|
|
126
|
+
trigger: ['click'],
|
|
127
|
+
open: open,
|
|
128
|
+
onOpenChange: function onOpenChange(val) {
|
|
129
|
+
var _props$onClose;
|
|
130
|
+
setOpen(val);
|
|
131
|
+
if (!val) (_props$onClose = props.onClose) === null || _props$onClose === void 0 || _props$onClose.call(props);
|
|
132
|
+
},
|
|
133
|
+
rootClassName: "spark-flow-small-padding-popover spark-flow-var-tree-select-popover",
|
|
134
|
+
getPopupContainer: function getPopupContainer(ele) {
|
|
135
|
+
return ele;
|
|
136
|
+
},
|
|
137
|
+
content: !((_props$options = props.options) !== null && _props$options !== void 0 && _props$options.length) ? /*#__PURE__*/React.createElement("div", {
|
|
138
|
+
className: "full-center"
|
|
139
|
+
}, /*#__PURE__*/React.createElement(Empty, {
|
|
140
|
+
size: 160,
|
|
141
|
+
description: $i18n.get({
|
|
142
|
+
id: 'main.pages.Component.Plugin.Tools.List.noData',
|
|
143
|
+
dm: '暂无数据'
|
|
144
|
+
})
|
|
145
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
146
|
+
className: "flex flex-col gap-[4px]"
|
|
147
|
+
}, (_props$options2 = props.options) === null || _props$options2 === void 0 ? void 0 : _props$options2.map(function (item) {
|
|
148
|
+
return /*#__PURE__*/React.createElement(VariableTreeNodeItem, _extends({
|
|
149
|
+
onChange: function onChange(val) {
|
|
150
|
+
var _props$onChange3, _props$onClose2;
|
|
151
|
+
(_props$onChange3 = props.onChange) === null || _props$onChange3 === void 0 || _props$onChange3.call(props, val);
|
|
152
|
+
setOpen(false);
|
|
153
|
+
(_props$onClose2 = props.onClose) === null || _props$onClose2 === void 0 || _props$onClose2.call(props);
|
|
154
|
+
},
|
|
155
|
+
key: item.nodeId
|
|
156
|
+
}, item));
|
|
157
|
+
}))
|
|
158
|
+
}, props.children);
|
|
159
|
+
});
|
|
160
|
+
export default VariableTreeSelect;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@import '../../index.less';
|
|
2
|
+
|
|
3
|
+
.spark-flow-var-tree-select-node-title {
|
|
4
|
+
font-size: 12px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.spark-flow-var-tree-select-node-item {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
transition: 0.4s ease-out;
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
background: e('var(--@{ant-prefix}-color-fill-tertiary)');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.spark-var-tree-item {
|
|
17
|
+
color: e('var(--@{ant-prefix}-color-text)');
|
|
18
|
+
min-width: 192px;
|
|
19
|
+
padding: 0 8px;
|
|
20
|
+
border-radius: 4px;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
gap: 8px;
|
|
23
|
+
transition: 0.4s ease-out;
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
background: e('var(--@{ant-prefix}-color-fill-tertiary)');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.spark-flow-expand-var-tree-item {
|
|
31
|
+
&:not(&-hidden)::after {
|
|
32
|
+
content: '';
|
|
33
|
+
height: calc(100% - 54px);
|
|
34
|
+
bottom: 20px;
|
|
35
|
+
left: 6px;
|
|
36
|
+
width: 1px;
|
|
37
|
+
background: e('var(--@{ant-prefix}-color-border-secondary)');
|
|
38
|
+
position: absolute;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.spark-flow-inputs-expand-btn {
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 8px;
|
|
45
|
+
left: -2px;
|
|
46
|
+
transition: transform 0.3s ease-in-out;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.spark-flow-expand-var-tree-item-hidden {
|
|
50
|
+
.spark-flow-inputs-expand-btn {
|
|
51
|
+
transform: rotate(180deg);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.spark-flow-var-tree-select-popover {
|
|
56
|
+
min-width: 100%;
|
|
57
|
+
.@{ant-prefix}-popover-inner-content {
|
|
58
|
+
max-height: 300px;
|
|
59
|
+
overflow-y: auto;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { INodeDataOutputParamItem, IValueTypeOption } from "../types/work-flow";
|
|
2
|
+
export declare const WorkflowRunningStatus: {
|
|
3
|
+
Running: string;
|
|
4
|
+
Done: string;
|
|
5
|
+
Failed: string;
|
|
6
|
+
Paused: string;
|
|
7
|
+
Stop: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const ITERATION_PADDING: {
|
|
10
|
+
top: number;
|
|
11
|
+
right: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
left: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const NEW_NODE_PADDING: {
|
|
16
|
+
x: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const FILE_PROPERTIES: INodeDataOutputParamItem[];
|
|
19
|
+
export declare const VALUE_TYPE_OPTIONS: IValueTypeOption[];
|
|
20
|
+
export declare const OPERATOR_OPTS_MAP: {
|
|
21
|
+
Number: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}[];
|
|
25
|
+
'Array<Boolean>': {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[];
|
|
29
|
+
Boolean: {
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}[];
|
|
33
|
+
'Array<File>': {
|
|
34
|
+
label: string;
|
|
35
|
+
value: string;
|
|
36
|
+
}[];
|
|
37
|
+
'Array<Object>': {
|
|
38
|
+
label: string;
|
|
39
|
+
value: string;
|
|
40
|
+
}[];
|
|
41
|
+
String: {
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}[];
|
|
45
|
+
File: {
|
|
46
|
+
label: string;
|
|
47
|
+
value: string;
|
|
48
|
+
}[];
|
|
49
|
+
'Array<String>': {
|
|
50
|
+
label: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}[];
|
|
53
|
+
'Array<Number>': {
|
|
54
|
+
label: string;
|
|
55
|
+
value: string;
|
|
56
|
+
}[];
|
|
57
|
+
Object: {
|
|
58
|
+
label: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}[];
|
|
61
|
+
};
|