@qn-pandora/pandora-component 5.1.1 → 5.1.3

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.
Files changed (145) hide show
  1. package/es/components/AutoComplete/style.css +17 -17
  2. package/es/components/Button/style.css +69 -69
  3. package/es/components/Button/style.less +1 -1
  4. package/es/components/Card/style.css +11 -11
  5. package/es/components/CheckTransformList/style.css +19 -19
  6. package/es/components/Checkbox/index.js +9 -1
  7. package/es/components/CheckboxList/style.css +5 -5
  8. package/es/components/Collapse/style.css +1 -1
  9. package/es/components/DateTimePicker/Base/index.d.ts +3 -0
  10. package/es/components/DateTimePicker/Base/index.js +51 -6
  11. package/es/components/DateTimePicker/Base/style.css +67 -61
  12. package/es/components/DateTimePicker/Base/style.less +7 -0
  13. package/es/components/DateTimePicker/DisplayInput/index.js +3 -1
  14. package/es/components/DateTimePicker/DisplayInput/style.css +14 -14
  15. package/es/components/DateTimePicker/constants.d.ts +7 -1
  16. package/es/components/DateTimePicker/constants.js +1 -0
  17. package/es/components/DateTimePicker/time.d.ts +1 -0
  18. package/es/components/DateTimePicker/time.js +1 -0
  19. package/es/components/DateTimePicker/transform.js +4 -2
  20. package/es/components/Drawer/index.d.ts +1 -1
  21. package/es/components/FileResumable/index.js +2 -3
  22. package/es/components/FileResumable/style.css +8 -8
  23. package/es/components/FlameGraph/customTooltip.d.ts +22 -0
  24. package/es/components/FlameGraph/customTooltip.js +91 -0
  25. package/es/components/FlameGraph/index.d.ts +16 -0
  26. package/es/components/FlameGraph/index.js +96 -0
  27. package/es/components/FlameGraph/style.css +8 -0
  28. package/es/components/FlameGraph/style.less +14 -0
  29. package/es/components/Input/style.css +14 -14
  30. package/es/components/Menu/Option.d.ts +1 -1
  31. package/es/components/Menu/Option.js +12 -4
  32. package/es/components/Menu/style.css +23 -23
  33. package/es/components/Modal/style.css +1 -1
  34. package/es/components/NameExplainTooltip/style.css +1 -1
  35. package/es/components/OptionList/InlineOptionList/style.css +1 -1
  36. package/es/components/OptionList/OptionItem/style.css +2 -2
  37. package/es/components/OptionList/PopoverOptionList/style.css +3 -3
  38. package/es/components/OptionList/style.css +6 -6
  39. package/es/components/RadioGroup/style.css +35 -32
  40. package/es/components/RadioGroup/style.less +4 -0
  41. package/es/components/RangeInput/style.css +29 -29
  42. package/es/components/Selector/style.css +17 -17
  43. package/es/components/Spin/style.css +2 -2
  44. package/es/components/Steps/style.css +16 -16
  45. package/es/components/Table/ColumnSetting/index.d.ts +1 -0
  46. package/es/components/Table/ColumnSetting/index.js +19 -14
  47. package/es/components/Table/ColumnTag/style.css +4 -4
  48. package/es/components/Table/EmptyText.d.ts +7 -0
  49. package/es/components/Table/EmptyText.js +22 -0
  50. package/es/components/Table/ResizableTitle/index.js +12 -2
  51. package/es/components/Table/index.d.ts +11 -83
  52. package/es/components/Table/index.js +114 -287
  53. package/es/components/Table/style.css +54 -44
  54. package/es/components/Table/style.less +23 -4
  55. package/es/components/Table/type.d.ts +63 -0
  56. package/es/components/Table/type.js +5 -0
  57. package/es/components/Table/util.d.ts +59 -0
  58. package/es/components/Table/util.js +224 -0
  59. package/es/components/Tabs/style.css +10 -10
  60. package/es/components/TagList/Tag/style.css +5 -5
  61. package/es/components/TagList/TagSwitch/style.css +1 -1
  62. package/es/components/TagList/style.css +6 -6
  63. package/es/components/Timeline/TimelineItem/style.css +1 -1
  64. package/es/components/TreeSelector/style.css +21 -21
  65. package/es/constants/language/datetime/en.js +4 -2
  66. package/es/constants/language/datetime/type.d.ts +4 -2
  67. package/es/constants/language/datetime/zh.js +4 -2
  68. package/es/index.css +4666 -4639
  69. package/es/index.d.ts +1 -0
  70. package/es/index.js +1 -0
  71. package/es/index.less +18 -17
  72. package/es/style/theme.less +3 -3
  73. package/lib/components/AutoComplete/style.css +17 -17
  74. package/lib/components/Button/style.css +69 -69
  75. package/lib/components/Button/style.less +1 -1
  76. package/lib/components/Card/style.css +11 -11
  77. package/lib/components/CheckTransformList/style.css +19 -19
  78. package/lib/components/Checkbox/index.js +9 -1
  79. package/lib/components/CheckboxList/style.css +5 -5
  80. package/lib/components/Collapse/style.css +1 -1
  81. package/lib/components/DateTimePicker/Base/index.d.ts +3 -0
  82. package/lib/components/DateTimePicker/Base/index.js +51 -6
  83. package/lib/components/DateTimePicker/Base/style.css +67 -61
  84. package/lib/components/DateTimePicker/Base/style.less +7 -0
  85. package/lib/components/DateTimePicker/DisplayInput/index.js +3 -1
  86. package/lib/components/DateTimePicker/DisplayInput/style.css +14 -14
  87. package/lib/components/DateTimePicker/constants.d.ts +7 -1
  88. package/lib/components/DateTimePicker/constants.js +1 -0
  89. package/lib/components/DateTimePicker/time.d.ts +1 -0
  90. package/lib/components/DateTimePicker/time.js +1 -0
  91. package/lib/components/DateTimePicker/transform.js +4 -2
  92. package/lib/components/Drawer/index.d.ts +1 -1
  93. package/lib/components/FileResumable/index.js +2 -3
  94. package/lib/components/FileResumable/style.css +8 -8
  95. package/lib/components/FlameGraph/customTooltip.d.ts +22 -0
  96. package/lib/components/FlameGraph/customTooltip.js +114 -0
  97. package/lib/components/FlameGraph/index.d.ts +16 -0
  98. package/lib/components/FlameGraph/index.js +117 -0
  99. package/lib/components/FlameGraph/style.css +8 -0
  100. package/lib/components/FlameGraph/style.less +14 -0
  101. package/lib/components/Input/style.css +14 -14
  102. package/lib/components/Menu/Option.d.ts +1 -1
  103. package/lib/components/Menu/Option.js +17 -25
  104. package/lib/components/Menu/style.css +23 -23
  105. package/lib/components/Modal/style.css +1 -1
  106. package/lib/components/NameExplainTooltip/style.css +1 -1
  107. package/lib/components/OptionList/InlineOptionList/style.css +1 -1
  108. package/lib/components/OptionList/OptionItem/style.css +2 -2
  109. package/lib/components/OptionList/PopoverOptionList/style.css +3 -3
  110. package/lib/components/OptionList/style.css +6 -6
  111. package/lib/components/RadioGroup/style.css +35 -32
  112. package/lib/components/RadioGroup/style.less +4 -0
  113. package/lib/components/RangeInput/style.css +29 -29
  114. package/lib/components/Selector/style.css +17 -17
  115. package/lib/components/Spin/style.css +2 -2
  116. package/lib/components/Steps/style.css +16 -16
  117. package/lib/components/Table/ColumnSetting/index.d.ts +1 -0
  118. package/lib/components/Table/ColumnSetting/index.js +19 -14
  119. package/lib/components/Table/ColumnTag/style.css +4 -4
  120. package/lib/components/Table/EmptyText.d.ts +7 -0
  121. package/lib/components/Table/EmptyText.js +27 -0
  122. package/lib/components/Table/ResizableTitle/index.js +12 -2
  123. package/lib/components/Table/index.d.ts +11 -83
  124. package/lib/components/Table/index.js +118 -289
  125. package/lib/components/Table/style.css +54 -44
  126. package/lib/components/Table/style.less +23 -4
  127. package/lib/components/Table/type.d.ts +63 -0
  128. package/lib/components/Table/type.js +8 -0
  129. package/lib/components/Table/util.d.ts +59 -0
  130. package/lib/components/Table/util.js +233 -0
  131. package/lib/components/Tabs/style.css +10 -10
  132. package/lib/components/TagList/Tag/style.css +5 -5
  133. package/lib/components/TagList/TagSwitch/style.css +1 -1
  134. package/lib/components/TagList/style.css +6 -6
  135. package/lib/components/Timeline/TimelineItem/style.css +1 -1
  136. package/lib/components/TreeSelector/style.css +21 -21
  137. package/lib/constants/language/datetime/en.js +4 -2
  138. package/lib/constants/language/datetime/type.d.ts +4 -2
  139. package/lib/constants/language/datetime/zh.js +4 -2
  140. package/lib/index.css +6603 -6576
  141. package/lib/index.d.ts +1 -0
  142. package/lib/index.js +3 -1
  143. package/lib/index.less +22 -21
  144. package/lib/style/theme.less +3 -3
  145. package/package.json +8 -5
