@chaoswise/business 0.0.18 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/config/babel/index.js +2 -29
  2. package/config/swc.js +5 -0
  3. package/lib/AggregateSearch/CLSPL/SPLStagy.js +17 -7
  4. package/lib/AggregateSearch/CLSPL/index.js +17 -5
  5. package/lib/AggregateSearch/components/CloseAllIcon/index.js +1 -1
  6. package/lib/AggregateSearch/components/DropDown/config.js +54 -0
  7. package/lib/AggregateSearch/components/DropDown/index.js +57 -76
  8. package/lib/AggregateSearch/components/DropDown/index.less +18 -17
  9. package/lib/AggregateSearch/components/SwitchBtn/index.js +9 -7
  10. package/lib/AggregateSearch/index.js +47 -37
  11. package/lib/AggregateSearch/index.less +2 -1
  12. package/lib/AggregateSearch/utils/index.js +1 -1
  13. package/lib/ContentEditableSearch/components/CloseAllIcon/index.js +13 -0
  14. package/lib/ContentEditableSearch/components/CloseAllIcon/index.less +11 -0
  15. package/lib/ContentEditableSearch/index.js +157 -0
  16. package/lib/ContentEditableSearch/index.less +65 -0
  17. package/lib/ContentEditableSearch/utils/index.js +98 -0
  18. package/lib/PropertyControlViewer/components/DoAppIcon/CustomIcon/index.js +1 -1
  19. package/lib/PropertyControlViewer/components/DoCiUnitBitmap.js +1 -1
  20. package/lib/PropertyControlViewer/components/DoCommon.js +20 -17
  21. package/lib/PropertyControlViewer/components/DoQuote/components/QuoteView.js +3 -3
  22. package/lib/PropertyControlViewer/components/DoSelect.js +1 -1
  23. package/lib/PropertyControlViewer/components/DoUser.js +15 -19
  24. package/lib/PropertyControlViewer/components/TagShowMoreList/index.js +8 -3
  25. package/lib/PropertyControlViewer/config/utils.js +58 -59
  26. package/lib/PropertyControlViewer/index.js +83 -15
  27. package/lib/PropertyControlViewer/index.less +1 -0
  28. package/lib/Watermark/index.js +35 -16
  29. package/lib/index.js +2 -1
  30. package/lib/locales/en_US.json +1 -0
  31. package/lib/locales/index.js +42 -0
  32. package/lib/locales/intl.js +75 -0
  33. package/lib/locales/withLocale.js +37 -0
  34. package/lib/locales/zh_CN.json +1 -0
  35. package/lib/locales/zh_TW.json +1 -0
  36. package/package.json +12 -7
  37. package/config/babel/antdComs.js +0 -51
  38. package/config/babel/formily.js +0 -22
  39. package/config/city/citys.js +0 -1964
  40. package/config/theme/CWTheme.js +0 -427
  41. package/config/theme/chart.dark.js +0 -394
  42. package/config/theme/chart.light.js +0 -3
  43. package/config/theme/common.less +0 -161
  44. package/config/theme/dark.js +0 -784
  45. package/config/theme/dark.less +0 -80
  46. package/config/theme/default.js +0 -717
  47. package/config/theme/default.less +0 -144
  48. package/config/theme/style/color/bezierEasing.less +0 -110
  49. package/config/theme/style/color/colorPalette.less +0 -85
  50. package/config/theme/style/color/colors.less +0 -162
  51. package/config/theme/style/color/tinyColor.less +0 -1184
  52. package/config/theme/style/compact.less +0 -4
  53. package/config/theme/style/components.less +0 -65
  54. package/config/theme/style/core/base.less +0 -10
  55. package/config/theme/style/core/global.less +0 -491
  56. package/config/theme/style/core/iconfont.less +0 -22
  57. package/config/theme/style/core/index.less +0 -5
  58. package/config/theme/style/core/motion/fade.less +0 -34
  59. package/config/theme/style/core/motion/move.less +0 -129
  60. package/config/theme/style/core/motion/other.less +0 -51
  61. package/config/theme/style/core/motion/slide.less +0 -129
  62. package/config/theme/style/core/motion/zoom.less +0 -179
  63. package/config/theme/style/core/motion.less +0 -22
  64. package/config/theme/style/css.js +0 -3
  65. package/config/theme/style/dark.less +0 -4
  66. package/config/theme/style/default.css +0 -1784
  67. package/config/theme/style/default.less +0 -4
  68. package/config/theme/style/index-pure.less +0 -2
  69. package/config/theme/style/index.css +0 -1784
  70. package/config/theme/style/index.d.ts +0 -1
  71. package/config/theme/style/index.js +0 -3
  72. package/config/theme/style/index.less +0 -3
  73. package/config/theme/style/mixins/box.less +0 -7
  74. package/config/theme/style/mixins/clearfix.less +0 -16
  75. package/config/theme/style/mixins/compatibility.less +0 -13
  76. package/config/theme/style/mixins/customize.less +0 -181
  77. package/config/theme/style/mixins/iconfont.less +0 -28
  78. package/config/theme/style/mixins/index.less +0 -14
  79. package/config/theme/style/mixins/modal-mask.less +0 -30
  80. package/config/theme/style/mixins/motion.less +0 -33
  81. package/config/theme/style/mixins/operation-unit.less +0 -16
  82. package/config/theme/style/mixins/reset.less +0 -11
  83. package/config/theme/style/mixins/rounded-arrow.less +0 -44
  84. package/config/theme/style/mixins/size.less +0 -10
  85. package/config/theme/style/mixins/typography.less +0 -58
  86. package/config/theme/style/themes/compact.less +0 -295
  87. package/config/theme/style/themes/dark.less +0 -457
  88. package/config/theme/style/themes/default.less +0 -1080
  89. package/config/theme/style/themes/index.less +0 -7
  90. package/config/theme/style/themes/variable.less +0 -1135
  91. package/config/theme/style/variable.less +0 -4
