strategy-panel 1.0.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/.eslintrc.js +9 -0
- package/.fatherrc.ts +26 -0
- package/.prettierrc.js +1 -0
- package/.umirc.ts +29 -0
- package/LICENSE +22 -0
- package/README.md +33 -0
- package/es/assets/AND.svg +11 -0
- package/es/assets/OR.svg +11 -0
- package/es/assets/XOR.svg +11 -0
- package/es/assets/add.svg +13 -0
- package/es/assets/alarm.svg +11 -0
- package/es/assets/application.svg +11 -0
- package/es/assets/cancel.svg +13 -0
- package/es/assets/check.svg +12 -0
- package/es/assets/condition.svg +12 -0
- package/es/assets/control.svg +11 -0
- package/es/assets/decive.svg +11 -0
- package/es/assets/delete.svg +11 -0
- package/es/assets/device.svg +11 -0
- package/es/assets/edit.svg +11 -0
- package/es/assets/hand.svg +11 -0
- package/es/assets/link.svg +11 -0
- package/es/assets/logical.svg +12 -0
- package/es/assets/notice.svg +11 -0
- package/es/assets/order.svg +11 -0
- package/es/assets/relation.svg +11 -0
- package/es/assets/rhombus.svg +3 -0
- package/es/assets/save.svg +13 -0
- package/es/assets/time.svg +11 -0
- package/es/assets/variate.svg +12 -0
- package/es/common/constants/global.d.ts +1 -0
- package/es/common/constants/global.js +1 -0
- package/es/common/constants/graph.d.ts +10 -0
- package/es/common/constants/graph.js +17 -0
- package/es/common/graph-common/category-type.d.ts +16 -0
- package/es/common/graph-common/category-type.js +72 -0
- package/es/common/graph-common/connector/index.d.ts +1 -0
- package/es/common/graph-common/connector/index.js +14 -0
- package/es/common/graph-common/node-element/common-element.less +117 -0
- package/es/common/graph-common/node-element/condition-element.d.ts +8 -0
- package/es/common/graph-common/node-element/condition-element.js +35 -0
- package/es/common/graph-common/node-element/condition-element.less +82 -0
- package/es/common/graph-common/node-element/logical-element.d.ts +8 -0
- package/es/common/graph-common/node-element/logical-element.js +34 -0
- package/es/common/graph-common/node-element/logical-element.less +54 -0
- package/es/common/graph-common/node-element/node-element.d.ts +8 -0
- package/es/common/graph-common/node-element/node-element.js +27 -0
- package/es/common/graph-common/node-element/node-element.less +48 -0
- package/es/common/graph-common/node-element/node-group.d.ts +8 -0
- package/es/common/graph-common/node-element/node-group.js +395 -0
- package/es/common/graph-common/node-element/node-group.less +53 -0
- package/es/common/graph-common/node-popover/index.d.ts +7 -0
- package/es/common/graph-common/node-popover/index.js +11 -0
- package/es/common/graph-common/node-popover/index.less +5 -0
- package/es/common/graph-common/node-types.d.ts +28 -0
- package/es/common/graph-common/node-types.js +60 -0
- package/es/common/graph-common/shape/edge.d.ts +10 -0
- package/es/common/graph-common/shape/edge.js +115 -0
- package/es/common/graph-common/shape/edge.less +8 -0
- package/es/common/graph-common/shape/node.d.ts +6 -0
- package/es/common/graph-common/shape/node.js +6 -0
- package/es/common/graph-common/shape/nodes/BaseNode.d.ts +4 -0
- package/es/common/graph-common/shape/nodes/BaseNode.js +46 -0
- package/es/common/graph-common/shape/nodes/CommonNode.d.ts +5 -0
- package/es/common/graph-common/shape/nodes/CommonNode.js +118 -0
- package/es/common/graph-common/shape/nodes/ConditionJudgment.d.ts +5 -0
- package/es/common/graph-common/shape/nodes/ConditionJudgment.js +130 -0
- package/es/common/graph-common/shape/nodes/GroupNode.d.ts +4 -0
- package/es/common/graph-common/shape/nodes/GroupNode.js +99 -0
- package/es/common/graph-common/shape/nodes/LogicalNode.d.ts +5 -0
- package/es/common/graph-common/shape/nodes/LogicalNode.js +130 -0
- package/es/common/graph-utils/graph.d.ts +83 -0
- package/es/common/graph-utils/graph.js +98 -0
- package/es/component/cut.d.ts +10 -0
- package/es/component/cut.js +34 -0
- package/es/component/cut.less +6 -0
- package/es/component/item-name.d.ts +6 -0
- package/es/component/item-name.js +30 -0
- package/es/component/keyword.d.ts +9 -0
- package/es/component/keyword.js +26 -0
- package/es/component/keyword.less +11 -0
- package/es/component/rx-component/rx-input.d.ts +8 -0
- package/es/component/rx-component/rx-input.js +47 -0
- package/es/hooks/useObservableState.d.ts +3 -0
- package/es/hooks/useObservableState.js +44 -0
- package/es/index.d.ts +8 -0
- package/es/index.js +9 -0
- package/es/pages/component-tree-panel/category-tree/index.d.ts +16 -0
- package/es/pages/component-tree-panel/category-tree/index.js +100 -0
- package/es/pages/component-tree-panel/category-tree/index.less +35 -0
- package/es/pages/component-tree-panel/category-tree/node-title.d.ts +12 -0
- package/es/pages/component-tree-panel/category-tree/node-title.js +57 -0
- package/es/pages/component-tree-panel/category-tree/node-title.less +113 -0
- package/es/pages/component-tree-panel/index.d.ts +17 -0
- package/es/pages/component-tree-panel/index.js +19 -0
- package/es/pages/component-tree-panel/index.less +51 -0
- package/es/pages/config-panel/components/condition-configuration/configure-modal/data-origin.d.ts +49 -0
- package/es/pages/config-panel/components/condition-configuration/configure-modal/data-origin.js +212 -0
- package/es/pages/config-panel/components/condition-configuration/configure-modal/index.d.ts +11 -0
- package/es/pages/config-panel/components/condition-configuration/configure-modal/index.js +178 -0
- package/es/pages/config-panel/components/condition-configuration/configure-modal/style.less +13 -0
- package/es/pages/config-panel/components/condition-configuration/cross-line.d.ts +8 -0
- package/es/pages/config-panel/components/condition-configuration/cross-line.js +47 -0
- package/es/pages/config-panel/components/condition-configuration/index.d.ts +9 -0
- package/es/pages/config-panel/components/condition-configuration/index.js +180 -0
- package/es/pages/config-panel/components/condition-configuration/style.less +70 -0
- package/es/pages/config-panel/components/time-trigger/components/cycle-time.d.ts +8 -0
- package/es/pages/config-panel/components/time-trigger/components/cycle-time.js +87 -0
- package/es/pages/config-panel/components/time-trigger/components/time-horizon.d.ts +9 -0
- package/es/pages/config-panel/components/time-trigger/components/time-horizon.js +73 -0
- package/es/pages/config-panel/components/time-trigger/delay-time.d.ts +8 -0
- package/es/pages/config-panel/components/time-trigger/delay-time.js +18 -0
- package/es/pages/config-panel/components/time-trigger/index.d.ts +8 -0
- package/es/pages/config-panel/components/time-trigger/index.js +84 -0
- package/es/pages/config-panel/components/time-trigger/interval-time.d.ts +8 -0
- package/es/pages/config-panel/components/time-trigger/interval-time.js +50 -0
- package/es/pages/config-panel/components/time-trigger/persistent-time.d.ts +8 -0
- package/es/pages/config-panel/components/time-trigger/persistent-time.js +18 -0
- package/es/pages/config-panel/components/time-trigger/timing-time.d.ts +8 -0
- package/es/pages/config-panel/components/time-trigger/timing-time.js +52 -0
- package/es/pages/config-panel/config-common.d.ts +37 -0
- package/es/pages/config-panel/config-common.js +135 -0
- package/es/pages/config-panel/index.d.ts +12 -0
- package/es/pages/config-panel/index.js +50 -0
- package/es/pages/config-panel/node-form.d.ts +21 -0
- package/es/pages/config-panel/node-form.js +97 -0
- package/es/pages/config-panel/style.less +62 -0
- package/es/pages/dag-canvas/canvas-content.d.ts +9 -0
- package/es/pages/dag-canvas/canvas-content.js +92 -0
- package/es/pages/dag-canvas/canvas-content.less +5 -0
- package/es/pages/dag-canvas/index.d.ts +13 -0
- package/es/pages/dag-canvas/index.js +28 -0
- package/es/pages/dag-canvas/index.less +11 -0
- package/es/pages/dag-canvas/preview.d.ts +9 -0
- package/es/pages/dag-canvas/preview.js +34 -0
- package/es/pages/index.d.ts +37 -0
- package/es/pages/index.js +73 -0
- package/es/pages/index.less +50 -0
- package/es/pages/rx-models/experiment-graph.d.ts +82 -0
- package/es/pages/rx-models/experiment-graph.js +1186 -0
- package/es/pages/rx-models/graph-core.d.ts +96 -0
- package/es/pages/rx-models/graph-core.js +755 -0
- package/es/pages/rx-models/graph-core.less +14 -0
- package/es/pages/rx-models/graph-util.d.ts +186 -0
- package/es/pages/rx-models/graph-util.js +358 -0
- package/es/pages/rx-models/typing.d.ts +126 -0
- package/es/pages/strategy-header/index.d.ts +56 -0
- package/es/pages/strategy-header/index.js +141 -0
- package/es/pages/strategy-header/style.less +22 -0
- package/es/pages/strategy-header/theme-switch/index.d.ts +4 -0
- package/es/pages/strategy-header/theme-switch/index.js +19 -0
- package/es/pages/strategy-header/theme-switch/style.less +11 -0
- package/es/style/basic.less +12 -0
- package/es/style/default.less +2 -0
- package/es/style/position.less +25 -0
- package/es/style/theme-light.less +7 -0
- package/es/style/variable.less +3 -0
- package/es/typings.d.ts +6 -0
- package/es/utils/utils.d.ts +1 -0
- package/es/utils/utils.js +1 -0
- package/package.json +70 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@/style/position.less';
|
|
3
|
+
import './style.less';
|
|
4
|
+
export interface HeaderProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description id
|
|
7
|
+
* @description.zh-CN 唯一识别id
|
|
8
|
+
* @default 1
|
|
9
|
+
*/
|
|
10
|
+
experimentId: string;
|
|
11
|
+
/**
|
|
12
|
+
* @description strategy name
|
|
13
|
+
* @description.zh-CN 策略名称
|
|
14
|
+
*/
|
|
15
|
+
name?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @description available
|
|
18
|
+
* @description.zh-CN 策略是否启用
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
isActive?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @description Switch available state
|
|
24
|
+
* @description.zh-CN 切换测试启用状态函数
|
|
25
|
+
*/
|
|
26
|
+
onActiveSwitch?: (isActive: boolean) => void;
|
|
27
|
+
/**
|
|
28
|
+
* 可以这样写属性描述
|
|
29
|
+
* @description Trigger after cancel edit
|
|
30
|
+
* @description.zh-CN 取消编辑后后回调事件
|
|
31
|
+
*/
|
|
32
|
+
onNameChange?: (name?: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* 可以这样写属性描述
|
|
35
|
+
* @description Trigger after cancel edit
|
|
36
|
+
* @description.zh-CN 取消编辑后后回调事件
|
|
37
|
+
*/
|
|
38
|
+
onCancel?: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* @description Trigger after submitting
|
|
41
|
+
* @description.zh-CN 编辑完成后后回调事件
|
|
42
|
+
*/
|
|
43
|
+
onSave?: (type: 'application' | 'data', expGraph?: any) => void;
|
|
44
|
+
/**
|
|
45
|
+
* 可以这样写属性描述
|
|
46
|
+
* @description Trigger after cancel edit
|
|
47
|
+
* @description.zh-CN 取消编辑后后回调事件
|
|
48
|
+
*/
|
|
49
|
+
extraHeaderData?: {
|
|
50
|
+
name: string;
|
|
51
|
+
imgUrl: string;
|
|
52
|
+
onClick?: () => void;
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
declare const Index: React.FC<HeaderProps>;
|
|
56
|
+
export default Index;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import "antd/es/input/style";
|
|
2
|
+
import _Input from "antd/es/input";
|
|
3
|
+
|
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
|
|
6
|
+
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."); }
|
|
7
|
+
|
|
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
|
+
|
|
10
|
+
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; }
|
|
11
|
+
|
|
12
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
13
|
+
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
|
|
16
|
+
import React, { useState } from 'react';
|
|
17
|
+
import { useExperimentGraph } from "../rx-models/experiment-graph"; // import ThemeSwitch from './theme-switch';
|
|
18
|
+
|
|
19
|
+
import "../../style/position.less";
|
|
20
|
+
import "./style.less";
|
|
21
|
+
|
|
22
|
+
var Index = function Index(props) {
|
|
23
|
+
var name = props.name,
|
|
24
|
+
_props$isActive = props.isActive,
|
|
25
|
+
isActive = _props$isActive === void 0 ? false : _props$isActive,
|
|
26
|
+
onActiveSwitch = props.onActiveSwitch,
|
|
27
|
+
onCancel = props.onCancel,
|
|
28
|
+
onSave = props.onSave,
|
|
29
|
+
experimentId = props.experimentId,
|
|
30
|
+
onNameChange = props.onNameChange,
|
|
31
|
+
extraHeaderData = props.extraHeaderData;
|
|
32
|
+
|
|
33
|
+
var _useState = useState(false),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
bordered = _useState2[0],
|
|
36
|
+
setBordered = _useState2[1];
|
|
37
|
+
|
|
38
|
+
var expGraph = useExperimentGraph(experimentId);
|
|
39
|
+
|
|
40
|
+
var handleSave = function handleSave(type) {
|
|
41
|
+
var _expGraph$graph, _expGraph$graph2;
|
|
42
|
+
|
|
43
|
+
console.log('expGraphData', expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph = expGraph.graph) === null || _expGraph$graph === void 0 ? void 0 : _expGraph$graph.toJSON()); // console.log('getNodes', expGraph?.graph?.getNodes());
|
|
44
|
+
|
|
45
|
+
onSave === null || onSave === void 0 ? void 0 : onSave(type, expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph2 = expGraph.graph) === null || _expGraph$graph2 === void 0 ? void 0 : _expGraph$graph2.toJSON());
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var handleFocus = function handleFocus() {
|
|
49
|
+
setBordered(true);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var handleEditName = function handleEditName(strategyName) {
|
|
53
|
+
onNameChange === null || onNameChange === void 0 ? void 0 : onNameChange(strategyName);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var handleBlur = function handleBlur(e) {
|
|
57
|
+
handleEditName(e.target.value);
|
|
58
|
+
setBordered(false);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var handlePressEnter = function handlePressEnter(e) {
|
|
62
|
+
e.target.blur();
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: "strategyHeader"
|
|
67
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: "pos-btw"
|
|
69
|
+
}, /*#__PURE__*/React.createElement(_Input, {
|
|
70
|
+
defaultValue: name,
|
|
71
|
+
placeholder: "\u7B56\u7565\u540D\u79F0",
|
|
72
|
+
style: {
|
|
73
|
+
width: 265
|
|
74
|
+
},
|
|
75
|
+
bordered: bordered,
|
|
76
|
+
onFocus: handleFocus,
|
|
77
|
+
onBlur: handleBlur,
|
|
78
|
+
onPressEnter: handlePressEnter
|
|
79
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: "pos-end"
|
|
81
|
+
}, extraHeaderData === null || extraHeaderData === void 0 ? void 0 : extraHeaderData.map(function (item, index) {
|
|
82
|
+
return (
|
|
83
|
+
/*#__PURE__*/
|
|
84
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
85
|
+
React.createElement("span", {
|
|
86
|
+
key: index,
|
|
87
|
+
onClick: item === null || item === void 0 ? void 0 : item.onClick,
|
|
88
|
+
className: "header-btn"
|
|
89
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
90
|
+
alt: "",
|
|
91
|
+
className: "header-btn-img",
|
|
92
|
+
src: item.imgUrl
|
|
93
|
+
}), item.name)
|
|
94
|
+
);
|
|
95
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
96
|
+
onClick: function onClick() {
|
|
97
|
+
handleSave('application');
|
|
98
|
+
},
|
|
99
|
+
className: "header-btn"
|
|
100
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
101
|
+
alt: "",
|
|
102
|
+
className: "header-btn-img",
|
|
103
|
+
src: require("../../assets/save.svg")
|
|
104
|
+
}), "\u4FDD\u5B58\u4E3A\u5E94\u7528"), /*#__PURE__*/React.createElement("span", {
|
|
105
|
+
className: "header-btn",
|
|
106
|
+
onClick: onCancel
|
|
107
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
108
|
+
alt: "",
|
|
109
|
+
className: "header-btn-img",
|
|
110
|
+
src: require("../../assets/cancel.svg")
|
|
111
|
+
}), "\u53D6\u6D88"), /*#__PURE__*/React.createElement("span", {
|
|
112
|
+
className: "header-btn",
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
handleSave('data');
|
|
115
|
+
}
|
|
116
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
117
|
+
alt: "",
|
|
118
|
+
className: "header-btn-img",
|
|
119
|
+
src: require("../../assets/save.svg")
|
|
120
|
+
}), "\u4FDD\u5B58"), isActive ? /*#__PURE__*/React.createElement("span", {
|
|
121
|
+
className: "header-btn",
|
|
122
|
+
onClick: function onClick() {
|
|
123
|
+
onActiveSwitch === null || onActiveSwitch === void 0 ? void 0 : onActiveSwitch(false);
|
|
124
|
+
}
|
|
125
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
126
|
+
alt: "",
|
|
127
|
+
className: "header-btn-img",
|
|
128
|
+
src: require("../../assets/cancel.svg")
|
|
129
|
+
}), "\u505C\u7528") : /*#__PURE__*/React.createElement("span", {
|
|
130
|
+
className: "header-btn",
|
|
131
|
+
onClick: function onClick() {
|
|
132
|
+
onActiveSwitch === null || onActiveSwitch === void 0 ? void 0 : onActiveSwitch(true);
|
|
133
|
+
}
|
|
134
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
135
|
+
alt: "",
|
|
136
|
+
className: "header-btn-img",
|
|
137
|
+
src: require("../../assets/check.svg")
|
|
138
|
+
}), "\u542F\u7528"))));
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export default Index;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import (reference) '../../style/theme-light';
|
|
2
|
+
|
|
3
|
+
.header-btn {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
margin-right: 15px;
|
|
7
|
+
font-size: 12px;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
.header-btn-img {
|
|
10
|
+
width: 13px;
|
|
11
|
+
height: 13px;
|
|
12
|
+
margin-right: 5px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.strategyHeader {
|
|
17
|
+
height: 45px !important;
|
|
18
|
+
line-height: 45px !important;
|
|
19
|
+
padding: 0 15px;
|
|
20
|
+
background: @light-gray-bg;
|
|
21
|
+
box-shadow: 0 2px 30px 0 rgba(137, 137, 137, 0.3);
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "antd/es/switch/style";
|
|
2
|
+
import _Switch from "antd/es/switch";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import "./style.less";
|
|
5
|
+
|
|
6
|
+
var Index = function Index() {
|
|
7
|
+
var handleThemeChange = function handleThemeChange(checked) {
|
|
8
|
+
console.log('checked', checked);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: "theme-switch"
|
|
13
|
+
}, /*#__PURE__*/React.createElement(_Switch, {
|
|
14
|
+
defaultChecked: false,
|
|
15
|
+
onChange: handleThemeChange
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default Index;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.pos-btw{
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
}
|
|
6
|
+
.pos-end {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: flex-end;
|
|
10
|
+
}
|
|
11
|
+
.pos-center{
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
.pos-line-center{
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.flex-1{
|
|
22
|
+
flex: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
package/es/typings.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { unescape } from 'lodash-es';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { unescape } from 'lodash-es';
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "strategy-panel",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"start": "dumi dev",
|
|
6
|
+
"docs:build": "dumi build",
|
|
7
|
+
"docs:deploy": "gh-pages -d docs-dist",
|
|
8
|
+
"build": "father-build",
|
|
9
|
+
"deploy": "npm run docs:build && npm run docs:deploy",
|
|
10
|
+
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
|
11
|
+
"test": "umi-test",
|
|
12
|
+
"test:coverage": "umi-test --coverage",
|
|
13
|
+
"prepublishOnly": "npm run build"
|
|
14
|
+
},
|
|
15
|
+
"module": "es/index.js",
|
|
16
|
+
"typings": "es/index.d.ts",
|
|
17
|
+
"gitHooks": {
|
|
18
|
+
"pre-commit": "lint-staged"
|
|
19
|
+
},
|
|
20
|
+
"lint-staged": {
|
|
21
|
+
"*.{js,jsx,json}": [
|
|
22
|
+
"prettier --write"
|
|
23
|
+
],
|
|
24
|
+
"*.ts?(x)": [
|
|
25
|
+
"prettier --parser=typescript --write"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@ant-design/icons": "^4.2.1",
|
|
30
|
+
"@antv/x6": "^1.28.1",
|
|
31
|
+
"@antv/x6-react-components": "^1.1.14",
|
|
32
|
+
"@antv/x6-react-shape": "^1.5.2",
|
|
33
|
+
"@types/lodash-es": "^4.17.5",
|
|
34
|
+
"@types/marked": "^3.0.2",
|
|
35
|
+
"@types/node": "^17.0.21",
|
|
36
|
+
"antd": "^4.4.2",
|
|
37
|
+
"classnames": "^2.2.6",
|
|
38
|
+
"dompurify": "^2.1.1",
|
|
39
|
+
"immer": "^9.0.12",
|
|
40
|
+
"marked": "^3.0.8",
|
|
41
|
+
"moment": "^2.29.1",
|
|
42
|
+
"react": "^16.13.1",
|
|
43
|
+
"react-dnd": "^11.1.3",
|
|
44
|
+
"react-dnd-html5-backend": "^11.1.3",
|
|
45
|
+
"react-dom": "^16.13.1",
|
|
46
|
+
"react-svg": "^14.1.12"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@testing-library/jest-dom": "^5.15.1",
|
|
50
|
+
"@testing-library/react": "^12.1.2",
|
|
51
|
+
"@types/jest": "^27.0.3",
|
|
52
|
+
"@umijs/fabric": "^2.8.1",
|
|
53
|
+
"@umijs/test": "^3.0.5",
|
|
54
|
+
"@umijs/yorkie": "^2.0.3",
|
|
55
|
+
"babel-plugin-import": "^1.13.3",
|
|
56
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
57
|
+
"babel-plugin-react-css-modules": "^5.2.6",
|
|
58
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
59
|
+
"dumi": "^1.1.0",
|
|
60
|
+
"eslint": "^7.1.0",
|
|
61
|
+
"eslint-plugin-react": "^7.28.0",
|
|
62
|
+
"father-build": "^1.17.2",
|
|
63
|
+
"gh-pages": "^3.0.0",
|
|
64
|
+
"lint-staged": "^10.0.7",
|
|
65
|
+
"prettier": "^2.2.1",
|
|
66
|
+
"yorkie": "^2.0.0",
|
|
67
|
+
"umi-lint": "^2.0.2"
|
|
68
|
+
},
|
|
69
|
+
"license" : "MIT"
|
|
70
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"jsx": "react",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
"paths": {
|
|
13
|
+
"@/*": ["src/*"],
|
|
14
|
+
"@tmp/*": ["src/pages/.umi/*"]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*"]
|
|
18
|
+
}
|