@@ -62,7 +62,7 @@
62
62
  text-align: center;
63
63
  }
64
64
  .ant-upload.ant-upload-select-picture-card:hover {
65
- border-color: #7a869a;
65
+ border-color: #436bff;
66
66
  }
67
67
  .ant-upload-disabled.ant-upload.ant-upload-select-picture-card:hover {
68
68
  border-color: #e5e5e5;
@@ -83,7 +83,7 @@
83
83
  padding: 16px 0;
84
84
  }
85
85
  .ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled) {
86
- border-color: #555f73;
86
+ border-color: #2e4dd9;
87
87
  }
88
88
  .ant-upload.ant-upload-drag.ant-upload-disabled {
89
89
  cursor: not-allowed;
@@ -97,13 +97,13 @@
97
97
  vertical-align: middle;
98
98
  }
99
99
  .ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover {
100
- border-color: #9ca0a6;
100
+ border-color: #6b90ff;
101
101
  }
102
102
  .ant-upload.ant-upload-drag p.ant-upload-drag-icon {
103
103
  margin-bottom: 20px;
104
104
  }
105
105
  .ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon {
106
- color: #9ca0a6;
106
+ color: #6b90ff;
107
107
  font-size: 48px;
108
108
  }
109
109
  .ant-upload.ant-upload-drag p.ant-upload-text {
@@ -223,7 +223,7 @@
223
223
  font-size: 14px;
224
224
  }