@@ -1,36 +1,9 @@
1
- const fse = require('fs-extra');
2
- // 项目的根目录
3
- const projectPath = process.cwd();
4
-
5
- const ANTD_COMPONENTS = require('./antdComs');
6
-
7
1
  const babelConfig = {
8
- "libraryName": "@chaoswise/ui",
2
+ "libraryName": "@chaoswise/business",
9
3
  "camel2DashComponentName": false,
10
4
  "customName": name => {
11
- const antdTarget = ANTD_COMPONENTS.find(item => name === item);
12
- if(antdTarget) {
13
- return `@chaoswise/ui/lib/Antd/${name}`
14
- }
15
- return `@chaoswise/ui/lib/${name}`
5
+ return `@chaoswise/business/lib/${name}`
16
6
  },
17
- // "style": name => {
18
- // if(name.includes('Antd')) {
19
- // const fileTargetPath = `${projectPath}/node_modules/${name}.less`;
20
- // const isExist = fse.pathExistsSync(fileTargetPath);
21
- // if(!isExist) {
22
- // return false
23
- // }
24
- // return `${name}.less`
25
- // }
26
- // // 判断是否有样式文件
27
- // const fileTargetPath = `${projectPath}/node_modules/${name}/index.less`;
28
- // const isExist = fse.pathExistsSync(fileTargetPath);
29
- // if(!isExist) {
30
- // return false
31
- // }
32
- // return `${name}/index.less`
33
- // }
34
7
  }
35
8
 
36
9
  module.exports = babelConfig;
package/config/swc.js ADDED
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ "@chaoswise/business": {
3
+ "transform": "@chaoswise/business/lib/{{member}}"
4
+ },
5
+ }
@@ -12,6 +12,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
12
12
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
13
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
14
14
  import antlr4 from 'antlr4';
15
+ import intl from '../../locales';
15
16
  var NoViableAltException = antlr4.error.NoViableAltException;
16
17
  var InputMismatchException = antlr4.error.InputMismatchException;
17
18
  var FailedPredicateException = antlr4.error.FailedPredicateException;
