@alicloud/console-components-search 0.1.0 → 0.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.
@@ -1,13 +1,13 @@
1
1
  开始构建微应用external依赖...
2
2
  BreezrPluginStyledComponentsIsolation The plugin will trying to use the package's name as isolation id of styled-components. This behavior usually occurred on dev mode. And if you were received this warning on publish mode then you should to set `options.styledComponentStyleSheetId` implicitly.
3
3
  ℹ Compiling Webpack
4
- ✔ Webpack: Compiled successfully in 13.03s
4
+ ✔ Webpack: Compiled successfully in 13.46s
5
5
  WARN asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
6
6
  This can impact web performance.
7
7
  Assets:
8
- main.js (2.3 MiB),entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
8
+ main.js (2.44 MiB),entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
9
9
  Entrypoints:
10
- main (2.3 MiB)
10
+ main (2.44 MiB)
11
11
  main.css
12
12
  main.js
13
13
  ,webpack performance recommendations:
@@ -1,6 +1,6 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
 
@@ -9,28 +9,25 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
9
9
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
10
 
11
11
  import React, { useState, useEffect } from "react";
12
- import classNames from 'classnames'; // import styled from "styled-components";
13
-
14
- import { Button, Icon, Tag, Select } from '@alicloud/console-components'; // import { AutoCompleteProps } from '@alifd/next/lib/select'
15
-
16
- import { getHistoryTag as getHistoryTagUtil, setHistoryTag as setHistoryTagUtil, removeHistoryTagItem as removeHistoryTagItemUtils, getTagByFileds, checkNoIndexListFormat, getSelectOptionAdatp } from "../utils"; // import '../index.less'
17
-
12
+ import classNames from 'classnames';
13
+ import { Button, Icon, Tag, Select, ConfigProvider } from '@alicloud/console-components';
14
+ import { getHistoryTag as getHistoryTagUtil, setHistoryTag as setHistoryTagUtil, removeHistoryTagItem as removeHistoryTagItemUtils, getTagByFileds, checkNoIndexListFormat, getSelectOptionAdatp } from "../utils";
18
15
  import { SearchWarp, MultiBtnWarp, MenuContentWrap } from "../style";
16
+ import { useCssVar } from "../useCssVar";
19
17
  var TagGroup = Tag.Group,
20
18
  ClosableTag = Tag.Closeable;
21
19
  var AutoComplete = Select.AutoComplete;
22
20
 
23
21
  var ModeSingleSingle = function ModeSingleSingle(props) {
24
- var mode = props.mode,
25
- options = props.options,
22
+ var options = props.options,
26
23
  defaultDataIndex = props.defaultDataIndex,
27
24
  defaultPlaceholder = props.defaultPlaceholder,
28
25
  tags = props.tags,
29
26
  onSuggest = props.onSuggest,
30
27
  onSuggestNoDataIndex = props.onSuggestNoDataIndex,
31
- onChange = props.onChange,
32
28
  onSearch = props.onSearch,
33
- onTagChange = props.onTagChange;
29
+ _props$prefix = props.prefix,
30
+ prefix = _props$prefix === void 0 ? "next-" : _props$prefix;
34
31
 
35
32
  var _useState = useState({}),
36
33
  _useState2 = _slicedToArray(_useState, 2),
@@ -89,8 +86,8 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
89
86
 
90
87
  var _useState23 = useState([]),
91
88
  _useState24 = _slicedToArray(_useState23, 2),
92
- histroyList = _useState24[0],
93
- setHistroyList = _useState24[1];
89
+ historyList = _useState24[0],
90
+ setHistoryList = _useState24[1];
94
91
 
95
92
  var _useState25 = useState(''),
96
93
  _useState26 = _slicedToArray(_useState25, 2),
@@ -108,7 +105,7 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
108
105
  var initHisTags = getHistoryTagUtil();
109
106
 
110
107
  if (initHisTags) {
111
- setHistroyList(initHisTags);
108
+ setHistoryList(initHisTags);
112
109
  }
113
110
 
114
111
  initCurType();
@@ -135,16 +132,25 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
135
132
 
136
133
 
137
134
  setCurType(initCurType);
138
- } // if (initCurType === 'nodefault') {
139
- // let defaultItem2 = options.find((x:any) => x.template === 'input')
140
- // if (defaultItem2) {
141
- // console.log(defaultItem2)
142
- // setDefaultOptionItem(defaultItem2);
143
- // }
144
- // }
145
-
135
+ }
146
136
 