225
225
  .ant-upload-list-item:hover .ant-upload-list-item-info {
226
- background-color: rgba(44, 109, 210, 0.05);
226
+ background-color: rgba(67, 107, 255, 0.05);
227
227
  }
228
228
  .ant-upload-list-item:hover .ant-upload-list-item-card-actions-btn {
229
229
  opacity: 1;
@@ -651,7 +651,7 @@
651
651
  text-align: right;
652
652
  }
653
653
  .pandora-sdk-file-resumable-run-container .pandora-sdk-file-resumable-run-container-icon {
654
- color: #2c6dd2;
654
+ color: #436bff;
655
655
  cursor: pointer;
656
656
  font-size: 14px;
657
657
  margin: 0 6px;
@@ -667,12 +667,12 @@
667
667
  color: #bfbfbf;
668
668
  }
669
669
  .downloadIcon {
670
- color: #2c6dd2;
670
+ color: #436bff;
671
671
  cursor: pointer;
672
672
  font-size: 20px;
673
673
  }
674
674
  .pandora-sdk-file-resumable:hover {
675
- border-color: #2c6dd2;
675
+ border-color: #436bff;
676
676
  }
677
677
  .pandora-sdk-file-resumable-img-container {
678
678
  background: #ffffff;
@@ -0,0 +1,22 @@
1
+ declare function defaultLabel(d: any): string;
2
+ export declare function defaultFlamegraphTooltip(): {
3
+ (): void;
4
+ show(d: any): any;
5
+ hide(): any;
6
+ /**
7
+ * Gets/sets a function converting the d3 data into the tooltip's textContent.
8
+ *
9
+ * Cannot be combined with tip.html().
10
+ */
11
+ text(_: any): typeof defaultLabel | any;
12
+ /**
13
+ * Gets/sets a function converting the d3 data into the tooltip's innerHTML.
14
+ *
15
+ * Cannot be combined with tip.text().
16
+ *
17
+ * @deprecated prefer tip.text().
18
+ */
19
+ html(_: any): typeof defaultLabel | any;
20
+ destroy(): void;
21
+ };
22
+ export {};
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.defaultFlamegraphTooltip = void 0;
23
+ /**
24
+ * 库里面copy 出来,修改了 tooltip 的展示内容
25
+ * https://github.com/spiermar/d3-flame-graph/blob/master/src/tooltip.js
26
+ */
27
+ var d3 = __importStar(require("d3"));
28
+ function defaultLabel(d) {
29
+ if (d.data.name === 'root') {
30
+ return "\n <div>\n <span>Name:" + d.data.name + "</span>\n </div>";
31
+ }
32
+ var percentofParent = d.parent
33
+ ? ((d.value / d.parent.value) * 100).toFixed(2)
34
+ : 100;
35
+ var siblingPercentage = d.data.depthPercentage.toFixed(2);
36
+ return "\n <div>\n <span>Name:" + d.data.name + "</span><br/>\n <span>File:" + d.data.source.file + "</span><br/>\n <span>Line:" + d.data.source.line + "</span><br/>\n <span>" + siblingPercentage + "% of all " + percentofParent + "% of parent</span>\n </div>";
37
+ }
38
+ function defaultFlamegraphTooltip() {
39
+ var rootElement = d3.select('body');
40
+ var tooltip = null;
41
+ // Function to get HTML content from data.
42
+ var html = defaultLabel;
43
+ // Function to get text content from data.
44
+ var text = defaultLabel;
45
+ // Whether to use d3's .html() to set content, otherwise use .text().
46
+ var contentIsHTML = true;
47
+ function tip() {
48
+ tooltip = rootElement
49
+ .append('div')
50
+ .style('display', 'none')
51
+ .style('position', 'absolute')
52
+ .style('opacity', 0)
53
+ .style('pointer-events', 'none')
54
+ .style('z-index', 2000)
55
+ .attr('class', 'd3-flame-graph-tip');
56
+ }
57
+ tip.show = function (d) {
58
+ tooltip
59
+ .style('display', 'block')
60
+ .style('left', event.pageX + 5 + 'px')
61
+ .style('top', event.pageY + 5 + 'px')
62
+ .transition()
63
+ .duration(200)
64
+ .style('opacity', 1)
65
+ .style('pointer-events', 'all');
66
+ if (contentIsHTML) {
67
+ tooltip.html(html(d));
68
+ }
69
+ else {
70
+ tooltip.text(text(d));
71
+ }
72
+ return tip;
73
+ };
74
+ tip.hide = function () {
75
+ tooltip
76
+ .style('display', 'none')
77
+ .transition()
78
+ .duration(200)
79
+ .style('opacity', 0)
80
+ .style('pointer-events', 'none');
81
+ return tip;
82
+ };
83
+ /**
84
+ * Gets/sets a function converting the d3 data into the tooltip's textContent.
85
+ *
86
+ * Cannot be combined with tip.html().
87
+ */
88
+ tip.text = function (_) {
89
+ if (!arguments.length)
90
+ return text;
91
+ text = _;
92
+ contentIsHTML = false;
93
+ return tip;
94
+ };
95
+ /**
96
+ * Gets/sets a function converting the d3 data into the tooltip's innerHTML.
97
+ *
98
+ * Cannot be combined with tip.text().
99
+ *
100
+ * @deprecated prefer tip.text().
101
+ */
102
+ tip.html = function (_) {
103
+ if (!arguments.length)
104
+ return html;
105
+ html = _;
106
+ contentIsHTML = true;
107
+ return tip;
108
+ };
109
+ tip.destroy = function () {
110
+ tooltip.remove();
111
+ };
112
+ return tip;
113
+ }
114
+ exports.defaultFlamegraphTooltip = defaultFlamegraphTooltip;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import 'd3-flame-graph/dist/d3-flamegraph.css';
3
+ export interface IFlameGraphData {
4
+ name: string;
5
+ count: number;
6
+ source?: IKeyValues;
7
+ children?: IFlameGraphData[];
8
+ }
9
+ declare const FlameGraph: ({ data, width, height, depth, searchFilters }: {
10
+ data: IFlameGraphData;
11
+ width: number;
12
+ height?: number | undefined;
13
+ depth?: number | undefined;
14
+ searchFilters?: IKeyValues<any>[] | undefined;
15
+ }) => React.JSX.Element;
16
+ export default FlameGraph;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ var react_1 = __importStar(require("react"));
23
+ var d3_flame_graph_1 = require("d3-flame-graph");
24
+ var d3 = __importStar(require("d3"));
25
+ require("d3-flame-graph/dist/d3-flamegraph.css");
26
+ var customTooltip_1 = require("./customTooltip");
27
+ var style_1 = require("../../constants/style");
28
+ var CELL_HEIGHT = 24;
29
+ var MIN_HEIGHT = 300;
30
+ var DEFAULT_OPACITY = 0.8;
31
+ var FlameGraph = function (_a) {
32
+ var data = _a.data, width = _a.width, height = _a.height, depth = _a.depth, searchFilters = _a.searchFilters;
33
+ var flameGraphRef = react_1.useRef(null);
34
+ var flameGraphInstance = react_1.useRef(null); // 存储 flamegraph 实例
35
+ var svgRef = react_1.useRef(null); // 存储 flamegraph 实例
36
+ var currentNodeRef = react_1.useRef(null);
37
+ var colorFunction = function (d) {
38
+ return d.data.color;
39
+ };
40
+ var flameHeight = react_1.useMemo(function () {
41
+ if (height)
42
+ return height;
43
+ if (depth) {
44
+ return depth * CELL_HEIGHT;
45
+ }
46
+ return MIN_HEIGHT;
47
+ }, [height, depth]);
48
+ react_1.useEffect(function () {
49
+ if (flameGraphInstance.current && svgRef.current) {
50
+ flameGraphInstance.current.width(width).height(flameHeight);
51
+ svgRef.current
52
+ .select('svg')
53
+ .attr('width', width)
54
+ .attr('height', flameHeight);
55
+ }
56
+ }, [width, flameHeight]);
57
+ react_1.useEffect(function () {
58
+ if (!data || !flameGraphRef.current)
59
+ return;
60
+ if (!flameGraphInstance.current) {
61
+ var flame = d3_flame_graph_1.flamegraph()
62
+ .width(width)
63
+ .height(flameHeight)
64
+ .cellHeight(CELL_HEIGHT)
65
+ .transitionDuration(750)
66
+ .inverted(true);
67
+ var tip = customTooltip_1.defaultFlamegraphTooltip();
68
+ flame.tooltip(tip);
69
+ flame.setColorMapper(colorFunction);
70
+ flame.onClick(function (d) {
71
+ var preCurrentNode = currentNodeRef.current;
72
+ if (preCurrentNode && d === preCurrentNode) {
73
+ // 如果点击的是当前节点,回调到root)
74
+ if (preCurrentNode.parent) {
75
+ flameGraphInstance.current.resetZoom();
76
+ }
77
+ }
78
+ else {
79
+ // 否则,进入子节点
80
+ currentNodeRef.current = d;
81
+ }
82
+ });
83
+ flameGraphInstance.current = flame;
84
+ }
85
+ // 渲染火焰图到指定的 DOM 元素
86
+ svgRef.current = d3
87
+ .select(flameGraphRef.current)
88
+ .datum(data)
89
+ .call(flameGraphInstance.current);
90
+ // eslint-disable-next-line react-hooks/exhaustive-deps
91
+ }, [data]);
92
+ react_1.useEffect(function () {
93
+ if (svgRef.current && searchFilters) {
94
+ svgRef.current.selectAll('rect').style('opacity', function (d) {
95
+ // 清空选中的值后,图名都需要恢复
96
+ if (searchFilters.length === 0)
97
+ return DEFAULT_OPACITY;
98
+ var matchCount = 0;
99
+ searchFilters.forEach(function (item) {
100
+ if (item.field === 'method' && d.data.name === item.value[0]) {
101
+ matchCount += 1;
102
+ }
103
+ else if (item.field === 'file' &&
104
+ d.data.source.file === item.value[0]) {
105
+ matchCount += 1;
106
+ }
107
+ });
108
+ if (matchCount === searchFilters.length) {
109
+ return DEFAULT_OPACITY;
110
+ }
111
+ return 0.2;
112
+ });
113
+ }
114
+ }, [searchFilters]);
115
+ return (react_1.default.createElement("div", { ref: flameGraphRef, className: style_1.SDK_PREFIX + "-flame-graph-wrapper" }));
116
+ };
117
+ exports.default = FlameGraph;
@@ -0,0 +1,8 @@
1
+ .pandora-sdk-flame-graph-wrapper :global .d3-flame-graph-label {
2
+ padding: 4px 8px;
3
+ text-overflow: ellipsis;
4
+ white-space: nowrap;
5
+ font-size: 11px;
6
+ cursor: pointer;
7
+ overflow: hidden;
8
+ }
@@ -0,0 +1,14 @@
1
+ @import '../../style/theme.less';
2
+
3
+ .@{sdk-prefix}-flame-graph-wrapper {
4
+ :global {
5
+ .d3-flame-graph-label {
6
+ padding: 4px 8px;
7
+ text-overflow: ellipsis;
8
+ white-space: nowrap;
9
+ font-size: 11px;
10
+ cursor: pointer;
11
+ overflow: hidden;
12
+ }
13
+ }
14
+ }
@@ -47,7 +47,7 @@
47
47
  text-overflow: ellipsis;
48
48
  }