@@ -29,7 +30,7 @@ var stahy = /*#__PURE__*/function (_antlr4$error$BailErr) {
29
30
  _this = _super.call(this, props);
30
31
  _this.errorRecoveryMode = true;
31
32
  _this.explain = {
32
- UNQUOTA_STRING: '字段名称'
33
+ UNQUOTA_STRING: intl.get('fbda5bcb-67b0-4b7c-85fd-fb30068f73a0').d('字段名称')
33
34
  };
34
35
  _this.expects = new Map([['LEFT_PAR', '('], ['RIGHT_PAR', ')']]);
35
36
  return _this;
@@ -85,16 +86,16 @@ var stahy = /*#__PURE__*/function (_antlr4$error$BailErr) {
85
86
  var input;
86
87
  if (tokens !== null) {
87
88
  if (e.startToken.type === Token.EOF) {
88
- input = '语句不完整,缺少结尾';
89
+ input = intl.get('d6f72140-92e1-4214-8bcb-d548fa8ed1ce').d('语句不完整,缺少结尾');
89
90
  } else {
90
91
  input = tokens.getText(new Interval(e.startToken.tokenIndex, e.offendingToken.tokenIndex));
91
92
  }
92
93
  } else {
93
- input = '存在 <未知输入>';
94
+ input = intl.get('4ced2ca1-2a3f-49d9-9907-1b404d5a1586').d('存在 <未知输入>');
94
95
  }
95
96
  var msg;
96
97
  if (e.offendingToken.text) {
97
- msg = '位置' + e.offendingToken.line + ':' + e.offendingToken.column + ',' + input;
98
+ msg = intl.get('b2df07f1-b093-4f56-9ec2-af471999634d').d('位置') + e.offendingToken.line + ':' + e.offendingToken.column + ',' + input;
98
99
  } else {
99
100
  msg = '' + e.offendingToken.text + input;
100
101
  }
@@ -151,7 +152,10 @@ var stahy = /*#__PURE__*/function (_antlr4$error$BailErr) {
151
152
  key: "reportInputMismatch",
152
153
  value: function reportInputMismatch(recognizer, e) {
153
154
  var t1 = recognizer.getInputStream().LT(-1);
154
- var msg = "".concat(this.getTokenErrorDisplay(t1), " \u540E\u9762\uFF0C\u671F\u671B ").concat(this.transExpectByExplain(e.getExpectedTokens().toString(recognizer.literalNames, recognizer.symbolicNames)));
155
+ var msg = intl.get('8b3465a5-e2ca-4f7c-af17-2cb091ef40fe', {
156
+ slot0: this.getTokenErrorDisplay(t1),
157
+ slot1: this.transExpectByExplain(e.getExpectedTokens().toString(recognizer.literalNames, recognizer.symbolicNames))
158
+ }).d('{slot0} 后面,期望 {slot1}');
155
159
 
156
160
  // console.log(msg)
157
161
  // var msg = "mismatched input " + this.getTokenErrorDisplay(e.offendingToken) +
@@ -167,7 +171,10 @@ var stahy = /*#__PURE__*/function (_antlr4$error$BailErr) {
167
171
  this.beginErrorCondition(recognizer);
168
172
  var t = recognizer.getTokenStream().LT(-1);
169
173
  var expecting = this.getExpectedTokens(recognizer);
170
- var msg = "\u5728 ".concat(this.getTokenErrorDisplay(t), " \u540E\u7F3A\u5931 ").concat(expecting.toString(recognizer.literalNames, recognizer.symbolicNames));
174
+ var msg = intl.get('2bf0d704-4106-4359-8488-d0e395f37d34', {
175
+ slot0: this.getTokenErrorDisplay(t),
176
+ slot1: expecting.toString(recognizer.literalNames, recognizer.symbolicNames)
177
+ }).d('在 {slot0} 后缺失 {slot1}');
171
178
  recognizer.notifyErrorListeners(msg, t, null);
172
179
  }
173
180
  }, {
@@ -180,7 +187,10 @@ var stahy = /*#__PURE__*/function (_antlr4$error$BailErr) {
180
187
  var t = recognizer.getCurrentToken();
181
188
  var tokenName = this.getTokenErrorDisplay(t);
182
189
  var expecting = this.getExpectedTokens(recognizer);
183
- var msg = "\u4E0D\u5FC5\u8981\u8F93\u5165 ".concat(tokenName, " \uFF0C\u671F\u671B ").concat(this.transExpectByExplain(expecting.toString(recognizer.literalNames, recognizer.symbolicNames)));
190
+ var msg = intl.get('94f38306-0e2c-4d1c-beff-64d14bd7da20', {
191
+ tokenName: tokenName,
192
+ slot0: this.transExpectByExplain(expecting.toString(recognizer.literalNames, recognizer.symbolicNames))
193
+ }).d('不必要输入 {tokenName} ,期望 {slot0}');
184
194
  recognizer.notifyErrorListeners(msg, t, null);
185
195
  }
186
196
  }]);
@@ -31,6 +31,7 @@ import MyGrammarLexer from './CLQLLexer.js';
31
31
  import MyGrammarParser from './CLQLParser.js';
32
32
  import visitor from './CLQLParserVisitor.js';
33
33
  import stragy from './SPLStagy';
34
+ import intl from '../../locales';
34
35
  var customErr = /*#__PURE__*/function (_antlr4$error$ErrorLi) {
35
36
  _inherits(customErr, _antlr4$error$ErrorLi);
36
37
  var _super = _createSuper(customErr);
@@ -101,13 +102,24 @@ var customVisitor = /*#__PURE__*/function (_visitor) {
101
102
  break;
102
103
  }
103
104
  } catch (error) {
104
- var _JSON$parse = JSON.parse(error.message),
105
- msg = _JSON$parse.msg,
106
- line = _JSON$parse.line,
107
- column = _JSON$parse.column;
105
+ var geterror = function geterror() {
106
+ try {
107
+ return JSON.parse(error.message);
108
+ } catch (error) {
109
+ return {
110
+ msg: error.message,
111
+ line: '',
112
+ column: ''
113
+ };
114
+ }
115
+ };
116
+ var _geterror = geterror(),
117
+ msg = _geterror.msg,
118
+ line = _geterror.line,
119
+ column = _geterror.column;
108
120
  callback && callback({
109
121
  type: 'error',
110
- msg: '语法错误' + ':' + msg.replace('<EOF>', '结束').replace('Error:', '') + '',
122
+ msg: intl.get('3f52c2a1-892d-47fe-b296-49a35ff8c4ee').d('语法错误') + ':' + msg.replace('<EOF>', intl.get('30a2737a-c786-4f9f-bb22-02ca27a557ff').d('结束')).replace('Error:', '') + '',
111
123
  line: line,
112
124
  column: column
113
125
  });
@@ -1,4 +1,4 @@
1
- import _Icon from "@chaoswise/ui/lib/Antd/Icon";
1
+ import _Icon from "@chaoswise/ui/lib/Icon";
2
2
  import React from "react";
3
3
  import "./index.less";
4
4
  var CloseAllIcon = function CloseAllIcon(_ref) {
@@ -0,0 +1,54 @@
1
+ import intl from '../../../locales';
2
+
3
+ // 匹配方式
4
+ export var DEFAULT_MATCH_OPTION_LIST = [{
5
+ value: ':',
6
+ get des() {
7
+ return intl.get('df7b8ec5-840a-4fc7-aa8c-806d470ec97c').d('等于');
8
+ }
9
+ }, {
10
+ value: 'NOT:',
11
+ get des() {
12
+ return intl.get('47e5459f-882c-4395-a8f1-d49e89b0a263').d('不等于');
13
+ }
14
+ },
15
+ // { value: "*", get des() { return "模糊匹配/包含" },
16
+ // { value: "NOT*", get des() { return "反向模糊匹配/不包含" },
17
+ // { value: "~", get des() { return "存在" },
18
+ // { value: "NOT~", get des() { return "不存在" },
19
+ {
20
+ value: '>',
21
+ get des() {
22
+ return intl.get('719234f9-de71-4fc6-ab3f-59287ff20570').d('大于');
23
+ }
24
+ }, {
25
+ value: '>=',
26
+ get des() {
27
+ return intl.get('e633ed68-a12e-4af5-9a7a-d2eb476f4cef').d('大于等于');
28
+ }
29
+ }, {
30
+ value: '<',
31
+ get des() {
32
+ return intl.get('7058c2d9-91f3-4fe6-8a38-2c145a627959').d('小于');
33
+ }
34
+ }, {
35
+ value: '<=',
36
+ get des() {
37
+ return intl.get('914a6df4-9561-4345-a98c-0559e3f787ff').d('小于等于');
38
+ }
39
+ }];
40
+
41
+ // 组合符号
42
+ export var DEFAULT_COMBINED_OPTION_LIST = [{
43
+ value: '()',
44
+ get des() {
45
+ return intl.get('48b09da1-28bf-497d-a327-0ad6e3ef9af1').d('括号');
46
+ }
47
+ },
48
+ // { value: '""', get des() { return "双引号" },
49
+ {
50
+ value: '[]',
51
+ get des() {
52
+ return intl.get('bdfe4b04-efd7-4f93-a6ba-3954aca3b0eb').d('数值区间');
53
+ }
54
+ }];
@@ -1,9 +1,9 @@
1
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
- import _Dropdown from "@chaoswise/ui/lib/Antd/Dropdown";
2
+ import _Dropdown from "@chaoswise/ui/lib/Dropdown";
3
3
  import _Button from "@chaoswise/ui/lib/Button";
4
- import _TooltipText from "@chaoswise/ui/lib/TooltipText";
5
4
  import _message from "@chaoswise/ui/lib/message";
6
- import _Spin from "@chaoswise/ui/lib/Antd/Spin";
5
+ import _Spin from "@chaoswise/ui/lib/Spin";
6
+ import _TooltipText from "@chaoswise/ui/lib/TooltipText";
7
7
  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; } } }; }