147
- var level1DataSourceTemp = [{
137
+ var level1DataSourceTemp = options.some(function (t) {
138
+ return !!t.groupName;
139
+ }) ? Object.values(options.reduce(function (acc, t) {
140
+ var _acc$t$groupName;
141
+
142
+ //@ts-ignore
143
+ acc[t.groupName] = {
144
+ label: t.groupName,
145
+ value: t.groupName,
146
+ //@ts-ignore
147
+ children: [].concat(_toConsumableArray(((_acc$t$groupName = acc[t.groupName]) === null || _acc$t$groupName === void 0 ? void 0 : _acc$t$groupName.children) || []), [{
148
+ label: t.label,
149
+ value: t.dataIndex
150
+ }])
151
+ };
152
+ return acc;
153
+ }, {})) : [{
148
154
  label: '选择筛选条件',
149
155
  children: options.map(function (l1) {
150
156
  return {
@@ -161,17 +167,19 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
161
167
 
162
168
  var menuPropsLevel1 = {
163
169
  focusable: false,
164
- header: /*#__PURE__*/React.createElement(MenuContentWrap, null, defaultDataIndex && defaultDataIndex !== '' && histroyList && histroyList.length > 0 && defaultInputValue === '' && /*#__PURE__*/React.createElement("li", {
170
+ header: /*#__PURE__*/React.createElement(MenuContentWrap, {
171
+ prefix: ""
172
+ }, defaultDataIndex && defaultDataIndex !== '' && historyList && historyList.length > 0 && defaultInputValue === '' && /*#__PURE__*/React.createElement("li", {
165
173
  role: "option",
166
174
  title: "\u5386\u53F2\u641C\u7D22\u8BB0\u5F55",
167
- className: "next-menu-group-label"
175
+ className: "".concat(prefix, "menu-group-label")
168
176
  }, /*#__PURE__*/React.createElement("div", {
169
- className: "next-menu-item-inner"
170
- }, "\u5386\u53F2\u641C\u7D22\u8BB0\u5F55")), defaultDataIndex && defaultDataIndex !== '' && histroyList && histroyList.length > 0 && defaultInputValue === '' && /*#__PURE__*/React.createElement(TagGroup, {
177
+ className: "".concat(prefix, "menu-item-inner")
178
+ }, "\u5386\u53F2\u641C\u7D22\u8BB0\u5F55")), defaultDataIndex && defaultDataIndex !== '' && historyList && historyList.length > 0 && defaultInputValue === '' && /*#__PURE__*/React.createElement(TagGroup, {
171
179
  style: {
172
180
  paddingLeft: '20px'
173
181
  }
174
- }, histroyList.map(function (tag, index) {
182
+ }, historyList.map(function (tag, index) {
175
183
  return tag ? /*#__PURE__*/React.createElement(ClosableTag, {
176
184
  size: "small",
177
185
  key: tag.dataIndex + tag.value + index,
@@ -190,7 +198,9 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
190
198
  var menuProps = {
191
199
  focusable: false,
192
200
  header: null,
193
- footer: /*#__PURE__*/React.createElement(MultiBtnWarp, null, /*#__PURE__*/React.createElement(Button, {
201
+ footer: /*#__PURE__*/React.createElement(MultiBtnWarp, {
202
+ prefix: prefix
203
+ }, /*#__PURE__*/React.createElement(Button, {
194
204
  size: "small",
195
205
  className: classNames("pri-btn"),
196
206
  disabled: multipleValues.length === 0,
@@ -216,7 +226,7 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
216
226
  var key = searchKey.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
217
227
  var reg = new RegExp("(".concat(key, ")"), 'ig');
218
228
  label = label.replace(reg, function (x) {
219
- return "<span class=\"next-select-highlight\" style=\"background-color: #EFF3F8;font-weight: 500;\">".concat(x, "</span>");
229
+ return "<span class=\"".concat(prefix, "select-highlight\" style=\"background-color: #EFF3F8;font-weight: 500;\">").concat(x, "</span>");
220
230
  });
221
231
  }
222
232
 
@@ -234,54 +244,46 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
234
244
  return v === item.value;
235
245
  })) {
236
246
  isChecked = true;
237
- } // console.log('item',item, 'isChecked', isChecked)
238
-
247
+ }
239
248
 
240
249
  return /*#__PURE__*/React.createElement("label", {
241
- className: classNames('next-checkbox-wrapper', 'multi-lable', isChecked ? 'checked' : ''),
250
+ className: classNames("".concat(prefix, "checkbox-wrapper"), 'multi-lable', isChecked ? 'checked' : ''),
242
251
  style: {
243
252
  paddingLeft: '8px'
244
253
  }
245
254
  }, /*#__PURE__*/React.createElement("span", {
246
- className: "next-checkbox"
255
+ className: "".concat(prefix, "checkbox")
247
256
  }, /*#__PURE__*/React.createElement("span", {
248
- className: "next-checkbox-inner"
257
+ className: "".concat(prefix, "checkbox-inner")
249
258
  }, /*#__PURE__*/React.createElement("i", {
250
- className: "next-icon next-icon-select next-xs next-checkbox-select-icon"
259
+ className: "".concat(prefix, "icon ").concat(prefix, "icon-select ").concat(prefix, "xs ").concat(prefix, "checkbox-select-icon")
251
260
  })), /*#__PURE__*/React.createElement("input", {
252
261
  type: "checkbox",
253
- className: "next-checkbox-input",
262
+ className: "".concat(prefix, "checkbox-input"),
254
263
  defaultChecked: isChecked
255
264
  })), /*#__PURE__*/React.createElement("span", {
256
- className: "next-checkbox-label"
265
+ className: "".concat(prefix, "checkbox-label")
257
266
  }, item.label));
258
267
  };
259
268
 
260
269
  function onRemoveHisTag(tagItem) {
261
270
  var newHisTags = removeHistoryTagItemUtils(tagItem);
262
- setHistroyList(newHisTags);
271
+ setHistoryList(newHisTags);
263
272
  }
264
273
 
265
274
  function onSelectHisTag(tagItem) {
266
275
  var changeFileds = Object.create({});
267
276
  var tempAllFileds = Object.create({});
268
277
  changeFileds[tagItem.dataIndex] = tagItem.value;
269
-
270
- if (mode === 'single-multi') {
271
- tempAllFileds = changeFileds;
272
- } else if (mode === 'multi-multi') {
273
- tempAllFileds = _objectSpread(_objectSpread({}, allFileds), changeFileds);
274
- }
275
-
278
+ tempAllFileds = changeFileds;
276
279
  onChangeItem(changeFileds, tempAllFileds);
277
280
  }
278
281
 
279
- function upDateHistory() {
280
- // const allFiledsTagList = getTagByFileds(allFileds, options);
282
+ function updateHistory() {
281
283
  var allFiledsTagList = _toConsumableArray(tagList);
282
284
 
283
285
  var rtHisTags = setHistoryTagUtil(allFiledsTagList);
284
- setHistroyList(rtHisTags);
286
+ setHistoryList(rtHisTags);
285
287
  }
286
288
 
287
289
  function checkAllFromTags(allFileds) {
@@ -297,21 +299,15 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
297
299
  }
298
300
 
299
301
  return allFiledsAdapt;
300
- } // 某一类别确定时,修改fileds, 和tags
302
+ } // 某一类别确定时,修改filed
301
303
 
302
304
 
303
305
  function onChangeItem(changeFileds, allFileds) {
304
306
  setDefaultVisible(false);
305
307
  setAllFileds(allFileds); // todo
306
308
 
307
- if (onChange) {
308
- onChange(changeFileds, allFileds);
309
- }
310
-
311
- if (onTagChange) {
312
- var newTags = getTagByFileds(allFileds, options);
313
- setTagList(newTags);
314
- onTagChange(newTags);
309
+ if (onSearch) {
310
+ onSearch(getTagByFileds(allFileds, options));
315
311
  } // 仅仅清空值, 保留类别
316
312
 
317
313
 
@@ -342,6 +338,7 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
342
338
  }
343
339
 
344
340
  setCurType(initCurType);
341
+ setCurOptionItem({});
345
342
  setClearLevel1Show(false);
346
343
  } // 多选的确定
347
344
 
@@ -353,16 +350,8 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
353
350
  if (onChangeItem) {
354
351
  var changeFileds = Object.create({});
355
352
  changeFileds[dataIndex] = multipleValues;
356
-
357
- if (mode === 'single-multi') {
358
- setAllFileds(changeFileds);
359
- onChangeItem(changeFileds, changeFileds);
360
- } else if (mode === 'multi-multi') {
361
- allFileds[dataIndex] = multipleValues;
362
- setAllFileds(allFileds);
363
- onChangeItem(changeFileds, allFileds);
364
- }
365
-
353
+ setAllFileds(changeFileds);
354
+ onChangeItem(changeFileds, changeFileds);
366
355
  setMultipleValues([]);
367
356
  }
368
357
  } // 多选的change,仅改变state
@@ -384,13 +373,12 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
384
373
 
385
374
  function _onLevel1Change() {
386
375
  _onLevel1Change = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value, actionType, item) {
387
- var curOptItem;
376
+ var curOptItem, newDataSource;
388
377
  return _regeneratorRuntime.wrap(function _callee$(_context) {
389
378
  while (1) {
390
379
  switch (_context.prev = _context.next) {
391
380
  case 0:
392
- // console.log('value', value,'level1 , actionType', actionType, 'item:', item)
393
- setClearLevel1Show(true); // console.log('defaultInputValue', defaultInputValue)
381
+ setClearLevel1Show(true);
394
382
 
395
383
  if (!(actionType === 'itemClick')) {
396
384
  _context.next = 5;
@@ -412,7 +400,6 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
412
400
 
413
401
  setVisible(true);
414
402
  } else if (curType === 'default' && defaultDataIndex && defaultDataIndex !== '') {
415
- // 选了suggest
416
403
  inputChange(value, 'itemClick', defaultDataIndex);
417
404
  setDefaultValue('');
418
405
  setLevel1DataSource(level1DataSourceTemp);
@@ -424,50 +411,77 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
424
411
  }
425
412
  }
426
413
 
427
- _context.next = 19;
414
+ _context.next = 30;
428
415
  break;
429
416
 
430
417
  case 5:
431
418
  if (!(actionType === 'change')) {
432
- _context.next = 19;
419
+ _context.next = 30;
433
420
  break;
434
421
  }
435
422
 
436
423
  if (!(!value || value === '')) {
437
- _context.next = 10;
424
+ _context.next = 11;
438
425
  break;
439
426
  }
440
427
 
428
+ // 如果是删除为空的情况,需要还原 AutoComplete 中的 dataSource
441
429
  setLevel1DataSource(level1DataSourceTemp);
442
- _context.next = 18;
430
+ setDefaultVisible(true);
431
+ _context.next = 29;
443
432
  break;
444
433
 
445
- case 10:
446
- if (!(defaultDataIndex && defaultDataIndex !== '' && onSuggest)) {
447
- _context.next = 15;
434
+ case 11:
435
+ if (!(defaultDataIndex && defaultDataIndex !== '')) {
436
+ _context.next = 22;
437
+ break;
438
+ }
439
+
440
+ if (!onSuggest) {
441
+ _context.next = 17;
448
442
  break;
449
443
  }
450
444
 
451
- _context.next = 13;
445
+ _context.next = 15;
452
446
  return setDefSuggest(value);
453
447
 
454
- case 13:
455
- _context.next = 18;
448
+ case 15:
449
+ _context.next = 20;
456
450
  break;
457
451
 
458
- case 15:
452
+ case 17:
453
+ newDataSource = [{
454
+ label: defaultOptionItem.label,
455
+ children: [value]
456
+ }];
457
+ setLevel1DataSource(newDataSource);
458
+ setDefaultVisible(true);
459
+
460
+ case 20:
461
+ _context.next = 29;
462
+ break;
463
+
464
+ case 22:
459
465
  if (!onSuggestNoDataIndex) {
460
- _context.next = 18;
466
+ _context.next = 27;
461
467
  break;
462
468
  }
463
469
 
464
- _context.next = 18;
470
+ _context.next = 25;
465
471
  return setNoDefSuggest(value);
466
472
 
467
- case 18:
473
+ case 25:
474
+ _context.next = 29;
475
+ break;
476
+
477
+ case 27:
478
+ setLevel1DataSource([]);
479
+ setDefaultVisible(false);
480
+
481
+ case 29:
468
482
  setDefaultValue(value);
469
483
 
470
- case 19:
484
+ case 30:
471
485
  case "end":
472
486
  return _context.stop();
473
487
  }
@@ -585,42 +599,34 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
585
599
  */
586
600
 
587
601
 
588
- function inputChange(_x6, _x7, _x8) {
602
+ function inputChange(_x6, _x7, _x8, _x9) {
589
603
  return _inputChange.apply(this, arguments);
590
604
  } // 单选或多选的change,
591
605
 
592
606
 
593
607
  function _inputChange() {
594
- _inputChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(value, actionType, dataIndex) {
608
+ _inputChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(value, actionType, dataIndex, e) {
595
609
  var changeFileds, list, newDataSource;
596
610
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
597
611
  while (1) {
598
612
  switch (_context4.prev = _context4.next) {
599
613
  case 0:
600
614
  if (!((actionType === 'itemClick' || actionType === 'enter') && onChangeItem)) {
601
- _context4.next = 9;
615
+ _context4.next = 10;
602
616
  break;
603
617
  }
604
618
 
605
619
  changeFileds = Object.create({});
606
620
  changeFileds[dataIndex] = value;
607
-
608
- if (mode === 'single-multi') {
609
- setAllFileds(changeFileds);
610
- onChangeItem(changeFileds, changeFileds);
611
- } else if (mode === 'multi-multi') {
612
- allFileds[dataIndex] = value;
613
- setAllFileds(allFileds);
614
- onChangeItem(changeFileds, allFileds);
615
- }
616
-
621
+ setAllFileds(changeFileds);
622
+ onChangeItem(changeFileds, changeFileds);
617
623
  setVisible(false);
618
624
  setDefaultVisible(false);
619
625
  setInputDataSource([]);
620
- _context4.next = 19;
626
+ _context4.next = 20;
621
627
  break;
622
628
 
623
- case 9:
629
+ case 10:
624
630
  if (value === '') {
625
631
  setInputDataSource([]);
626
632
  setClearLevel1Show(true);
@@ -631,16 +637,15 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
631
637
  setInputValue(value);
632
638
 
633
639
  if (!(value !== '' && onSuggest)) {
634
- _context4.next = 19;
640
+ _context4.next = 20;
635
641
  break;
636
642
  }
637
643
 
638
- _context4.next = 14;
644
+ _context4.next = 15;
639
645
  return onSuggest(value, dataIndex);
640
646
 
641
- case 14:
647
+ case 15:
642
648
  list = _context4.sent;
643
- // console.log('res suggest', list);
644
649
  newDataSource = [{
645
650
  label: curOptionItem.label,
646
651
  children: list
@@ -649,7 +654,7 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
649
654
  setVisible(true);
650
655
  setDefaultVisible(true);
651
656
 
652
- case 19:
657
+ case 20:
653
658
  case "end":
654
659
  return _context4.stop();
655
660
  }
@@ -660,38 +665,37 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
660
665
  }
661
666
 
662
667
  function selectChange(value, dataIndex) {
663
- // setSingleValues(value);
664
668
  setVisible(false);
665
669
  setFocusClass('');
666
670
 
667
671
  if (onChangeItem) {
668
672
  var changeFileds = Object.create({});
669
673
  changeFileds[dataIndex] = value;
670
-
671
- if (mode === 'single-multi') {
672
- // 判断value 是否为undefined
673
- setAllFileds(changeFileds);
674
- onChangeItem(changeFileds, changeFileds);
675
- } else if (mode === 'multi-multi') {
676
- allFileds[dataIndex] = value;
677
- setAllFileds(allFileds);
678
- onChangeItem(changeFileds, allFileds);
679
- }
674
+ setAllFileds(changeFileds);
675
+ onChangeItem(changeFileds, changeFileds);
680
676
  }
681
677
  } // 提交按钮
682
678
 
683
679
 
684
680
  function onCommonSearch() {
685
681
  if (onSearch) {
686
- var checkAllFileds = checkAllFromTags(allFileds);
687
- onSearch(checkAllFileds); // todo: 只有搜索了才会被记录到,根据页面的路由为key,history
682
+ if (curOptionItem.dataIndex) {
683
+ onSearch(getTagByFileds(_defineProperty({}, curOptionItem.dataIndex, inputValue), options));
684
+ } else {
685
+ // @ts-ignore
686
+ onSearch(getTagByFileds(_defineProperty({}, defaultDataIndex, defaultInputValue), options));
687
+ } // todo: 只有搜索了才会被记录到,根据页面的路由为key,history
688
+
688
689
 
689
- upDateHistory();
690
+ updateHistory();
690
691
  }
691
692
  }
692
693
 
693
- return /*#__PURE__*/React.createElement(SearchWarp, null, /*#__PURE__*/React.createElement("div", {
694
- className: classNames('left-wrap', 'next-input', focusClass)
694
+ var isWind = (useCssVar('--alicloudfe-components-theme') || '').trim() === 'wind';
695
+ return /*#__PURE__*/React.createElement(SearchWarp, {
696
+ prefix: prefix
697
+ }, /*#__PURE__*/React.createElement("div", {
698
+ className: classNames('left-wrap', "".concat(prefix, "input"), focusClass)
695
699
  }, /*#__PURE__*/React.createElement("div", {
696
700
  className: classNames('condition')
697
701
  }, curType === 'item' && /*#__PURE__*/React.createElement("div", {
@@ -712,7 +716,8 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
712
716
  onKeyUp: onDeFaultEnter
713
717
  }, curType === 'default' && defaultOptionItem && /*#__PURE__*/React.createElement(AutoComplete, {
714
718
  className: classNames('main-input', 'multi'),
715
- placeholder: "\u9ED8\u8BA4\u6309".concat(defaultOptionItem.label, "\u641C\u7D22"),
719
+ placeholder: "\u9ED8\u8BA4\u6309".concat(defaultOptionItem.label, "\u641C\u7D22") // TODO:
720
+ ,
716
721
  hasClear: true,
717
722
  hasBorder: false,
718
723
  menuProps: menuPropsLevel1,
@@ -720,7 +725,7 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
720
725
  ,
721
726
  itemRender: itemRender,
722
727
  onChange: onLevel1Change,
723
- popupStyle: histroyList && histroyList.length > 0 ? {} : {
728
+ popupStyle: historyList && historyList.length > 0 ? {} : {
724
729
  width: 'auto'
725
730
  },
726
731
  visible: defaultVisible,
@@ -728,7 +733,9 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
728
733
  setDefaultVisible(true);
729
734
  setFocusClass('focus');
730
735
  },
736
+ popupClassName: isWind ? 'xconsole-rc-search-popup' : '',
731
737
  onBlur: function onBlur() {
738
+ debugger;
732
739
  setDefaultVisible(false);
733
740
  setFocusClass('');
734
741
  },
@@ -739,7 +746,7 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
739
746
  hasClear: true,
740
747
  hasBorder: false,
741
748
  menuProps: menuPropsLevel1,
742
- popupStyle: histroyList && histroyList.length > 0 ? {} : {
749
+ popupStyle: historyList && historyList.length > 0 ? {} : {
743
750
  width: 'auto'
744
751
  } // @ts-ignore
745
752
  ,
@@ -775,8 +782,8 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
775
782
  setVisible(false);
776
783
  setFocusClass('');
777
784
  },
778
- onChange: function onChange(value, actionType) {
779
- inputChange(value, actionType, curOptionItem.dataIndex);
785
+ onChange: function onChange(value, actionType, e) {
786
+ inputChange(value, actionType, curOptionItem.dataIndex, e);
780
787
  }
781
788
  }), curType === 'item' && curOptionItem.template === 'select' && /*#__PURE__*/React.createElement(Select, {
782
789
  className: classNames('main-input', 'select'),
@@ -788,7 +795,7 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
788
795
  selectChange(value, curOptionItem.dataIndex);
789
796
  },
790
797
  popupStyle: {
791
- minWidth: 'auto'
798
+ width: 'auto'
792
799
  },
793
800
  autoFocus: true,
794
801
  visible: visible,
@@ -835,20 +842,19 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
835
842
  onMultipleChange(value);
836
843
  },
837
844
  popupStyle: {
838
- minWidth: 'auto',
839
- padding: '10px 8px 10px 8px'
845
+ width: 'auto'
840
846
  }
841
847
  }), clearLevel1Show && /*#__PURE__*/React.createElement("div", {
842
848
  className: "clear-level1",
843
849
  onClick: onClearLevel1
844
850
  }, /*#__PURE__*/React.createElement("span", {
845
- className: "next-input-control"
851
+ className: "".concat(prefix, "input-control")
846
852
  }, /*#__PURE__*/React.createElement("span", {
847
- className: "next-input-hint-wrap"
853
+ className: "".concat(prefix, "input-hint-wrap")
848
854
  }, /*#__PURE__*/React.createElement("i", {
849
855
  role: "button",
850
856
  "aria-label": "\u6E05\u9664",
851
- className: "next-icon next-icon-delete-filling next-medium next-input-hint next-input-clear-icon"
857
+ className: "".concat(prefix, "icon ").concat(prefix, "icon-delete-filling ").concat(prefix, "medium ").concat(prefix, "input-hint ").concat(prefix, "input-clear-icon")
852
858
  })))))), /*#__PURE__*/React.createElement("div", {
853
859
  className: classNames('right-wrap')
854
860
  }, /*#__PURE__*/React.createElement(Button, {
@@ -859,4 +865,4 @@ var ModeSingleSingle = function ModeSingleSingle(props) {
859
865
  }))));
860
866
  };
861
867
 
862
- export default ModeSingleSingle;
868
+ export default ConfigProvider.config(ModeSingleSingle);