49
49
  .ant-input-affix-wrapper:hover {
50
- border-color: #2c6dd2;
50
+ border-color: #436bff;
51
51
  border-right-width: 1px;
52
52
  }
53
53
  .ant-input-rtl .ant-input-affix-wrapper:hover {
@@ -56,9 +56,9 @@
56
56
  }
57
57
  .ant-input-affix-wrapper:focus,
58
58
  .ant-input-affix-wrapper-focused {
59
- border-color: #9ca0a6;
60
- -webkit-box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
61
- box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
59
+ border-color: #6b90ff;
60
+ -webkit-box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
61
+ box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
62
62
  border-right-width: 1px;
63
63
  outline: 0;
64
64
  }
@@ -124,7 +124,7 @@ textarea.ant-input-affix-wrapper {
124
124
  direction: rtl;
125
125
  }
126
126
  .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover {
127
- border-color: #2c6dd2;
127
+ border-color: #436bff;
128
128
  border-right-width: 1px;
129
129
  z-index: 1;
130
130
  }
@@ -352,7 +352,7 @@ textarea.ant-input-affix-wrapper {
352
352
  text-overflow: ellipsis;
353
353
  }
354
354
  .ant-input:hover {
355
- border-color: #2c6dd2;
355
+ border-color: #436bff;
356
356
  border-right-width: 1px;
357
357
  }