8
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
9
  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."); }
@@ -23,6 +23,8 @@ import timeCircleIcon from "./assets/time-circle.svg";
23
23
  import copyIcon from "./assets/copy.svg";
24
24
  import deleteIcon from "./assets/delete.svg";
25
25
  import combinedIcon from "./assets/combined.svg";
26
+ import { useIntl } from "../../../locales";
27
+ import { DEFAULT_MATCH_OPTION_LIST, DEFAULT_COMBINED_OPTION_LIST } from "./config";
26
28
  import "./index.less";
27
29
  function judgeNotEmpty(val) {
28
30
  return val !== null && typeof val !== "undefined";
@@ -40,43 +42,6 @@ function highLight(text, keyword) {
40
42
  }).slice(1);
41
43
  }
42
44
 
43
- // 匹配方式
44
- var DEFAULT_MATCH_OPTION_LIST = [{
45
- value: ":",
46
- des: "等于"
47
- }, {
48
- value: "NOT:",
49
- des: "不等于"
50
- },
51
- // { value: "*", des: "模糊匹配/包含" },
52
- // { value: "NOT*", des: "反向模糊匹配/不包含" },
53
- // { value: "~", des: "存在" },
54
- // { value: "NOT~", des: "不存在" },
55
- {
56
- value: ">",
57
- des: "大于"
58
- }, {
59
- value: ">=",
60
- des: "大于等于"
61
- }, {
62
- value: "<",
63
- des: "小于"
64
- }, {
65
- value: "<=",
66
- des: "小于等于"
67
- }];
68
-
69
- // 组合符号
70
- var DEFAULT_COMBINED_OPTION_LIST = [{
71
- value: "()",
72
- des: "括号"
73
- },
74
- // { value: '""', des: "双引号" },
75
- {
76
- value: "[]",
77
- des: "数值区间"
78
- }];
79
-
80
45
  /**
81
46
  * 异步加载对应数据
82
47
  * 高亮显示对应搜索关键字
@@ -182,6 +147,7 @@ var DropDown = function DropDown(props) {
182
147
  onSelect: function onSelect() {}
183
148
  } : _props$combinedOption,
184
149
  containerWrapperRef = props.containerWrapperRef;
150
+ var intl = useIntl();
185
151
 
186
152
  // 输入值
187
153
  var keyOptionValue = keyOption.value;
@@ -416,68 +382,82 @@ var DropDown = function DropDown(props) {
416
382
  }));
417
383
  return _historyDelete.apply(this, arguments);
418
384
  }
385
+ var onPreventTooltipEvent = function onPreventTooltipEvent(e) {
386
+ e.stopPropagation();
387
+ };
388
+ var TooltipTextDom = function TooltipTextDom(children) {
389
+ return /*#__PURE__*/React.createElement(_TooltipText, {
390
+ title: /*#__PURE__*/React.createElement("span", {
391
+ onClick: onPreventTooltipEvent
392
+ }, children)
393
+ }, children);
394
+ };
419
395
  var menu = /*#__PURE__*/React.createElement("div", {
420
396
  className: "aggregate-drop-down-wrap",
421
397
  onClick: function onClick(e) {
398
+ var _e$nativeEvent, _e$nativeEvent$stopIm;
422
399
  e.stopPropagation();
400
+ e === null || e === void 0 || (_e$nativeEvent = e.nativeEvent) === null || _e$nativeEvent === void 0 || (_e$nativeEvent$stopIm = _e$nativeEvent.stopImmediatePropagation) === null || _e$nativeEvent$stopIm === void 0 || _e$nativeEvent$stopIm.call(_e$nativeEvent);
423
401
  }
424
402
  }, /*#__PURE__*/React.createElement("div", {
425
403
  className: "aggregate-drop-down"
426
404
  }, keyOptionValueNotEmpty && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
427
405
  className: "list-title"
428
- }, "\u6807\u7B7E\u641C\u7D22"), /*#__PURE__*/React.createElement(_Spin, {
406
+ }, intl.get("4412a02d-d11d-4231-bf91-fd65afd9ea77").d("标签搜索")), /*#__PURE__*/React.createElement(_Spin, {
429
407
  spinning: keyLoading,
430
- tip: "\u52A0\u8F7D\u4E2D...",
408
+ tip: intl.get("51b43939-ce6a-4a41-9038-832b8ab4a175").d("加载中..."),
431
409
  size: "small"
432
410
  }, !dropDownKeyListEmpty ? keyList.map(function (record, index) {
433
411
  var value = record.value,
434
412
  des = record.des;
413
+ var highLightText = highLight(value, keyOptionValue);
435
414
  return /*#__PURE__*/React.createElement("div", {
436
415
  key: index,
437
416
  className: "list",
438
417
  onClick: function onClick() {
439
418
  keyOption === null || keyOption === void 0 || keyOption.onSelect(value, record);
440
419
  }
441
- }, /*#__PURE__*/React.createElement("span", {
442
- className: "list-title-target-wrapper"
443
420
  }, /*#__PURE__*/React.createElement("img", {
444
421
  className: "pre-icon",
445
422
  src: keyIcon,
446
423
  alt: ""
447
- }), highLight(value, keyOptionValue)), /*#__PURE__*/React.createElement("span", {
424
+ }), /*#__PURE__*/React.createElement("span", {
425
+ className: "list-title-value-wrapper"
426
+ }, TooltipTextDom(highLightText)), /*#__PURE__*/React.createElement("span", {
448
427
  className: "list-title-des-wrapper"
449
- }, des));
428
+ }, TooltipTextDom(des)));
450
429
  }) : /*#__PURE__*/React.createElement("div", {
451
430
  className: "empty"
452
- }, "\u6682\u65E0\u6570\u636E\uFF0C\u63D0\u4EA4\u641C\u7D22\u540E\u641C\u7D22\u5173\u952E\u5B57"))), valueOptionValueNotEmpty && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
431
+ }, intl.get("1cd159c8-2a4d-4208-a170-55a34b91f671").d("暂无数据,提交搜索后搜索关键字")))), valueOptionValueNotEmpty && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
453
432
  className: "list-title"
