amis 1.9.1-beta.12 → 1.9.1-beta.21
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/lib/components/AssociatedSelection.d.ts +40 -40
- package/lib/components/Badge.d.ts +1 -1
- package/lib/components/Badge.js.map +1 -1
- package/lib/components/ChainedSelection.d.ts +40 -40
- package/lib/components/GroupedSelection.d.ts +40 -40
- package/lib/components/GroupedSelection.js +3 -2
- package/lib/components/GroupedSelection.js.map +2 -2
- package/lib/components/PickerContainer.d.ts +1 -0
- package/lib/components/PickerContainer.js +4 -4
- package/lib/components/PickerContainer.js.map +2 -2
- package/lib/components/Radios.d.ts +10 -10
- package/lib/components/ResultBox.d.ts +44 -40
- package/lib/components/ResultBox.js +40 -6
- package/lib/components/ResultBox.js.map +2 -2
- package/lib/components/ResultList.d.ts +43 -53
- package/lib/components/ResultList.js +34 -22
- package/lib/components/ResultList.js.map +2 -2
- package/lib/components/ResultTableList.d.ts +40 -40
- package/lib/components/ResultTableList.js +16 -17
- package/lib/components/ResultTableList.js.map +2 -2
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/Select.d.ts +498 -294
- package/lib/components/Select.js +58 -10
- package/lib/components/Select.js.map +2 -2
- package/lib/components/Selection.d.ts +41 -40
- package/lib/components/Selection.js.map +2 -2
- package/lib/components/TableSelection.d.ts +42 -40
- package/lib/components/TableSelection.js +7 -2
- package/lib/components/TableSelection.js.map +2 -2
- package/lib/components/TabsTransfer.d.ts +2 -2
- package/lib/components/TabsTransfer.js.map +1 -1
- package/lib/components/TooltipWrapper.d.ts +1 -1
- package/lib/components/TooltipWrapper.js.map +2 -2
- package/lib/components/Transfer.d.ts +40 -40
- package/lib/components/Transfer.js +1 -1
- package/lib/components/Transfer.js.map +2 -2
- package/lib/components/TransferDropDown.d.ts +43 -40
- package/lib/components/TransferDropDown.js +2 -2
- package/lib/components/TransferDropDown.js.map +2 -2
- package/lib/components/TreeSelection.d.ts +40 -40
- package/lib/components/TreeSelection.js +3 -2
- package/lib/components/TreeSelection.js.map +2 -2
- package/lib/components/formula/Editor.d.ts +45 -41
- package/lib/components/formula/Editor.js +8 -2
- package/lib/components/formula/Editor.js.map +2 -2
- package/lib/components/formula/Picker.d.ts +43 -41
- package/lib/components/formula/Picker.js +40 -20
- package/lib/components/formula/Picker.js.map +2 -2
- package/lib/components/formula/VariableList.d.ts +2 -0
- package/lib/components/formula/VariableList.js +15 -5
- package/lib/components/formula/VariableList.js.map +2 -2
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +5 -1
- package/lib/components/index.js.map +2 -2
- package/lib/components/schema-editor/SchemaVariableList.d.ts +1 -0
- package/lib/components/schema-editor/SchemaVariableList.js +2 -2
- package/lib/components/schema-editor/SchemaVariableList.js.map +2 -2
- package/lib/components/schema-editor/SchemaVariableListPicker.d.ts +1 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.js +2 -2
- package/lib/components/schema-editor/SchemaVariableListPicker.js.map +2 -2
- package/lib/components/table/HeadCellFilter.js +4 -1
- package/lib/components/table/HeadCellFilter.js.map +2 -2
- package/lib/components/table/HeadCellSort.js +30 -24
- package/lib/components/table/HeadCellSort.js.map +2 -2
- package/lib/components/table/index.d.ts +6 -3
- package/lib/components/table/index.js +72 -86
- package/lib/components/table/index.js.map +2 -2
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/en-US.js.map +2 -2
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-CN.js.map +2 -2
- package/lib/renderers/Action.d.ts +21 -4
- package/lib/renderers/Action.js +44 -20
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/Breadcrumb.js +2 -2
- package/lib/renderers/Breadcrumb.js.map +2 -2
- package/lib/renderers/CRUD.js +3 -0
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Form/InputFormula.d.ts +5 -1
- package/lib/renderers/Form/InputFormula.js +2 -2
- package/lib/renderers/Form/InputFormula.js.map +2 -2
- package/lib/renderers/Form/InputImage.js.map +2 -2
- package/lib/renderers/Form/InputTag.d.ts +8 -0
- package/lib/renderers/Form/InputTag.js +2 -2
- package/lib/renderers/Form/InputTag.js.map +2 -2
- package/lib/renderers/Form/InputTree.d.ts +4 -0
- package/lib/renderers/Form/InputTree.js +2 -2
- package/lib/renderers/Form/InputTree.js.map +2 -2
- package/lib/renderers/Form/Picker.d.ts +1 -1
- package/lib/renderers/Form/Picker.js +38 -23
- package/lib/renderers/Form/Picker.js.map +2 -2
- package/lib/renderers/Form/Select.d.ts +19 -0
- package/lib/renderers/Form/Select.js +2 -2
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/Transfer.d.ts +1 -0
- package/lib/renderers/Form/Transfer.js +4 -0
- package/lib/renderers/Form/Transfer.js.map +2 -2
- package/lib/renderers/Form/wrapControl.js +10 -10
- package/lib/renderers/Form/wrapControl.js.map +2 -2
- package/lib/renderers/QRCode.d.ts +16 -0
- package/lib/renderers/QRCode.js +25 -1
- package/lib/renderers/QRCode.js.map +2 -2
- package/lib/renderers/Service.js +0 -1
- package/lib/renderers/Service.js.map +2 -2
- package/lib/renderers/Steps.d.ts +2 -2
- package/lib/renderers/Steps.js +1 -1
- package/lib/renderers/Steps.js.map +2 -2
- package/lib/renderers/Table/exportExcel.js +50 -36
- package/lib/renderers/Table/exportExcel.js.map +2 -2
- package/lib/renderers/Table/index.js +2 -1
- package/lib/renderers/Table/index.js.map +2 -2
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.d.ts +1 -1
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.js +38 -24
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.js.map +2 -2
- package/lib/renderers/Table-v2/index.d.ts +10 -4
- package/lib/renderers/Table-v2/index.js +109 -58
- package/lib/renderers/Table-v2/index.js.map +2 -2
- package/lib/renderers/Tabs.d.ts +6 -2
- package/lib/renderers/Tabs.js +21 -0
- package/lib/renderers/Tabs.js.map +2 -2
- package/lib/store/table-v2.d.ts +210 -4
- package/lib/store/table-v2.js +82 -5
- package/lib/store/table-v2.js.map +2 -2
- package/lib/themes/ang-ie11.css +140 -44
- package/lib/themes/ang.css +140 -33
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +140 -44
- package/lib/themes/antd.css +140 -33
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +297 -197
- package/lib/themes/cxd.css +151 -38
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +140 -44
- package/lib/themes/dark.css +140 -33
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default-ie11.css +297 -197
- package/lib/themes/default.css +151 -38
- package/lib/themes/default.css.map +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/types.js.map +1 -1
- package/lib/utils/formula.js +7 -5
- package/lib/utils/formula.js.map +2 -2
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/helper.js +11 -1
- package/lib/utils/helper.js.map +2 -2
- package/package.json +2 -2
- package/schema.json +103 -35
- package/scss/_properties.scss +11 -6
- package/scss/components/_formula.scss +45 -4
- package/scss/components/_modal.scss +1 -1
- package/scss/components/_result-box.scss +34 -2
- package/scss/components/form/_checks.scss +47 -44
- package/scss/components/form/_date.scss +28 -19
- package/scss/components/form/_icon-picker.scss +10 -6
- package/scss/components/form/_select.scss +77 -34
- package/scss/components/form/_selection.scss +9 -6
- package/scss/components/form/_switch.scss +1 -0
- package/scss/components/form/_text.scss +2 -0
- package/scss/components/form/_transfer.scss +2 -1
- package/scss/themes/_cxd-variables.scss +3 -1
- package/scss/themes/cxd.scss +9 -6
- package/sdk/ang-ie11.css +159 -46
- package/sdk/ang.css +159 -35
- package/sdk/antd-ie11.css +159 -46
- package/sdk/antd.css +159 -35
- package/sdk/barcode.js +51 -51
- package/sdk/charts.js +14 -14
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +317 -199
- package/sdk/cxd.css +171 -40
- package/sdk/dark-ie11.css +159 -46
- package/sdk/dark.css +159 -35
- package/sdk/exceljs.js +1 -1
- package/sdk/locale/de-DE.js +2 -2
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +16 -16
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +317 -199
- package/sdk/sdk.css +171 -40
- package/sdk/sdk.js +1353 -1351
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/components/Badge.tsx +1 -1
- package/src/components/GroupedSelection.tsx +3 -2
- package/src/components/PickerContainer.tsx +13 -8
- package/src/components/ResultBox.tsx +95 -11
- package/src/components/ResultList.tsx +48 -51
- package/src/components/ResultTableList.tsx +32 -33
- package/src/components/Select.tsx +138 -17
- package/src/components/Selection.tsx +1 -0
- package/src/components/TableSelection.tsx +15 -8
- package/src/components/TabsTransfer.tsx +2 -2
- package/src/components/TooltipWrapper.tsx +20 -14
- package/src/components/Transfer.tsx +0 -4
- package/src/components/TransferDropDown.tsx +9 -1
- package/src/components/TreeSelection.tsx +2 -1
- package/src/components/formula/Editor.tsx +17 -2
- package/src/components/formula/Picker.tsx +44 -7
- package/src/components/formula/VariableList.tsx +36 -2
- package/src/components/index.tsx +4 -0
- package/src/components/schema-editor/SchemaVariableList.tsx +4 -2
- package/src/components/schema-editor/SchemaVariableListPicker.tsx +4 -1
- package/src/components/table/HeadCellFilter.tsx +4 -1
- package/src/components/table/HeadCellSort.tsx +1 -1
- package/src/components/table/index.tsx +66 -90
- package/src/locale/de-DE.ts +2 -2
- package/src/locale/en-US.ts +2 -2
- package/src/locale/zh-CN.ts +1 -1
- package/src/renderers/Action.tsx +64 -19
- package/src/renderers/Breadcrumb.tsx +11 -12
- package/src/renderers/CRUD.tsx +2 -0
- package/src/renderers/Form/InputFormula.tsx +9 -2
- package/src/renderers/Form/InputImage.tsx +4 -2
- package/src/renderers/Form/InputTag.tsx +14 -0
- package/src/renderers/Form/InputTree.tsx +7 -0
- package/src/renderers/Form/Picker.tsx +11 -1
- package/src/renderers/Form/Select.tsx +32 -1
- package/src/renderers/Form/Transfer.tsx +6 -0
- package/src/renderers/Form/wrapControl.tsx +10 -10
- package/src/renderers/QRCode.tsx +50 -1
- package/src/renderers/Service.tsx +0 -1
- package/src/renderers/Steps.tsx +5 -5
- package/src/renderers/Table/exportExcel.ts +29 -12
- package/src/renderers/Table/index.tsx +9 -7
- package/src/renderers/Table-v2/HeadCellSearchDropdown.tsx +14 -9
- package/src/renderers/Table-v2/index.tsx +130 -58
- package/src/renderers/Tabs.tsx +33 -3
- package/src/store/table-v2.ts +104 -7
- package/src/types.ts +2 -1
- package/src/utils/formula.ts +7 -5
- package/src/utils/helper.ts +12 -2
@@ -4,11 +4,14 @@ exports.ResultBox = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
5
5
|
var theme_1 = require("../theme");
|
6
6
|
var react_1 = (0, tslib_1.__importDefault)(require("react"));
|
7
|
+
var omit_1 = (0, tslib_1.__importDefault)(require("lodash/omit"));
|
8
|
+
var isInteger_1 = (0, tslib_1.__importDefault)(require("lodash/isInteger"));
|
7
9
|
var uncontrollable_1 = require("uncontrollable");
|
8
10
|
var icons_1 = require("./icons");
|
9
11
|
var Input_1 = (0, tslib_1.__importDefault)(require("./Input"));
|
10
12
|
var helper_1 = require("../utils/helper");
|
11
13
|
var locale_1 = require("../locale");
|
14
|
+
var TooltipWrapper_1 = (0, tslib_1.__importDefault)(require("./TooltipWrapper"));
|
12
15
|
var isPlainObject = require("lodash/isPlainObject");
|
13
16
|
var ResultBox = /** @class */ (function (_super) {
|
14
17
|
(0, tslib_1.__extends)(ResultBox, _super);
|
@@ -60,9 +63,41 @@ var ResultBox = /** @class */ (function (_super) {
|
|
60
63
|
var onChange = this.props.onChange;
|
61
64
|
onChange === null || onChange === void 0 ? void 0 : onChange(e.currentTarget.value);
|
62
65
|
};
|
66
|
+
ResultBox.prototype.renderMultipeTags = function (tags) {
|
67
|
+
var _this = this;
|
68
|
+
var _a = this.props, maxTagCount = _a.maxTagCount, overflowTagPopover = _a.overflowTagPopover, itemRender = _a.itemRender, cx = _a.classnames;
|
69
|
+
if (maxTagCount != null &&
|
70
|
+
(0, isInteger_1.default)(Math.floor(maxTagCount)) &&
|
71
|
+
Math.floor(maxTagCount) >= 0 &&
|
72
|
+
Math.floor(maxTagCount) < tags.length) {
|
73
|
+
var maxVisibleCount_1 = Math.floor(maxTagCount);
|
74
|
+
var tooltipProps_1 = (0, tslib_1.__assign)({ placement: 'top', trigger: 'hover', showArrow: false, offset: [0, -10], tooltipClassName: cx('ResultBox-overflow', overflowTagPopover === null || overflowTagPopover === void 0 ? void 0 : overflowTagPopover.tooltipClassName) }, (0, omit_1.default)(overflowTagPopover, ['children', 'content', 'tooltipClassName']));
|
75
|
+
return (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], tags.slice(0, maxVisibleCount_1), true), [
|
76
|
+
{ label: "+ ".concat(tags.length - maxVisibleCount_1, " ...") }
|
77
|
+
], false).map(function (item, index) {
|
78
|
+
return index === maxVisibleCount_1 ? (react_1.default.createElement(TooltipWrapper_1.default, { key: tags.length, tooltip: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, tooltipProps_1), { children: function () { return (react_1.default.createElement("div", { className: cx('ResultBox-overflow-wrapper') }, tags
|
79
|
+
.slice(maxVisibleCount_1, tags.length)
|
80
|
+
.map(function (item, index) {
|
81
|
+
var itemIndex = index + maxVisibleCount_1;
|
82
|
+
return (react_1.default.createElement("div", { className: cx('ResultBox-value'), key: itemIndex },
|
83
|
+
react_1.default.createElement("span", { className: cx('ResultBox-valueLabel') }, itemRender(item)),
|
84
|
+
react_1.default.createElement("a", { "data-index": itemIndex, onClick: _this.removeItem },
|
85
|
+
react_1.default.createElement(icons_1.Icon, { icon: "close", className: "icon" }))));
|
86
|
+
}))); } }) },
|
87
|
+
react_1.default.createElement("div", { className: cx('ResultBox-value'), key: index },
|
88
|
+
react_1.default.createElement("span", { className: cx('ResultBox-valueLabel') }, item.label)))) : (react_1.default.createElement("div", { className: cx('ResultBox-value'), key: index },
|
89
|
+
react_1.default.createElement("span", { className: cx('ResultBox-valueLabel') }, itemRender(item)),
|
90
|
+
react_1.default.createElement("a", { "data-index": index, onClick: _this.removeItem },
|
91
|
+
react_1.default.createElement(icons_1.Icon, { icon: "close", className: "icon" }))));
|
92
|
+
});
|
93
|
+
}
|
94
|
+
return tags.map(function (item, index) { return (react_1.default.createElement("div", { className: cx('ResultBox-value'), key: index },
|
95
|
+
react_1.default.createElement("span", { className: cx('ResultBox-valueLabel') }, itemRender(item)),
|
96
|
+
react_1.default.createElement("a", { "data-index": index, onClick: _this.removeItem },
|
97
|
+
react_1.default.createElement(icons_1.Icon, { icon: "close", className: "icon" })))); });
|
98
|
+
};
|
63
99
|
ResultBox.prototype.render = function () {
|
64
100
|
var _a;
|
65
|
-
var _this = this;
|
66
101
|
var _b = this.props, className = _b.className, cx = _b.classnames, classPrefix = _b.classPrefix, clearable = _b.clearable, disabled = _b.disabled, hasError = _b.hasError, result = _b.result, value = _b.value, placeholder = _b.placeholder, children = _b.children, itemRender = _b.itemRender, allowInput = _b.allowInput, inputPlaceholder = _b.inputPlaceholder, onResultChange = _b.onResultChange, onChange = _b.onChange, onResultClick = _b.onResultClick, __ = _b.translate, locale = _b.locale, onKeyPress = _b.onKeyPress, onFocus = _b.onFocus, onBlur = _b.onBlur, borderMode = _b.borderMode, useMobileUI = _b.useMobileUI, hasDropDownArrow = _b.hasDropDownArrow, onClear = _b.onClear, rest = (0, tslib_1.__rest)(_b, ["className", "classnames", "classPrefix", "clearable", "disabled", "hasError", "result", "value", "placeholder", "children", "itemRender", "allowInput", "inputPlaceholder", "onResultChange", "onChange", "onResultClick", "translate", "locale", "onKeyPress", "onFocus", "onBlur", "borderMode", "useMobileUI", "hasDropDownArrow", "onClear"]);
|
67
102
|
var isFocused = this.state.isFocused;
|
68
103
|
var mobileUI = useMobileUI && (0, helper_1.isMobile)();
|
@@ -77,13 +112,12 @@ var ResultBox = /** @class */ (function (_super) {
|
|
77
112
|
},
|
78
113
|
_a["ResultBox--border".concat((0, helper_1.ucFirst)(borderMode))] = borderMode,
|
79
114
|
_a)), onClick: onResultClick, tabIndex: !allowInput && !disabled && onFocus ? 0 : -1, onKeyPress: allowInput ? undefined : onKeyPress, onFocus: allowInput ? undefined : onFocus, onBlur: allowInput ? undefined : onBlur },
|
80
|
-
Array.isArray(result) && result.length ? (result.
|
81
|
-
react_1.default.createElement("span", { className: cx('ResultBox-valueLabel') }, itemRender(item)),
|
82
|
-
react_1.default.createElement("a", { "data-index": index, onClick: _this.removeItem },
|
83
|
-
react_1.default.createElement(icons_1.Icon, { icon: "close", className: "icon" })))); })) : result && !Array.isArray(result) ? (react_1.default.createElement("span", { className: cx('ResultBox-singleValue') }, isPlainObject(result) ? itemRender(result) : result)) : allowInput && !disabled ? null : (react_1.default.createElement("span", { className: cx('ResultBox-placeholder') }, __(placeholder || 'placeholder.noData'))),
|
115
|
+
Array.isArray(result) && result.length ? (this.renderMultipeTags(result)) : result && !Array.isArray(result) ? (react_1.default.createElement("span", { className: cx('ResultBox-singleValue') }, isPlainObject(result) ? itemRender(result) : result)) : allowInput && !disabled ? null : (react_1.default.createElement("span", { className: cx('ResultBox-placeholder') }, __(placeholder || 'placeholder.noData'))),
|
84
116
|
allowInput && !disabled ? (react_1.default.createElement(Input_1.default, (0, tslib_1.__assign)({}, rest, { onKeyPress: onKeyPress, ref: this.inputRef, value: value || '', onChange: this.handleChange, placeholder: __(Array.isArray(result) && result.length
|
85
117
|
? inputPlaceholder
|
86
|
-
:
|
118
|
+
: result
|
119
|
+
? ''
|
120
|
+
: placeholder), onFocus: this.handleFocus, onBlur: this.handleBlur }))) : null,
|
87
121
|
children,
|
88
122
|
clear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;;gDAOR;IAGD;QADC,iBAAQ;;;;+CAOR;IAGD;QADC,iBAAQ;;0EACK,eAAK,oBAAL,eAAK,CAAC,UAAU;;+CAS7B;IAGD;QADC,iBAAQ;;0EACO,eAAK,oBAAL,eAAK,CAAC,WAAW;;iDAGhC;IAqMH,gBAAC;CAAA,AAzQD,CAA+B,eAAK,CAAC,SAAS,GAyQ7C;AAzQY,8BAAS;AA2QtB,kBAAe,IAAA,iBAAS,EACtB,IAAA,mBAAU,EACR,IAAA,+BAAc,EAAC,SAAS,EAAE;IACxB,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,gBAAgB;CACzB,CAAC,CACH,CACF,CAAC",
|
10
10
|
"sourcesContent": [
|
11
|
-
"import {ThemeProps, themeable} from '../theme';\nimport React from 'react';\nimport {InputBoxProps} from './InputBox';\nimport {uncontrollable} from 'uncontrollable';\nimport {Icon} from './icons';\nimport Input from './Input';\nimport {autobind, isMobile, ucFirst} from '../utils/helper';\nimport {LocaleProps, localeable} from '../locale';\nimport isPlainObject = require('lodash/isPlainObject');\n\nexport interface ResultBoxProps\n extends ThemeProps,\n LocaleProps,\n Omit<InputBoxProps, 'result' | 'prefix' | 'onChange' | 'translate'> {\n onChange?: (value: string) => void;\n onResultClick?: (e: React.MouseEvent<HTMLElement>) => void;\n result?: Array<any> | any;\n itemRender: (value: any) => JSX.Element | string;\n onResultChange?: (value: Array<any>) => void;\n onClear?: (e: React.MouseEvent<HTMLElement>) => void;\n allowInput?: boolean;\n inputPlaceholder: string;\n useMobileUI?: boolean;\n hasDropDownArrow?: boolean;\n}\n\nexport class ResultBox extends React.Component<ResultBoxProps> {\n static defaultProps: Pick<\n ResultBoxProps,\n 'clearable' | 'placeholder' | 'itemRender' | 'inputPlaceholder'\n > = {\n clearable: false,\n placeholder: 'placeholder.noData',\n inputPlaceholder: 'placeholder.enter',\n itemRender: (option: any) => (\n <span>{`${option.scopeLabel || ''}${option.label}`}</span>\n )\n };\n\n state = {\n isFocused: false\n };\n\n inputRef: React.RefObject<any> = React.createRef();\n\n focus() {\n this.inputRef.current?.focus();\n }\n\n blur() {\n this.inputRef.current?.blur();\n }\n\n @autobind\n clearValue(e: React.MouseEvent<any>) {\n e.preventDefault();\n this.props.onClear && this.props.onClear(e);\n this.props.onResultChange && this.props.onResultChange([]);\n }\n\n @autobind\n handleFocus(e: any) {\n const onFocus = this.props.onFocus;\n onFocus && onFocus(e);\n this.setState({\n isFocused: true\n });\n }\n\n @autobind\n handleBlur(e: any) {\n const onBlur = this.props.onBlur;\n onBlur && onBlur(e);\n this.setState({\n isFocused: false\n });\n }\n\n @autobind\n removeItem(e: React.MouseEvent<HTMLElement>) {\n e.stopPropagation();\n e.preventDefault();\n\n const {result, onResultChange} = this.props;\n const index = parseInt(e.currentTarget.getAttribute('data-index')!, 10);\n const newResult = Array.isArray(result) ? result.concat() : [];\n newResult.splice(index, 1);\n onResultChange && onResultChange(newResult);\n }\n\n @autobind\n handleChange(e: React.ChangeEvent<HTMLInputElement>) {\n const {onChange} = this.props;\n onChange?.(e.currentTarget.value);\n }\n\n render() {\n const {\n className,\n classnames: cx,\n classPrefix,\n clearable,\n disabled,\n hasError,\n result,\n value,\n placeholder,\n children,\n itemRender,\n allowInput,\n inputPlaceholder,\n onResultChange,\n onChange,\n onResultClick,\n translate: __,\n locale,\n onKeyPress,\n onFocus,\n onBlur,\n borderMode,\n useMobileUI,\n hasDropDownArrow,\n onClear,\n ...rest\n } = this.props;\n const isFocused = this.state.isFocused;\n const mobileUI = useMobileUI && isMobile();\n return (\n <div\n className={cx('ResultBox', className, {\n 'is-focused': isFocused,\n 'is-disabled': disabled,\n 'is-error': hasError,\n 'is-clickable': onResultClick,\n 'is-clearable': clearable,\n 'is-mobile': mobileUI,\n 'is-group': Array.isArray(result),\n [`ResultBox--border${ucFirst(borderMode)}`]: borderMode\n })}\n onClick={onResultClick}\n tabIndex={!allowInput && !disabled && onFocus ? 0 : -1}\n onKeyPress={allowInput ? undefined : onKeyPress}\n onFocus={allowInput ? undefined : onFocus}\n onBlur={allowInput ? undefined : onBlur}\n >\n {Array.isArray(result) && result.length ? (\n
|
11
|
+
"import {ThemeProps, themeable} from '../theme';\nimport React from 'react';\nimport omit from 'lodash/omit';\nimport isInteger from 'lodash/isInteger';\nimport {InputBoxProps} from './InputBox';\nimport {uncontrollable} from 'uncontrollable';\nimport {Icon} from './icons';\nimport Input from './Input';\nimport {autobind, isMobile, ucFirst} from '../utils/helper';\nimport {LocaleProps, localeable} from '../locale';\nimport TooltipWrapper, {TooltipObject} from './TooltipWrapper';\nimport isPlainObject = require('lodash/isPlainObject');\n\nexport interface ResultBoxProps\n extends ThemeProps,\n LocaleProps,\n Omit<InputBoxProps, 'result' | 'prefix' | 'onChange' | 'translate'> {\n onChange?: (value: string) => void;\n onResultClick?: (e: React.MouseEvent<HTMLElement>) => void;\n result?: Array<any> | any;\n itemRender: (value: any) => JSX.Element | string;\n onResultChange?: (value: Array<any>) => void;\n onClear?: (e: React.MouseEvent<HTMLElement>) => void;\n allowInput?: boolean;\n inputPlaceholder: string;\n useMobileUI?: boolean;\n hasDropDownArrow?: boolean;\n maxTagCount?: number;\n overflowTagPopover?: TooltipObject;\n}\n\nexport class ResultBox extends React.Component<ResultBoxProps> {\n static defaultProps: Pick<\n ResultBoxProps,\n 'clearable' | 'placeholder' | 'itemRender' | 'inputPlaceholder'\n > = {\n clearable: false,\n placeholder: 'placeholder.noData',\n inputPlaceholder: 'placeholder.enter',\n itemRender: (option: any) => (\n <span>{`${option.scopeLabel || ''}${option.label}`}</span>\n )\n };\n\n state = {\n isFocused: false\n };\n\n inputRef: React.RefObject<any> = React.createRef();\n\n focus() {\n this.inputRef.current?.focus();\n }\n\n blur() {\n this.inputRef.current?.blur();\n }\n\n @autobind\n clearValue(e: React.MouseEvent<any>) {\n e.preventDefault();\n this.props.onClear && this.props.onClear(e);\n this.props.onResultChange && this.props.onResultChange([]);\n }\n\n @autobind\n handleFocus(e: any) {\n const onFocus = this.props.onFocus;\n onFocus && onFocus(e);\n this.setState({\n isFocused: true\n });\n }\n\n @autobind\n handleBlur(e: any) {\n const onBlur = this.props.onBlur;\n onBlur && onBlur(e);\n this.setState({\n isFocused: false\n });\n }\n\n @autobind\n removeItem(e: React.MouseEvent<HTMLElement>) {\n e.stopPropagation();\n e.preventDefault();\n\n const {result, onResultChange} = this.props;\n const index = parseInt(e.currentTarget.getAttribute('data-index')!, 10);\n const newResult = Array.isArray(result) ? result.concat() : [];\n newResult.splice(index, 1);\n onResultChange && onResultChange(newResult);\n }\n\n @autobind\n handleChange(e: React.ChangeEvent<HTMLInputElement>) {\n const {onChange} = this.props;\n onChange?.(e.currentTarget.value);\n }\n\n renderMultipeTags(tags: any[]) {\n const {\n maxTagCount,\n overflowTagPopover,\n itemRender,\n classnames: cx\n } = this.props;\n\n if (\n maxTagCount != null &&\n isInteger(Math.floor(maxTagCount)) &&\n Math.floor(maxTagCount) >= 0 &&\n Math.floor(maxTagCount) < tags.length\n ) {\n const maxVisibleCount = Math.floor(maxTagCount);\n const tooltipProps: TooltipObject = {\n placement: 'top',\n trigger: 'hover',\n showArrow: false,\n offset: [0, -10],\n tooltipClassName: cx(\n 'ResultBox-overflow',\n overflowTagPopover?.tooltipClassName\n ),\n ...omit(overflowTagPopover, ['children', 'content', 'tooltipClassName'])\n };\n\n return [\n ...tags.slice(0, maxVisibleCount),\n {label: `+ ${tags.length - maxVisibleCount} ...`}\n ].map((item, index) => {\n return index === maxVisibleCount ? (\n <TooltipWrapper\n key={tags.length}\n tooltip={{\n ...tooltipProps,\n children: () => (\n <div className={cx('ResultBox-overflow-wrapper')}>\n {tags\n .slice(maxVisibleCount, tags.length)\n .map((item, index) => {\n const itemIndex = index + maxVisibleCount;\n\n return (\n <div className={cx('ResultBox-value')} key={itemIndex}>\n <span className={cx('ResultBox-valueLabel')}>\n {itemRender(item)}\n </span>\n <a data-index={itemIndex} onClick={this.removeItem}>\n <Icon icon=\"close\" className=\"icon\" />\n </a>\n </div>\n );\n })}\n </div>\n )\n }}\n >\n <div className={cx('ResultBox-value')} key={index}>\n <span className={cx('ResultBox-valueLabel')}>{item.label}</span>\n </div>\n </TooltipWrapper>\n ) : (\n <div className={cx('ResultBox-value')} key={index}>\n <span className={cx('ResultBox-valueLabel')}>\n {itemRender(item)}\n </span>\n <a data-index={index} onClick={this.removeItem}>\n <Icon icon=\"close\" className=\"icon\" />\n </a>\n </div>\n );\n });\n }\n\n return tags.map((item, index) => (\n <div className={cx('ResultBox-value')} key={index}>\n <span className={cx('ResultBox-valueLabel')}>{itemRender(item)}</span>\n <a data-index={index} onClick={this.removeItem}>\n <Icon icon=\"close\" className=\"icon\" />\n </a>\n </div>\n ));\n }\n\n render() {\n const {\n className,\n classnames: cx,\n classPrefix,\n clearable,\n disabled,\n hasError,\n result,\n value,\n placeholder,\n children,\n itemRender,\n allowInput,\n inputPlaceholder,\n onResultChange,\n onChange,\n onResultClick,\n translate: __,\n locale,\n onKeyPress,\n onFocus,\n onBlur,\n borderMode,\n useMobileUI,\n hasDropDownArrow,\n onClear,\n ...rest\n } = this.props;\n const isFocused = this.state.isFocused;\n const mobileUI = useMobileUI && isMobile();\n\n return (\n <div\n className={cx('ResultBox', className, {\n 'is-focused': isFocused,\n 'is-disabled': disabled,\n 'is-error': hasError,\n 'is-clickable': onResultClick,\n 'is-clearable': clearable,\n 'is-mobile': mobileUI,\n 'is-group': Array.isArray(result),\n [`ResultBox--border${ucFirst(borderMode)}`]: borderMode\n })}\n onClick={onResultClick}\n tabIndex={!allowInput && !disabled && onFocus ? 0 : -1}\n onKeyPress={allowInput ? undefined : onKeyPress}\n onFocus={allowInput ? undefined : onFocus}\n onBlur={allowInput ? undefined : onBlur}\n >\n {Array.isArray(result) && result.length ? (\n this.renderMultipeTags(result)\n ) : result && !Array.isArray(result) ? (\n <span className={cx('ResultBox-singleValue')}>\n {isPlainObject(result) ? itemRender(result) : result}\n </span>\n ) : allowInput && !disabled ? null : (\n <span className={cx('ResultBox-placeholder')}>\n {__(placeholder || 'placeholder.noData')}\n </span>\n )}\n\n {allowInput && !disabled ? (\n <Input\n {...rest}\n onKeyPress={onKeyPress}\n ref={this.inputRef}\n value={value || ''}\n onChange={this.handleChange}\n placeholder={__(\n Array.isArray(result) && result.length\n ? inputPlaceholder\n : result\n ? ''\n : placeholder\n )}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n ) : null}\n\n {children}\n\n {clearable &&\n !disabled &&\n (Array.isArray(result) ? result.length : result) ? (\n <a\n onClick={this.clearValue}\n className={cx('ResultBox-clear', {\n 'ResultBox-clear-with-arrow': hasDropDownArrow\n })}\n >\n <div className={cx('ResultBox-clear-wrap')}>\n <Icon icon=\"input-clear\" className=\"icon\" />\n </div>\n </a>\n ) : null}\n {hasDropDownArrow && !mobileUI && (\n <span className={cx('ResultBox-pc-arrow')}>\n <Icon icon=\"right-arrow-bold\" className=\"icon\" />\n </span>\n )}\n {!allowInput && mobileUI ? (\n <span className={cx('ResultBox-arrow')}>\n <Icon icon=\"caret\" className=\"icon\" />\n </span>\n ) : null}\n </div>\n );\n }\n}\n\nexport default themeable(\n localeable(\n uncontrollable(ResultBox, {\n value: 'onChange',\n result: 'onResultChange'\n })\n )\n);\n"
|
12
12
|
]
|
13
13
|
}
|
@@ -7,8 +7,7 @@ import Sortable from 'sortablejs';
|
|
7
7
|
import { Option, Options } from './Select';
|
8
8
|
import { ThemeProps } from '../theme';
|
9
9
|
import { LocaleProps } from '../locale';
|
10
|
-
|
11
|
-
export interface ResultListProps extends ThemeProps, LocaleProps, BaseSelectionProps {
|
10
|
+
export interface ResultListProps extends ThemeProps, LocaleProps {
|
12
11
|
className?: string;
|
13
12
|
value?: Array<Option>;
|
14
13
|
onChange?: (value: Array<Option>, optionModified?: boolean) => void;
|
@@ -18,18 +17,9 @@ export interface ResultListProps extends ThemeProps, LocaleProps, BaseSelectionP
|
|
18
17
|
placeholder: string;
|
19
18
|
itemRender: (option: Option, states: ItemRenderStates) => JSX.Element;
|
20
19
|
itemClassName?: string;
|
21
|
-
columns: Array<{
|
22
|
-
name: string;
|
23
|
-
label: string;
|
24
|
-
[propName: string]: any;
|
25
|
-
}>;
|
26
|
-
cellRender?: (column: {
|
27
|
-
name: string;
|
28
|
-
label: string;
|
29
|
-
[propName: string]: any;
|
30
|
-
}, option: Option, colIndex: number, rowIndex: number) => JSX.Element;
|
31
20
|
searchable?: boolean;
|
32
21
|
onSearch?: Function;
|
22
|
+
valueField?: string;
|
33
23
|
}
|
34
24
|
export interface ItemRenderStates {
|
35
25
|
index: number;
|
@@ -55,12 +45,12 @@ export declare class ResultList extends React.Component<ResultListProps, ResultL
|
|
55
45
|
handleValueChange(index: number, value: any, name: string): void;
|
56
46
|
search(inputValue: string): void;
|
57
47
|
clearSearch(): void;
|
58
|
-
handleCloseItem(option: Option): void;
|
48
|
+
handleCloseItem(e: React.MouseEvent<HTMLElement>, option: Option): void;
|
59
49
|
renderNormalList(value?: Options): JSX.Element;
|
60
50
|
render(): JSX.Element;
|
61
51
|
}
|
62
52
|
declare const _default: {
|
63
|
-
new (props: Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
53
|
+
new (props: Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
64
54
|
locale?: string | undefined;
|
65
55
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
66
56
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps): {
|
@@ -69,12 +59,12 @@ declare const _default: {
|
|
69
59
|
getWrappedInstance(): any;
|
70
60
|
render(): JSX.Element;
|
71
61
|
context: any;
|
72
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
62
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
73
63
|
locale?: string | undefined;
|
74
64
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
75
65
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
76
66
|
forceUpdate(callback?: (() => void) | undefined): void;
|
77
|
-
readonly props: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
67
|
+
readonly props: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
78
68
|
locale?: string | undefined;
|
79
69
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
80
70
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps> & Readonly<{
|
@@ -85,35 +75,35 @@ declare const _default: {
|
|
85
75
|
[key: string]: React.ReactInstance;
|
86
76
|
};
|
87
77
|
componentDidMount?(): void;
|
88
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
78
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
89
79
|
locale?: string | undefined;
|
90
80
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
91
81
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
92
82
|
componentWillUnmount?(): void;
|
93
83
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
94
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
84
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
95
85
|
locale?: string | undefined;
|
96
86
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
97
87
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
98
|
-
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
88
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
99
89
|
locale?: string | undefined;
|
100
90
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
101
91
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
102
92
|
componentWillMount?(): void;
|
103
93
|
UNSAFE_componentWillMount?(): void;
|
104
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
94
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
105
95
|
locale?: string | undefined;
|
106
96
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
107
97
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
|
108
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
98
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
109
99
|
locale?: string | undefined;
|
110
100
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
111
101
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
|
112
|
-
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
102
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
113
103
|
locale?: string | undefined;
|
114
104
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
115
105
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
116
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
106
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
117
107
|
locale?: string | undefined;
|
118
108
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
119
109
|
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
@@ -121,7 +111,7 @@ declare const _default: {
|
|
121
111
|
displayName: string;
|
122
112
|
contextType: React.Context<string>;
|
123
113
|
ComposedComponent: React.ComponentType<{
|
124
|
-
new (props: Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
114
|
+
new (props: Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
125
115
|
locale?: string | undefined;
|
126
116
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
127
117
|
}): {
|
@@ -130,12 +120,12 @@ declare const _default: {
|
|
130
120
|
getWrappedInstance(): any;
|
131
121
|
render(): JSX.Element;
|
132
122
|
context: any;
|
133
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
123
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
134
124
|
locale?: string | undefined;
|
135
125
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
136
126
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
137
127
|
forceUpdate(callback?: (() => void) | undefined): void;
|
138
|
-
readonly props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
128
|
+
readonly props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
139
129
|
locale?: string | undefined;
|
140
130
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
141
131
|
}> & Readonly<{
|
@@ -146,35 +136,35 @@ declare const _default: {
|
|
146
136
|
[key: string]: React.ReactInstance;
|
147
137
|
};
|
148
138
|
componentDidMount?(): void;
|
149
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
139
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
150
140
|
locale?: string | undefined;
|
151
141
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
152
142
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
153
143
|
componentWillUnmount?(): void;
|
154
144
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
155
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
145
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
156
146
|
locale?: string | undefined;
|
157
147
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
158
148
|
}>, prevState: Readonly<{}>): any;
|
159
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
149
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
160
150
|
locale?: string | undefined;
|
161
151
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
162
152
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
163
153
|
componentWillMount?(): void;
|
164
154
|
UNSAFE_componentWillMount?(): void;
|
165
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
155
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
166
156
|
locale?: string | undefined;
|
167
157
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
168
158
|
}>, nextContext: any): void;
|
169
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
159
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
170
160
|
locale?: string | undefined;
|
171
161
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
172
162
|
}>, nextContext: any): void;
|
173
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
163
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
174
164
|
locale?: string | undefined;
|
175
165
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
176
166
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
177
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
167
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
178
168
|
locale?: string | undefined;
|
179
169
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
180
170
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
@@ -186,7 +176,7 @@ declare const _default: {
|
|
186
176
|
ComposedComponent: typeof ResultList;
|
187
177
|
}>;
|
188
178
|
} & import("hoist-non-react-statics").NonReactStatics<{
|
189
|
-
new (props: Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
179
|
+
new (props: Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
190
180
|
locale?: string | undefined;
|
191
181
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
192
182
|
}): {
|
@@ -195,12 +185,12 @@ declare const _default: {
|
|
195
185
|
getWrappedInstance(): any;
|
196
186
|
render(): JSX.Element;
|
197
187
|
context: any;
|
198
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
188
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
199
189
|
locale?: string | undefined;
|
200
190
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
201
191
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
202
192
|
forceUpdate(callback?: (() => void) | undefined): void;
|
203
|
-
readonly props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
193
|
+
readonly props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
204
194
|
locale?: string | undefined;
|
205
195
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
206
196
|
}> & Readonly<{
|
@@ -211,35 +201,35 @@ declare const _default: {
|
|
211
201
|
[key: string]: React.ReactInstance;
|
212
202
|
};
|
213
203
|
componentDidMount?(): void;
|
214
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
204
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
215
205
|
locale?: string | undefined;
|
216
206
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
217
207
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
218
208
|
componentWillUnmount?(): void;
|
219
209
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
220
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
210
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
221
211
|
locale?: string | undefined;
|
222
212
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
223
213
|
}>, prevState: Readonly<{}>): any;
|
224
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
214
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
225
215
|
locale?: string | undefined;
|
226
216
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
227
217
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
228
218
|
componentWillMount?(): void;
|
229
219
|
UNSAFE_componentWillMount?(): void;
|
230
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
220
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
231
221
|
locale?: string | undefined;
|
232
222
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
233
223
|
}>, nextContext: any): void;
|
234
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
224
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
235
225
|
locale?: string | undefined;
|
236
226
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
237
227
|
}>, nextContext: any): void;
|
238
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
228
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
239
229
|
locale?: string | undefined;
|
240
230
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
241
231
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
242
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
232
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
243
233
|
locale?: string | undefined;
|
244
234
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
245
235
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
@@ -251,7 +241,7 @@ declare const _default: {
|
|
251
241
|
ComposedComponent: typeof ResultList;
|
252
242
|
}, {}> & {
|
253
243
|
ComposedComponent: {
|
254
|
-
new (props: Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
244
|
+
new (props: Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
255
245
|
locale?: string | undefined;
|
256
246
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
257
247
|
}): {
|
@@ -260,12 +250,12 @@ declare const _default: {
|
|
260
250
|
getWrappedInstance(): any;
|
261
251
|
render(): JSX.Element;
|
262
252
|
context: any;
|
263
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
253
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
264
254
|
locale?: string | undefined;
|
265
255
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
266
256
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
267
257
|
forceUpdate(callback?: (() => void) | undefined): void;
|
268
|
-
readonly props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
258
|
+
readonly props: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
269
259
|
locale?: string | undefined;
|
270
260
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
271
261
|
}> & Readonly<{
|
@@ -276,35 +266,35 @@ declare const _default: {
|
|
276
266
|
[key: string]: React.ReactInstance;
|
277
267
|
};
|
278
268
|
componentDidMount?(): void;
|
279
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
269
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
280
270
|
locale?: string | undefined;
|
281
271
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
282
272
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
283
273
|
componentWillUnmount?(): void;
|
284
274
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
285
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
275
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
286
276
|
locale?: string | undefined;
|
287
277
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
288
278
|
}>, prevState: Readonly<{}>): any;
|
289
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
279
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
290
280
|
locale?: string | undefined;
|
291
281
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
292
282
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
293
283
|
componentWillMount?(): void;
|
294
284
|
UNSAFE_componentWillMount?(): void;
|
295
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
285
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
296
286
|
locale?: string | undefined;
|
297
287
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
298
288
|
}>, nextContext: any): void;
|
299
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
289
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
300
290
|
locale?: string | undefined;
|
301
291
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
302
292
|
}>, nextContext: any): void;
|
303
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
293
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
304
294
|
locale?: string | undefined;
|
305
295
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
306
296
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
307
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "
|
297
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ResultListProps, keyof LocaleProps>, "classPrefix" | "classnames" | "title" | "className" | "theme" | "value" | "disabled" | "valueField" | "onChange" | "itemClassName" | "sortable" | "searchable" | "onSearch"> & Partial<Pick<Omit<ResultListProps, keyof LocaleProps>, "placeholder" | "itemRender">> & Partial<Pick<Pick<ResultListProps, "placeholder" | "itemRender">, never>> & {
|
308
298
|
locale?: string | undefined;
|
309
299
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
310
300
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|