@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
|
@@ -37,14 +37,13 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
37
37
|
}
|
|
38
38
|
return t;
|
|
39
39
|
};
|
|
40
|
-
var INPUT_MIN_WIDTH = 4;
|
|
40
|
+
var INPUT_MIN_WIDTH = 4;
|
|
41
41
|
var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
42
42
|
var _classNames, _classNames2;
|
|
43
43
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
44
44
|
getPrefixCls = _useContext.getPrefixCls,
|
|
45
45
|
prefixCls = _useContext.prefixCls,
|
|
46
46
|
getLangMsg = _useContext.locale.getLangMsg;
|
|
47
|
-
// const quickSearchProps = getCompProps('QuickSearch', userDefaultProps, props)
|
|
48
47
|
var customPrefixcls = props.prefixCls,
|
|
49
48
|
className = props.className,
|
|
50
49
|
placeholder = props.placeholder,
|
|
@@ -62,7 +61,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
62
61
|
disabled = props.disabled,
|
|
63
62
|
borderType = props.borderType,
|
|
64
63
|
others = __rest(props, ["prefixCls", "className", "placeholder", "style", "desc", "dropdownStyle", "tags", "children", "onBlur", "onFocus", "onChange", "onSelect", "onSearch", "disabled", "borderType"]);
|
|
65
|
-
var realChildren = Array.isArray(tags) && tags.length ? tags : (0, _reactChildren.toArray)(children);
|
|
64
|
+
var realChildren = Array.isArray(tags) && tags.length ? tags : (0, _reactChildren.toArray)(children);
|
|
66
65
|
var innerRef = (0, _react.useRef)();
|
|
67
66
|
var quickSearchRef = ref || innerRef;
|
|
68
67
|
var dropDownRef = (0, _react.useRef)(null);
|
|
@@ -71,28 +70,27 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
71
70
|
var _useState = (0, _react.useState)(false),
|
|
72
71
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
73
72
|
isFocused = _useState2[0],
|
|
74
|
-
setIsFocused = _useState2[1];
|
|
73
|
+
setIsFocused = _useState2[1];
|
|
75
74
|
var _useState3 = (0, _react.useState)(false),
|
|
76
75
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
77
76
|
optionShow = _useState4[0],
|
|
78
|
-
setOptionShow = _useState4[1];
|
|
77
|
+
setOptionShow = _useState4[1];
|
|
79
78
|
var _useState5 = (0, _react.useState)(''),
|
|
80
79
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
81
80
|
searchValue = _useState6[0],
|
|
82
|
-
setSearchValue = _useState6[1];
|
|
81
|
+
setSearchValue = _useState6[1];
|
|
83
82
|
var _useState7 = (0, _react.useState)([]),
|
|
84
83
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
85
84
|
tagsList = _useState8[0],
|
|
86
|
-
setTagsList = _useState8[1];
|
|
85
|
+
setTagsList = _useState8[1];
|
|
87
86
|
var _useState9 = (0, _react.useState)(INPUT_MIN_WIDTH),
|
|
88
87
|
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
89
88
|
inputWidth = _useState10[0],
|
|
90
|
-
setInputWidth = _useState10[1];
|
|
89
|
+
setInputWidth = _useState10[1];
|
|
91
90
|
var _useState11 = (0, _react.useState)(0),
|
|
92
91
|
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
93
92
|
selectedIndex = _useState12[0],
|
|
94
|
-
setSelectedIndex = _useState12[1];
|
|
95
|
-
// 处理智能搜索props
|
|
93
|
+
setSelectedIndex = _useState12[1];
|
|
96
94
|
var getNlpSearchProps = function getNlpSearchProps() {
|
|
97
95
|
var nlpSearch = props.nlpSearch;
|
|
98
96
|
if (!nlpSearch) return {};
|
|
@@ -120,7 +118,6 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
120
118
|
var quickSearchCls = (0, _classnames.default)(quickSearchPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(quickSearchPrefixCls, "-focused"), isFocused || tagsList.length), (0, _defineProperty2.default)(_classNames, "".concat(quickSearchPrefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, "".concat(quickSearchPrefixCls, "-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames, "".concat(quickSearchPrefixCls, "-border"), borderType === 'bordered'), _classNames));
|
|
121
119
|
var quickSearchSelectorCls = (0, _classnames.default)((_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "".concat(quickSearchPrefixCls, "-selector"), true), (0, _defineProperty2.default)(_classNames2, "".concat(quickSearchPrefixCls, "-selector-disabled"), disabled), _classNames2));
|
|
122
120
|
var inputCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-input"), true));
|
|
123
|
-
// 下拉列表样式
|
|
124
121
|
var dropDownCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-dropdown"), true));
|
|
125
122
|
var dropContentCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-dropdown-scroll"), true));
|
|
126
123
|
var setInputFocus = function setInputFocus() {
|
|
@@ -152,7 +149,6 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
152
149
|
}
|
|
153
150
|
};
|
|
154
151
|
var handleKeyDownUp = function handleKeyDownUp(index, length) {
|
|
155
|
-
// index 为下标 length为长长度
|
|
156
152
|
var currentIndex = index;
|
|
157
153
|
if (index === 0) {
|
|
158
154
|
currentIndex = length - 1;
|
|
@@ -220,20 +216,16 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
220
216
|
tagsLength++;
|
|
221
217
|
}
|
|
222
218
|
switch (e.keyCode) {
|
|
223
|
-
// backspace
|
|
224
219
|
case 8:
|
|
225
220
|
!val && e.preventDefault();
|
|
226
221
|
handleKeyDownDel(val, JSON.parse((0, _stringify.default)(tagsList), e));
|
|
227
222
|
break;
|
|
228
|
-
// enter
|
|
229
223
|
case 13:
|
|
230
224
|
handleKeyDownEnter(val, selectedIndex);
|
|
231
225
|
break;
|
|
232
|
-
// up
|
|
233
226
|
case 38:
|
|
234
227
|
!canShowDesc() && handleKeyDownUp(selectedIndex, tagsLength);
|
|
235
228
|
break;
|
|
236
|
-
// down
|
|
237
229
|
case 40:
|
|
238
230
|
!canShowDesc() && handleKeyDownDown(selectedIndex, tagsLength);
|
|
239
231
|
break;
|
|
@@ -280,18 +272,18 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
280
272
|
onChange && (onChange === null || onChange === void 0 ? void 0 : onChange(getParamsListByKey(newTagsList, 'value'), newTagsList));
|
|
281
273
|
};
|
|
282
274
|
var renderSelectedTags = function renderSelectedTags() {
|
|
283
|
-
return
|
|
275
|
+
return _react.default.createElement(_react.default.Fragment, null, (0, _map.default)(tagsList).call(tagsList, function (item, index) {
|
|
284
276
|
var formatTag = formatSearchValue(item.label);
|
|
285
|
-
return
|
|
277
|
+
return _react.default.createElement("div", {
|
|
286
278
|
key: index,
|
|
287
279
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-selection-overflow-item"), true))
|
|
288
|
-
},
|
|
280
|
+
}, _react.default.createElement("span", {
|
|
289
281
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-selection-overflow-item-tag"), true)),
|
|
290
282
|
title: item.tag
|
|
291
|
-
}, item.tag),
|
|
283
|
+
}, item.tag), _react.default.createElement("span", {
|
|
292
284
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-selection-overflow-item-label"), true)),
|
|
293
285
|
title: formatTag
|
|
294
|
-
}, formatTag),
|
|
286
|
+
}, formatTag), _react.default.createElement(_index.Icon, {
|
|
295
287
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-selection-overflow-item-del"), true)),
|
|
296
288
|
type: "close-solid",
|
|
297
289
|
onClick: function onClick(e) {
|
|
@@ -303,10 +295,9 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
303
295
|
var getInputPlaceholder = function getInputPlaceholder() {
|
|
304
296
|
return placeholder || getLangMsg('Search', 'placeholder');
|
|
305
297
|
};
|
|
306
|
-
// 实现input placeholder
|
|
307
298
|
var renderPlaceholder = function renderPlaceholder() {
|
|
308
299
|
if (tagsList.length > 0 || searchValue) return null;
|
|
309
|
-
return
|
|
300
|
+
return _react.default.createElement("span", {
|
|
310
301
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-selection-placeholder"), true))
|
|
311
302
|
}, getInputPlaceholder());
|
|
312
303
|
};
|
|
@@ -315,26 +306,26 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
315
306
|
!disabled && setInputFocus();
|
|
316
307
|
};
|
|
317
308
|
var renderSelect = function renderSelect() {
|
|
318
|
-
return
|
|
309
|
+
return _react.default.createElement("div", (0, _extends2.default)({
|
|
319
310
|
className: quickSearchCls,
|
|
320
311
|
ref: quickSearchRef,
|
|
321
312
|
style: style,
|
|
322
313
|
onClick: handleClickInputFosus
|
|
323
|
-
}, others),
|
|
314
|
+
}, others), _react.default.createElement("span", {
|
|
324
315
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-prefix"), true))
|
|
325
|
-
},
|
|
316
|
+
}, _react.default.createElement(_index.Icon, {
|
|
326
317
|
type: "search"
|
|
327
|
-
})),
|
|
318
|
+
})), _react.default.createElement("div", {
|
|
328
319
|
className: quickSearchSelectorCls
|
|
329
|
-
},
|
|
320
|
+
}, _react.default.createElement("div", {
|
|
330
321
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-selection-overflow"), true)),
|
|
331
322
|
onClick: handleClickInputFosus
|
|
332
|
-
}, renderSelectedTags(), renderPlaceholder(),
|
|
323
|
+
}, renderSelectedTags(), renderPlaceholder(), _react.default.createElement("div", {
|
|
333
324
|
className: "".concat(quickSearchPrefixCls, "-selection-search"),
|
|
334
325
|
style: {
|
|
335
326
|
width: inputWidth
|
|
336
327
|
}
|
|
337
|
-
},
|
|
328
|
+
}, _react.default.createElement("input", {
|
|
338
329
|
ref: inputRef,
|
|
339
330
|
value: searchValue,
|
|
340
331
|
className: inputCls,
|
|
@@ -342,7 +333,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
342
333
|
onFocus: handleFocus,
|
|
343
334
|
onBlur: handleBlur,
|
|
344
335
|
onKeyDown: onKeyDown
|
|
345
|
-
}),
|
|
336
|
+
}), _react.default.createElement("span", {
|
|
346
337
|
ref: measureRef,
|
|
347
338
|
className: "".concat(quickSearchPrefixCls, "-selection-search-mirror")
|
|
348
339
|
}, searchValue, "\xA0")))));
|
|
@@ -357,7 +348,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
357
348
|
var isFormatVal = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
358
349
|
var _a, _b;
|
|
359
350
|
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')) {
|
|
360
|
-
return
|
|
351
|
+
return _react.default.createElement(_option.default, (0, _extends2.default)({
|
|
361
352
|
key: index
|
|
362
353
|
}, child.props, {
|
|
363
354
|
index: index,
|
|
@@ -367,7 +358,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
367
358
|
isFormatVal: isFormatVal
|
|
368
359
|
}));
|
|
369
360
|
}
|
|
370
|
-
return
|
|
361
|
+
return _react.default.createElement(_option.default, {
|
|
371
362
|
key: index,
|
|
372
363
|
index: index,
|
|
373
364
|
selectedIndex: selectedIndex,
|
|
@@ -378,62 +369,53 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
378
369
|
isFormatVal: isFormatVal
|
|
379
370
|
});
|
|
380
371
|
};
|
|
381
|
-
// 是否展示下拉提示
|
|
382
372
|
var canShowDesc = function canShowDesc() {
|
|
383
373
|
return !searchValue && !tagsList.length;
|
|
384
374
|
};
|
|
385
|
-
// loading
|
|
386
375
|
var renderLoading = function renderLoading() {
|
|
387
376
|
var loadingItemPrefixCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-npl-loading-item"), true));
|
|
388
|
-
return
|
|
377
|
+
return _react.default.createElement("div", {
|
|
389
378
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-npl-loading"), true))
|
|
390
|
-
},
|
|
379
|
+
}, _react.default.createElement("span", {
|
|
391
380
|
className: loadingItemPrefixCls
|
|
392
|
-
}),
|
|
381
|
+
}), _react.default.createElement("span", {
|
|
393
382
|
className: loadingItemPrefixCls
|
|
394
|
-
}),
|
|
383
|
+
}), _react.default.createElement("span", {
|
|
395
384
|
className: loadingItemPrefixCls
|
|
396
|
-
}),
|
|
385
|
+
}), _react.default.createElement("span", {
|
|
397
386
|
className: loadingItemPrefixCls
|
|
398
387
|
}));
|
|
399
388
|
};
|
|
400
|
-
// 智能搜索
|
|
401
389
|
var renderNlpSearch = function renderNlpSearch() {
|
|
402
390
|
var tag = getLangMsg('Search', 'nplDesc');
|
|
403
391
|
var value = nlpSearchResult.value,
|
|
404
392
|
label = nlpSearchResult.label;
|
|
405
|
-
return
|
|
393
|
+
return _react.default.createElement("div", {
|
|
406
394
|
className: (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-npl"), true))
|
|
407
395
|
}, nlpSearchLoading ? renderLoading() : renderOption({
|
|
408
396
|
tag: tag,
|
|
409
397
|
value: value
|
|
410
398
|
}, realChildren.length, label, false));
|
|
411
399
|
};
|
|
412
|
-
// 下拉列表为空时显示的内容
|
|
413
400
|
var renderNotContent = function renderNotContent() {
|
|
414
|
-
// 下拉列表为空
|
|
415
401
|
var emptyListCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-dropdown-empty"), true));
|
|
416
|
-
// const { notFoundContent } = quickSearchProps
|
|
417
402
|
var notFoundContent = props.notFoundContent;
|
|
418
403
|
var emptyContent = notFoundContent || getLangMsg('Search', 'emptyTip');
|
|
419
|
-
|
|
420
|
-
return realChildren.length === 0 && searchValue && /*#__PURE__*/_react.default.createElement("div", {
|
|
404
|
+
return realChildren.length === 0 && searchValue && _react.default.createElement("div", {
|
|
421
405
|
className: emptyListCls
|
|
422
406
|
}, emptyContent);
|
|
423
407
|
};
|
|
424
|
-
// 下拉列表
|
|
425
408
|
var renderDropDownContent = function renderDropDownContent(tagsTorender, heightStyle) {
|
|
426
|
-
return
|
|
409
|
+
return _react.default.createElement("div", {
|
|
427
410
|
className: dropContentCls,
|
|
428
411
|
style: heightStyle
|
|
429
412
|
}, tagsTorender, isSupportNlpSearch && renderNlpSearch());
|
|
430
413
|
};
|
|
431
|
-
// 下拉提示
|
|
432
414
|
var renderDesc = function renderDesc() {
|
|
433
415
|
var dropDoenDescCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(quickSearchPrefixCls, "-dropdown-desc"), true));
|
|
434
416
|
var dropDoenDesc = desc || getLangMsg('Search', 'desc');
|
|
435
|
-
return
|
|
436
|
-
return
|
|
417
|
+
return _react.default.createElement(_react.default.Fragment, null, (0, _map.default)(dropDoenDesc).call(dropDoenDesc, function (item, index) {
|
|
418
|
+
return _react.default.createElement("div", {
|
|
437
419
|
className: dropDoenDescCls,
|
|
438
420
|
key: index,
|
|
439
421
|
title: dropDoenDesc
|
|
@@ -441,8 +423,6 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
441
423
|
}));
|
|
442
424
|
};
|
|
443
425
|
var renderDropDown = function renderDropDown() {
|
|
444
|
-
// dropdownRender 自定义下拉列表 待完成
|
|
445
|
-
// const { listHeight } = quickSearchProps
|
|
446
426
|
var listHeight = props.listHeight;
|
|
447
427
|
var tagsTorender = realChildren;
|
|
448
428
|
if (Array.isArray(realChildren) && realChildren.length > 0) {
|
|
@@ -455,11 +435,10 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
455
435
|
var heightStyle = {
|
|
456
436
|
maxHeight: listHeight || '300px'
|
|
457
437
|
};
|
|
458
|
-
// 下拉框style属性
|
|
459
438
|
var dropDownStyle = (0, _extends2.default)({
|
|
460
439
|
width: style === null || style === void 0 ? void 0 : style.width
|
|
461
440
|
}, dropdownStyle);
|
|
462
|
-
return
|
|
441
|
+
return _react.default.createElement("div", {
|
|
463
442
|
className: dropDownCls,
|
|
464
443
|
style: dropDownStyle,
|
|
465
444
|
ref: dropDownRef
|
|
@@ -497,7 +476,7 @@ var InternalQuickSearch = function InternalQuickSearch(props, ref) {
|
|
|
497
476
|
});
|
|
498
477
|
return (0, _usePopper.default)(renderSelect(), renderDropDown(), popperProps);
|
|
499
478
|
};
|
|
500
|
-
var QuickSearch =
|
|
479
|
+
var QuickSearch = _react.default.forwardRef(InternalQuickSearch);
|
|
501
480
|
QuickSearch.displayName = 'QuickSearch';
|
|
502
481
|
var _default = QuickSearch;
|
|
503
482
|
exports.default = _default;
|
|
@@ -95,11 +95,11 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
95
95
|
})));
|
|
96
96
|
};
|
|
97
97
|
var text = function text() {
|
|
98
|
-
return
|
|
98
|
+
return _react.default.createElement("div", {
|
|
99
99
|
className: "".concat(prefixCls, "-panel-type")
|
|
100
100
|
}, (0, _map.default)(panelTypes).call(panelTypes, function (item, index) {
|
|
101
101
|
var _context;
|
|
102
|
-
return
|
|
102
|
+
return _react.default.createElement("span", {
|
|
103
103
|
key: index,
|
|
104
104
|
className: (0, _concat.default)(_context = "".concat(prefixCls, "-panel-type-list")).call(_context, item.code === type.code ? " ".concat(prefixCls, "-panel-type-list-active") : ''),
|
|
105
105
|
onClick: function onClick() {
|
|
@@ -117,16 +117,16 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
117
117
|
var getMoreInputValue = locale.getLangMsg('Search', 'viewMoreResult', {
|
|
118
118
|
inputValue: inputValue
|
|
119
119
|
});
|
|
120
|
-
return
|
|
120
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("div", {
|
|
121
121
|
ref: searchPanelRef,
|
|
122
122
|
className: searchPanelCls,
|
|
123
123
|
style: style
|
|
124
|
-
},
|
|
124
|
+
}, _react.default.createElement("div", {
|
|
125
125
|
className: "".concat(prefixCls, "-panel-wrapper")
|
|
126
|
-
},
|
|
126
|
+
}, _react.default.createElement("div", {
|
|
127
127
|
ref: tooltipRef,
|
|
128
128
|
className: "".concat(prefixCls, "-panel-tooltip-content")
|
|
129
|
-
},
|
|
129
|
+
}, _react.default.createElement(_index.Tooltip, {
|
|
130
130
|
placement: "bottomLeft",
|
|
131
131
|
visible: visible,
|
|
132
132
|
trigger: "click",
|
|
@@ -136,26 +136,26 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
136
136
|
getTriggerElement: function getTriggerElement(ele) {
|
|
137
137
|
return tooltipRef.current || ele;
|
|
138
138
|
}
|
|
139
|
-
},
|
|
139
|
+
}, _react.default.createElement("div", {
|
|
140
140
|
className: "".concat(prefixCls, "-panel-recommend")
|
|
141
|
-
},
|
|
141
|
+
}, _react.default.createElement("div", {
|
|
142
142
|
style: {
|
|
143
143
|
whiteSpace: 'nowrap'
|
|
144
144
|
}
|
|
145
|
-
}, type.label),
|
|
145
|
+
}, type.label), _react.default.createElement("span", {
|
|
146
146
|
className: "".concat(prefixCls, "-panel-recommend-icon"),
|
|
147
147
|
style: {
|
|
148
148
|
transform: "".concat(visible ? 'rotate(180deg)' : 'rotate(0deg)')
|
|
149
149
|
}
|
|
150
|
-
},
|
|
150
|
+
}, _react.default.createElement(_index.Icon, {
|
|
151
151
|
type: "arrow-down"
|
|
152
|
-
}))))),
|
|
152
|
+
}))))), _react.default.createElement(_index.Input, {
|
|
153
153
|
placeholder: placeholder || locale.getLangMsg('Search', 'placeholder'),
|
|
154
154
|
borderType: "none",
|
|
155
155
|
allowClear: true,
|
|
156
156
|
suffix: suffix,
|
|
157
157
|
onChange: handleSearchChange
|
|
158
|
-
})),
|
|
158
|
+
})), _react.default.createElement("div", {
|
|
159
159
|
className: "".concat(prefixCls, "-panel-dropDown"),
|
|
160
160
|
style: inputValue ? {
|
|
161
161
|
visibility: 'visible',
|
|
@@ -165,47 +165,43 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
165
165
|
height: 0,
|
|
166
166
|
opacity: 0
|
|
167
167
|
}
|
|
168
|
-
},
|
|
168
|
+
}, _react.default.createElement("div", {
|
|
169
169
|
className: "".concat(prefixCls, "-panel-dropDown-result")
|
|
170
|
-
},
|
|
170
|
+
}, _react.default.createElement("div", {
|
|
171
171
|
className: "".concat(prefixCls, "-panel-dropDown-result-wrapper")
|
|
172
172
|
}, Array.isArray(panelResult) && (0, _map.default)(panelResult).call(panelResult, function (item, index) {
|
|
173
173
|
var _context3;
|
|
174
|
-
return (
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
className: "".concat(prefixCls, "-panel-dropDown-result-list-sub-title")
|
|
206
|
-
}, item.subTitle)))
|
|
207
|
-
);
|
|
208
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
174
|
+
return _react.default.createElement("div", {
|
|
175
|
+
className: (0, _concat.default)(_context3 = "".concat(prefixCls, "-panel-dropDown-result-list")).call(_context3, item.id === result.id ? " ".concat(prefixCls, "-panel-dropDown-result-list-active") : ''),
|
|
176
|
+
key: index,
|
|
177
|
+
onMouseOver: function onMouseOver() {
|
|
178
|
+
return handleMouseOver(item);
|
|
179
|
+
},
|
|
180
|
+
onClick: function onClick() {
|
|
181
|
+
return handleSelect(item);
|
|
182
|
+
}
|
|
183
|
+
}, item.icon && _react.default.createElement("img", {
|
|
184
|
+
src: item.icon,
|
|
185
|
+
alt: "img"
|
|
186
|
+
}), _react.default.createElement("div", {
|
|
187
|
+
style: {
|
|
188
|
+
display: 'flex',
|
|
189
|
+
justifyContent: 'space-between',
|
|
190
|
+
flex: 1
|
|
191
|
+
}
|
|
192
|
+
}, _react.default.createElement("div", {
|
|
193
|
+
style: {
|
|
194
|
+
width: '60%'
|
|
195
|
+
}
|
|
196
|
+
}, _react.default.createElement("div", {
|
|
197
|
+
className: "".concat(prefixCls, "-panel-dropDown-result-list-title"),
|
|
198
|
+
title: item.title
|
|
199
|
+
}, item.title), _react.default.createElement("div", {
|
|
200
|
+
className: "".concat(prefixCls, "-panel-dropDown-result-list-type")
|
|
201
|
+
}, item.typeName)), _react.default.createElement("div", {
|
|
202
|
+
className: "".concat(prefixCls, "-panel-dropDown-result-list-sub-title")
|
|
203
|
+
}, item.subTitle)));
|
|
204
|
+
})), _react.default.createElement("div", {
|
|
209
205
|
className: (0, _concat.default)(_context4 = "".concat(prefixCls, "-panel-dropDown-search")).call(_context4, result.id === 'search' ? " ".concat(prefixCls, "-panel-dropDown-search-active") : ''),
|
|
210
206
|
onMouseOver: function onMouseOver() {
|
|
211
207
|
return handleMouseOver({
|
|
@@ -213,36 +209,36 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
213
209
|
});
|
|
214
210
|
},
|
|
215
211
|
onClick: handleSearch
|
|
216
|
-
},
|
|
212
|
+
}, _react.default.createElement(_index.Icon, {
|
|
217
213
|
style: {
|
|
218
214
|
fontSize: 18
|
|
219
215
|
},
|
|
220
216
|
type: "search"
|
|
221
|
-
}),
|
|
217
|
+
}), _react.default.createElement("span", {
|
|
222
218
|
className: "".concat(prefixCls, "-panel-dropDown-search-value")
|
|
223
|
-
}, "\u201C".concat(inputValue, "\u201D"))), panelSearchLoading &&
|
|
219
|
+
}, "\u201C".concat(inputValue, "\u201D"))), panelSearchLoading && _react.default.createElement("span", {
|
|
224
220
|
className: "".concat(prefixCls, "-panel-dropDown-loading")
|
|
225
|
-
},
|
|
221
|
+
}, _react.default.createElement(_index.Spin, {
|
|
226
222
|
type: "container"
|
|
227
|
-
}))),
|
|
223
|
+
}))), _react.default.createElement("div", {
|
|
228
224
|
className: "".concat(prefixCls, "-panel-dropDown-summary")
|
|
229
|
-
},
|
|
225
|
+
}, _react.default.createElement("div", {
|
|
230
226
|
className: "".concat(prefixCls, "-panel-dropDown-summary-pic")
|
|
231
|
-
}, typeof displayImg === 'string' ?
|
|
227
|
+
}, typeof displayImg === 'string' ? _react.default.createElement(_index.Image, {
|
|
232
228
|
src: displayImg,
|
|
233
229
|
preview: false
|
|
234
|
-
}) : displayImg),
|
|
230
|
+
}) : displayImg), _react.default.createElement("div", {
|
|
235
231
|
className: "".concat(prefixCls, "-panel-dropDown-summary-title")
|
|
236
|
-
}, result.id === 'search' ? getMoreInputValue : result.title), result.id === 'search' ?
|
|
232
|
+
}, result.id === 'search' ? getMoreInputValue : result.title), result.id === 'search' ? _react.default.createElement("div", {
|
|
237
233
|
className: "".concat(prefixCls, "-panel-dropDown-summary-list")
|
|
238
234
|
}, (0, _concat.default)(_context5 = "".concat(searchLanMsg.range, ": ")).call(_context5, type.label)) : (0, _map.default)(_context6 = (0, _keys.default)(displayList)).call(_context6, function (item, index) {
|
|
239
|
-
return
|
|
235
|
+
return _react.default.createElement("div", {
|
|
240
236
|
key: index,
|
|
241
237
|
className: "".concat(prefixCls, "-panel-dropDown-summary-list")
|
|
242
238
|
}, renderDisplayListShow(displayList[item], result[item]));
|
|
243
239
|
})))));
|
|
244
240
|
};
|
|
245
|
-
var SearchPanel =
|
|
241
|
+
var SearchPanel = _react.default.forwardRef(InternalSearchPanel);
|
|
246
242
|
SearchPanel.displayName = 'SearchPanel';
|
|
247
243
|
var _default = SearchPanel;
|
|
248
244
|
exports.default = _default;
|
package/lib/search/search.js
CHANGED
|
@@ -89,9 +89,9 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
89
89
|
if (!prefix) {
|
|
90
90
|
return null;
|
|
91
91
|
}
|
|
92
|
-
return prefix && typeof prefix === 'boolean' ?
|
|
92
|
+
return prefix && typeof prefix === 'boolean' ? _react.default.createElement("span", {
|
|
93
93
|
className: "".concat(searchPrefixCls, "-prefix")
|
|
94
|
-
},
|
|
94
|
+
}, _react.default.createElement(_index.Icon, {
|
|
95
95
|
type: "search"
|
|
96
96
|
})) : prefix;
|
|
97
97
|
}, [prefix, searchPrefixCls]);
|
|
@@ -99,15 +99,15 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
99
99
|
if (!suffix) {
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
|
-
return typeof suffix === 'boolean' && suffix ?
|
|
102
|
+
return typeof suffix === 'boolean' && suffix ? _react.default.createElement("span", {
|
|
103
103
|
className: "".concat(searchPrefixCls, "-suffix")
|
|
104
|
-
},
|
|
104
|
+
}, _react.default.createElement(_index.Icon, {
|
|
105
105
|
className: "kd-search-prefix",
|
|
106
106
|
type: "search"
|
|
107
107
|
})) : suffix;
|
|
108
108
|
}, [suffix, searchPrefixCls]);
|
|
109
109
|
if (type === 'quick-search') {
|
|
110
|
-
return
|
|
110
|
+
return _react.default.createElement(_quickSearch.default, (0, _extends2.default)({}, restProps, {
|
|
111
111
|
ref: ref,
|
|
112
112
|
borderType: borderType,
|
|
113
113
|
disabled: disabled,
|
|
@@ -120,15 +120,14 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
120
120
|
}), children);
|
|
121
121
|
}
|
|
122
122
|
if (type === 'panel') {
|
|
123
|
-
|
|
124
|
-
return /*#__PURE__*/_react.default.createElement(_searchPanel.default, (0, _extends2.default)({}, searchProps, {
|
|
123
|
+
return _react.default.createElement(_searchPanel.default, (0, _extends2.default)({}, searchProps, {
|
|
125
124
|
prefixCls: searchPrefixCls
|
|
126
125
|
}));
|
|
127
126
|
}
|
|
128
|
-
return
|
|
127
|
+
return _react.default.createElement("div", (0, _extends2.default)({
|
|
129
128
|
className: searchCls,
|
|
130
129
|
style: style
|
|
131
|
-
}, restProps),
|
|
130
|
+
}, restProps), _react.default.createElement(_index.Input, {
|
|
132
131
|
value: value,
|
|
133
132
|
defaultValue: defaultValue,
|
|
134
133
|
allowClear: allowClear,
|
|
@@ -145,7 +144,7 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
145
144
|
onBlur: handleBlur
|
|
146
145
|
}));
|
|
147
146
|
};
|
|
148
|
-
var Search =
|
|
147
|
+
var Search = _react.default.forwardRef(InternalSearch);
|
|
149
148
|
Search.displayName = 'Search';
|
|
150
149
|
var _default = Search;
|
|
151
150
|
exports.default = _default;
|
package/lib/select/interface.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SelectSizes = exports.Modes = exports.BorderTypes = void 0;
|
|
7
7
|
var _type = require("../_utils/type");
|
|
8
|
-
var SelectSizes = (0, _type.tuple)('large', 'middle', 'small');
|
|
8
|
+
var SelectSizes = (0, _type.tuple)('large', 'middle', 'small');
|
|
9
9
|
exports.SelectSizes = SelectSizes;
|
|
10
10
|
var BorderTypes = (0, _type.tuple)('none', 'underline', 'bordered');
|
|
11
11
|
exports.BorderTypes = BorderTypes;
|
package/lib/select/option.js
CHANGED
|
@@ -71,23 +71,23 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
71
71
|
minHeight: '22px',
|
|
72
72
|
background: 'none'
|
|
73
73
|
};
|
|
74
|
-
return
|
|
74
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("div", {
|
|
75
75
|
ref: optionRef,
|
|
76
76
|
className: optionCls,
|
|
77
77
|
title: titleText,
|
|
78
78
|
onClick: handleClick,
|
|
79
79
|
onMouseEnter: handleOnMouseEnter,
|
|
80
80
|
onMouseLeave: handleOnMouseLeave
|
|
81
|
-
},
|
|
81
|
+
}, _react.default.createElement("div", {
|
|
82
82
|
className: contentCls
|
|
83
|
-
}, isMultiple ?
|
|
83
|
+
}, isMultiple ? _react.default.createElement(_index.Checkbox, {
|
|
84
84
|
style: checkStyle,
|
|
85
85
|
value: value,
|
|
86
86
|
disabled: disabled,
|
|
87
87
|
checked: isSelected
|
|
88
88
|
}, children) : children)));
|
|
89
89
|
};
|
|
90
|
-
var Option =
|
|
90
|
+
var Option = _react.default.forwardRef(InternalOption);
|
|
91
91
|
Option.displayName = 'Option';
|
|
92
92
|
var _default = Option;
|
|
93
93
|
exports.default = _default;
|