454
433
  }, "Value"), /*#__PURE__*/React.createElement(_Spin, {
455
434
  spinning: valueLoading,
456
- tip: "\u52A0\u8F7D\u4E2D...",
435
+ tip: intl.get("51b43939-ce6a-4a41-9038-832b8ab4a175").d("加载中..."),
457
436
  size: "small"
458
437
  }, !dropDownValueListEmpty ? valueList.map(function (record, index) {
459
438
  var value = record.value,
460
439
  des = record.des;
440
+ var highLightText = highLight(value, valueOptionValue === null || valueOptionValue === void 0 ? void 0 : valueOptionValue.value);
461
441
  return /*#__PURE__*/React.createElement("div", {
462
442
  key: index,
463
443
  className: "list",
464
444
  onClick: function onClick() {
465
445
  valueOption === null || valueOption === void 0 || valueOption.onSelect(value, record);
466
446
  }
467
- }, /*#__PURE__*/React.createElement("span", {
468
- className: "list-title-target-wrapper"
469
447
  }, /*#__PURE__*/React.createElement("img", {
470
448
  className: "pre-icon",
471
449
  src: valueIcon,
472
450
  alt: ""
473
- }), highLight(value, valueOptionValue === null || valueOptionValue === void 0 ? void 0 : valueOptionValue.value)), /*#__PURE__*/React.createElement("span", {
451
+ }), /*#__PURE__*/React.createElement("span", {
452
+ className: "list-title-value-wrapper"
453
+ }, TooltipTextDom(highLightText)), /*#__PURE__*/React.createElement("span", {
474
454
  className: "list-title-des-wrapper"
475
- }, des));
455
+ }, TooltipTextDom(des)));
476
456
  }) : /*#__PURE__*/React.createElement("div", {
477
457
  className: "empty"
478
- }, "\u6682\u65E0\u6570\u636E\uFF0C\u63D0\u4EA4\u641C\u7D22\u540E\u641C\u7D22\u5173\u952E\u5B57"))), matchOption.isShow && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
458
+ }, intl.get("1cd159c8-2a4d-4208-a170-55a34b91f671").d("暂无数据,提交搜索后搜索关键字")))), matchOption.isShow && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
479
459
  className: "list-title"