358
358
  .ant-input-rtl .ant-input:hover {
@@ -361,9 +361,9 @@ textarea.ant-input-affix-wrapper {
361
361
  }
362
362
  .ant-input:focus,
363
363
  .ant-input-focused {
364
- border-color: #9ca0a6;
365
- -webkit-box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
366
- box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
364
+ border-color: #6b90ff;
365
+ -webkit-box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
366
+ box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
367
367
  border-right-width: 1px;
368
368
  outline: 0;
369
369
  }
@@ -517,7 +517,7 @@ textarea.ant-input {
517
517
  }
518
518
  .ant-input-group-addon .ant-select-open .ant-select-selector,
519
519
  .ant-input-group-addon .ant-select-focused .ant-select-selector {
520
- color: #7a869a;
520
+ color: #436bff;
521
521
  }
522
522
  .ant-input-group-addon .ant-cascader-picker {
523
523
  margin: -9px -12px;
@@ -830,11 +830,11 @@ textarea.ant-input {
830
830
  }
831
831
  .ant-input-search .ant-input:hover,
832
832
  .ant-input-search .ant-input:focus {
833
- border-color: #2c6dd2;
833
+ border-color: #436bff;
834
834
  }
835
835
  .ant-input-search .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
836
836
  .ant-input-search .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
837
- border-left-color: #2c6dd2;
837
+ border-left-color: #436bff;
838
838
  }
839
839
  .ant-input-search .ant-input-affix-wrapper {
840
840
  border-radius: 0;
@@ -939,11 +939,11 @@ textarea.ant-input {
939
939
  }
940
940
  .ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover,
941
941
  .ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover {
942
- border-left-color: #2c6dd2;
942
+ border-left-color: #436bff;
943
943
  }
944
944
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper:hover,
945
945
  .ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper-focused {
946
- border-right-color: #2c6dd2;
946
+ border-right-color: #436bff;
947
947
  }
948
948
  .ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child {
949
949
  right: -1px;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import type { IMenuProps } from './index';
3
3
  export interface IOption {
4
4
  key: string;
@@ -10,41 +10,33 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
31
15
  };
32
16
  Object.defineProperty(exports, "__esModule", { value: true });
33
- var React = __importStar(require("react"));
17
+ var react_1 = __importDefault(require("react"));
34
18
  var antd_1 = require("antd");
35
19
  var style_1 = require("../../constants/style");
36
20
  var Item = antd_1.Menu.Item, SubMenu = antd_1.Menu.SubMenu;
37
21
  function Option(option) {
22
+ var handleTitleClick = function (e, option) {
23
+ var _a;
24
+ if (option.url || option.internalUrl) {
25
+ (_a = option.onMenuClick) === null || _a === void 0 ? void 0 : _a.call(option, e);
26
+ return;
27
+ }
28
+ if (option.weburl) {
29
+ window.open(option.weburl, option.target || '_blank');
30
+ }
31
+ };
38
32
  if (!option.children) {
39
33
  if (option.weburl) {
40
- return (React.createElement(Item, { key: option.key },
41
- React.createElement("a", { className: style_1.SDK_PREFIX + "-menu-item-a", href: option.weburl, target: option.target || '_blank', rel: "noopener noreferrer" }, option.text)));
34
+ return (react_1.default.createElement(Item, { key: option.key },
35
+ react_1.default.createElement("a", { className: style_1.SDK_PREFIX + "-menu-item-a", href: option.weburl, target: option.target || '_blank', rel: "noopener noreferrer" }, option.text)));
42
36
  }
43
- return React.createElement(Item, { key: option.key }, option.text);
37
+ return react_1.default.createElement(Item, { key: option.key }, option.text);
44
38
  }
45
- return (React.createElement(SubMenu, { key: option.key, title: option.text, popupClassName: option.popupClassName,
46
- // 如果子菜单也有url时,点击触发menu的点击回调函数
47
- onTitleClick: function (e) { var _a; return option.url && ((_a = option.onMenuClick) === null || _a === void 0 ? void 0 : _a.call(option, e)); } }, option.children.map(function (item) {
39
+ return (react_1.default.createElement(SubMenu, { key: option.key, title: option.text, popupClassName: option.popupClassName, onTitleClick: function (e) { return handleTitleClick(e, option); } }, option.children.map(function (item) {
48
40
  return Option(__assign(__assign({}, item), { onMenuClick: option.onMenuClick }));
49
41
  })));
50
42
  }
@@ -68,8 +68,8 @@
68
68
  content: '';
69
69
  }
70
70
  .ant-menu.ant-menu-root:focus-visible {
71
- -webkit-box-shadow: 0 0 0 2px #c0c6cc;
72
- box-shadow: 0 0 0 2px #c0c6cc;
71
+ -webkit-box-shadow: 0 0 0 2px #e6eeff;
72
+ box-shadow: 0 0 0 2px #e6eeff;
73
73
  }
74
74
  .ant-menu ul,
75
75
  .ant-menu ol {
@@ -110,7 +110,7 @@
110
110
  transition: border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
111
111
  }
112
112
  .ant-menu-submenu-selected {
113
- color: #2c6dd2;
113
+ color: #436bff;
114
114
  }
115
115
  .ant-menu-item:active,
116
116
  .ant-menu-submenu-title:active {
@@ -129,7 +129,7 @@
129
129
  color: #7a869a;
130
130
  }
131
131
  .ant-menu-item a:hover {
132
- color: #2c6dd2;
132
+ color: #436bff;
133
133
  }
134
134
  .ant-menu-item a::before {
135
135
  position: absolute;
@@ -144,7 +144,7 @@
144
144
  color: #7a869a;
145
145
  }
146
146
  .ant-menu-item > .ant-badge a:hover {
147
- color: #2c6dd2;
147
+ color: #436bff;
148
148
  }
149
149
  .ant-menu-item-divider {
150
150
  overflow: hidden;
@@ -166,11 +166,11 @@
166
166
  background-color: transparent;
167
167
  }
168
168
  .ant-menu-item-selected {
169
- color: #2c6dd2;
169
+ color: #436bff;
170
170
  }
171
171
  .ant-menu-item-selected a,
172
172
  .ant-menu-item-selected a:hover {
173
- color: #2c6dd2;
173
+ color: #436bff;
174
174
  }
175
175
  .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
176
176
  background-color: rgba(255, 255, 255, 0.1);
@@ -268,8 +268,8 @@
268
268
  }
269
269
  .ant-menu-item:not(.ant-menu-item-disabled):focus-visible,
270
270
  .ant-menu-submenu-title:not(.ant-menu-item-disabled):focus-visible {
271
- -webkit-box-shadow: 0 0 0 2px #c0c6cc;
272
- box-shadow: 0 0 0 2px #c0c6cc;
271
+ -webkit-box-shadow: 0 0 0 2px #e6eeff;
272
+ box-shadow: 0 0 0 2px #e6eeff;
273
273
  }
274
274
  .ant-menu > .ant-menu-item-divider {
275
275
  margin: 1px 0;
@@ -351,7 +351,7 @@
351
351
  }
352
352
  .ant-menu-submenu:hover > .ant-menu-submenu-title > .ant-menu-submenu-expand-icon,
353
353
  .ant-menu-submenu:hover > .ant-menu-submenu-title > .ant-menu-submenu-arrow {
354
- color: #2c6dd2;
354
+ color: #436bff;
355
355
  }
356
356
  .ant-menu-inline-collapsed .ant-menu-submenu-arrow::before,
357
357
  .ant-menu-submenu-inline .ant-menu-submenu-arrow::before {
@@ -381,7 +381,7 @@
381
381
  .ant-menu-vertical .ant-menu-submenu-selected,
382
382
  .ant-menu-vertical-left .ant-menu-submenu-selected,
383
383
  .ant-menu-vertical-right .ant-menu-submenu-selected {
384
- color: #2c6dd2;
384
+ color: #436bff;
385
385
  }
386
386
  .ant-menu-horizontal {
387
387
  line-height: 46px;
@@ -404,7 +404,7 @@
404
404
  .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-open,
405
405
  .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-selected,
406
406
  .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-selected {
407
- color: #2c6dd2;
407
+ color: #436bff;
408
408
  }
409
409
  .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item:hover::after,
410
410
  .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu:hover::after,
@@ -414,7 +414,7 @@
414
414
  .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-open::after,
415
415
  .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-selected::after,
416
416
  .ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-submenu-selected::after {
417
- border-bottom: 2px solid #2c6dd2;
417
+ border-bottom: 2px solid #436bff;
418
418
  }
419
419
  .ant-menu-horizontal > .ant-menu-item,
420
420
  .ant-menu-horizontal > .ant-menu-submenu {
@@ -441,13 +441,13 @@
441
441
  color: #7a869a;
442
442
  }
443
443
  .ant-menu-horizontal > .ant-menu-item a:hover {
444
- color: #2c6dd2;
444
+ color: #436bff;
445
445
  }
446
446
  .ant-menu-horizontal > .ant-menu-item a::before {
447
447
  bottom: -2px;
448
448
  }
449
449
  .ant-menu-horizontal > .ant-menu-item-selected a {
450
- color: #2c6dd2;
450
+ color: #436bff;
451
451
  }
452
452
  .ant-menu-horizontal::after {
453
453
  display: block;
@@ -469,7 +469,7 @@
469
469
  top: 0;
470
470
  right: 0;
471
471
  bottom: 0;
472
- border-right: 3px solid #2c6dd2;
472
+ border-right: 3px solid #436bff;
473
473
  -webkit-transform: scaleY(0.0001);
474
474
  transform: scaleY(0.0001);
475
475
  opacity: 0;
@@ -706,22 +706,22 @@
706
706
  .ant-menu-light .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open,
707
707
  .ant-menu-light .ant-menu-submenu-active,
708
708
  .ant-menu-light .ant-menu-submenu-title:hover {
709
- color: #2c6dd2;
709
+ color: #436bff;
710
710
  }
711
711
  .ant-menu.ant-menu-root:focus-visible {
712
- -webkit-box-shadow: 0 0 0 2px #555f73;
713
- box-shadow: 0 0 0 2px #555f73;
712
+ -webkit-box-shadow: 0 0 0 2px #2e4dd9;
713
+ box-shadow: 0 0 0 2px #2e4dd9;
714
714
  }
715
715
  .ant-menu-dark .ant-menu-item:focus-visible,
716
716
  .ant-menu-dark .ant-menu-submenu-title:focus-visible {
717
- -webkit-box-shadow: 0 0 0 2px #555f73;
718
- box-shadow: 0 0 0 2px #555f73;
717
+ -webkit-box-shadow: 0 0 0 2px #2e4dd9;
718
+ box-shadow: 0 0 0 2px #2e4dd9;
719
719
  }
720
720
  .ant-menu.ant-menu-dark,
721
721
  .ant-menu-dark .ant-menu-sub,
722
722
  .ant-menu.ant-menu-dark .ant-menu-sub {
723
723
  color: #ffffff;
724
- background: #2c6dd2;
724
+ background: #436bff;
725
725
  }
726
726
  .ant-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow,
727
727
  .ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow,
@@ -752,7 +752,7 @@
752
752
  top: 0;
753
753
  margin-top: 0;
754
754
  padding: 0 20px;
755
- border-color: #2c6dd2;
755
+ border-color: #436bff;
756
756
  border-bottom: 0;
757
757
  }
758
758
  .ant-menu-dark.ant-menu-horizontal > .ant-menu-item:hover {
@@ -217,7 +217,7 @@
217
217
  color: #f0a818;
218
218
  }
219
219
  .ant-modal-confirm-info .ant-modal-confirm-body > .anticon {
220
- color: #7a869a;
220
+ color: #436bff;
221
221
  }
222
222
  .ant-modal-confirm-success .ant-modal-confirm-body > .anticon {
223
223
  color: #20c997;