@kdcloudjs/kdesign 1.8.11 → 1.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +93 -15
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +3 -3
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/KeyCode.js +1 -333
- package/es/_utils/arrayUtil.js +0 -8
- package/es/_utils/formatUtil.js +9 -59
- package/es/_utils/getStringLength.js +0 -1
- package/es/_utils/hooks.js +2 -34
- package/es/_utils/index.js +1 -7
- package/es/_utils/numberUtil.js +0 -54
- package/es/_utils/raf.js +2 -2
- package/es/_utils/reactNode.js +1 -1
- package/es/_utils/resizeObserver.js +2 -4
- package/es/_utils/type.js +0 -1
- package/es/_utils/usePopper.js +3 -3
- package/es/alert/alert.js +8 -16
- package/es/anchor/anchor-link.js +3 -3
- package/es/anchor/anchor.js +23 -26
- package/es/anchor/context.js +1 -1
- package/es/avatar/avatar.js +8 -11
- package/es/badge/badge.js +7 -13
- package/es/base-data/base-data.js +42 -104
- package/es/breadcrumb/breadcrumb.js +12 -12
- package/es/breadcrumb/breadcrumbItem.js +5 -5
- package/es/button/button.js +13 -24
- package/es/button/group.js +13 -13
- package/es/card/card.js +12 -14
- package/es/carousel/carousel.js +13 -13
- package/es/carousel/displayList.js +3 -3
- package/es/carousel/fadeList.js +3 -3
- package/es/carousel/slideList.js +4 -4
- package/es/carousel/slidebar.js +3 -3
- package/es/cascader/cascader.js +31 -36
- package/es/checkbox/checkbox.js +25 -30
- package/es/checkbox/group.js +8 -9
- package/es/city-picker/city-picker.js +28 -38
- package/es/city-picker/interface.js +1 -1
- package/es/city-picker/option.js +4 -4
- package/es/clipboard/clipboard.js +5 -23
- package/es/clipboard/util.js +0 -60
- package/es/collapse/collapse.js +5 -5
- package/es/collapse/panel.js +15 -15
- package/es/color-picker/color-picker-panel.js +12 -13
- package/es/color-picker/color-picker.js +6 -10
- package/es/color-picker/utils/validateColor.js +0 -3
- package/es/config-provider/ConfigContext.js +1 -4
- package/es/config-provider/SizeContext.js +3 -3
- package/es/config-provider/compDefaultProps.js +3 -10
- package/es/config-provider/configProvider.js +1 -6
- package/es/config-provider/defaultConfig.js +0 -1
- package/es/date-picker/calendar.js +6 -23
- package/es/date-picker/context.js +1 -1
- package/es/date-picker/date-panel.js +12 -13
- package/es/date-picker/date-picker.js +7 -12
- package/es/date-picker/hooks/use-hover-value.js +0 -1
- package/es/date-picker/hooks/use-picker-input.js +0 -4
- package/es/date-picker/hooks/use-range-disabled.js +2 -6
- package/es/date-picker/hooks/use-range-view-dates.js +1 -9
- package/es/date-picker/hooks/use-text-value-mapping.js +0 -1
- package/es/date-picker/locale/zh_CN.js +0 -1
- package/es/date-picker/panel/date-time/date-time.js +4 -6
- package/es/date-picker/panel/header/header.js +14 -14
- package/es/date-picker/panel/month/month.js +5 -6
- package/es/date-picker/panel/quarter/quarter.js +4 -4
- package/es/date-picker/panel/time/time-column.js +4 -6
- package/es/date-picker/panel/time/time.js +10 -35
- package/es/date-picker/panel/week/week.js +5 -8
- package/es/date-picker/panel/year/year.js +4 -6
- package/es/date-picker/popper.js +3 -6
- package/es/date-picker/range/input-range.js +12 -13
- package/es/date-picker/range-picker.js +13 -36
- package/es/date-picker/single/input-date.js +8 -14
- package/es/date-picker/utils/date-fns.js +0 -35
- package/es/date-picker/utils/get-extra-footer.js +1 -1
- package/es/date-picker/utils/get-ranges.js +8 -8
- package/es/date-picker/utils/index.js +0 -3
- package/es/divider/divider.js +2 -2
- package/es/drawer/drawer.js +14 -39
- package/es/dropdown/dropdown.js +10 -11
- package/es/dropdown/menu.js +8 -12
- package/es/empty/defaultEmptyImg.js +18 -18
- package/es/empty/empty.js +9 -10
- package/es/empty/illustrationEmptyImg.js +106 -106
- package/es/filter/condition.js +10 -10
- package/es/filter/filter.js +17 -19
- package/es/filter/scheme.js +34 -41
- package/es/form/Field.js +5 -5
- package/es/form/FieldContext.js +1 -1
- package/es/form/FieldLabel.js +2 -2
- package/es/form/FieldWrapper.js +6 -6
- package/es/form/Form.js +2 -5
- package/es/form/FormContext.js +2 -4
- package/es/form/hooks/useForm.js +1 -14
- package/es/form/index.js +1 -1
- package/es/grid/col.js +1 -7
- package/es/grid/row.js +3 -9
- package/es/icon/icon.js +2 -2
- package/es/image/image.js +5 -7
- package/es/image/preview-group.js +3 -4
- package/es/image/preview.js +22 -24
- package/es/image-cropper/cropper.js +3 -6
- package/es/image-cropper/image-cropper.js +5 -5
- package/es/image-cropper/operation-bar.js +9 -9
- package/es/index.js +4 -0
- package/es/input/ClearableLabeledInput.js +13 -13
- package/es/input/TextArea.js +7 -7
- package/es/input/calculateNodeHeight.js +6 -11
- package/es/input/index.js +0 -1
- package/es/input/input.js +5 -5
- package/es/input-number/inputNumber.js +3 -10
- package/es/layout/layout.js +5 -9
- package/es/layout/sider.js +11 -14
- package/es/link/link.js +8 -12
- package/es/locale/locale.js +4 -34
- package/es/menu/menu.js +3 -4
- package/es/menu/menuItem.js +8 -13
- package/es/menu/subMenu.js +19 -27
- package/es/menu/util.js +0 -4
- package/es/message/content.js +13 -13
- package/es/message/index.js +1 -3
- package/es/modal/confirm.js +1 -1
- package/es/modal/modal.js +32 -40
- package/es/notification/content.js +18 -18
- package/es/notification/index.js +1 -1
- package/es/notification-base/index.js +1 -1
- package/es/notification-base/notice.js +2 -2
- package/es/notification-base/notification.js +3 -3
- package/es/pagination/pagination.js +48 -70
- package/es/popconfirm/popconfirm.js +8 -10
- package/es/popper/index.d.ts +4 -1
- package/es/popper/index.js +84 -22
- package/es/progress/circle.js +6 -8
- package/es/progress/line.js +3 -3
- package/es/progress/progress.js +11 -11
- package/es/qr-code/qr-code.js +6 -6
- package/es/radio/context.js +1 -1
- package/es/radio/group.js +9 -13
- package/es/radio/radio-button.js +2 -2
- package/es/radio/radio.js +19 -24
- package/es/rate/rate.js +11 -61
- package/es/search/option.js +4 -5
- package/es/search/quick-search.js +36 -57
- package/es/search/search-panel.js +56 -60
- package/es/search/search.js +9 -10
- package/es/select/interface.js +1 -1
- package/es/select/option.js +4 -4
- package/es/select/select.js +47 -87
- package/es/signature/drawingBoard.js +16 -16
- package/es/signature/signature.js +20 -20
- package/es/signature/utils/signature_pad.js +4 -12
- package/es/slider/marks.js +3 -5
- package/es/slider/slider.js +11 -32
- package/es/slider/sliderTooltip.js +3 -3
- package/es/slider/steps.js +2 -2
- package/es/slider/track.js +1 -1
- package/es/space/space.js +3 -5
- package/es/spin/spin.js +16 -18
- package/es/split-panel/split-panel.js +7 -18
- package/es/split-panel/trigger.js +6 -6
- package/es/stepper/stepper.js +11 -12
- package/es/steps/Step.js +8 -8
- package/es/steps/Steps.js +5 -5
- package/es/switch/switch.js +4 -6
- package/es/table/api.js +5 -22
- package/es/table/table.js +4 -15
- package/es/tabs/active-line.js +2 -6
- package/es/tabs/arrow-button.js +3 -3
- package/es/tabs/context.js +1 -1
- package/es/tabs/index.js +0 -1
- package/es/tabs/tab-pane.js +6 -6
- package/es/tabs/tabs.js +31 -34
- package/es/tag/tag.js +7 -15
- package/es/timeline/Timeline.js +5 -5
- package/es/timeline/TimelineItem.js +5 -5
- package/es/tooltip/tooltip.js +2 -2
- package/es/transfer/list-body.js +4 -4
- package/es/transfer/list-item.js +5 -6
- package/es/transfer/list.js +18 -22
- package/es/transfer/operation.js +7 -7
- package/es/transfer/search.js +5 -5
- package/es/transfer/transfer.js +8 -13
- package/es/tree/tree.js +9 -9
- package/es/tree/treeNode.js +18 -20
- package/es/tree/utils/treeUtils.js +1 -27
- package/es/tree-select/interface.js +1 -1
- package/es/tree-select/tree-select.js +35 -48
- package/es/typography/base.js +5 -5
- package/es/typography/index.js +0 -1
- package/es/typography/paragraph.js +1 -1
- package/es/typography/text.js +1 -1
- package/es/typography/title.js +1 -1
- package/es/typography/typography.js +4 -8
- package/es/upload/dragger.js +2 -2
- package/es/upload/request.js +0 -5
- package/es/upload/scan-files.js +0 -1
- package/es/upload/upload.js +34 -34
- package/es/upload/verify-file.js +0 -1
- package/es/view-container/context.js +1 -1
- package/es/view-container/view-container.js +4 -8
- package/es/virtual-list/Filler.js +2 -2
- package/es/virtual-list/utils/algorithmUtil.js +0 -13
- package/es/virtual-list/utils/itemUtil.js +0 -30
- package/es/virtual-list/virtual-list.js +8 -11
- package/lib/_utils/KeyCode.js +1 -333
- package/lib/_utils/arrayUtil.js +0 -8
- package/lib/_utils/formatUtil.js +9 -59
- package/lib/_utils/getStringLength.js +0 -1
- package/lib/_utils/hooks.js +2 -34
- package/lib/_utils/index.js +0 -7
- package/lib/_utils/numberUtil.js +0 -54
- package/lib/_utils/raf.js +2 -2
- package/lib/_utils/reactNode.js +1 -1
- package/lib/_utils/resizeObserver.js +2 -4
- package/lib/_utils/type.js +0 -1
- package/lib/_utils/usePopper.js +3 -3
- package/lib/alert/alert.js +8 -16
- package/lib/anchor/anchor-link.js +3 -3
- package/lib/anchor/anchor.js +23 -26
- package/lib/anchor/context.js +1 -1
- package/lib/avatar/avatar.js +8 -11
- package/lib/badge/badge.js +7 -13
- package/lib/base-data/base-data.js +42 -104
- package/lib/breadcrumb/breadcrumb.js +12 -12
- package/lib/breadcrumb/breadcrumbItem.js +5 -5
- package/lib/button/button.js +13 -24
- package/lib/button/group.js +13 -13
- package/lib/card/card.js +12 -14
- package/lib/carousel/carousel.js +13 -13
- package/lib/carousel/displayList.js +3 -3
- package/lib/carousel/fadeList.js +3 -3
- package/lib/carousel/slideList.js +4 -4
- package/lib/carousel/slidebar.js +3 -3
- package/lib/cascader/cascader.js +31 -36
- package/lib/checkbox/checkbox.js +25 -30
- package/lib/checkbox/group.js +8 -8
- package/lib/city-picker/city-picker.js +28 -38
- package/lib/city-picker/interface.js +1 -1
- package/lib/city-picker/option.js +4 -4
- package/lib/clipboard/clipboard.js +5 -23
- package/lib/clipboard/util.js +0 -60
- package/lib/collapse/collapse.js +5 -5
- package/lib/collapse/panel.js +15 -15
- package/lib/color-picker/color-picker-panel.js +12 -14
- package/lib/color-picker/color-picker.js +6 -10
- package/lib/color-picker/utils/validateColor.js +0 -3
- package/lib/config-provider/ConfigContext.js +1 -5
- package/lib/config-provider/SizeContext.js +3 -3
- package/lib/config-provider/compDefaultProps.js +3 -10
- package/lib/config-provider/configProvider.js +1 -7
- package/lib/config-provider/defaultConfig.js +0 -1
- package/lib/date-picker/calendar.js +6 -23
- package/lib/date-picker/context.js +1 -1
- package/lib/date-picker/date-panel.js +12 -13
- package/lib/date-picker/date-picker.js +7 -12
- package/lib/date-picker/hooks/use-hover-value.js +0 -1
- package/lib/date-picker/hooks/use-picker-input.js +0 -4
- package/lib/date-picker/hooks/use-range-disabled.js +2 -6
- package/lib/date-picker/hooks/use-range-view-dates.js +1 -9
- package/lib/date-picker/hooks/use-text-value-mapping.js +0 -1
- package/lib/date-picker/locale/zh_CN.js +0 -1
- package/lib/date-picker/panel/date-time/date-time.js +4 -6
- package/lib/date-picker/panel/header/header.js +14 -14
- package/lib/date-picker/panel/month/month.js +5 -6
- package/lib/date-picker/panel/quarter/quarter.js +4 -4
- package/lib/date-picker/panel/time/time-column.js +4 -6
- package/lib/date-picker/panel/time/time.js +10 -35
- package/lib/date-picker/panel/week/week.js +5 -8
- package/lib/date-picker/panel/year/year.js +4 -6
- package/lib/date-picker/popper.js +3 -6
- package/lib/date-picker/range/input-range.js +12 -13
- package/lib/date-picker/range-picker.js +13 -36
- package/lib/date-picker/single/input-date.js +8 -14
- package/lib/date-picker/utils/date-fns.js +0 -34
- package/lib/date-picker/utils/get-extra-footer.js +1 -1
- package/lib/date-picker/utils/get-ranges.js +8 -8
- package/lib/date-picker/utils/index.js +0 -3
- package/lib/divider/divider.js +2 -2
- package/lib/drawer/drawer.js +14 -40
- package/lib/dropdown/dropdown.js +10 -11
- package/lib/dropdown/menu.js +8 -12
- package/lib/empty/defaultEmptyImg.js +18 -18
- package/lib/empty/empty.js +9 -10
- package/lib/empty/illustrationEmptyImg.js +106 -106
- package/lib/filter/condition.js +10 -10
- package/lib/filter/filter.js +17 -19
- package/lib/filter/scheme.js +34 -41
- package/lib/form/Field.js +5 -5
- package/lib/form/FieldContext.js +1 -1
- package/lib/form/FieldLabel.js +2 -2
- package/lib/form/FieldWrapper.js +6 -6
- package/lib/form/Form.js +2 -5
- package/lib/form/FormContext.js +2 -4
- package/lib/form/hooks/useForm.js +1 -14
- package/lib/form/index.js +1 -1
- package/lib/grid/col.js +1 -7
- package/lib/grid/row.js +3 -9
- package/lib/icon/icon.js +2 -2
- package/lib/image/image.js +5 -7
- package/lib/image/preview-group.js +3 -4
- package/lib/image/preview.js +22 -24
- package/lib/image-cropper/cropper.js +3 -6
- package/lib/image-cropper/image-cropper.js +5 -5
- package/lib/image-cropper/operation-bar.js +9 -9
- package/lib/index.js +2 -8
- package/lib/input/ClearableLabeledInput.js +13 -13
- package/lib/input/TextArea.js +7 -7
- package/lib/input/calculateNodeHeight.js +6 -11
- package/lib/input/index.js +0 -1
- package/lib/input/input.js +5 -5
- package/lib/input-number/inputNumber.js +3 -10
- package/lib/layout/layout.js +5 -9
- package/lib/layout/sider.js +11 -14
- package/lib/link/link.js +8 -12
- package/lib/locale/locale.js +4 -34
- package/lib/menu/menu.js +3 -4
- package/lib/menu/menuItem.js +8 -13
- package/lib/menu/subMenu.js +19 -27
- package/lib/menu/util.js +0 -4
- package/lib/message/content.js +13 -13
- package/lib/message/index.js +1 -3
- package/lib/modal/confirm.js +1 -1
- package/lib/modal/modal.js +32 -40
- package/lib/notification/content.js +18 -18
- package/lib/notification/index.js +1 -1
- package/lib/notification-base/index.js +1 -1
- package/lib/notification-base/notice.js +2 -2
- package/lib/notification-base/notification.js +3 -3
- package/lib/pagination/pagination.js +48 -70
- package/lib/popconfirm/popconfirm.js +8 -10
- package/lib/popper/index.d.ts +4 -1
- package/lib/popper/index.js +84 -22
- package/lib/progress/circle.js +6 -8
- package/lib/progress/line.js +3 -3
- package/lib/progress/progress.js +11 -11
- package/lib/qr-code/qr-code.js +6 -6
- package/lib/radio/context.js +1 -1
- package/lib/radio/group.js +9 -13
- package/lib/radio/radio-button.js +2 -2
- package/lib/radio/radio.js +19 -24
- package/lib/rate/rate.js +11 -61
- package/lib/search/option.js +4 -5
- package/lib/search/quick-search.js +36 -57
- package/lib/search/search-panel.js +56 -60
- package/lib/search/search.js +9 -10
- package/lib/select/interface.js +1 -1
- package/lib/select/option.js +4 -4
- package/lib/select/select.js +47 -87
- package/lib/signature/drawingBoard.js +16 -16
- package/lib/signature/signature.js +20 -20
- package/lib/signature/utils/signature_pad.js +4 -12
- package/lib/slider/marks.js +3 -5
- package/lib/slider/slider.js +11 -32
- package/lib/slider/sliderTooltip.js +3 -3
- package/lib/slider/steps.js +2 -2
- package/lib/slider/track.js +1 -1
- package/lib/space/space.js +3 -5
- package/lib/spin/spin.js +16 -18
- package/lib/split-panel/split-panel.js +7 -18
- package/lib/split-panel/trigger.js +6 -6
- package/lib/stepper/stepper.js +11 -12
- package/lib/steps/Step.js +8 -8
- package/lib/steps/Steps.js +5 -5
- package/lib/switch/switch.js +4 -6
- package/lib/table/api.js +5 -22
- package/lib/table/table.js +4 -15
- package/lib/tabs/active-line.js +2 -6
- package/lib/tabs/arrow-button.js +3 -3
- package/lib/tabs/context.js +1 -1
- package/lib/tabs/index.js +0 -1
- package/lib/tabs/tab-pane.js +6 -6
- package/lib/tabs/tabs.js +31 -34
- package/lib/tag/tag.js +7 -15
- package/lib/timeline/Timeline.js +5 -5
- package/lib/timeline/TimelineItem.js +5 -5
- package/lib/tooltip/tooltip.js +2 -2
- package/lib/transfer/list-body.js +4 -4
- package/lib/transfer/list-item.js +5 -6
- package/lib/transfer/list.js +18 -22
- package/lib/transfer/operation.js +7 -7
- package/lib/transfer/search.js +5 -5
- package/lib/transfer/transfer.js +8 -13
- package/lib/tree/tree.js +9 -9
- package/lib/tree/treeNode.js +18 -20
- package/lib/tree/utils/treeUtils.js +1 -27
- package/lib/tree-select/interface.js +1 -1
- package/lib/tree-select/tree-select.js +35 -48
- package/lib/typography/base.js +5 -5
- package/lib/typography/index.js +0 -1
- package/lib/typography/paragraph.js +1 -1
- package/lib/typography/text.js +1 -1
- package/lib/typography/title.js +1 -1
- package/lib/typography/typography.js +4 -8
- package/lib/upload/dragger.js +2 -2
- package/lib/upload/request.js +0 -5
- package/lib/upload/scan-files.js +0 -1
- package/lib/upload/upload.js +34 -34
- package/lib/upload/verify-file.js +0 -1
- package/lib/view-container/context.js +1 -1
- package/lib/view-container/view-container.js +4 -8
- package/lib/virtual-list/Filler.js +2 -2
- package/lib/virtual-list/utils/algorithmUtil.js +0 -13
- package/lib/virtual-list/utils/itemUtil.js +0 -30
- package/lib/virtual-list/virtual-list.js +8 -12
- package/package.json +1 -3
|
@@ -25,14 +25,13 @@ import usePopper from '../_utils/usePopper';
|
|
|
25
25
|
import Option from './option';
|
|
26
26
|
import { Icon } from '../index';
|
|
27
27
|
import { getStringToArray } from '../_utils/arrayUtil';
|
|
28
|
-
var INPUT_MIN_WIDTH = 4;
|
|
28
|
+
var INPUT_MIN_WIDTH = 4;
|
|
29
29
|
var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
30
30
|
var _classNames, _classNames2;
|
|
31
31
|
var _useContext = useContext(ConfigContext),
|
|
32
32
|
getPrefixCls = _useContext.getPrefixCls,
|
|
33
33
|
prefixCls = _useContext.prefixCls,
|
|
34
34
|
getLangMsg = _useContext.locale.getLangMsg;
|
|
35
|
-
// const quickSearchProps = getCompProps('QuickSearch', userDefaultProps, props)
|
|
36
35
|
var customPrefixcls = props.prefixCls,
|
|
37
36
|
className = props.className,
|
|
38
37
|
placeholder = props.placeholder,
|
|
@@ -50,7 +49,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
50
49
|
disabled = props.disabled,
|
|
51
50
|
borderType = props.borderType,
|
|
52
51
|
others = __rest(props, ["prefixCls", "className", "placeholder", "style", "desc", "dropdownStyle", "tags", "children", "onBlur", "onFocus", "onChange", "onSelect", "onSearch", "disabled", "borderType"]);
|
|
53
|
-
var realChildren = Array.isArray(tags) && tags.length ? tags : toArray(children);
|
|
52
|
+
var realChildren = Array.isArray(tags) && tags.length ? tags : toArray(children);
|
|
54
53
|
var innerRef = useRef();
|
|
55
54
|
var quickSearchRef = ref || innerRef;
|
|
56
55
|
var dropDownRef = useRef(null);
|
|
@@ -59,28 +58,27 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
59
58
|
var _useState = useState(false),
|
|
60
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
61
60
|
isFocused = _useState2[0],
|
|
62
|
-
setIsFocused = _useState2[1];
|
|
61
|
+
setIsFocused = _useState2[1];
|
|
63
62
|
var _useState3 = useState(false),
|
|
64
63
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
64
|
optionShow = _useState4[0],
|
|
66
|
-
setOptionShow = _useState4[1];
|
|
65
|
+
setOptionShow = _useState4[1];
|
|
67
66
|
var _useState5 = useState(''),
|
|
68
67
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
69
68
|
searchValue = _useState6[0],
|
|
70
|
-
setSearchValue = _useState6[1];
|
|
69
|
+
setSearchValue = _useState6[1];
|
|
71
70
|
var _useState7 = useState([]),
|
|
72
71
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
73
72
|
tagsList = _useState8[0],
|
|
74
|
-
setTagsList = _useState8[1];
|
|
73
|
+
setTagsList = _useState8[1];
|
|
75
74
|
var _useState9 = useState(INPUT_MIN_WIDTH),
|
|
76
75
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
77
76
|
inputWidth = _useState10[0],
|
|
78
|
-
setInputWidth = _useState10[1];
|
|
77
|
+
setInputWidth = _useState10[1];
|
|
79
78
|
var _useState11 = useState(0),
|
|
80
79
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
81
80
|
selectedIndex = _useState12[0],
|
|
82
|
-
setSelectedIndex = _useState12[1];
|
|
83
|
-
// 处理智能搜索props
|
|
81
|
+
setSelectedIndex = _useState12[1];
|
|
84
82
|
var getNlpSearchProps = function getNlpSearchProps() {
|
|
85
83
|
var nlpSearch = props.nlpSearch;
|
|
86
84
|
if (!nlpSearch) return {};
|
|
@@ -108,7 +106,6 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
108
106
|
var quickSearchCls = classNames(quickSearchPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(quickSearchPrefixCls, "-focused"), isFocused || tagsList.length), _defineProperty(_classNames, "".concat(quickSearchPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(quickSearchPrefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames, "".concat(quickSearchPrefixCls, "-border"), borderType === 'bordered'), _classNames));
|
|
109
107
|
var quickSearchSelectorCls = classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(quickSearchPrefixCls, "-selector"), true), _defineProperty(_classNames2, "".concat(quickSearchPrefixCls, "-selector-disabled"), disabled), _classNames2));
|
|
110
108
|
var inputCls = classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-input"), true));
|
|
111
|
-
// 下拉列表样式
|
|
112
109
|
var dropDownCls = classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-dropdown"), true));
|
|
113
110
|
var dropContentCls = classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-dropdown-scroll"), true));
|
|
114
111
|
var setInputFocus = function setInputFocus() {
|
|
@@ -140,7 +137,6 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
140
137
|
}
|
|
141
138
|
};
|
|
142
139
|
var handleKeyDownUp = function handleKeyDownUp(index, length) {
|
|
143
|
-
// index 为下标 length为长长度
|
|
144
140
|
var currentIndex = index;
|
|
145
141
|
if (index === 0) {
|
|
146
142
|
currentIndex = length - 1;
|
|
@@ -208,20 +204,16 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
208
204
|
tagsLength++;
|
|
209
205
|
}
|
|
210
206
|
switch (e.keyCode) {
|
|
211
|
-
// backspace
|
|
212
207
|
case 8:
|
|
213
208
|
!val && e.preventDefault();
|
|
214
209
|
handleKeyDownDel(val, JSON.parse(_JSON$stringify(tagsList), e));
|
|
215
210
|
break;
|
|
216
|
-
// enter
|
|
217
211
|
case 13:
|
|
218
212
|
handleKeyDownEnter(val, selectedIndex);
|
|
219
213
|
break;
|
|
220
|
-
// up
|
|
221
214
|
case 38:
|
|
222
215
|
!canShowDesc() && handleKeyDownUp(selectedIndex, tagsLength);
|
|
223
216
|
break;
|
|
224
|
-
// down
|
|
225
217
|
case 40:
|
|
226
218
|
!canShowDesc() && handleKeyDownDown(selectedIndex, tagsLength);
|
|
227
219
|
break;
|
|
@@ -268,18 +260,18 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
268
260
|
onChange && (onChange === null || onChange === void 0 ? void 0 : onChange(getParamsListByKey(newTagsList, 'value'), newTagsList));
|
|
269
261
|
};
|
|
270
262
|
var renderSelectedTags = function renderSelectedTags() {
|
|
271
|
-
return
|
|
263
|
+
return React.createElement(React.Fragment, null, _mapInstanceProperty(tagsList).call(tagsList, function (item, index) {
|
|
272
264
|
var formatTag = formatSearchValue(item.label);
|
|
273
|
-
return
|
|
265
|
+
return React.createElement("div", {
|
|
274
266
|
key: index,
|
|
275
267
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-selection-overflow-item"), true))
|
|
276
|
-
},
|
|
268
|
+
}, React.createElement("span", {
|
|
277
269
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-selection-overflow-item-tag"), true)),
|
|
278
270
|
title: item.tag
|
|
279
|
-
}, item.tag),
|
|
271
|
+
}, item.tag), React.createElement("span", {
|
|
280
272
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-selection-overflow-item-label"), true)),
|
|
281
273
|
title: formatTag
|
|
282
|
-
}, formatTag),
|
|
274
|
+
}, formatTag), React.createElement(Icon, {
|
|
283
275
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-selection-overflow-item-del"), true)),
|
|
284
276
|
type: "close-solid",
|
|
285
277
|
onClick: function onClick(e) {
|
|
@@ -291,10 +283,9 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
291
283
|
var getInputPlaceholder = function getInputPlaceholder() {
|
|
292
284
|
return placeholder || getLangMsg('Search', 'placeholder');
|
|
293
285
|
};
|
|
294
|
-
// 实现input placeholder
|
|
295
286
|
var renderPlaceholder = function renderPlaceholder() {
|
|
296
287
|
if (tagsList.length > 0 || searchValue) return null;
|
|
297
|
-
return
|
|
288
|
+
return React.createElement("span", {
|
|
298
289
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-selection-placeholder"), true))
|
|
299
290
|
}, getInputPlaceholder());
|
|
300
291
|
};
|
|
@@ -303,26 +294,26 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
303
294
|
!disabled && setInputFocus();
|
|
304
295
|
};
|
|
305
296
|
var renderSelect = function renderSelect() {
|
|
306
|
-
return
|
|
297
|
+
return React.createElement("div", _extends({
|
|
307
298
|
className: quickSearchCls,
|
|
308
299
|
ref: quickSearchRef,
|
|
309
300
|
style: style,
|
|
310
301
|
onClick: handleClickInputFosus
|
|
311
|
-
}, others),
|
|
302
|
+
}, others), React.createElement("span", {
|
|
312
303
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-prefix"), true))
|
|
313
|
-
},
|
|
304
|
+
}, React.createElement(Icon, {
|
|
314
305
|
type: "search"
|
|
315
|
-
})),
|
|
306
|
+
})), React.createElement("div", {
|
|
316
307
|
className: quickSearchSelectorCls
|
|
317
|
-
},
|
|
308
|
+
}, React.createElement("div", {
|
|
318
309
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-selection-overflow"), true)),
|
|
319
310
|
onClick: handleClickInputFosus
|
|
320
|
-
}, renderSelectedTags(), renderPlaceholder(),
|
|
311
|
+
}, renderSelectedTags(), renderPlaceholder(), React.createElement("div", {
|
|
321
312
|
className: "".concat(quickSearchPrefixCls, "-selection-search"),
|
|
322
313
|
style: {
|
|
323
314
|
width: inputWidth
|
|
324
315
|
}
|
|
325
|
-
},
|
|
316
|
+
}, React.createElement("input", {
|
|
326
317
|
ref: inputRef,
|
|
327
318
|
value: searchValue,
|
|
328
319
|
className: inputCls,
|
|
@@ -330,7 +321,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
330
321
|
onFocus: handleFocus,
|
|
331
322
|
onBlur: handleBlur,
|
|
332
323
|
onKeyDown: onKeyDown
|
|
333
|
-
}),
|
|
324
|
+
}), React.createElement("span", {
|
|
334
325
|
ref: measureRef,
|
|
335
326
|
className: "".concat(quickSearchPrefixCls, "-selection-search-mirror")
|
|
336
327
|
}, searchValue, "\xA0")))));
|
|
@@ -345,7 +336,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
345
336
|
var isFormatVal = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
346
337
|
var _a, _b;
|
|
347
338
|
if ((child === null || child === void 0 ? void 0 : child.props) && (((_a = child.type) === null || _a === void 0 ? void 0 : _a.displayName) === 'Option' || ((_b = child.type) === null || _b === void 0 ? void 0 : _b.name) === 'Option')) {
|
|
348
|
-
return
|
|
339
|
+
return React.createElement(Option, _extends({
|
|
349
340
|
key: index
|
|
350
341
|
}, child.props, {
|
|
351
342
|
index: index,
|
|
@@ -355,7 +346,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
355
346
|
isFormatVal: isFormatVal
|
|
356
347
|
}));
|
|
357
348
|
}
|
|
358
|
-
return
|
|
349
|
+
return React.createElement(Option, {
|
|
359
350
|
key: index,
|
|
360
351
|
index: index,
|
|
361
352
|
selectedIndex: selectedIndex,
|
|
@@ -366,62 +357,53 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
366
357
|
isFormatVal: isFormatVal
|
|
367
358
|
});
|
|
368
359
|
};
|
|
369
|
-
// 是否展示下拉提示
|
|
370
360
|
var canShowDesc = function canShowDesc() {
|
|
371
361
|
return !searchValue && !tagsList.length;
|
|
372
362
|
};
|
|
373
|
-
// loading
|
|
374
363
|
var renderLoading = function renderLoading() {
|
|
375
364
|
var loadingItemPrefixCls = classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-npl-loading-item"), true));
|
|
376
|
-
return
|
|
365
|
+
return React.createElement("div", {
|
|
377
366
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-npl-loading"), true))
|
|
378
|
-
},
|
|
367
|
+
}, React.createElement("span", {
|
|
379
368
|
className: loadingItemPrefixCls
|
|
380
|
-
}),
|
|
369
|
+
}), React.createElement("span", {
|
|
381
370
|
className: loadingItemPrefixCls
|
|
382
|
-
}),
|
|
371
|
+
}), React.createElement("span", {
|
|
383
372
|
className: loadingItemPrefixCls
|
|
384
|
-
}),
|
|
373
|
+
}), React.createElement("span", {
|
|
385
374
|
className: loadingItemPrefixCls
|
|
386
375
|
}));
|
|
387
376
|
};
|
|
388
|
-
// 智能搜索
|
|
389
377
|
var renderNlpSearch = function renderNlpSearch() {
|
|
390
378
|
var tag = getLangMsg('Search', 'nplDesc');
|
|
391
379
|
var value = nlpSearchResult.value,
|
|
392
380
|
label = nlpSearchResult.label;
|
|
393
|
-
return
|
|
381
|
+
return React.createElement("div", {
|
|
394
382
|
className: classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-npl"), true))
|
|
395
383
|
}, nlpSearchLoading ? renderLoading() : renderOption({
|
|
396
384
|
tag: tag,
|
|
397
385
|
value: value
|
|
398
386
|
}, realChildren.length, label, false));
|
|
399
387
|
};
|
|
400
|
-
// 下拉列表为空时显示的内容
|
|
401
388
|
var renderNotContent = function renderNotContent() {
|
|
402
|
-
// 下拉列表为空
|
|
403
389
|
var emptyListCls = classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-dropdown-empty"), true));
|
|
404
|
-
// const { notFoundContent } = quickSearchProps
|
|
405
390
|
var notFoundContent = props.notFoundContent;
|
|
406
391
|
var emptyContent = notFoundContent || getLangMsg('Search', 'emptyTip');
|
|
407
|
-
|
|
408
|
-
return realChildren.length === 0 && searchValue && /*#__PURE__*/React.createElement("div", {
|
|
392
|
+
return realChildren.length === 0 && searchValue && React.createElement("div", {
|
|
409
393
|
className: emptyListCls
|
|
410
394
|
}, emptyContent);
|
|
411
395
|
};
|
|
412
|
-
// 下拉列表
|
|
413
396
|
var renderDropDownContent = function renderDropDownContent(tagsTorender, heightStyle) {
|
|
414
|
-
return
|
|
397
|
+
return React.createElement("div", {
|
|
415
398
|
className: dropContentCls,
|
|
416
399
|
style: heightStyle
|
|
417
400
|
}, tagsTorender, isSupportNlpSearch && renderNlpSearch());
|
|
418
401
|
};
|
|
419
|
-
// 下拉提示
|
|
420
402
|
var renderDesc = function renderDesc() {
|
|
421
403
|
var dropDoenDescCls = classNames(_defineProperty({}, "".concat(quickSearchPrefixCls, "-dropdown-desc"), true));
|
|
422
404
|
var dropDoenDesc = desc || getLangMsg('Search', 'desc');
|
|
423
|
-
return
|
|
424
|
-
return
|
|
405
|
+
return React.createElement(React.Fragment, null, _mapInstanceProperty(dropDoenDesc).call(dropDoenDesc, function (item, index) {
|
|
406
|
+
return React.createElement("div", {
|
|
425
407
|
className: dropDoenDescCls,
|
|
426
408
|
key: index,
|
|
427
409
|
title: dropDoenDesc
|
|
@@ -429,8 +411,6 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
429
411
|
}));
|
|
430
412
|
};
|
|
431
413
|
var renderDropDown = function renderDropDown() {
|
|
432
|
-
// dropdownRender 自定义下拉列表 待完成
|
|
433
|
-
// const { listHeight } = quickSearchProps
|
|
434
414
|
var listHeight = props.listHeight;
|
|
435
415
|
var tagsTorender = realChildren;
|
|
436
416
|
if (Array.isArray(realChildren) && realChildren.length > 0) {
|
|
@@ -443,11 +423,10 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
443
423
|
var heightStyle = {
|
|
444
424
|
maxHeight: listHeight || '300px'
|
|
445
425
|
};
|
|
446
|
-
// 下拉框style属性
|
|
447
426
|
var dropDownStyle = _extends({
|
|
448
427
|
width: style === null || style === void 0 ? void 0 : style.width
|
|
449
428
|
}, dropdownStyle);
|
|
450
|
-
return
|
|
429
|
+
return React.createElement("div", {
|
|
451
430
|
className: dropDownCls,
|
|
452
431
|
style: dropDownStyle,
|
|
453
432
|
ref: dropDownRef
|
|
@@ -485,6 +464,6 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
485
464
|
});
|
|
486
465
|
return usePopper(renderSelect(), renderDropDown(), popperProps);
|
|
487
466
|
};
|
|
488
|
-
var QuickSearch =
|
|
467
|
+
var QuickSearch = React.forwardRef(InternalQuickSearch);
|
|
489
468
|
QuickSearch.displayName = 'QuickSearch';
|
|
490
469
|
export default QuickSearch;
|
|
@@ -83,11 +83,11 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
83
83
|
})));
|
|
84
84
|
};
|
|
85
85
|
var text = function text() {
|
|
86
|
-
return
|
|
86
|
+
return React.createElement("div", {
|
|
87
87
|
className: "".concat(prefixCls, "-panel-type")
|
|
88
88
|
}, _mapInstanceProperty(panelTypes).call(panelTypes, function (item, index) {
|
|
89
89
|
var _context;
|
|
90
|
-
return
|
|
90
|
+
return React.createElement("span", {
|
|
91
91
|
key: index,
|
|
92
92
|
className: _concatInstanceProperty(_context = "".concat(prefixCls, "-panel-type-list")).call(_context, item.code === type.code ? " ".concat(prefixCls, "-panel-type-list-active") : ''),
|
|
93
93
|
onClick: function onClick() {
|
|
@@ -105,16 +105,16 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
105
105
|
var getMoreInputValue = locale.getLangMsg('Search', 'viewMoreResult', {
|
|
106
106
|
inputValue: inputValue
|
|
107
107
|
});
|
|
108
|
-
return
|
|
108
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
109
109
|
ref: searchPanelRef,
|
|
110
110
|
className: searchPanelCls,
|
|
111
111
|
style: style
|
|
112
|
-
},
|
|
112
|
+
}, React.createElement("div", {
|
|
113
113
|
className: "".concat(prefixCls, "-panel-wrapper")
|
|
114
|
-
},
|
|
114
|
+
}, React.createElement("div", {
|
|
115
115
|
ref: tooltipRef,
|
|
116
116
|
className: "".concat(prefixCls, "-panel-tooltip-content")
|
|
117
|
-
},
|
|
117
|
+
}, React.createElement(Tooltip, {
|
|
118
118
|
placement: "bottomLeft",
|
|
119
119
|
visible: visible,
|
|
120
120
|
trigger: "click",
|
|
@@ -124,26 +124,26 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
124
124
|
getTriggerElement: function getTriggerElement(ele) {
|
|
125
125
|
return tooltipRef.current || ele;
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, React.createElement("div", {
|
|
128
128
|
className: "".concat(prefixCls, "-panel-recommend")
|
|
129
|
-
},
|
|
129
|
+
}, React.createElement("div", {
|
|
130
130
|
style: {
|
|
131
131
|
whiteSpace: 'nowrap'
|
|
132
132
|
}
|
|
133
|
-
}, type.label),
|
|
133
|
+
}, type.label), React.createElement("span", {
|
|
134
134
|
className: "".concat(prefixCls, "-panel-recommend-icon"),
|
|
135
135
|
style: {
|
|
136
136
|
transform: "".concat(visible ? 'rotate(180deg)' : 'rotate(0deg)')
|
|
137
137
|
}
|
|
138
|
-
},
|
|
138
|
+
}, React.createElement(Icon, {
|
|
139
139
|
type: "arrow-down"
|
|
140
|
-
}))))),
|
|
140
|
+
}))))), React.createElement(Input, {
|
|
141
141
|
placeholder: placeholder || locale.getLangMsg('Search', 'placeholder'),
|
|
142
142
|
borderType: "none",
|
|
143
143
|
allowClear: true,
|
|
144
144
|
suffix: suffix,
|
|
145
145
|
onChange: handleSearchChange
|
|
146
|
-
})),
|
|
146
|
+
})), React.createElement("div", {
|
|
147
147
|
className: "".concat(prefixCls, "-panel-dropDown"),
|
|
148
148
|
style: inputValue ? {
|
|
149
149
|
visibility: 'visible',
|
|
@@ -153,47 +153,43 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
153
153
|
height: 0,
|
|
154
154
|
opacity: 0
|
|
155
155
|
}
|
|
156
|
-
},
|
|
156
|
+
}, React.createElement("div", {
|
|
157
157
|
className: "".concat(prefixCls, "-panel-dropDown-result")
|
|
158
|
-
},
|
|
158
|
+
}, React.createElement("div", {
|
|
159
159
|
className: "".concat(prefixCls, "-panel-dropDown-result-wrapper")
|
|
160
160
|
}, Array.isArray(panelResult) && _mapInstanceProperty(panelResult).call(panelResult, function (item, index) {
|
|
161
161
|
var _context3;
|
|
162
|
-
return (
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
className: "".concat(prefixCls, "-panel-dropDown-result-list-sub-title")
|
|
194
|
-
}, item.subTitle)))
|
|
195
|
-
);
|
|
196
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
return React.createElement("div", {
|
|
163
|
+
className: _concatInstanceProperty(_context3 = "".concat(prefixCls, "-panel-dropDown-result-list")).call(_context3, item.id === result.id ? " ".concat(prefixCls, "-panel-dropDown-result-list-active") : ''),
|
|
164
|
+
key: index,
|
|
165
|
+
onMouseOver: function onMouseOver() {
|
|
166
|
+
return handleMouseOver(item);
|
|
167
|
+
},
|
|
168
|
+
onClick: function onClick() {
|
|
169
|
+
return handleSelect(item);
|
|
170
|
+
}
|
|
171
|
+
}, item.icon && React.createElement("img", {
|
|
172
|
+
src: item.icon,
|
|
173
|
+
alt: "img"
|
|
174
|
+
}), React.createElement("div", {
|
|
175
|
+
style: {
|
|
176
|
+
display: 'flex',
|
|
177
|
+
justifyContent: 'space-between',
|
|
178
|
+
flex: 1
|
|
179
|
+
}
|
|
180
|
+
}, React.createElement("div", {
|
|
181
|
+
style: {
|
|
182
|
+
width: '60%'
|
|
183
|
+
}
|
|
184
|
+
}, React.createElement("div", {
|
|
185
|
+
className: "".concat(prefixCls, "-panel-dropDown-result-list-title"),
|
|
186
|
+
title: item.title
|
|
187
|
+
}, item.title), React.createElement("div", {
|
|
188
|
+
className: "".concat(prefixCls, "-panel-dropDown-result-list-type")
|
|
189
|
+
}, item.typeName)), React.createElement("div", {
|
|
190
|
+
className: "".concat(prefixCls, "-panel-dropDown-result-list-sub-title")
|
|
191
|
+
}, item.subTitle)));
|
|
192
|
+
})), React.createElement("div", {
|
|
197
193
|
className: _concatInstanceProperty(_context4 = "".concat(prefixCls, "-panel-dropDown-search")).call(_context4, result.id === 'search' ? " ".concat(prefixCls, "-panel-dropDown-search-active") : ''),
|
|
198
194
|
onMouseOver: function onMouseOver() {
|
|
199
195
|
return handleMouseOver({
|
|
@@ -201,35 +197,35 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
201
197
|
});
|
|
202
198
|
},
|
|
203
199
|
onClick: handleSearch
|
|
204
|
-
},
|
|
200
|
+
}, React.createElement(Icon, {
|
|
205
201
|
style: {
|
|
206
202
|
fontSize: 18
|
|
207
203
|
},
|
|
208
204
|
type: "search"
|
|
209
|
-
}),
|
|
205
|
+
}), React.createElement("span", {
|
|
210
206
|
className: "".concat(prefixCls, "-panel-dropDown-search-value")
|
|
211
|
-
}, "\u201C".concat(inputValue, "\u201D"))), panelSearchLoading &&
|
|
207
|
+
}, "\u201C".concat(inputValue, "\u201D"))), panelSearchLoading && React.createElement("span", {
|
|
212
208
|
className: "".concat(prefixCls, "-panel-dropDown-loading")
|
|
213
|
-
},
|
|
209
|
+
}, React.createElement(Spin, {
|
|
214
210
|
type: "container"
|
|
215
|
-
}))),
|
|
211
|
+
}))), React.createElement("div", {
|
|
216
212
|
className: "".concat(prefixCls, "-panel-dropDown-summary")
|
|
217
|
-
},
|
|
213
|
+
}, React.createElement("div", {
|
|
218
214
|
className: "".concat(prefixCls, "-panel-dropDown-summary-pic")
|
|
219
|
-
}, typeof displayImg === 'string' ?
|
|
215
|
+
}, typeof displayImg === 'string' ? React.createElement(Image, {
|
|
220
216
|
src: displayImg,
|
|
221
217
|
preview: false
|
|
222
|
-
}) : displayImg),
|
|
218
|
+
}) : displayImg), React.createElement("div", {
|
|
223
219
|
className: "".concat(prefixCls, "-panel-dropDown-summary-title")
|
|
224
|
-
}, result.id === 'search' ? getMoreInputValue : result.title), result.id === 'search' ?
|
|
220
|
+
}, result.id === 'search' ? getMoreInputValue : result.title), result.id === 'search' ? React.createElement("div", {
|
|
225
221
|
className: "".concat(prefixCls, "-panel-dropDown-summary-list")
|
|
226
222
|
}, _concatInstanceProperty(_context5 = "".concat(searchLanMsg.range, ": ")).call(_context5, type.label)) : _mapInstanceProperty(_context6 = _Object$keys(displayList)).call(_context6, function (item, index) {
|
|
227
|
-
return
|
|
223
|
+
return React.createElement("div", {
|
|
228
224
|
key: index,
|
|
229
225
|
className: "".concat(prefixCls, "-panel-dropDown-summary-list")
|
|
230
226
|
}, renderDisplayListShow(displayList[item], result[item]));
|
|
231
227
|
})))));
|
|
232
228
|
};
|
|
233
|
-
var SearchPanel =
|
|
229
|
+
var SearchPanel = React.forwardRef(InternalSearchPanel);
|
|
234
230
|
SearchPanel.displayName = 'SearchPanel';
|
|
235
231
|
export default SearchPanel;
|
package/es/search/search.js
CHANGED
|
@@ -77,9 +77,9 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
77
77
|
if (!prefix) {
|
|
78
78
|
return null;
|
|
79
79
|
}
|
|
80
|
-
return prefix && typeof prefix === 'boolean' ?
|
|
80
|
+
return prefix && typeof prefix === 'boolean' ? React.createElement("span", {
|
|
81
81
|
className: "".concat(searchPrefixCls, "-prefix")
|
|
82
|
-
},
|
|
82
|
+
}, React.createElement(Icon, {
|
|
83
83
|
type: "search"
|
|
84
84
|
})) : prefix;
|
|
85
85
|
}, [prefix, searchPrefixCls]);
|
|
@@ -87,15 +87,15 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
87
87
|
if (!suffix) {
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
return typeof suffix === 'boolean' && suffix ?
|
|
90
|
+
return typeof suffix === 'boolean' && suffix ? React.createElement("span", {
|
|
91
91
|
className: "".concat(searchPrefixCls, "-suffix")
|
|
92
|
-
},
|
|
92
|
+
}, React.createElement(Icon, {
|
|
93
93
|
className: "kd-search-prefix",
|
|
94
94
|
type: "search"
|
|
95
95
|
})) : suffix;
|
|
96
96
|
}, [suffix, searchPrefixCls]);
|
|
97
97
|
if (type === 'quick-search') {
|
|
98
|
-
return
|
|
98
|
+
return React.createElement(QuickSearch, _extends({}, restProps, {
|
|
99
99
|
ref: ref,
|
|
100
100
|
borderType: borderType,
|
|
101
101
|
disabled: disabled,
|
|
@@ -108,15 +108,14 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
108
108
|
}), children);
|
|
109
109
|
}
|
|
110
110
|
if (type === 'panel') {
|
|
111
|
-
|
|
112
|
-
return /*#__PURE__*/React.createElement(SearchPanel, _extends({}, searchProps, {
|
|
111
|
+
return React.createElement(SearchPanel, _extends({}, searchProps, {
|
|
113
112
|
prefixCls: searchPrefixCls
|
|
114
113
|
}));
|
|
115
114
|
}
|
|
116
|
-
return
|
|
115
|
+
return React.createElement("div", _extends({
|
|
117
116
|
className: searchCls,
|
|
118
117
|
style: style
|
|
119
|
-
}, restProps),
|
|
118
|
+
}, restProps), React.createElement(Input, {
|
|
120
119
|
value: value,
|
|
121
120
|
defaultValue: defaultValue,
|
|
122
121
|
allowClear: allowClear,
|
|
@@ -133,6 +132,6 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
133
132
|
onBlur: handleBlur
|
|
134
133
|
}));
|
|
135
134
|
};
|
|
136
|
-
var Search =
|
|
135
|
+
var Search = React.forwardRef(InternalSearch);
|
|
137
136
|
Search.displayName = 'Search';
|
|
138
137
|
export default Search;
|
package/es/select/interface.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { tuple } from '../_utils/type';
|
|
2
|
-
export var SelectSizes = tuple('large', 'middle', 'small');
|
|
2
|
+
export var SelectSizes = tuple('large', 'middle', 'small');
|
|
3
3
|
export var BorderTypes = tuple('none', 'underline', 'bordered');
|
|
4
4
|
export var Modes = tuple('multiple', 'single');
|
package/es/select/option.js
CHANGED
|
@@ -59,22 +59,22 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
59
59
|
minHeight: '22px',
|
|
60
60
|
background: 'none'
|
|
61
61
|
};
|
|
62
|
-
return
|
|
62
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
63
63
|
ref: optionRef,
|
|
64
64
|
className: optionCls,
|
|
65
65
|
title: titleText,
|
|
66
66
|
onClick: handleClick,
|
|
67
67
|
onMouseEnter: handleOnMouseEnter,
|
|
68
68
|
onMouseLeave: handleOnMouseLeave
|
|
69
|
-
},
|
|
69
|
+
}, React.createElement("div", {
|
|
70
70
|
className: contentCls
|
|
71
|
-
}, isMultiple ?
|
|
71
|
+
}, isMultiple ? React.createElement(Checkbox, {
|
|
72
72
|
style: checkStyle,
|
|
73
73
|
value: value,
|
|
74
74
|
disabled: disabled,
|
|
75
75
|
checked: isSelected
|
|
76
76
|
}, children) : children)));
|
|
77
77
|
};
|
|
78
|
-
var Option =
|
|
78
|
+
var Option = React.forwardRef(InternalOption);
|
|
79
79
|
Option.displayName = 'Option';
|
|
80
80
|
export default Option;
|