480
- }, "\u5339\u914D\u65B9\u5F0F"), (matchOption.list || DEFAULT_MATCH_OPTION_LIST).map(function (record, index) {
460
+ }, intl.get("f2447d25-e81c-4656-9e4c-f66741dd8a52").d("匹配方式")), (matchOption.list || DEFAULT_MATCH_OPTION_LIST).map(function (record, index) {
481
461
  var value = record.value,
482
462
  des = record.des;
483
463
  return /*#__PURE__*/React.createElement("div", {
@@ -486,18 +466,18 @@ var DropDown = function DropDown(props) {
486
466
  onClick: function onClick() {
487
467
  matchOption === null || matchOption === void 0 || matchOption.onSelect(value, record);
488
468
  }
489
- }, /*#__PURE__*/React.createElement("span", {
490
- className: "list-title-target-wrapper"
491
469
  }, /*#__PURE__*/React.createElement("img", {
492
470
  className: "pre-icon",
493
471
  src: combinedIcon,
494
472
  alt: ""
495
- }), value), /*#__PURE__*/React.createElement("span", {
473
+ }), /*#__PURE__*/React.createElement("span", {
474
+ className: "list-title-value-wrapper"
475
+ }, TooltipTextDom(value)), /*#__PURE__*/React.createElement("span", {
496
476
  className: "list-title-des-wrapper"
497
- }, des));
477
+ }, TooltipTextDom(des)));
498
478
  })), combinedOption.isShow && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
499
479
  className: "list-title"
500
- }, "\u7EC4\u5408\u7B26\u53F7"), (combinedOption.list || DEFAULT_COMBINED_OPTION_LIST).map(function (record, index) {
480
+ }, intl.get("2e8bd2b4-57bf-4778-a254-3b577d0241c5").d("组合符号")), (combinedOption.list || DEFAULT_COMBINED_OPTION_LIST).map(function (record, index) {
501
481
  var value = record.value,
502
482
  des = record.des;
503
483
  return /*#__PURE__*/React.createElement("div", {
@@ -506,46 +486,47 @@ var DropDown = function DropDown(props) {
506
486
  onClick: function onClick() {
507
487
  combinedOption === null || combinedOption === void 0 || combinedOption.onSelect(value, record);
508
488
  }
509
- }, /*#__PURE__*/React.createElement("span", {
510
- className: "list-title-target-wrapper"
511
489
  }, /*#__PURE__*/React.createElement("img", {
512
490
  className: "pre-icon",
513
491
  src: combinedIcon,
514
492
  alt: ""
515
- }), value), /*#__PURE__*/React.createElement("span", {
493
+ }), /*#__PURE__*/React.createElement("span", {
494
+ className: "list-title-value-wrapper"
495
+ }, TooltipTextDom(value)), /*#__PURE__*/React.createElement("span", {
516
496
  className: "list-title-des-wrapper"
517
- }, des));
497
+ }, TooltipTextDom(des)));
518
498
  })), historyOptionValueNotEmpty && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
