@rxflow/group-bloodline 0.0.1-alpha.0
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 +41 -0
- package/cjs/components/Connector.d.ts +16 -0
- package/cjs/components/Connector.d.ts.map +1 -0
- package/cjs/components/Connector.js +152 -0
- package/cjs/components/Version.d.ts +11 -0
- package/cjs/components/Version.d.ts.map +1 -0
- package/cjs/components/Version.js +44 -0
- package/cjs/constants.d.ts +22 -0
- package/cjs/constants.d.ts.map +1 -0
- package/cjs/constants.js +30 -0
- package/cjs/index.d.ts +7 -0
- package/cjs/index.d.ts.map +1 -0
- package/cjs/index.js +71 -0
- package/cjs/nodes/DepthToolNode/index.d.ts +7 -0
- package/cjs/nodes/DepthToolNode/index.d.ts.map +1 -0
- package/cjs/nodes/DepthToolNode/index.js +152 -0
- package/cjs/nodes/DepthToolNode/index.less +19 -0
- package/cjs/nodes/Service/MultipleVersionService.d.ts +6 -0
- package/cjs/nodes/Service/MultipleVersionService.d.ts.map +1 -0
- package/cjs/nodes/Service/MultipleVersionService.js +84 -0
- package/cjs/nodes/Service/SingleVersionService.d.ts +6 -0
- package/cjs/nodes/Service/SingleVersionService.d.ts.map +1 -0
- package/cjs/nodes/Service/SingleVersionService.js +76 -0
- package/cjs/nodes/Service/index.d.ts +17 -0
- package/cjs/nodes/Service/index.d.ts.map +1 -0
- package/cjs/nodes/Service/index.js +71 -0
- package/cjs/nodes/ServiceGroup/index.d.ts +6 -0
- package/cjs/nodes/ServiceGroup/index.d.ts.map +1 -0
- package/cjs/nodes/ServiceGroup/index.js +192 -0
- package/cjs/nodes/index.d.ts +10 -0
- package/cjs/nodes/index.d.ts.map +1 -0
- package/cjs/nodes/index.js +43 -0
- package/cjs/style/index.less +220 -0
- package/cjs/style/index.module.less +212 -0
- package/cjs/style/theme.less +16 -0
- package/cjs/types.d.ts +102 -0
- package/cjs/types.d.ts.map +1 -0
- package/cjs/types.js +5 -0
- package/cjs/utils/bloodLayout.d.ts +15 -0
- package/cjs/utils/bloodLayout.d.ts.map +1 -0
- package/cjs/utils/bloodLayout.js +316 -0
- package/cjs/utils/countSiblings.d.ts +10 -0
- package/cjs/utils/countSiblings.d.ts.map +1 -0
- package/cjs/utils/countSiblings.js +32 -0
- package/cjs/utils/getVersion.d.ts +3 -0
- package/cjs/utils/getVersion.d.ts.map +1 -0
- package/cjs/utils/getVersion.js +24 -0
- package/cjs/utils/keys.d.ts +3 -0
- package/cjs/utils/keys.d.ts.map +1 -0
- package/cjs/utils/keys.js +18 -0
- package/cjs/utils/shadowNodeData.d.ts +10 -0
- package/cjs/utils/shadowNodeData.d.ts.map +1 -0
- package/cjs/utils/shadowNodeData.js +18 -0
- package/esm/components/Connector.d.ts +16 -0
- package/esm/components/Connector.d.ts.map +1 -0
- package/esm/components/Connector.js +168 -0
- package/esm/components/Version.d.ts +11 -0
- package/esm/components/Version.d.ts.map +1 -0
- package/esm/components/Version.js +36 -0
- package/esm/constants.d.ts +22 -0
- package/esm/constants.d.ts.map +1 -0
- package/esm/constants.js +25 -0
- package/esm/index.d.ts +7 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +45 -0
- package/esm/nodes/DepthToolNode/index.d.ts +7 -0
- package/esm/nodes/DepthToolNode/index.d.ts.map +1 -0
- package/esm/nodes/DepthToolNode/index.js +220 -0
- package/esm/nodes/DepthToolNode/index.less +19 -0
- package/esm/nodes/Service/MultipleVersionService.d.ts +6 -0
- package/esm/nodes/Service/MultipleVersionService.d.ts.map +1 -0
- package/esm/nodes/Service/MultipleVersionService.js +74 -0
- package/esm/nodes/Service/SingleVersionService.d.ts +6 -0
- package/esm/nodes/Service/SingleVersionService.d.ts.map +1 -0
- package/esm/nodes/Service/SingleVersionService.js +67 -0
- package/esm/nodes/Service/index.d.ts +17 -0
- package/esm/nodes/Service/index.d.ts.map +1 -0
- package/esm/nodes/Service/index.js +57 -0
- package/esm/nodes/ServiceGroup/index.d.ts +6 -0
- package/esm/nodes/ServiceGroup/index.d.ts.map +1 -0
- package/esm/nodes/ServiceGroup/index.js +201 -0
- package/esm/nodes/index.d.ts +10 -0
- package/esm/nodes/index.d.ts.map +1 -0
- package/esm/nodes/index.js +36 -0
- package/esm/style/index.less +220 -0
- package/esm/style/index.module.less +212 -0
- package/esm/style/theme.less +16 -0
- package/esm/types.d.ts +102 -0
- package/esm/types.d.ts.map +1 -0
- package/esm/types.js +1 -0
- package/esm/utils/bloodLayout.d.ts +15 -0
- package/esm/utils/bloodLayout.d.ts.map +1 -0
- package/esm/utils/bloodLayout.js +304 -0
- package/esm/utils/countSiblings.d.ts +10 -0
- package/esm/utils/countSiblings.d.ts.map +1 -0
- package/esm/utils/countSiblings.js +23 -0
- package/esm/utils/getVersion.d.ts +3 -0
- package/esm/utils/getVersion.d.ts.map +1 -0
- package/esm/utils/getVersion.js +17 -0
- package/esm/utils/keys.d.ts +3 -0
- package/esm/utils/keys.d.ts.map +1 -0
- package/esm/utils/keys.js +11 -0
- package/esm/utils/shadowNodeData.d.ts +10 -0
- package/esm/utils/shadowNodeData.d.ts.map +1 -0
- package/esm/utils/shadowNodeData.js +11 -0
- package/package.json +50 -0
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
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); }
|
|
5
|
+
/**
|
|
6
|
+
* @author: yanxianliang
|
|
7
|
+
* @date: 2025-07-05 15:18
|
|
8
|
+
* @desc: 版本 Item
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import cx from "classcat";
|
|
14
|
+
import "../style/index.less";
|
|
15
|
+
import { getVersion, isEmpty } from "../utils/getVersion";
|
|
16
|
+
import React from "react";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
var prefixCls = 'rxflow-group-bloodline';
|
|
19
|
+
export var Version = function Version(props) {
|
|
20
|
+
var version = props.version,
|
|
21
|
+
bloodlineVersion = props.bloodlineVersion,
|
|
22
|
+
_props$status = props.status,
|
|
23
|
+
status = _props$status === void 0 ? '-' : _props$status,
|
|
24
|
+
hasChanged = props.hasChanged,
|
|
25
|
+
hit = props.hit;
|
|
26
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
27
|
+
className: cx(["".concat(prefixCls, "-version"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-hit"), hit), "".concat(prefixCls, "-changed-version"), hasChanged)]),
|
|
28
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
29
|
+
className: "".concat(prefixCls, "-node-sub_title"),
|
|
30
|
+
children: ["\u7248\u672C\u53F7\uFF1A", getVersion(version), "(", status, ")"]
|
|
31
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
32
|
+
className: "".concat(prefixCls, "-node-desc"),
|
|
33
|
+
children: ["\u8840\u7F18\u7248\u672C\u53F7\uFF1A", isEmpty(bloodlineVersion) ? '-' : bloodlineVersion]
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-05 15:48
|
|
4
|
+
* @desc: 常量
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum BloodlineDirection {
|
|
9
|
+
upstream = "upstream",
|
|
10
|
+
downstream = "downstream"
|
|
11
|
+
}
|
|
12
|
+
export declare enum BloodlineNodeType {
|
|
13
|
+
Service = "service",// 服务节点,支持单版本和多版本。
|
|
14
|
+
ServiceGroup = "service-group",
|
|
15
|
+
Toolbar = "toolbar"
|
|
16
|
+
}
|
|
17
|
+
export declare const groupPageSize = 5;
|
|
18
|
+
export declare enum Align {
|
|
19
|
+
center = "center",
|
|
20
|
+
top = "top"
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,oBAAY,kBAAkB;IAC5B,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B;AAGD,oBAAY,iBAAiB;IAC3B,OAAO,YAAY,CAAE,kBAAkB;IACvC,YAAY,kBAAkB;IAC9B,OAAO,YAAY;CACpB;AAGD,eAAO,MAAM,aAAa,IAAI,CAAC;AAG/B,oBAAY,KAAK;IACf,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ"}
|
package/esm/constants.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-05 15:48
|
|
4
|
+
* @desc: 常量
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export var BloodlineDirection = /*#__PURE__*/function (BloodlineDirection) {
|
|
10
|
+
BloodlineDirection["upstream"] = "upstream";
|
|
11
|
+
BloodlineDirection["downstream"] = "downstream";
|
|
12
|
+
return BloodlineDirection;
|
|
13
|
+
}({});
|
|
14
|
+
export var BloodlineNodeType = /*#__PURE__*/function (BloodlineNodeType) {
|
|
15
|
+
BloodlineNodeType["Service"] = "service";
|
|
16
|
+
BloodlineNodeType["ServiceGroup"] = "service-group";
|
|
17
|
+
BloodlineNodeType["Toolbar"] = "toolbar";
|
|
18
|
+
return BloodlineNodeType;
|
|
19
|
+
}({});
|
|
20
|
+
export var groupPageSize = 5;
|
|
21
|
+
export var Align = /*#__PURE__*/function (Align) {
|
|
22
|
+
Align["center"] = "center";
|
|
23
|
+
Align["top"] = "top";
|
|
24
|
+
return Align;
|
|
25
|
+
}({});
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { IGroupBloodlineFlowProps } from "./types";
|
|
3
|
+
declare const GroupBloodlineFlow: (props: PropsWithChildren<IGroupBloodlineFlowProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default GroupBloodlineFlow;
|
|
5
|
+
export * from "./types";
|
|
6
|
+
export * from "./constants";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAC,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAGjD,OAAO,EAA4B,wBAAwB,EAAC,MAAM,SAAS,CAAC;AAkC5E,QAAA,MAAM,kBAAkB,iGAA6F,CAAC;AAEtH,eAAe,kBAAkB,CAAC;AAElC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
/*
|
|
8
|
+
* @author: yanxianliang
|
|
9
|
+
* @date: 2025-06-01 18:36
|
|
10
|
+
* @desc: 血缘视图
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { useMemo } from "react";
|
|
16
|
+
import { Flow, createFlow } from "@rxflow/base";
|
|
17
|
+
import { nodeTypes } from "./nodes";
|
|
18
|
+
import { bloodLayout } from "./utils/bloodLayout";
|
|
19
|
+
var fitViewOptions = {
|
|
20
|
+
padding: 2,
|
|
21
|
+
minZoom: 1,
|
|
22
|
+
maxZoom: 1
|
|
23
|
+
};
|
|
24
|
+
var omitProps = ['root', 'PropertyPopover', 'getRelation', 'getChildren'];
|
|
25
|
+
var usePropsTransformer = function usePropsTransformer(props) {
|
|
26
|
+
var root = props.root;
|
|
27
|
+
var nodes = useMemo(function () {
|
|
28
|
+
return root ? [root] : [];
|
|
29
|
+
}, [root]);
|
|
30
|
+
return _objectSpread(_objectSpread({}, props), {}, {
|
|
31
|
+
nodes: nodes,
|
|
32
|
+
nodeTypes: nodeTypes,
|
|
33
|
+
edgesFocusable: false,
|
|
34
|
+
fitViewOptions: fitViewOptions,
|
|
35
|
+
autoCenter: true,
|
|
36
|
+
layout: bloodLayout,
|
|
37
|
+
omitProps: omitProps,
|
|
38
|
+
selectionOnDrag: false,
|
|
39
|
+
nodesDraggable: false
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
var GroupBloodlineFlow = createFlow(Flow, usePropsTransformer);
|
|
43
|
+
export default GroupBloodlineFlow;
|
|
44
|
+
export * from "./types";
|
|
45
|
+
export * from "./constants";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { NodeProps, Node } from "@xyflow/react";
|
|
3
|
+
import { DepthToolbarData } from "../../types";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
declare const ToolbarNode: import("react").MemoExoticComponent<(props: NodeProps<Node<DepthToolbarData>>) => import("react/jsx-runtime").JSX.Element | null>;
|
|
6
|
+
export default ToolbarNode;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAA2B,MAAM,aAAa,CAAC;AAGvE,OAAO,cAAc,CAAC;AAuBtB,QAAA,MAAM,WAAW,8CAAgB,UAAU,KAAK,gBAAgB,CAAC,CAAC,oDA+FG,CAAC;AAEtE,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
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
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
7
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
8
|
+
/*
|
|
9
|
+
* @author: yanxianliang
|
|
10
|
+
* @date: 2025-06-04 13:10
|
|
11
|
+
* @desc: DepthToolNode
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import QuestionCircleOutlined from '@ant-design/icons/QuestionCircleOutlined';
|
|
17
|
+
import { Tooltip, Button } from "antd";
|
|
18
|
+
import "./index.less";
|
|
19
|
+
import { memo } from "react";
|
|
20
|
+
import { get, isEqual, set } from 'lodash';
|
|
21
|
+
import { BloodlineDirection, BloodlineNodeType, groupPageSize } from "../..";
|
|
22
|
+
import { LoadingButton, useGetProps, useForceUpdate } from "@rxflow/base";
|
|
23
|
+
import { useDebounceFn, useMemoizedFn } from "ahooks";
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
26
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
function numberToChinese(num) {
|
|
28
|
+
var chars = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
|
29
|
+
var absNum = Math.abs(num);
|
|
30
|
+
if (absNum === 0) return chars[0];
|
|
31
|
+
if (absNum < 10) return chars[absNum];
|
|
32
|
+
if (absNum < 20) return '十' + (absNum % 10 === 0 ? '' : chars[absNum % 10]);
|
|
33
|
+
if (absNum < 100) {
|
|
34
|
+
var ten = Math.floor(absNum / 10);
|
|
35
|
+
var unit = absNum % 10;
|
|
36
|
+
return chars[ten] + '十' + (unit === 0 ? '' : chars[unit]);
|
|
37
|
+
}
|
|
38
|
+
// 超过99可自行扩展
|
|
39
|
+
return String(num);
|
|
40
|
+
}
|
|
41
|
+
var ToolbarNode = /*#__PURE__*/memo(function (props) {
|
|
42
|
+
var data = props.data;
|
|
43
|
+
var _ref = data || {},
|
|
44
|
+
depth = _ref.depth,
|
|
45
|
+
count = _ref.count,
|
|
46
|
+
direction = _ref.direction,
|
|
47
|
+
_ref$siblings = _ref.siblings,
|
|
48
|
+
siblings = _ref$siblings === void 0 ? [] : _ref$siblings;
|
|
49
|
+
var triggerLayout = useForceUpdate();
|
|
50
|
+
var getProps = useGetProps();
|
|
51
|
+
var _useDebounceFn = useDebounceFn(function () {
|
|
52
|
+
triggerLayout();
|
|
53
|
+
}, {
|
|
54
|
+
wait: 200
|
|
55
|
+
}),
|
|
56
|
+
doLayout = _useDebounceFn.run;
|
|
57
|
+
var onExpandAll = useMemoizedFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
58
|
+
var waitRelayout, syncTasks, _iterator, _step, _loop;
|
|
59
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context3) {
|
|
60
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
61
|
+
case 0:
|
|
62
|
+
// 隐藏的节点怎么处理
|
|
63
|
+
waitRelayout = false;
|
|
64
|
+
syncTasks = [];
|
|
65
|
+
_iterator = _createForOfIteratorHelper(siblings);
|
|
66
|
+
_context3.prev = 3;
|
|
67
|
+
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
|
|
68
|
+
var sibling, expanded, _sibling$state;
|
|
69
|
+
return _regeneratorRuntime().wrap(function _loop$(_context2) {
|
|
70
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
71
|
+
case 0:
|
|
72
|
+
sibling = _step.value;
|
|
73
|
+
if (sibling.type === BloodlineNodeType.ServiceGroup) {
|
|
74
|
+
expanded = get(sibling, ['state', 'expanded'], false);
|
|
75
|
+
if (!expanded) {
|
|
76
|
+
if ((_sibling$state = sibling.state) !== null && _sibling$state !== void 0 && _sibling$state.list) {
|
|
77
|
+
set(sibling, ['state', 'expanded'], true);
|
|
78
|
+
waitRelayout = true;
|
|
79
|
+
} else {
|
|
80
|
+
// 发起请求
|
|
81
|
+
set(sibling, ['state', 'expanded'], true);
|
|
82
|
+
set(sibling, ['state', 'loading'], true);
|
|
83
|
+
waitRelayout = true;
|
|
84
|
+
syncTasks.push(_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
85
|
+
var getChildren, _yield$getChildren, total, list;
|
|
86
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
87
|
+
while (1) switch (_context.prev = _context.next) {
|
|
88
|
+
case 0:
|
|
89
|
+
_context.prev = 0;
|
|
90
|
+
getChildren = getProps().getChildren;
|
|
91
|
+
_context.next = 4;
|
|
92
|
+
return getChildren === null || getChildren === void 0 ? void 0 : getChildren(sibling, groupPageSize, 1, direction);
|
|
93
|
+
case 4:
|
|
94
|
+
_yield$getChildren = _context.sent;
|
|
95
|
+
total = _yield$getChildren.total;
|
|
96
|
+
list = _yield$getChildren.list;
|
|
97
|
+
set(sibling, ['state', 'loading'], false);
|
|
98
|
+
set(sibling, ['state', 'current'], 1);
|
|
99
|
+
set(sibling, ['state', 'total'], total);
|
|
100
|
+
set(sibling, ['state', 'list'], list);
|
|
101
|
+
doLayout();
|
|
102
|
+
_context.next = 18;
|
|
103
|
+
break;
|
|
104
|
+
case 14:
|
|
105
|
+
_context.prev = 14;
|
|
106
|
+
_context.t0 = _context["catch"](0);
|
|
107
|
+
set(sibling, ['state', 'loading'], false);
|
|
108
|
+
doLayout();
|
|
109
|
+
case 18:
|
|
110
|
+
case "end":
|
|
111
|
+
return _context.stop();
|
|
112
|
+
}
|
|
113
|
+
}, _callee, null, [[0, 14]]);
|
|
114
|
+
}))());
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
case 2:
|
|
119
|
+
case "end":
|
|
120
|
+
return _context2.stop();
|
|
121
|
+
}
|
|
122
|
+
}, _loop);
|
|
123
|
+
});
|
|
124
|
+
_iterator.s();
|
|
125
|
+
case 6:
|
|
126
|
+
if ((_step = _iterator.n()).done) {
|
|
127
|
+
_context3.next = 10;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
return _context3.delegateYield(_loop(), "t0", 8);
|
|
131
|
+
case 8:
|
|
132
|
+
_context3.next = 6;
|
|
133
|
+
break;
|
|
134
|
+
case 10:
|
|
135
|
+
_context3.next = 15;
|
|
136
|
+
break;
|
|
137
|
+
case 12:
|
|
138
|
+
_context3.prev = 12;
|
|
139
|
+
_context3.t1 = _context3["catch"](3);
|
|
140
|
+
_iterator.e(_context3.t1);
|
|
141
|
+
case 15:
|
|
142
|
+
_context3.prev = 15;
|
|
143
|
+
_iterator.f();
|
|
144
|
+
return _context3.finish(15);
|
|
145
|
+
case 18:
|
|
146
|
+
waitRelayout && doLayout();
|
|
147
|
+
_context3.next = 21;
|
|
148
|
+
return Promise.all(syncTasks);
|
|
149
|
+
case 21:
|
|
150
|
+
case "end":
|
|
151
|
+
return _context3.stop();
|
|
152
|
+
}
|
|
153
|
+
}, _callee2, null, [[3, 12, 15, 18]]);
|
|
154
|
+
})));
|
|
155
|
+
var onCollapseAll = useMemoizedFn(function () {
|
|
156
|
+
var waitRelayout = false;
|
|
157
|
+
var _iterator2 = _createForOfIteratorHelper(siblings),
|
|
158
|
+
_step2;
|
|
159
|
+
try {
|
|
160
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
161
|
+
var sibling = _step2.value;
|
|
162
|
+
if (sibling.type === BloodlineNodeType.ServiceGroup) {
|
|
163
|
+
var expanded = get(sibling, ['state', 'expanded'], false);
|
|
164
|
+
if (expanded) {
|
|
165
|
+
set(sibling, ['state', 'expanded'], false);
|
|
166
|
+
waitRelayout = true;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
} catch (err) {
|
|
171
|
+
_iterator2.e(err);
|
|
172
|
+
} finally {
|
|
173
|
+
_iterator2.f();
|
|
174
|
+
}
|
|
175
|
+
if (waitRelayout) {
|
|
176
|
+
triggerLayout();
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
if (!count || !depth) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
183
|
+
className: 'rxflow-dt-toolbar',
|
|
184
|
+
children: [direction === BloodlineDirection.upstream ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
185
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
186
|
+
className: 'rxflow-dt-label',
|
|
187
|
+
children: "\u4F9D\u8D56\u4E0A\u6E38"
|
|
188
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
|
189
|
+
title: '表示 查询对象的产出或执行依赖这些上游业务对象',
|
|
190
|
+
children: /*#__PURE__*/_jsx(QuestionCircleOutlined, {})
|
|
191
|
+
})]
|
|
192
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
193
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
194
|
+
className: 'rxflow-dt-label',
|
|
195
|
+
children: "\u5F71\u54CD\u4E0B\u6E38"
|
|
196
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
|
197
|
+
title: '表示 查询对象如果下线或修改逻辑,将影响这些下游业务对象的产出或执行',
|
|
198
|
+
children: /*#__PURE__*/_jsx(QuestionCircleOutlined, {})
|
|
199
|
+
})]
|
|
200
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
201
|
+
className: 'rxflow-dt-depth',
|
|
202
|
+
children: [numberToChinese(depth), "\u7EA7 \uFF08", count, "\uFF09"]
|
|
203
|
+
}), /*#__PURE__*/_jsx(LoadingButton, {
|
|
204
|
+
className: 'rxflow-dt-action',
|
|
205
|
+
type: 'link',
|
|
206
|
+
size: 'small',
|
|
207
|
+
onClick: onExpandAll,
|
|
208
|
+
children: "\u5168\u90E8\u5C55\u5F00"
|
|
209
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
210
|
+
className: 'rxflow-dt-action',
|
|
211
|
+
type: 'link',
|
|
212
|
+
size: 'small',
|
|
213
|
+
onClick: onCollapseAll,
|
|
214
|
+
children: "\u5168\u90E8\u6536\u8D77"
|
|
215
|
+
})]
|
|
216
|
+
});
|
|
217
|
+
}, function (prevProps, nextProps) {
|
|
218
|
+
return isEqual(prevProps.data, nextProps.data);
|
|
219
|
+
});
|
|
220
|
+
export default ToolbarNode;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InnerNodeData, MultipleVersionsNodeData } from "../..";
|
|
2
|
+
import '../../style/index.less';
|
|
3
|
+
export declare const MultipleVersionRender: (props: MultipleVersionsNodeData & InnerNodeData & {
|
|
4
|
+
measure?: boolean;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=MultipleVersionService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultipleVersionService.d.ts","sourceRoot":"","sources":["MultipleVersionService.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,aAAa,EACb,wBAAwB,EACzB,cAAgC;AACjC,OAAO,wBAAwB,CAAC;AAQhC,eAAO,MAAM,qBAAqB,UAAW,wBAAwB,GAAG,aAAa,GAAG;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,4CAqDA,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
/**
|
|
8
|
+
* @author: yanxianliang
|
|
9
|
+
* @date: 2025-07-05 16:23
|
|
10
|
+
* @desc: 多版本节点
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
13
|
+
*/
|
|
14
|
+
import { Popover, useGetProps } from "@rxflow/base";
|
|
15
|
+
import { BloodlineDirection } from "../..";
|
|
16
|
+
import "../../style/index.less";
|
|
17
|
+
import cat from 'classcat';
|
|
18
|
+
import React from "react";
|
|
19
|
+
import { Connector } from "../../components/Connector";
|
|
20
|
+
import { Version } from "../../components/Version";
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
var prefixCls = 'rxflow-group-bloodline';
|
|
24
|
+
export var MultipleVersionRender = function MultipleVersionRender(props) {
|
|
25
|
+
var origin = props.origin,
|
|
26
|
+
siblings = props.siblings,
|
|
27
|
+
isRoot = props.isRoot,
|
|
28
|
+
depth = props.depth;
|
|
29
|
+
var name = origin.name,
|
|
30
|
+
versions = origin.versions,
|
|
31
|
+
hit = origin.hit;
|
|
32
|
+
var getProps = useGetProps();
|
|
33
|
+
var PropertyPopover = getProps().PropertyPopover;
|
|
34
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
35
|
+
className: cat(["".concat(prefixCls, "-service"), _defineProperty({}, "".concat(prefixCls, "-hit"), hit)]),
|
|
36
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
37
|
+
className: "".concat(prefixCls, "-node_name"),
|
|
38
|
+
children: name
|
|
39
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
40
|
+
className: "".concat(prefixCls, "-versions"),
|
|
41
|
+
children: versions.map(function (version, index) {
|
|
42
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
43
|
+
className: "".concat(prefixCls, "-version-box"),
|
|
44
|
+
children: [/*#__PURE__*/_jsx(Connector, {
|
|
45
|
+
depth: depth,
|
|
46
|
+
isRoot: isRoot,
|
|
47
|
+
version: version,
|
|
48
|
+
source: origin,
|
|
49
|
+
siblings: siblings,
|
|
50
|
+
direction: BloodlineDirection.upstream
|
|
51
|
+
}), /*#__PURE__*/_jsx(Popover, {
|
|
52
|
+
rootClassName: "".concat(prefixCls, "-popover"),
|
|
53
|
+
placement: 'right',
|
|
54
|
+
content: /*#__PURE__*/_jsx(PropertyPopover, {
|
|
55
|
+
origin: origin,
|
|
56
|
+
version: version,
|
|
57
|
+
isRoot: isRoot
|
|
58
|
+
}),
|
|
59
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
60
|
+
children: /*#__PURE__*/_jsx(Version, _objectSpread({}, version))
|
|
61
|
+
})
|
|
62
|
+
}), /*#__PURE__*/_jsx(Connector, {
|
|
63
|
+
depth: depth,
|
|
64
|
+
isRoot: isRoot,
|
|
65
|
+
version: version,
|
|
66
|
+
source: origin,
|
|
67
|
+
siblings: siblings,
|
|
68
|
+
direction: BloodlineDirection.downstream
|
|
69
|
+
})]
|
|
70
|
+
}, index);
|
|
71
|
+
})
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InnerNodeData, MultipleVersionsNodeData } from "../..";
|
|
2
|
+
import '../../style/index.less';
|
|
3
|
+
export declare const SingleVersionNodeRender: (props: MultipleVersionsNodeData & InnerNodeData & {
|
|
4
|
+
measure?: boolean;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=SingleVersionService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleVersionService.d.ts","sourceRoot":"","sources":["SingleVersionService.tsx"],"names":[],"mappings":"AAQA,OAAO,EAA2B,aAAa,EAAE,wBAAwB,EAAC,cAAgC;AAE1G,OAAO,wBAAwB,CAAC;AAQhC,eAAO,MAAM,uBAAuB,UAAW,wBAAwB,GAAG,aAAa,GAAG;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,4CAwCA,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
/**
|
|
8
|
+
* @author: yanxianliang
|
|
9
|
+
* @date: 2025-07-05 14:58
|
|
10
|
+
* @desc: 单版本节点
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
13
|
+
*/
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Popover, useGetProps } from '@rxflow/base';
|
|
16
|
+
import "../../style/index.less";
|
|
17
|
+
import { Version } from "../../components/Version";
|
|
18
|
+
import { Connector } from "../../components/Connector";
|
|
19
|
+
import { BloodlineDirection } from "../..";
|
|
20
|
+
import cat from "classcat";
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
var prefixCls = 'rxflow-group-bloodline';
|
|
24
|
+
export var SingleVersionNodeRender = function SingleVersionNodeRender(props) {
|
|
25
|
+
var _origin$versions;
|
|
26
|
+
var origin = props.origin,
|
|
27
|
+
siblings = props.siblings,
|
|
28
|
+
isRoot = props.isRoot,
|
|
29
|
+
depth = props.depth;
|
|
30
|
+
var name = origin.name,
|
|
31
|
+
hit = origin.hit;
|
|
32
|
+
var getProps = useGetProps();
|
|
33
|
+
var PropertyPopover = getProps().PropertyPopover;
|
|
34
|
+
var version = (_origin$versions = origin.versions) === null || _origin$versions === void 0 ? void 0 : _origin$versions[0];
|
|
35
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
36
|
+
className: cat(["".concat(prefixCls, "-service"), _defineProperty({}, "".concat(prefixCls, "-hit"), hit)]),
|
|
37
|
+
children: [/*#__PURE__*/_jsx(Connector, {
|
|
38
|
+
depth: depth,
|
|
39
|
+
isRoot: isRoot,
|
|
40
|
+
version: version,
|
|
41
|
+
source: origin,
|
|
42
|
+
siblings: siblings,
|
|
43
|
+
direction: BloodlineDirection.upstream
|
|
44
|
+
}), /*#__PURE__*/_jsx(Popover, {
|
|
45
|
+
rootClassName: "".concat(prefixCls, "-popover"),
|
|
46
|
+
placement: 'right',
|
|
47
|
+
content: /*#__PURE__*/_jsx(PropertyPopover, {
|
|
48
|
+
origin: origin,
|
|
49
|
+
version: version,
|
|
50
|
+
isRoot: isRoot
|
|
51
|
+
}),
|
|
52
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
53
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
54
|
+
className: "".concat(prefixCls, "-node_name"),
|
|
55
|
+
children: name
|
|
56
|
+
}), /*#__PURE__*/_jsx(Version, _objectSpread({}, version))]
|
|
57
|
+
})
|
|
58
|
+
}), /*#__PURE__*/_jsx(Connector, {
|
|
59
|
+
depth: depth,
|
|
60
|
+
isRoot: isRoot,
|
|
61
|
+
version: version,
|
|
62
|
+
source: origin,
|
|
63
|
+
siblings: siblings,
|
|
64
|
+
direction: BloodlineDirection.downstream
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-05 21:56
|
|
4
|
+
* @desc: ServiceNode
|
|
5
|
+
*
|
|
6
|
+
* 支持单版本和多版本
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { Node, NodeProps } from "@xyflow/react";
|
|
12
|
+
import { InnerNodeData, ServiceNodeData } from "../..";
|
|
13
|
+
export declare const ServiceRender: (props: ServiceNodeData & InnerNodeData & {
|
|
14
|
+
measure?: boolean;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Service: React.MemoExoticComponent<(props: NodeProps<Node<ServiceNodeData & InnerNodeData>>) => import("react/jsx-runtime").JSX.Element>;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,IAAI,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EAA6B,aAAa,EAAE,eAAe,EAAC,cAAgC;AAMnG,eAAO,MAAM,aAAa,UAAW,eAAe,GAAG,aAAa,GAAG;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,4CAwBA,CAAA;AAGD,eAAO,MAAM,OAAO,oCAAsB,UAAU,KAAK,eAAe,GAAG,aAAa,CAAC,CAAC,6CAaxE,CAAC"}
|