519
499
  className: "list-title"
520
- }, "\u641C\u7D22\u5386\u53F2"), /*#__PURE__*/React.createElement(_Spin, {
500
+ }, intl.get("354fbc6d-1abb-4510-81a9-9aa2efa6f482").d("搜索历史")), /*#__PURE__*/React.createElement(_Spin, {
521
501
  spinning: historyLoading,
522
- tip: "\u52A0\u8F7D\u4E2D...",
502
+ tip: intl.get("51b43939-ce6a-4a41-9038-832b8ab4a175").d("加载中..."),
523
503
  size: "small"
524
504
  }, !dropDownListHistoryEmpty ? historyList.map(function (record, index) {
525
505
  var id = record.id,
526
506
  value = record.value,
527
507
  des = record.des;
508
+ var highLightText = highLight(value, historyOptionValue);
528
509
  return /*#__PURE__*/React.createElement("div", {
529
510
  key: index,
530
511
  className: "list",
531
512
  onClick: function onClick() {
532
513
  historyOption === null || historyOption === void 0 || historyOption.onSelect(value, record);
533
514
  }
534
- }, /*#__PURE__*/React.createElement("span", {
535
- className: "list-title-target-wrapper"
536
515
  }, /*#__PURE__*/React.createElement("img", {
537
516
  className: "pre-icon",
538
517
  src: timeCircleIcon,
539
518
  alt: ""
540
- }), highLight(value, historyOptionValue)), /*#__PURE__*/React.createElement("span", {
519
+ }), /*#__PURE__*/React.createElement("span", {
520
+ className: "list-title-value-wrapper"
521
+ }, TooltipTextDom(highLightText)), /*#__PURE__*/React.createElement("span", {
541
522
  className: "list-title-des-wrapper des"
542
- }, des), /*#__PURE__*/React.createElement("span", {
523
+ }, TooltipTextDom(des)), /*#__PURE__*/React.createElement("span", {
543
524
  className: "action"
544
525
  }, /*#__PURE__*/React.createElement(CopyToClipboard, {
545
526
  text: value,
546
527
  onCopy: function onCopy(text) {
547
528
  historyOption === null || historyOption === void 0 || historyOption.onCopy(text);
548
- _message.success("搜索条件已复制");
529
+ _message.success(intl.get("15444b85-9196-4bb6-97bd-eb5cd4186cb9").d("搜索条件已复制"));
549
530
  }
550
531
  }, /*#__PURE__*/React.createElement("img", {
551
532
  onClick: function onClick(e) {
@@ -565,18 +546,18 @@ var DropDown = function DropDown(props) {
565
546
  })));
566
547
  }) : /*#__PURE__*/React.createElement("div", {
567
548
  className: "empty"
568
- }, "\u6682\u65E0\u6570\u636E\uFF0C\u63D0\u4EA4\u641C\u7D22\u540E\u641C\u7D22\u5173\u952E\u5B57")))), /*#__PURE__*/React.createElement("div", {
549
+ }, intl.get("1cd159c8-2a4d-4208-a170-55a34b91f671").d("暂无数据,提交搜索后搜索关键字"))))), /*#__PURE__*/React.createElement("div", {
569
550
  className: "desc"
570
- }, /*#__PURE__*/React.createElement(_TooltipText, null, /*#__PURE__*/React.createElement("span", null, "\u5168\u6587\u68C0\u7D22\uFF1Ahello world"), /*#__PURE__*/React.createElement("span", {
551
+ }, /*#__PURE__*/React.createElement(_TooltipText, null, /*#__PURE__*/React.createElement("span", null, intl.get("be953f09-653f-4715-a3b9-9e0faef199b3").d("全文检索:hello world")), /*#__PURE__*/React.createElement("span", {
571
552
  className: "desc-margin-32"
572
- }, "\u5B8C\u5168\u5339\u914D\uFF1A\"hello world\""), /*#__PURE__*/React.createElement("span", {
553
+ }, intl.get("ff777cfe-21b4-4eb0-bf80-ebd92081fdf5").d('完全匹配:"hello world"')), /*#__PURE__*/React.createElement("span", {
573
554
  className: "desc-margin-32"
574
- }, "\u901A\u914D\u7B26\uFF1A*?"), /*#__PURE__*/React.createElement("span", {
555
+ }, intl.get("229e8f35-ce6c-403a-b52e-05346dd8eb0b").d("通配符:*?")), /*#__PURE__*/React.createElement("span", {
575
556
  className: "desc-margin-32"
576
- }, "\u5173\u8054\u641C\u7D22\uFF1Astatus:(error OR warning) AND NOT service:\u201Cservice_a\u201D")), /*#__PURE__*/React.createElement(_Button, {
557
+ }, intl.get("e7413527-a5ee-4057-b765-3595cd26c09b").d("关联搜索:status:(error OR warning) AND NOT service:“service_a”"))), /*#__PURE__*/React.createElement(_Button, {
577
558
  type: "link",
578
559
  onClick: onHelpClick
579
- }, "\u5E2E\u52A9\u6587\u6863")));
560
+ }, intl.get("3431b29b-5fb7-411f-8a1d-8d7676b03264").d("帮助文档"))));
580
561
  return /*#__PURE__*/React.createElement(_Dropdown, {
581
562
  overlay: menu,
582
563
  visible: visible,
@@ -1,4 +1,3 @@
1
-
2
1
  .aggregate-drop-down-wrap {
3
2
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); // 浮层阴影
4
3
  background: #fff;
@@ -27,10 +26,6 @@
27
26
  left: 0;
28
27
  }
29
28
 
30
- // .ant-spin-dot-spin {
31
- // font-size: 18px;
32
- // }
33
-
34
29
  .@{ant-prefix}-spin-text {
35
30
  width: auto;
36
31
  margin-left: 4px;
@@ -44,17 +39,22 @@
44
39
  padding: 0 10px;
45
40
  color: @text-color-show;
46
41
  }
47
- .list-title-target-wrapper{
48
- display: flex;
49
- align-items: center;
50
- }
51
- .list-title-des-wrapper{
42
+
43
+ .list-title-des-wrapper {
52
44
  color: @text-color-secondary;
45
+ max-width: 100px;
46
+ margin-left: 12px;
53
47
  }
54
48
 
55
- .list-title:not(:first-child){
49
+ .list-title-value-wrapper {
50
+ flex: 1;
51
+ width: 0;
52
+ }
53
+
54
+ .list-title:not(:first-child) {
56
55
  margin-top: 8px;
57
56
  }
57
+
58
58
  .list {
59
59
  &:hover {
60
60
  cursor: pointer;
@@ -72,11 +72,12 @@
72
72
 
73
73
  line-height: 32px;
74
74
  display: flex;
75
- justify-content: space-between;
76
75
  padding: 0 10px;
77
76
  align-items: center;
77
+
78
78
  .action {
79
79
  display: none;
80
+
80
81
  .pre-icon {
81
82
  &:nth-child(2) {
82
83
  margin-right: 0;
@@ -86,8 +87,6 @@
86
87
 
87
88
  .pre-icon {
88
89
  margin-right: 8px;
89
- // height: 16px;
90
- // width: 16px;
91
90
  }
92
91
  }
93
92
 
@@ -107,11 +106,13 @@
107
106
  align-items: center;
108
107
  margin-top: 8px;
109
108
  color: @text-color-show;
110
- .desc-margin-32{
109
+
110
+ .desc-margin-32 {
111
111
  margin-left: 32px;
112
112
  }
113
- .ant-btn-link {
113
+
114
+ .@{ant-prefix}-btn-link {
114
115
  margin-left: 10px;
115
116
  }
116
117
  }
117
- }
118
+ }
@@ -1,15 +1,17 @@
1
1
  import _Tooltip from "@chaoswise/ui/lib/Tooltip";
2
- import React from "react";
3
- import textIcon from "./assets/text-icon.svg";
4
- import tagIcon from "./assets/tag-icon.svg";
5
- import "./index.less";
2
+ import React from 'react';
3
+ import textIcon from './assets/text-icon.svg';
4
+ import tagIcon from './assets/tag-icon.svg';
5
+ import { useIntl } from '../../../locales';
6
+ import './index.less';
6
7
  var SwitchBtn = function SwitchBtn(_ref) {
7
8
  var mode = _ref.mode,
8
9
  onChange = _ref.onChange;
9
- var icon = mode === "text" ? textIcon : tagIcon;
10
- var title = mode === "text" ? "切换为手写CQL语法模式" : "切换为筛选模式";
10
+ var intl = useIntl();
11
+ var icon = mode === 'text' ? textIcon : tagIcon;
12
+ var title = mode === 'text' ? intl.get('5faa90fc-6455-499a-a0d5-c7ff9c9867df').d('切换为手写CQL语法模式') : intl.get('1e9cc6b2-f761-4aaa-a216-9f842c6f8fce').d('切换为筛选模式');
11
13
  var onClick = function onClick() {
12
- onChange(mode === "text" ? "tag" : "text");
14
+ onChange(mode === 'text' ? 'tag' : 'text');
13
15
  };
14
16
  return /*#__PURE__*/React.createElement(_Tooltip, {
15
17
  title: title